Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/12park/web/sites/default/files/js/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/12park/web/sites/default/files/js/js_GjmPqm5qqvDCTf-wWazIe9mbZN6lDr7Az71y8ufXONM.js

/* @license GPL-2.0-or-later https://raw.githubusercontent.com/ckeditor/ckeditor5/v47.6.0/LICENSE.md */
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,o,r,n){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&s[d[0]]||(void 0!==n&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=n),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},424:e=>{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(i){e.setAttribute(i,t[i])})}},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},719:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var n={},s=[],a=0;a<e.length;a++){var c=e[a],l=o.base?c[0]+o.base:c[0],d=n[l]||0,u="".concat(l," ").concat(d);n[l]=d+1;var h=i(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=r(p,o);o.byIndex=a,t.splice(a,0,{identifier:u,updater:f,references:1})}s.push(u)}return s}function r(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,r){var n=o(e=e||[],r=r||{});return function(e){e=e||[];for(var s=0;s<n.length;s++){var a=i(n[s]);t[a].references--}for(var c=o(e,r),l=0;l<n.length;l++){var d=i(n[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}n=c}}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},783:(e,t,i)=>{e.exports=i(237)("./src/engine.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},808:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var o=i(792),r=i.n(o),n=i(305),s=i.n(n)()(r());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border:solid var(--ck-color-base-border);border-radius:0;border-width:1px 1px 0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-sticky-panel__content_sticky{border-bottom-width:1px}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-menu-bar{border:0;border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-toolbar{border:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const a=s},863:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,r){var n;if(o)n="";else{n="",r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,n);else{var a=document.createTextNode(n),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,i=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}}},t={};function i(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={id:o,exports:{}};return e[o](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o={};(()=>{"use strict";i.r(o),i.d(o,{ClassicEditor:()=>w,ClassicEditorUI:()=>n,ClassicEditorUIView:()=>k});var e=i(311),t=i(783),r=i(584);class n extends e.EditorUI{view;_toolbarConfig;_elementReplacer;constructor(t,i){super(t),this.view=i,this._toolbarConfig=(0,e.normalizeToolbarConfig)(t.config.get("toolbar")),this._elementReplacer=new r.ElementReplacer,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,o=t.editing.view,r=i.editable,n=o.document.getRoot();r.name=n.rootName,i.render();const s=r.element;this.setEditableElement(r.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this.initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:e})=>e||0),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,i=e.editing.view,o=i.document.getRoot(),r=e.sourceElement;let n;const s=e.config.get("placeholder");s&&(n="string"==typeof s?s:s[this.view.editable.name]),!n&&r&&"textarea"===r.tagName.toLowerCase()&&(n=r.getAttribute("placeholder")),n&&(o.placeholder=n),(0,t.enableViewPlaceholder)({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:e}=this.view,t=this.editor.plugins.get("ContextualBalloon");t.on("getPositionOptions",t=>{const i=t.return;if(!i||!e.isSticky||!e.element)return;const o=new r.Rect(e.element).height,n="function"==typeof i.target?i.target():i.target,s="function"==typeof i.limiter?i.limiter():i.limiter;if(n&&s&&new r.Rect(n).height>=new r.Rect(s).height-o)return;const a={...i.viewportOffsetConfig},c=(a.top||0)+o;t.return={...i,viewportOffsetConfig:{...a,top:c}}},{priority:"low"});const i=()=>{t.visibleView&&t.updatePosition()};this.listenTo(e,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(e,t,i){const o=this.view.stickyPanel;if(o.isSticky){const e=new r.Rect(o.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(o,"change:isSticky",e),setTimeout(()=>{this.stopListening(o,"change:isSticky",e)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",()=>{const o=i.view;o.on("moveTo",(i,n)=>{if(!t.isSticky||o.wasMoved||o.isModal)return;const s=new r.Rect(t.contentPanelElement);n[1]<s.bottom+e.DialogView.defaultOffset&&(n[1]=s.bottom+e.DialogView.defaultOffset)},{priority:"high"})},{priority:"low"})}}var s=i(719),a=i.n(s),c=i(863),l=i.n(c),d=i(424),u=i.n(d),h=i(517),p=i.n(h),f=i(163),b=i.n(f),g=i(808),m={attributes:{"data-cke":!0}};m.setAttributes=p(),m.insert=u().bind(null,"head"),m.domAPI=l(),m.insertStyleElement=b();a()(g.A,m);g.A&&g.A.locals&&g.A.locals;class k extends e.BoxedEditorUIView{stickyPanel;toolbar;editable;constructor(t,i,o={}){super(t),this.stickyPanel=new e.StickyPanelView(t),this.toolbar=new e.ToolbarView(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new e.MenuBarView(t)),this.editable=new e.InlineEditableUIView(t,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var v=i(782);function y(e){return function(e){return"object"==typeof e&&null!==e}(e)&&1===e.nodeType&&!function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)}class w extends((0,v.ElementApiMixin)(v.Editor)){static get editorName(){return"ClassicEditor"}ui;constructor(e,t={}){if(!_(e)&&void 0!==t.initialData)throw new r.CKEditorError("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return _(e)?(0,r.getDataFromElement)(e):e}(e)),_(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=this.config.get("menuBar"),s=new k(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:o.isVisible,label:this.config.get("label")});this.ui=new n(this,s),(0,v.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(i=>{const o=new this(e,t);i(o.initPlugins().then(()=>o.ui.init(_(e)?e:null)).then(()=>o.data.init(o.config.get("initialData"))).then(()=>o.fire("ready")).then(()=>o))})}}function _(e){return y(e)}})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=o})();;
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"HTML object":"HTML object"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={163:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},237:t=>{"use strict";t.exports=CKEditor5.dll},305:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r}).join("")},e.i=function(t,r,i,o,n){"string"==typeof t&&(t=[[null,t,void 0]]);var l={};if(i)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var m=0;m<t.length;m++){var c=[].concat(t[m]);i&&l[c[0]]||(void 0!==n&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=n),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},424:t=>{"use strict";var e={};t.exports=function(t,r){var i=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}},507:(t,e,r)=>{t.exports=r(237)("./src/enter.js")},517:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},617:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(792),o=r.n(i),n=r(305),l=r.n(n)()(o());l.push([t.id,":root{--ck-html-object-embed-unfocused-outline-width:1px}.ck-widget.html-object-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base);min-width:calc(76px + var(--ck-spacing-standard));padding:var(--ck-spacing-small);padding-top:calc(var(--ck-font-size-tiny) + var(--ck-spacing-large))}.ck-widget.html-object-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-object-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.html-object-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-object-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);font-style:normal;font-weight:400;left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-object-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);position:absolute;top:0;transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.html-object-embed .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck-widget.html-object-embed .html-object-embed__content{pointer-events:none}div.ck-widget.html-object-embed{margin:1em auto}span.ck-widget.html-object-embed{display:inline-block}",""]);const s=l},719:t=>{"use strict";var e=[];function r(t){for(var r=-1,i=0;i<e.length;i++)if(e[i].identifier===t){r=i;break}return r}function i(t,i){for(var n={},l=[],s=0;s<t.length;s++){var a=t[s],m=i.base?a[0]+i.base:a[0],c=n[m]||0,u="".concat(m," ").concat(c);n[m]=c+1;var d=r(u),h={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var f=o(h,i);i.byIndex=s,e.splice(s,0,{identifier:u,updater:f,references:1})}l.push(u)}return l}function o(t,e){var r=e.domAPI(e);r.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,o){var n=i(t=t||[],o=o||{});return function(t){t=t||[];for(var l=0;l<n.length;l++){var s=r(n[l]);e[s].references--}for(var a=i(t,o),m=0;m<n.length;m++){var c=r(n[m]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}n=a}}},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},792:t=>{"use strict";t.exports=function(t){return t[1]}},863:t=>{"use strict";var e,r=(e=[],function(t,r){return e[t]=r,e.filter(Boolean).join("\n")});function i(t,e,i,o){var n;if(i)n="";else{n="",o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var l=void 0!==o.layer;l&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,l&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}")}if(t.styleSheet)t.styleSheet.cssText=r(e,n);else{var s=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(s,a[e]):t.appendChild(s)}}var o={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=o.singletonCounter++,r=o.singleton||(o.singleton=t.insertStyleElement(t));return{update:function(t){i(r,e,!1,t)},remove:function(t){i(r,e,!0,t)}}}},901:(t,e,r)=>{t.exports=r(237)("./src/widget.js")}},e={};function r(i){var o=e[i];if(void 0!==o)return o.exports;var n=e[i]={id:i,exports:{}};return t[i](n,n.exports,r),n.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i),r.d(i,{CodeBlockElementSupport:()=>Pt,CustomElementSupport:()=>Qt,DataFilter:()=>Et,DataSchema:()=>mt,DualContentModelElementSupport:()=>Ft,EmptyBlock:()=>oe,FullPage:()=>ee,GeneralHtmlSupport:()=>Yt,HeadingElementSupport:()=>_t,HorizontalLineElementSupport:()=>Kt,HtmlComment:()=>Zt,HtmlPageDataProcessor:()=>te,IframeElementSupport:()=>Xt,ImageElementSupport:()=>xt,ListElementSupport:()=>Wt,MediaEmbedElementSupport:()=>Tt,ScriptElementSupport:()=>Bt,StyleElementSupport:()=>Vt,TableElementSupport:()=>Ht,_HTML_SUPPORT_SCHEMA_DEFINITIONS:()=>et,_attributeToInlineHtmlSupportConverter:()=>J,_createObjectHtmlSupportView:()=>X,_emptyInlineModelElementToViewHtmlSupportConverter:()=>Y,_getHtmlSupportAttributeName:()=>q,_getHtmlSupportDescendantElement:()=>$t,_mergeHtmlSupportViewElementAttributes:()=>L,_modelToViewBlockAttributeHtmlSupportConverter:()=>tt,_modifyHtmlSupportGhsAttribute:()=>U,_removeHtmlSupportViewAttributes:()=>M,_setHtmlSupportViewAttributes:()=>N,_toHtmlSupportPascalCase:()=>W,_toObjectWidgetHtmlSupportConverter:()=>K,_updateHtmlSupportViewAttributes:()=>V,_viewToAttributeInlineHtmlSupportConverter:()=>Q,_viewToModelBlockAttributeHtmlSupportConverter:()=>Z,_viewToModelObjectContentHtmlSupportConverter:()=>G});var t=r(782),e=r(584),o=r(783),n=r(901);function l(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function s(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const a="[object RegExp]",m="[object String]",c="[object Number]",u="[object Boolean]",d="[object Arguments]",h="[object Symbol]",f="[object Date]",g="[object Map]",b="[object Set]",p="[object Array]",w="[object ArrayBuffer]",A="[object Object]",y="[object DataView]",v="[object Uint8Array]",E="[object Uint8ClampedArray]",S="[object Uint16Array]",O="[object Uint32Array]",k="[object Int8Array]",C="[object Int16Array]",j="[object Int32Array]",P="[object Float32Array]",F="[object Float64Array]";function I(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function _(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $(t,e,r,i=new Map,o=void 0){const n=o?.(t,e,r,i);if(null!=n)return n;if(I(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=$(t[n],n,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[n,l]of t)e.set(n,$(l,n,r,i,o));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const n of t)e.add($(n,void 0,r,i,o));return e}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(_(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let n=0;n<t.length;n++)e[n]=$(t[n],n,r,i,o);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),x(e,t,r,i,o),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),x(e,t,r,i,o),e}if(t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),x(e,t,r,i,o),e}if(t instanceof Error){const e=new t.constructor;return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,x(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch(s(t)){case d:case p:case w:case y:case u:case f:case P:case F:case k:case C:case j:case g:case c:case A:case a:case b:case m:case h:case v:case E:case S:case O:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),x(e,t,r,i,o),e}return t}function x(t,e,r=t,i,o){const n=[...Object.keys(e),...l(e)];for(let l=0;l<n.length;l++){const s=n[l],a=Object.getOwnPropertyDescriptor(t,s);(null==a||a.writable)&&(t[s]=$(e[s],s,r,i,o))}}function T(t,e){return function(t,e){return $(t,void 0,t,new Map,e)}(t,(r,i,o,n)=>{const l=e?.(r,i,o,n);if(null!=l)return l;if("object"==typeof t)switch(Object.prototype.toString.call(t)){case c:case m:case u:{const e=new t.constructor(t?.valueOf());return x(e,t),e}case d:{const e={};return x(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}})}function B(t){return T(t)}const D=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function H(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(H).join(",");const e=String(t);return"0"===e&&Object.is(Number(t),-0)?"-0":e}function R(t){const e=function(t){return Array.from(t.match(D)??[])}(function(t){return"string"!=typeof t&&(t=H(t)),t.replace(/['\u2019]/g,"")}(t).trim());let r="";for(let t=0;t<e.length;t++){const i=e[t];r&&(r+=" "),i===i.toUpperCase()?r+=i:r+=i[0].toUpperCase()+i.slice(1).toLowerCase()}return r}function V(t,e,r,i){e&&M(t,e,i),r&&N(t,r,i)}function N(t,e,r){if(e.attributes)for(const[i,o]of Object.entries(e.attributes))t.setAttribute(i,o,r);e.styles&&t.setStyle(e.styles,r),e.classes&&t.addClass(e.classes,r)}function M(t,e,r){if(e.attributes)for(const[i]of Object.entries(e.attributes))t.removeAttribute(i,r);if(e.styles)for(const i of Object.keys(e.styles))t.removeStyle(i,r);e.classes&&t.removeClass(e.classes,r)}function L(t,e){const r=B(t);let i="attributes";for(i in e)r[i]="classes"==i?Array.from(new Set([...t[i]||[],...e[i]])):{...t[i],...e[i]};return r}function U(t,e,r,i,o){const n=e.getAttribute(r),l={};for(const t of["attributes","styles","classes"]){if(t!=i){n&&n[t]&&(l[t]=n[t]);continue}if("classes"==i){const e=new Set(n&&n.classes||[]);o(e),e.size&&(l[t]=Array.from(e));continue}const e=new Map(Object.entries(n&&n[t]||{}));o(e),e.size&&(l[t]=Object.fromEntries(e))}Object.keys(l).length?e.is("documentSelection")?t.setSelectionAttribute(r,l):t.setAttribute(r,l,e):n&&(e.is("documentSelection")?t.removeSelectionAttribute(r):t.removeAttribute(r,e))}function z(t,e,r){for(const i of e.getItems({shallow:!0})){const e=i.getAttribute(t);e&&e.attributes&&Object.keys(e.attributes).length?Object.keys(e).length>1&&r.setAttribute(t,{attributes:e.attributes},i):r.removeAttribute(t,i)}}function W(t){return R(t).replace(/ /g,"")}function q(t){return`html${W(t)}Attributes`}function G({model:t}){return(e,r)=>r.writer.createElement(t,{htmlContent:e.getCustomProperty("$rawContent")})}function K(t,{view:e,isInline:r}){const i=t.t;return(t,{writer:o})=>{const l=i("HTML object"),s=X(e,t,o),a=t.getAttribute(q(e));o.addClass("html-object-embed__content",s),a&&N(o,a,s);const m=o.createContainerElement(r?"span":"div",{class:"html-object-embed","data-html-object-embed-label":l},s);return(0,n.toWidget)(m,o,{label:l})}}function X(t,e,r){return r.createRawElement(t,null,(t,r)=>{r.setContentOf(t,e.getAttribute("htmlContent"))})}function Q({view:t,model:e,allowEmpty:r},i){return e=>{e.on(`element:${t}`,(t,e,n)=>{let l=i.processViewAttributes(e.viewItem,n);if(l||n.consumable.test(e.viewItem,{name:!0})){if(l=l||{},n.consumable.consume(e.viewItem,{name:!0}),e.modelRange||(e=Object.assign(e,n.convertChildren(e.viewItem,e.modelCursor))),r&&e.modelRange.isCollapsed&&Object.keys(l).length){const t=n.writer.createElement("htmlEmptyElement");if(!n.safeInsert(t,e.modelCursor))return;const r=n.getSplitParts(t);return e.modelRange=n.writer.createRange(e.modelRange.start,n.writer.createPositionAfter(r[r.length-1])),n.updateConversionResult(t,e),void o(t,l,n)}for(const t of e.modelRange.getItems())o(t,l,n)}},{priority:"low"})};function o(t,r,i){if(i.schema.checkAttribute(t,e)){const o=L(r,t.getAttribute(e)||{});i.writer.setAttribute(e,o,t)}}}function Y({model:t,view:e},r){return(i,{writer:o,consumable:l})=>{if(!i.hasAttribute(t))return null;const s=o.createContainerElement(e),a=i.getAttribute(t);return l.consume(i,`attribute:${t}`),N(o,a,s),s.getFillerOffset=()=>null,r?(0,n.toWidget)(s,o):s}}function J({priority:t,view:e}){return(r,i)=>{if(!r)return;const{writer:o}=i,n=o.createAttributeElement(e,null,{priority:t});return N(o,r,n),n}}function Z({view:t},e){return r=>{r.on(`element:${t}`,(t,r,i)=>{if(!r.modelRange||r.modelRange.isCollapsed)return;const o=e.processViewAttributes(r.viewItem,i);o&&i.writer.setAttribute(q(r.viewItem.name),o,r.modelRange)},{priority:"low"})}}function tt({view:t,model:e}){return r=>{r.on(`attribute:${q(t)}:${e}`,(t,e,r)=>{if(!r.consumable.consume(e.item,t.name))return;const{attributeOldValue:i,attributeNewValue:o}=e;V(r.writer,i,o,r.mapper.toViewElement(e.item))})}}const et={block:[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"tableColumnGroup",view:"colgroup"},{model:"tableColumn",view:"col"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"horizontalLine",view:"hr"},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!1}},{model:"htmlColgroup",view:"colgroup",modelSchema:{allowIn:"htmlTable",allowChildren:"col",isBlock:!1}},{model:"htmlCol",view:"col",modelSchema:{allowIn:"htmlColgroup",isBlock:!1}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isLimit:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!1}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6","$text"],allowIn:"htmlDetails",isBlock:!1}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowIn:["$root","$container"],allowChildren:["paragraph","htmlP","htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!1}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!1}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!1}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDiv"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",allowIn:"htmlDiv",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",allowIn:"htmlDiv",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlHr",view:"hr",isEmpty:!0,modelSchema:{inheritAllFrom:"$blockObject"}}],inline:[{model:"htmlLiAttributes",view:"li",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlOlAttributes",view:"ol",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlUlAttributes",view:"ul",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"table"},{model:"htmlTheadAttributes",view:"thead",appliesToBlock:"table"},{model:"htmlTbodyAttributes",view:"tbody",appliesToBlock:"table"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"imageBlock"},{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref",attributeProperties:{isFormatting:!0}},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlCustomElement",view:"$customElement",modelSchema:{allowWhere:["$text","$block"],allowAttributesOf:"$inlineObject",isInline:!0}}]};function rt(t){return"__proto__"===t}function it(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===s(t)}function ot(t){return"object"==typeof t&&null!==t}function nt(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];if(null==e)return!1;return!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function lt(t){return _(t)}function st(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let t=0;t<r.length;t++){o=at(o,r[t],i,new Map)}return o}function at(t,e,r,i){if(I(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if(I(t))return t;if(Array.isArray(t)||_(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){const e=new r(t.message);return e.stack=t.stack,e.name=t.name,e.cause=t.cause,e}if("undefined"!=typeof File&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if("object"==typeof t){const r=Object.create(e);return Object.assign(r,t)}return t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const o=[...Object.keys(e),...l(e)];for(let n=0;n<o.length;n++){const l=o[n];if(rt(l))continue;let s=e[l],a=t[l];if(it(s)&&(s={...s}),it(a)&&(a={...a}),"undefined"!=typeof Buffer&&Buffer.isBuffer(s)&&(s=B(s)),Array.isArray(s))if("object"==typeof a&&null!=a){const t=[],e=Reflect.ownKeys(a);for(let r=0;r<e.length;r++){const i=e[r];t[i]=a[i]}a=t}else a=[];const m=r(a,s,l,t,e,i);null!=m?t[l]=m:Array.isArray(s)||ot(a)&&ot(s)?t[l]=at(a,s,r,i):null==a&&nt(s)?t[l]=at({},s,r,i):null==a&&lt(s)?t[l]=B(s):void 0!==a&&void 0===s||(t[l]=s)}return t}class mt extends t.Plugin{_definitions=[];static get pluginName(){return"DataSchema"}static get isOfficialPlugin(){return!0}init(){for(const t of et.block)this.registerBlockElement(t);for(const t of et.inline)this.registerInlineElement(t)}registerBlockElement(t){this._definitions.push({...t,isBlock:!0})}registerInlineElement(t){this._definitions.push({...t,isInline:!0})}extendBlockElement(t){this._extendDefinition({...t,isBlock:!0})}extendInlineElement(t){this._extendDefinition({...t,isInline:!0})}getDefinitionsForView(t,e=!1){const r=new Set;for(const i of this._getMatchingViewDefinitions(t)){if(e)for(const t of this._getReferences(i.model))r.add(t);r.add(i)}return r}getDefinitionsForModel(t){return this._definitions.filter(e=>e.model==t)}_getMatchingViewDefinitions(t){return this._definitions.filter(e=>e.view&&function(t,e){if("string"==typeof t)return t===e;if(t instanceof RegExp)return t.test(e);return!1}(t,e.view))}*_getReferences(t){const r=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter(e=>e.model==t);for(const{modelSchema:o}of i)if(o)for(const i of r)for(const r of(0,e.toArray)(o[i]||[])){const e=this._definitions.filter(t=>t.model==r);for(const i of e)r!==t&&(yield*this._getReferences(i.model),yield i)}}_extendDefinition(t){const e=Array.from(this._definitions.entries()).filter(([,e])=>e.model==t.model);if(0!=e.length)for(const[r,i]of e)this._definitions[r]=st({},i,t,(t,e)=>Array.isArray(t)?t.concat(e):void 0);else this._definitions.push(t)}}var ct=r(719),ut=r.n(ct),dt=r(863),ht=r.n(dt),ft=r(424),gt=r.n(ft),bt=r(517),pt=r.n(bt),wt=r(163),At=r.n(wt),yt=r(617),vt={attributes:{"data-cke":!0}};vt.setAttributes=pt(),vt.insert=gt().bind(null,"head"),vt.domAPI=ht(),vt.insertStyleElement=At();ut()(yt.A,vt);yt.A&&yt.A.locals&&yt.A.locals;class Et extends t.Plugin{_dataSchema;_allowedAttributes;_disallowedAttributes;_allowedElements;_disallowedElements;_dataInitialized;_coupledAttributes;constructor(t){super(t),this._dataSchema=t.plugins.get("DataSchema"),this._allowedAttributes=new o.Matcher,this._disallowedAttributes=new o.Matcher,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get isOfficialPlugin(){return!0}static get requires(){return[mt,n.Widget]}loadAllowedConfig(t){for(const e of t){const t=e.name||/[\s\S]+/,r=jt(e);this.allowElement(t),r.forEach(t=>this.allowAttributes(t))}}loadDisallowedConfig(t){for(const e of t){const t=e.name||/[\s\S]+/,r=jt(e);0==r.length?this.disallowElement(t):r.forEach(t=>this.disallowAttributes(t))}}loadAllowedEmptyElementsConfig(t){for(const e of t)this.allowEmptyElement(e)}allowElement(t){for(const e of this._dataSchema.getDefinitionsForView(t,!0))this._addAllowedElement(e),this._coupledAttributes=null}disallowElement(t){for(const e of this._dataSchema.getDefinitionsForView(t,!1))this._disallowedElements.add(e.view)}allowEmptyElement(t){for(const e of this._dataSchema.getDefinitionsForView(t,!0))e.isInline&&this._dataSchema.extendInlineElement({...e,allowEmpty:!0})}allowAttributes(t){this._allowedAttributes.add(t)}disallowAttributes(t){this._disallowedAttributes.add(t)}processViewAttributes(t,e){const{consumable:r}=e;return St(t,this._disallowedAttributes,r),function(t,{attributes:e,classes:r,styles:i}){if(!e.length&&!r.length&&!i.length)return null;return{...e.length&&{attributes:Ot(t,e)},...i.length&&{styles:kt(t,i)},...r.length&&{classes:r}}}(t,St(t,this._allowedAttributes,r))}_addAllowedElement(t){if(!this._allowedElements.has(t)){if(this._allowedElements.add(t),"appliesToBlock"in t&&"string"==typeof t.appliesToBlock)for(const e of this._dataSchema.getDefinitionsForModel(t.appliesToBlock))e.isBlock&&this._addAllowedElement(e);this._dataInitialized&&this.editor.data.once("set",()=>{this._fireRegisterEvent(t)},{priority:e.priorities.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const t of this._allowedElements)this._fireRegisterEvent(t)},{priority:e.priorities.highest+1})}_registerElementHandlers(){this.on("register",(t,r)=>{const i=this.editor.model.schema;if(r.isObject&&!i.isRegistered(r.model))this._registerObjectElement(r);else if(r.isBlock)this._registerBlockElement(r);else{if(!r.isInline)throw new e.CKEditorError("data-filter-invalid-definition",null,r);this._registerInlineElement(r)}t.stop()},{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const t=this.editor.model,e=t.document.selection;t.document.registerPostFixer(e=>{const r=t.document.differ.getChanges();let i=!1;const o=this._getCoupledAttributesMap();for(const t of r){if("attribute"!=t.type||null!==t.attributeNewValue)continue;const r=o.get(t.attributeKey);if(r)for(const{item:o}of t.range.getWalker())for(const t of r)o.hasAttribute(t)&&(e.removeAttribute(t,o),i=!0)}return i}),this.listenTo(e,"change:attribute",(r,{attributeKeys:i})=>{const o=new Set,n=this._getCoupledAttributesMap();for(const t of i){if(e.hasAttribute(t))continue;const r=n.get(t);if(r)for(const t of r)e.hasAttribute(t)&&o.add(t)}0!=o.size&&t.change(t=>{for(const e of o)t.removeSelectionAttribute(e)})})}_registerAssociatedHtmlAttributesPostFixer(){const t=this.editor.model;t.document.registerPostFixer(e=>{const r=t.document.differ.getChanges();let i=!1;for(const o of r)if("insert"===o.type&&"$text"!==o.name)for(const r of o.attributes.keys())r.startsWith("html")&&r.endsWith("Attributes")&&(t.schema.checkAttribute(o.name,r)||(e.removeAttribute(r,o.position.nodeAfter),i=!0));return i})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const t of this._allowedElements)if(t.coupledAttribute&&t.model){const e=this._coupledAttributes.get(t.coupledAttribute);e?e.push(t.model):this._coupledAttributes.set(t.coupledAttribute,[t.model])}return this._coupledAttributes}_fireRegisterEvent(t){t.view&&this._disallowedElements.has(t.view)||this.fire(t.view?`register:${t.view}`:"register",t)}_registerObjectElement(t){const r=this.editor,i=r.model.schema,o=r.conversion,{view:n,model:l}=t;i.register(l,t.modelSchema),n&&(i.extend(t.model,{allowAttributes:[q(n),"htmlContent"]}),r.data.registerRawContentMatcher({name:n}),o.for("upcast").elementToElement({view:n,model:G(t),converterPriority:e.priorities.low+2}),o.for("upcast").add(Z(t,this)),o.for("editingDowncast").elementToStructure({model:{name:l,attributes:[q(n)]},view:K(r,t)}),o.for("dataDowncast").elementToElement({model:l,view:(t,{writer:e})=>X(n,t,e)}),o.for("dataDowncast").add(tt(t)))}_registerBlockElement(t){const r=this.editor,i=r.model.schema,o=r.conversion,{view:n,model:l}=t;if(!i.isRegistered(t.model)){if(!t.modelSchema)return;if(i.register(t.model,t.modelSchema),!n)return;o.for("upcast").elementToElement({model:l,view:n,converterPriority:e.priorities.low+2}),o.for("downcast").elementToElement({model:l,view:(e,{writer:r})=>t.isEmpty?r.createEmptyElement(n):r.createContainerElement(n)})}n&&(i.extend(t.model,{allowAttributes:q(n)}),o.for("upcast").add(Z(t,this)),o.for("downcast").add(tt(t)))}_registerInlineElement(t){const e=this.editor,r=e.model.schema,i=e.conversion,o=t.model;if(!t.appliesToBlock&&(r.extend("$text",{allowAttributes:o}),t.attributeProperties&&r.setAttributeProperties(o,t.attributeProperties),i.for("upcast").add(Q(t,this)),i.for("downcast").attributeToElement({model:o,view:J(t)}),t.allowEmpty)){if(r.setAttributeProperties(o,{copyFromObject:!1}),!r.isRegistered("htmlEmptyElement")){r.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"});const t=t=>Array.from(t.getAttributeKeys()).some(t=>t.startsWith("html"));e.model.document.registerPostFixer(r=>{const i=e.model.document.differ.getChanges(),o=new Set;for(const e of i)if("remove"!==e.type){if("attribute"===e.type&&null===e.attributeNewValue)for(const{item:r}of e.range)r.is("element","htmlEmptyElement")&&!t(r)&&o.add(r);if("insert"===e.type&&e.position.nodeAfter){const i=e.position.nodeAfter;for(const{item:e}of r.createRangeOn(i))e.is("element","htmlEmptyElement")&&!t(e)&&o.add(e)}}for(const t of o)r.remove(t);return o.size>0})}e.data.htmlProcessor.domConverter.registerInlineObjectMatcher(e=>e.name==t.view&&e.isEmpty&&Array.from(e.getAttributeKeys()).length?{name:!0}:null),i.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:Y(t,!0)}),i.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:Y(t)})}}}function St(t,e,r){const i=e.matchAll(t)||[],o=t.document.stylesProcessor;return i.reduce((e,{match:i})=>{for(const[n,l]of i.attributes||[])if("style"==n){const i=l,n=o.getRelatedStyles(i).filter(t=>t.split("-").length>i.split("-").length).sort((t,e)=>e.split("-").length-t.split("-").length);for(const i of n)r.consume(t,{styles:[i]})&&e.styles.push(i);r.consume(t,{styles:[i]})&&e.styles.push(i)}else if("class"==n){const i=l;r.consume(t,{classes:[i]})&&e.classes.push(i)}else r.consume(t,{attributes:[n]})&&e.attributes.push(n);return e},{attributes:[],classes:[],styles:[]})}function Ot(t,r){const i={};for(const o of r){const r=t.getAttribute(o);void 0!==r&&(0,e.isValidAttributeName)(o)&&(i[o]=r)}return i}function kt(t,e){const r=new o.StylesMap(t.document.stylesProcessor);for(const i of e){const e=t.getStyle(i);void 0!==e&&r.set(i,e)}return Object.fromEntries(r.getStylesEntries())}function Ct(t,e){const{name:r}=t,i=t[e];return nt(i)?Object.entries(i).map(([t,i])=>({name:r,[e]:{[t]:i}})):Array.isArray(i)?i.map(t=>({name:r,[e]:[t]})):[t]}function jt(t){const{name:e,attributes:r,classes:i,styles:o}=t,n=[];return r&&n.push(...Ct({name:e,attributes:r},"attributes")),i&&n.push(...Ct({name:e,classes:i},"classes")),o&&n.push(...Ct({name:e,styles:o},"styles")),n}class Pt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"CodeBlockElementSupport"}static get isOfficialPlugin(){return!0}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const t=this.editor.plugins.get(Et);t.on("register:pre",(e,r)=>{if("codeBlock"!==r.model)return;const i=this.editor,o=i.model.schema,n=i.conversion;o.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),n.for("upcast").add(function(t){return e=>{e.on("element:code",(e,r,i)=>{const o=r.viewItem,n=o.parent;function l(e,o){const n=t.processViewAttributes(e,i);n&&i.writer.setAttribute(o,n,r.modelRange)}n&&n.is("element","pre")&&(l(n,"htmlPreAttributes"),l(o,"htmlContentAttributes"))},{priority:"low"})}}(t)),n.for("downcast").add(t=>{t.on("attribute:htmlPreAttributes:codeBlock",(t,e,r)=>{if(!r.consumable.consume(e.item,t.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,n=r.mapper.toViewElement(e.item).parent;V(r.writer,i,o,n)}),t.on("attribute:htmlContentAttributes:codeBlock",(t,e,r)=>{if(!r.consumable.consume(e.item,t.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,n=r.mapper.toViewElement(e.item);V(r.writer,i,o,n)})}),e.stop()})}}class Ft extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"DualContentModelElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(Et).on("register",(t,r)=>{const i=r,o=this.editor,n=o.model.schema,l=o.conversion;if(!i.paragraphLikeModel)return;if(n.isRegistered(i.model)||n.isRegistered(i.paragraphLikeModel))return;const s={model:i.paragraphLikeModel,view:i.view};n.register(i.model,i.modelSchema),n.register(s.model,{inheritAllFrom:"$block"}),l.for("upcast").elementToElement({view:i.view,model:(t,{writer:e})=>this._hasBlockContent(t)?e.createElement(i.model):e.createElement(s.model),converterPriority:e.priorities.low+.5}),l.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),l.for("downcast").elementToElement({view:s.view,model:s.model}),this._addAttributeConversion(s),t.stop()})}_hasBlockContent(t){const e=this.editor.editing.view,r=e.domConverter.blockElements;for(const i of e.createRangeIn(t).getItems())if(i.is("element")&&r.includes(i.name))return!0;return!1}_addAttributeConversion(t){const e=this.editor,r=e.conversion,i=e.plugins.get(Et);e.model.schema.extend(t.model,{allowAttributes:q(t.view)}),r.for("upcast").add(Z(t,i)),r.for("downcast").add(tt(t))}}var It=r(507);class _t extends t.Plugin{static get requires(){return[mt,It.Enter]}static get pluginName(){return"HeadingElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!t.plugins.has("HeadingEditing"))return;const e=t.config.get("heading.options");this.registerHeadingElements(t,e)}registerHeadingElements(t,e){const r=t.plugins.get(mt),i=[];for(const t of e)"model"in t&&"view"in t&&(r.registerBlockElement({view:t.view,model:t.model}),i.push(t.model));r.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:i}}),r.extendBlockElement({model:"htmlSummary",modelSchema:{allowChildren:i}})}}function $t(t,e,r){const i=t.createRangeOn(e);for(const{item:t}of i.getWalker())if(t.is("element",r))return t}class xt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"ImageElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!t.plugins.has("ImageInlineEditing")&&!t.plugins.has("ImageBlockEditing"))return;const e=t.model.schema,r=t.conversion,i=t.plugins.get(Et);i.on("register:figure",()=>{r.for("upcast").add(function(t){return e=>{e.on("element:figure",(e,r,i)=>{const o=r.viewItem;if(!r.modelRange||!o.hasClass("image"))return;const n=t.processViewAttributes(o,i);n&&i.writer.setAttribute("htmlFigureAttributes",n,r.modelRange)},{priority:"low"})}}(i))}),i.on("register:img",(o,n)=>{"imageBlock"!==n.model&&"imageInline"!==n.model||(e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),r.for("upcast").add(function(t){return e=>{e.on("element:img",(e,r,i)=>{if(!r.modelRange)return;const o=r.viewItem,n=t.processViewAttributes(o,i);n&&i.writer.setAttribute("htmlImgAttributes",n,r.modelRange)},{priority:"low"})}}(i)),r.for("downcast").add(t=>{function e(e){t.on(`attribute:${e}:imageInline`,(t,e,r)=>{if(!r.consumable.consume(e.item,t.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,n=r.mapper.toViewElement(e.item);V(r.writer,i,o,n)},{priority:"low"})}function r(e,r){t.on(`attribute:${r}:imageBlock`,(t,r,i)=>{if(!i.consumable.test(r.item,t.name))return;const{attributeOldValue:o,attributeNewValue:n}=r,l=i.mapper.toViewElement(r.item),s=$t(i.writer,l,e);s&&(V(i.writer,o,n,s),i.consumable.consume(r.item,t.name))},{priority:"low"}),"a"===e&&t.on("attribute:linkHref:imageBlock",(t,e,r)=>{if(!r.consumable.consume(e.item,"attribute:htmlLinkAttributes:imageBlock"))return;const i=r.mapper.toViewElement(e.item),o=$t(r.writer,i,"a");N(r.writer,e.item.getAttribute("htmlLinkAttributes"),o)},{priority:"low"})}e("htmlImgAttributes"),r("img","htmlImgAttributes"),r("figure","htmlFigureAttributes"),r("a","htmlLinkAttributes")}),t.plugins.has("LinkImage")&&r.for("upcast").add(function(t,e){const r=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,i,o)=>{const n=i.viewItem;if(!r.findViewImgElement(n))return;const l=i.modelCursor.parent;if(!l.is("element","imageBlock"))return;const s=t.processViewAttributes(n,o);s&&o.writer.setAttribute("htmlLinkAttributes",s,l)},{priority:"low"})}}(i,t)),o.stop())})}}class Tt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"MediaEmbedElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!t.plugins.has("MediaEmbed")||t.config.get("mediaEmbed.previewsInData"))return;const e=t.model.schema,r=t.conversion,i=this.editor.plugins.get(Et),o=this.editor.plugins.get(mt),n=t.config.get("mediaEmbed.elementName");o.registerBlockElement({model:"media",view:n}),i.on("register:figure",()=>{r.for("upcast").add(function(t){return e=>{e.on("element:figure",(e,r,i)=>{const o=r.viewItem;if(!r.modelRange||!o.hasClass("media"))return;const n=t.processViewAttributes(o,i);n&&i.writer.setAttribute("htmlFigureAttributes",n,r.modelRange)},{priority:"low"})}}(i))}),i.on(`register:${n}`,(t,o)=>{"media"===o.model&&(e.extend("media",{allowAttributes:[q(n),"htmlFigureAttributes"]}),r.for("upcast").add(function(t,e){const r=(r,i,o)=>{function n(e,r){const n=t.processViewAttributes(e,o);n&&o.writer.setAttribute(r,n,i.modelRange)}n(i.viewItem,q(e))};return t=>{t.on(`element:${e}`,r,{priority:"low"})}}(i,n)),r.for("dataDowncast").add(function(t){return e=>{function r(t,r){e.on(`attribute:${r}:media`,(e,r,i)=>{if(!i.consumable.consume(r.item,e.name))return;const{attributeOldValue:o,attributeNewValue:n}=r,l=i.mapper.toViewElement(r.item),s=$t(i.writer,l,t);V(i.writer,o,n,s)})}r(t,q(t)),r("figure","htmlFigureAttributes")}}(n)),t.stop())})}}class Bt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"ScriptElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.plugins.get(Et);t.on("register:script",(e,r)=>{const i=this.editor,o=i.model.schema,n=i.conversion;o.register("htmlScript",r.modelSchema),o.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"script"}),n.for("upcast").elementToElement({view:"script",model:G(r)}),n.for("upcast").add(Z(r,t)),n.for("downcast").elementToElement({model:"htmlScript",view:(t,{writer:e})=>X("script",t,e)}),n.for("downcast").add(tt(r)),e.stop()})}}const Dt=["width","max-width","min-width","height","min-height","max-height"];class Ht extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"TableElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!t.plugins.has("TableEditing"))return;const e=t.model.schema,r=t.conversion,i=t.plugins.get(Et),o=t.plugins.get("TableUtils");i.on("register:figure",()=>{r.for("upcast").add(function(t){return e=>{e.on("element:figure",(e,r,i)=>{const o=r.viewItem;if(!r.modelRange||!o.hasClass("table"))return;const n=t.processViewAttributes(o,i);n&&i.writer.setAttribute("htmlFigureAttributes",n,r.modelRange)},{priority:"low"})}}(i))}),i.on("register:table",(n,l)=>{"table"===l.model&&(e.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),r.for("upcast").add(function(t){return e=>{e.on("element:table",(e,r,i)=>{if(!r.modelRange)return;const o=r.viewItem;i.consumable.consume(o,{classes:"table"}),n(o,"htmlTableAttributes");for(const t of o.getChildren())t.is("element","thead")&&n(t,"htmlTheadAttributes"),t.is("element","tbody")&&n(t,"htmlTbodyAttributes");function n(e,o){const n=t.processViewAttributes(e,i);n&&i.writer.setAttribute(o,n,r.modelRange)}},{priority:"low"})}}(i)),r.for("downcast").add(t=>{function e(e,r){t.on(`attribute:${r}:table`,(t,i,o)=>{if(!o.consumable.test(i.item,t.name))return;const n=o.mapper.toViewElement(i.item),l=$t(o.writer,n,e);if(l)if(o.consumable.consume(i.item,t.name),"htmlTableAttributes"===r&&n!==l){const t=Rt(i.attributeOldValue),e=Rt(i.attributeNewValue);V(o.writer,t.tableAttributes,e.tableAttributes,l),V(o.writer,t.figureAttributes,e.figureAttributes,n)}else V(o.writer,i.attributeOldValue,i.attributeNewValue,l)})}e("table","htmlTableAttributes"),e("figure","htmlFigureAttributes"),e("thead","htmlTheadAttributes"),e("tbody","htmlTbodyAttributes")}),t.model.document.registerPostFixer(function(t,e){return r=>{const i=t.document.differ.getChanges();let o=!1;for(const t of i){if("attribute"!=t.type||"headingRows"!=t.attributeKey)continue;const i=t.range.start.nodeAfter,n=i.getAttribute("htmlTheadAttributes"),l=i.getAttribute("htmlTbodyAttributes");n&&!t.attributeNewValue?(r.removeAttribute("htmlTheadAttributes",i),o=!0):l&&t.attributeNewValue==e.getRows(i)&&(r.removeAttribute("htmlTbodyAttributes",i),o=!0)}return o}}(t.model,o)),n.stop())})}}function Rt(t){const e={},r={...t};if(!t||!("styles"in t))return{figureAttributes:e,tableAttributes:r};r.styles={};for(const[i,o]of Object.entries(t.styles))Dt.includes(i)?e.styles={...e.styles,[i]:o}:r.styles={...r.styles,[i]:o};return{figureAttributes:e,tableAttributes:r}}class Vt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"StyleElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.plugins.get(Et);t.on("register:style",(e,r)=>{const i=this.editor,o=i.model.schema,n=i.conversion;o.register("htmlStyle",r.modelSchema),o.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"style"}),n.for("upcast").elementToElement({view:"style",model:G(r)}),n.for("upcast").add(Z(r,t)),n.for("downcast").elementToElement({model:"htmlStyle",view:(t,{writer:e})=>X("style",t,e)}),n.for("downcast").add(tt(r)),e.stop()})}}function Nt(t){if(!t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e))&&"[object Object]"===Object.prototype.toString.call(t)}function Mt(t,e,r,i,o,n,l){const s=l(t,e,r,i,o,n);if(void 0!==s)return s;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return Lt(t,e,n,l)}return Lt(t,e,n,l)}function Lt(t,e,r,i){if(Object.is(t,e))return!0;let o=s(t),n=s(e);if(o===d&&(o=A),n===d&&(n=A),o!==n)return!1;switch(o){case m:return t.toString()===e.toString();case c:{const r=t.valueOf(),i=e.valueOf();return(I=r)===(_=i)||Number.isNaN(I)&&Number.isNaN(_)}case u:case f:case h:return Object.is(t.valueOf(),e.valueOf());case a:return t.source===e.source&&t.flags===e.flags;case"[object Function]":return t===e}var I,_;const $=(r=r??new Map).get(t),x=r.get(e);if(null!=$&&null!=x)return $===e;r.set(t,e),r.set(e,t);try{switch(o){case g:if(t.size!==e.size)return!1;for(const[o,n]of t.entries())if(!e.has(o)||!Mt(n,e.get(o),o,t,e,r,i))return!1;return!0;case b:{if(t.size!==e.size)return!1;const o=Array.from(t.values()),n=Array.from(e.values());for(let l=0;l<o.length;l++){const s=o[l],a=n.findIndex(o=>Mt(s,o,void 0,t,e,r,i));if(-1===a)return!1;n.splice(a,1)}return!0}case p:case v:case E:case S:case O:case"[object BigUint64Array]":case k:case C:case j:case"[object BigInt64Array]":case P:case F:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Mt(t[o],e[o],o,t,e,r,i))return!1;return!0;case w:return t.byteLength===e.byteLength&&Lt(new Uint8Array(t),new Uint8Array(e),r,i);case y:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&Lt(new Uint8Array(t),new Uint8Array(e),r,i);case"[object Error]":return t.name===e.name&&t.message===e.message;case A:{if(!(Lt(t.constructor,e.constructor,r,i)||Nt(t)&&Nt(e)))return!1;const o=[...Object.keys(t),...l(t)],n=[...Object.keys(e),...l(e)];if(o.length!==n.length)return!1;for(let n=0;n<o.length;n++){const l=o[n],s=t[l];if(!Object.hasOwn(e,l))return!1;if(!Mt(s,e[l],l,t,e,r,i))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}function Ut(){}function zt(t,e){return function(t,e,r){return Mt(t,e,void 0,void 0,void 0,void 0,r)}(t,e,Ut)}class Wt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"ListElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!t.plugins.has("ListEditing"))return;const e=t.model.schema,r=t.conversion,i=t.plugins.get(Et),o=t.plugins.get("ListEditing"),n=t.plugins.get("ListUtils"),l=["ul","ol","li"];o.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:N}),o.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:N}),o.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:N}),i.on("register",(t,o)=>{if(!l.includes(o.view))return;if(t.stop(),e.checkAttribute("$block","htmlLiAttributes"))return;const n=l.map(t=>q(t));e.extend("$listItem",{allowAttributes:n}),r.for("upcast").add(t=>{t.on("element:ul",qt("htmlUlAttributes",i),{priority:"low"}),t.on("element:ol",qt("htmlOlAttributes",i),{priority:"low"}),t.on("element:li",qt("htmlLiAttributes",i),{priority:"low"})})}),o.on("postFixer",(t,{listNodes:e,writer:r})=>{for(const{node:i,previousNodeInList:o}of e)if(o){if(o.getAttribute("listType")==i.getAttribute("listType")){const e=Gt(o.getAttribute("listType")),n=o.getAttribute(e);!zt(i.getAttribute(e),n)&&r.model.schema.checkAttribute(i,e)&&(r.setAttribute(e,n,i),t.return=!0)}if(o.getAttribute("listItemId")==i.getAttribute("listItemId")){const e=o.getAttribute("htmlLiAttributes");!zt(i.getAttribute("htmlLiAttributes"),e)&&r.model.schema.checkAttribute(i,"htmlLiAttributes")&&(r.setAttribute("htmlLiAttributes",e,i),t.return=!0)}}}),o.on("postFixer",(t,{listNodes:e,writer:r})=>{for(const{node:i}of e){const e=i.getAttribute("listType");!n.isNumberedListType(e)&&i.getAttribute("htmlOlAttributes")&&(r.removeAttribute("htmlOlAttributes",i),t.return=!0),n.isNumberedListType(e)&&i.getAttribute("htmlUlAttributes")&&(r.removeAttribute("htmlUlAttributes",i),t.return=!0)}})}afterInit(){const t=this.editor;if(!t.commands.get("indentList"))return;const e=t.commands.get("indentList");this.listenTo(e,"afterExecute",(e,r)=>{t.model.change(e=>{for(const i of r){const r=Gt(i.getAttribute("listType"));t.model.schema.checkAttribute(i,r)&&e.setAttribute(r,{},i)}})})}}function qt(t,e){return(r,i,o)=>{const n=i.viewItem;i.modelRange||Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor));const l=e.processViewAttributes(n,o);for(const e of i.modelRange.getItems({shallow:!0}))e.hasAttribute("listItemId")&&(e.hasAttribute("htmlUlAttributes")||e.hasAttribute("htmlOlAttributes")||o.writer.model.schema.checkAttribute(e,t)&&o.writer.setAttribute(t,l||{},e))}}function Gt(t){return"numbered"===t||"customNumbered"==t?"htmlOlAttributes":"htmlUlAttributes"}class Kt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"HorizontalLineElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!t.plugins.has("HorizontalLineEditing"))return;const e=t.model.schema,r=t.conversion,i=t.plugins.get(Et);i.on("register:hr",(t,o)=>{"horizontalLine"===o.model&&(e.extend("horizontalLine",{allowAttributes:["htmlHrAttributes"]}),r.for("upcast").add(Z(o,i)),r.for("downcast").add(t=>{t.on("attribute:htmlHrAttributes:horizontalLine",(t,e,r)=>{if(!r.consumable.test(e.item,t.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,n=r.mapper.toViewElement(e.item),l=$t(r.writer,n,"hr");l&&(V(r.writer,i,o,l),r.consumable.consume(e.item,t.name))},{priority:"low"})}),t.stop())})}}class Xt extends t.Plugin{static get requires(){return[Et]}static get pluginName(){return"IframeElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.config.define("htmlSupport.htmlIframeSandbox",!0),this._setupSandboxConversion()}_setupSandboxConversion(){const{plugins:t,config:e,conversion:r}=this.editor,i=t.get(Et),o=e.get("htmlSupport.htmlIframeSandbox");if(!1===o)return;const n=Array.isArray(o)?Array.from(o):[];i.on("register:iframe",(t,e)=>{r.for("editingDowncast").add(t=>{t.on(`insert:${e.model}`,(t,e,r)=>{const{mapper:i,writer:o}=r,l=i.toViewElement(e.item);for(const{item:t}of o.createRangeOn(l))if(t.is("element","iframe"))if(t.hasAttribute("sandbox")){const e=new Set,r=t.getAttribute("sandbox");for(const t of r.trim().split(/\s+/))n.includes(t)&&e.add(t);o.setAttribute("sandbox",Array.from(e).join(" "),t)}else o.setAttribute("sandbox",n.join(" "),t)},{priority:"lowest"})})})}}class Qt extends t.Plugin{static get requires(){return[Et,mt]}static get pluginName(){return"CustomElementSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.plugins.get(Et),e=this.editor.plugins.get(mt);t.on("register:$customElement",(r,i)=>{r.stop();const n=this.editor,l=n.model.schema,s=n.conversion,a=n.editing.view.domConverter.unsafeElements,m=n.data.htmlProcessor.domConverter.preElements;l.register(i.model,i.modelSchema),l.extend(i.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),n.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),s.for("upcast").elementToElement({view:/.*/,model:(r,l)=>{if("$comment"==r.name)return null;if(!function(t){try{document.createElement(t)}catch{return!1}return!0}(r.name))return null;if(e.getDefinitionsForView(r.name).size)return null;a.includes(r.name)||a.push(r.name),m.includes(r.name)||m.push(r.name);const s=l.writer.createElement(i.model,{htmlElementName:r.name}),c=t.processViewAttributes(r,l);let u;if(c&&l.writer.setAttribute("htmlCustomElementAttributes",c,s),r.is("element","template")&&r.getCustomProperty("$rawContent"))u=r.getCustomProperty("$rawContent");else{const t=new o.ViewUpcastWriter(r.document).createDocumentFragment(r),e=n.data.htmlProcessor.domConverter.viewToDom(t),i=e.firstChild;for(;i.firstChild;)e.appendChild(i.firstChild);i.remove(),u=n.data.htmlProcessor.htmlWriter.getHtml(e)}l.writer.setAttribute("htmlContent",u,s);for(const{item:t}of n.editing.view.createRangeIn(r))l.consumable.consume(t,{name:!0});return s},converterPriority:"low"}),s.for("editingDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(t,{writer:e})=>{const r=t.getAttribute("htmlElementName"),i=e.createRawElement(r);return t.hasAttribute("htmlCustomElementAttributes")&&N(e,t.getAttribute("htmlCustomElementAttributes"),i),i}}),s.for("dataDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(t,{writer:e})=>{const r=t.getAttribute("htmlElementName"),i=t.getAttribute("htmlContent"),o=e.createRawElement(r,null,(t,e)=>{e.setContentOf(t,i)});return t.hasAttribute("htmlCustomElementAttributes")&&N(e,t.getAttribute("htmlCustomElementAttributes"),o),o}})})}}class Yt extends t.Plugin{static get pluginName(){return"GeneralHtmlSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[Et,Pt,Ft,_t,xt,Tt,Bt,Ht,Vt,Wt,Kt,Xt,Qt]}init(){const t=this.editor,e=t.plugins.get(Et);e.loadAllowedEmptyElementsConfig(t.config.get("htmlSupport.allowEmpty")||[]),e.loadAllowedConfig(t.config.get("htmlSupport.allow")||[]),e.loadDisallowedConfig(t.config.get("htmlSupport.disallow")||[])}afterInit(){const t=this.editor.commands.get("removeFormat");t?.registerCustomAttribute(t=>t.startsWith("html")&&t.endsWith("Attributes"),z)}getGhsAttributeNameForElement(t){const e=this.editor.plugins.get("DataSchema"),r=Array.from(e.getDefinitionsForView(t,!1)),i=r.find(t=>t.isInline&&!r[0].isObject);return i?i.model:q(t)}addModelHtmlClass(t,r,i){const o=this.editor.model,n=this.getGhsAttributeNameForElement(t);o.change(t=>{for(const l of Jt(o,i,n))U(t,l,n,"classes",t=>{for(const i of(0,e.toArray)(r))t.add(i)})})}removeModelHtmlClass(t,r,i){const o=this.editor.model,n=this.getGhsAttributeNameForElement(t);o.change(t=>{for(const l of Jt(o,i,n))U(t,l,n,"classes",t=>{for(const i of(0,e.toArray)(r))t.delete(i)})})}setModelHtmlAttributes(t,e,r){const i=this.editor.model,o=this.getGhsAttributeNameForElement(t);i.change(t=>{for(const n of Jt(i,r,o))U(t,n,o,"attributes",t=>{for(const[r,i]of Object.entries(e))t.set(r,i)})})}removeModelHtmlAttributes(t,r,i){const o=this.editor.model,n=this.getGhsAttributeNameForElement(t);o.change(t=>{for(const l of Jt(o,i,n))U(t,l,n,"attributes",t=>{for(const i of(0,e.toArray)(r))t.delete(i)})})}setModelHtmlStyles(t,e,r){const i=this.editor.model,o=this.getGhsAttributeNameForElement(t);i.change(t=>{for(const n of Jt(i,r,o))U(t,n,o,"styles",t=>{for(const[r,i]of Object.entries(e))t.set(r,i)})})}removeModelHtmlStyles(t,r,i){const o=this.editor.model,n=this.getGhsAttributeNameForElement(t);o.change(t=>{for(const l of Jt(o,i,n))U(t,l,n,"styles",t=>{for(const i of(0,e.toArray)(r))t.delete(i)})})}}function*Jt(t,e,r){if(e)if(!(Symbol.iterator in e)&&e.is("documentSelection")&&e.isCollapsed)t.schema.checkAttributeInSelection(e,r)&&(yield e);else for(const i of function(t,e,r){return!(Symbol.iterator in e)&&(e.is("node")||e.is("$text")||e.is("$textProxy"))?t.schema.checkAttribute(e,r)?[t.createRangeOn(e)]:[]:t.schema.getValidRanges(t.createSelection(e).getRanges(),r)}(t,e,r))yield*i.getItems({shallow:!0})}class Zt extends t.Plugin{static get pluginName(){return"HtmlComment"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,r=new Map;t.data.processor.skipComments=!1,t.model.schema.addAttributeCheck((t,e)=>{if(t.endsWith("$root")&&e.startsWith("$comment"))return!0}),t.conversion.for("upcast").elementToMarker({view:"$comment",model:t=>{const i=`$comment:${(0,e.uid)()}`,o=t.getCustomProperty("$rawContent");return r.set(i,o),i}}),t.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(t,{writer:e})=>{let r;for(const e of this.editor.model.document.getRootNames())if(r=this.editor.model.document.getRoot(e),r.hasAttribute(t.markerName))break;const i=t.markerName,o=r.getAttribute(i),n=e.createUIElement("$comment");return e.setCustomProperty("$rawContent",o,n),n}}),t.model.document.registerPostFixer(e=>{let i=!1;const o=t.model.document.differ.getChangedMarkers().filter(t=>t.name.startsWith("$comment:"));for(const t of o){const{oldRange:o,newRange:n}=t.data;if(!o||!n||o.root!=n.root){if(o){const r=o.root;r.hasAttribute(t.name)&&(e.removeAttribute(t.name,r),i=!0)}if(n){const o=n.root;"$graveyard"==o.rootName?(e.removeMarker(t.name),i=!0):o.hasAttribute(t.name)||(e.setAttribute(t.name,r.get(t.name)||"",o),i=!0)}}}return i}),t.data.on("set",()=>{for(const e of t.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(e.name)},{priority:"high"}),t.model.on("deleteContent",(e,[r])=>{for(const e of r.getRanges()){const r=t.model.schema.getLimitElement(e),i=t.model.createPositionAt(r,0),o=t.model.createPositionAt(r,"end");let n;n=i.isTouching(e.start)&&o.isTouching(e.end)?this.getHtmlCommentsInRange(t.model.createRange(i,o)):this.getHtmlCommentsInRange(e,{skipBoundaries:!0});for(const t of n)this.removeHtmlComment(t)}},{priority:"high"})}createHtmlComment(t,r){const i=(0,e.uid)(),o=this.editor.model,n=o.document.getRoot(t.root.rootName),l=`$comment:${i}`;return o.change(e=>{const i=e.createRange(t);return e.addMarker(l,{usingOperation:!0,affectsData:!0,range:i}),e.setAttribute(l,r,n),l})}removeHtmlComment(t){const e=this.editor,r=e.model.markers.get(t);return!!r&&(e.model.change(t=>{t.removeMarker(r)}),!0)}getHtmlCommentData(t){const e=this.editor.model.markers.get(t);if(!e)return null;let r="";for(const e of this.editor.model.document.getRoots())if(e.hasAttribute(t)){r=e.getAttribute(t);break}return{content:r,position:e.getStart()}}getHtmlCommentsInRange(t,{skipBoundaries:e=!1}={}){const r=!e;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(e=>function(t,e){const i=t.getRange().start;return(i.isAfter(e.start)||r&&i.isEqual(e.start))&&(i.isBefore(e.end)||r&&i.isEqual(e.end))}(e,t)).map(t=>t.name)}}class te extends o.HtmlDataProcessor{toView(t){if(!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(t.trim().slice(0,1e4)))return super.toView(t);let e="",r="";t=(t=t.trim().replace(/<\?xml\s[^?]*\?>/i,t=>(r=t,""))).trim().replace(/^<!DOCTYPE\s[^>]*?>/i,t=>(e=t,""));const i=this._toDom(t),n=this.domConverter.domToView(i,{skipComments:this.skipComments}),l=new o.ViewUpcastWriter(n.document);l.setCustomProperty("$fullPageDocument",i.ownerDocument.documentElement.outerHTML,n);const s=Array.from(i.ownerDocument.querySelectorAll("head style"));return l.setCustomProperty("$fullPageHeadStyles",s,n),e&&l.setCustomProperty("$fullPageDocType",e,n),r&&l.setCustomProperty("$fullPageXmlDeclaration",r,n),n}toData(t){let e=super.toData(t);const r=t.getCustomProperty("$fullPageDocument"),i=t.getCustomProperty("$fullPageDocType"),o=t.getCustomProperty("$fullPageXmlDeclaration");return r&&(e=r.replace(/<\/body\s*>/,e+"$&"),i&&(e=i+"\n"+e),o&&(e=o+"\n"+e)),e}}class ee extends t.Plugin{static get pluginName(){return"FullPage"}static get licenseFeatureCode(){return"FPH"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(t){super(t),t.config.define("htmlSupport.fullPage",{allowRenderStylesFromHead:!1,sanitizeCss:t=>((0,e.logWarning)("css-full-page-provide-sanitize-function"),{css:t,hasChanged:!1})}),t.data.processor=new te(t.data.viewDocument)}init(){const t=this.editor,e=["$fullPageDocument","$fullPageDocType","$fullPageXmlDeclaration","$fullPageHeadStyles"];t.model.schema.extend("$root",{allowAttributes:e}),t.data.on("toModel",(r,[i])=>{const o=t.model.document.getRoot();t.model.change(t=>{for(const r of e){const e=i.getCustomProperty(r);e&&t.setAttribute(r,e,o)}}),re(t)&&this._renderStylesFromHead(o)},{priority:"low"}),t.data.on("toView",(t,[r])=>{if(!r.is("rootElement"))return;const i=r,n=t.return;if(!i.hasAttribute("$fullPageDocument"))return;const l=new o.ViewUpcastWriter(n.document);for(const t of e){const e=i.getAttribute(t);e&&l.setCustomProperty(t,e,n)}},{priority:"low"}),t.data.on("set",()=>{const r=t.model.document.getRoot();t.model.change(t=>{for(const i of e)r.hasAttribute(i)&&t.removeAttribute(i,r)})},{priority:"high"}),t.data.on("get",(t,e)=>{e[0]||(e[0]={}),e[0].trim=!1},{priority:"high"})}destroy(){super.destroy(),re(this.editor)&&this._removeStyleElementsFromDom()}_removeStyleElementsFromDom(){const t=Array.from(e.global.document.querySelectorAll(`[data-full-page-style-id="${this.editor.id}"]`));for(const e of t)e.remove()}_renderStyleElementsInDom(t){const r=this.editor,i=t.getAttribute("$fullPageHeadStyles");if(!i)return;const o=r.config.get("htmlSupport.fullPage.sanitizeCss");for(const t of i){t.setAttribute("data-full-page-style-id",r.id);const i=o(t.innerText);i.hasChanged&&(t.innerText=i.css),e.global.document.head.append(t)}}_renderStylesFromHead(t){this._removeStyleElementsFromDom(),this._renderStyleElementsInDom(t)}}function re(t){return t.config.get("htmlSupport.fullPage.allowRenderStylesFromHead")}const ie="htmlEmptyBlock";class oe extends t.Plugin{static get pluginName(){return"EmptyBlock"}static get isOfficialPlugin(){return!0}afterInit(){const{model:t,conversion:e,plugins:r,config:i}=this.editor,o=t.schema,n=i.get("htmlSupport.preserveEmptyBlocksInEditingView");o.extend("$block",{allowAttributes:[ie]}),o.extend("$container",{allowAttributes:[ie]}),o.isRegistered("tableCell")&&o.extend("tableCell",{allowAttributes:[ie]}),n?e.for("downcast").add(ne()):e.for("dataDowncast").add(ne()),e.for("upcast").add(function(t){return e=>{e.on("element",(e,r,i)=>{const{viewItem:o,modelRange:n}=r;if(!o.is("element")||!o.isEmpty||o.getCustomProperty("$hasBlockFiller"))return;const l=n&&n.start.nodeAfter;if(!l||!t.checkAttribute(l,ie))return;if(i.writer.setAttribute(ie,!0,l),1!=l.childCount)return;const s=l.getChild(0);s.is("element","paragraph")&&t.checkAttribute(s,ie)&&i.writer.setAttribute(ie,!0,s)},{priority:"lowest"})}}(o)),r.has("ClipboardPipeline")&&this._registerClipboardPastingHandler()}_registerClipboardPastingHandler(){const t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(t,"contentInsertion",(t,e)=>{e.sourceEditorId!==this.editor.id&&this.editor.model.change(t=>{for(const{item:r}of t.createRangeIn(e.content))r.is("element")&&r.hasAttribute(ie)&&t.removeAttribute(ie,r)})})}}function ne(){return t=>{t.on(`attribute:${ie}`,(t,e,r)=>{const{mapper:i,consumable:o}=r,{item:n}=e;if(!o.consume(n,t.name))return;const l=i.toViewElement(n);l&&e.attributeNewValue&&(l.getFillerOffset=()=>null)})}}})(),(window.CKEditor5=window.CKEditor5||{}).htmlSupport=i})();;
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},783:(e,t,i)=>{e.exports=i(237)("./src/engine.js")}},t={};function i(o){var r=t[o];if(void 0!==r)return r.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o={};(()=>{"use strict";i.r(o),i.d(o,{DecoupledEditor:()=>c,DecoupledEditorUI:()=>s,DecoupledEditorUIView:()=>l});var e=i(782),t=i(584),r=i(311),n=i(783);class s extends r.EditorUI{view;constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,i=e.editing.view,o=t.editable,r=i.document.getRoot();o.name=r.rootName,t.render();const n=o.element;this.setEditableElement(o.name,n),t.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(n),this._initPlaceholder(),this._initToolbar(),this.initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.config.get("placeholder");if(o){const e="string"==typeof o?o:o[i.rootName];e&&(i.placeholder=e)}(0,n.enableViewPlaceholder)({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}class l extends r.EditorUIView{toolbar;editable;menuBarView;constructor(e,t,i={}){super(e),this.toolbar=new r.ToolbarView(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.menuBarView=new r.MenuBarView(e),this.editable=new r.InlineEditableUIView(e,t,i.editableElement,{label:i.label}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.menuBarView,this.toolbar,this.editable])}}function a(e){return function(e){return"object"==typeof e&&null!==e}(e)&&1===e.nodeType&&!function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)}class c extends((0,e.ElementApiMixin)(e.Editor)){static get editorName(){return"DecoupledEditor"}ui;constructor(i,o={}){if(!d(i)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return d(e)?(0,t.getDataFromElement)(e):e}(i)),d(i)&&(this.sourceElement=i,(0,e.secureSourceElement)(this,i)),this.model.document.createRoot();const r=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new l(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:r,label:this.config.get("label")});this.ui=new s(this,n)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&this.updateSourceElement(e)})}static create(e,i={}){return new Promise(o=>{if(d(e)&&"TEXTAREA"===e.tagName)throw new t.CKEditorError("editor-wrong-element",null);const r=new this(e,i);o(r.initPlugins().then(()=>r.ui.init()).then(()=>r.data.init(r.config.get("initialData"))).then(()=>r.fire("ready")).then(()=>r))})}}function d(e){return a(e)}})(),(window.CKEditor5=window.CKEditor5||{}).editorDecoupled=o})();;
/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
(function($,Drupal,debounce){const cache={right:0,left:0,bottom:0,top:0};const cssVarPrefix='--drupal-displace-offset';const documentStyle=document.documentElement.style;const offsetKeys=Object.keys(cache);const offsetProps={};offsetKeys.forEach((edge)=>{offsetProps[edge]={enumerable:true,get(){return cache[edge];},set(value){if(value!==cache[edge])documentStyle.setProperty(`${cssVarPrefix}-${edge}`,`${value}px`);cache[edge]=value;}};});const offsets=Object.seal(Object.defineProperties({},offsetProps));function getRawOffset(el,edge){const $el=$(el);const documentElement=document.documentElement;let displacement=0;const horizontal=edge==='left'||edge==='right';let placement=$el.offset()[horizontal?'left':'top'];placement-=window[`scroll${horizontal?'X':'Y'}`]||document.documentElement[`scroll${horizontal?'Left':'Top'}`]||0;switch(edge){case 'top':displacement=placement+$el.outerHeight();break;case 'left':displacement=placement+$el.outerWidth();break;case 'bottom':displacement=documentElement.clientHeight-placement;break;case 'right':displacement=documentElement.clientWidth-placement;break;default:displacement=0;}return displacement;}function calculateOffset(edge){let edgeOffset=0;const displacingElements=document.querySelectorAll(`[data-offset-${edge}]`);const n=displacingElements.length;for(let i=0;i<n;i++){const el=displacingElements[i];if(el.style.display==='none')continue;let displacement=parseInt(el.getAttribute(`data-offset-${edge}`),10);if(isNaN(displacement))displacement=getRawOffset(el,edge);edgeOffset=Math.max(edgeOffset,displacement);}return edgeOffset;}function displace(broadcast=true){const newOffsets={};offsetKeys.forEach((edge)=>{newOffsets[edge]=calculateOffset(edge);});offsetKeys.forEach((edge)=>{offsets[edge]=newOffsets[edge];});if(broadcast)$(document).trigger('drupalViewportOffsetChange',offsets);return offsets;}Drupal.behaviors.drupalDisplace={attach(){if(this.displaceProcessed)return;this.displaceProcessed=true;$(window).on('resize.drupalDisplace',debounce(displace,200));}};Drupal.displace=displace;Object.defineProperty(Drupal.displace,'offsets',{value:offsets,writable:false});Drupal.displace.calculateOffset=calculateOffset;})(jQuery,Drupal,Drupal.debounce);;
(($,Drupal,{isTabbable})=>{$.extend($.expr[':'],{tabbable(element){Drupal.deprecationError({message:'The :tabbable selector is deprecated in Drupal 9.2.0 and will be removed in Drupal 11.0.0. Use the core/tabbable library instead. See https://www.drupal.org/node/3183730'});return isTabbable(element);}});})(jQuery,Drupal,window.tabbable);;
(($)=>{let cachedScrollbarWidth=null;const {max,abs}=Math;const regexHorizontal=/left|center|right/;const regexVertical=/top|center|bottom/;const regexOffset=/[+-]\d+(\.[\d]+)?%?/;const regexPosition=/^\w+/;const _position=$.fn.position;function getOffsets(offsets,width,height){return [parseFloat(offsets[0])*(typeof offsets[0]==='string'&&offsets[0].endsWith('%')?width/100:1),parseFloat(offsets[1])*(typeof offsets[1]==='string'&&offsets[1].endsWith('%')?height/100:1)];}function parseCss(element,property){return parseInt(window.getComputedStyle(element)[property],10)||0;}function getDimensions(elem){const raw=elem[0];if(raw.nodeType===9)return {width:elem.width(),height:elem.height(),offset:{top:0,left:0}};if(!!raw&&raw===raw.window)return {width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}};if(raw.preventDefault)return {width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}};return {width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()};}const collisions={fit:{left(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollLeft:within.offset.left;const outerWidth=within.width;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=withinOffset-collisionPosLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;let newOverRight;if(data.collisionWidth>outerWidth)if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0)position.left=withinOffset;else if(overLeft>overRight)position.left=withinOffset+outerWidth-data.collisionWidth;else position.left=withinOffset;else if(overLeft>0)position.left+=overLeft;else if(overRight>0)position.left-=overRight;else position.left=max(position.left-collisionPosLeft,position.left);},top(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollTop:within.offset.top;const outerHeight=data.within.height;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=withinOffset-collisionPosTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;let newOverBottom;if(data.collisionHeight>outerHeight)if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0)position.top=withinOffset;else if(overTop>overBottom)position.top=withinOffset+outerHeight-data.collisionHeight;else position.top=withinOffset;else if(overTop>0)position.top+=overTop;else if(overBottom>0)position.top-=overBottom;else position.top=max(position.top-collisionPosTop,position.top);}},flip:{left(position,data){const {within}=data;const withinOffset=within.offset.left+within.scrollLeft;const outerWidth=within.width;const offsetLeft=within.isWindow?within.scrollLeft:within.offset.left;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=collisionPosLeft-offsetLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft;const myOffset=data.my[0]==='left'?-data.elemWidth:data.my[0]==='right'?data.elemWidth:0;const atOffset=data.at[0]==='left'?data.targetWidth:data.at[0]==='right'?-data.targetWidth:0;const offset=-2*data.offset[0];let newOverRight;let newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft))position.left+=myOffset+atOffset+offset;}else{if(overRight>0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight)position.left+=myOffset+atOffset+offset;}}},top(position,data){const {within}=data;const withinOffset=within.offset.top+within.scrollTop;const outerHeight=within.height;const offsetTop=within.isWindow?within.scrollTop:within.offset.top;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=collisionPosTop-offsetTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop;const top=data.my[1]==='top';const myOffset=top?-data.elemHeight:data.my[1]==='bottom'?data.elemHeight:0;const atOffset=data.at[1]==='top'?data.targetHeight:data.at[1]==='bottom'?-data.targetHeight:0;const offset=-2*data.offset[1];let newOverTop;let newOverBottom;if(overTop<0){newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset;if(newOverBottom<0||newOverBottom<abs(overTop))position.top+=myOffset+atOffset+offset;}else{if(overBottom>0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(newOverTop>0||abs(newOverTop)<overBottom)position.top+=myOffset+atOffset+offset;}}}},flipfit:{left(...args){collisions.flip.left.apply(this,args);collisions.fit.left.apply(this,args);},top(...args){collisions.flip.top.apply(this,args);collisions.fit.top.apply(this,args);}}};$.position={scrollbarWidth(){if(cachedScrollbarWidth!==undefined)return cachedScrollbarWidth;const div=$('<div '+"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>"+"<div style='height:100px;width:auto;'></div></div>");const innerDiv=div.children()[0];$('body').append(div);const w1=innerDiv.offsetWidth;div[0].style.overflow='scroll';let w2=innerDiv.offsetWidth;if(w1===w2)w2=div[0].clientWidth;div.remove();cachedScrollbarWidth=w1-w2;return cachedScrollbarWidth;},getScrollInfo(within){const overflowX=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-x'];const overflowY=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-y'];const hasOverflowX=overflowX==='scroll'||(overflowX==='auto'&&within.width<within.element[0].scrollWidth);const hasOverflowY=overflowY==='scroll'||(overflowY==='auto'&&within.height<within.element[0].scrollHeight);return {width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0};},getWithinInfo(element){const withinElement=$(element||window);const isWindow=!!withinElement[0]&&withinElement[0]===withinElement[0].window;const isDocument=!!withinElement[0]&&withinElement[0].nodeType===9;const hasOffset=!isWindow&&!isDocument;return {element:withinElement,isWindow,isDocument,offset:hasOffset?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()};}};$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);const within=$.position.getWithinInfo(options.within);const scrollInfo=$.position.getScrollInfo(within);const collision=(options.collision||'flip').split(' ');const offsets={};const target=typeof options.of==='string'?$(document).find(options.of):$(options.of);const dimensions=getDimensions(target);const targetWidth=dimensions.width;const targetHeight=dimensions.height;const targetOffset=dimensions.offset;if(target[0].preventDefault)options.at='left top';const basePosition=$.extend({},targetOffset);$.each(['my','at'],function(){let pos=(options[this]||'').split(' ');if(pos.length===1)pos=regexHorizontal.test(pos[0])?pos.concat(['center']):regexVertical.test(pos[0])?['center'].concat(pos):['center','center'];pos[0]=regexHorizontal.test(pos[0])?pos[0]:'center';pos[1]=regexVertical.test(pos[1])?pos[1]:'center';const horizontalOffset=regexOffset.exec(pos[0]);const verticalOffset=regexOffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[regexPosition.exec(pos[0])[0],regexPosition.exec(pos[1])[0]];});if(collision.length===1)collision[1]=collision[0];if(options.at[0]==='right')basePosition.left+=targetWidth;else{if(options.at[0]==='center')basePosition.left+=targetWidth/2;}if(options.at[1]==='bottom')basePosition.top+=targetHeight;else{if(options.at[1]==='center')basePosition.top+=targetHeight/2;}const atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){let using;const elem=$(this);const elemWidth=elem.outerWidth();const elemHeight=elem.outerHeight();const marginLeft=parseCss(this,'marginLeft');const marginTop=parseCss(this,'marginTop');const collisionWidth=elemWidth+marginLeft+parseCss(this,'marginRight')+scrollInfo.width;const collisionHeight=elemHeight+marginTop+parseCss(this,'marginBottom')+scrollInfo.height;const position=$.extend({},basePosition);const myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==='right')position.left-=elemWidth;else{if(options.my[0]==='center')position.left-=elemWidth/2;}if(options.my[1]==='bottom')position.top-=elemHeight;else{if(options.my[1]==='center')position.top-=elemHeight/2;}position.left+=myOffset[0];position.top+=myOffset[1];const collisionPosition={marginLeft,marginTop};$.each(['left','top'],function(i,dir){if(collisions[collision[i]])collisions[collision[i]][dir](position,{targetWidth,targetHeight,elemWidth,elemHeight,collisionPosition,collisionWidth,collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within,elem});});if(options.using)using=function(props){const left=targetOffset.left-position.left;const right=left+targetWidth-elemWidth;const top=targetOffset.top-position.top;const bottom=top+targetHeight-elemHeight;const feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?'left':left>0?'right':'center',vertical:bottom<0?'top':top>0?'bottom':'middle'};if(targetWidth<elemWidth&&abs(left+right)<targetWidth)feedback.horizontal='center';if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight)feedback.vertical='middle';if(max(abs(left),abs(right))>max(abs(top),abs(bottom)))feedback.important='horizontal';else feedback.important='vertical';options.using.call(this,props,feedback);};elem.offset($.extend(position,{using}));});};if(!$.hasOwnProperty('ui'))$.ui={};$.ui.position=collisions;})(jQuery);;
(function($,Drupal,once){if(once('drupal-dialog-deprecation-listener','html').length){const eventSpecial={handle($event){const $element=$($event.target);const event=$event.originalEvent;const dialog=event.dialog;const dialogArguments=[$event,dialog,$element,event?.settings];$event.handleObj.handler.apply(this,dialogArguments);}};$.event.special['dialog:beforecreate']=eventSpecial;$.event.special['dialog:aftercreate']=eventSpecial;$.event.special['dialog:beforeclose']=eventSpecial;$.event.special['dialog:afterclose']=eventSpecial;const listenDialogEvent=(event)=>{const windowEvents=$._data(window,'events');const isWindowHasDialogListener=windowEvents[event.type];if(isWindowHasDialogListener)Drupal.deprecationError({message:`jQuery event ${event.type} is deprecated in 10.3.0 and is removed from Drupal:12.0.0. See https://www.drupal.org/node/3422670`});};['dialog:beforecreate','dialog:aftercreate','dialog:beforeclose','dialog:afterclose'].forEach((e)=>window.addEventListener(e,listenDialogEvent));}})(jQuery,Drupal,once);;
class DrupalDialogEvent extends Event{constructor(type,dialog,settings=null){super(`dialog:${type}`,{bubbles:true});this.dialog=dialog;this.settings=settings;}}(function($,Drupal,drupalSettings,bodyScrollLock){drupalSettings.dialog={autoOpen:true,dialogClass:'',buttonClass:'button',buttonPrimaryClass:'button--primary',close(event){Drupal.dialog(event.target).close();Drupal.detachBehaviors(event.target,null,'unload');}};Drupal.dialog=function(element,options){let undef;const $element=$(element);const domElement=$element.get(0);const dialog={open:false,returnValue:undef};function openDialog(settings){settings=$.extend({},drupalSettings.dialog,options,settings);const event=new DrupalDialogEvent('beforecreate',dialog,settings);domElement.dispatchEvent(event);$element.dialog(event.settings);dialog.open=true;if(event.settings.modal)bodyScrollLock.lock(domElement);domElement.dispatchEvent(new DrupalDialogEvent('aftercreate',dialog,event.settings));}function closeDialog(value){domElement.dispatchEvent(new DrupalDialogEvent('beforeclose',dialog));bodyScrollLock.clearBodyLocks();$element.dialog('close');dialog.returnValue=value;dialog.open=false;domElement.dispatchEvent(new DrupalDialogEvent('afterclose',dialog));}dialog.show=()=>{openDialog({modal:false});};dialog.showModal=()=>{openDialog({modal:true});};dialog.close=closeDialog;return dialog;};})(jQuery,Drupal,drupalSettings,bodyScrollLock);;
(function($,Drupal,drupalSettings,debounce,displace){drupalSettings.dialog=$.extend({autoResize:true,maxHeight:'95%'},drupalSettings.dialog);function resetPosition(options){const offsets=displace.offsets;const left=offsets.left-offsets.right;const top=offsets.top-offsets.bottom;const leftString=`${(left>0?'+':'-')+Math.abs(Math.round(left/2))}px`;const topString=`${(top>0?'+':'-')+Math.abs(Math.round(top/2))}px`;options.position={my:`center${left!==0?leftString:''} center${top!==0?topString:''}`,of:window};return options;}function resetSize(event){const positionOptions=['width','height','minWidth','minHeight','maxHeight','maxWidth','position'];let adjustedOptions={};let windowHeight=$(window).height();let option;let optionValue;let adjustedValue;for(let n=0;n<positionOptions.length;n++){option=positionOptions[n];optionValue=event.data.settings[option];if(optionValue)if(typeof optionValue==='string'&&optionValue.endsWith('%')&&/height/i.test(option)){windowHeight-=displace.offsets.top+displace.offsets.bottom;adjustedValue=parseInt(0.01*parseInt(optionValue,10)*windowHeight,10);if(option==='height'&&Math.round(event.data.$element.parent().outerHeight())<adjustedValue)adjustedValue='auto';adjustedOptions[option]=adjustedValue;}}if(!event.data.settings.modal)adjustedOptions=resetPosition(adjustedOptions);event.data.$element.dialog('option',adjustedOptions);event.data.$element?.get(0)?.dispatchEvent(new CustomEvent('dialogContentResize',{bubbles:true}));}window.addEventListener('dialog:aftercreate',(e)=>{const autoResize=debounce(resetSize,20);const $element=$(e.target);const {settings}=e;const eventData={settings,$element};if(settings.autoResize===true||settings.autoResize==='true'){const uiDialog=$element.dialog('option',{resizable:false,draggable:false}).dialog('widget');uiDialog[0].style.position='fixed';$(window).on('resize.dialogResize scroll.dialogResize',eventData,autoResize).trigger('resize.dialogResize');$(document).on('drupalViewportOffsetChange.dialogResize',eventData,autoResize);}});window.addEventListener('dialog:beforeclose',()=>{$(window).off('.dialogResize');$(document).off('.dialogResize');});})(jQuery,Drupal,drupalSettings,Drupal.debounce,Drupal.displace);;
(function($,{tabbable,isTabbable}){$.widget('ui.dialog',$.ui.dialog,{options:{buttonClass:'button',buttonPrimaryClass:'button--primary'},_createButtons(){const opts=this.options;let primaryIndex;let index;const il=opts.buttons.length;for(index=0;index<il;index++)if(opts.buttons[index].primary&&opts.buttons[index].primary===true){primaryIndex=index;delete opts.buttons[index].primary;break;}this._super();const $buttons=this.uiButtonSet.children().addClass(opts.buttonClass);if(typeof primaryIndex!=='undefined')$buttons.eq(index).addClass(opts.buttonPrimaryClass);},_focusTabbable(){let hasFocus=this._focusedElement?this._focusedElement.get(0):null;if(!hasFocus)hasFocus=this.element.find('[autofocus]').get(0);if(!hasFocus){const $elements=[this.element,this.uiDialogButtonPane];for(let i=0;i<$elements.length;i++){const element=$elements[i].get(0);if(element){const elementTabbable=tabbable(element);hasFocus=elementTabbable.length?elementTabbable[0]:null;}if(hasFocus)break;}}if(!hasFocus){const closeBtn=this.uiDialogTitlebarClose.get(0);hasFocus=closeBtn&&isTabbable(closeBtn)?closeBtn:null;}if(!hasFocus)hasFocus=this.uiDialog.get(0);$(hasFocus).eq(0).trigger('focus');}});})(jQuery,window.tabbable);;
(($)=>{$.widget('ui.dialog',$.ui.dialog,{_allowInteraction(event){if(event.target.classList===undefined)return this._super(event);return event.target.classList.contains('ck')||this._super(event);}});})(jQuery);;
(function($,Drupal,drupalSettings){function findFieldForFormatSelector($formatSelector){const fieldId=$formatSelector.attr('data-editor-for');return $(`#${fieldId}`).get(0);}function filterXssWhenSwitching(field,format,originalFormatID,callback){if(format.editor.isXssSafe)callback(field,format);else $.ajax({url:Drupal.url(`editor/filter_xss/${format.format}`),type:'POST',data:{value:field.value,original_format_id:originalFormatID},dataType:'json',success(xssFilteredValue){if(xssFilteredValue!==false)field.value=xssFilteredValue;callback(field,format);}});}function changeTextEditor(field,newFormatID){const previousFormatID=field.getAttribute('data-editor-active-text-format');if(drupalSettings.editor.formats[previousFormatID])Drupal.editorDetach(field,drupalSettings.editor.formats[previousFormatID]);else $(field).off('.editor');if(drupalSettings.editor.formats[newFormatID]){const format=drupalSettings.editor.formats[newFormatID];filterXssWhenSwitching(field,format,previousFormatID,Drupal.editorAttach);}field.setAttribute('data-editor-active-text-format',newFormatID);}function onTextFormatChange(event){const select=event.target;const field=event.data.field;const activeFormatID=field.getAttribute('data-editor-active-text-format');const newFormatID=select.value;if(newFormatID===activeFormatID)return;const supportContentFiltering=drupalSettings.editor.formats[newFormatID]&&drupalSettings.editor.formats[newFormatID].editorSupportsContentFiltering;const hasContent=field.value!=='';if(hasContent&&supportContentFiltering){const message=Drupal.t('Changing the text format to %text_format will permanently remove content that is not allowed in that text format.<br><br>Save your changes before switching the text format to avoid losing data.',{'%text_format':$(select).find('option:selected')[0].textContent});const confirmationDialog=Drupal.dialog(`<div>${message}</div>`,{title:Drupal.t('Change text format?'),classes:{'ui-dialog':'editor-change-text-format-modal'},resizable:false,buttons:[{text:Drupal.t('Continue'),class:'button button--primary',click(){changeTextEditor(field,newFormatID);confirmationDialog.close();}},{text:Drupal.t('Cancel'),class:'button',click(){select.value=activeFormatID;const eventChange=new Event('change');select.dispatchEvent(eventChange);confirmationDialog.close();}}],closeOnEscape:false,create(){$(this).parent().find('.ui-dialog-titlebar-close').remove();},beforeClose:false,close(event){$(event.target).remove();}});confirmationDialog.showModal();}else changeTextEditor(field,newFormatID);}Drupal.editors={};Drupal.behaviors.editor={attach(context,settings){if(!settings.editor)return;once('editor','[data-editor-for]',context).forEach((editor)=>{const $this=$(editor);const field=findFieldForFormatSelector($this);if(!field)return;const activeFormatID=editor.value;field.setAttribute('data-editor-active-text-format',activeFormatID);if(settings.editor.formats[activeFormatID])Drupal.editorAttach(field,settings.editor.formats[activeFormatID]);$(field).on('change.editor keypress.editor',()=>{field.setAttribute('data-editor-value-is-changed','true');$(field).off('.editor');});if(editor.tagName==='SELECT')$this.on('change.editorAttach',{field},onTextFormatChange);$(field.form).on('submit',(event)=>{if(event.isDefaultPrevented())return;if(settings.editor.formats[activeFormatID])Drupal.editorDetach(field,settings.editor.formats[activeFormatID],'serialize');});});},detach(context,settings,trigger){let editors;if(trigger==='serialize')editors=once.filter('editor','[data-editor-for]',context);else editors=once.remove('editor','[data-editor-for]',context);editors.forEach((editor)=>{const $this=$(editor);const activeFormatID=editor.value;const field=findFieldForFormatSelector($this);if(field&&activeFormatID in settings.editor.formats)Drupal.editorDetach(field,settings.editor.formats[activeFormatID],trigger);});}};Drupal.editorAttach=function(field,format){if(format.editor){Drupal.editors[format.editor].attach(field,format);Drupal.editors[format.editor].onChange(field,()=>{$(field).trigger('formUpdated');field.setAttribute('data-editor-value-is-changed','true');});}};Drupal.editorDetach=function(field,format,trigger){if(format.editor){Drupal.editors[format.editor].detach(field,format,trigger);if(field.getAttribute('data-editor-value-is-changed')==='false')field.value=field.getAttribute('data-editor-value-original');}};})(jQuery,Drupal,drupalSettings);;
((Drupal,debounce,CKEditor5,$,once)=>{Drupal.CKEditor5Instances=new Map();const callbacks=new Map();const required=new Set();function findFunc(scope,name){if(!scope)return null;const parts=name.includes('.')?name.split('.'):name;if(parts.length>1)return findFunc(scope[parts.shift()],parts);return typeof scope[parts[0]]==='function'?scope[parts[0]]:null;}function buildFunc(config){const {func}=config;const fn=findFunc(window,func.name);if(typeof fn==='function'){const result=func.invoke?fn(...func.args):fn;return result;}return null;}function buildRegexp(config){const {pattern}=config.regexp;const main=pattern.match(/\/(.+)\/.*/)[1];const options=pattern.match(/\/.+\/(.*)/)[1];return new RegExp(main,options);}function processConfig(config){function processArray(config){return config.map((item)=>{if(typeof item==='object')return processConfig(item);return item;});}if(config===null)return null;return Object.entries(config).reduce((processed,[key,value])=>{if(typeof value==='object'){if(!value)return processed;if(value.hasOwnProperty('func'))processed[key]=buildFunc(value);else if(value.hasOwnProperty('regexp'))processed[key]=buildRegexp(value);else if(Array.isArray(value))processed[key]=processArray(value);else processed[key]=processConfig(value);}else processed[key]=value;return processed;},{});}const setElementId=(element)=>{const id=Math.random().toString().slice(2,9);element.setAttribute('data-ckeditor5-id',id);return id;};const getElementId=(element)=>element.getAttribute('data-ckeditor5-id');function selectPlugins(plugins){return plugins.map((pluginDefinition)=>{const [build,name]=pluginDefinition.split('.');if(CKEditor5[build]&&CKEditor5[build][name])return CKEditor5[build][name];console.warn(`Failed to load ${build} - ${name}`);return null;});}function processRules(rulesGroup){try{[...rulesGroup.cssRules].forEach(ckeditor5SelectorProcessing);}catch(e){console.warn(`Stylesheet ${rulesGroup.href} not included in CKEditor reset due to the browser's CORS policy.`);}}function ckeditor5SelectorProcessing(rule){if(rule.cssRules)processRules(rule);if(!rule.selectorText)return;const offCanvasId='#drupal-off-canvas';const CKEditorClass='.ck';const styleFence='[data-drupal-ck-style-fence]';if(rule.selectorText.includes(offCanvasId)||rule.selectorText.includes(CKEditorClass))rule.selectorText=rule.selectorText.split(/,/g).map((selector)=>{if(selector.includes(offCanvasId))return `${selector.trim()}:not(${styleFence} *)`;if(selector.includes(CKEditorClass))return [selector.trim(),selector.trim().replace(CKEditorClass,`${offCanvasId} ${styleFence} ${CKEditorClass}`)];return selector;}).flat().join(', ');}function offCanvasCss(element){const fenceName='data-drupal-ck-style-fence';const editor=Drupal.CKEditor5Instances.get(element.getAttribute('data-ckeditor5-id'));editor.ui.view.element.setAttribute(fenceName,'');if(once('ckeditor5-off-canvas-reset','body').length){[...document.styleSheets].forEach(processRules);const prefix=`#drupal-off-canvas-wrapper [${fenceName}]`;const addedCss=[`${prefix} .ck.ck-content * {display:revert;background:revert;color:initial;padding:revert;}`,`${prefix} .ck.ck-content li {display:list-item}`,`${prefix} .ck.ck-content ol li {list-style-type: decimal}`];const prefixedCss=[...addedCss].join('\n');const offCanvasCssStyle=document.createElement('style');offCanvasCssStyle.textContent=prefixedCss;offCanvasCssStyle.setAttribute('id','ckeditor5-off-canvas-reset');document.body.appendChild(offCanvasCssStyle);}}Drupal.editors.ckeditor5={attach(element,format){const {editorClassic}=CKEditor5;const {toolbar,plugins,config,language}=format.editorSettings;const extraPlugins=selectPlugins(plugins);const pluginConfig=processConfig(config);const editorConfig={extraPlugins,toolbar,...pluginConfig,language:{...pluginConfig.language,...language}};const id=setElementId(element);const {ClassicEditor}=editorClassic;ClassicEditor.create(element,editorConfig).then((editor)=>{function calculateLineHeight(rows){const element=document.createElement('p');element.setAttribute('style','visibility: hidden;');element.innerHTML='&nbsp;';editor.ui.view.editable.element.append(element);const styles=window.getComputedStyle(element);const height=element.clientHeight;const marginTop=parseInt(styles.marginTop,10);const marginBottom=parseInt(styles.marginBottom,10);const mostMargin=marginTop>=marginBottom?marginTop:marginBottom;element.remove();return ((height+mostMargin)*(rows-1)+marginTop+height+marginBottom);}Drupal.CKEditor5Instances.set(id,editor);const rows=editor.sourceElement.getAttribute('rows');editor.ui.view.editable.element.closest('.ck-editor').style.setProperty('--ck-min-height',`${calculateLineHeight(rows)}px`);if(element.hasAttribute('required')){required.add(id);element.removeAttribute('required');}if(element.hasAttribute('disabled'))editor.enableReadOnlyMode('ckeditor5_disabled');$(document).on(`drupalViewportOffsetChange.ckeditor5.${id}`,(event,offsets)=>{editor.ui.viewportOffset=offsets;});editor.model.document.on('change:data',()=>{const callback=callbacks.get(id);if(callback)callback();});const isOffCanvas=element.closest('#drupal-off-canvas');if(isOffCanvas)offCanvasCss(element);}).catch((error)=>{console.info('Debugging can be done with an unminified version of CKEditor by installing from the source file. Consult documentation at https://www.drupal.org/node/3258901');console.error(error);});},detach(element,format,trigger){const id=getElementId(element);const editor=Drupal.CKEditor5Instances.get(id);if(!editor)return;$(document).off(`drupalViewportOffsetChange.ckeditor5.${id}`);if(trigger==='serialize')editor.updateSourceElement();else{element.removeAttribute('contentEditable');return editor.destroy().then(()=>{Drupal.CKEditor5Instances.delete(id);callbacks.delete(id);if(required.has(id)){element.setAttribute('required','required');required.delete(id);}}).catch((error)=>{console.error(error);});}},onChange(element,callback){callbacks.set(getElementId(element),debounce(callback,400,true));},attachInlineEditor(element,format,mainToolbarId){const {editorDecoupled}=CKEditor5;const {toolbar,plugins,config:pluginConfig,language}=format.editorSettings;const extraPlugins=selectPlugins(plugins);const config={extraPlugins,toolbar,language,...processConfig(pluginConfig)};const id=setElementId(element);const {DecoupledEditor}=editorDecoupled;DecoupledEditor.create(element,config).then((editor)=>{Drupal.CKEditor5Instances.set(id,editor);const toolbar=document.getElementById(mainToolbarId);toolbar.appendChild(editor.ui.view.toolbar.element);editor.model.document.on('change:data',()=>{const callback=callbacks.get(id);if(callback)callback(editor.getData());});}).catch((error)=>{console.error(error);});}};Drupal.ckeditor5={saveCallback:null,openDialog(url,saveCallback,dialogSettings){const classes=dialogSettings.dialogClass?dialogSettings.dialogClass.split(' '):[];classes.push('ui-dialog--narrow');dialogSettings.dialogClass=classes.join(' ');dialogSettings.autoResize=window.matchMedia('(min-width: 600px)').matches;dialogSettings.width='auto';const ckeditorAjaxDialog=Drupal.ajax({dialog:dialogSettings,dialogType:'modal',selector:'.ckeditor5-dialog-loading-link',url,progress:{type:'fullscreen'},submit:{editor_object:{}}});ckeditorAjaxDialog.execute();Drupal.ckeditor5.saveCallback=saveCallback;}};function redirectTextareaFragmentToCKEditor5Instance(){const hash=window.location.hash.substring(1);const element=document.getElementById(hash);if(element){const editorID=getElementId(element);const editor=Drupal.CKEditor5Instances.get(editorID);if(editor){editor.sourceElement.nextElementSibling.setAttribute('id',`cke_${hash}`);window.location.replace(`#cke_${hash}`);}}}$(window).on('hashchange.ckeditor',redirectTextareaFragmentToCKEditor5Instance);window.addEventListener('dialog:beforecreate',()=>{const dialogLoading=document.querySelector('.ckeditor5-dialog-loading');if(dialogLoading){dialogLoading.addEventListener('transitionend',function removeDialogLoading(){dialogLoading.remove();});dialogLoading.style.transition='top 0.5s ease';dialogLoading.style.top='-40px';}});$(window).on('editor:dialogsave',(e,values)=>{if(Drupal.ckeditor5.saveCallback)Drupal.ckeditor5.saveCallback(values);});window.addEventListener('dialog:afterclose',()=>{if(Drupal.ckeditor5.saveCallback)Drupal.ckeditor5.saveCallback=null;});})(Drupal,Drupal.debounce,CKEditor5,jQuery,once);;
/* @license GPL-2.0-or-later https://raw.githubusercontent.com/ckeditor/ckeditor5/v47.6.0/LICENSE.md */
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{Bold:"Bold","Bold text":"Bold text",Code:"Code",Italic:"Italic","Italic text":"Italic text","Move out of an inline code style":"Move out of an inline code style",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Subscript:"Subscript",Superscript:"Superscript",Underline:"Underline","Underline text":"Underline text"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={163:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},237:t=>{"use strict";t.exports=CKEditor5.dll},305:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i}).join("")},e.i=function(t,i,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),i&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=i):l[2]=i),r&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=r):l[4]="".concat(r)),e.push(l))}},e}},311:(t,e,i)=>{t.exports=i(237)("./src/ui.js")},355:(t,e,i)=>{t.exports=i(237)("./src/icons.js")},404:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([t.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}",""]);const a=o},424:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},517:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}},719:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},o=[],a=0;a<t.length;a++){var c=t[a],u=n.base?c[0]+n.base:c[0],l=s[u]||0,d="".concat(u," ").concat(l);s[u]=l+1;var g=i(d),m={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==g)e[g].references++,e[g].updater(m);else{var p=r(m,n);n.byIndex=a,e.splice(a,0,{identifier:d,updater:p,references:1})}o.push(d)}return o}function r(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,r){var s=n(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=i(s[o]);e[a].references--}for(var c=n(t,r),u=0;u<s.length;u++){var l=i(s[u]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=c}}},782:(t,e,i)=>{t.exports=i(237)("./src/core.js")},783:(t,e,i)=>{t.exports=i(237)("./src/engine.js")},792:t=>{"use strict";t.exports=function(t){return t[1]}},834:(t,e,i)=>{t.exports=i(237)("./src/typing.js")},863:t=>{"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function n(t,e,n,r){var s;if(n)s="";else{s="",r.supports&&(s+="@supports (".concat(r.supports,") {")),r.media&&(s+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(s+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),s+=r.css,o&&(s+="}"),r.media&&(s+="}"),r.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var r={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=r.singletonCounter++,i=r.singleton||(r.singleton=t.insertStyleElement(t));return{update:function(t){n(i,e,!1,t)},remove:function(t){n(i,e,!0,t)}}}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n),i.d(n,{AttributeCommand:()=>r,Bold:()=>g,BoldEditing:()=>o,BoldUI:()=>d,Code:()=>O,CodeEditing:()=>h,CodeUI:()=>C,Italic:()=>U,ItalicEditing:()=>N,ItalicUI:()=>M,Strikethrough:()=>_,StrikethroughEditing:()=>K,StrikethroughUI:()=>V,Subscript:()=>D,SubscriptEditing:()=>q,SubscriptUI:()=>H,Superscript:()=>Q,SuperscriptEditing:()=>z,SuperscriptUI:()=>J,Underline:()=>et,UnderlineEditing:()=>Y,UnderlineUI:()=>tt,_getBasicStylesButtonCreator:()=>u});var t=i(782),e=i(783);class r extends t.Command{attributeKey;constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const i=this.editor.model,n=i.document.selection,r=void 0===t.forceValue?!this.value:t.forceValue;i.change(t=>{if(n.isCollapsed)r?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const s=i.schema.getValidRanges(n.getRanges(),this.attributeKey,{includeEmptyRanges:!0});for(const i of s){let n=i,s=this.attributeKey;i.isCollapsed&&(n=i.start.parent,s=e.ModelDocumentSelection._getStoreAttributeKey(this.attributeKey)),r?t.setAttribute(s,r,n):t.removeAttribute(s,n)}}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,i=t.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const t of i.getRanges())for(const i of t.getItems())if(e.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const s="bold";class o extends t.Plugin{static get pluginName(){return"BoldEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:s}),t.model.schema.setAttributeProperties(s,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:s,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e&&("bold"==e||Number(e)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(s,new r(t,s)),t.keystrokes.set("CTRL+B",s),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Bold text"),keystroke:"CTRL+B"}]})}}var a=i(355),c=i(311);function u({editor:t,commandName:e,plugin:i,icon:n,label:r,keystroke:s}){return o=>{const a=t.commands.get(e),u=new o(t.locale);return u.set({label:r,icon:n,keystroke:s,isToggleable:!0}),u.bind("isEnabled").to(a,"isEnabled"),u.bind("isOn").to(a,"value"),u instanceof c.MenuBarMenuListItemButtonView?u.set({role:"menuitemcheckbox"}):u.set({tooltip:!0}),i.listenTo(u,"execute",()=>{t.execute(e),t.editing.view.focus()}),u}}const l="bold";class d extends t.Plugin{static get pluginName(){return"BoldUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:l,plugin:this,icon:a.IconBold,label:e("Bold"),keystroke:"CTRL+B"});t.ui.componentFactory.add(l,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+l,()=>i(c.MenuBarMenuListItemButtonView))}}class g extends t.Plugin{static get requires(){return[o,d]}static get pluginName(){return"Bold"}static get isOfficialPlugin(){return!0}}var m=i(834);const p="code";class h extends t.Plugin{static get pluginName(){return"CodeEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[m.TwoStepCaretMovement]}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:p}),t.model.schema.setAttributeProperties(p,{isFormatting:!0,copyOnEnter:!1}),t.conversion.attributeToElement({model:p,view:"code"}),t.commands.add(p,new r(t,p)),t.plugins.get(m.TwoStepCaretMovement).registerAttribute(p),(0,m.inlineHighlight)(t,p,"code","ck-code_selected"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}var f=i(719),b=i.n(f),y=i(863),v=i.n(y),k=i(424),x=i.n(k),I=i(517),w=i.n(I),S=i(163),P=i.n(S),B=i(404),A={attributes:{"data-cke":!0}};A.setAttributes=w(),A.insert=x().bind(null,"head"),A.domAPI=v(),A.insertStyleElement=P();b()(B.A,A);B.A&&B.A.locals&&B.A.locals;const E="code";class C extends t.Plugin{static get pluginName(){return"CodeUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:E,plugin:this,icon:a.IconCode,label:e("Code")});t.ui.componentFactory.add(E,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+E,()=>i(c.MenuBarMenuListItemButtonView))}}class O extends t.Plugin{static get requires(){return[h,C]}static get pluginName(){return"Code"}static get isOfficialPlugin(){return!0}}const T="italic";class N extends t.Plugin{static get pluginName(){return"ItalicEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:T}),t.model.schema.setAttributeProperties(T,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:T,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(T,new r(t,T)),t.keystrokes.set("CTRL+I",T),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Italic text"),keystroke:"CTRL+I"}]})}}const F="italic";class M extends t.Plugin{static get pluginName(){return"ItalicUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:F,plugin:this,icon:a.IconItalic,keystroke:"CTRL+I",label:e("Italic")});t.ui.componentFactory.add(F,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+F,()=>i(c.MenuBarMenuListItemButtonView))}}class U extends t.Plugin{static get requires(){return[N,M]}static get pluginName(){return"Italic"}static get isOfficialPlugin(){return!0}}const L="strikethrough";class K extends t.Plugin{static get pluginName(){return"StrikethroughEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:L}),t.model.schema.setAttributeProperties(L,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:L,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add(L,new r(t,L)),t.keystrokes.set("CTRL+SHIFT+X","strikethrough"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const R="strikethrough";class V extends t.Plugin{static get pluginName(){return"StrikethroughUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:R,plugin:this,icon:a.IconStrikethrough,keystroke:"CTRL+SHIFT+X",label:e("Strikethrough")});t.ui.componentFactory.add(R,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+R,()=>i(c.MenuBarMenuListItemButtonView))}}class _ extends t.Plugin{static get requires(){return[K,V]}static get pluginName(){return"Strikethrough"}static get isOfficialPlugin(){return!0}}const j="subscript";class q extends t.Plugin{static get pluginName(){return"SubscriptEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:j}),t.model.schema.setAttributeProperties(j,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:j,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),t.commands.add(j,new r(t,j))}}const $="subscript";class H extends t.Plugin{static get pluginName(){return"SubscriptUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:$,plugin:this,icon:a.IconSubscript,label:e("Subscript")});t.ui.componentFactory.add($,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+$,()=>i(c.MenuBarMenuListItemButtonView))}}class D extends t.Plugin{static get requires(){return[q,H]}static get pluginName(){return"Subscript"}static get isOfficialPlugin(){return!0}}const X="superscript";class z extends t.Plugin{static get pluginName(){return"SuperscriptEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:X}),t.model.schema.setAttributeProperties(X,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:X,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),t.commands.add(X,new r(t,X))}}const G="superscript";class J extends t.Plugin{static get pluginName(){return"SuperscriptUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:G,plugin:this,icon:a.IconSuperscript,label:e("Superscript")});t.ui.componentFactory.add(G,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+G,()=>i(c.MenuBarMenuListItemButtonView))}}class Q extends t.Plugin{static get requires(){return[z,J]}static get pluginName(){return"Superscript"}static get isOfficialPlugin(){return!0}}const W="underline";class Y extends t.Plugin{static get pluginName(){return"UnderlineEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:W}),t.model.schema.setAttributeProperties(W,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:W,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add(W,new r(t,W)),t.keystrokes.set("CTRL+U","underline"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Underline text"),keystroke:"CTRL+U"}]})}}const Z="underline";class tt extends t.Plugin{static get pluginName(){return"UnderlineUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=u({editor:t,commandName:Z,plugin:this,icon:a.IconUnderline,label:e("Underline"),keystroke:"CTRL+U"});t.ui.componentFactory.add(Z,()=>i(c.ButtonView)),t.ui.componentFactory.add("menuBar:"+Z,()=>i(c.MenuBarMenuListItemButtonView))}}class et extends t.Plugin{static get requires(){return[Y,tt]}static get pluginName(){return"Underline"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).basicStyles=n})();;
/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CKEditor5=t():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.drupalEmphasis=t())}(globalThis,()=>(()=>{var e={"ckeditor5/src/core.js":(e,t,r)=>{e.exports=r("dll-reference CKEditor5.dll")("./src/core.js")},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,r),s.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{"use strict";r.d(o,{default:()=>n});var e=r("ckeditor5/src/core.js");class t extends e.Plugin{static get pluginName(){return"DrupalEmphasisEditing"}init(){this.editor.conversion.for("downcast").attributeToElement({model:"italic",view:"em",converterPriority:"high"})}}const i=t;class s extends e.Plugin{static get requires(){return[i]}static get pluginName(){return"DrupalEmphasis"}}const n={DrupalEmphasis:s}})(),o=o.default})());;
/* @license GPL-2.0-or-later https://raw.githubusercontent.com/ckeditor/ckeditor5/v47.6.0/LICENSE.md */
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Choose heading":"Choose heading",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},179:(e,t,n)=>{e.exports=n(237)("./src/paragraph.js")},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(o)for(var s=0;s<this.length;s++){var d=this[s][0];null!=d&&(r[d]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);o&&r[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},349:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(792),i=n.n(o),a=n(305),r=n.n(a)()(i());r.push([e.id,".ck.ck-heading_heading1 .ck-button__label{font-size:20px}.ck.ck-heading_heading2 .ck-button__label{font-size:17px}.ck.ck-heading_heading3 .ck-button__label{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}",""]);const s=r},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},424:e=>{"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},719:e=>{"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var a={},r=[],s=0;s<e.length;s++){var d=e[s],c=o.base?d[0]+o.base:d[0],l=a[c]||0,u="".concat(c," ").concat(l);a[c]=l+1;var g=n(u),m={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(-1!==g)t[g].references++,t[g].updater(m);else{var h=i(m,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:h,references:1})}r.push(u)}return r}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var a=o(e=e||[],i=i||{});return function(e){e=e||[];for(var r=0;r<a.length;r++){var s=n(a[r]);t[s].references--}for(var d=o(e,i),c=0;c<a.length;c++){var l=n(a[c]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=d}}},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},863:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function o(e,t,o,i){var a;if(o)a="";else{a="",i.supports&&(a+="@supports (".concat(i.supports,") {")),i.media&&(a+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(a+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),a+=i.css,r&&(a+="}"),i.media&&(a+="}"),i.supports&&(a+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,a);else{var s=document.createTextNode(a),d=e.childNodes;d[t]&&e.removeChild(d[t]),d.length?e.insertBefore(s,d[t]):e.appendChild(s)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){o(n,t,!1,e)},remove:function(e){o(n,t,!0,e)}}}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var a=t[o]={id:o,exports:{}};return e[o](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Heading:()=>P,HeadingButtonsUI:()=>T,HeadingCommand:()=>a,HeadingEditing:()=>d,HeadingUI:()=>_,Title:()=>I,_getLocalizedHeadingOptions:()=>l});var e=n(782),t=n(179),i=n(584);class a extends e.Command{modelElements;constructor(e,t){super(e),this.modelElements=t}refresh(){const e=(0,i.first)(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>r(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,o=e.value;t.change(e=>{const i=Array.from(n.selection.getSelectedBlocks()).filter(e=>r(e,o,t.schema));for(const t of i)t.is("element",o)||e.rename(t,o)})}}function r(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}const s="paragraph";class d extends e.Plugin{static get pluginName(){return"HeadingEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[t.Paragraph]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const o of t)"paragraph"!==o.model&&(e.model.schema.register(o.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(o),n.push(o.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new a(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,o)=>{const i=e.model.document.selection.getFirstPosition().parent;n.some(e=>i.is("element",e.model))&&!i.is("element",s)&&0===i.childCount&&o.writer.rename(i,s)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:i.priorities.low+1})}}var c=n(311);function l(e){const t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e})}var u=n(719),g=n.n(u),m=n(863),h=n.n(m),p=n(424),f=n.n(p),v=n(517),w=n.n(v),b=n(163),y=n.n(b),x=n(349),H={attributes:{"data-cke":!0}};H.setAttributes=w(),H.insert=f().bind(null,"head"),H.domAPI=h(),H.insertStyleElement=y();g()(x.A,H);x.A&&x.A.locals&&x.A.locals;class _ extends e.Plugin{static get pluginName(){return"HeadingUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=l(e),o=t("Choose heading"),a=t("Heading");e.ui.componentFactory.add("heading",t=>{const r={},s=new i.Collection,d=e.commands.get("heading"),l=e.commands.get("paragraph"),u=[d];for(const e of n){const t={type:"button",model:new c.UIModel({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),u.push(l)):(t.model.bind("isOn").to(d,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),r[e.model]=e.title}const g=(0,c.createDropdown)(t);return(0,c.addListToDropdown)(g,s,{ariaLabel:a,role:"menu"}),g.buttonView.set({ariaLabel:a,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:a}),g.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),g.bind("isEnabled").toMany(u,"isEnabled",(...e)=>e.some(e=>e)),g.buttonView.bind("label").to(d,"value",l,"value",(e,t)=>{const n=t?"paragraph":e;return"boolean"==typeof n?o:r[n]?r[n]:o}),g.buttonView.bind("ariaLabel").to(d,"value",l,"value",(e,t)=>{const n=t?"paragraph":e;return"boolean"==typeof n?a:r[n]?`${r[n]}, ${a}`:a}),this.listenTo(g,"execute",t=>{const{commandName:n,commandValue:o}=t.source;e.execute(n,o?{value:o}:void 0),e.editing.view.focus()}),g}),e.ui.componentFactory.add("menuBar:heading",o=>{const i=new c.MenuBarMenuView(o),a=e.commands.get("heading"),r=e.commands.get("paragraph"),s=[a],d=new c.MenuBarMenuListView(o);i.set({class:"ck-heading-dropdown"}),d.set({ariaLabel:t("Heading"),role:"menu"}),i.buttonView.set({label:t("Heading")}),i.panelView.children.add(d);for(const t of n){const n=new c.MenuBarMenuListItemView(o,i),l=new c.MenuBarMenuListItemButtonView(o);n.children.add(l),d.items.add(n),l.set({isToggleable:!0,label:t.title,role:"menuitemradio",class:t.class}),l.delegate("execute").to(i),l.on("execute",()=>{const n="paragraph"===t.model?"paragraph":"heading";e.execute(n,{value:t.model}),e.editing.view.focus()}),"paragraph"===t.model?(l.bind("isOn").to(r,"value"),s.push(r)):l.bind("isOn").to(a,"value",e=>e===t.model)}return i.bind("isEnabled").toMany(s,"isEnabled",(...e)=>e.some(e=>e)),i})}}class P extends e.Plugin{static get requires(){return[d,_]}static get pluginName(){return"Heading"}static get isOfficialPlugin(){return!0}}var E=n(355);const C=(()=>({heading1:E.IconHeading1,heading2:E.IconHeading2,heading3:E.IconHeading3,heading4:E.IconHeading4,heading5:E.IconHeading5,heading6:E.IconHeading6}))();class T extends e.Plugin{init(){l(this.editor).filter(e=>"paragraph"!==e.model).map(e=>this._createButton(e))}_createButton(e){const t=this.editor;t.ui.componentFactory.add(e.model,n=>{const o=new c.ButtonView(n),i=t.commands.get("heading");return o.label=e.title,o.icon=e.icon||C[e.model],o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value",t=>t==e.model),o.on("execute",()=>{t.execute("heading",{value:e.model}),t.editing.view.focus()}),o})}}var k=n(783);const A=new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class I extends e.Plugin{_bodyPlaceholder=new Map;static get pluginName(){return"Title"}static get isOfficialPlugin(){return!0}static get requires(){return["Paragraph"]}init(){const e=this.editor,t=e.model;t.schema.register("title",{isBlock:!0,allowIn:"$root"}),t.schema.register("title-content",{isBlock:!0,allowIn:"title",allowAttributes:["alignment"]}),t.schema.extend("$text",{allowIn:"title-content"}),t.schema.addAttributeCheck(e=>{if(e.endsWith("title-content $text"))return!1}),e.editing.mapper.on("modelToViewPosition",B(e.editing.view)),e.data.mapper.on("modelToViewPosition",B(e.editing.view)),e.conversion.for("downcast").elementToElement({model:"title-content",view:"h1"}),e.conversion.for("downcast").add(e=>e.on("insert:title",(e,t,n)=>{n.consumable.consume(t.item,e.name)})),e.data.upcastDispatcher.on("element:h1",O,{priority:"high"}),e.data.upcastDispatcher.on("element:h2",O,{priority:"high"}),e.data.upcastDispatcher.on("element:h3",O,{priority:"high"}),t.document.registerPostFixer(e=>this._fixTitleContent(e)),t.document.registerPostFixer(e=>this._fixTitleElement(e)),t.document.registerPostFixer(e=>this._fixBodyElement(e)),t.document.registerPostFixer(e=>this._fixExtraParagraph(e)),this._attachPlaceholders(),this._attachTabPressHandling()}getTitle(e={}){const t=e.rootName?e.rootName:void 0,n=this._getTitleElement(t).getChild(0);return this.editor.data.stringify(n,e)}getBody(e={}){const t=this.editor,n=t.data,o=t.model,i=e.rootName?e.rootName:void 0,a=t.model.document.getRoot(i),r=t.editing.view,s=new k.ViewDowncastWriter(r.document),d=o.createRangeIn(a),c=s.createDocumentFragment(),l=o.createPositionAfter(a.getChild(0)),u=o.createRange(l,o.createPositionAt(a,"end")),g=new Map;for(const e of o.markers){const t=u.getIntersection(e.getRange());t&&g.set(e.name,t)}return n.mapper.clearBindings(),n.mapper.bindElements(a,c),n.downcastDispatcher.convert(d,g,s,e),s.remove(s.createRangeOn(c.getChild(0))),t.data.processor.toData(c)}_getTitleElement(e){const t=this.editor.model.document.getRoot(e);for(const e of t.getChildren())if(S(e))return e}_fixTitleContent(e){let t=!1;for(const n of this.editor.model.document.getRootNames()){const o=this._getTitleElement(n);if(!o||1===o.maxOffset)continue;const i=Array.from(o.getChildren());i.shift();for(const t of i)e.move(e.createRangeOn(t),o,"after"),e.rename(t,"paragraph");t=!0}return t}_fixTitleElement(e){let t=!1;const n=this.editor.model;for(const o of this.editor.model.document.getRoots()){const i=Array.from(o.getChildren()).filter(S),a=i[0],r=o.getChild(0);if(r.is("element","title"))i.length>1&&(M(i,e,n),t=!0);else{if(!a&&!A.has(r.name)){const n=e.createElement("title");e.insert(n,o),e.insertElement("title-content",n),t=!0;continue}A.has(r.name)?N(r,e,n):e.move(e.createRangeOn(a),o,0),M(i,e,n),t=!0}}return t}_fixBodyElement(e){let t=!1;for(const n of this.editor.model.document.getRootNames()){const o=this.editor.model.document.getRoot(n);if(o.childCount<2){const i=e.createElement("paragraph");e.insert(i,o,1),this._bodyPlaceholder.set(n,i),t=!0}}return t}_fixExtraParagraph(e){let t=!1;for(const n of this.editor.model.document.getRootNames()){const o=this.editor.model.document.getRoot(n),i=this._bodyPlaceholder.get(n);R(i,o)&&(this._bodyPlaceholder.delete(n),e.remove(i),t=!0)}return t}_attachPlaceholders(){const e=this.editor,t=e.t,n=e.editing.view,o=e.sourceElement,i=e.config.get("title.placeholder")||t("Type your title"),a=e.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder")||t("Type or paste your content here.");e.editing.downcastDispatcher.on("insert:title-content",(e,t,o)=>{const a=o.mapper.toViewElement(t.item);a.placeholder=i,(0,k.enableViewPlaceholder)({view:n,element:a,keepOnFocus:!0})});const r=new Map;n.document.registerPostFixer(e=>{let t=!1;for(const o of n.document.roots){if(o.isEmpty)continue;const n=o.getChild(1),i=r.get(o.rootName);n!==i&&(i&&((0,k.hideViewPlaceholder)(e,i),e.removeAttribute("data-placeholder",i)),e.setAttribute("data-placeholder",a,n),r.set(o.rootName,n),t=!0),t=(0,k.needsViewPlaceholder)(n,!0)&&2===o.childCount&&"p"===n.name?!!(0,k.showViewPlaceholder)(e,n)||t:!!(0,k.hideViewPlaceholder)(e,n)||t}return t})}_attachTabPressHandling(){const e=this.editor,t=e.model;e.keystrokes.set("TAB",(e,n)=>{t.change(e=>{const o=t.document.selection,i=Array.from(o.getSelectedBlocks());if(1===i.length&&i[0].is("element","title-content")){const t=o.getFirstPosition().root.getChild(1);e.setSelection(t,0),n()}})}),e.keystrokes.set("SHIFT + TAB",(n,o)=>{t.change(n=>{const a=t.document.selection;if(!a.isCollapsed)return;const r=(0,i.first)(a.getSelectedBlocks()),s=a.getFirstPosition(),d=e.model.document.getRoot(s.root.rootName),c=d.getChild(0);r===d.getChild(1)&&s.isAtStart&&(n.setSelection(c.getChild(0),0),o())})})}}function O(e,t,n){const o=t.modelCursor,i=t.viewItem;if(!o.isAtStart||!o.parent.is("element","$root"))return;if(!n.consumable.consume(i,{name:!0}))return;const a=n.writer,r=a.createElement("title"),s=a.createElement("title-content");a.append(s,r),a.insert(r,o),n.convertChildren(i,s),n.updateConversionResult(r,t)}function B(e){return(t,n)=>{const o=n.modelPosition.parent;if(!o.is("element","title"))return;const i=o.parent,a=n.mapper.toViewElement(i);n.viewPosition=e.createPositionAt(a,0),t.stop()}}function S(e){return e.is("element","title")}function N(e,t,n){const o=t.createElement("title");t.insert(o,e,"before"),t.insert(e,o,0),t.rename(e,"title-content"),n.schema.removeDisallowedAttributes([e],t)}function M(e,t,n){let o=!1;for(const i of e)0!==i.index&&(V(i,t,n),o=!0);return o}function V(e,t,n){const o=e.getChild(0);o.isEmpty?t.remove(e):(t.move(t.createRangeOn(o),e,"before"),t.rename(o,"paragraph"),t.remove(e),n.schema.removeDisallowedAttributes([o],t))}function R(e,t){return!(!e||!e.is("element","paragraph")||e.childCount)&&!(t.childCount<=2||t.getChild(t.childCount-1)!==e)}})(),(window.CKEditor5=window.CKEditor5||{}).heading=o})();;
/* @license GPL-2.0-or-later https://github.com/ckeditor/ckeditor5/blob/v47.6.0/LICENSE.md */
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},251:(e,r,t)=>{e.exports=t(237)("./src/undo.js")},311:(e,r,t)=>{e.exports=t(237)("./src/ui.js")},331:(e,r,t)=>{e.exports=t(237)("./src/clipboard.js")},507:(e,r,t)=>{e.exports=t(237)("./src/enter.js")},727:(e,r,t)=>{e.exports=t(237)("./src/select-all.js")},782:(e,r,t)=>{e.exports=t(237)("./src/core.js")},834:(e,r,t)=>{e.exports=t(237)("./src/typing.js")}},r={};function t(s){var o=r[s];if(void 0!==o)return o.exports;var i=r[s]={exports:{}};return e[s](i,i.exports,t),i.exports}t.d=(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{"use strict";t.r(s),t.d(s,{Essentials:()=>a});var e=t(782),r=t(331),o=t(507),i=t(727),n=t(834),l=t(251),c=t(311);class a extends e.Plugin{static get requires(){return[c.AccessibilityHelp,r.Clipboard,o.Enter,i.SelectAll,o.ShiftEnter,n.Typing,l.Undo]}static get pluginName(){return"Essentials"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).essentials=s})();;
/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CKEditor5=t():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.drupalHtmlEngine=t())}(globalThis,()=>(()=>{var e={"ckeditor5/src/core.js":(e,t,n)=>{e.exports=n("dll-reference CKEditor5.dll")("./src/core.js")},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(p){var r=t[p];if(void 0!==r)return r.exports;var s=t[p]={exports:{}};return e[p](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var p in t)n.o(t,p)&&!n.o(e,p)&&Object.defineProperty(e,p,{enumerable:!0,get:t[p]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var p={};return(()=>{"use strict";n.d(p,{default:()=>a});var e=n("ckeditor5/src/core.js");class t{constructor(){this.chunks=[],this.selfClosingTags=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],this.rawTags=["script","style"]}build(){return this.chunks.join("")}appendNode(e){e.nodeType===Node.TEXT_NODE?this._appendText(e):e.nodeType===Node.ELEMENT_NODE?this._appendElement(e):e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?this._appendChildren(e):e.nodeType===Node.COMMENT_NODE&&this._appendComment(e)}_appendElement(e){const t=e.nodeName.toLowerCase();this._append("<"),this._append(t),this._appendAttributes(e),this._append(">"),this.selfClosingTags.includes(t)||(this._appendChildren(e),this._append("</"),this._append(t),this._append(">"))}_appendChildren(e){Object.keys(e.childNodes).forEach(t=>{this.appendNode(e.childNodes[t])})}_appendAttributes(e){Object.keys(e.attributes).forEach(t=>{this._append(" "),this._append(e.attributes[t].name),this._append('="'),this._append(this.constructor._escapeAttribute(e.attributes[t].value)),this._append('"')})}_appendText(e){const t=document.implementation.createHTMLDocument("").createElement("p");t.textContent=e.textContent,e.parentElement&&this.rawTags.includes(e.parentElement.tagName.toLowerCase())?this._append(t.textContent):this._append(t.innerHTML)}_appendComment(e){this._append("\x3c!--"),this._append(e.textContent),this._append("--\x3e")}_append(e){this.chunks.push(e)}static _escapeAttribute(e){return e.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r\n/g,"&#13;").replace(/[\r\n]/g,"&#13;")}}class r{getHtml(e){const n=new t;return n.appendNode(e),n.build()}}class s extends e.Plugin{init(){this.editor.data.processor.htmlWriter=new r}static get pluginName(){return"DrupalHtmlEngine"}}const a={DrupalHtmlEngine:s}})(),p=p.default})());;
/*!
 * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
 */
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.CKEditor5=r():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.drupalPoweredBy=r())}(self,(()=>(()=>{var e={"ckeditor5/src/core.js":(e,r,o)=>{e.exports=o("dll-reference CKEditor5.dll")("./src/core.js")},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},r={};function o(t){var i=r[t];if(void 0!==i)return i.exports;var d=r[t]={exports:{}};return e[t](d,d.exports,o),d.exports}o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var t={};return(()=>{"use strict";o.d(t,{default:()=>i});var e=o("ckeditor5/src/core.js");class r extends e.Plugin{static get pluginName(){return"drupalPoweredBy"}init(){const e=this.editor;e.config._config.drupalPoweredBy&&(e.config._config.ui?e.config._config.ui.poweredBy={forceVisible:!0}:e.config._config.ui={poweredBy:{forceVisible:!0}})}}const i={DrupalPoweredBy:r}})(),t=t.default})()));
;
/* @license GNU-GPL-2.0-or-later https://raw.githubusercontent.com/ckeditor/ckeditor5/master/LICENSE.md */
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{Big:"Big",Default:"Default","Document colors":"Document colors","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size",Huge:"Huge",Small:"Small",Tiny:"Tiny"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(n)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);n&&l[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},355:(e,t,o)=>{e.exports=o(237)("./src/icons.js")},424:e=>{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},719:e=>{"use strict";var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var i={},l=[],s=0;s<e.length;s++){var a=e[s],c=n.base?a[0]+n.base:a[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var m=o(d),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==m)t[m].references++,t[m].updater(p);else{var f=r(p,n);n.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}l.push(d)}return l}function r(e,t){var o=t.domAPI(t);o.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,r){var i=n(e=e||[],r=r||{});return function(e){e=e||[];for(var l=0;l<i.length;l++){var s=o(i[l]);t[s].references--}for(var a=n(e,r),c=0;c<i.length;c++){var u=o(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=a}}},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},863:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function n(e,t,n,r){var i;if(n)i="";else{i="",r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var l=void 0!==r.layer;l&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,l&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,i);else{var s=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,o=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){n(o,t,!1,e)},remove:function(e){n(o,t,!0,e)}}}},943:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(792),r=o.n(n),i=o(305),l=o.n(i)()(r());l.push([e.id,":root{--ck-content-font-size-tiny:0.7em;--ck-content-font-size-small:0.85em;--ck-content-font-size-big:1.4em;--ck-content-font-size-huge:1.8em}.ck-content .text-tiny{font-size:var(--ck-content-font-size-tiny)}.ck-content .text-small{font-size:var(--ck-content-font-size-small)}.ck-content .text-big{font-size:var(--ck-content-font-size-big)}.ck-content .text-huge{font-size:var(--ck-content-font-size-huge)}",""]);const s=l}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},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,{Font:()=>Z,FontBackgroundColor:()=>X,FontBackgroundColorCommand:()=>Y,FontBackgroundColorEditing:()=>J,FontBackgroundColorUI:()=>Q,FontColor:()=>W,FontColorCommand:()=>R,FontColorEditing:()=>G,FontColorUI:()=>H,FontColorUIBase:()=>q,FontCommand:()=>r,FontFamily:()=>x,FontFamilyCommand:()=>f,FontFamilyEditing:()=>y,FontFamilyUI:()=>F,FontSize:()=>U,FontSizeCommand:()=>S,FontSizeEditing:()=>O,FontSizeUI:()=>K,_addFontColorSelectorToDropdown:()=>p,_buildFontDefinition:()=>u,_normalizeFontFamilyOptions:()=>g,_normalizeFontSizeOptions:()=>k,_renderDowncastFontElement:()=>m,_renderUpcastFontColorAttribute:()=>d});var e=o(782),t=o(783);class r extends e.Command{attributeKey;constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const o=this.editor.model,n=o.document.selection,r=e.value,i=e.batch,l=e=>{if(n.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,r):e.removeSelectionAttribute(this.attributeKey);else{const i=o.schema.getValidRanges(n.getRanges(),this.attributeKey,{includeEmptyRanges:!0});for(const o of i){let n=o,i=this.attributeKey;o.isCollapsed&&(n=o.start.parent,i=t.ModelDocumentSelection._getStoreAttributeKey(this.attributeKey)),r?e.setAttribute(i,r,n):e.removeAttribute(i,n)}}};i?o.enqueueChange(i,e=>{l(e)}):o.change(e=>{l(e)})}}var i=o(311);const l="fontSize",s="fontFamily",a="fontColor",c="fontBackgroundColor";function u(e,t){const o={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)o.model.values.push(e.model),o.view[e.model]=e.view,e.upcastAlso&&(o.upcastAlso[e.model]=e.upcastAlso);return o}function d(e){return t=>t.getStyle(e).replace(/\s/g,"")}function m(e){return(t,{writer:o})=>o.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}function p({dropdownView:e,colors:t,columns:o,removeButtonLabel:n,colorPickerLabel:r,documentColorsLabel:l,documentColorsCount:s,colorPickerViewConfig:a}){const c=e.locale,u=new i.ColorSelectorView(c,{colors:t,columns:o,removeButtonLabel:n,colorPickerLabel:r,documentColorsLabel:l,documentColorsCount:s,colorPickerViewConfig:a});return e.colorSelectorView=u,e.panelView.children.add(u),u}class f extends r{constructor(e){super(e,s)}}function g(e){return e.map(h).filter(e=>void 0!==e)}function b(e){return e.replace(/["']/g,"").split(",").map(e=>e.trim())}function h(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=b(e),o=t[0],n=t.map(v).join(", ");return{title:o,model:n,view:{name:"span",styles:{"font-family":n},priority:7}}}(e):void 0}function v(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class y extends e.Plugin{static get pluginName(){return"FontFamilyEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(s,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:s}),e.model.schema.setAttributeProperties(s,{isFormatting:!0,copyOnEnter:!0});const t=g(e.config.get("fontFamily.options")).filter(e=>e.model),o=u(s,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(o),e.commands.add(s,new f(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:s,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:s,value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:s,value:e=>e.getAttribute("face")}})}}var w=o(584),C=o(355);class F extends e.Plugin{static get pluginName(){return"FontFamilyUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,o=this._getLocalizedOptions(),n=e.commands.get(s),r=t("Font Family"),l=function(e,t){const o=new w.Collection;for(const n of e){const e={type:"button",model:new i.UIModel({commandName:s,commandParam:n.model,label:n.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",e=>{if(e===n.model)return!0;if(!e||!n.model)return!1;return b(e)[0].toLowerCase()===b(n.model)[0].toLowerCase()}),n.view&&"string"!=typeof n.view&&n.view.styles&&e.model.set("labelStyle",`font-family: ${n.view.styles["font-family"]}`),o.add(e)}return o}(o,n);e.ui.componentFactory.add(s,t=>{const o=(0,i.createDropdown)(t);return(0,i.addListToDropdown)(o,l,{role:"menu",ariaLabel:r}),o.buttonView.set({label:r,icon:C.IconFontFamily,tooltip:!0}),o.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),o.bind("isEnabled").to(n),this.listenTo(o,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),o}),e.ui.componentFactory.add(`menuBar:${s}`,t=>{const o=new i.MenuBarMenuView(t);o.buttonView.set({label:r,icon:C.IconFontFamily}),o.bind("isEnabled").to(n);const s=new i.MenuBarMenuListView(t);for(const n of l){const r=new i.MenuBarMenuListItemView(t,o),l=new i.MenuBarMenuListItemButtonView(t);l.set({role:"menuitemradio",isToggleable:!0}),l.bind(...Object.keys(n.model)).to(n.model),l.delegate("execute").to(o),l.on("execute",()=>{e.execute(n.model.commandName,{value:n.model.commandParam}),e.editing.view.focus()}),r.children.add(l),s.items.add(r)}return o.panelView.children.add(s),o})}_getLocalizedOptions(){const e=this.editor,t=e.t;return g(e.config.get(s).options).map(e=>("Default"===e.title&&(e.title=t("Default")),e))}}class x extends e.Plugin{static get requires(){return[y,F]}static get pluginName(){return"FontFamily"}static get isOfficialPlugin(){return!0}}class S extends r{constructor(e){super(e,l)}}function k(e){return e.map(e=>function(e){"number"==typeof e&&(e=String(e));if("object"==typeof e&&(t=e,t.title&&t.model&&t.view))return P(e);var t;const o=function(e){return"string"==typeof e?A[e]:A[e.model]}(e);if(o)return P(o);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new w.CKEditorError("font-size-invalid-definition",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e))return;return function(e){"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`});return e.view={name:"span",styles:{"font-size":e.model}},P(e)}(e)}(e)).filter(e=>void 0!==e)}const A={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function P(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const B=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class O extends e.Plugin{static get pluginName(){return"FontSizeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(l,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:l}),e.model.schema.setAttributeProperties(l,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),o=k(this.editor.config.get("fontSize.options")).filter(e=>e.model),n=u(l,o);t?(this._prepareAnyValueConverters(n),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add(l,new S(e))}_prepareAnyValueConverters(e){const o=this.editor,n=e.model.values.filter(e=>!(0,t.isLengthStyleValue)(String(e))&&!(0,t.isPercentageStyleValue)(String(e)));if(n.length)throw new w.CKEditorError("font-size-invalid-use-of-named-presets",null,{presets:n});o.conversion.for("downcast").attributeToElement({model:l,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),o.conversion.for("upcast").elementToAttribute({model:{key:l,value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:l,value:e=>{const t=e.getAttribute("size"),o="-"===t[0]||"+"===t[0];let n=parseInt(t,10);o&&(n=3+n);const r=B.length-1,i=Math.min(Math.max(n,0),r);return B[i]}}})}}var z=o(719),L=o.n(z),T=o(863),N=o.n(T),E=o(424),V=o.n(E),I=o(517),M=o.n(I),_=o(163),D=o.n(_),j=o(943),$={attributes:{"data-cke":!0}};$.setAttributes=M(),$.insert=V().bind(null,"head"),$.domAPI=N(),$.insertStyleElement=D();L()(j.A,$);j.A&&j.A.locals&&j.A.locals;class K extends e.Plugin{static get pluginName(){return"FontSizeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,o=this._getLocalizedOptions(),n=e.commands.get(l),r=t("Font Size"),s=function(e,t){const o=new w.Collection;for(const n of e){const e={type:"button",model:new i.UIModel({commandName:l,commandParam:n.model,label:n.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};n.view&&"string"!=typeof n.view&&(n.view.styles&&e.model.set("labelStyle",`font-size:${n.view.styles["font-size"]}`),n.view.classes&&e.model.set("class",`${e.model.class} ${n.view.classes}`)),e.model.bind("isOn").to(t,"value",e=>e===n.model),o.add(e)}return o}(o,n);e.ui.componentFactory.add(l,t=>{const o=(0,i.createDropdown)(t);return(0,i.addListToDropdown)(o,s,{role:"menu",ariaLabel:r}),o.buttonView.set({label:r,icon:C.IconFontSize,tooltip:!0}),o.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),o.bind("isEnabled").to(n),this.listenTo(o,"execute",t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()}),o}),e.ui.componentFactory.add(`menuBar:${l}`,t=>{const o=new i.MenuBarMenuView(t);o.buttonView.set({label:r,icon:C.IconFontSize}),o.bind("isEnabled").to(n);const l=new i.MenuBarMenuListView(t);for(const n of s){const r=new i.MenuBarMenuListItemView(t,o),s=new i.MenuBarMenuListItemButtonView(t);s.set({role:"menuitemradio",isToggleable:!0}),s.bind(...Object.keys(n.model)).to(n.model),s.delegate("execute").to(o),s.on("execute",()=>{e.execute(n.model.commandName,{value:n.model.commandParam}),e.editing.view.focus()}),r.children.add(s),l.items.add(r)}return o.panelView.children.add(l),o})}_getLocalizedOptions(){const e=this.editor,t=e.t,o={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return k(e.config.get(l).options).map(e=>{const t=o[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e})}}class U extends e.Plugin{static get requires(){return[O,K]}static get pluginName(){return"FontSize"}static get isOfficialPlugin(){return!0}normalizeSizeOptions(e){return k(e)}}class R extends r{constructor(e){super(e,a)}}class G extends e.Plugin{static get pluginName(){return"FontColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(a,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:a,value:d("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:a,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:a,view:m("color")}),e.commands.add(a,new R(e)),e.model.schema.extend("$text",{allowAttributes:a}),e.model.schema.setAttributeProperties(a,{isFormatting:!0,copyOnEnter:!0})}}class q extends e.Plugin{commandName;componentName;icon;dropdownLabel;columns;constructor(e,{commandName:t,componentName:o,icon:n,dropdownLabel:r}){super(e),this.commandName=t,this.componentName=o,this.icon=n,this.dropdownLabel=r,this.columns=e.config.get(`${this.componentName}.columns`)}init(){const e=this.editor,t=e.locale,o=t.t,n=e.commands.get(this.commandName),r=e.config.get(this.componentName),l=(0,i.normalizeColorOptions)(r.colors),s=(0,i.getLocalizedColorOptions)(t,l),a=r.documentColors,c=!1!==r.colorPicker;e.ui.componentFactory.add(this.componentName,t=>{const l=(0,i.createDropdown)(t);let u=!1;const d=p({dropdownView:l,colors:s.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:o("Remove color"),colorPickerLabel:o("Color picker"),documentColorsLabel:0!==a?o("Document colors"):"",documentColorsCount:void 0===a?this.columns:a,colorPickerViewConfig:!!c&&(r.colorPicker||{})});return d.bind("selectedColor").to(n,"value"),l.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),l.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),l.bind("isEnabled").to(n),d.on("execute",(t,o)=>{l.isOpen&&e.execute(this.commandName,{value:o.value,batch:this._undoStepBatch}),"colorPicker"!==o.source&&e.editing.view.focus(),"colorPickerSaveButton"===o.source&&(l.isOpen=!1)}),d.on("colorPicker:show",()=>{this._undoStepBatch=e.model.createBatch()}),d.on("colorPicker:cancel",()=>{this._undoStepBatch.operations.length&&(l.isOpen=!1,e.execute("undo",this._undoStepBatch)),e.editing.view.focus()}),l.on("change:isOpen",(t,o,n)=>{u||(u=!0,l.colorSelectorView.appendUI()),n&&(0!==a&&d.updateDocumentColors(e.model,this.componentName),d.updateSelectedColors(),d.showColorGridsFragment())}),(0,i.focusChildOnDropdownOpen)(l,()=>l.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find(e=>e.isOn)),l}),e.ui.componentFactory.add(`menuBar:${this.componentName}`,t=>{const r=new i.MenuBarMenuView(t);r.buttonView.set({label:this.dropdownLabel,icon:this.icon}),r.bind("isEnabled").to(n);let l=!1;const c=new i.ColorSelectorView(t,{colors:s.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:o("Remove color"),colorPickerLabel:o("Color picker"),documentColorsLabel:0!==a?o("Document colors"):"",documentColorsCount:void 0===a?this.columns:a,colorPickerViewConfig:!1});return c.bind("selectedColor").to(n,"value"),c.delegate("execute").to(r),c.on("execute",(t,o)=>{e.execute(this.commandName,{value:o.value,batch:this._undoStepBatch}),e.editing.view.focus()}),r.on("change:isOpen",(t,o,n)=>{l||(l=!0,c.appendUI()),n&&(0!==a&&c.updateDocumentColors(e.model,this.componentName),c.updateSelectedColors(),c.showColorGridsFragment())}),r.panelView.children.add(c),r})}}class H extends q{constructor(e){const t=e.locale.t;super(e,{commandName:a,componentName:a,icon:C.IconFontColor,dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class W extends e.Plugin{static get requires(){return[G,H]}static get pluginName(){return"FontColor"}static get isOfficialPlugin(){return!0}}class Y extends r{constructor(e){super(e,c)}}class J extends e.Plugin{static get pluginName(){return"FontBackgroundColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(c,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(t.addBackgroundStylesRules),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:c,value:d("background-color")}}),e.conversion.for("downcast").attributeToElement({model:c,view:m("background-color")}),e.commands.add(c,new Y(e)),e.model.schema.extend("$text",{allowAttributes:c}),e.model.schema.setAttributeProperties(c,{isFormatting:!0,copyOnEnter:!0})}}class Q extends q{constructor(e){const t=e.locale.t;super(e,{commandName:c,componentName:c,icon:C.IconFontBackground,dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class X extends e.Plugin{static get requires(){return[J,Q]}static get pluginName(){return"FontBackgroundColor"}static get isOfficialPlugin(){return!0}}class Z extends e.Plugin{static get requires(){return[x,U,W,X]}static get pluginName(){return"Font"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).font=n})();;
/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
(function($,Drupal,{tabbable,isTabbable}){function TabbingManager(){this.stack=[];}function TabbingContext(options){$.extend(this,{level:null,$tabbableElements:$(),$disabledElements:$(),released:false,active:false,trapFocus:false},options);}$.extend(TabbingManager.prototype,{constrain(elements,{trapFocus=false}={}){const il=this.stack.length;for(let i=0;i<il;i++)this.stack[i].deactivate();let tabbableElements=[];$(elements).each((index,rootElement)=>{tabbableElements=[...tabbableElements,...tabbable(rootElement)];if(isTabbable(rootElement))tabbableElements=[...tabbableElements,rootElement];});const tabbingContext=new TabbingContext({level:this.stack.length,$tabbableElements:$(tabbableElements),trapFocus});this.stack.push(tabbingContext);tabbingContext.activate();$(document).trigger('drupalTabbingConstrained',tabbingContext);return tabbingContext;},release(){let toActivate=this.stack.length-1;while(toActivate>=0&&this.stack[toActivate].released)toActivate--;this.stack.splice(toActivate+1);if(toActivate>=0)this.stack[toActivate].activate();},activate(tabbingContext){const $set=tabbingContext.$tabbableElements;const level=tabbingContext.level;const $disabledSet=$(tabbable(document.body)).not($set);tabbingContext.$disabledElements=$disabledSet;const il=$disabledSet.length;for(let i=0;i<il;i++)this.recordTabindex($disabledSet.eq(i),level);$disabledSet.prop('tabindex',-1).prop('autofocus',false);let $hasFocus=$set.filter('[autofocus]').eq(-1);if($hasFocus.length===0)$hasFocus=$set.eq(0);$hasFocus.trigger('focus');if($set.length&&tabbingContext.trapFocus){$set.last().on('keydown.focus-trap',(event)=>{if(event.key==='Tab'&&!event.shiftKey){event.preventDefault();$set.first().focus();}});$set.first().on('keydown.focus-trap',(event)=>{if(event.key==='Tab'&&event.shiftKey){event.preventDefault();$set.last().focus();}});}},deactivate(tabbingContext){const $set=tabbingContext.$disabledElements;const level=tabbingContext.level;const il=$set.length;tabbingContext.$tabbableElements.first().off('keydown.focus-trap');tabbingContext.$tabbableElements.last().off('keydown.focus-trap');for(let i=0;i<il;i++)this.restoreTabindex($set.eq(i),level);},recordTabindex($el,level){const tabInfo=$el.data('drupalOriginalTabIndices')||{};tabInfo[level]={tabindex:$el[0].getAttribute('tabindex'),autofocus:$el[0].hasAttribute('autofocus')};$el.data('drupalOriginalTabIndices',tabInfo);},restoreTabindex($el,level){const tabInfo=$el.data('drupalOriginalTabIndices');if(tabInfo&&tabInfo[level]){const data=tabInfo[level];if(data.tabindex)$el[0].setAttribute('tabindex',data.tabindex);else $el[0].removeAttribute('tabindex');if(data.autofocus)$el[0].setAttribute('autofocus','autofocus');if(level===0)$el.removeData('drupalOriginalTabIndices');else{let levelToDelete=level;while(tabInfo.hasOwnProperty(levelToDelete)){delete tabInfo[levelToDelete];levelToDelete++;}$el.data('drupalOriginalTabIndices',tabInfo);}}}});$.extend(TabbingContext.prototype,{release(){if(!this.released){this.deactivate();this.released=true;Drupal.tabbingManager.release(this);$(document).trigger('drupalTabbingContextReleased',this);}},activate(){if(!this.active&&!this.released){this.active=true;Drupal.tabbingManager.activate(this);$(document).trigger('drupalTabbingContextActivated',this);}},deactivate(){if(this.active){this.active=false;Drupal.tabbingManager.deactivate(this);$(document).trigger('drupalTabbingContextDeactivated',this);}}});if(Drupal.tabbingManager)return;Drupal.tabbingManager=new TabbingManager();})(jQuery,Drupal,window.tabbable);;
(function($,Drupal,Backbone){const strings={tabbingReleased:Drupal.t('Tabbing is no longer constrained by the Contextual module.'),tabbingConstrained:Drupal.t('Tabbing is constrained to a set of @contextualsCount and the edit mode toggle.'),pressEsc:Drupal.t('Press the esc key to exit.')};function initContextualToolbar(context){if(!Drupal.contextual||!Drupal.contextual.collection)return;const contextualToolbar=Drupal.contextualToolbar;contextualToolbar.model=new contextualToolbar.StateModel({isViewing:document.querySelector('body .contextual-region')===null||localStorage.getItem('Drupal.contextualToolbar.isViewing')!=='false'},{contextualCollection:Drupal.contextual.collection});const viewOptions={el:$('.toolbar .toolbar-bar .contextual-toolbar-tab'),model:contextualToolbar.model,strings};new contextualToolbar.VisualView(viewOptions);new contextualToolbar.AuralView(viewOptions);}Drupal.behaviors.contextualToolbar={attach(context){if(once('contextualToolbar-init','body').length)initContextualToolbar(context);}};Drupal.contextualToolbar={model:null};})(jQuery,Drupal,Backbone);;
(function(Drupal,Backbone){Drupal.contextualToolbar.StateModel=Backbone.Model.extend({defaults:{isViewing:true,isVisible:false,contextualCount:0,tabbingContext:null},initialize(attrs,options){this.listenTo(options.contextualCollection,'reset remove add',this.countContextualLinks);this.listenTo(options.contextualCollection,'add',this.lockNewContextualLinks);this.listenTo(this,'change:contextualCount',this.updateVisibility);this.listenTo(this,'change:isViewing',(model,isViewing)=>{options.contextualCollection.each((contextualModel)=>{contextualModel.set('isLocked',!isViewing);});});},countContextualLinks(contextualModel,contextualCollection){this.set('contextualCount',contextualCollection.length);},lockNewContextualLinks(contextualModel,contextualCollection){if(!this.get('isViewing'))contextualModel.set('isLocked',true);},updateVisibility(){this.set('isVisible',this.get('contextualCount')>0);}});})(Drupal,Backbone);;
(function($,Drupal,Backbone,_){Drupal.contextualToolbar.AuralView=Backbone.View.extend({announcedOnce:false,initialize(options){this.options=options;this.listenTo(this.model,'change',this.render);this.listenTo(this.model,'change:isViewing',this.manageTabbing);$(document).on('keyup',_.bind(this.onKeypress,this));this.manageTabbing();},render(){this.$el.find('button').attr('aria-pressed',!this.model.get('isViewing'));return this;},manageTabbing(){let tabbingContext=this.model.get('tabbingContext');if(tabbingContext){if(tabbingContext.active)Drupal.announce(this.options.strings.tabbingReleased);tabbingContext.release();}if(!this.model.get('isViewing')){tabbingContext=Drupal.tabbingManager.constrain($('.contextual-toolbar-tab, .contextual'));this.model.set('tabbingContext',tabbingContext);this.announceTabbingConstraint();this.announcedOnce=true;}},announceTabbingConstraint(){const strings=this.options.strings;Drupal.announce(Drupal.formatString(strings.tabbingConstrained,{'@contextualsCount':Drupal.formatPlural(Drupal.contextual.collection.length,'@count contextual link','@count contextual links')}));Drupal.announce(strings.pressEsc);},onKeypress(event){if(!this.announcedOnce&&event.keyCode===9&&!this.model.get('isViewing')){this.announceTabbingConstraint();this.announcedOnce=true;}if(event.keyCode===27)this.model.set('isViewing',true);}});})(jQuery,Drupal,Backbone,_);;
(function(Drupal,Backbone){Drupal.contextualToolbar.VisualView=Backbone.View.extend({events(){const touchEndToClick=function(event){event.preventDefault();event.target.click();};return {click(){this.model.set('isViewing',!this.model.get('isViewing'));},touchend:touchEndToClick};},initialize(){this.listenTo(this.model,'change',this.render);this.listenTo(this.model,'change:isViewing',this.persist);},render(){this.$el.toggleClass('hidden',!this.model.get('isVisible'));this.$el.find('button').toggleClass('is-active',!this.model.get('isViewing'));return this;},persist(model,isViewing){if(!isViewing)localStorage.setItem('Drupal.contextualToolbar.isViewing','false');else localStorage.removeItem('Drupal.contextualToolbar.isViewing');}});})(Drupal,Backbone);;
/* @license GPL-2.0-or-later https://raw.githubusercontent.com/ckeditor/ckeditor5/v47.6.0/LICENSE.md */
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Align center":"Align center","Align left":"Align left","Align right":"Align right",Justify:"Justify","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Alignment:()=>p,AlignmentCommand:()=>c,AlignmentEditing:()=>u,AlignmentUI:()=>f,_ALIGNMENT_SUPPORTED_OPTIONS:()=>o,_isAlignmentSupported:()=>a,_isDefaultAlignment:()=>r,_normalizeAlignmentOptions:()=>l});var e=n(782),t=n(584);const o=["left","right","center","justify"];function a(e){return o.includes(e)}function r(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function l(e){const n=e.map(e=>{let t;return t="string"==typeof e?{name:e}:e,t}).filter(e=>{const n=o.includes(e.name);return n||(0,t.logWarning)("alignment-config-name-not-recognized",{option:e}),n}),i=n.filter(e=>Boolean(e.className)).length;if(i&&i<n.length)throw new t.CKEditorError("alignment-config-classnames-are-missing",{configuredOptions:e});return n.forEach((n,i,o)=>{const a=o.slice(i+1);if(a.some(e=>e.name==n.name))throw new t.CKEditorError("alignment-config-name-already-defined",{option:n,configuredOptions:e});if(n.className){if(a.some(e=>e.className==n.className))throw new t.CKEditorError("alignment-config-classname-already-defined",{option:n,configuredOptions:e})}}),n}const s="alignment";class c extends e.Command{refresh(){const e=this.editor.locale,n=(0,t.first)(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(n)&&this._canBeAligned(n),this.isEnabled&&n.hasAttribute("alignment")?this.value=n.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,n=t.locale,i=t.model,o=i.document,a=e.value;i.change(e=>{const t=Array.from(o.selection.getSelectedBlocks()).filter(e=>this._canBeAligned(e)),i=t[0].getAttribute("alignment");r(a,n)||i===a||!a?function(e,t){for(const n of e)t.removeAttribute(s,n)}(t,e):function(e,t,n){for(const i of e)t.setAttribute(s,n,i)}(t,e,a)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,s)}}class u extends e.Plugin{static get pluginName(){return"AlignmentEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("alignment",{options:o.map(e=>({name:e}))})}init(){const e=this.editor,t=e.locale,n=e.model.schema,i=l(e.config.get("alignment.options")).filter(e=>a(e.name)&&!r(e.name,t)),o=i.some(e=>!!e.className);n.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),o?e.conversion.attributeToAttribute(function(e){const t={};for(const n of e)t[n.name]={key:"class",value:n.className};const n={model:{key:"alignment",values:e.map(e=>e.name)},view:t};return n}(i)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:n}of e)t[n]={key:"style",value:{"text-align":n}};const n={model:{key:"alignment",values:e.map(e=>e.name)},view:t};return n}(i));const s=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return t}(i);for(const t of s)e.conversion.for("upcast").attributeToAttribute(t);const u=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return t}(i);for(const t of u)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new c(e))}}var g=n(311),d=n(355);const m=(()=>new Map([["left",d.IconAlignLeft],["right",d.IconAlignRight],["center",d.IconAlignCenter],["justify",d.IconAlignJustify]]))();class f extends e.Plugin{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}static get isOfficialPlugin(){return!0}init(){const e=l(this.editor.config.get("alignment.options"));e.map(e=>e.name).filter(a).forEach(e=>this._addButton(e)),this._addToolbarDropdown(e),this._addMenuBarMenu(e)}_addButton(e){this.editor.ui.componentFactory.add(`alignment:${e}`,t=>this._createButton(t,e))}_createButton(e,t,n={}){const i=this.editor,o=i.commands.get("alignment"),a=new g.ButtonView(e);return a.set({label:this.localizedOptionTitles[t],icon:m.get(t),tooltip:!0,isToggleable:!0,...n}),a.bind("isEnabled").to(o),a.bind("isOn").to(o,"value",e=>e===t),this.listenTo(a,"execute",()=>{i.execute("alignment",{value:t}),i.editing.view.focus()}),a}_addToolbarDropdown(e){const t=this.editor;t.ui.componentFactory.add("alignment",n=>{const i=(0,g.createDropdown)(n),o="rtl"===n.uiLanguageDirection?"w":"e",a=n.t;(0,g.addToolbarToDropdown)(i,()=>e.map(e=>this._createButton(n,e.name,{tooltipPosition:o})),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:a("Text alignment toolbar")}),i.buttonView.set({label:a("Text alignment"),tooltip:!0}),i.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const r="rtl"===n.contentLanguageDirection?m.get("right"):m.get("left"),l=t.commands.get("alignment");return i.buttonView.bind("icon").to(l,"value",e=>m.get(e)||r),i.bind("isEnabled").to(l,"isEnabled"),this.listenTo(i,"execute",()=>{t.editing.view.focus()}),i})}_addMenuBarMenu(e){const t=this.editor;t.ui.componentFactory.add("menuBar:alignment",n=>{const i=t.commands.get("alignment"),o=n.t,a=new g.MenuBarMenuView(n),r=new g.MenuBarMenuListView(n);a.bind("isEnabled").to(i),r.set({ariaLabel:o("Text alignment"),role:"menu"}),a.buttonView.set({label:o("Text alignment")});for(const o of e){const e=new g.MenuBarMenuListItemView(n,a),l=new g.MenuBarMenuListItemButtonView(n);l.delegate("execute").to(a),l.set({label:this.localizedOptionTitles[o.name],icon:m.get(o.name),role:"menuitemcheckbox",isToggleable:!0}),l.on("execute",()=>{t.execute("alignment",{value:o.name}),t.editing.view.focus()}),l.bind("isOn").to(i,"value",e=>e===o.name),l.bind("isEnabled").to(i,"isEnabled"),e.children.add(l),r.items.add(e)}return a.panelView.children.add(r),a})}}class p extends e.Plugin{static get requires(){return[u,f]}static get pluginName(){return"Alignment"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).alignment=i})();;
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Revert autoformatting action":"Revert autoformatting action"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},834:(t,e,o)=>{t.exports=o(237)("./src/typing.js")}},e={};function o(i){var s=e[i];if(void 0!==s)return s.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{Autoformat:()=>c,blockAutoformatEditing:()=>r,inlineAutoformatEditing:()=>a});var t=o(782),e=o(834),s=o(783),n=o(584);function r(t,e,o,i){let r,a=null;"function"==typeof i?r=i:(a=t.commands.get(i),r=()=>{t.execute(i)}),t.model.document.on("change:data",(d,c)=>{if(a&&!a.isEnabled||!e.isEnabled)return;const l=(0,n.first)(t.model.document.selection.getRanges());if(!l.isCollapsed)return;if(c.isUndo||!c.isLocal)return;const u=Array.from(t.model.document.differ.getChanges()),g=u[0];if(1!=u.length||"insert"!==g.type||"$text"!=g.name||1!=g.length)return;const h=g.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof i&&!["numberedList","bulletedList","todoList"].includes(i))return;if(a&&!0===a.value)return;const m=h.getChild(0),f=t.model.createRangeOn(m);if(!f.containsRange(l)&&!l.end.isEqual(f.end))return;const p=o.exec(m.data.substr(0,l.end.offset));p&&t.model.enqueueChange(e=>{const o=t.model.document.selection,i=e.createPositionAt(h,0),n=e.createPositionAt(h,p[0].length),a=new s.ModelLiveRange(i,n);if(!1!==r({match:p})){const t=Array.from(o.getAttributes());e.remove(a);const i=o.getFirstRange(),n=e.createRangeIn(h);!h.isEmpty||n.isEqual(i)||n.containsRange(i,!0)||e.remove(h),function(t,e,o){const i=t.model.schema,n=e.getFirstPosition();let r=new s.ModelSchemaContext(n);i.checkChild(r,"$text")&&(r=r.push("$text"));for(const[e,s]of o)i.checkAttribute(r,e)&&t.setSelectionAttribute(e,s)}(e,o,t)}a.detach(),t.model.enqueueChange(()=>{t.plugins.get("Delete").requestUndoOnBackspace()})})})}function a(t,e,o,i){let s,n;o instanceof RegExp?s=o:n=o,n=n||(t=>{let e;const o=[],i=[];for(;null!==(e=s.exec(t))&&!(e&&e.length<4);){let{index:t,1:s,2:n,3:r}=e;const a=s+n+r;t+=e[0].length-a.length;const d=[t,t+s.length],c=[t+s.length+n.length,t+s.length+n.length+r.length];o.push(d),o.push(c),i.push([t+s.length,t+s.length+n.length])}return{remove:o,format:i}}),t.model.document.on("change:data",(o,s)=>{if(s.isUndo||!s.isLocal||!e.isEnabled)return;const r=t.model,a=r.document.selection;if(!a.isCollapsed)return;const c=Array.from(r.document.differ.getChanges()),l=c[0];if(1!=c.length||"insert"!==l.type||"$text"!=l.name||1!=l.length)return;const u=a.focus,g=u.parent,{text:h,range:m}=function(t,e){let o=t.start;const i=Array.from(t.getItems()).reduce((t,i)=>!i.is("$text")&&!i.is("$textProxy")||i.getAttribute("code")?(o=e.createPositionAfter(i),""):t+i.data,"");return{text:i,range:e.createRange(o,t.end)}}(r.createRange(r.createPositionAt(g,0),u),r),f=n(h),p=d(m.start,f.format,r),b=d(m.start,f.remove,r);p.length&&b.length&&r.enqueueChange(e=>{if(!1!==i(e,p)){for(const t of b.reverse())e.remove(t);r.enqueueChange(()=>{t.plugins.get("Delete").requestUndoOnBackspace()})}})})}function d(t,e,o){return e.filter(t=>void 0!==t[0]&&void 0!==t[1]).map(e=>o.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1])))}class c extends t.Plugin{static get requires(){return[e.Delete]}static get pluginName(){return"Autoformat"}static get isOfficialPlugin(){return!0}afterInit(){const t=this.editor,e=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){const t=this.editor.commands;t.get("bulletedList")&&r(this.editor,this,/^[*-]\s$/,"bulletedList"),t.get("numberedList")&&r(this.editor,this,/^1[.|)]\s$/,"numberedList"),t.get("todoList")&&r(this.editor,this,/^\[\s?\]\s$/,"todoList"),t.get("checkTodoList")&&r(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get("bold")){const t=l(this.editor,"bold");a(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),a(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(t.get("italic")){const t=l(this.editor,"italic");a(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),a(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(t.get("code")){const t=l(this.editor,"code");a(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(t.get("strikethrough")){const t=l(this.editor,"strikethrough");a(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get("heading");t&&t.modelElements.filter(t=>t.match(/^heading[1-6]$/)).forEach(e=>{const o=e[7],i=new RegExp(`^(#{${o}})\\s$`);r(this.editor,this,i,()=>{if(!t.isEnabled||t.value===e)return!1;this.editor.execute("heading",{value:e})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&r(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const t=this.editor,e=t.model.document.selection;t.commands.get("codeBlock")&&r(t,this,/^```$/,()=>{if(e.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&r(this.editor,this,/^---$/,"horizontalLine")}}function l(t,e){return(o,i)=>{if(!t.commands.get(e).isEnabled)return!1;const s=t.model.schema.getValidRanges(i,e);for(const t of s)o.setAttribute(e,!0,t);o.removeSelectionAttribute(e)}}})(),(window.CKEditor5=window.CKEditor5||{}).autoformat=i})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Block quote":"Block quote"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(s[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);n&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},355:(e,t,o)=>{e.exports=o(237)("./src/icons.js")},424:e=>{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},507:(e,t,o)=>{e.exports=o(237)("./src/enter.js")},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},646:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(792),r=o.n(n),i=o(305),s=o.n(i)()(r());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}",""]);const c=s},719:e=>{"use strict";var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var i={},s=[],c=0;c<e.length;c++){var a=e[c],l=n.base?a[0]+n.base:a[0],u=i[l]||0,d="".concat(l," ").concat(u);i[l]=u+1;var f=o(d),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var m=r(p,n);n.byIndex=c,t.splice(c,0,{identifier:d,updater:m,references:1})}s.push(d)}return s}function r(e,t){var o=t.domAPI(t);o.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,r){var i=n(e=e||[],r=r||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var c=o(i[s]);t[c].references--}for(var a=n(e,r),l=0;l<i.length;l++){var u=o(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=a}}},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},834:(e,t,o)=>{e.exports=o(237)("./src/typing.js")},863:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function n(e,t,n,r){var i;if(n)i="";else{i="",r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,s&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,i);else{var c=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(c,a[t]):e.appendChild(c)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,o=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){n(o,t,!1,e)},remove:function(e){n(o,t,!0,e)}}}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},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,{BlockQuote:()=>S,BlockQuoteCommand:()=>s,BlockQuoteEditing:()=>u,BlockQuoteUI:()=>B});var e=o(782),t=o(507),r=o(834),i=o(584);class s extends e.Command{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.schema,n=t.document.selection,r=Array.from(n.getSelectedBlocks()),i=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(i){const t=r.filter(e=>c(e)||l(o,e));this._applyQuote(e,t)}else this._removeQuote(e,r.filter(c))})}_getValue(){const e=this.editor.model.document.selection,t=(0,i.first)(e.getSelectedBlocks());return!(!t||!c(t))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,o=(0,i.first)(e.getSelectedBlocks());return!!o&&l(t,o)}_removeQuote(e,t){a(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const o=e.createPositionBefore(t.start.parent);return void e.move(t,o)}t.end.isAtEnd||e.split(t.end);const o=e.createPositionAfter(t.end.parent);e.move(t,o)})}_applyQuote(e,t){const o=[];a(e,t).reverse().forEach(t=>{let n=c(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),o.push(n)}),o.reverse().reduce((t,o)=>t.nextSibling==o?(e.merge(e.createPositionAfter(t)),t):o)}}function c(e){return"blockQuote"==e.parent.name?e.parent:null}function a(e,t){let o,n=0;const r=[];for(;n<t.length;){const i=t[n],s=t[n+1];o||(o=e.createPositionBefore(i)),s&&i.nextSibling==s||(r.push(e.createRange(o,e.createPositionAfter(i))),o=null),n++}return r}function l(e,t){const o=e.checkChild(t.parent,"blockQuote"),n=e.checkChild(["$root","blockQuote"],t);return o&&n}class u extends e.Plugin{static get pluginName(){return"BlockQuoteEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[t.Enter,r.Delete]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new s(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(o=>{const n=e.model.document.differ.getChanges();for(const e of n)if("insert"==e.type){const n=e.position.nodeAfter;if(!n)continue;if(n.is("element","blockQuote")&&n.isEmpty)return o.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return o.unwrap(n),!0;if(n.is("element")){const e=o.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(o.createPositionBefore(n),n))return o.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return o.remove(t),!0}return!1});const o=this.editor.editing.view.document,n=e.model.document.selection,r=e.commands.get("blockQuote");this.listenTo(o,"enter",(t,o)=>{if(!n.isCollapsed||!r.value)return;n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())},{context:"blockquote"}),this.listenTo(o,"delete",(t,o)=>{if("backward"!=o.direction||!n.isCollapsed||!r.value)return;const i=n.getLastPosition().parent;i.isEmpty&&!i.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())},{context:"blockquote"})}}var d=o(355),f=o(311),p=o(719),m=o.n(p),h=o(863),v=o.n(h),g=o(424),b=o.n(g),k=o(517),y=o.n(k),x=o(163),Q=o.n(x),w=o(646),E={attributes:{"data-cke":!0}};E.setAttributes=y(),E.insert=b().bind(null,"head"),E.domAPI=v(),E.insertStyleElement=Q();m()(w.A,E);w.A&&w.A.locals&&w.A.locals;class B extends e.Plugin{static get pluginName(){return"BlockQuoteUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("blockQuote",()=>{const e=this._createButton(f.ButtonView);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:blockQuote",()=>{const e=this._createButton(f.MenuBarMenuListItemButtonView);return e.set({role:"menuitemcheckbox"}),e})}_createButton(e){const t=this.editor,o=t.locale,n=t.commands.get("blockQuote"),r=new e(t.locale),i=o.t;return r.set({label:i("Block quote"),icon:d.IconQuote,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value"),this.listenTo(r,"execute",()=>{t.execute("blockQuote"),t.editing.view.focus()}),r}}class S extends e.Plugin{static get requires(){return[u,B]}static get pluginName(){return"BlockQuote"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).blockQuote=n})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Code block":"Code block","Entering %0 code snippet":"Entering %0 code snippet","Entering code snippet":"Entering code snippet","Insert code block":"Insert code block","Leaving %0 code snippet":"Leaving %0 code snippet","Leaving code snippet":"Leaving code snippet","Plain text":"Plain text"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},281:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(792),i=n.n(o),r=n(305),c=n.n(r)()(i());c.push([e.id,".ck-content pre{background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;color:#353535;direction:ltr;font-style:normal;min-width:200px;padding:1em;tab-size:4;text-align:left;white-space:pre-wrap}.ck-content pre code{background:unset;border-radius:0;padding:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{background:var(--ck-color-code-block-label-background);color:#fff;font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);right:10px;top:-1px;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}",""]);const s=c},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var c={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(c[a]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&c[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},424:e=>{"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},507:(e,t,n)=>{e.exports=n(237)("./src/enter.js")},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},719:e=>{"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},c=[],s=0;s<e.length;s++){var a=e[s],l=o.base?a[0]+o.base:a[0],d=r[l]||0,u="".concat(l," ").concat(d);r[l]=d+1;var g=n(u),f={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==g)t[g].references++,t[g].updater(f);else{var p=i(f,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:p,references:1})}c.push(u)}return c}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var c=0;c<r.length;c++){var s=n(r[c]);t[s].references--}for(var a=o(e,i),l=0;l<r.length;l++){var d=n(r[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=a}}},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},863:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function o(e,t,o,i){var r;if(o)r="";else{r="",i.supports&&(r+="@supports (".concat(i.supports,") {")),i.media&&(r+="@media ".concat(i.media," {"));var c=void 0!==i.layer;c&&(r+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),r+=i.css,c&&(r+="}"),i.media&&(r+="}"),i.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,r);else{var s=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){o(n,t,!1,e)},remove:function(e){o(n,t,!0,e)}}}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{CodeBlock:()=>K,CodeBlockCommand:()=>h,CodeBlockEditing:()=>_,CodeBlockUI:()=>z,IndentCodeBlockCommand:()=>b,OutdentCodeBlockCommand:()=>k,_canBeCodeBlock:()=>f,_dataViewToModelCodeBlockInsertion:()=>w,_dataViewToModelCodeBlockOrphanNodeConsumer:()=>S,_dataViewToModelCodeBlockTextNewlinesInsertion:()=>x,_getCodeBlockAriaAnnouncement:()=>p,_getCodeBlockIndentOutdentPositions:()=>u,_getCodeBlockLeadingWhiteSpaces:()=>l,_getCodeBlockPropertyAssociation:()=>a,_getCodeBlockTextNodeAtLineStart:()=>m,_getNormalizedAndLocalizedCodeBlockLanguageDefinitions:()=>s,_isModelSelectionInCodeBlock:()=>g,_modelToDataViewCodeBlockSoftBreakInsertion:()=>C,_modelToViewCodeBlockInsertion:()=>B,_rawCodeBlockSnippetTextToViewDocumentFragment:()=>d});var e=n(782),t=n(507),i=n(783),r=n(331),c=n(584);function s(e){const t=e.t,n=e.config.get("codeBlock.languages");for(const e of n)"Plain text"===e.label&&(e.label=t("Plain text")),void 0===e.class&&(e.class=`language-${e.language}`);return n}function a(e,t,n){const o={};for(const i of e)if("class"===t){o[i[t].split(" ").shift()]=i[n]}else o[i[t]]=i[n];return o}function l(e){return e.data.match(/^(\s*)/)[0]}function d(e,t){const n=e.createDocumentFragment(),o=t.split("\n"),i=o.reduce((t,n,i)=>(t.push(n),i<o.length-1&&t.push(e.createElement("br")),t),[]);return e.appendChild(i,n),n}function u(e){const t=e.document.selection,n=[];if(t.isCollapsed)return[t.anchor];const o=t.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(const{item:t}of o){let o=t.is("$textProxy")?t.textNode:t;const i=o.parent;if(!i.is("element","codeBlock")||o.is("element","softBreak"))continue;for(;o.previousSibling&&!o.previousSibling.is("element","softBreak");)o=o.previousSibling;const r=o.is("$text")?o.startOffset+l(o).length:o.startOffset,c=e.createPositionAt(i,r);n.every(e=>!e.isEqual(c))&&n.push(c)}return n}function g(e){const t=(0,c.first)(e.getSelectedBlocks());return!!t&&t.is("element","codeBlock")}function f(e,t){return!t.is("rootElement")&&!e.isLimit(t)&&e.checkChild(t.parent,"codeBlock")}function p(e,t,n,o){const i=a(t,"language","label"),r=n.getAttribute("language");if(r in i){const t=i[r];return e("enter"===o?"Entering %0 code snippet":"Leaving %0 code snippet",t)}return e("enter"===o?"Entering code snippet":"Leaving code snippet")}function m(e,t){for(e.textNode&&(e=t.createPositionBefore(e.textNode));e.nodeBefore&&!e.nodeBefore.is("element","softBreak");)e=t.createPositionBefore(e.nodeBefore);const n=e.nodeAfter;return n&&n.is("$text")?n:null}class h extends e.Command{_lastLanguage;constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor,n=t.model,o=n.document.selection,i=s(t)[0],r=Array.from(o.getSelectedBlocks()),c=null==e.forceValue?!this.value:e.forceValue,a=function(e,t,n){if(e.language)return e.language;if(e.usePreviousLanguageChoice&&t)return t;return n}(e,this._lastLanguage,i.language);n.change(e=>{c?this._applyCodeBlock(e,r,a):this._removeCodeBlock(e,r)})}_getValue(){const e=this.editor.model.document.selection,t=(0,c.first)(e.getSelectedBlocks());return!!!!t?.is("element","codeBlock")&&t.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=(0,c.first)(e.getSelectedBlocks());return!!n&&f(t,n)}_applyCodeBlock(e,t,n){this._lastLanguage=n;const o=this.editor.model.schema,i=t.filter(e=>f(o,e));for(const t of i)e.rename(t,"codeBlock"),e.setAttribute("language",n,t),o.removeDisallowedAttributes([t],e),Array.from(t.getChildren()).filter(e=>!o.checkChild(t,e)).forEach(t=>e.remove(t));i.reverse().forEach((t,n)=>{const o=i[n+1];t.previousSibling===o&&(e.appendElement("softBreak",o),e.merge(e.createPositionBefore(t)))})}_removeCodeBlock(e,t){const n=t.filter(e=>e.is("element","codeBlock"));for(const t of n){const n=e.createRangeOn(t);for(const t of Array.from(n.getItems()).reverse())if(t.is("element","softBreak")&&t.parent.is("element","codeBlock")){const{position:n}=e.split(e.createPositionBefore(t)),o=n.nodeAfter;e.rename(o,"paragraph"),e.removeAttribute("language",o),e.remove(t)}e.rename(t,"paragraph"),e.removeAttribute("language",t)}}}class b extends e.Command{_indentSequence;constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change(t=>{const n=u(e);for(const o of n){const n=t.createText(this._indentSequence);e.insertContent(n,o)}})}_checkEnabled(){return!!this._indentSequence&&g(this.editor.model.document.selection)}}class k extends e.Command{_indentSequence;constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change(()=>{const t=u(e);for(const n of t){const t=v(e,n,this._indentSequence);t&&e.deleteContent(e.createSelection(t))}})}_checkEnabled(){if(!this._indentSequence)return!1;const e=this.editor.model;return!!g(e.document.selection)&&u(e).some(t=>v(e,t,this._indentSequence))}}function v(e,t,n){const o=m(t,e);if(!o)return null;const i=l(o),r=i.lastIndexOf(n);if(r+n.length!==i.length)return null;if(-1===r)return null;const{parent:c,startOffset:s}=o;return e.createRange(e.createPositionAt(c,s+r),e.createPositionAt(c,s+r+n.length))}function B(e,t,n=!1){const o=a(t,"language","class"),i=a(t,"language","label");return(t,r,c)=>{const{writer:s,mapper:a,consumable:l}=c;if(!l.consume(r.item,"insert"))return;const d=r.item.getAttribute("language"),u=a.toViewPosition(e.createPositionBefore(r.item)),g={};n&&(g["data-language"]=i[d],g.spellcheck="false");const f=o[d]?{class:o[d]}:void 0,p=s.createContainerElement("code",f),m=s.createContainerElement("pre",g,p);s.insert(u,m),a.bindElements(r.item,p)}}function C(e){return(t,n,o)=>{if("codeBlock"!==n.item.parent.name)return;const{writer:i,mapper:r,consumable:c}=o;if(!c.consume(n.item,"insert"))return;const s=r.toViewPosition(e.createPositionBefore(n.item));i.insert(s,i.createText("\n"))}}function w(e,t){const n=a(t,"class","language"),o=t[0].language;return(e,t,i)=>{const r=t.viewItem,c=r.parent;if(!c||!c.is("element","pre"))return;if(t.modelCursor.findAncestor("codeBlock"))return;const{consumable:s,writer:a}=i;if(!s.test(r,{name:!0}))return;const l=a.createElement("codeBlock"),d=[...r.getClassNames()];d.length||d.push("");for(const e of d){const t=n[e];if(t){s.consume(r,{classes:[e]}),a.setAttribute("language",t,l);break}}l.hasAttribute("language")||a.setAttribute("language",o,l),i.convertChildren(r,l),i.safeInsert(l,t.modelCursor)&&(s.consume(r,{name:!0}),i.updateConversionResult(l,t))}}function x(){return(e,t,{consumable:n,writer:o})=>{let i=t.modelCursor;if(!n.test(t.viewItem))return;if(!i.findAncestor("codeBlock"))return;n.consume(t.viewItem);const r=t.viewItem.data.split("\n").map(e=>o.createText(e)),c=r[r.length-1];for(const e of r)if(o.insert(e,i),i=i.getShiftedBy(e.offsetSize),e!==c){const e=o.createElement("softBreak");o.insert(e,i),i=o.createPositionAfter(e)}t.modelRange=o.createRange(t.modelCursor,i),t.modelCursor=i}}function S(){return(e,t,{consumable:n})=>{const o=t.viewItem;if(o.findAncestor("pre"))return;const i=Array.from(o.getChildren()),r=i.find(e=>e.is("element","code"));if(r)for(const e of i)e!==r&&e.is("$text")&&n.consume(e,{name:!0})}}const A="paragraph";class _ extends e.Plugin{static get pluginName(){return"CodeBlockEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[t.ShiftEnter]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"go",label:"Go"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const e=this.editor,t=e.model.schema,n=e.model,o=e.editing.view,c=s(e);e.commands.add("codeBlock",new h(e)),e.commands.add("indentCodeBlock",new b(e)),e.commands.add("outdentCodeBlock",new k(e)),this.listenTo(o.document,"tab",(t,n)=>{const o=n.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(o).isEnabled&&(e.execute(o),n.stopPropagation(),n.preventDefault(),t.stop())},{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",disallowChildren:"$inlineObject",allowAttributes:["language"],allowAttributesOf:"$listItem",isBlock:!0}),t.addAttributeCheck((e,n)=>{const o=e.getItem(e.length-2);if(t.getAttributeProperties(n).isFormatting&&o&&"codeBlock"==o.name)return!1}),e.editing.downcastDispatcher.on("insert:codeBlock",B(n,c,!0)),e.data.downcastDispatcher.on("insert:codeBlock",B(n,c)),e.data.downcastDispatcher.on("insert:softBreak",C(n),{priority:"high"}),e.data.upcastDispatcher.on("element:code",w(0,c)),e.data.upcastDispatcher.on("text",(e,t,{consumable:n,writer:o})=>{let i=t.modelCursor;if(!n.test(t.viewItem))return;if(!i.findAncestor("codeBlock"))return;n.consume(t.viewItem);const r=t.viewItem.data.split("\n").map(e=>o.createText(e)),c=r[r.length-1];for(const e of r)if(o.insert(e,i),i=i.getShiftedBy(e.offsetSize),e!==c){const e=o.createElement("softBreak");o.insert(e,i),i=o.createPositionAfter(e)}t.modelRange=o.createRange(t.modelCursor,i),t.modelCursor=i}),e.data.upcastDispatcher.on("element:pre",S(),{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,o)=>{let r=n.createRange(n.document.selection.anchor);if(o.targetRanges&&(r=e.editing.mapper.toModelRange(o.targetRanges[0])),!r.start.parent.is("element","codeBlock"))return;const c=o.dataTransfer.getData("text/plain"),s=new i.ViewUpcastWriter(e.editing.view.document);o.content=d(s,c)}),e.plugins.has("ClipboardPipeline")&&e.plugins.get(r.ClipboardPipeline).on("contentInsertion",(n,o)=>{const i=e.model,r=i.document.selection;r.anchor.parent.is("element","codeBlock")&&i.change(e=>{const n=e.createRangeIn(o.content);for(const o of[...n.getItems()])o.is("node")&&!t.checkChild(r.anchor,o)&&e.remove(o)})}),this.listenTo(n,"getSelectedContent",(e,[o])=>{const i=o.anchor;!o.isCollapsed&&i.parent.is("element","codeBlock")&&i.hasSameParentAs(o.focus)&&n.change(n=>{const r=e.return;if(i.parent.is("element")&&(r.childCount>1||o.containsEntireContent(i.parent))){const t=n.createElement("codeBlock",i.parent.getAttributes());n.append(r,t);const o=n.createDocumentFragment();return n.append(t,o),void(e.return=o)}const c=r.getChild(0);t.checkAttribute(c,"code")&&n.setAttribute("code",!0,c)})})}afterInit(){const e=this.editor,t=e.commands,n=t.get("indent"),o=t.get("outdent");n&&n.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),o&&o.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",(t,n)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(e,t){const n=e.model,o=n.document,i=e.editing.view,r=o.selection.getLastPosition(),c=r.nodeAfter;if(t||!o.selection.isCollapsed||!r.isAtStart)return!1;if(!P(c))return!1;return e.model.change(t=>{e.execute("enter");const n=o.selection.anchor.parent.previousSibling;t.rename(n,A),t.setSelection(n,"in"),e.model.schema.removeDisallowedAttributes([n],t),t.remove(c)}),i.scrollToTheSelection(),!0}(e,n.isSoft)||function(e,t){const n=e.model,o=n.document,i=e.editing.view,r=o.selection.getLastPosition(),c=r.nodeBefore;let s;if(t||!o.selection.isCollapsed||!r.isAtEnd||!c||!c.previousSibling)return!1;if(P(c)&&P(c.previousSibling))s=n.createRange(n.createPositionBefore(c.previousSibling),n.createPositionAfter(c));else if(y(c)&&P(c.previousSibling)&&P(c.previousSibling.previousSibling))s=n.createRange(n.createPositionBefore(c.previousSibling.previousSibling),n.createPositionAfter(c));else{if(!(y(c)&&P(c.previousSibling)&&y(c.previousSibling.previousSibling)&&c.previousSibling.previousSibling&&P(c.previousSibling.previousSibling.previousSibling)))return!1;s=n.createRange(n.createPositionBefore(c.previousSibling.previousSibling.previousSibling),n.createPositionAfter(c))}return e.model.change(t=>{t.remove(s),e.execute("enter");const n=o.selection.anchor.parent;t.rename(n,A),e.model.schema.removeDisallowedAttributes([n],t)}),i.scrollToTheSelection(),!0}(e,n.isSoft)||function(e){const t=e.model,n=t.document;let o;const i=m(n.selection.getLastPosition(),t);i&&i.is("$text")&&(o=l(i));e.model.change(t=>{e.execute("shiftEnter"),o&&t.insertText(o,n.selection.anchor)})}(e),n.preventDefault(),t.stop())},{context:"pre"}),this._initAriaAnnouncements()}_initAriaAnnouncements(){const{model:e,ui:t,t:n}=this.editor,o=s(this.editor);let i=null;e.document.selection.on("change:range",()=>{const r=e.document.selection.focus.parent;t&&i!==r&&r.is("element")&&(i&&i.is("element","codeBlock")&&t.ariaLiveAnnouncer.announce(p(n,o,i,"leave")),r.is("element","codeBlock")&&t.ariaLiveAnnouncer.announce(p(n,o,r,"enter")),i=r)})}}function y(e){return e&&e.is("$text")&&!e.data.match(/\S/)}function P(e){return e&&e.is("element","softBreak")}var E=n(311),I=n(355),L=n(719),T=n.n(L),O=n(863),D=n.n(O),M=n(424),V=n.n(M),R=n(517),j=n.n(R),N=n(163),q=n.n(N),$=n(281),F={attributes:{"data-cke":!0}};F.setAttributes=j(),F.insert=V().bind(null,"head"),F.domAPI=D(),F.insertStyleElement=q();T()($.A,F);$.A&&$.A.locals&&$.A.locals;class z extends e.Plugin{static get pluginName(){return"CodeBlockUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=e.ui.componentFactory,o=s(e),i=this._getLanguageListItemDefinitions(o),r=e.commands.get("codeBlock");n.add("codeBlock",n=>{const o=(0,E.createDropdown)(n,E.SplitButtonView),c=o.buttonView,s=t("Insert code block");return c.set({label:s,tooltip:!0,icon:I.IconCodeBlock,isToggleable:!0}),c.bind("isOn").to(r,"value",e=>!!e),c.on("execute",()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!0}),e.editing.view.focus()}),o.on("execute",t=>{e.execute("codeBlock",{language:t.source._codeBlockLanguage,forceValue:!0}),e.editing.view.focus()}),o.class="ck-code-block-dropdown",o.bind("isEnabled").to(r),(0,E.addListToDropdown)(o,i,{role:"menu",ariaLabel:s}),o}),n.add("menuBar:codeBlock",n=>{const o=new E.MenuBarMenuView(n);o.buttonView.set({role:"menuitem",label:t("Code block"),icon:I.IconCodeBlock}),o.bind("isEnabled").to(r);const c=new E.MenuBarMenuListView(n);c.set({ariaLabel:t("Insert code block")});for(const t of i){const i=new E.MenuBarMenuListItemView(n,o),s=new E.MenuBarMenuListItemButtonView(n);s.bind(...Object.keys(t.model)).to(t.model),s.set({isToggleable:!0,role:"menuitemcheckbox"}),s.delegate("execute").to(o),s.on("execute",()=>{e.execute("codeBlock",{language:t.model._codeBlockLanguage,forceValue:r.value!=t.model._codeBlockLanguage}),e.editing.view.focus()}),i.children.add(s),c.items.add(i)}return o.panelView.children.add(c),o})}_getLanguageListItemDefinitions(e){const t=this.editor.commands.get("codeBlock"),n=new c.Collection;for(const o of e){const e={type:"button",model:new E.UIModel({_codeBlockLanguage:o.language,label:o.label,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",t=>t===e.model._codeBlockLanguage),n.add(e)}return n}}class K extends e.Plugin{static get requires(){return[_,z]}static get pluginName(){return"CodeBlock"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).codeBlock=o})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Horizontal line":"Horizontal line"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},313:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(792),o=n.n(r),i=n(305),a=n.n(i)()(o());a.push([e.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{background:#dedede;border:0;height:4px;margin:15px 0}",""]);const s=a},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},424:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},719:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],s=0;s<e.length;s++){var c=e[s],l=r.base?c[0]+r.base:c[0],u=i[l]||0,d="".concat(l," ").concat(u);i[l]=u+1;var p=n(d),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var m=o(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:m,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=n(i[a]);t[s].references--}for(var c=r(e,o),l=0;l<i.length;l++){var u=n(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=c}}},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},863:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,o){var i;if(r)i="";else{i="",o.supports&&(i+="@supports (".concat(o.supports,") {")),o.media&&(i+="@media ".concat(o.media," {"));var a=void 0!==o.layer;a&&(i+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),i+=o.css,a&&(i+="}"),o.media&&(i+="}"),o.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,i);else{var s=document.createTextNode(i),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(s,c[t]):e.appendChild(s)}}var o={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=o.singletonCounter++,n=o.singleton||(o.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},901:(e,t,n)=>{e.exports=n(237)("./src/widget.js")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{HorizontalLine:()=>x,HorizontalLineCommand:()=>o,HorizontalLineEditing:()=>g,HorizontalLineUI:()=>w});var e=n(782),t=n(901);class o extends e.Command{refresh(){const e=this.editor.model,n=e.schema,r=e.document.selection;this.isEnabled=function(e,n,r){const o=function(e,n){const r=(0,t.findOptimalInsertionRange)(e,n),o=r.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(e,r);return n.checkChild(o,"horizontalLine")}(r,n,e)}execute(){const e=this.editor.model;e.change(t=>{const n=t.createElement("horizontalLine");e.insertObject(n,null,null,{setSelection:"after"})})}}var i=n(719),a=n.n(i),s=n(863),c=n.n(s),l=n(424),u=n.n(l),d=n(517),p=n.n(d),f=n(163),m=n.n(f),h=n(313),v={attributes:{"data-cke":!0}};v.setAttributes=p(),v.insert=u().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=m();a()(h.A,v);h.A&&h.A.locals&&h.A.locals;class g extends e.Plugin{static get pluginName(){return"HorizontalLineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model.schema,r=e.t,i=e.conversion;n.register("horizontalLine",{inheritAllFrom:"$blockObject"}),i.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),i.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:n})=>{const o=r("Horizontal line"),i=n.createContainerElement("div",null,n.createEmptyElement("hr"));return n.addClass("ck-horizontal-line",i),n.setCustomProperty("hr",!0,i),function(e,n,r){return n.setCustomProperty("horizontalLine",!0,e),(0,t.toWidget)(e,n,{label:r})}(i,n,o)}}),i.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new o(e))}}var y=n(355),b=n(311);class w extends e.Plugin{static get pluginName(){return"HorizontalLineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("horizontalLine",()=>{const e=this._createButton(b.ButtonView);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:horizontalLine",()=>this._createButton(b.MenuBarMenuListItemButtonView))}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("horizontalLine"),o=new e(t.locale),i=n.t;return o.set({label:i("Horizontal line"),icon:y.IconHorizontalLine}),o.bind("isEnabled").to(r,"isEnabled"),this.listenTo(o,"execute",()=>{t.execute("horizontalLine"),t.editing.view.focus()}),o}}class x extends e.Plugin{static get requires(){return[g,w,t.Widget]}static get pluginName(){return"HorizontalLine"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).horizontalLine=r})();;
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Decrease indent":"Decrease indent","Increase indent":"Increase indent"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={125:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,':root{--ck-content-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px;position:relative}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-content-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-content-todo-list-checkmark-size)}.ck-content[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-content .todo-list .todo-list__label>input:before{transition:none}}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-content-todo-list-checkmark-size)/8) calc(var(--ck-content-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-content-todo-list-checkmark-size)/2.6);left:calc(var(--ck-content-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-content-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-content-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}.ck-editor__editable.ck-content .todo-list .todo-list__label>input,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{cursor:pointer}.ck-editor__editable.ck-content .todo-list .todo-list__label>input:hover:before,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-content-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-content-todo-list-checkmark-size)}.ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label>span[contenteditable=false]>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{transition:none}}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-content-todo-list-checkmark-size)/8) calc(var(--ck-content-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-content-todo-list-checkmark-size)/2.6);left:calc(var(--ck-content-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-content-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-content-todo-list-checkmark-size)/5.3)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:after{border-color:#fff}.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}',""]);const c=r},160:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,":root{--ck-content-font-size-tiny:0.7em;--ck-content-font-size-small:0.85em;--ck-content-font-size-big:1.4em;--ck-content-font-size-huge:1.8em}.ck-content .text-tiny{font-size:var(--ck-content-font-size-tiny)}.ck-content .text-small{font-size:var(--ck-content-font-size-small)}.ck-content .text-big{font-size:var(--ck-content-font-size-big)}.ck-content .text-huge{font-size:var(--ck-content-font-size-huge)}",""]);const c=r},163:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},237:t=>{"use strict";t.exports=CKEditor5.dll},305:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,i,s,o){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(i)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(r[l]=!0)}for(var a=0;a<t.length;a++){var d=[].concat(t[a]);i&&r[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},396:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,":root{--ck-content-list-marker-color:var(--ck-content-font-color);--ck-content-list-marker-font-family:var(--ck-content-font-family);--ck-content-list-marker-font-size:var(--ck-content-font-size)}.ck-content li>p:first-of-type{margin-top:0}.ck-content li>p:only-of-type{margin-bottom:0;margin-top:0}.ck-content li.ck-list-marker-bold::marker{font-weight:700}.ck-content li.ck-list-marker-italic::marker{font-style:italic}.ck-content li.ck-list-marker-color::marker{color:var(--ck-content-list-marker-color)}.ck-content li.ck-list-marker-font-family::marker{font-family:var(--ck-content-list-marker-font-family)}.ck-content li.ck-list-marker-font-size::marker{font-size:var(--ck-content-list-marker-font-size)}.ck-content li.ck-list-marker-font-size-tiny::marker{font-size:var(--ck-content-font-size-tiny)}.ck-content li.ck-list-marker-font-size-small::marker{font-size:var(--ck-content-font-size-small)}.ck-content li.ck-list-marker-font-size-big::marker{font-size:var(--ck-content-font-size-big)}.ck-content li.ck-list-marker-font-size-huge::marker{font-size:var(--ck-content-font-size-huge)}",""]);const c=r},424:t=>{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},446:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}",""]);const c=r},467:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}",""]);const c=r},507:(t,e,n)=>{t.exports=n(237)("./src/enter.js")},517:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},650:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}",""]);const c=r},719:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var o={},r=[],c=0;c<t.length;c++){var l=t[c],a=i.base?l[0]+i.base:l[0],d=o[a]||0,u="".concat(a," ").concat(d);o[a]=d+1;var m=n(u),k={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==m)e[m].references++,e[m].updater(k);else{var p=s(k,i);i.byIndex=c,e.splice(c,0,{identifier:u,updater:p,references:1})}r.push(u)}return r}function s(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,s){var o=i(t=t||[],s=s||{});return function(t){t=t||[];for(var r=0;r<o.length;r++){var c=n(o[r]);e[c].references--}for(var l=i(t,s),a=0;a<o.length;a++){var d=n(o[a]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}o=l}}},725:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(792),s=n.n(i),o=n(305),r=n.n(o)()(s());r.push([t.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}",""]);const c=r},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},792:t=>{"use strict";t.exports=function(t){return t[1]}},834:(t,e,n)=>{t.exports=n(237)("./src/typing.js")},863:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function i(t,e,i,s){var o;if(i)o="";else{o="",s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var r=void 0!==s.layer;r&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,r&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,o);else{var c=document.createTextNode(o),l=t.childNodes;l[e]&&t.removeChild(l[e]),l.length?t.insertBefore(c,l[e]):t.appendChild(c)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,n=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){i(n,e,!1,t)},remove:function(t){i(n,e,!0,t)}}}}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Indent:()=>c,IndentBlock:()=>J,IndentBlockCommand:()=>d,IndentBlockListCommand:()=>q,IndentBlockListIntegration:()=>V,IndentBlockListItemCommand:()=>K,IndentEditing:()=>e,IndentUI:()=>r,_IndentUsingClasses:()=>m,_IndentUsingOffset:()=>u});var t=n(782);class e extends t.Plugin{static get pluginName(){return"IndentEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.commands.add("indent",new t.MultiCommand(e)),e.commands.add("outdent",new t.MultiCommand(e))}}var s=n(311),o=n(355);class r extends t.Plugin{static get pluginName(){return"IndentUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale,n=t.t,i="ltr"==e.uiLanguageDirection?o.IconIndent:o.IconOutdent,s="ltr"==e.uiLanguageDirection?o.IconOutdent:o.IconIndent;this._defineButton("indent",n("Increase indent"),i),this._defineButton("outdent",n("Decrease indent"),s)}_defineButton(t,e,n){const i=this.editor;i.ui.componentFactory.add(t,()=>{const i=this._createButton(s.ButtonView,t,e,n);return i.set({tooltip:!0}),i}),i.ui.componentFactory.add("menuBar:"+t,()=>this._createButton(s.MenuBarMenuListItemButtonView,t,e,n))}_createButton(t,e,n,i){const s=this.editor,o=s.commands.get(e),r=new t(s.locale);return r.set({label:n,icon:i}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",()=>{s.execute(e),s.editing.view.focus()}),r}}class c extends t.Plugin{static get pluginName(){return"Indent"}static get isOfficialPlugin(){return!0}static get requires(){return[e,r]}}var l=n(783),a=n(584);class d extends t.Command{_indentBehavior;constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this.editor.model,e=(0,a.first)(t.document.selection.getSelectedBlocks());e&&this._isIndentationChangeAllowed(e)?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const t=this.editor.model,e=this._getBlocksToChange();t.change(t=>{for(const n of e){const e=n.getAttribute("blockIndent"),i=this._indentBehavior.getNextIndent(e);i?t.setAttribute("blockIndent",i,n):t.removeAttribute("blockIndent",n)}})}_getBlocksToChange(){const t=this.editor.model.document.selection;return Array.from(t.getSelectedBlocks()).filter(t=>this._isIndentationChangeAllowed(t))}_isIndentationChangeAllowed(t){const e=this.editor;if(!e.model.schema.checkAttribute(t,"blockIndent"))return!1;if(!e.plugins.has("ListUtils"))return!0;if(!this._indentBehavior.isForward)return!0;return!e.plugins.get("ListUtils").isListItemBlock(t)}}class u{isForward;offset;unit;constructor(t){this.isForward="forward"===t.direction,this.offset=t.offset,this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||"0");return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||"0"),n=!t||t.endsWith(this.unit);if(e<0)return;if(!n)return this.isForward?this.offset+this.unit:void 0;const i=e+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class m{isForward;classes;constructor(t){this.isForward="forward"===t.direction,this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);return this.isForward?e<this.classes.length-1:e>=0}getNextIndent(t){const e=this.classes.indexOf(t)+(this.isForward?1:-1),n=Math.min(e,this.classes.length-1);return this.classes[n]}}n(834),n(507);Symbol.iterator;Symbol.iterator;Symbol.iterator;function k(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}t.Command;t.Command;t.Command;t.Command;t.Plugin;t.Plugin;t.Command;t.Plugin;t.Plugin;var p=n(719),b=n.n(p),g=n(863),f=n.n(g),h=n(424),v=n.n(h),y=n(517),I=n.n(y),_=n(163),w=n.n(_),A=n(160),L={attributes:{"data-cke":!0}};L.setAttributes=I(),L.insert=v().bind(null,"head"),L.domAPI=f(),L.insertStyleElement=w();b()(A.A,L);A.A&&A.A.locals&&A.A.locals;t.Plugin;t.Plugin;t.Plugin;t.Plugin;t.Plugin;t.Plugin;var x=n(396),C={attributes:{"data-cke":!0}};C.setAttributes=I(),C.insert=v().bind(null,"head"),C.domAPI=f(),C.insertStyleElement=w();b()(x.A,C);x.A&&x.A.locals&&x.A.locals;t.Plugin;t.Plugin;n(331);var B=n(650),S={attributes:{"data-cke":!0}};S.setAttributes=I(),S.insert=v().bind(null,"head"),S.domAPI=f(),S.insertStyleElement=w();b()(B.A,S);B.A&&B.A.locals&&B.A.locals;var z=n(725),P={attributes:{"data-cke":!0}};P.setAttributes=I(),P.insert=v().bind(null,"head"),P.domAPI=f(),P.insertStyleElement=w();b()(z.A,P);z.A&&z.A.locals&&z.A.locals;t.Plugin;t.Command;const E={},T={},F={},O=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"},{listStyle:"arabic-indic",typeAttribute:null,listType:"numbered"}];for(const{listStyle:t,typeAttribute:e,listType:n}of O)E[t]=n,T[t]=e,e&&(F[e]=t);t.Command;t.Command;t.Plugin;t.Plugin;var N=n(446),D={attributes:{"data-cke":!0}};D.setAttributes=I(),D.insert=v().bind(null,"head"),D.domAPI=f(),D.insertStyleElement=w();b()(N.A,D);N.A&&N.A.locals&&N.A.locals;s.View;var U=n(467),j={attributes:{"data-cke":!0}};j.setAttributes=I(),j.insert=v().bind(null,"head"),j.domAPI=f(),j.insertStyleElement=w();b()(U.A,j);U.A&&U.A.locals&&U.A.locals;t.Command;var M=n(125),R={attributes:{"data-cke":!0}};R.setAttributes=I(),R.insert=v().bind(null,"head"),R.domAPI=f(),R.insertStyleElement=w();b()(M.A,R);M.A&&M.A.locals&&M.A.locals;t.Command;t.Command;t.Plugin;t.Plugin;t.Command;t.Command;t.Command;t.Plugin;t.Command;class q extends t.Command{_indentBehavior;constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this._getFirstListItemIfSelectionIsAtListStart(this.editor.model.document.selection);this.isEnabled=!!t&&this._indentBehavior.checkEnabled(t.getAttribute("blockIndentList"))}execute(t={}){const e=this.editor.model,n=e.document.selection;e.change(i=>{const s=this._getFirstListItemIfSelectionIsAtListStart(n),o=[];if(t.firstListOnly)o.push(s);else{const t=Array.from(n.getSelectedBlocks());for(const n of t)k(n)&&0===n.getAttribute("listIndent")&&e.schema.checkAttribute(n,"blockIndentList")&&o.push(n)}for(const t of o){const e=t.getAttribute("blockIndentList"),n=this._indentBehavior.getNextIndent(e);n?i.setAttribute("blockIndentList",n,t):i.removeAttribute("blockIndentList",t)}})}_getFirstListItemIfSelectionIsAtListStart(t){const e=t.getFirstPosition(),n=this.editor.plugins.get("ListUtils"),i=e.parent,s=this.editor.model.schema;return e.isAtStart&&k(i)&&0==i.getAttribute("listIndent")&&s.checkAttribute(i,"blockIndentList")&&n.isFirstListItemInList(i)?i:null}}class K extends t.Command{_indentBehavior;constructor(t,e){super(t),this._indentBehavior=e}refresh(){this.isEnabled=this._getAffectedListItems().length>0}execute(){this.editor.model.change(t=>{for(const e of this._getAffectedListItems())t.removeAttribute("blockIndentListItem",e)})}_getAffectedListItems(){const t=this.editor.model.document.selection,e=this.editor.plugins.get("ListUtils"),n=Array.from(t.getSelectedBlocks());return e.expandListBlocksToCompleteItems(n).filter(t=>this._isIndentationChangeAllowed(t))}_isIndentationChangeAllowed(t){if(!t.hasAttribute("blockIndentListItem"))return!1;const e=parseFloat(t.getAttribute("blockIndentListItem"));return isNaN(e)?!this._indentBehavior.isForward:this._indentBehavior.isForward&&e<0||!this._indentBehavior.isForward&&e>0}}class V extends t.Plugin{static get pluginName(){return"IndentBlockListIntegration"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!this.editor.plugins.has("ListEditing"))return;const e=t.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClassesForListBlock(e.classes),this._setupConversionUsingClassesForListItemBlock(e.classes),t.commands.add("indentBlockList",new q(t,new m({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlockList",new q(t,new m({direction:"backward",classes:e.classes}))),t.commands.add("indentBlockListItem",new K(t,new m({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlockListItem",new K(t,new m({direction:"backward",classes:e.classes})))):(t.data.addStyleProcessorRules(l.addMarginStylesRules),this._setupConversionUsingOffsetForListBlock(),this._setupConversionUsingOffsetForListItemBlock(),t.commands.add("indentBlockList",new q(t,new u({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlockList",new q(t,new u({direction:"backward",offset:e.offset,unit:e.unit}))),t.commands.add("indentBlockListItem",new K(t,new u({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlockListItem",new K(t,new u({direction:"backward",offset:e.offset,unit:e.unit}))));t.plugins.get("ListEditing").on("postFixer",(t,{listNodes:e,writer:n})=>{for(const{node:i,previousNodeInList:s}of e)s&&s.getAttribute("listType")==i.getAttribute("listType")&&($("blockIndentList",i,s,n)&&(t.return=!0),s.getAttribute("listItemId")==i.getAttribute("listItemId")&&$("blockIndentListItem",i,s,n)&&(t.return=!0))}),this.listenTo(t.editing.view.document,"tab",(e,n)=>{const i=n.shiftKey?"outdentBlockList":"indentBlockList";this.editor.commands.get(i).isEnabled&&(t.execute(i,{firstListOnly:!0}),n.stopPropagation(),n.preventDefault(),e.stop())},{context:"li",priority:"high"})}afterInit(){const t=this.editor,e=t.model,n=e.schema;if(!t.plugins.has("ListEditing"))return;n.extend("$listItem",{allowAttributes:["blockIndentList","blockIndentListItem"]}),n.setAttributeProperties("blockIndentList",{isFormatting:!0}),n.setAttributeProperties("blockIndentListItem",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"blockIndentList"),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"blockIndentListItem");const i=(e,n)=>{t.model.change(t=>{for(const e of n)e.hasAttribute("listItemId")&&(e.hasAttribute("blockIndentList")&&t.removeAttribute("blockIndentList",e),e.hasAttribute("blockIndentListItem")&&t.removeAttribute("blockIndentListItem",e))})},s=t.commands.get("indentList"),o=t.commands.get("outdentList");s&&this.listenTo(s,"afterExecute",i),o&&this.listenTo(o,"afterExecute",i);const r=t.commands.get("indent"),c=t.commands.get("outdent");r.registerChildCommand(t.commands.get("indentBlockList")),c.registerChildCommand(t.commands.get("outdentBlockList")),r.registerChildCommand(t.commands.get("indentBlockListItem")),c.registerChildCommand(t.commands.get("outdentBlockListItem"))}_setupConversionUsingOffsetForListBlock(){const t=this.editor,e=t.conversion,n="rtl"===t.locale.contentLanguageDirection?"margin-right":"margin-left",i=t.plugins.get("ListEditing");e.for("upcast").add(t=>{t.on("element:ol",W("blockIndentList",n)),t.on("element:ul",W("blockIndentList",n))}),i.registerDowncastStrategy({scope:"list",attributeName:"blockIndentList",setAttributeOnDowncast(t,e,i){e&&t.setStyle(n,e,i)}})}_setupConversionUsingOffsetForListItemBlock(){const t=this.editor,e=t.locale,n=t.conversion,i="rtl"===e.contentLanguageDirection?"margin-right":"margin-left",s=t.plugins.get("ListEditing");n.for("upcast").add(t=>{t.on("element:li",W("blockIndentListItem",i),{priority:"low"})}),s.registerDowncastStrategy({scope:"item",attributeName:"blockIndentListItem",setAttributeOnDowncast(t,e,n){e&&t.setStyle(i,e,n)}})}_setupConversionUsingClassesForListBlock(t){const e=this.editor,n=e.conversion,i=e.plugins.get("ListEditing");n.for("upcast").add(e=>{e.on("element:ol",H("blockIndentList",t)),e.on("element:ul",H("blockIndentList",t))}),i.registerDowncastStrategy({scope:"list",attributeName:"blockIndentList",setAttributeOnDowncast(t,e,n){e&&t.addClass(e,n)}})}_setupConversionUsingClassesForListItemBlock(t){const e=this.editor,n=e.conversion,i=e.plugins.get("ListEditing");n.for("upcast").add(e=>{e.on("element:li",H("blockIndentListItem",t),{priority:"low"})}),i.registerDowncastStrategy({scope:"item",attributeName:"blockIndentListItem",setAttributeOnDowncast(t,e,n){e&&t.addClass(e,n)}})}}function H(t,e){return(n,i,s)=>{const{writer:o,consumable:r}=s;i.modelRange||Object.assign(i,s.convertChildren(i.viewItem,i.modelCursor));const c=Array.from(i.viewItem.getClassNames()),l=e.find(t=>c.includes(t));if(void 0===l)return;let a,d=!1;for(const e of i.modelRange.getItems({shallow:!0}))void 0===a&&(a=e.getAttribute("listIndent")),e.hasAttribute(t)||e.getAttribute("listIndent")===a&&(o.setAttribute(t,l,e),d=!0);d&&r.consume(i.viewItem,{classes:l})}}function W(t,e){return(n,i,s)=>{const{writer:o,consumable:r}=s;i.modelRange||Object.assign(i,s.convertChildren(i.viewItem,i.modelCursor));const c=i.viewItem.getStyle(e);let l,a=!1;for(const e of i.modelRange.getItems({shallow:!0}))void 0===l&&(l=e.getAttribute("listIndent")),e.hasAttribute(t)||e.getAttribute("listIndent")===l&&(o.setAttribute(t,c,e),a=!0);a&&r.consume(i.viewItem,{styles:e})}}function $(t,e,n,i){const s=n.getAttribute(t);return e.getAttribute(t)!==s&&(s?i.setAttribute(t,s,e):i.removeAttribute(t,e),!0)}const G=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class J extends t.Plugin{constructor(t){super(t),t.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}static get isOfficialPlugin(){return!0}static get requires(){return[V]}init(){const t=this.editor,e=t.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClasses(e.classes),t.commands.add("indentBlock",new d(t,new m({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlock",new d(t,new m({direction:"backward",classes:e.classes})))):(t.data.addStyleProcessorRules(l.addMarginStylesRules),this._setupConversionUsingOffset(),t.commands.add("indentBlock",new d(t,new u({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlock",new d(t,new u({direction:"backward",offset:e.offset,unit:e.unit}))))}afterInit(){const t=this.editor,e=t.model.schema,n=t.commands.get("indent"),i=t.commands.get("outdent"),s=t.config.get("heading.options");(s&&s.map(t=>t.model)||G).forEach(t=>{e.isRegistered(t)&&e.extend(t,{allowAttributes:"blockIndent"})}),e.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(t.commands.get("indentBlock")),i.registerChildCommand(t.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const t=this.editor.conversion,e="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";t.for("upcast").attributeToAttribute({view:{styles:{[e]:/[\s\S]+/}},model:{key:"blockIndent",value:t=>{if(!t.is("element","li"))return t.getStyle(e)}}}),t.for("downcast").attributeToAttribute({model:"blockIndent",view:t=>({key:"style",value:{[e]:t}})})}_setupConversionUsingClasses(t){const e={model:{key:"blockIndent",values:[]},view:{}};for(const n of t)e.model.values.push(n),e.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(e)}}})(),(window.CKEditor5=window.CKEditor5||{}).indent=i})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Choose language":"Choose language",Language:"Language","Remove language":"Remove language"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(a){var i=t[a];if(void 0!==i)return i.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";n.r(a),n.d(a,{TextPartLanguage:()=>d,TextPartLanguageCommand:()=>g,TextPartLanguageEditing:()=>u,TextPartLanguageUI:()=>l,_parseLanguageAttribute:()=>r,_stringifyLanguageAttribute:()=>o});var e=n(782),t=n(783),i=n(584);function o(e,t){return`${e}:${t=t||(0,i.getLanguageDirection)(e)}`}function r(e){const[t,n]=e.split(":");return{languageCode:t,textDirection:n}}class g extends e.Command{refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"language")}execute({languageCode:e,textDirection:n}={}){const a=this.editor.model,i=a.document.selection,r=!!e&&o(e,n);a.change(e=>{if(i.isCollapsed)r?e.setSelectionAttribute("language",r):e.removeSelectionAttribute("language");else{const n=a.schema.getValidRanges(i.getRanges(),"language",{includeEmptyRanges:!0});for(const a of n){let n=a,i="language";a.isCollapsed&&(n=a.start.parent,i=t.ModelDocumentSelection._getStoreAttributeKey("language")),r?e.setAttribute(i,r,n):e.removeAttribute(i,n)}}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.getAttribute("language")||!1;for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,"language"))return n.getAttribute("language")||!1;return!1}}class u extends e.Plugin{static get pluginName(){return"TextPartLanguageEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("language",{textPartLanguage:[{title:"Arabic",languageCode:"ar"},{title:"French",languageCode:"fr"},{title:"Spanish",languageCode:"es"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"language"}),e.model.schema.setAttributeProperties("language",{copyOnEnter:!0}),this._defineConverters(),e.commands.add("textPartLanguage",new g(e))}_defineConverters(){const e=this.editor.conversion;e.for("upcast").elementToAttribute({model:{key:"language",value:e=>o(e.getAttribute("lang"),e.getAttribute("dir"))},view:{name:"span",attributes:{lang:/[\s\S]+/}}}),e.for("downcast").attributeToElement({model:"language",view:(e,{writer:t},n)=>{if(!e)return;if(!n.item.is("$textProxy")&&!n.item.is("documentSelection"))return;const{languageCode:a,textDirection:i}=r(e);return t.createAttributeElement("span",{lang:a,dir:i})}})}}var s=n(311);class l extends e.Plugin{static get pluginName(){return"TextPartLanguageUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=t("Choose language"),a=t("Language");e.ui.componentFactory.add("textPartLanguage",t=>{const{definitions:i,titles:o}=this._getItemMetadata(),r=e.commands.get("textPartLanguage"),g=(0,s.createDropdown)(t);return(0,s.addListToDropdown)(g,i,{ariaLabel:a,role:"menu"}),g.buttonView.set({ariaLabel:a,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:a}),g.extendTemplate({attributes:{class:["ck-text-fragment-language-dropdown"]}}),g.bind("isEnabled").to(r,"isEnabled"),g.buttonView.bind("label").to(r,"value",e=>e&&o[e]||n),g.buttonView.bind("ariaLabel").to(r,"value",e=>{const t=e&&o[e];return t?`${t}, ${a}`:a}),this.listenTo(g,"execute",t=>{r.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()}),g}),e.ui.componentFactory.add("menuBar:textPartLanguage",n=>{const{definitions:i}=this._getItemMetadata(),o=e.commands.get("textPartLanguage"),r=new s.MenuBarMenuView(n);r.buttonView.set({label:a});const g=new s.MenuBarMenuListView(n);g.set({ariaLabel:t("Language"),role:"menu"});for(const e of i){if("button"!=e.type){g.items.add(new s.ListSeparatorView(n));continue}const t=new s.MenuBarMenuListItemView(n,r),a=new s.MenuBarMenuListItemButtonView(n);a.set({role:"menuitemradio",isToggleable:!0}),a.bind(...Object.keys(e.model)).to(e.model),a.delegate("execute").to(r),t.children.add(a),g.items.add(t)}return r.bind("isEnabled").to(o,"isEnabled"),r.panelView.children.add(g),r.on("execute",t=>{o.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()}),r})}_getItemMetadata(){const e=this.editor,t=new i.Collection,n={},a=e.commands.get("textPartLanguage"),r=e.config.get("language.textPartLanguage"),g=(0,e.locale.t)("Remove language");t.add({type:"button",model:new s.UIModel({label:g,languageCode:!1,withText:!0})}),t.add({type:"separator"});for(const e of r){const i={type:"button",model:new s.UIModel({label:e.title,languageCode:e.languageCode,role:"menuitemradio",textDirection:e.textDirection,withText:!0})},r=o(e.languageCode,e.textDirection);i.model.bind("isOn").to(a,"value",e=>e===r),t.add(i),n[r]=e.title}return{definitions:t,titles:n}}}class d extends e.Plugin{static get requires(){return[u,l]}static get pluginName(){return"TextPartLanguage"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).language=a})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Create link":"Create link","Displayed text":"Displayed text",Downloadable:"Downloadable","Edit link":"Edit link",Link:"Link","Link image":"Link image","Link properties":"Link properties","Link URL":"Link URL","Link URL must not be empty.":"Link URL must not be empty.","Move out of a link":"Move out of a link","No links available":"No links available","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Unlink:"Unlink"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={29:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,":root{--ck-form-default-width:340px}.ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form.ck-form_default-width{width:var(--ck-form-default-width)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-number,.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}@media screen and (max-width:600px){.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit{align-items:stretch;flex-direction:column;padding:0}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit>.ck{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit .ck-button_with-text{justify-content:center}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_large-bottom-padding{padding-bottom:var(--ck-spacing-large)}}[dir=ltr] .ck.ck-form.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-form.ck-responsive-form>:not(:last-child){margin-left:0}",""]);const a=o},163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},196:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,":root{--ck-link-properties-width:340px}@media screen and (max-width:600px){:root{--ck-link-properties-width:300px}}.ck.ck-link-properties{width:var(--ck-link-properties-width)}",""]);const a=o},220:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-number,.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},244:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(792),r=i.n(n),s=i(305),o=i.n(s),a=i(252),l=i.n(a),c=new URL(i(401),i.b),d=o()(r()),u=l()(c);d.push([e.id,`.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url(${u});background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}`,""]);const h=d},252:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,n,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},331:(e,t,i)=>{e.exports=i(237)("./src/clipboard.js")},355:(e,t,i)=>{e.exports=i(237)("./src/icons.js")},401:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzUuNzUgMCAwIDEtLjIxNy4yMDYgNS4yNTEgNS4yNTEgMCAwIDEtOC41MDMtNS45NTUuNy43IDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NHptNS40OTQtNS4zMzVhLjc1Ljc1IDAgMCAxLS4xMi4yNzRsLTEuMTQ3IDEuNjM5YS43NS43NSAwIDEgMS0xLjIyOC0uODZsLjg2LTEuMjNhMy43NSAzLjc1IDAgMCAwLTYuMTQ0LTQuMzAxbC0uODYgMS4yMjlhLjc1Ljc1IDAgMCAxLTEuMjI5LS44NmwxLjE0OC0xLjY0YS43NS43NSAwIDAgMSAuMjE3LS4yMDYgNS4yNTEgNS4yNTEgMCAwIDEgOC41MDMgNS45NTVtLTQuNTYzLTIuNTMyYS43NS43NSAwIDAgMSAuMTg0IDEuMDQ1bC0zLjE1NSA0LjUwNWEuNzUuNzUgMCAxIDEtMS4yMjktLjg2bDMuMTU1LTQuNTA2YS43NS43NSAwIDAgMSAxLjA0NS0uMTg0Ii8+PC9zdmc+"},424:e=>{"use strict";var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},482:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,".ck.ck-link-providers>.ck-link-providers__list{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.ck.ck-link-providers>.ck-link-providers__list .ck-button>.ck-icon{flex-shrink:0}:root{--ck-link-providers-width:340px;--ck-link-list-view-max-height:240px;--ck-link-list-view-icon-size:calc(var(--ck-icon-size)*0.8)}@media screen and (max-width:600px){:root{--ck-link-providers-width:300px}}.ck.ck-link-providers{width:var(--ck-link-providers-width)}.ck.ck-link-providers .ck-form__header__label{overflow:hidden;text-overflow:ellipsis}.ck.ck-link-providers>.ck-link-providers__list{max-height:min(var(--ck-link-list-view-max-height),40vh)}.ck.ck-link-providers>.ck-link-providers__list .ck-button>.ck-icon{height:var(--ck-link-list-view-icon-size);width:var(--ck-link-list-view-icon-size)}.ck.ck-link-providers>.ck-link-providers__list .ck-button>.ck-button__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck.ck-link-providers .ck-link__empty-list-info{font-style:italic;padding:calc(var(--ck-spacing-large)*2) var(--ck-spacing-medium);text-align:center}",""]);const a=o},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(i){e.setAttribute(i,t[i])})}},571:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const a=o},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},662:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,".ck.ck-link-toolbar__preview{display:inline-block}.ck.ck-link-toolbar__preview .ck-button__label{overflow:hidden}:root{--ck-link-bookmark-icon-size:calc(var(--ck-icon-size)*0.7)}.ck.ck-toolbar.ck-link-toolbar>.ck-toolbar__items{flex-wrap:nowrap}a.ck.ck-button.ck-link-toolbar__preview{color:var(--ck-color-link-default);cursor:pointer;justify-content:center;padding:0 var(--ck-spacing-medium)}a.ck.ck-button.ck-link-toolbar__preview .ck.ck-button__label{max-width:var(--ck-input-width);text-overflow:ellipsis}a.ck.ck-button.ck-link-toolbar__preview,a.ck.ck-button.ck-link-toolbar__preview:active,a.ck.ck-button.ck-link-toolbar__preview:focus,a.ck.ck-button.ck-link-toolbar__preview:hover{background:none}a.ck.ck-button.ck-link-toolbar__preview:active{box-shadow:none}a.ck.ck-button.ck-link-toolbar__preview:focus,a.ck.ck-button.ck-link-toolbar__preview:hover{text-decoration:underline}a.ck.ck-button.ck-link-toolbar__preview.ck-button_with-text .ck.ck-icon.ck-button__icon{height:var(--ck-link-bookmark-icon-size);width:var(--ck-link-bookmark-icon-size)}[dir=ltr] a.ck.ck-button.ck-link-toolbar__preview.ck-button_with-text .ck.ck-icon.ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-tiny)}[dir=rtl] a.ck.ck-button.ck-link-toolbar__preview.ck-button_with-text .ck.ck-icon.ck-button__icon{margin-left:var(--ck-spacing-tiny);margin-right:var(--ck-spacing-small)}a.ck.ck-button.ck-link-toolbar__preview:has(.ck-icon){padding-left:var(--ck-spacing-extra-tiny )}",""]);const a=o},719:e=>{"use strict";var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var s={},o=[],a=0;a<e.length;a++){var l=e[a],c=n.base?l[0]+n.base:l[0],d=s[c]||0,u="".concat(c," ").concat(d);s[c]=d+1;var h=i(u),k={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(k);else{var m=r(k,n);n.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}o.push(u)}return o}function r(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,r){var s=n(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=i(s[o]);t[a].references--}for(var l=n(e,r),c=0;c<s.length;c++){var d=i(s[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=l}}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},783:(e,t,i)=>{e.exports=i(237)("./src/engine.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},834:(e,t,i)=>{e.exports=i(237)("./src/typing.js")},863:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function n(e,t,n,r){var s;if(n)s="";else{s="",r.supports&&(s+="@supports (".concat(r.supports,") {")),r.media&&(s+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(s+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),s+=r.css,o&&(s+="}"),r.media&&(s+="}"),r.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,s);else{var a=document.createTextNode(s),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,i=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){n(i,t,!1,e)},remove:function(e){n(i,t,!0,e)}}}},898:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(792),r=i.n(n),s=i(305),o=i.n(s)()(r());o.push([e.id,".ck.ck-link-form .ck-link-form__providers-list{display:flex;flex-direction:column}.ck.ck-link-form .ck-link-form__providers-list .ck-link__button>.ck-button__label{flex-grow:1}.ck.ck-link-form .ck-link__items:empty{display:none}:root{--ck-link-panel-width:340px;--ck-link-provider-list-item-text-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));--ck-link-provider-list-item-height:calc(var(--ck-link-provider-list-item-text-height) + var(--ck-spacing-small) + var(--ck-spacing-small))}@media screen and (max-width:600px){:root{--ck-link-panel-width:300px}}.ck.ck-form.ck-link-form{padding-bottom:0;width:var(--ck-link-panel-width)}@media screen and (max-width:600px){.ck.ck-form.ck-link-form.ck-responsive-form .ck-labeled-field-view{margin:0}}.ck.ck-form.ck-link-form .ck-link-form__providers-list{border-top:1px solid var(--ck-color-base-border)}.ck.ck-form.ck-link-form .ck-link-form__providers-list:has(.ck-list__item:nth-child(n+5)){max-height:calc(var(--ck-link-provider-list-item-height)*4 + var(--ck-spacing-large) + 1px);overflow:auto}.ck.ck-form.ck-link-form .ck-link-form__providers-list .ck-link__button{border-radius:0;padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form.ck-link-form .ck-link-form__providers-list .ck-link__button>.ck-button__label{overflow:hidden;text-overflow:ellipsis}",""]);const a=o},901:(e,t,i)=>{e.exports=i(237)("./src/widget.js")}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={id:n,exports:{}};return e[n](s,s.exports,i),s.exports}i.m=e,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},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})},i.b="undefined"!=typeof document&&document.baseURI||self.location.href;var n={};(()=>{"use strict";i.r(n),i.d(n,{AutoLink:()=>we,AutomaticLinkDecorators:()=>a,Link:()=>_e,LinkCommand:()=>P,LinkEditing:()=>Y,LinkFormView:()=>re,LinkImage:()=>Te,LinkImageEditing:()=>Ve,LinkImageUI:()=>Le,LinkManualDecorator:()=>E,LinkPropertiesView:()=>ue,LinkProviderItemsView:()=>le,LinkUI:()=>pe,UnlinkCommand:()=>C,_LINK_KEYSTROKE:()=>f,_LinkButtonView:()=>he,_LinkPreviewButtonView:()=>G,_createLinkElement:()=>g,_ensureSafeLinkUrl:()=>b,_extractTextFromLinkRange:()=>A,_getLocalizedLinkDecorators:()=>w,_hasLinkProtocol:()=>x,_isEmailLink:()=>V,_normalizeLinkDecorators:()=>v,_openLink:()=>L,addLinkProtocolIfApplicable:()=>y,ensureSafeUrl:()=>b,isLinkElement:()=>p,isLinkableElement:()=>_});var e=i(782),t=i(834),r=i(331),s=i(584),o=i(783);class a{_definitions=new Set;_conflictChecker;get length(){return this._definitions.size}setConflictChecker(e){this._conflictChecker=e}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{const t=(e,t)=>{const i=t.createAttributeElement("a",e.attributes,{priority:5});e.classes&&t.addClass(e.classes,i);for(const n in e.styles)t.setStyle(n,e.styles[n],i);return t.setCustomProperty("link",!0,i),i},i=e=>(i,n,r)=>{if(n.attributeKey.startsWith("link")&&("linkHref"!=n.attributeKey||r.consumable.test(n.item,"attribute:linkHref"))&&(n.item.is("selection")||r.schema.isInline(n.item)))for(const i of this._definitions)i.callback(n.item.getAttribute("linkHref"))&&!this._conflictChecker?.(i,n.item)&&e?n.item.is("selection")?r.writer.wrap(r.writer.document.selection.getFirstRange(),t(i,r.writer)):r.writer.wrap(r.mapper.toViewRange(n.range),t(i,r.writer)):r.writer.unwrap(r.mapper.toViewRange(n.range),t(i,r.writer))};e.on("attribute",i(!1),{priority:s.priorities.high-1}),e.on("attribute",i(!0),{priority:s.priorities.high-2})}}getDispatcherForLinkedImage(){return e=>{const t=e=>(t,i,{writer:n,mapper:r})=>{if(!i.item.is("element","imageBlock")||!i.attributeKey.startsWith("link"))return;const o=r.toViewElement(i.item),a=Array.from(o.getChildren()).find(e=>e.is("element","a"));if(a)for(const t of this._definitions){const r=(0,s.toMap)(t.attributes);if(t.callback(i.item.getAttribute("linkHref"))&&!this._conflictChecker?.(t,i.item)&&e){for(const[e,t]of r)"class"===e?n.addClass(t,a):n.setAttribute(e,t,!1,a);t.classes&&n.addClass(t.classes,a);for(const e in t.styles)n.setStyle(e,t.styles[e],a)}else{for(const[e,t]of r)"class"===e?n.removeClass(t,a):n.removeAttribute(e,t,a);t.classes&&n.removeClass(t.classes,a);for(const e in t.styles)n.removeStyle(e,a)}}};e.on("attribute",t(!1),{priority:s.priorities.high-1}),e.on("attribute",t(!0),{priority:s.priorities.high-2})}}}function l(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(l).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function c(e){return function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}(l(e))}const d=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,u="^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))",h=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,k=/^((\w+:(\/{2,})?)|(\W))/i,m=["https?","ftps?","mailto"],f="Ctrl+K";function p(e){return e.is("attributeElement")&&!!e.getCustomProperty("link")}function g(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function b(e,t=m){const i=String(e),n=t.join("|");return function(e,t){const i=e.replace(d,"");return!!i.match(t)}(i,new RegExp(`${u.replace("<protocols>",n)}`,"i"))?i:"#"}function w(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>("label"in e&&i[e.label]&&(e.label=i[e.label]),e)),t}function v(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${c(i)}`});t.push(e)}return t}function _(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function V(e){return h.test(e)}function y(e,t){const i=V(e)?"mailto:":t,n=!!i&&!x(e);return e&&n?i+e:e}function x(e){return k.test(e)}function L(e){window.open(e,"_blank","noopener")}function A(e){let t="";for(const i of e.getItems()){if(!i.is("$text")&&!i.is("$textProxy"))return;t+=i.data}return t}function I(e,t){if(e.attributes&&t.attributes){if(Object.keys(e.attributes).some(e=>!function(e){return"class"===e||"style"===e||"rel"===e}(e)&&e in t.attributes))return!0}if(e.styles&&t.styles){if(Object.keys(e.styles).some(e=>e in t.styles))return!0}return!1}function T(e,t){const i=t.find(t=>t.id===e);return i?t.filter(t=>t.id!==e&&I(i,t)).map(e=>e.id):[]}class P extends e.Command{manualDecorators=new s.Collection;automaticDecorators=new a;restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement()||(0,s.first)(t.getSelectedBlocks());_(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,i={},n){const r=this.editor.model,a=r.document.selection,l=function({decoratorStates:e,allDecorators:t}){const i={...e};for(const r in e)if(e[r]&&n(r)){const e=T(r,t);for(const t of e)i[t]=!1}function n(e){return t.some(t=>t.id===e&&!t.value)}return i}({allDecorators:Array.from(this.manualDecorators),decoratorStates:i}),c=[],d=[];for(const e in l)l[e]?c.push(e):d.push(e);r.change(i=>{const l=t=>{i.setAttribute("linkHref",e,t),c.forEach(e=>i.setAttribute(e,!0,t)),d.forEach(e=>i.removeAttribute(e,t))},u=(t,o)=>{const a=A(t);if(!a)return t;let c=n;if(c||(c=o&&o==a?e:a),c!=a){const e=i.createDocumentFragment();for(const n of t.getItems()){const t=n;i.append(i.createText(t.data,t.getAttributes()),e)}const n=i.createRangeIn(e),o=function(e,t){const i=(0,s.diff)(e,t),n={equal:0,insert:0,delete:0},r=[];let o="",a="";for(const s of[...i,null])"insert"==s?a+=t[n.equal+n.insert]:"delete"==s?o+=e[n.equal+n.delete]:(o.length||a.length)&&(r.push({offset:n.equal,actual:o,expected:a}),o="",a=""),s&&n[s]++;return r}(a,c);let d=0;for(const{offset:e,actual:t,expected:s}of o){const o=e+d,a=i.createRange(n.start.getShiftedBy(o),n.start.getShiftedBy(o+t.length)),c=S(a,n).getAttributes(),u=Array.from(c).filter(([e])=>r.schema.getAttributeProperties(e).isFormatting),h=i.createText(s,u);l(h),i.remove(a),i.insert(h,a.start),d+=s.length}return r.insertContent(e,t),i.createRange(t.start,t.start.getShiftedBy(c.length))}},h=e=>{const{plugins:t}=this.editor;if(i.setSelection(e.end),t.has("TwoStepCaretMovement"))t.get("TwoStepCaretMovement")._handleForwardMovement();else for(const e of["linkHref",...c,...d])i.removeSelectionAttribute(e)};if(a.isCollapsed){const o=a.getFirstPosition();if(a.hasAttribute("linkHref")){const e=a.getAttribute("linkHref"),i=(0,t.findAttributeRange)(o,"linkHref",e,r),n=u(i,e);l(n||i),n&&h(n)}else if(""!==e){const t=(0,s.toMap)(a.getAttributes());t.set("linkHref",e),c.forEach(e=>{t.set(e,!0)});h(r.insertContent(i.createText(n||e,t),o))}}else{const e=Array.from(a.getRanges()),t=r.schema.getValidRanges(e,"linkHref"),n=[];for(const e of a.getSelectedBlocks())r.schema.checkAttribute(e,"linkHref")&&n.push(i.createRangeOn(e));const s=n.slice();for(const e of t)this._isRangeToUpdate(e,n)&&s.push(e);const c=e.map(e=>({start:o.ModelLivePosition.fromPosition(e.start,"toPrevious"),end:o.ModelLivePosition.fromPosition(e.end,"toNext")}));for(let e of s){e=u(e,(e.start.textNode||e.start.nodeAfter).getAttribute("linkHref"))||e,l(e)}i.setSelection(c.map(e=>{const t=e.start.toPosition(),i=e.end.toPosition();return e.start.detach(),e.end.detach(),r.createRange(t,i)}))}}),this.restoreManualDecoratorStates()}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,n=i.getSelectedElement();return _(n,t.schema)?n.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}}function S(e,t){if(!e.isCollapsed)return(0,s.first)(e.getItems());const i=e.start;return i.textNode?i.textNode:!i.nodeBefore||i.isEqual(t.start)?i.nodeAfter:i.nodeBefore}class C extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();_(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,i=this.editor.model,n=i.document.selection,r=e.commands.get("link");i.change(e=>{const s=n.isCollapsed?[(0,t.findAttributeRange)(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),i)]:i.schema.getValidRanges(n.getRanges(),"linkHref");for(const t of s)if(e.removeAttribute("linkHref",t),r)for(const i of r.manualDecorators)e.removeAttribute(i.id,t)})}}class E extends((0,s.ObservableMixin)()){id;defaultValue;label;attributes;classes;styles;constructor({id:e,label:t,attributes:i,classes:n,styles:r,defaultValue:s}){super(),this.id=e,this.set("value",void 0),this.defaultValue=s,this.label=t,this.attributes=i,this.classes=n,this.styles=r}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var D=i(719),B=i.n(D),M=i(863),N=i.n(M),F=i(424),H=i.n(F),O=i(517),R=i.n(O),U=i(163),j=i.n(U),z=i(571),K={attributes:{"data-cke":!0}};K.setAttributes=R(),K.insert=H().bind(null,"head"),K.domAPI=N(),K.insertStyleElement=j();B()(z.A,K);z.A&&z.A.locals&&z.A.locals;const q="automatic",$=/^(https?:)?\/\//;class Y extends e.Plugin{_linkOpeners=[];static get pluginName(){return"LinkEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[t.TwoStepCaretMovement,t.Input,r.ClipboardPipeline]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1,toolbar:["linkPreview","|","editLink","linkProperties","unlink"]})}init(){const e=this.editor,i=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:g}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>g(b(e,i),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new P(e)),e.commands.add("unlink",new C(e));const n=w(e.t,v(e.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter(e=>e.mode===q)),this._enableManualDecorators(n.filter(e=>"manual"===e.mode));e.plugins.get(t.TwoStepCaretMovement).registerAttribute("linkHref"),(0,t.inlineHighlight)(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration(),this._enableDecoratorConflictPostfixer()}_registerLinkOpener(e){this._linkOpeners.push(e)}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link"),n=i.automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:q,callback:e=>!!e&&$.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.setConflictChecker((e,t)=>{for(const n of i.manualDecorators)if(t.hasAttribute(n.id)&&I(e,n))return!0}),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const n=new E(e);i.add(n),t.conversion.for("downcast").add(e=>{const t=e=>{const t=e.createAttributeElement("a",n.attributes,{priority:5});n.classes&&e.addClass(n.classes,t);for(const i in n.styles)e.setStyle(i,n.styles[i],t);return e.setCustomProperty("link",!0,t),t},i=e=>(i,n,r)=>{if(n.item.is("selection")||r.schema.isInline(n.item)){if(!e&&n.attributeOldValue){if(!r.consumable.test(n.item,i.name))return;r.writer.unwrap(r.mapper.toViewRange(n.range),t(r.writer))}if(e&&n.attributeNewValue){if(!r.consumable.consume(n.item,i.name))return;n.item.is("selection")?r.writer.wrap(r.writer.document.selection.getFirstRange(),t(r.writer)):r.writer.wrap(r.mapper.toViewRange(n.range),t(r.writer))}}};e.on(`attribute:${n.id}`,i(!1),{priority:s.priorities.high-1}),e.on(`attribute:${n.id}`,i(!0),{priority:s.priorities.high-2})}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})})}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document,i=e=>{this._linkOpeners.some(t=>t(e))||L(e)};this.listenTo(t,"click",(e,t)=>{if(!(s.env.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let n=t.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const r=n.getAttribute("href");r&&(e.stop(),t.preventDefault(),i(r))},{context:"$capture"}),this.listenTo(t,"keydown",(t,n)=>{const r=e.commands.get("link").value;!!r&&n.keyCode===s.keyCodes.enter&&n.altKey&&(t.stop(),i(r))})}_enableSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(t,"change:attribute",(i,{attributeKeys:n})=>{n.includes("linkHref")&&!t.hasAttribute("linkHref")&&e.change(t=>{var i;!function(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i)}(t,(i=e.schema,i.getDefinition("$text").allowAttributes.filter(e=>e.startsWith("link"))))})})}_enableClipboardIntegration(){const e=this.editor,t=e.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",(e,n)=>{t.change(e=>{const t=e.createRangeIn(n.content);for(const n of t.getItems())if(n.hasAttribute("linkHref")){const t=y(n.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,n)}})})}_enableDecoratorConflictPostfixer(){const e=this.editor,t=e.model,i=e.commands.get("link");t.document.registerPostFixer(e=>{let n=!1;const r=t.document.differ.getChanges(),s=new Set,o=new Set(i.manualDecorators.map(e=>e.id));for(const e of r){if("attribute"===e.type){if("linkHref"!==e.attributeKey&&!o.has(e.attributeKey))continue;for(const t of e.range.getItems())t.hasAttribute("linkHref")&&s.add(t)}"insert"===e.type&&e.attributes.has("linkHref")&&e.position.nodeAfter&&s.add(e.position.nodeAfter)}for(const t of s){const r=[];for(const s of i.manualDecorators)if(t.hasAttribute(s.id)){for(let i=r.length-1;i>=0;i--){const o=r[i];I(o,s)&&(e.removeAttribute(o.id,t),r.splice(i,1),n=!0)}r.push(s)}}return n})}}var Q=i(355),W=i(311),Z=i(901);class G extends W.ButtonView{constructor(e){super(e);const t=this.bindTemplate;this.set({href:void 0,withText:!0}),this.extendTemplate({attributes:{class:["ck-link-toolbar__preview"],href:t.to("href"),target:"_blank",rel:"noopener noreferrer"},on:{click:t.to(e=>{if(this.href){const t=()=>e.preventDefault();this.fire("navigate",this.href,t)}})}}),this.template.tag="a"}}var J=i(220),X={attributes:{"data-cke":!0}};X.setAttributes=R(),X.insert=H().bind(null,"head"),X.domAPI=N(),X.insertStyleElement=j();B()(J.A,X);J.A&&J.A.locals&&J.A.locals;var ee=i(29),te={attributes:{"data-cke":!0}};te.setAttributes=R(),te.insert=H().bind(null,"head"),te.domAPI=N(),te.insertStyleElement=j();B()(ee.A,te);ee.A&&ee.A.locals&&ee.A.locals;var ie=i(898),ne={attributes:{"data-cke":!0}};ne.setAttributes=R(),ne.insert=H().bind(null,"head"),ne.domAPI=N(),ne.insertStyleElement=j();B()(ie.A,ne);ie.A&&ie.A.locals&&ie.A.locals;class re extends W.View{focusTracker=new s.FocusTracker;keystrokes=new s.KeystrokeHandler;backButtonView;saveButtonView;displayedTextInputView;urlInputView;children;providersListChildren;_validators;_focusables=new W.ViewCollection;_focusCycler;constructor(e,t){super(e),this._validators=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.displayedTextInputView=this._createDisplayedTextInput(),this.urlInputView=this._createUrlInput(),this.providersListChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView()]),this._createFormChildren(),this.listenTo(this.providersListChildren,"add",()=>{this.stopListening(this.providersListChildren,"add"),this.children.add(this._createProvidersListView())}),this._focusCycler=new W.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-link-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,W.submitHandler)({view:this});[this.urlInputView,this.saveButtonView,...this.providersListChildren,this.backButtonView,this.displayedTextInputView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createBackButton(){const e=this.locale.t,t=new W.ButtonView(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:Q.IconPreviousArrow,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new W.ButtonView(this.locale);return t.set({label:e("Insert"),tooltip:!1,withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new W.FormHeaderView(this.locale,{label:e("Link")});return t.children.add(this.backButtonView,0),t}_createProvidersListView(){const e=new W.ListView(this.locale);return e.extendTemplate({attributes:{class:["ck-link-form__providers-list"]}}),e.items.bindTo(this.providersListChildren).using(e=>{const t=new W.ListItemView(this.locale);return t.children.add(e),t}),e}_createDisplayedTextInput(){const e=this.locale.t,t=new W.LabeledFieldView(this.locale,W.createLabeledInputText);return t.label=e("Displayed text"),t.class="ck-labeled-field-view_full-width",t}_createUrlInput(){const e=this.locale.t,t=new W.LabeledFieldView(this.locale,W.createLabeledInputText);return t.fieldView.inputMode="url",t.label=e("Link URL"),t.class="ck-labeled-field-view_full-width",t}_createFormChildren(){this.children.add(new W.FormRowView(this.locale,{children:[this.displayedTextInputView],class:["ck-form__row_large-top-padding"]})),this.children.add(new W.FormRowView(this.locale,{children:[this.urlInputView,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding","ck-form__row_large-bottom-padding"]}))}get url(){const{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}}const se='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>';var oe=i(482),ae={attributes:{"data-cke":!0}};ae.setAttributes=R(),ae.insert=H().bind(null,"head"),ae.domAPI=N(),ae.insertStyleElement=j();B()(oe.A,ae);oe.A&&oe.A.locals&&oe.A.locals;class le extends W.View{focusTracker=new s.FocusTracker;keystrokes=new s.KeystrokeHandler;backButtonView;listView;listChildren;emptyListInformation;children;_focusables=new W.ViewCollection;_focusCycler;constructor(e){super(e),this.listChildren=this.createCollection(),this.backButtonView=this._createBackButton(),this.listView=this._createListView(),this.emptyListInformation=this._createEmptyLinksListItemView(),this.children=this.createCollection([this._createHeaderView(),this.emptyListInformation]),this.set("title",""),this.set("emptyListPlaceholder",""),this.set("hasItems",!1),this.listenTo(this.listChildren,"change",()=>{this.hasItems=this.listChildren.length>0}),this.on("change:hasItems",(e,t,i)=>{i?(this.children.remove(this.emptyListInformation),this.children.add(this.listView)):(this.children.remove(this.listView),this.children.add(this.emptyListInformation))}),this.keystrokes.set("Esc",(e,t)=>{this.fire("cancel"),t()}),this._focusCycler=new W.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-providers"],tabindex:"-1"},children:this.children})}render(){super.render();[this.listView,this.backButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createListView(){const e=new W.ListView(this.locale);return e.extendTemplate({attributes:{class:["ck-link-providers__list"]}}),e.items.bindTo(this.listChildren).using(e=>{const t=new W.ListItemView(this.locale);return t.children.add(e),t}),e}_createBackButton(){const e=this.locale.t,t=new W.ButtonView(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:se,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createHeaderView(){const e=new W.FormHeaderView(this.locale);return e.bind("label").to(this,"title"),e.children.add(this.backButtonView,0),e}_createEmptyLinksListItemView(){const e=new W.View(this.locale);return e.setTemplate({tag:"p",attributes:{class:["ck","ck-link__empty-list-info"]},children:[{text:this.bindTemplate.to("emptyListPlaceholder")}]}),e}}var ce=i(196),de={attributes:{"data-cke":!0}};de.setAttributes=R(),de.insert=H().bind(null,"head"),de.domAPI=N(),de.insertStyleElement=j();B()(ce.A,de);ce.A&&ce.A.locals&&ce.A.locals;class ue extends W.View{focusTracker=new s.FocusTracker;keystrokes=new s.KeystrokeHandler;backButtonView;children;listChildren;_focusables=new W.ViewCollection;_focusCycler;constructor(e){super(e),this.backButtonView=this._createBackButton(),this.listChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView(),this._createListView()]),this._focusCycler=new W.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-properties"],tabindex:"-1"},children:this.children}),this.keystrokes.set("Esc",(e,t)=>{this.fire("back"),t()})}render(){super.render();[...this.listChildren,this.backButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBackButton(){const e=this.locale.t,t=new W.ButtonView(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:se,tooltip:!0}),t.delegate("execute").to(this,"back"),t}_createHeaderView(){const e=this.locale.t,t=new W.FormHeaderView(this.locale,{label:e("Link properties")});return t.children.add(this.backButtonView,0),t}_createListView(){const e=new W.ListView(this.locale);return e.extendTemplate({attributes:{class:["ck-link__list"]}}),e.items.bindTo(this.listChildren).using(e=>{const t=new W.ListItemView(this.locale);return t.children.add(e),t}),e}}class he extends W.ButtonView{arrowView;constructor(e){super(e),this.set({withText:!0}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-link__button"]}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new W.IconView;return e.content='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382z"/></svg>',e}}var ke=i(662),me={attributes:{"data-cke":!0}};me.setAttributes=R(),me.insert=H().bind(null,"head"),me.domAPI=N(),me.insertStyleElement=j();B()(ke.A,me);ke.A&&ke.A.locals&&ke.A.locals;const fe="link-ui";class pe extends e.Plugin{toolbarView=null;formView=null;linkProviderItemsView=null;propertiesView=null;_balloon;_linksProviders=new s.Collection;static get requires(){return[W.ContextualBalloon,Y]}static get pluginName(){return"LinkUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;this.set("selectedLinkableText",void 0),e.editing.view.addObserver(o.ClickObserver),this._balloon=e.plugins.get(W.ContextualBalloon),this._registerComponents(),this._registerEditingOpeners(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:fe,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:fe,view:(e,{writer:t})=>{if(!e.markerRange.isCollapsed)return null;const i=t.createUIElement("span");return t.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],i),i}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:f},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.propertiesView&&this.propertiesView.destroy(),this.formView&&this.formView.destroy(),this.toolbarView&&this.toolbarView.destroy(),this.linkProviderItemsView&&this.linkProviderItemsView.destroy()}registerLinksListProvider(e){const t=this._linksProviders.filter(t=>(t.order||0)<=(e.order||0)).length;this._linksProviders.add(e,t)}_createViews(){const e=this.editor.commands.get("link");this.toolbarView=this._createToolbarView(),this.formView=this._createFormView(),e.manualDecorators.length&&(this.propertiesView=this._createPropertiesView()),this._enableUserBalloonInteractions()}_createToolbarView(){const e=this.editor,t=new W.ToolbarView(e.locale),i=e.commands.get("link");t.class="ck-link-toolbar";let n=e.config.get("link.toolbar");return i.manualDecorators.length||(n=n.filter(e=>"linkProperties"!==e)),t.fillFromConfig(n,e.ui.componentFactory),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(f,(e,t)=>{this._addFormView(),t()}),e.ui.addToolbar(t,{isContextual:!0,beforeFocus:()=>{this._getSelectedLinkElement()&&!this._isToolbarVisible&&this._showUI(!0)},afterBlur:()=>{this._hideUI(!1)}}),t}_createFormView(){const e=this.editor,t=e.locale.t,i=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),r=new((0,W.CssTransitionDisablerMixin)(re))(e.locale,function(e){const t=e.t,i=e.config.get("link.allowCreatingEmptyLinks");return[e=>{if(!i&&!e.url.length)return t("Link URL must not be empty.")}]}(e));return r.displayedTextInputView.bind("isEnabled").to(this,"selectedLinkableText",e=>void 0!==e),r.urlInputView.bind("isEnabled").to(i,"isEnabled"),r.saveButtonView.bind("isEnabled").to(i,"isEnabled"),r.saveButtonView.bind("label").to(i,"value",e=>t(e?"Update":"Insert")),this.listenTo(r,"submit",()=>{if(r.isValid()){const t=y(r.urlInputView.fieldView.element.value,n),i=r.displayedTextInputView.fieldView.element.value;e.execute("link",t,this._getDecoratorSwitchesState(),i!==this.selectedLinkableText?i:void 0),this._closeFormView()}}),this.listenTo(r.urlInputView,"change:errorText",()=>{e.ui.update()}),this.listenTo(r,"cancel",()=>{this._closeFormView()}),r.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),r.providersListChildren.bindTo(this._linksProviders).using(e=>this._createLinksListProviderButton(e)),r}_createLinkProviderListView(e){return e.getListItems().map(({href:e,label:t,icon:i})=>{const n=new W.ButtonView;return n.set({label:t,icon:i,tooltip:!1,withText:!0}),n.on("execute",()=>{this.formView.resetFormStatus(),this.formView.urlInputView.fieldView.value=e,this.editor.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),n})}_createLinkProviderItemsView(e){const t=this.editor,i=t.locale.t,n=new le(t.locale),{emptyListPlaceholder:r,label:s}=e;return n.emptyListPlaceholder=r||i("No links available"),n.title=s,this.listenTo(n,"cancel",()=>{t.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),n}_createPropertiesView(){const e=this.editor,t=this.editor.commands.get("link"),i=new((0,W.CssTransitionDisablerMixin)(ue))(e.locale);return this.listenTo(i,"back",()=>{e.editing.view.focus(),this._removePropertiesView()}),i.listChildren.bindTo(t.manualDecorators).using(i=>{const n=new W.SwitchButtonView(e.locale);return n.set({label:i.label,withText:!0}),n.bind("isOn").toMany([i,t],"value",(e,t)=>void 0===t&&void 0===e?!!i.defaultValue:!!e),n.on("execute",()=>{e.execute("link",t.value,{...this._getDecoratorSwitchesState(),[i.id]:!n.isOn})}),n}),i}_getDecoratorSwitchesState(){const e=this.editor.commands.get("link");return Array.from(e.manualDecorators).reduce((t,i)=>{const n=void 0===e.value&&void 0===i.value?i.defaultValue:i.value;return{...t,[i.id]:!!n}},{})}_registerEditingOpeners(){this.editor.plugins.get(Y)._registerLinkOpener(e=>{const t=this._getLinkProviderLinkByHref(e);if(!t)return!1;const{item:i,provider:n}=t;return!!n.navigate&&n.navigate(i)})}_registerComponents(){const e=this.editor;e.ui.componentFactory.add("link",()=>{const e=this._createButton(W.ButtonView);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:link",()=>{const e=this._createButton(W.MenuBarMenuListItemButtonView);return e.set({role:"menuitemcheckbox"}),e}),e.ui.componentFactory.add("linkPreview",t=>{const i=new G(t),n=e.config.get("link.allowedProtocols"),r=e.commands.get("link"),s=t.t;i.bind("isEnabled").to(r,"value",e=>!!e),i.bind("href").to(r,"value",e=>e&&b(e,n));const o=e=>{if(!e)return i.label=void 0,i.icon=void 0,void(i.tooltip=s("Open link in new tab"));const t=this._getLinkProviderLinkByHref(e);if(t){const{label:e,tooltip:n,icon:r}=t.item;i.label=e,i.tooltip=n||!1,i.icon=r}else i.label=e,i.icon=void 0,i.tooltip=s("Open link in new tab")};return o(r.value),this.listenTo(r,"change:value",(e,t,i)=>{o(i)}),this.listenTo(i,"navigate",(e,t,i)=>{const n=this._getLinkProviderLinkByHref(t);if(!n)return;const{provider:r,item:s}=n,{navigate:o}=r;o&&o(s)&&(e.stop(),i())}),i}),e.ui.componentFactory.add("unlink",t=>{const i=e.commands.get("unlink"),n=new W.ButtonView(t),r=t.t;return n.set({label:r("Unlink"),icon:Q.IconUnlink,tooltip:!0}),n.bind("isEnabled").to(i),this.listenTo(n,"execute",()=>{e.execute("unlink"),this._hideUI()}),n}),e.ui.componentFactory.add("editLink",t=>{const i=e.commands.get("link"),n=new W.ButtonView(t),r=t.t;return n.set({label:r("Edit link"),icon:Q.IconPencil,tooltip:!0}),n.bind("isEnabled").to(i),this.listenTo(n,"execute",()=>{this._addFormView()}),n}),e.ui.componentFactory.add("linkProperties",t=>{const i=e.commands.get("link"),n=new W.ButtonView(t),r=t.t;return n.set({label:r("Link properties"),icon:Q.IconSettings,tooltip:!0}),n.bind("isEnabled").to(i,"isEnabled",i,"value",i,"manualDecorators",(e,t,i)=>e&&!!t&&i.length>0),this.listenTo(n,"execute",()=>{this._addPropertiesView()}),n})}_createLinksListProviderButton(e){const t=this.editor.locale,i=new he(t);return i.set({label:e.label}),this.listenTo(i,"execute",()=>{this._showLinksProviderView(e)}),i}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("link"),r=new e(t.locale),s=i.t;return r.set({label:s("Link"),icon:Q.IconLink,keystroke:f,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",e=>!!e),this.listenTo(r,"execute",()=>{t.editing.view.scrollToTheSelection(),this._showUI(!0),this._getSelectedLinkElement()&&this._addFormView()}),r}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),e.keystrokes.set(f,(t,i)=>{i(),e.commands.get("link").isEnabled&&(e.editing.view.scrollToTheSelection(),this._showUI(!0))})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,t)=>{this._isToolbarVisible&&!this.toolbarView.focusTracker.isFocused&&(this.toolbarView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),(0,W.clickOutsideHandler)({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>{this._hideUI(!1)}})}_addToolbarView(){this.toolbarView||this._createViews(),this._isToolbarInPanel||this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this.formView.backButtonView.isVisible=e.isEnabled&&!!e.value,this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.selectedLinkableText=this._getSelectedLinkableText(),this.formView.displayedTextInputView.fieldView.value=this.selectedLinkableText||"",this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_addPropertiesView(){this.propertiesView||this._createViews(),this._arePropertiesInPanel||(this.propertiesView.disableCssTransitions(),this._balloon.add({view:this.propertiesView,position:this._getBalloonPositionData()}),this.propertiesView.enableCssTransitions(),this.propertiesView.focus())}_showLinksProviderView(e){this.linkProviderItemsView&&this._removeLinksProviderView(),this.linkProviderItemsView=this._createLinkProviderItemsView(e),this._addLinkProviderItemsView(e)}_addLinkProviderItemsView(e){this.linkProviderItemsView.listChildren.clear(),this.linkProviderItemsView.listChildren.addMany(this._createLinkProviderListView(e)),this._balloon.add({view:this.linkProviderItemsView,position:this._getBalloonPositionData()}),this.linkProviderItemsView.focus()}_closeFormView(){const e=this.editor.commands.get("link");this.selectedLinkableText=void 0,void 0!==e.value?this._removeFormView():this._hideUI()}_removePropertiesView(){this._arePropertiesInPanel&&this._balloon.remove(this.propertiesView)}_removeLinksProviderView(){this._isLinksListInPanel&&this._balloon.remove(this.linkProviderItemsView)}_removeFormView(e=!0){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.displayedTextInputView.fieldView.reset(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),e&&this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._isToolbarVisible?this._addFormView():this._addToolbarView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addToolbarView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(e=!0){const t=this.editor;this._isUIInPanel&&(this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e&&t.editing.view.focus(),this._removeLinksProviderView(),this._removePropertiesView(),this._removeFormView(e),this._isToolbarInPanel&&this._balloon.remove(this.toolbarView),this._hideFakeVisualSelection())}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=s();const r=()=>{const e=this._getSelectedLinkElement(),t=s();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function s(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}get _arePropertiesInPanel(){return!!this.propertiesView&&this._balloon.hasView(this.propertiesView)}get _isLinksListInPanel(){return!!this.linkProviderItemsView&&this._balloon.hasView(this.linkProviderItemsView)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _isToolbarInPanel(){return!!this.toolbarView&&this._balloon.hasView(this.toolbarView)}get _isPropertiesVisible(){return!!this.propertiesView&&this._balloon.visibleView===this.propertiesView}get _isFormVisible(){return!!this.formView&&this._balloon.visibleView==this.formView}get _isToolbarVisible(){return!!this.toolbarView&&this._balloon.visibleView===this.toolbarView}get _isUIInPanel(){return this._arePropertiesInPanel||this._isLinksListInPanel||this._isFormInPanel||this._isToolbarInPanel}get _isUIVisible(){return this._isPropertiesVisible||this._isLinksListInPanel||this._isFormVisible||this._isToolbarVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;if(this.editor.model.markers.has(fe)){const t=this.editor.editing.mapper.markerNameToElements(fe);if(t){const i=Array.from(t),n=e.createRange(e.createPositionBefore(i[0]),e.createPositionAfter(i[i.length-1]));return{target:e.domConverter.viewRangeToDom(n)}}}return{target:()=>{const i=this._getSelectedLinkElement();return i?e.domConverter.mapViewToDom(i):e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&(0,Z.isWidget)(i))return ge(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=ge(i.start),r=ge(i.end);return n&&n==r&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_getSelectedLinkableText(){const e=this.editor.model,t=this.editor.editing,i=this._getSelectedLinkElement();if(!i)return A(e.document.selection.getFirstRange());const n=t.view.createRangeOn(i);return A(t.mapper.toModelRange(n))}_getLinkProviderLinkByHref(e){if(!e)return null;for(const t of this._linksProviders){const i=t.getItem?t.getItem(e):t.getListItems().find(t=>t.href===e);if(i)return{provider:t,item:i}}return null}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(fe))t.updateMarker(fe,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition(({item:t})=>!e.schema.isContent(t),{boundaries:i});t.addMarker(fe,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(fe,{usingOperation:!1,affectsData:!1,range:i})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(fe)&&e.change(e=>{e.removeMarker(fe)})}}function ge(e){return e.getAncestors().find(e=>p(e))||null}const be=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63}))|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class we extends e.Plugin{static get requires(){return[t.Delete,Y]}static get pluginName(){return"AutoLink"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,i){return i.textNode&&i.textNode.hasAttribute("linkHref")?(0,t.findAttributeRange)(i,"linkHref",i.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const i=this.editor.model,n=i.document.selection,r=n.getFirstPosition(),s=n.getLastPosition();let o=t.getJoined(this._expandLinkRange(i,r)||t);o&&(o=o.getJoined(this._expandLinkRange(i,s)||t)),o&&(o.start.isBefore(r)||o.end.isAfter(s))&&e.setSelection(o)}_enablePasteLinking(){const e=this.editor,t=e.model,i=t.document.selection,n=e.plugins.get("ClipboardPipeline"),r=e.commands.get("link");n.on("inputTransformation",(e,n)=>{if(!this.isEnabled||!r.isEnabled||i.isCollapsed||"paste"!==n.method)return;if(i.rangeCount>1)return;const s=i.getFirstRange(),o=n.dataTransfer.getData("text/plain");if(!o)return;const a=o.match(be);a&&a[2]===o&&(t.change(e=>{this._selectEntireLinks(e,s),r.execute(o)}),e.stop())},{priority:"high"})}_enableTypingHandling(){const e=this.editor,i=new t.TextWatcher(e.model,e=>{let t=e;if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(t))return;t=t.slice(0,-1),"!.:,;?".includes(t[t.length-1])&&(t=t.slice(0,-1));const i=ve(t);return i?{url:i,removedTrailingCharacters:e.length-t.length}:void 0});i.on("matched:data",(t,i)=>{const{batch:n,range:r,url:s,removedTrailingCharacters:o}=i;if(!n.isTyping)return;const a=r.end.getShiftedBy(-o),l=a.getShiftedBy(-s.length),c=e.model.createRange(l,a);this._applyAutoLink(s,c)}),i.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition();let i;i=e.parent.previousSibling?.is("element")?t.createRangeIn(e.parent.previousSibling):t.createRange(t.createPositionAt(e.parent,0),e),this._checkAndApplyAutoLinkOnRange(i)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)})}_checkAndApplyAutoLinkOnRange(e){const i=this.editor.model,{text:n,range:r}=(0,t.getLastTextLine)(e,i),s=ve(n);if(s){const e=i.createRange(r.end.getShiftedBy(-s.length),r.end);this._applyAutoLink(s,e)}}_applyAutoLink(e,t){const i=this.editor.model,n=y(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&x(n)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const i=this.editor.model,n=this.editor.plugins.get("Delete");i.enqueueChange(r=>{r.setAttribute("linkHref",e,t),i.enqueueChange(()=>{n.requestUndoOnBackspace()})})}}function ve(e){const t=be.exec(e);return t?t[2]:null}class _e extends e.Plugin{static get requires(){return[Y,pe,we]}static get pluginName(){return"Link"}static get isOfficialPlugin(){return!0}}class Ve extends e.Plugin{static get requires(){return["ImageEditing","ImageUtils",Y]}static get pluginName(){return"LinkImageEditing"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,n,r)=>{const s=n.viewItem,o=i.findViewImgElement(s);if(!o)return;const a=o.findAncestor(e=>i.isBlockImageView(e));if(t&&!a)return;const l={attributes:["href"]};if(!r.consumable.test(s,l))return;const c=s.getAttribute("href"),d=n.modelCursor.parent;d.is("element","imageBlock")&&(r.writer.setAttribute("linkHref",c,d),r.consumable.consume(s,l))},{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",(e,i,n)=>{if(!n.consumable.consume(i.item,e.name))return;const r=n.mapper.toViewElement(i.item),s=n.writer,o=Array.from(r.getChildren()).find(e=>e.is("element","a")),a=t.findViewImgElement(r),l=a.parent.is("element","picture")?a.parent:a;if(o)i.attributeNewValue?s.setAttribute("href",i.attributeNewValue,o):(s.move(s.createRangeOn(l),s.createPositionAt(r,0)),s.remove(o));else{const e=s.createContainerElement("a",{href:i.attributeNewValue});s.insert(s.createPositionAt(r,0),e),s.move(s.createRangeOn(l),s.createPositionAt(e,0))}},{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(ye(i)),e.conversion.for("upcast").add(xe(e,i))}}function ye(e){return t=>{const i=t=>(i,n,r)=>{const o=r.mapper.toViewElement(n.item),a=Array.from(o.getChildren()).find(e=>e.is("element","a"));if(a){if(!t&&n.attributeOldValue){for(const[t,i]of(0,s.toMap)(e.attributes))r.writer.removeAttribute(t,i,a);e.classes&&r.writer.removeClass(e.classes,a);for(const t in e.styles)r.writer.removeStyle(t,a)}if(t&&n.attributeNewValue){for(const[t,i]of(0,s.toMap)(e.attributes))r.writer.setAttribute(t,i,!1,a);e.classes&&r.writer.addClass(e.classes,a);for(const t in e.styles)r.writer.setStyle(t,e.styles[t],a)}}};t.on(`attribute:${e.id}:imageBlock`,i(!1),{priority:s.priorities.high-1}),t.on(`attribute:${e.id}:imageBlock`,i(!0),{priority:s.priorities.high-2})}}function xe(e,t){const i=e.plugins.has("ImageInlineEditing"),n=e.plugins.get("ImageUtils");return e=>{e.on("element:a",(e,r,s)=>{const a=r.viewItem,l=n.findViewImgElement(a);if(!l)return;const c=l.findAncestor(e=>n.isBlockImageView(e));if(i&&!c)return;const d=new o.Matcher(t._createPattern()).match(a);if(!d)return;if(!s.consumable.test(a,d.match))return;const u=r.modelCursor.parent;u?.is("element","imageBlock")&&(s.writer.setAttribute(t.id,!0,u),s.consumable.consume(a,d.match))},{priority:"high"})}}class Le extends e.Plugin{static get requires(){return[Y,pe,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(t,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),t.stop())},{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",i=>{const n=new W.ButtonView(i),r=e.plugins.get("LinkUI"),s=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:Q.IconLink,keystroke:f,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(s,"isEnabled"),n.bind("isOn").to(s,"value",e=>!!e),this.listenTo(n,"execute",()=>{this._isSelectedLinkedImage(e.model.document.selection)?r._addToolbarView():r._showUI(!0)}),n})}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}var Ae=i(244),Ie={attributes:{"data-cke":!0}};Ie.setAttributes=R(),Ie.insert=H().bind(null,"head"),Ie.domAPI=N(),Ie.insertStyleElement=j();B()(Ae.A,Ie);Ae.A&&Ae.A.locals&&Ae.A.locals;class Te extends e.Plugin{static get requires(){return[Ve,Le]}static get pluginName(){return"LinkImage"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).link=n})();;
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Arabic-indic":"Arabic-indic","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Circle:"Circle",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease list item indent":"Decrease list item indent",Disc:"Disc","Entering a to-do list":"Entering a to-do list","Increase list item indent":"Increase list item indent","Invalid start index value.":"Invalid start index value.","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Leaving a to-do list":"Leaving a to-do list","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Reversed order":"Reversed order",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.","To-do List":"To-do List","Toggle the arabic-indic list style":"Toggle the arabic-indic list style","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={100:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}",""]);const l=o},160:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,":root{--ck-content-font-size-tiny:0.7em;--ck-content-font-size-small:0.85em;--ck-content-font-size-big:1.4em;--ck-content-font-size-huge:1.8em}.ck-content .text-tiny{font-size:var(--ck-content-font-size-tiny)}.ck-content .text-small{font-size:var(--ck-content-font-size-small)}.ck-content .text-big{font-size:var(--ck-content-font-size-big)}.ck-content .text-huge{font-size:var(--ck-content-font-size-huge)}",""]);const l=o},163:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},237:t=>{"use strict";t.exports=CKEditor5.dll},305:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i}).join("")},e.i=function(t,i,n,s,r){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(o[a]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);n&&o[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),e.push(u))}},e}},311:(t,e,i)=>{t.exports=i(237)("./src/ui.js")},331:(t,e,i)=>{t.exports=i(237)("./src/clipboard.js")},355:(t,e,i)=>{t.exports=i(237)("./src/icons.js")},424:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},507:(t,e,i)=>{t.exports=i(237)("./src/enter.js")},517:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}},584:(t,e,i)=>{t.exports=i(237)("./src/utils.js")},614:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,":root{--ck-content-list-marker-color:var(--ck-content-font-color);--ck-content-list-marker-font-family:var(--ck-content-font-family);--ck-content-list-marker-font-size:var(--ck-content-font-size)}.ck-content li>p:first-of-type{margin-top:0}.ck-content li>p:only-of-type{margin-bottom:0;margin-top:0}.ck-content li.ck-list-marker-bold::marker{font-weight:700}.ck-content li.ck-list-marker-italic::marker{font-style:italic}.ck-content li.ck-list-marker-color::marker{color:var(--ck-content-list-marker-color)}.ck-content li.ck-list-marker-font-family::marker{font-family:var(--ck-content-list-marker-font-family)}.ck-content li.ck-list-marker-font-size::marker{font-size:var(--ck-content-list-marker-font-size)}.ck-content li.ck-list-marker-font-size-tiny::marker{font-size:var(--ck-content-font-size-tiny)}.ck-content li.ck-list-marker-font-size-small::marker{font-size:var(--ck-content-font-size-small)}.ck-content li.ck-list-marker-font-size-big::marker{font-size:var(--ck-content-font-size-big)}.ck-content li.ck-list-marker-font-size-huge::marker{font-size:var(--ck-content-font-size-huge)}",""]);const l=o},712:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,':root{--ck-content-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px;position:relative}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-content-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-content-todo-list-checkmark-size)}.ck-content[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-content .todo-list .todo-list__label>input:before{transition:none}}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-content-todo-list-checkmark-size)/8) calc(var(--ck-content-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-content-todo-list-checkmark-size)/2.6);left:calc(var(--ck-content-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-content-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-content-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}.ck-editor__editable.ck-content .todo-list .todo-list__label>input,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{cursor:pointer}.ck-editor__editable.ck-content .todo-list .todo-list__label>input:hover:before,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-content-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-content-todo-list-checkmark-size)}.ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label>span[contenteditable=false]>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{transition:none}}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-content-todo-list-checkmark-size)/8) calc(var(--ck-content-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-content-todo-list-checkmark-size)/2.6);left:calc(var(--ck-content-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-content-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-content-todo-list-checkmark-size)/5.3)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:after{border-color:#fff}.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}',""]);const l=o},719:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var r={},o=[],l=0;l<t.length;l++){var a=t[l],c=n.base?a[0]+n.base:a[0],u=r[c]||0,d="".concat(c," ").concat(u);r[c]=u+1;var m=i(d),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==m)e[m].references++,e[m].updater(p);else{var f=s(p,n);n.byIndex=l,e.splice(l,0,{identifier:d,updater:f,references:1})}o.push(d)}return o}function s(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,s){var r=n(t=t||[],s=s||{});return function(t){t=t||[];for(var o=0;o<r.length;o++){var l=i(r[o]);e[l].references--}for(var a=n(t,s),c=0;c<r.length;c++){var u=i(r[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=a}}},740:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}",""]);const l=o},769:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}",""]);const l=o},782:(t,e,i)=>{t.exports=i(237)("./src/core.js")},783:(t,e,i)=>{t.exports=i(237)("./src/engine.js")},792:t=>{"use strict";t.exports=function(t){return t[1]}},834:(t,e,i)=>{t.exports=i(237)("./src/typing.js")},863:t=>{"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function n(t,e,n,s){var r;if(n)r="";else{r="",s.supports&&(r+="@supports (".concat(s.supports,") {")),s.media&&(r+="@media ".concat(s.media," {"));var o=void 0!==s.layer;o&&(r+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),r+=s.css,o&&(r+="}"),s.media&&(r+="}"),s.supports&&(r+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,r);else{var l=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(l,a[e]):t.appendChild(l)}}var s={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=s.singletonCounter++,i=s.singleton||(s.singleton=t.insertStyleElement(t));return{update:function(t){n(i,e,!1,t)},remove:function(t){n(i,e,!0,t)}}}},995:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(792),s=i.n(n),r=i(305),o=i.n(r)()(s());o.push([t.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}",""]);const l=o}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n),i.d(n,{AdjacentListsSupport:()=>Hi,CheckTodoListCommand:()=>Oe,LegacyCheckTodoListCommand:()=>Di,LegacyIndentCommand:()=>Ze,LegacyList:()=>Si,LegacyListCommand:()=>He,LegacyListEditing:()=>_i,LegacyListProperties:()=>zi,LegacyListPropertiesEditing:()=>Ei,LegacyListReversedCommand:()=>Ci,LegacyListStartCommand:()=>xi,LegacyListStyleCommand:()=>Ti,LegacyListUtils:()=>ui,LegacyTodoList:()=>Gi,LegacyTodoListEditing:()=>qi,List:()=>Kt,ListCommand:()=>N,ListEditing:()=>Rt,ListFormatting:()=>lt,ListIndentCommand:()=>E,ListItemBoldIntegration:()=>O,ListItemFontColorIntegration:()=>nt,ListItemFontFamilyIntegration:()=>st,ListItemFontSizeIntegration:()=>it,ListItemItalicIntegration:()=>z,ListMergeCommand:()=>V,ListProperties:()=>Be,ListPropertiesEditing:()=>_e,ListPropertiesUI:()=>Pe,ListPropertiesUtils:()=>ne,ListReversedCommand:()=>ee,ListSplitCommand:()=>B,ListStartCommand:()=>Ut,ListStyleCommand:()=>te,ListUI:()=>$t,ListUtils:()=>mt,TodoList:()=>Ge,TodoListEditing:()=>De,TodoListUI:()=>Ue,_ListBlocksIterable:()=>a,_ListPropertiesView:()=>Te,_ListWalker:()=>o,_SiblingListBlocksIterator:()=>l,_TodoCheckboxChangeObserver:()=>ze,_canBecomeSimpleListItem:()=>C,_createListElement:()=>bt,_createListItemElement:()=>ht,_createListUIComponents:()=>Mt,_createModelToViewListPositionMapper:()=>xt,_expandListBlocksToCompleteItems:()=>h,_expandListBlocksToCompleteList:()=>y,_findAndAddListHeadToMap:()=>It,_findMappedListItemViewElement:()=>Ct,_fixListIndents:()=>kt,_fixListItemIds:()=>wt,_getAllListItemBlocks:()=>d,_getAllSupportedListStyleTypes:()=>Yt,_getListIndent:()=>gt,_getListItemBlocks:()=>m,_getListItems:()=>f,_getListStyleTypeFromTypeAttribute:()=>Zt,_getListTypeFromListStyleType:()=>Xt,_getNestedListBlocks:()=>p,_getNormalizedListConfig:()=>ke,_getSelectedBlockObject:()=>T,_getTypeAttributeFromListStyleType:()=>Jt,_getViewElementIdForListType:()=>At,_getViewElementNameForListType:()=>yt,_indentListBlocks:()=>k,_isFirstBlockOfListItem:()=>g,_isLastBlockOfListItem:()=>b,_isListItemBlock:()=>u,_isListItemView:()=>ft,_isListView:()=>pt,_isNumberedListType:()=>x,_isSingleListItem:()=>_,_listItemBogusParagraphCreator:()=>Tt,_listItemDowncastConverter:()=>Lt,_listItemDowncastRemoveConverter:()=>St,_listItemUpcastConverter:()=>vt,_listPropertiesUpcastConverter:()=>ie,_mergeListItemBefore:()=>I,_normalizeListStyle:()=>Qt,_outdentFollowingListItems:()=>L,_outdentListBlocksWithMerge:()=>w,_reconvertListItemsOnDataChange:()=>_t,_removeListAttributes:()=>v,_sortListBlocks:()=>S,_splitListItemBefore:()=>A});var t=i(782),e=i(834),s=i(507),r=i(584);class o{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=(0,r.toArray)(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){const i=new this(t,e)[Symbol.iterator]();return(0,r.first)(i)}*[Symbol.iterator](){const t=[];for(const{node:e}of new l(this._getStartNode(),this._isForward?"forward":"backward")){const i=e.getAttribute("listIndent");if(i<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=i}else if(i>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some(t=>e.getAttribute(t)!==this._startElement.getAttribute(t)))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class l{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(t,e="forward"){this._node=t,this._isForward="forward"===e}[Symbol.iterator](){return this}next(){if(!u(this._node))return{done:!0,value:void 0};const t=this._node.getAttribute("listIndent");let e=null;if(this._previous){const i=this._previousNodeIndent;t>i?this._previousNodesByIndent[i]=this._previous:t<i?(e=this._previousNodesByIndent[t]||null,this._previousNodesByIndent.length=t):e=this._previous}const i={node:this._node,previous:this._previous,previousNodeInList:e};return this._previous=this._node,this._previousNodeIndent=t,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:i,done:!1}}}class a{_listHead;constructor(t){this._listHead=t}[Symbol.iterator](){return new l(this._listHead)}}class c{static next(){return(0,r.uid)()}}function u(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function d(t,e={}){return[...m(t,{...e,direction:"backward"}),...m(t,{...e,direction:"forward"})]}function m(t,e={}){const i="forward"==e.direction,n=Array.from(new o(t,{...e,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?n:n.reverse()}function p(t){return Array.from(new o(t,{direction:"forward",higherIndent:!0}))}function f(t,e){const i=new o(t,{sameIndent:!0,sameAttributes:"listType",...e}),n=new o(t,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...e});return[...Array.from(i).reverse(),...n]}function g(t){return!o.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function b(t){return!o.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function h(t,e={}){t=(0,r.toArray)(t);const i=!1!==e.withNested,n=new Set;for(const e of t)for(const t of d(e,{higherIndent:i}))n.add(t);return S(n)}function y(t){t=(0,r.toArray)(t);const e=new Set;for(const i of t)for(const t of f(i))e.add(t);return S(e)}function A(t,e){const i=m(t,{direction:"forward"}),n=c.next();for(const t of i)e.setAttribute("listItemId",n,t);return i}function I(t,e,i){const n={};for(const[t,i]of e.getAttributes())t.startsWith("list")&&(n[t]=i);const s=m(t,{direction:"forward"});for(const t of s)i.setAttributes(n,t);return s}function k(t,e,{expand:i,indentBy:n=1,attributeNames:s}){t=(0,r.toArray)(t);const o=i?h(t):t;for(const t of o){const i=t.getAttribute("listIndent")+n;i<0?v(t,e,s):e.setAttribute("listIndent",i,t)}return o}function w(t,e,{attributeNames:i}){const n=h(t=(0,r.toArray)(t)),s=new Set,l=Math.min(...n.map(t=>t.getAttribute("listIndent"))),a=new Map;for(const t of n)a.set(t,o.first(t,{lowerIndent:!0}));for(const t of n){if(s.has(t))continue;s.add(t);const n=t.getAttribute("listIndent")-1;if(n<0)v(t,e,i);else{if(t.getAttribute("listIndent")==l){const i=P(t,a.get(t),e);for(const t of i)s.add(t);if(i.length)continue}e.setAttribute("listIndent",n,t)}}return S(s)}function v(t,e,i){t=(0,r.toArray)(t);for(const i of t)i.is("element","listItem")&&e.rename(i,"paragraph");for(const n of t)for(const t of n.getAttributeKeys())i.includes(t)&&e.removeAttribute(t,n);return t}function _(t){if(!t.length)return!1;const e=t[0].getAttribute("listItemId");return!!e&&!t.some(t=>t.getAttribute("listItemId")!=e)}function L(t,e){const i=[];let n=Number.POSITIVE_INFINITY;for(const{node:s}of new l(t.nextSibling)){const t=s.getAttribute("listIndent");if(0==t)break;t<n&&(n=t);const r=t-n;e.setAttribute("listIndent",r,s),i.push(s)}return i}function S(t){return Array.from(t).filter(t=>"$graveyard"!==t.root.rootName).sort((t,e)=>t.index-e.index)}function T(t){const e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function C(t,e){return e.checkChild(t.parent,"listItem")&&e.checkChild(t,"$text")&&!e.isObject(t)}function x(t){return"numbered"==t||"customNumbered"==t}function P(t,e,i){return m(e,{direction:"forward"}).pop().index>t.index?I(t,e,i):[]}class E extends t.Command{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor,e=t.model,i=F(e.document.selection),n=t.plugins.get("ListEditing").getListAttributeNames();e.change(t=>{const e=[];_(i)&&!g(i[0])?("forward"==this._direction&&e.push(...k(i,t,{attributeNames:n})),e.push(...A(i[0],t))):"forward"==this._direction?e.push(...k(i,t,{expand:!0,attributeNames:n})):e.push(...w(i,t,{attributeNames:n}));for(const i of e){if(!i.hasAttribute("listType"))continue;const e=o.first(i,{sameIndent:!0});e&&t.setAttribute("listType",e.getAttribute("listType"),i)}this._fireAfterExecute(e)})}_fireAfterExecute(t){this.fire("afterExecute",S(new Set(t)))}_checkEnabled(){let t=F(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction)return!0;if(_(t)&&!g(t[0]))return!0;t=h(t),e=t[0];const i=o.first(e,{sameIndent:!0});return!!i&&i.getAttribute("listType")==e.getAttribute("listType")}}function F(t){const e=Array.from(t.getSelectedBlocks()),i=e.findIndex(t=>!u(t));return-1!=i&&(e.length=i),e}class N extends t.Command{type;_listWalkerOptions;constructor(t,e,i={}){super(t),this.type=e,this._listWalkerOptions=i.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=T(e),s=Array.from(i.selection.getSelectedBlocks()).filter(t=>e.schema.checkAttribute(t,"listType")||C(t,e.schema)),r=void 0!==t.forceValue?!t.forceValue:this.value;e.change(o=>{if(r){const t=s[s.length-1],e=this.editor.plugins.get("ListEditing").getListAttributeNames(),i=m(t,{direction:"forward"}),n=[];i.length>1&&n.push(...A(i[1],o)),n.push(...v(s,o,e)),n.push(...L(t,o)),this._fireAfterExecute(n)}else if((n||i.selection.isCollapsed)&&u(s[0])){const e=f(n||s[0],this._listWalkerOptions);for(const i of e)o.setAttributes({...t.additionalAttributes,listType:this.type},i);this._fireAfterExecute(e)}else{const i=[];for(const n of s)if(n.hasAttribute("listType"))for(const e of h(n,{withNested:!1}))e.getAttribute("listType")!=this.type&&(o.setAttributes({...t.additionalAttributes,listType:this.type},e),i.push(e));else!n.is("element","listItem")&&C(n,e.schema)&&o.rename(n,"listItem"),o.setAttributes({...t.additionalAttributes,listIndent:0,listItemId:c.next(),listType:this.type},n),i.push(n);this._fireAfterExecute(i)}})}_fireAfterExecute(t){this.fire("afterExecute",S(new Set(t)))}_getValue(){const t=this.editor.model.document.selection,e=Array.from(t.getSelectedBlocks());if(!e.length)return!1;for(const t of e)if(t.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const t=this.editor.model,e=t.schema,i=t.document.selection,n=Array.from(i.getSelectedBlocks());if(!n.length)return!1;if(this.value)return!0;for(const t of n)if(e.checkAttribute(t,"listType")||C(t,e))return!0;return!1}}class V extends t.Command{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:t=!1}={}){const e=this.editor,i=e.model,n=i.document.selection,s=[],r=e.plugins.get("ListEditing").getListAttributeNames();i.change(e=>{const{firstElement:o,lastElement:l}=this._getMergeSubjectElements(n,t),a=o.getAttribute("listIndent")||0,c=l.getAttribute("listIndent"),u=l.getAttribute("listItemId");if(a!=c){const t=p(l);s.push(...k([l,...t],e,{indentBy:a-c,expand:a<c,attributeNames:r}))}if(t){let t=n;n.isCollapsed&&(t=e.createSelection(e.createRange(e.createPositionAt(o,"end"),e.createPositionAt(l,0)))),i.deleteContent(t,{doNotResetEntireContent:n.isCollapsed});const r=t.getLastPosition().parent,a=r.nextSibling;s.push(r),a&&a!==l&&a.getAttribute("listItemId")==u&&s.push(...I(a,r,e))}else s.push(...I(l,o,e));this._fireAfterExecute(s)})}_fireAfterExecute(t){this.fire("afterExecute",S(new Set(t)))}_checkEnabled(){const t=this.editor.model,e=t.document.selection,i=T(t);if(e.isCollapsed||i){const t=i||e.getFirstPosition().parent;if(!u(t))return!1;const n="backward"==this._direction?t.previousSibling:t.nextSibling;if(!n)return!1;if(_([t,n]))return!1}else{const t=e.getLastPosition(),i=e.getFirstPosition();if(t.parent===i.parent)return!1;if(!u(t.parent))return!1}return!0}_getMergeSubjectElements(t,e){const i=T(this.editor.model);let n,s;if(t.isCollapsed||i){const r=i||t.getFirstPosition().parent,l=g(r);"backward"==this._direction?(s=r,n=l&&!e?o.first(r,{sameIndent:!0,lowerIndent:!0}):r.previousSibling):(n=r,s=r.nextSibling)}else n=t.getFirstPosition().parent,s=t.getLastPosition().parent;return{firstElement:n,lastElement:s}}}class B extends t.Command{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(t=>{const e=A(this._getStartBlock(),t);this._fireAfterExecute(e)})}_fireAfterExecute(t){this.fire("afterExecute",S(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&u(e)&&!g(e)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}class O extends t.Plugin{static get pluginName(){return"ListItemBoldIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Rt]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(Rt);t.plugins.has("BoldEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("bold","listItemBold"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemBold",setAttributeOnDowncast(t,e,i,n){e&&(t.addClass("ck-list-marker-bold",i),!r.env.isSafari||n&&n.dataPipeline||t.setStyle("--ck-content-list-marker-dummy-bold","0",i))}}))}afterInit(){const t=this.editor,e=t.model;t.plugins.has("BoldEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemBold"}),e.schema.setAttributeProperties("listItemBold",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemBold"),t.conversion.for("upcast").attributeToAttribute({model:"listItemBold",view:{name:"li",classes:"ck-list-marker-bold"}}))}}class z extends t.Plugin{static get pluginName(){return"ListItemItalicIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Rt]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(Rt);t.plugins.has("ItalicEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("italic","listItemItalic"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemItalic",setAttributeOnDowncast(t,e,i,n){e&&(t.addClass("ck-list-marker-italic",i),!r.env.isSafari||n&&n.dataPipeline||t.setStyle("--ck-content-list-marker-dummy-italic","0",i))}}))}afterInit(){const t=this.editor,e=t.model;t.plugins.has("ItalicEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemItalic"}),e.schema.setAttributeProperties("listItemItalic",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemItalic"),t.conversion.for("upcast").attributeToAttribute({model:"listItemItalic",view:{name:"li",classes:"ck-list-marker-italic"}}))}}var R=i(783);t.Command;var D=i(311);t.Plugin;var M=i(355);function j(t){return t.map(t=>function(t){"number"==typeof t&&(t=String(t));if("object"==typeof t&&(e=t,e.title&&e.model&&e.view))return K(t);var e;const i=function(t){return"string"==typeof t?$[t]:$[t.model]}(t);if(i)return K(i);if("default"===t)return{model:void 0,title:"Default"};if(function(t){let e;if("object"==typeof t){if(!t.model)throw new r.CKEditorError("font-size-invalid-definition",null,t);e=parseFloat(t.model)}else e=parseFloat(t);return isNaN(e)}(t))return;return function(t){"string"==typeof t&&(t={title:t,model:`${parseFloat(t)}px`});return t.view={name:"span",styles:{"font-size":t.model}},K(t)}(t)}(t)).filter(t=>void 0!==t)}const $={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function K(t){return t.view&&"string"!=typeof t.view&&!t.view.priority&&(t.view.priority=7),t}t.Plugin;var U=i(719),q=i.n(U),W=i(863),G=i.n(W),H=i(424),Y=i.n(H),X=i(517),Z=i.n(X),J=i(163),Q=i.n(J),tt=i(160),et={attributes:{"data-cke":!0}};et.setAttributes=Z(),et.insert=Y().bind(null,"head"),et.domAPI=G(),et.insertStyleElement=Q();q()(tt.A,et);tt.A&&tt.A.locals&&tt.A.locals;t.Plugin;t.Plugin;t.Plugin;class it extends t.Plugin{static get pluginName(){return"ListItemFontSizeIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Rt]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(Rt);if(!t.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;const n=j(t.config.get("fontSize.options"));e.registerFormatAttribute("fontSize","listItemFontSize"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontSize",setAttributeOnDowncast(t,e,i,s){if(e){const o=n.find(t=>t.model==e);o&&o.view&&"string"!=typeof o.view?o.view.styles?(t.addClass("ck-list-marker-font-size",i),t.setStyle("--ck-content-list-marker-font-size",o.view.styles["font-size"],i)):o.view.classes&&(t.addClass(`ck-list-marker-font-size-${e}`,i),!r.env.isSafari||s&&s.dataPipeline||t.setStyle("--ck-content-list-marker-dummy-font-size","0",i)):(t.addClass("ck-list-marker-font-size",i),t.setStyle("--ck-content-list-marker-font-size",e,i))}}})}afterInit(){const t=this.editor,e=t.model;if(!t.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;e.schema.extend("$listItem",{allowAttributes:"listItemFontSize"}),e.schema.setAttributeProperties("listItemFontSize",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontSize"),t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:t=>t.getStyle("--ck-content-list-marker-font-size")},view:{name:"li",classes:"ck-list-marker-font-size",styles:{"--ck-content-list-marker-font-size":/.*/}}});const i=j(t.config.get("fontSize.options"));for(const e of i)e.model&&e.view&&t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:e.model},view:{name:"li",classes:`ck-list-marker-font-size-${e.model}`}})}}class nt extends t.Plugin{static get pluginName(){return"ListItemFontColorIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Rt]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(Rt);t.plugins.has("FontColorEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("fontColor","listItemFontColor"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontColor",setAttributeOnDowncast(t,e,i){e&&(t.addClass("ck-list-marker-color",i),t.setStyle("--ck-content-list-marker-color",e,i))}}))}afterInit(){const t=this.editor,e=t.model;t.plugins.has("FontColorEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemFontColor"}),e.schema.setAttributeProperties("listItemFontColor",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontColor"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontColor",value:t=>t.getStyle("--ck-content-list-marker-color")},view:{name:"li",classes:"ck-list-marker-color",styles:{"--ck-content-list-marker-color":/.*/}}}))}}class st extends t.Plugin{static get pluginName(){return"ListItemFontFamilyIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Rt]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(Rt);t.plugins.has("FontFamilyEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("fontFamily","listItemFontFamily"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontFamily",setAttributeOnDowncast(t,e,i){e&&(t.addClass("ck-list-marker-font-family",i),t.setStyle("--ck-content-list-marker-font-family",e,i))}}))}afterInit(){const t=this.editor,e=t.model;t.plugins.has("FontFamilyEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemFontFamily"}),e.schema.setAttributeProperties("listItemFontFamily",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontFamily"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontFamily",value:t=>t.getStyle("--ck-content-list-marker-font-family")},view:{name:"li",classes:"ck-list-marker-font-family",styles:{"--ck-content-list-marker-font-family":/.*/}}}))}}var rt=i(614),ot={attributes:{"data-cke":!0}};ot.setAttributes=Z(),ot.insert=Y().bind(null,"head"),ot.domAPI=G(),ot.insertStyleElement=Q();q()(rt.A,ot);rt.A&&rt.A.locals&&rt.A.locals;class lt extends t.Plugin{_loadedFormatting={};static get pluginName(){return"ListFormatting"}static get isOfficialPlugin(){return!0}static get requires(){return[O,z,it,nt,st]}constructor(t){super(t),t.config.define("list.enableListItemMarkerFormatting",!0)}afterInit(){this.editor.config.get("list.enableListItemMarkerFormatting")&&this._registerPostfixerForListItemFormatting()}_registerPostfixerForListItemFormatting(){const t=this.editor.model;t.document.registerPostFixer(e=>{const i=t.document.differ.getChanges(),n=new Set;let s=!1;for(const t of i)if("attribute"===t.type)("listItemId"==t.attributeKey||"listType"==t.attributeKey||this._isInlineOrSelectionFormatting(t.attributeKey)||Object.values(this._loadedFormatting).includes(t.attributeKey))&&(u(t.range.start.nodeAfter)?n.add(t.range.start.nodeAfter):u(t.range.start.parent)&&n.add(t.range.start.parent));else if(u(t.position.nodeAfter)&&n.add(t.position.nodeAfter),u(t.position.nodeBefore)&&n.add(t.position.nodeBefore),u(t.position.parent)&&n.add(t.position.parent),"insert"==t.type&&"$text"!=t.name){const i=e.createRangeIn(t.position.nodeAfter);for(const t of i.getItems())u(t)&&n.add(t)}for(const i of n){const n=at(t,i,Object.keys(this._loadedFormatting));for(const[t,r]of Object.entries(n)){const n=this._loadedFormatting[t];(r&&ut(e,i,n,r)||!r&&dt(e,i,n))&&(s=!0)}}return s})}registerFormatAttribute(t,e){this._loadedFormatting[t]=e}_isInlineOrSelectionFormatting(t){return t.replace(/^selection:/,"")in this._loadedFormatting}}function at(t,e,i){if(g(e))return ct(t,e,i);return ct(t,d(e)[0],i)}function ct(t,e,i){if(!function(t){return["numbered","bulleted","customNumbered","customBulleted"].includes(t.getAttribute("listType"))}(e)||t.schema.isLimit(e))return Object.fromEntries(i.map(t=>[t]));if(e.isEmpty)return Object.fromEntries(i.map(t=>[t,e.getAttribute(`selection:${t}`)]));const n=new Set(i),s={},r=t.createRangeIn(e).getWalker({ignoreElementEnd:!0});for(const{item:e}of r){for(const i of n)if(t.schema.checkAttribute(e,i)){const t=e.getAttribute(i);void 0===t?(n.delete(i),s[i]=void 0):void 0===s[i]?s[i]=t:s[i]!==t&&(n.delete(i),s[i]=void 0)}else i in s||(s[i]=void 0);if(!n.size)break;t.schema.isLimit(e)&&r.jumpTo(t.createPositionAfter(e))}return s}function ut(t,e,i,n){const s=d(e);let r=!1;for(const e of s)e.hasAttribute(i)&&e.getAttribute(i)===n||(t.setAttribute(i,n,e),r=!0);return r}function dt(t,e,i){const n=d(e);let s=!1;for(const e of n)e.hasAttribute(i)&&(t.removeAttribute(i,e),s=!0);return s}class mt extends t.Plugin{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(t){return y(t)}isFirstBlockOfListItem(t){return g(t)}isListItemBlock(t){return u(t)}expandListBlocksToCompleteItems(t,e={}){return h(t,e)}isNumberedListType(t){return x(t)}isFirstListItemInList(t){return function(t){return!o.first(t,{sameIndent:!0,sameAttributes:"listType"})}(t)}}function pt(t){return t.is("element","ol")||t.is("element","ul")}function ft(t){return t.is("element","li")}function gt(t){let e=0,i=t.parent;for(;i;){if(ft(i))e++;else{const t=i.previousSibling;t&&ft(t)&&e++}i=i.parent}return e}function bt(t,e,i,n=At(i,e)){return t.createAttributeElement(yt(i),null,{priority:2*e/100-100,id:n})}function ht(t,e,i){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:i})}function yt(t){return"numbered"==t||"customNumbered"==t?"ol":"ul"}function At(t,e){return`list-${t}-${e}`}function It(t,e,i){const n=t.nodeBefore;if(u(n)){let t=n;for(const{node:s}of new l(t,"backward")){if(t=s,i.has(t))return;if(i.add(t),e.has(n))return}e.add(t)}else{const i=t.nodeAfter;u(i)&&e.add(i)}}function kt(t,e){let i=0,n=-1,s=null,r=!1;for(const{node:o}of t){const t=o.getAttribute("listIndent");if(t>i){let l;null===s?(s=t-i,l=i):(s>t&&(s=t),l=t-s),l>n+1&&(l=n+1),e.setAttribute("listIndent",l,o),r=!0,n=l}else s=null,i=t+1,n=t}return r}function wt(t,e,i){const n=new Set;let s=!1;for(const{node:r}of t){if(n.has(r))continue;let t=r.getAttribute("listType"),o=r.getAttribute("listItemId");if(e.has(o)&&(o=c.next()),e.add(o),r.is("element","listItem"))r.getAttribute("listItemId")!=o&&(i.setAttribute("listItemId",o,r),s=!0);else for(const e of m(r,{direction:"forward"}))n.add(e),e.getAttribute("listType")!=t&&(o=c.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=o&&(i.setAttribute("listItemId",o,e),s=!0)}return s}function vt(){return(t,e,i)=>{const{writer:n,schema:s}=i;if(!e.modelRange)return;const r=Array.from(e.modelRange.getItems({shallow:!0})).filter(t=>s.checkAttribute(t,"listItemId"));if(!r.length)return;const o=e.viewItem.getAttribute("data-list-item-id")||c.next();i.consumable.consume(e.viewItem,{attributes:"data-list-item-id"});const l=gt(e.viewItem);let a=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted";const u=r[0].getAttribute("listType");u&&(a=u);const d={listItemId:o,listIndent:l,listType:a};for(const t of r)t.hasAttribute("listItemId")||n.setAttributes(d,t);r.length>1&&r[1].getAttribute("listItemId")!=d.listItemId&&i.keepEmptyElement(r[0])}}function _t(t,e,i,n){return()=>{const n=t.document.differ.getChanges(),o=[],l=new Set,a=new Set,c=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name)It(t.position,l,c),t.attributes.has("listItemId")?a.add(t.position.nodeAfter):It(t.position.getShiftedBy(t.length),l,c);else if("remove"==t.type&&t.attributes.has("listItemId"))It(t.position,l,c);else if("attribute"==t.type){const e=t.range.start.nodeAfter;i.includes(t.attributeKey)?(It(t.range.start,l,c),null===t.attributeNewValue?(It(t.range.start.getShiftedBy(1),l,c),r(e)&&o.push(e)):a.add(e)):u(e)&&r(e)&&o.push(e)}for(const t of l.values())o.push(...s(t,a));for(const t of new Set(o))e.reconvertItem(t)};function s(t,e){const n=[],s=new Set,a=[];for(const{node:c,previous:u}of new l(t)){if(s.has(c))continue;const t=c.getAttribute("listIndent");u&&t<u.getAttribute("listIndent")&&(a.length=t+1),a[t]={modelAttributes:Object.fromEntries(Array.from(c.getAttributes()).filter(([t])=>i.includes(t))),modelElement:c};const l=m(c,{direction:"forward"});for(const t of l)s.add(t),(r(t,l)||o(t,a,e))&&n.push(t)}return n}function r(t,s){const r=e.mapper.toViewElement(t);if(!r)return!1;if(function(t){t=t.parent;for(;t.is("attributeElement")&&["ol","ul","li"].includes(t.name);)t=t.parent;if(t.getCustomProperty("$structureSlotParent")&&!e.mapper.toModelElement(t))return!0;return!1}(r))return!0;if(n.fire("checkElement",{modelElement:t,viewElement:r}))return!0;if(!t.is("element","paragraph")&&!t.is("element","listItem"))return!1;const o=Et(t,i,s);return!(!o||!r.is("element","p"))||!(o||!r.is("element","span"))}function o(t,i,s){if(s.has(t))return!1;const r=e.mapper.toViewElement(t);let o=i.length-1;for(let t=r.parent;!t.is("editableElement");t=t.parent){const e=ft(t),s=pt(t);if(!s&&!e)continue;const r="checkAttributes:"+(e?"item":"list");if(n.fire(r,{viewElement:t,modelAttributes:i[o].modelAttributes,modelReferenceElement:i[o].modelElement}))break;if(s&&(o--,o<0))return!1}return!0}}function Lt(t,e,i,{dataPipeline:n}={}){const s=function(t,e){const i=e.filter(t=>!1===t.consume).map(t=>t.attributeName);return(e,n)=>{const s=[];for(const n of t)e.hasAttribute(n)&&!i.includes(n)&&s.push(`attribute:${n}`);return!!s.every(t=>!1!==n.test(e,t))&&(s.forEach(t=>n.consume(e,t)),!0)}}(t,e);return(r,l,a)=>{const{writer:c,mapper:u,consumable:d}=a,m=l.item;if(!t.includes(l.attributeKey))return;if(!s(m,d))return;const p={...a.options,dataPipeline:n},f=Ct(m,u,i,c);Pt(f,c,u),function(t,e){let i=t.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const n=i.parent;e.unwrap(e.createRangeOn(t),i),i=n}}(f,c);const b=function(t,e,i,n,{dataPipeline:s}){let r=n.createRangeOn(e);if(!g(t))return r;for(const o of i){if("itemMarker"!=o.scope)continue;const i=o.createElement(n,t,{dataPipeline:s});if(!i)continue;if(n.setCustomProperty("listItemMarker",!0,i),o.canInjectMarkerIntoElement&&o.canInjectMarkerIntoElement(t)?n.insert(n.createPositionAt(e,0),i):(n.insert(r.start,i),r=n.createRange(n.createPositionBefore(i),n.createPositionAfter(e))),!o.createWrapperElement||!o.canWrapElement)continue;const l=o.createWrapperElement(n,t,{dataPipeline:s});n.setCustomProperty("listItemWrapper",!0,l),o.canWrapElement(t)?r=n.wrap(r,l):(r=n.wrap(n.createRangeOn(i),l),r=n.createRange(r.start,n.createPositionAfter(e)))}return r}(m,f,e,c,p);!function(t,e,i,n,s){if(!t.hasAttribute("listIndent"))return;const r=t.getAttribute("listIndent");let l=t;for(let t=r;t>=0;t--){const r=ht(n,t,l.getAttribute("listItemId")),a=bt(n,t,l.getAttribute("listType"));for(const t of i)"list"!=t.scope&&"item"!=t.scope||!l.hasAttribute(t.attributeName)||t.setAttributeOnDowncast(n,l.getAttribute(t.attributeName),"list"==t.scope?a:r,s,l);if(e=n.wrap(e,r),e=n.wrap(e,a),0==t)break;if(l=o.first(l,{lowerIndent:!0}),!l)break}}(m,b,e,c,p)}}function St(t){return(e,i,n)=>{const{writer:s,mapper:r}=n,o=e.name.split(":")[1];if(!t.checkAttribute(o,"listItemId"))return;const l=r.toViewPosition(i.position),a=i.position.getShiftedBy(i.length),c=r.toViewPosition(a,{isPhantom:!0}),u=s.createRange(l,c).getTrimmed().end.nodeBefore;u&&Pt(u,s,r)}}function Tt(t,{dataPipeline:e}={}){return(i,{writer:n})=>{if(!Et(i,t))return null;if(!e)return n.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const s=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,s),s}}function Ct(t,e,i,n){const s=i.createRangeOn(t),r=e.toViewRange(s).getTrimmed().getWalker();for(const{item:t}of r)if(t.is("element")&&t.getCustomProperty("listItemMarker"))r.jumpTo(n.createPositionAfter(t));else if(t.is("element")&&!t.getCustomProperty("listItemWrapper"))return t}function xt(t,e){return(i,n)=>{if(n.modelPosition.offset>0)return;const s=n.modelPosition.parent;if(!u(s))return;if(!t.some(t=>"itemMarker"==t.scope&&t.canInjectMarkerIntoElement&&t.canInjectMarkerIntoElement(s)))return;const r=n.mapper.toViewElement(s),o=e.createRangeIn(r),l=o.getWalker();let a=o.start;for(const{item:t}of l){if(t.is("element")&&n.mapper.toModelElement(t)||t.is("$textProxy"))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&(a=e.createPositionAfter(t),l.skip(({previousPosition:t})=>!t.isEqual(a)))}n.viewPosition=a}}function Pt(t,e,i){for(;t.parent.is("attributeElement")&&t.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(t),t.parent);const n=[];s(e.createPositionBefore(t).getWalker({direction:"backward"})),s(e.createRangeIn(t).getWalker());for(const t of n)e.remove(t);function s(t){for(const{item:e}of t){if(e.is("element")&&i.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&n.push(e)}}}function Et(t,e,i=d(t)){if(!u(t))return!1;for(const i of t.getAttributeKeys())if(!i.startsWith("selection:")&&"htmlEmptyBlock"!=i&&!e.includes(i))return!1;return i.length<2}var Ft=i(331),Nt=i(100),Vt={attributes:{"data-cke":!0}};Vt.setAttributes=Z(),Vt.insert=Y().bind(null,"head"),Vt.domAPI=G(),Vt.insertStyleElement=Q();q()(Nt.A,Vt);Nt.A&&Nt.A.locals&&Nt.A.locals;var Bt=i(995),Ot={attributes:{"data-cke":!0}};Ot.setAttributes=Z(),Ot.insert=Y().bind(null,"head"),Ot.domAPI=G(),Ot.insertStyleElement=Q();q()(Bt.A,Ot);Bt.A&&Bt.A.locals&&Bt.A.locals;const zt=["listType","listIndent","listItemId"];class Rt extends t.Plugin{_downcastStrategies=[];static get pluginName(){return"ListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[s.Enter,e.Delete,mt,Ft.ClipboardPipeline,lt]}constructor(t){super(t),t.config.define("list.multiBlock",!0)}init(){const t=this.editor,e=t.model,i=t.config.get("list.multiBlock");if(t.plugins.has("LegacyListEditing"))throw new r.CKEditorError("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});e.schema.register("$listItem",{allowAttributes:zt}),i?(e.schema.extend("$container",{allowAttributesOf:"$listItem"}),e.schema.extend("$block",{allowAttributesOf:"$listItem"}),e.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):e.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const t of zt)e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new N(t,"numbered")),t.commands.add("bulletedList",new N(t,"bulleted")),t.commands.add("customNumberedList",new N(t,"customNumbered",{multiLevel:!0})),t.commands.add("customBulletedList",new N(t,"customBulleted",{multiLevel:!0})),t.commands.add("indentList",new E(t,"forward")),t.commands.add("outdentList",new E(t,"backward")),t.commands.add("splitListItemBefore",new B(t,"before")),t.commands.add("splitListItemAfter",new B(t,"after")),i&&(t.commands.add("mergeListItemBackward",new V(t,"backward")),t.commands.add("mergeListItemForward",new V(t,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration(),this._setupListItemIdConversionStrategy()}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}getListAttributeNames(){return[...zt,...this._downcastStrategies.map(t=>t.attributeName)]}_setupDeleteIntegration(){const t=this.editor,e=t.commands.get("mergeListItemBackward"),i=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",(n,s)=>{const r=t.model.document.selection;T(t.model)||t.model.change(()=>{const l=r.getFirstPosition();if(r.isCollapsed&&"backward"==s.direction){if(!l.isAtStart)return;const i=l.parent;if(!u(i))return;if(o.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!e||!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:Dt(t.model,"backward")})}else b(i)||t.execute("splitListItemAfter"),t.execute("outdentList");s.preventDefault(),n.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!i||!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:Dt(t.model,"forward")}),s.preventDefault(),n.stop()}})},{context:"li"})}_setupEnterIntegration(){const t=this.editor,e=t.model,i=t.commands,n=i.get("enter");this.listenTo(t.editing.view.document,"enter",(i,n)=>{const s=e.document,r=s.selection.getFirstPosition().parent;if(s.selection.isCollapsed&&u(r)&&r.isEmpty&&!n.isSoft){const e=g(r),s=b(r);e&&s?(t.execute("outdentList"),n.preventDefault(),i.stop()):e&&!s?(t.execute("splitListItemAfter"),n.preventDefault(),i.stop()):s&&(t.execute("splitListItemBefore"),n.preventDefault(),i.stop())}},{context:"li"}),this.listenTo(n,"afterExecute",()=>{const e=i.get("splitListItemBefore");if(e.refresh(),!e.isEnabled)return;2===d(t.model.document.selection.getLastPosition().parent).length&&e.execute()})}_setupTabIntegration(){const t=this.editor;this.listenTo(t.editing.view.document,"tab",(e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())},{context:"li"})}_setupConversion(){const t=this.editor,e=t.model,i=this.getListAttributeNames(),n=t.config.get("list.multiBlock"),s=n?"paragraph":"listItem";t.conversion.for("upcast").elementToElement({view:"li",model:(t,{writer:e})=>e.createElement(s,{listType:""})}).elementToElement({view:"p",model:(t,{writer:e})=>t.parent&&t.parent.is("element","li")?e.createElement(s,{listType:""}):null,converterPriority:"high"}).add(t=>{t.on("element:li",vt())}),n||t.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),t.conversion.for("editingDowncast").elementToElement({model:s,view:Tt(i),converterPriority:"high"}).add(t=>{t.on("attribute",Lt(i,this._downcastStrategies,e)),t.on("remove",St(e.schema))}),t.conversion.for("dataDowncast").elementToElement({model:s,view:Tt(i,{dataPipeline:!0}),converterPriority:"high"}).add(t=>{t.on("attribute",Lt(i,this._downcastStrategies,e,{dataPipeline:!0}))});const r=xt(this._downcastStrategies,t.editing.view);t.editing.mapper.on("modelToViewPosition",r),t.data.mapper.on("modelToViewPosition",r),this.listenTo(e.document,"change:data",_t(e,t.editing,i,this),{priority:"high"}),this.on("checkAttributes:item",(t,{viewElement:e,modelAttributes:i})=>{e.id!=i.listItemId&&(t.return=!0,t.stop())}),this.on("checkAttributes:list",(t,{viewElement:e,modelAttributes:i})=>{e.name==yt(i.listType)&&e.id==At(i.listType,i.listIndent)||(t.return=!0,t.stop())})}_setupModelPostFixing(){const t=this.editor.model,e=this.getListAttributeNames();t.document.registerPostFixer(i=>function(t,e,i,n){const s=t.document.differ.getChanges(),r=new Set,o=new Set,l=n.editor.config.get("list.multiBlock");let c=!1;for(const n of s){if("insert"==n.type&&"$text"!=n.name){const s=n.position.nodeAfter;if(!t.schema.checkAttribute(s,"listItemId"))for(const t of Array.from(s.getAttributeKeys()))i.includes(t)&&(e.removeAttribute(t,s),c=!0);It(n.position,o,r),n.attributes.has("listItemId")||It(n.position.getShiftedBy(n.length),o,r);for(const{item:e,previousPosition:i}of t.createRangeIn(s))u(e)&&It(i,o,r)}else"remove"==n.type?It(n.position,o,r):"attribute"==n.type&&i.includes(n.attributeKey)&&(It(n.range.start,o,r),null===n.attributeNewValue&&It(n.range.start.getShiftedBy(1),o,r));if(!l&&"attribute"==n.type&&zt.includes(n.attributeKey)){const t=n.range.start.nodeAfter;null===n.attributeNewValue&&t&&t.is("element","listItem")?(e.rename(t,"paragraph"),c=!0):null===n.attributeOldValue&&t&&t.is("element")&&"listItem"!=t.name&&(e.rename(t,"listItem"),c=!0)}}const d=new Set;for(const t of o.values())c=n.fire("postFixer",{listNodes:new a(t),listHead:t,writer:e,seenIds:d})||c;return c}(t,i,e,this)),this.on("postFixer",(t,{listNodes:e,writer:i})=>{t.return=kt(e,i)||t.return},{priority:"high"}),this.on("postFixer",(t,{listNodes:e,writer:i,seenIds:n})=>{t.return=wt(e,n,i)||t.return},{priority:"high"})}_setupClipboardIntegration(){const t=this.editor.model,e=this.editor.plugins.get("ClipboardPipeline");this.listenTo(t,"insertContent",function(t){return(e,[i,n])=>{const s=i.is("documentFragment")?Array.from(i.getChildren()):[i];if(!s.length)return;const r=(n?t.createSelection(n):t.document.selection).getFirstPosition();let o;if(u(r.parent))o=r.parent;else{if(!u(r.nodeBefore)||!u(r.nodeAfter))return;o=r.nodeBefore}t.change(t=>{const e=o.getAttribute("listType"),i=o.getAttribute("listIndent"),n=s[0].getAttribute("listIndent")||0,r=Math.max(i-n,0);for(const i of s){const n=u(i);o.is("element","listItem")&&i.is("element","paragraph")&&t.rename(i,"listItem"),t.setAttributes({listIndent:(n?i.getAttribute("listIndent"):0)+r,listItemId:n?i.getAttribute("listItemId"):c.next(),listType:e},i)}})}}(t),{priority:"high"}),this.listenTo(e,"outputTransformation",(e,i)=>{t.change(t=>{const e=Array.from(i.content.getChildren()),n=e[e.length-1];if(e.length>1&&n.is("element")&&n.isEmpty){e.slice(0,-1).every(u)&&t.remove(n)}if("copy"==i.method||"cut"==i.method){const e=Array.from(i.content.getChildren());_(e)&&v(e,t,this.getListAttributeNames())}})})}_setupAccessibilityIntegration(){const t=this.editor,e=t.t;t.accessibility.addKeystrokeInfoGroup({id:"list",label:e("Keystrokes that can be used in a list"),keystrokes:[{label:e("Increase list item indent"),keystroke:"Tab"},{label:e("Decrease list item indent"),keystroke:"Shift+Tab"}]})}_setupListItemIdConversionStrategy(){this.registerDowncastStrategy({scope:"item",attributeName:"listItemId",setAttributeOnDowncast(t,e,i,n){n&&(n.skipListItemIds||n.isClipboardPipeline)||t.setAttribute("data-list-item-id",e,i)}})}}function Dt(t,e){const i=t.document.selection;if(!i.isCollapsed)return!T(t);if("forward"===e)return!0;const n=i.getFirstPosition().parent,s=n.previousSibling;return!t.schema.isObject(s)&&(!!s.isEmpty||_([n,s]))}function Mt(t,e,i,n){t.ui.componentFactory.add(e,()=>{const s=jt(D.ButtonView,t,e,i,n);return s.set({tooltip:!0,isToggleable:!0}),s}),t.ui.componentFactory.add(`menuBar:${e}`,()=>{const s=jt(D.MenuBarMenuListItemButtonView,t,e,i,n);return s.set({role:"menuitemcheckbox",isToggleable:!0}),s})}function jt(t,e,i,n,s){const r=e.commands.get(i),o=new t(e.locale);return o.set({label:n,icon:s}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),o.on("execute",()=>{e.execute(i),e.editing.view.focus()}),o}class $t extends t.Plugin{static get pluginName(){return"ListUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||Mt(this.editor,"numberedList",t("Numbered List"),M.IconNumberedList),this.editor.ui.componentFactory.has("bulletedList")||Mt(this.editor,"bulletedList",t("Bulleted List"),M.IconBulletedList)}}class Kt extends t.Plugin{static get requires(){return[Rt,$t]}static get pluginName(){return"List"}static get isOfficialPlugin(){return!0}}class Ut extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute({startIndex:t=1}={}){const e=this.editor.model,i=e.document;let n=Array.from(i.selection.getSelectedBlocks()).filter(t=>u(t)&&x(t.getAttribute("listType")));n=y(n),e.change(e=>{for(const i of n)e.setAttribute("listStart",t>=0?t:1,i)})}_getValue(){const t=this.editor.model.document,e=(0,r.first)(t.selection.getSelectedBlocks());return e&&u(e)&&x(e.getAttribute("listType"))?e.getAttribute("listStart"):null}}const qt={},Wt={},Gt={},Ht=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"},{listStyle:"arabic-indic",typeAttribute:null,listType:"numbered"}];for(const{listStyle:t,typeAttribute:e,listType:i}of Ht)qt[t]=i,Wt[t]=e,e&&(Gt[e]=t);function Yt(){return Ht.map(t=>t.listStyle)}function Xt(t){return qt[t]||null}function Zt(t){return Gt[t]||null}function Jt(t){return Wt[t]||null}function Qt(t){switch(t){case"lower-alpha":return"lower-latin";case"upper-alpha":return"upper-latin";default:return t}}class te extends t.Command{defaultType;_supportedTypes;constructor(t,e,i){super(t),this.defaultType=e,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document;e.change(e=>{this._tryToConvertItemsToList(t);let n=Array.from(i.selection.getSelectedBlocks()).filter(t=>t.hasAttribute("listType"));if(n.length){n=y(n);for(const i of n)e.setAttribute("listStyle",t.type||this.defaultType,i)}})}isStyleTypeSupported(t){return!this._supportedTypes||this._supportedTypes.includes(t)}_getValue(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());return u(t)?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=Xt(t.type);if(!e)return;const i=this.editor,n=`${e}List`;i.commands.get(n).value||i.execute(n)}}class ee extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=e.document;let n=Array.from(i.selection.getSelectedBlocks()).filter(t=>u(t)&&"numbered"==t.getAttribute("listType"));n=y(n),e.change(e=>{for(const i of n)e.setAttribute("listReversed",!!t.reversed,i)})}_getValue(){const t=this.editor.model.document,e=(0,r.first)(t.selection.getSelectedBlocks());return u(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}function ie(t){return(e,i,n)=>{const{writer:s,schema:r,consumable:o}=n;if(!1===o.test(i.viewItem,t.viewConsumables))return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));let l=!1;for(const e of i.modelRange.getItems({shallow:!0}))r.checkAttribute(e,t.attributeName)&&t.appliesToListItem(e)&&(e.hasAttribute(t.attributeName)||(s.setAttribute(t.attributeName,t.getAttributeOnUpcast(i.viewItem),e),l=!0));l&&o.consume(i.viewItem,t.viewConsumables)}}class ne extends t.Plugin{static get pluginName(){return"ListPropertiesUtils"}static get isOfficialPlugin(){return!0}getAllSupportedStyleTypes(){return Yt()}getListTypeFromListStyleType(t){return Xt(t)}getListStyleTypeFromTypeAttribute(t){return Zt(t)}getTypeAttributeFromListStyleType(t){return Jt(t)}}function se(t){return"__proto__"===t}function re(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function oe(t){return"string"==typeof t||"symbol"==typeof t?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}function le(t){const e=[],i=t.length;if(0===i)return e;let n=0,s="",r="",o=!1;for(46===t.charCodeAt(0)&&(e.push(""),n++);n<i;){const l=t[n];r?"\\"===l&&n+1<i?(n++,s+=t[n]):l===r?r="":s+=l:o?'"'===l||"'"===l?r=l:"]"===l?(o=!1,e.push(s),s=""):s+=l:"["===l?(o=!0,s&&(e.push(s),s="")):"."===l?s&&(e.push(s),s=""):s+=l,n++}return s&&e.push(s),e}function ae(t,e,i){if(null==t)return i;switch(typeof e){case"string":{if(se(e))return i;const n=t[e];return void 0===n?re(e)?ae(t,le(e),i):i:n}case"number":case"symbol":{"number"==typeof e&&(e=oe(e));const n=t[e];return void 0===n?i:n}default:{if(Array.isArray(e))return function(t,e,i){if(0===e.length)return i;let n=t;for(let t=0;t<e.length;t++){if(null==n)return i;if(se(e[t]))return i;n=n[e[t]]}if(void 0===n)return i;return n}(t,e,i);if(se(e=Object.is(e?.valueOf(),-0)?"-0":String(e)))return i;const n=t[e];return void 0===n?i:n}}}const ce=/^(?:0|[1-9]\d*)$/;function ue(t,e=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<e;case"symbol":return!1;case"string":return ce.test(t)}}function de(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}(t)}function me(t,e){let i;if(i=Array.isArray(e)?e:"string"==typeof e&&re(e)&&null==t?.[e]?le(e):[e],0===i.length)return!1;let n=t;for(let t=0;t<i.length;t++){const e=i[t];if(null==n||!Object.hasOwn(n,e)){if(!((Array.isArray(n)||de(n))&&ue(e)&&e<n.length))return!1}n=n[e]}return!0}const pe=(t,e,i)=>{const n=t[e];Object.hasOwn(t,e)&&function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}(n,i)&&(void 0!==i||e in t)||(t[e]=i)};const fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ge=/^\w*$/;function be(t,e){return!Array.isArray(t)&&(!("number"!=typeof t&&"boolean"!=typeof t&&null!=t&&!function(t){return"symbol"==typeof t||t instanceof Symbol}(t))||("string"==typeof t&&(ge.test(t)||!fe.test(t))||null!=e&&Object.hasOwn(e,t)))}function he(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function ye(t,e,i){return function(t,e,i,n){if(null==t&&!he(t))return t;const s=be(e,t)?[e]:Array.isArray(e)?e:"string"==typeof e?le(e):[e];let r=t;for(let e=0;e<s.length&&null!=r;e++){const o=oe(s[e]);if(se(o))continue;let l;if(e===s.length-1)l=i(r[o]);else{const i=r[o],a=n?.(i,o,t);l=void 0!==a?a:he(i)?i:ue(s[e+1])?[]:{}}pe(r,o,l),r=r[o]}return t}(t,e,()=>i,()=>{})}function Ae(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}function Ie(t,...e){if(null==t)return{};const i={};for(let n=0;n<e.length;n++){let s=e[n];switch(typeof s){case"object":Array.isArray(s)||(s=Ae(s)?Array.from(s):[s]);break;case"string":case"symbol":case"number":s=[s]}for(const e of s){const n=ae(t,e);(void 0!==n||me(t,e))&&("string"==typeof e&&Object.hasOwn(t,e)?i[e]=n:ye(i,e,n))}}return i}function ke(t){const{startIndex:e,reversed:i,styles:n}=t;return{styles:we(n),startIndex:e||!1,reversed:i||!1}}function we(t){const e={listTypes:["bulleted","numbered"],useAttribute:!1,listStyleTypes:{numbered:["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"],bulleted:["disc","circle","square"]}};return!0===t||(t?Array.isArray(t)||"string"==typeof t?(e.listTypes=(0,r.toArray)(t),e.listStyleTypes=Ie(e.listStyleTypes,e.listTypes)):(e.listTypes=t.listTypes?(0,r.toArray)(t.listTypes):e.listTypes,e.useAttribute=!!t.useAttribute,t.listStyleTypes?e.listStyleTypes=t.listStyleTypes:e.listStyleTypes=Ie(e.listStyleTypes,e.listTypes)):(e.listTypes=[],e.listStyleTypes={})),e}const ve="default";class _e extends t.Plugin{static get requires(){return[Rt,ne]}static get pluginName(){return"ListPropertiesEditing"}static get licenseFeatureCode(){return"LP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(t){super(t),t.config.define("list.properties",{styles:!0,startIndex:!1,reversed:!1})}init(){const t=this.editor,e=t.model,i=t.plugins.get(Rt),n=function(t){const e=[],i=ke(t);if(t.styles){const t=i.styles.useAttribute;e.push({attributeName:"listStyle",defaultValue:ve,viewConsumables:{styles:"list-style-type"},addCommand(e){let i=Yt();t&&(i=i.filter(t=>!!Jt(t))),e.commands.add("listStyle",new te(e,ve,i))},appliesToListItem:t=>"numbered"==t.getAttribute("listType")||"bulleted"==t.getAttribute("listType"),hasValidAttribute(t){if(!this.appliesToListItem(t))return!t.hasAttribute("listStyle");if(!t.hasAttribute("listStyle"))return!1;const e=t.getAttribute("listStyle");return e==ve||Xt(e)==t.getAttribute("listType")},setAttributeOnDowncast(e,i,n){if(i&&i!==ve){if(!t)return void e.setStyle("list-style-type",i,n);{const t=Jt(i);if(t)return void e.setAttribute("type",t,n)}}e.removeStyle("list-style-type",n),e.removeAttribute("type",n)},getAttributeOnUpcast(t){const e=t.getStyle("list-style-type");if(e)return Qt(e);const i=t.getAttribute("type");return i?Zt(i):ve}})}t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(t){t.commands.add("listReversed",new ee(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listReversed")},setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(t){t.commands.add("listStart",new Ut(t))},appliesToListItem:t=>x(t.getAttribute("listType")),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listStart")},setAttributeOnDowncast(t,e,i){0==e||e>1?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast(t){const e=t.getAttribute("start");return e>=0?e:1}});return e}(t.config.get("list.properties"));for(const s of n)s.addCommand(t),e.schema.extend("$listItem",{allowAttributes:s.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:s.attributeName,setAttributeOnDowncast(t,e,i){s.setAttributeOnDowncast(t,e,i)}});t.conversion.for("upcast").add(t=>{for(const e of n)t.on("element:ol",ie(e)),t.on("element:ul",ie(e))}),i.on("checkAttributes:list",(t,{viewElement:e,modelAttributes:i,modelReferenceElement:s})=>{for(const r of n)r.appliesToListItem(s)&&r.getAttributeOnUpcast(e)!=i[r.attributeName]&&(t.return=!0,t.stop())}),this.listenTo(t.commands.get("indentList"),"afterExecute",(t,i)=>{e.change(t=>{for(const e of i)for(const i of n)i.appliesToListItem(e)&&t.setAttribute(i.attributeName,i.defaultValue,e)})}),i.on("postFixer",(t,{listNodes:e,writer:i})=>{for(const{node:s}of e)for(const e of n)e.hasValidAttribute(s)||(e.appliesToListItem(s)?i.setAttribute(e.attributeName,e.defaultValue,s):i.removeAttribute(e.attributeName,s),t.return=!0)}),i.on("postFixer",(t,{listNodes:e,writer:i})=>{for(const{node:s,previousNodeInList:r}of e)if(r&&r.getAttribute("listType")==s.getAttribute("listType"))for(const e of n){const{attributeName:n}=e;if(!e.appliesToListItem(s))continue;const o=r.getAttribute(n);s.getAttribute(n)!=o&&(i.setAttribute(n,o,s),t.return=!0)}})}}var Le=i(740),Se={attributes:{"data-cke":!0}};Se.setAttributes=Z(),Se.insert=Y().bind(null,"head"),Se.domAPI=G(),Se.insertStyleElement=Q();q()(Le.A,Se);Le.A&&Le.A.locals&&Le.A.locals;class Te extends D.View{children;stylesView=null;additionalPropertiesCollapsibleView=null;startIndexFieldView=null;reversedSwitchButtonView=null;focusTracker=new r.FocusTracker;keystrokes=new r.KeystrokeHandler;focusables=new D.ViewCollection;focusCycler;constructor(t,{enabledProperties:e,styleButtonViews:i,styleGridAriaLabel:n}){super(t);const s=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new D.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),i&&i.length?(this.stylesView=this._createStylesView(i,n),this.children.add(this.stylesView)):s.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e),s.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:s},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,D.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>r.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const i=new D.View(this.locale);return i.children=i.createCollection(),i.children.addMany(t),i.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){for(const t of this.children)if(t instanceof D.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},i.focusTracker=new r.FocusTracker,i.keystrokes=new r.KeystrokeHandler,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(t){const e=this.locale.t,i=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),this.stylesView?(this.additionalPropertiesCollapsibleView=new D.CollapsibleView(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",(...t)=>t.some(t=>t)),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",(t,e,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)}),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const t=this.locale.t,e=new D.LabeledFieldView(this.locale,D.createLabeledInputNumber);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const i=e.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid start index value."):i.checkValidity()?this.fire("listStart",{startIndex:n}):e.errorText=t("Start index must be greater than 0.")}),e}_createReversedSwitchButton(){const t=this.locale.t,e=new D.SwitchButtonView(this.locale);return e.set({withText:!0,label:t("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),e.delegate("execute").to(this,"listReversed"),e}}var Ce=i(769),xe={attributes:{"data-cke":!0}};xe.setAttributes=Z(),xe.insert=Y().bind(null,"head"),xe.domAPI=G(),xe.insertStyleElement=Q();q()(Ce.A,xe);Ce.A&&Ce.A.locals&&Ce.A.locals;class Pe extends t.Plugin{static get pluginName(){return"ListPropertiesUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=t.config.get("list.properties"),n=ke(i),s=n.styles.listTypes;if(s.includes("bulleted")){const i=[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:M.IconListStyleDisc},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:M.IconListStyleCircle},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:M.IconListStyleSquare}],s=e("Bulleted List"),r=e("Bulleted list styles toolbar"),o="bulletedList";t.ui.componentFactory.add(o,Ee({editor:t,normalizedConfig:n,parentCommandName:o,buttonLabel:s,buttonIcon:M.IconBulletedList,styleGridAriaLabel:r,styleDefinitions:i})),t.ui.componentFactory.add(`menuBar:${o}`,Ne({editor:t,normalizedConfig:n,parentCommandName:o,buttonLabel:s,styleGridAriaLabel:r,styleDefinitions:i}))}if(s.includes("numbered")||i.startIndex||i.reversed){const i=[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:M.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:M.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:M.IconListStyleLowerRoman},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:M.IconListStyleUpperRoman},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:M.IconListStyleLowerLatin},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:M.IconListStyleUpperLatin},{label:e("Toggle the arabic-indic list style"),tooltip:e("Arabic-indic"),type:"arabic-indic",icon:M.IconListStyleArabicIndic}],r=e("Numbered List"),o=e("Numbered list styles toolbar"),l="numberedList";t.ui.componentFactory.add(l,Ee({editor:t,normalizedConfig:n,parentCommandName:l,buttonLabel:r,buttonIcon:M.IconNumberedList,styleGridAriaLabel:o,styleDefinitions:i})),s.includes("numbered")&&t.ui.componentFactory.add(`menuBar:${l}`,Ne({editor:t,normalizedConfig:n,parentCommandName:l,buttonLabel:r,styleGridAriaLabel:o,styleDefinitions:i}))}}}function Ee({editor:t,normalizedConfig:e,parentCommandName:i,buttonLabel:n,buttonIcon:s,styleGridAriaLabel:r,styleDefinitions:o}){const l=t.commands.get(i);return a=>{const c=(0,D.createDropdown)(a,D.SplitButtonView),u=c.buttonView;return c.bind("isEnabled").to(l),c.class="ck-list-styles-dropdown",u.on("execute",()=>{t.execute(i),t.editing.view.focus()}),u.set({label:n,icon:s,tooltip:!0,isToggleable:!0}),u.bind("isOn").to(l,"value",t=>!!t),c.once("change:isOpen",()=>{const n=function({editor:t,normalizedConfig:e,dropdownView:i,parentCommandName:n,styleDefinitions:s,styleGridAriaLabel:r}){const o=t.locale,l={...e,..."numberedList"!=n?{startIndex:!1,reversed:!1}:null},a=n.replace("List","");let c=null;if(e.styles.listTypes.includes(a)){const i=t.commands.get("listStyle"),r=Fe({editor:t,parentCommandName:n,listStyleCommand:i}),o=e.styles.listStyleTypes;let l=s;if(o){const t=o[a];t&&(l=s.filter(e=>t.includes(e.type)))}const u=Ve(i);c=l.filter(u).map(r)}const u=new Te(o,{styleGridAriaLabel:r,enabledProperties:l,styleButtonViews:c});e.styles.listTypes.includes(a)&&(0,D.focusChildOnDropdownOpen)(i,()=>u.stylesView.children.find(t=>t.isOn));if(l.startIndex){const e=t.commands.get("listStart");u.startIndexFieldView.bind("isEnabled").to(e),u.startIndexFieldView.fieldView.bind("value").to(e),u.on("listStart",(e,i)=>t.execute("listStart",i))}if(l.reversed){const e=t.commands.get("listReversed");u.reversedSwitchButtonView.bind("isEnabled").to(e),u.reversedSwitchButtonView.bind("isOn").to(e,"value",t=>!!t),u.on("listReversed",()=>{const i=e.value;t.execute("listReversed",{reversed:!i})})}return u.delegate("execute").to(i),u}({editor:t,normalizedConfig:e,dropdownView:c,parentCommandName:i,styleGridAriaLabel:r,styleDefinitions:o});c.panelView.children.add(n)}),c.on("execute",()=>{t.editing.view.focus()}),c}}function Fe({editor:t,listStyleCommand:e,parentCommandName:i}){const n=t.locale,s=t.commands.get(i);return({label:r,type:o,icon:l,tooltip:a})=>{const c=new D.ButtonView(n);return c.set({label:r,icon:l,tooltip:a}),c.bind("isOn").to(e,"value",t=>t===o),c.on("execute",()=>{s.value?e.value===o?t.execute(i):e.value!==o&&t.execute("listStyle",{type:o}):t.model.change(()=>{t.execute("listStyle",{type:o})})}),c}}function Ne({editor:t,normalizedConfig:e,parentCommandName:i,buttonLabel:n,styleGridAriaLabel:s,styleDefinitions:r}){return o=>{const l=new D.MenuBarMenuView(o),a=t.commands.get(i),c=t.commands.get("listStyle"),u=Ve(c),d=Fe({editor:t,parentCommandName:i,listStyleCommand:c}),m=e.styles.listStyleTypes;let p=r;if(m){const t=m[a.type];t&&(p=r.filter(e=>t.includes(e.type)))}const f=p.filter(u).map(d),g=new Te(o,{styleGridAriaLabel:s,enabledProperties:{...e,startIndex:!1,reversed:!1},styleButtonViews:f});return g.delegate("execute").to(l),l.buttonView.set({label:n,icon:"bulletedList"===i?M.IconBulletedList:M.IconNumberedList}),l.panelView.children.add(g),l.bind("isEnabled").to(a,"isEnabled"),l.on("execute",()=>{t.editing.view.focus()}),l}}function Ve(t){return"function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0}class Be extends t.Plugin{static get requires(){return[_e,Pe]}static get pluginName(){return"ListProperties"}static get isOfficialPlugin(){return!0}}class Oe extends t.Command{constructor(t){super(t),this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){const t=this._getSelectedItems();this.value=this._getValue(t),this.isEnabled=!!t.length}execute(t={}){this.editor.model.change(e=>{const i=this._getSelectedItems(),n=void 0===t.forceValue?!this._getValue(i):t.forceValue;for(const t of i)n?e.setAttribute("todoListChecked",!0,t):e.removeAttribute("todoListChecked",t)})}_getValue(t){return t.every(t=>t.getAttribute("todoListChecked"))}_getSelectedItems(){const t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),n=i.start.parent,s=[];e.checkAttribute(n,"todoListChecked")&&s.push(...d(n));for(const t of i.getItems({shallow:!0}))e.checkAttribute(t,"todoListChecked")&&!s.includes(t)&&s.push(...d(t));return s}}class ze extends R.DomEventObserver{domEventType=["change"];onDomEvent(t){if(t.target){const e=this.view.domConverter.mapDomToView(t.target);e&&e.is("element","input")&&"checkbox"==e.getAttribute("type")&&e.findAncestor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",t)}}}const Re=(0,r.parseKeystroke)("Ctrl+Enter");class De extends t.Plugin{static get pluginName(){return"TodoListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Rt]}init(){const t=this.editor,e=t.model,i=t.editing,n=t.plugins.get(Rt),s=t.config.get("list.multiBlock")?"paragraph":"listItem";t.commands.add("todoList",new N(t,"todo")),t.commands.add("checkTodoList",new Oe(t)),i.view.addObserver(ze),e.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),e.schema.addAttributeCheck(t=>{const e=t.last;if(!e.getAttribute("listItemId")||"todo"!=e.getAttribute("listType"))return!1},"todoListChecked"),t.conversion.for("upcast").add(t=>{t.on("element:input",(t,e,i)=>{const n=e.modelCursor,s=n.parent,r=e.viewItem;if(!i.consumable.test(r,{name:!0}))return;if("checkbox"!=r.getAttribute("type")||!n.isAtStart||!s.hasAttribute("listType"))return;i.consumable.consume(r,{name:!0});const o=i.writer;o.setAttribute("listType","todo",s),e.viewItem.hasAttribute("checked")&&o.setAttribute("todoListChecked",!0,s),e.modelRange=o.createRange(n)}),t.on("element:li",(t,e,i)=>{const{writer:n,schema:s}=i;if(!e.modelRange)return;const r=Array.from(e.modelRange.getItems({shallow:!0})).filter(t=>"todo"===t.getAttribute("listType")&&s.checkAttribute(t,"listItemId")).reduce((t,e)=>{const i=e.getAttribute("listItemId");return t.has(i)||t.set(i,d(e)),t},new Map);for(const[,t]of r.entries())if(t.some(t=>t.getAttribute("todoListChecked")))for(const e of t)n.setAttribute("todoListChecked",!0,e)},{priority:"low"}),t.on("element:label",Me({name:"label",classes:"todo-list__label"})),t.on("element:label",Me({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),t.on("element:span",Me({name:"span",classes:"todo-list__label__description"})),t.on("element:ul",function(t){const e=new R.Matcher(t);return(t,i,n)=>{const s=e.match(i.viewItem);if(!s)return;const r=s.match;r.name=!1,n.consumable.consume(i.viewItem,r)}}({name:"ul",classes:"todo-list"}))}),t.conversion.for("downcast").elementToElement({model:s,view:(t,{writer:e})=>{if(je(t,n.getListAttributeNames()))return e.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),n.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(t,e,i){"todo"==e?t.addClass("todo-list",i):t.removeClass("todo-list",i)}}),n.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(t,e,{dataPipeline:i}){if("todo"!=e.getAttribute("listType"))return null;const n=t.createUIElement("input",{type:"checkbox",...e.getAttribute("todoListChecked")?{checked:"checked"}:null,...i?{disabled:"disabled"}:{tabindex:"-1"}});if(i)return n;const s=t.createContainerElement("span",{contenteditable:"false"},n);return s.getFillerOffset=()=>null,s},canWrapElement:t=>je(t,n.getListAttributeNames()),createWrapperElement(t,e,{dataPipeline:i}){const s=["todo-list__label"];return je(e,n.getListAttributeNames())||s.push("todo-list__label_without-description"),t.createAttributeElement(i?"label":"span",{class:s.join(" ")})}}),n.on("checkElement",(t,{modelElement:e,viewElement:i})=>{const s=je(e,n.getListAttributeNames());i.hasClass("todo-list__label__description")!=s&&(t.return=!0,t.stop())}),n.on("checkElement",(e,{modelElement:i,viewElement:n})=>{const s="todo"==i.getAttribute("listType")&&g(i);let r=!1;const o=t.editing.view.createPositionBefore(n).getWalker({direction:"backward"});for(const{item:e}of o){if(e.is("element")&&t.editing.mapper.toModelElement(e))break;e.is("element","input")&&"checkbox"==e.getAttribute("type")&&(r=!0)}r!=s&&(e.return=!0,e.stop())}),n.on("postFixer",(t,{listNodes:e,writer:i})=>{for(const{node:n,previousNodeInList:s}of e){if(!s)continue;if(s.getAttribute("listItemId")!=n.getAttribute("listItemId"))continue;const e=s.hasAttribute("todoListChecked"),r=n.hasAttribute("todoListChecked");r&&!e?(i.removeAttribute("todoListChecked",n),t.return=!0):!r&&e&&(i.setAttribute("todoListChecked",!0,n),t.return=!0)}}),e.document.registerPostFixer(t=>{const i=e.document.differ.getChanges();let n=!1;for(const e of i)if("attribute"==e.type&&"listType"==e.attributeKey){const i=e.range.start.nodeAfter;"todo"==e.attributeOldValue&&i.hasAttribute("todoListChecked")&&(t.removeAttribute("todoListChecked",i),n=!0)}else if("insert"==e.type&&"$text"!=e.name)for(const{item:i}of t.createRangeOn(e.position.nodeAfter))i.is("element")&&"todo"!=i.getAttribute("listType")&&i.hasAttribute("todoListChecked")&&(t.removeAttribute("todoListChecked",i),n=!0);return n}),this.listenTo(i.view.document,"keydown",(e,i)=>{(0,r.getCode)(i)===Re&&(t.execute("checkTodoList"),e.stop())},{priority:"high"}),this.listenTo(i.view.document,"todoCheckboxChange",(t,e)=>{const n=e.target;if(!n||!n.is("element","input"))return;const s=i.view.createPositionAfter(n),r=i.mapper.toModelPosition(s).parent;r&&u(r)&&"todo"==r.getAttribute("listType")&&this._handleCheckmarkChange(r)}),this.listenTo(i.view.document,"arrowKey",function(t,e){return(i,n)=>{const s=(0,r.getLocalizedArrowKeyCodeDirection)(n.keyCode,e.contentLanguageDirection),o=t.schema,l=t.document.selection;if(!l.isCollapsed)return;const a=l.getFirstPosition(),c=a.parent;if("right"==s&&a.isAtEnd){const e=o.getNearestSelectionRange(t.createPositionAfter(c),"forward");if(!e)return;const s=e.start.parent;s&&u(s)&&"todo"==s.getAttribute("listType")&&(t.change(t=>t.setSelection(e)),n.preventDefault(),n.stopPropagation(),i.stop())}else if("left"==s&&a.isAtStart&&u(c)&&"todo"==c.getAttribute("listType")){const e=o.getNearestSelectionRange(t.createPositionBefore(c),"backward");if(!e)return;t.change(t=>t.setSelection(e)),n.preventDefault(),n.stopPropagation(),i.stop()}}}(e,t.locale),{context:"$text"}),this.listenTo(i.mapper,"viewToModelPosition",(t,i)=>{const n=i.viewPosition.parent,s=n.is("attributeElement","li")&&0==i.viewPosition.offset,r=$e(n)&&i.viewPosition.offset<=1,o=n.is("element","span")&&"false"==n.getAttribute("contenteditable")&&$e(n.parent);if(!s&&!r&&!o)return;const l=i.modelPosition.nodeAfter;l&&"todo"==l.getAttribute("listType")&&(i.modelPosition=e.createPositionAt(l,0))},{priority:"low"}),this._initAriaAnnouncements()}_handleCheckmarkChange(t){const e=this.editor,i=e.model,n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(n)})}_initAriaAnnouncements(){const{model:t,ui:e,t:i}=this.editor;let n=null;e&&t.document.selection.on("change:range",()=>{const s=t.document.selection.focus.parent,r=Ke(n),o=Ke(s);r&&!o?e.ariaLiveAnnouncer.announce(i("Leaving a to-do list")):!r&&o&&e.ariaLiveAnnouncer.announce(i("Entering a to-do list")),n=s})}}function Me(t){const e=new R.Matcher(t);return(t,i,n)=>{const s=e.match(i.viewItem);s&&n.consumable.consume(i.viewItem,s.match)&&Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor))}}function je(t,e){return(t.is("element","paragraph")||t.is("element","listItem"))&&"todo"==t.getAttribute("listType")&&g(t)&&function(t,e){for(const i of t.getAttributeKeys())if(!i.startsWith("selection:")&&!e.includes(i))return!1;return!0}(t,e)}function $e(t){return!!t&&t.is("attributeElement")&&t.hasClass("todo-list__label")}function Ke(t){return!!t&&(!(!t.is("element","paragraph")&&!t.is("element","listItem"))&&"todo"==t.getAttribute("listType"))}class Ue extends t.Plugin{static get pluginName(){return"TodoListUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.t;Mt(this.editor,"todoList",t("To-do List"),M.IconTodoList)}}var qe=i(712),We={attributes:{"data-cke":!0}};We.setAttributes=Z(),We.insert=Y().bind(null,"head"),We.domAPI=G(),We.insertStyleElement=Q();q()(qe.A,We);qe.A&&qe.A.locals&&qe.A.locals;class Ge extends t.Plugin{static get requires(){return[De,Ue]}static get pluginName(){return"TodoList"}static get isOfficialPlugin(){return!0}}class He extends t.Command{type;constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=Array.from(i.selection.getSelectedBlocks()).filter(t=>Xe(t,e.schema)),s=void 0!==t.forceValue?!t.forceValue:this.value;e.change(t=>{if(s){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,s=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t<i&&(i=t);const n=t-i;s.push({element:e,listIndent:n}),e=e.nextSibling}s=s.reverse();for(const e of s)t.setAttribute("listIndent",e.listIndent,e.element)}if(!s){let t=Number.POSITIVE_INFINITY;for(const e of n)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));t=0===t?1:t,Ye(n,!0,t),Ye(n,!1,t)}for(const e of n.reverse())s&&"listItem"==e.name?t.rename(e,"paragraph"):s||"listItem"==e.name?s||"listItem"!=e.name||e.getAttribute("listType")==this.type||t.setAttribute("listType",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,"listItem"));this.fire("_executeCleanup",n)})}_getValue(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,i=(0,r.first)(t.getSelectedBlocks());return!!i&&Xe(i,e)}}function Ye(t,e,i){const n=e?t[0]:t[t.length-1];if(n.is("element","listItem")){let s=n[e?"previousSibling":"nextSibling"],r=n.getAttribute("listIndent");for(;s&&s.is("element","listItem")&&s.getAttribute("listIndent")>=i;)r>s.getAttribute("listIndent")&&(r=s.getAttribute("listIndent")),s.getAttribute("listIndent")==r&&t[e?"unshift":"push"](s),s=s[e?"previousSibling":"nextSibling"]}}function Xe(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class Ze extends t.Command{_indentBy;constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>e.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;i<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",i,e)}this.fire("_executeCleanup",i)})}_checkEnabled(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),i=t.getAttribute("listType");let n=t.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=e;){if(n.getAttribute("listIndent")==e)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function Je(t,e){const i=e.mapper,n=e.writer,s="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=ci,e}(n),o=n.createContainerElement(s,null);return n.insert(n.createPositionAt(o,0),r),i.bindElements(t,r),r}function Qe(t,e,i,n){const s=e.parent,r=i.mapper,o=i.writer;let l=r.toViewPosition(n.createPositionBefore(t));const a=ii(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(a&&a.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(a);l=o.breakContainer(o.createPositionAfter(t))}else if(c&&"listItem"==c.name){l=r.toViewPosition(n.createPositionAt(c,"end"));const t=r.findMappedViewAncestor(l),e=ni(t);l=e?o.createPositionBefore(e):o.createPositionAt(t,"end")}else l=r.toViewPosition(n.createPositionBefore(t));if(l=ei(l),o.insert(l,s),c&&"listItem"==c.name){const t=r.toViewElement(c),i=o.createRange(o.createPositionAt(t,0),l).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is("element","li")){const n=o.breakContainer(o.createPositionBefore(t.item)),s=t.item.parent,r=o.createPositionAt(e,"end");ti(o,r.nodeBefore,r.nodeAfter),o.move(o.createRangeOn(s),r),i._position=n}}else{const i=s.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const e of i.getChildren()){const i=r.toModelElement(e);if(!(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")))break;n=e}n&&(o.breakContainer(o.createPositionAfter(n)),o.move(o.createRangeOn(n.parent),o.createPositionAt(e,"end")))}}ti(o,s,s.nextSibling),ti(o,s.previousSibling,s)}function ti(t,e,i){return!e||!i||"ul"!=e.name&&"ol"!=e.name||e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function ei(t){return t.getLastMatchingPosition(t=>t.item.is("uiElement"))}function ii(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,s=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(i&&s==t||n&&s>t)return r;r="forward"===e.direction?r.nextSibling:r.previousSibling}return null}function ni(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function si(t,e){const i=[],n=t.parent,s={ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e},r=n.getAttribute("listIndent"),o=[...new R.ModelTreeWalker(s)].filter(t=>t.item.is("element")).map(t=>t.item);for(const t of o){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")<r)break;if(!(t.getAttribute("listIndent")>r)){if(t.getAttribute("listType")!==n.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===e?i.unshift(t):i.push(t)}}return i}function ri(t){let e=[...t.document.selection.getSelectedBlocks()].filter(t=>t.is("element","listItem")).map(e=>{const i=t.change(t=>t.createPositionAt(e,0));return[...si(i,"backward"),...si(i,"forward")]}).flat();return e=[...new Set(e)],e}const oi=["disc","circle","square"],li=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function ai(t){return oi.includes(t)?"bulleted":li.includes(t)?"numbered":null}function ci(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:R.getViewFillerOffset.call(this)}class ui extends t.Plugin{static get pluginName(){return"LegacyListUtils"}static get isOfficialPlugin(){return!0}getListTypeFromListStyleType(t){return ai(t)}getSelectedListItems(t){return ri(t)}getSiblingNodes(t,e){return si(t,e)}}function di(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;s.consume(i.item,"insert"),s.consume(i.item,"attribute:listType"),s.consume(i.item,"attribute:listIndent");const r=i.item;Qe(r,Je(r,n),n,t)}}const mi=(t,e,i)=>{if(!i.consumable.test(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer;s.breakContainer(s.createPositionBefore(n)),s.breakContainer(s.createPositionAfter(n));const r=n.parent,o="numbered"==e.attributeNewValue?"ol":"ul";s.rename(o,r)},pi=(t,e,i)=>{i.consumable.consume(e.item,t.name);const n=i.mapper.toViewElement(e.item).parent,s=i.writer;ti(s,n,n.nextSibling),ti(s,n.previousSibling,n)};const fi=(t,e,i)=>{if(i.consumable.test(e.item,t.name)&&"listItem"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,s=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=n.breakContainer(t),"li"==t.parent.name);){const e=t,i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));s.push(t)}t=n.createPositionAfter(t.parent)}if(s.length>0){for(let e=0;e<s.length;e++){const i=t.nodeBefore;if(t=n.insert(t,s[e]).end,e>0){const e=ti(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}ti(n,t.nodeBefore,t.nodeAfter)}}},gi=(t,e,i)=>{const n=i.mapper.toViewPosition(e.position),s=n.nodeBefore,r=n.nodeAfter;ti(i.writer,s,r)},bi=(t,e,i)=>{if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement("listItem"),s=function(t){let e=0,i=t.parent;for(;i;){if(i.is("element","li"))e++;else{const t=i.previousSibling;t&&t.is("element","li")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute("listIndent",s,n);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",r,n),!i.safeInsert(n,e.modelCursor))return;const o=function(t,e,i){const{writer:n,schema:s}=i;let r=n.createPositionAfter(t);for(const o of e)if("ul"==o.name||"ol"==o.name)r=i.convertItem(o,r).modelCursor;else{const e=i.convertItem(o,n.createPositionAt(t,"end")),l=e.modelRange.start.nodeAfter;l&&l.is("element")&&!s.checkChild(t,l.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:ki(e.modelCursor),r=n.createPositionAfter(t))}return r}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,o),i.updateConversionResult(n,e)}},hi=(t,e,i)=>{if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||vi(e))&&e._remove()}}},yi=(t,e,i)=>{if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1;for(const e of t)i&&!vi(e)&&e._remove(),vi(e)&&(i=!0)}};function Ai(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const e=i.mapper.toViewElement(n),s=e.getAncestors().find(vi),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("element","li")){i.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==s){i.viewPosition=t.nextPosition;break}}}}}const Ii=function(t,[e,i]){const n=this;let s,r=e.is("documentFragment")?e.getChild(0):e;if(s=i?n.createSelection(i):n.document.selection,r&&r.is("element","listItem")){const t=s.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;r&&r.is("element","listItem");)r._setAttribute("listIndent",r.getAttribute("listIndent")+t),r=r.nextSibling}}};function ki(t){const e=new R.ModelTreeWalker({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function wi(t,e,i,n,s,r){const o=ii(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t}),l=s.mapper,a=s.writer,c=o?o.getAttribute("listIndent"):null;let u;if(o)if(c==t){const t=l.toViewElement(o).parent;u=a.createPositionAfter(t)}else{const t=r.createPositionAt(o,"end");u=l.toViewPosition(t)}else u=i;u=ei(u);for(const t of[...n.getChildren()])vi(t)&&(u=a.move(a.createRangeOn(t),u).end,ti(a,t,t.nextSibling),ti(a,t.previousSibling,t))}function vi(t){return t.is("element","ol")||t.is("element","ul")}class _i extends t.Plugin{static get pluginName(){return"LegacyListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[s.Enter,e.Delete,ui]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,i=t.editing;var n;t.model.document.registerPostFixer(e=>function(t,e){const i=t.document.differ.getChanges(),n=new Map;let s=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)r(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",i),s=!0),i.hasAttribute("listType")&&(e.removeAttribute("listType",i),s=!0),i.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",i),s=!0),i.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",i),s=!0),i.hasAttribute("listStart")&&(e.removeAttribute("listStart",i),s=!0);for(const e of Array.from(t.createRangeIn(i)).filter(t=>t.item.is("element","listItem")))r(e.previousPosition)}r(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?r(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&r(n.range.start);for(const t of n.values())o(t),l(t);return s;function r(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(n.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,n.has(t))return;n.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&n.set(e,e)}}function o(t){let i=0,n=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(r>i){let o;null===n?(n=r-i,o=i):(n>r&&(n=r),o=r-n),e.setAttribute("listIndent",o,t),s=!0}else n=null,i=t.getAttribute("listIndent")+1;t=t.nextSibling}}function l(t){let i=[],n=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const n=i[r];t.getAttribute("listType")!=n&&(e.setAttribute("listType",n,t),s=!0)}else i[r]=t.getAttribute("listType");n=t,t=t.nextSibling}}}(t.model,e)),i.mapper.registerViewToModelLength("li",Li),e.mapper.registerViewToModelLength("li",Li),i.mapper.on("modelToViewPosition",Ai(i.view)),i.mapper.on("viewToModelPosition",(n=t.model,(t,e)=>{const i=e.viewPosition,s=i.parent,r=e.mapper;if("ul"==s.name||"ol"==s.name){if(i.isAtEnd){const t=r.toModelElement(i.nodeBefore),s=r.getModelLength(i.nodeBefore);e.modelPosition=n.createPositionBefore(t).getShiftedBy(s)}else{const t=r.toModelElement(i.nodeAfter);e.modelPosition=n.createPositionBefore(t)}t.stop()}else if("li"==s.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const o=r.toModelElement(s);let l=1,a=i.nodeBefore;for(;a&&vi(a);)l+=r.getModelLength(a),a=a.previousSibling;e.modelPosition=n.createPositionBefore(o).getShiftedBy(l),t.stop()}})),e.mapper.on("modelToViewPosition",Ai(i.view)),t.conversion.for("editingDowncast").add(e=>{e.on("insert",fi,{priority:"high"}),e.on("insert:listItem",di(t.model)),e.on("attribute:listType:listItem",mi,{priority:"high"}),e.on("attribute:listType:listItem",pi,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const s=n.mapper.toViewElement(i.item),r=n.writer;r.breakContainer(r.createPositionBefore(s)),r.breakContainer(r.createPositionAfter(s));const o=s.parent,l=o.previousSibling,a=r.createRangeOn(o);r.remove(a),l&&l.nextSibling&&ti(r,l,l.nextSibling),wi(i.attributeOldValue+1,i.range.start,a.start,s,n,t),Qe(i.item,s,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,i,n)=>{const s=n.mapper.toViewPosition(i.position).getLastMatchingPosition(t=>!t.item.is("element","li")).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(s)),r.breakContainer(r.createPositionAfter(s));const o=s.parent,l=o.previousSibling,a=r.createRangeOn(o),c=r.remove(a);l&&l.nextSibling&&ti(r,l,l.nextSibling),wi(n.mapper.toModelElement(s).getAttribute("listIndent")+1,i.position,a.start,s,n,t);for(const t of r.createRangeIn(c).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",gi,{priority:"low"})}),t.conversion.for("dataDowncast").add(e=>{e.on("insert",fi,{priority:"high"}),e.on("insert:listItem",di(t.model))}),t.conversion.for("upcast").add(t=>{t.on("element:ul",hi,{priority:"high"}),t.on("element:ol",hi,{priority:"high"}),t.on("element:li",yi,{priority:"high"}),t.on("element:li",bi)}),t.model.on("insertContent",Ii,{priority:"high"}),t.commands.add("numberedList",new He(t,"numbered")),t.commands.add("bulletedList",new He(t,"bulleted")),t.commands.add("indentList",new Ze(t,"forward")),t.commands.add("outdentList",new Ze(t,"backward"));const s=i.view.document;this.listenTo(s,"enter",(t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())},{context:"li"}),this.listenTo(s,"delete",(t,e)=>{if("backward"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const s=n.parent;if("listItem"!==s.name)return;s.previousSibling&&"listItem"===s.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())},{context:"li"}),this.listenTo(t.editing.view.document,"tab",(e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())},{context:"li"})}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),i&&i.registerChildCommand(t.get("outdentList"))}}function Li(t){let e=1;for(const i of t.getChildren())if("ul"==i.name||"ol"==i.name)for(const t of i.getChildren())e+=Li(t);return e}class Si extends t.Plugin{static get requires(){return[_i,$t]}static get pluginName(){return"LegacyList"}static get isOfficialPlugin(){return!0}}class Ti extends t.Command{defaultType;constructor(t,e){super(t),this.defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){this._tryToConvertItemsToList(t);const e=this.editor.model,i=ri(e);i.length&&e.change(e=>{for(const n of i)e.setAttribute("listStyle",t.type||this.defaultType,n)})}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=ai(t.type);if(!e)return;const i=this.editor,n=`${e}List`;i.commands.get(n).value||i.execute(n)}}class Ci extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=ri(e).filter(t=>"numbered"==t.getAttribute("listType"));e.change(e=>{for(const n of i)e.setAttribute("listReversed",!!t.reversed,n)})}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}class xi extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute({startIndex:t=1}={}){const e=this.editor.model,i=ri(e).filter(t=>"numbered"==t.getAttribute("listType"));e.change(e=>{for(const n of i)e.setAttribute("listStart",t>=0?t:1,n)})}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const Pi="default";class Ei extends t.Plugin{static get requires(){return[_i]}static get pluginName(){return"LegacyListPropertiesEditing"}static get isOfficialPlugin(){return!0}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,i=function(t){const e=[];t.styles&&e.push({attributeName:"listStyle",defaultValue:Pi,addCommand(t){t.commands.add("listStyle",new Ti(t,Pi))},appliesToListItem:()=>!0,setAttributeOnDowncast(t,e,i){e&&e!==Pi?t.setStyle("list-style-type",e,i):t.removeStyle("list-style-type",i)},getAttributeOnUpcast:t=>Qt(t.getStyle("list-style-type"))||Pi});t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,addCommand(t){t.commands.add("listReversed",new Ci(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,addCommand(t){t.commands.add("listStart",new xi(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){0==e||e>1?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast(t){const e=t.getAttribute("start");return e>=0?e:1}});return e}(t.config.get("list.properties"));e.schema.extend("listItem",{allowAttributes:i.map(t=>t.attributeName)});for(const e of i)e.addCommand(t);var n;this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t,e){return(i,n)=>{const s=n[0],r=s.getAttribute("listIndent"),o=n.filter(t=>t.getAttribute("listIndent")===r);let l=null;s.previousSibling.getAttribute("listIndent")+1!==r&&(l=ii(s.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),t.model.change(t=>{for(const i of o)for(const n of e)if(n.appliesToListItem(i)){const e=null==l?n.defaultValue:l.getAttribute(n.attributeName);t.setAttribute(n.attributeName,e,i)}})}}(t,i)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t,e){return(i,n)=>{if(!(n=n.reverse().filter(t=>t.is("element","listItem"))).length)return;const s=n[0].getAttribute("listIndent"),r=n[0].getAttribute("listType");let o=n[0].previousSibling;if(o.is("element","listItem"))for(;o.getAttribute("listIndent")!==s;)o=o.previousSibling;else o=null;o||(o=n[n.length-1].nextSibling),o&&o.is("element","listItem")&&o.getAttribute("listType")===r&&t.model.change(t=>{const i=n.filter(t=>t.getAttribute("listIndent")===s);for(const n of i)for(const i of e)if(i.appliesToListItem(n)){const e=i.attributeName,s=o.getAttribute(e);t.setAttribute(e,s,n)}})}}(t,i)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",Vi(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",Vi(t)),e.document.registerPostFixer(function(t,e){return i=>{let n=!1;const s=Bi(t.model.document.differ.getChanges()).filter(t=>"todo"!==t.getAttribute("listType"));if(!s.length)return n;let r=s[s.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=s[0].previousSibling,r)){const t=s[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==t&&(r=r.previousSibling,r););}for(const t of e){const e=t.attributeName;for(const o of s)if(t.appliesToListItem(o))if(o.hasAttribute(e)){const s=o.previousSibling;Ni(s,o,t.attributeName)&&(i.setAttribute(e,s.getAttribute(e),o),n=!0)}else Fi(r,o,t)?i.setAttribute(e,r.getAttribute(e),o):i.setAttribute(e,t.defaultValue,o),n=!0;else i.removeAttribute(e,o)}return n}}(t,i)),t.conversion.for("upcast").add((n=i,t=>{t.on("element:li",(t,e,i)=>{if(!e.modelRange)return;const s=e.viewItem.parent,r=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;for(const t of n)if(t.appliesToListItem(r)){const e=t.getAttributeOnUpcast(s);i.writer.setAttribute(t.attributeName,e,r)}},{priority:"low"})})),t.conversion.for("downcast").add(function(t){return i=>{for(const n of t)i.on(`attribute:${n.attributeName}:listItem`,(t,i,s)=>{const r=s.writer,o=i.item,l=ii(o.previousSibling,{sameIndent:!0,listIndent:o.getAttribute("listIndent"),direction:"backward"}),a=s.mapper.toViewElement(o);e(o,l)||r.breakContainer(r.createPositionBefore(a)),n.setAttributeOnDowncast(r,i.attributeNewValue,a.parent)},{priority:"low"})};function e(t,e){return e&&t.getAttribute("listType")===e.getAttribute("listType")&&t.getAttribute("listIndent")===e.getAttribute("listIndent")&&t.getAttribute("listStyle")===e.getAttribute("listStyle")&&t.getAttribute("listReversed")===e.getAttribute("listReversed")&&t.getAttribute("listStart")===e.getAttribute("listStart")}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const i=Bi(t.model.document.differ.getChanges()).filter(t=>"todo"===t.getAttribute("listType")&&(t.hasAttribute("listStyle")||t.hasAttribute("listReversed")||t.hasAttribute("listStart")));if(!i.length)return!1;for(const t of i)e.removeAttribute("listStyle",t),e.removeAttribute("listReversed",t),e.removeAttribute("listStart",t);return!0}}(t))}_mergeListAttributesWhileMergingLists(t){const e=this.editor.model;let i;this.listenTo(e,"deleteContent",(t,[e])=>{const n=e.getFirstPosition(),s=e.getLastPosition();if(n.parent===s.parent)return;if(!n.parent.is("element","listItem"))return;const r=s.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const o=ii(n.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});o&&o.getAttribute("listType")===r.getAttribute("listType")&&(i=o)},{priority:"high"}),this.listenTo(e,"deleteContent",()=>{i&&(e.change(e=>{const n=ii(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!n)return void(i=null);const s=[n,...si(e.createPositionAt(n,0),"forward")];for(const n of s)for(const s of t)if(s.appliesToListItem(n)){const t=s.attributeName,r=i.getAttribute(t);e.setAttribute(t,r,n)}}),i=null)},{priority:"low"})}}function Fi(t,e,i){if(!t)return!1;const n=t.getAttribute(i.attributeName);return!!n&&(n!=i.defaultValue&&t.getAttribute("listType")===e.getAttribute("listType"))}function Ni(t,e,i){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const n=t.getAttribute("listIndent");if(n<1||n!==e.getAttribute("listIndent"))return!1;const s=t.getAttribute(i);return!(!s||s===e.getAttribute(i))}function Vi(t){return(e,i)=>{i=i.filter(t=>t.is("element","listItem")),t.model.change(t=>{for(const e of i)t.removeAttribute("listStyle",e)})}}function Bi(t){const e=[];for(const i of t){const t=Oi(i);t&&t.is("element","listItem")&&e.push(t)}return e}function Oi(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}class zi extends t.Plugin{static get requires(){return[Ei,Pe]}static get pluginName(){return"LegacyListProperties"}static get isOfficialPlugin(){return!0}}const Ri="todoListChecked";class Di extends t.Command{_selectedElements;constructor(t){super(t),this._selectedElements=[],this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every(t=>!!t.getAttribute(Ri)),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),n=i.start.parent,s=[];e.checkAttribute(n,Ri)&&s.push(n);for(const t of i.getItems())e.checkAttribute(t,Ri)&&!s.includes(t)&&s.push(t);return s}execute(t={}){this.editor.model.change(e=>{for(const i of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute(Ri,!0,i):e.removeAttribute(Ri,i)}})}}const Mi=(t,e,i)=>{const n=e.modelCursor,s=n.parent,r=e.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=s.name||!n.isAtStart)return;if(!i.consumable.consume(r,{name:!0}))return;const o=i.writer;o.setAttribute("listType","todo",s),e.viewItem.hasAttribute("checked")&&o.setAttribute("todoListChecked",!0,s),e.modelRange=o.createRange(n)};function ji(t){return(e,i)=>{const n=i.modelPosition,s=n.parent;if(!s.is("element","listItem")||"todo"!=s.getAttribute("listType"))return;const r=Ki(i.mapper.toViewElement(s),t);r&&(i.viewPosition=i.mapper.findPositionIn(r,n.offset))}}function $i(t,e,i,n){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},function(e){const s=(0,r.createElement)(document,"input",{type:"checkbox",tabindex:"-1"});i&&s.setAttribute("checked","checked"),s.addEventListener("change",()=>n(t));const o=this.toDomElement(e);return o.appendChild(s),o})}function Ki(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const Ui=(0,r.parseKeystroke)("Ctrl+Enter");class qi extends t.Plugin{static get pluginName(){return"LegacyTodoListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[_i]}init(){const t=this.editor,{editing:e,data:i,model:n}=t;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck((t,e)=>{const i=t.last;if("todoListChecked"==e&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1}),t.commands.add("todoList",new He(t,"todo"));const s=new Di(t);var o,l;t.commands.add("checkTodoList",s),t.commands.add("todoListCheck",s),i.downcastDispatcher.on("insert:listItem",function(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const r=i.item;s.consume(r,"insert"),s.consume(r,"attribute:listType"),s.consume(r,"attribute:listIndent"),s.consume(r,"attribute:todoListChecked");const o=n.writer,l=Je(r,n);o.addClass("todo-list",l.parent);const a=o.createContainerElement("label",{class:"todo-list__label"}),c=o.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),u=o.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&o.setAttribute("checked","checked",c),o.insert(o.createPositionAt(l,0),a),o.insert(o.createPositionAt(a,0),c),o.insert(o.createPositionAfter(c),u),Qe(r,l,n,t)}}(n),{priority:"high"}),i.upcastDispatcher.on("element:input",Mi,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(i,n,s)=>{const r=s.consumable;if(!r.test(n.item,"insert")||!r.test(n.item,"attribute:listType")||!r.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const o=n.item;r.consume(o,"insert"),r.consume(o,"attribute:listType"),r.consume(o,"attribute:listIndent"),r.consume(o,"attribute:todoListChecked");const l=s.writer,a=Je(o,s),c=!!o.getAttribute("todoListChecked"),u=$i(o,l,c,e),d=l.createContainerElement("span",{class:"todo-list__label__description"});l.addClass("todo-list",a.parent),l.insert(l.createPositionAt(a,0),u),l.insert(l.createPositionAfter(u),d),Qe(o,a,s,t)}}(n,t=>this._handleCheckmarkChange(t)),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(o=t=>this._handleCheckmarkChange(t),l=e.view,(t,e,i)=>{if(!i.consumable.consume(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer,r=function(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("uiElement","label"))return t.item}(n,l);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),i=$i(e.item,s,t,o),r=s.createContainerElement("span",{class:"todo-list__label__description"}),l=s.createRangeIn(n),a=ni(n),c=ei(l.start),u=a?s.createPositionBefore(a):l.end,d=s.createRange(c,u);s.addClass("todo-list",n.parent),s.move(d,s.createPositionAt(r,0)),s.insert(s.createPositionAt(n,0),i),s.insert(s.createPositionAfter(i),r)}else if("todo"==e.attributeOldValue){const t=Ki(n,l);s.removeClass("todo-list",n.parent),s.remove(r),s.move(s.createRangeIn(t),s.createPositionBefore(t)),s.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,i,n)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!n.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:s,writer:r}=n,o=!!i.item.getAttribute("todoListChecked"),l=s.toViewElement(i.item).getChild(0),a=$i(i.item,r,o,t);r.insert(r.createPositionAfter(l),a),r.remove(l)}}(t=>this._handleCheckmarkChange(t))),e.mapper.on("modelToViewPosition",ji(e.view)),i.mapper.on("modelToViewPosition",ji(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(i,n)=>{if("left"!=(0,r.getLocalizedArrowKeyCodeDirection)(n.keyCode,e.contentLanguageDirection))return;const s=t.schema,o=t.document.selection;if(!o.isCollapsed)return;const l=o.getFirstPosition(),a=l.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&l.isAtStart){const e=s.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change(t=>t.setSelection(e)),n.preventDefault(),n.stopPropagation(),i.stop()}}}(n,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",(e,i)=>{(0,r.getCode)(i)===Ui&&(t.execute("checkTodoList"),e.stop())},{priority:"high"});const a=new Set;this.listenTo(n,"applyOperation",(t,e)=>{const i=e[0];if("rename"==i.type&&"listItem"==i.oldName){const t=i.position.nodeAfter;t.hasAttribute("todoListChecked")&&a.add(t)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const t of i.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&a.add(t)}),n.document.registerPostFixer(t=>{let e=!1;for(const i of a)t.removeAttribute("todoListChecked",i),e=!0;return a.clear(),e}),this._initAriaAnnouncements()}_handleCheckmarkChange(t){const e=this.editor,i=e.model,n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(n)})}_initAriaAnnouncements(){const{model:t,ui:e,t:i}=this.editor;let n=null;e&&t.document.selection.on("change:range",()=>{const s=t.document.selection.focus.parent,r=Wi(n),o=Wi(s);r&&!o?e.ariaLiveAnnouncer.announce(i("Leaving a to-do list")):!r&&o&&e.ariaLiveAnnouncer.announce(i("Entering a to-do list")),n=s})}}function Wi(t){return!!t&&t.is("element","listItem")&&"todo"===t.getAttribute("listType")}class Gi extends t.Plugin{static get requires(){return[qi,Ue]}static get pluginName(){return"LegacyTodoList"}static get isOfficialPlugin(){return!0}}class Hi extends t.Plugin{static get pluginName(){return"AdjacentListsSupport"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.register("listSeparator",{allowWhere:"$block",isBlock:!0}),t.conversion.for("upcast").add(t=>{t.on("element:ol",Yi()),t.on("element:ul",Yi())}).elementToElement({model:"listSeparator",view:"ck-list-separator"}),t.conversion.for("editingDowncast").elementToElement({model:"listSeparator",view:{name:"div",classes:["ck-list-separator","ck-hidden"]}}),t.conversion.for("dataDowncast").elementToElement({model:"listSeparator",view:(t,e)=>{const i=e.writer.createContainerElement("ck-list-separator");return e.writer.setCustomProperty("dataPipeline:transparentRendering",!0,i),i.getFillerOffset=()=>null,i}})}}function Yi(){return(t,e,i)=>{const n=e.viewItem,s=n.nextSibling;if(!s)return;if(n.name!==s.name)return;e.modelRange||Object.assign(e,i.convertChildren(e.viewItem,e.modelCursor));const r=i.writer,o=r.createElement("listSeparator");if(!i.safeInsert(o,e.modelCursor))return;const l=i.getSplitParts(o);e.modelRange=r.createRange(e.modelRange.start,r.createPositionAfter(l[l.length-1])),i.updateConversionResult(o,e)}}})(),(window.CKEditor5=window.CKEditor5||{}).list=n})();;
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={237:e=>{"use strict";e.exports=CKEditor5.dll},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{PasteFromOffice:()=>J,PasteFromOfficeGoogleDocsNormalizer:()=>D,PasteFromOfficeGoogleSheetsNormalizer:()=>q,PasteFromOfficeMSWordNormalizer:()=>_,_convertHexToBase64:()=>C,_convertPasteOfficeCssLengthToPx:()=>o,_isPasteOfficePxValue:()=>l,_normalizePasteOfficeSpaceRunSpans:()=>G,_normalizePasteOfficeSpacing:()=>H,_removePasteGoogleOfficeSheetsTag:()=>N,_removePasteMSOfficeAttributes:()=>A,_removePasteOfficeBoldWrapper:()=>$,_removePasteOfficeInvalidTableWidths:()=>I,_removePasteOfficeStyleBlock:()=>z,_removePasteOfficeXmlnsAttributes:()=>V,_replacePasteOfficeImagesSourceWithBase64:()=>w,_toPasteOfficePxValue:()=>a,_transformPasteOfficeBlockBrsToParagraphs:()=>R,_transformPasteOfficeBookmarks:()=>s,_transformPasteOfficeListItemLikeElementsIntoLists:()=>c,_transformPasteOfficeTables:()=>P,_unwrapPasteOfficeParagraphInListItem:()=>d,parsePasteOfficeHtml:()=>X});var e=n(782),t=n(331);function s(e,t){const n=[];for(const i of t.createRangeIn(e)){const e=i.item;e.is("element","a")&&!e.hasAttribute("href")&&(e.hasAttribute("id")||e.hasAttribute("name"))&&n.push(e)}for(const e of n){const n=e.parent.getChildIndex(e)+1,i=e.getChildren();t.insertChild(n,i,e.parent)}}var r=n(783);function o(e){const t=parseFloat(e);return e.endsWith("pt")?a(96*t/72):e.endsWith("pc")?a(12*t*96/72):e.endsWith("in")?a(96*t):e.endsWith("cm")?a(96*t/2.54):e.endsWith("mm")?a(t/10*96/2.54):e}function l(e){return void 0!==e&&e.endsWith("px")}function a(e){return Math.round(e)+"px"}function c(e,t,n){if(!e.childCount)return;const i=new r.ViewUpcastWriter(e.document),s=function(e,t){const n=t.createRangeIn(e),i=[],s=new Set;for(const e of n.getItems()){if(!e.is("element")||!e.name.match(/^(p|h\d+|li|div)$/))continue;let t=S(e);if(void 0===t||0!=parseFloat(t)||Array.from(e.getClassNames()).find(e=>e.startsWith("MsoList"))||(t=void 0),e.hasStyle("mso-list")&&"none"!==e.getStyle("mso-list")||void 0!==t&&s.has(t)){const n=v(e);i.push({element:e,id:n.id,order:n.order,indent:n.indent,marginLeft:t}),void 0!==t&&s.add(t)}else s.clear()}return i}(e,i);if(!s.length)return;const o={},l=[];let a=m();for(const e of s)if(void 0!==e.indent){g(e)||(u(i,l,a),a=m(),l.length=0);const s=`${e.id}:${e.indent}`,r=Math.min(e.indent-1,l.length);if(r<l.length&&l[r].id!==e.id&&(l.length=r),r<l.length-1)l.length=r+1;else{const a=h(e,t);if(r>l.length-1||l[r].listElement.name!=a.type){0==r&&"ol"==a.type&&void 0!==e.id&&o[s]&&(a.startIndex=o[s]);const t=b(a,i,n);if(0==l.length){const n=e.element.parent,s=n.getChildIndex(e.element)+1;i.insertChild(s,t,n)}else{const e=l[r-1].listItemElements;i.appendChild(t,e[e.length-1])}l[r]={...e,listElement:t,listItemElements:[]},0==r&&void 0!==e.id&&(o[s]=a.startIndex||1)}}const c="li"==e.element.name?e.element:i.createElement("li");f(i,l,a,e,c,r),i.appendChild(c,l[r].listElement),l[r].listItemElements.push(c),0==r&&void 0!==e.id&&o[s]++,e.element!=c&&i.appendChild(e.element,c),x(e.element,i),i.removeStyle("text-indent",e.element),i.removeStyle("margin-left",e.element)}else{const t=l.find(t=>t.marginLeft==e.marginLeft);if(t){const n=t.listItemElements;i.appendChild(e.element,n[n.length-1]),i.removeStyle("margin-left",e.element)}else l.length=0}u(i,l,a)}function f(e,t,n,i,s,r){if(void 0===i.marginLeft)return void(0==r&&(n.canApplyMarginOnList=!1));const o=parseFloat(i.marginLeft);let l=0;if(t.length>1){const e=t[t.length-2].listItemElements;if(e.length>0){const t=e[e.length-1].getStyle("margin-left");void 0!==t&&(l+=parseFloat(t))}}l+=40*t.length;const c=o-l,f=0!==c?a(c):void 0;f&&(e.setStyle("margin-left",f,s),0==r&&n.canApplyMarginOnList&&(void 0===n.marginLeft&&(n.marginLeft=f),f!==n.marginLeft&&(n.canApplyMarginOnList=!1),n.topLevelListItemElements.push(s)))}function m(){return{marginLeft:void 0,canApplyMarginOnList:!0,topLevelListItemElements:[]}}function u(e,t,n){if(n.canApplyMarginOnList&&n.marginLeft&&n.topLevelListItemElements.length>0){e.setStyle("margin-left",n.marginLeft,t[0].listElement);for(const t of n.topLevelListItemElements)e.removeStyle("margin-left",t)}}function d(e,t){for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("element","li")){const n=e.getChild(0);n&&n.is("element","p")&&t.unwrapElement(n)}}}function g(e){const t=e.element.previousSibling;if(!t){const t=e.element.parent;return p(t)&&(!t.previousSibling||p(t.previousSibling))}return p(t)}function p(e){return e.is("element","ol")||e.is("element","ul")}function h(e,t){const n=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),i=/mso-level-number-format:([^;]{0,100});/gi,s=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,r=new RegExp(`@list\\s+l${e.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),o=new RegExp(`@list l${e.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),l=r.exec(t),a=o.exec(t),c=l&&!a,f=n.exec(t);let m="decimal",u="ol",d=null;if(f&&f[1]){const t=i.exec(f[1]);if(t&&t[1]&&(m=t[1].trim(),u="bullet"!==m&&"image"!==m?"ol":"ul"),"bullet"===m){const t=function(e){if("li"==e.name&&"ul"==e.parent.name&&e.parent.hasAttribute("type"))return e.parent.getAttribute("type");const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const n=t._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(e.element);t&&(m=t)}else{const e=s.exec(f[1]);e&&e[1]&&(d=parseInt(e[1]))}c&&(u="ol")}return{type:u,startIndex:d,style:y(m),isLegalStyleList:c}}function y(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function b(e,t,n){const i=t.createElement(e.type);return e.style&&t.setStyle("list-style-type",e.style,i),e.startIndex&&e.startIndex>1&&t.setAttribute("start",e.startIndex,i),e.isLegalStyleList&&n&&t.addClass("legal-list",i),i}function v(e){const t=e.getStyle("mso-list");if(void 0===t)return{};const n=t.match(/(^|\s{1,100})l(\d+)/i),i=t.match(/\s{0,100}lfo(\d+)/i),s=t.match(/\s{0,100}level(\d+)/i);return n&&i&&s?{id:n[2],order:i[1],indent:parseInt(s[1])}:{indent:1}}function x(e,t){const n=new r.Matcher({name:"span",styles:{"mso-list":"Ignore"}}),i=t.createRangeIn(e);for(const e of i)"elementStart"===e.type&&n.match(e.item)&&t.remove(e.item)}function S(e){const t=e.getStyle("margin-left");return void 0===t||t.endsWith("px")?t:o(t)}function w(e,t){if(!e.childCount)return;const n=new r.ViewUpcastWriter(e.document),i=function(e,t){const n=t.createRangeIn(e),i=new r.Matcher({name:/v:(.+)/}),s=[];for(const e of n){if("elementStart"!=e.type)continue;const t=e.item,n=t.previousSibling,r=n&&n.is("element")?n.name:null,o=["Chart"],l=i.match(t),a=t.getAttribute("o:gfxdata"),c="v:shapetype"===r,f=a&&o.some(e=>t.getAttribute("id").includes(e));l&&a&&!c&&!f&&s.push(e.item.getAttribute("id"))}return s}(e,n);!function(e,t,n){const i=n.createRangeIn(t),s=new r.Matcher({name:"img"}),o=[];for(const t of i)if(t.item.is("element")&&s.match(t.item)){const n=t.item,i=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];i.length&&i.every(t=>e.indexOf(t)>-1)?o.push(n):n.getAttribute("src")||o.push(n)}for(const e of o)n.remove(e)}(i,e,n),function(e,t,n){const i=n.createRangeIn(t),s=[];for(const t of i)if("elementStart"==t.type&&t.item.is("element","v:shape")){const n=t.item.getAttribute("id");if(e.includes(n))continue;r(t.item.parent.getChildren(),n)||s.push(t.item)}for(const e of s){const t={src:o(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const i=n.createElement("img",t);n.insertChild(e.index+1,i,e.parent)}function r(e,t){for(const n of e)if(n.is("element")){if("img"==n.name&&n.getAttribute("v:shapes")==t)return!0;if(r(n.getChildren(),t))return!0}return!1}function o(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(i,e,n),function(e,t){const n=t.createRangeIn(e),i=new r.Matcher({name:/v:(.+)/}),s=[];for(const e of n)"elementStart"==e.type&&i.match(e.item)&&s.push(e.item);for(const e of s)t.remove(e)}(e,n);const s=function(e,t){const n=t.createRangeIn(e),i=new r.Matcher({name:"img"}),s=[];let o=0;for(const e of n)e.item.is("element")&&i.match(e.item)&&(e.item.getAttribute("src").startsWith("file://")&&s.push({element:e.item,imageIndex:o}),o++);return s}(e,n);s.length&&function(e,t,n){for(let i=0;i<e.length;i++){const{element:s,imageIndex:r}=e[i],o=t[r];if(o){const e=`data:${o.type};base64,${C(o.hex)}`;n.setAttribute("src",e,s)}}}(s,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),i=e.match(n),s=[];if(i)for(const e of i){let n=!1;e.includes("\\pngblip")?n="image/png":e.includes("\\jpegblip")&&(n="image/jpeg"),n&&s.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:n})}return s}(t),n)}function C(e){return btoa(e.match(/\w{2}/g).map(e=>String.fromCharCode(parseInt(e,16))).join(""))}function A(e){const t=[],n=new r.ViewUpcastWriter(e.document);for(const{item:i}of n.createRangeIn(e))if(i.is("element")){for(const e of i.getClassNames())/\bmso/gi.exec(e)&&n.removeClass(e,i);for(const e of i.getStyleNames())/\bmso/gi.exec(e)&&n.removeStyle(e,i);(i.is("element","w:sdt")||i.is("element","w:sdtpr")&&i.isEmpty||i.is("element","o:p")&&i.isEmpty)&&t.push(i)}for(const e of t){const t=e.parent,i=t.getChildIndex(e);n.insertChild(i,e.getChildren(),t),n.remove(e)}}function P(e,t,n=!1,i=!1){for(const s of t.createRangeIn(e).getItems()){if(!s.is("element","table")&&!s.is("element","td")&&!s.is("element","th"))continue;if(n&&i&&s.is("element","table")){const e=s.parent?.is("element","div")?s.parent:null,n=s.parent?.parent?.is("element","div")?s.parent.parent:null,i=e??n;i&&"center"===i.getAttribute("align")&&!s.getAttribute("align")?(t.setStyle("margin-left","auto",s),t.setStyle("margin-right","auto",s)):i&&"right"===i.getAttribute("align")&&!s.getAttribute("align")?(t.setStyle("margin-left","auto",s),t.setStyle("margin-right","0",s)):i||s.getAttribute("align")||(t.setStyle("margin-left","0",s),t.setStyle("margin-right","auto",s))}const e=["left","top","right","bottom"];if(e.every(e=>!s.hasStyle(`border-${e}-style`)))t.setStyle("border-style","none",s);else for(const n of e)s.hasStyle(`border-${n}-style`)||t.setStyle(`border-${n}-style`,"none",s);const r=["width","height",...e.map(e=>`border-${e}-width`),...e.map(e=>`padding-${e}`)];for(const e of r)s.hasStyle(e)&&t.setStyle(e,o(s.getStyle(e)),s)}}function I(e,t){for(const n of t.createRangeIn(e).getItems())n.is("element","table")&&("0px"===n.getStyle("width")&&t.removeStyle("width",n),"0"===n.getAttribute("width")&&t.removeAttribute("width",n))}function E(e,t){const n=[],i=[];for(const{item:s}of e.createRangeIn(t))if(s.is("element")&&s.getStyle("mso-footnote-id")){n.unshift(s);const{nextSibling:e}=s;e?.is("$text")&&e.data.startsWith(" ")&&i.unshift(e)}for(const t of n)e.remove(t);for(const t of i){const n=t.data.substring(1);if(n.length>0){const i=t.parent,s=i.getChildIndex(t),r=e.createText(n);e.remove(t),e.insertChild(s,r,i)}else e.remove(t)}return t}function O(e,t){const n=e.createElement("sup",{class:"footnote"}),i=e.createElement("a",{id:`ref-${t}`,href:`#${t}`});return e.appendChild(i,n),n}function L(e,t){const n=e.createElement("li",{id:t,class:"footnote-definition"}),i=e.createElement("a",{href:`#ref-${t}`,class:"footnote-backlink"}),s=e.createElement("div",{class:"footnote-content"});return e.appendChild(e.createText("^"),i),e.appendChild(i,n),e.appendChild(s,n),{listItem:n,content:s}}const T=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,M=/xmlns:o="urn:schemas-microsoft-com/i;class _{document;hasMultiLevelListPlugin;hasTablePropertiesPlugin;hasExtendedTableBlockAlignment;constructor(e,t=!1,n=!1,i=!1){this.document=e,this.hasMultiLevelListPlugin=t,this.hasTablePropertiesPlugin=n,this.hasExtendedTableBlockAlignment=i}isActive(e){return T.test(e)||M.test(e)}execute(e){const t=new r.ViewUpcastWriter(this.document),{body:n,stylesString:i}=e._parsedData;s(n,t),c(n,i,this.hasMultiLevelListPlugin),w(n,e.dataTransfer.getData("text/rtf")),P(n,t,this.hasTablePropertiesPlugin,this.hasExtendedTableBlockAlignment),I(n,t),function(e,t){const n=new Map,i=new Map;let s=null;for(const{item:r}of t.createRangeIn(e))if(r.is("element"))if("footnote-list"!==r.getStyle("mso-element")){if(r.hasStyle("mso-footnote-id")){const e=r.findAncestor("element",e=>"footnote"===e.getStyle("mso-element"));if(e){const t=e.getAttribute("id");i.set(t,e)}else{const e=r.getStyle("mso-footnote-id");n.set(e,r)}continue}}else s=r;if(!n.size||!s)return;const r=function(e){return e.createElement("ol",{class:"footnotes"})}(t);t.replace(s,r);for(const[e,s]of n){const n=i.get(e);if(!n)continue;t.replace(s,O(t,e));const o=L(t,e);E(t,n);for(const e of n.getChildren()){let n=e;e.is("element")&&(n=t.clone(e,!0)),t.appendChild(n,o.content)}t.appendChild(o.listItem,r)}}(n,t),A(n),e.content=n}}function $(e,t){for(const n of e.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const i=e.getChildIndex(n);t.remove(n),t.insertChild(i,n.getChildren(),e)}}function R(e,t){const n=new r.ViewDocument(t.document.stylesProcessor),i=new r.ViewDomConverter(n,{renderingMode:"data"}),s=i.blockElements,o=i.inlineObjectElements,l=[];for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("element","br")){const n=W(e,"forward",t,{blockElements:s,inlineObjectElements:o}),i=W(e,"backward",t,{blockElements:s,inlineObjectElements:o}),r=F(n,s);(F(i,s)||r)&&l.push(e)}}for(const e of l)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}function W(e,t,n,{blockElements:i,inlineObjectElements:s}){let r=n.createPositionAt(e,"forward"==t?"after":"before");return r=r.getLastMatchingPosition(({item:e})=>e.is("element")&&!i.includes(e.name)&&!s.includes(e.name),{direction:t}),"forward"==t?r.nodeAfter:r.nodeBefore}function F(e,t){return!!e&&e.is("element")&&t.includes(e.name)}function k(e){let t=e;for(;t;){if(t.is("element")){const e=t.getStyle?.("white-space");if("pre-wrap"===e)return!0}t=t.parent}return!1}function j(e,t,n){const{parent:i,data:s}=e,r=s.replaceAll("\t"," ".repeat(n)),o=i.getChildIndex(e);t.remove(e),t.insertChild(o,t.createText(r),i)}const B=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class D{document;constructor(e){this.document=e}isActive(e){return B.test(e)}execute(e){const t=new r.ViewUpcastWriter(this.document),{body:n}=e._parsedData;$(n,t),d(n,t),R(n,t),function(e,t,n){const i=new Set;for(const n of t.createRangeIn(e).getItems())n.is("view:$textProxy")&&n.data.includes("\t")&&k(n.parent)&&i.add(n.textNode);for(const e of i)j(e,t,n)}(n,t,8),e.content=n}}function V(e,t){for(const n of e.getChildren())n.is("element","table")&&n.hasAttribute("xmlns")&&t.removeAttribute("xmlns",n)}function N(e,t){for(const n of e.getChildren())if(n.is("element","google-sheets-html-origin")){const i=e.getChildIndex(n);t.remove(n),t.insertChild(i,n.getChildren(),e)}}function z(e,t){for(const n of Array.from(e.getChildren()))n.is("element","style")&&t.remove(n)}const U=/<google-sheets-html-origin/i;class q{document;constructor(e){this.document=e}isActive(e){return U.test(e)}execute(e){const t=new r.ViewUpcastWriter(this.document),{body:n}=e._parsedData;N(n,t),V(n,t),I(n,t),z(n,t),e.content=n}}function H(e){return K(K(e)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/(<span\s+style=['"]letter-spacing:[^'"]+?['"]>)[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/<o:p>(&nbsp;|\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}function G(e){e.querySelectorAll("span[style*=spacerun]").forEach(e=>{const t=e,n=t.innerText.length||0;t.innerText=Array(n+1).join("  ").substr(0,n)})}function K(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length))}function X(e,t){const n=new DOMParser,i=H(function(e){const t="</body>",n="</html>",i=e.indexOf(t);if(i<0)return e;const s=e.indexOf(n,i+t.length);return e.substring(0,i+t.length)+(s>=0?e.substring(s):"")}(e=(e=e.replace(/<!--\[if gte vml 1]>/g,"")).replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,""))),s=n.parseFromString(i,"text/html");G(s);const o=s.body.innerHTML,l=function(e,t){const n=new r.ViewDocument(t),i=new r.ViewDomConverter(n,{renderingMode:"data"}),s=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)s.appendChild(o[0]);return i.domToView(s,{skipComments:!0})}(s,t),a=function(e){const t=[],n=[],i=Array.from(e.getElementsByTagName("style"));for(const e of i)e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length&&(t.push(e.sheet),n.push(e.innerHTML));return{styles:t,stylesString:n.join(" ")}}(s);return{body:l,bodyString:o,styles:a.styles,stylesString:a.stylesString}}class J extends e.Plugin{static get pluginName(){return"PasteFromOffice"}static get licenseFeatureCode(){return"PFO"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[t.ClipboardPipeline]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),n=e.editing.view.document,i=[],s=this.editor.plugins.has("MultiLevelListEditing"),r=this.editor.plugins.has("TablePropertiesEditing"),o=!!this.editor.config.get("experimentalFlags.useExtendedTableBlockAlignment");i.push(new _(n,s,r,o)),i.push(new D(n)),i.push(new q(n)),t.on("inputTransformation",(t,s)=>{if(s._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const r=s.dataTransfer.getData("text/html"),o=i.find(e=>e.isActive(r));o&&(s._parsedData||(s._parsedData=X(r,n.stylesProcessor)),o.execute(s),s._isTransformedWithPasteFromOffice=!0)},{priority:"high"})}}})(),(window.CKEditor5=window.CKEditor5||{}).pasteFromOffice=i})();;
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Remove Format":"Remove Format"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")}},e={};function o(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,o),s.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{RemoveFormat:()=>u,RemoveFormatCommand:()=>c,RemoveFormatEditing:()=>m,RemoveFormatUI:()=>n});var t=o(782),e=o(355),r=o(311);const s="removeFormat";class n extends t.Plugin{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add(s,()=>{const t=this._createButton(r.ButtonView);return t.set({tooltip:!0}),t}),t.ui.componentFactory.add(`menuBar:${s}`,()=>this._createButton(r.MenuBarMenuListItemButtonView))}_createButton(t){const o=this.editor,i=o.locale,r=o.commands.get(s),n=new t(o.locale),a=i.t;return n.set({label:a("Remove Format"),icon:e.IconRemoveFormat}),n.bind("isEnabled").to(r,"isEnabled"),this.listenTo(n,"execute",()=>{o.execute(s),o.editing.view.focus()}),n}}var a=o(584);class c extends t.Command{_customAttributesHandlers=[];refresh(){const t=this.editor.model;this.isEnabled=!!(0,a.first)(this._getFormattingItems(t.document.selection))}execute(){const t=this.editor.model;t.change(e=>{for(const o of this._getFormattingItems(t.document.selection))if(o.is("selection"))for(const t of this._getFormattingAttributes(o))e.removeSelectionAttribute(t);else{const t=e.createRangeOn(o);for(const i of this._getFormattingAttributes(o))this._removeFormatting(i,o,t,e)}})}registerCustomAttribute(t,e){this._customAttributesHandlers.push({isFormatting:t,removeFormatting:e})}_removeFormatting(t,e,o,i){let r=!1;for(const{isFormatting:s,removeFormatting:n}of this._customAttributesHandlers)s(t,e)&&(n(t,o,i),r=!0);r||i.removeAttribute(t,o)}*_getFormattingItems(t){const e=this.editor.model,o=e.schema,i=t=>!!(0,a.first)(this._getFormattingAttributes(t));for(const r of t.getRanges())for(const t of r.getItems())o.isBlock(t)&&r.end.isTouching(e.createPositionAt(t,0))||i(t)&&(yield t);for(const e of t.getSelectedBlocks())i(e)&&(yield e);i(t)&&(yield t)}*_getFormattingAttributes(t){const e=this.editor.model.schema;for(const[o]of t.getAttributes()){for(const{isFormatting:e}of this._customAttributesHandlers)e(o,t)&&(yield o);const i=e.getAttributeProperties(o);i&&i.isFormatting&&(yield o)}}}class m extends t.Plugin{static get pluginName(){return"RemoveFormatEditing"}static get licenseFeatureCode(){return"RF"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const t=this.editor;t.commands.add("removeFormat",new c(t))}}class u extends t.Plugin{static get requires(){return[m,n]}static get pluginName(){return"RemoveFormat"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).removeFormat=i})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Show blocks":"Show blocks"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={74:(e,t,o)=>{"use strict";o.d(t,{A:()=>Y});var i=o(792),n=o.n(i),a=o(305),r=o.n(a),s=o(252),l=o.n(s),c=new URL(o(83),o.b),d=new URL(o(923),o.b),k=new URL(o(436),o.b),p=new URL(o(309),o.b),g=new URL(o(228),o.b),w=new URL(o(84),o.b),u=new URL(o(524),o.b),b=new URL(o(757),o.b),h=new URL(o(310),o.b),x=new URL(o(599),o.b),m=new URL(o(256),o.b),_=new URL(o(921),o.b),f=new URL(o(693),o.b),v=new URL(o(490),o.b),y=new URL(o(282),o.b),C=new URL(o(206),o.b),M=new URL(o(772),o.b),S=new URL(o(510),o.b),E=new URL(o(291),o.b),L=new URL(o(656),o.b),A=new URL(o(767),o.b),V=r()(n()),B=l()(c),T=l()(d),N=l()(k),D=l()(p),j=l()(g),z=l()(w),R=l()(u),O=l()(b),I=l()(h),U=l()(x),$=l()(m),P=l()(_),H=l()(f),F=l()(v),K=l()(y),q=l()(C),Q=l()(M),G=l()(S),J=l()(E),W=l()(L),X=l()(A);V.push([e.id,`:root{--ck-show-blocks-border-color:#757575}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) address{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) address:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) address{background-image:url(${B});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) address{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>ADDRESS</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) aside{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) aside:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) aside{background-image:url(${T});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) aside{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>ASIDE</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) blockquote{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) blockquote:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) blockquote{background-image:url(${N});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) blockquote{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>BLOCKQUOTE</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) details{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) details:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) details{background-image:url(${D});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) details{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>DETAILS</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) div:not(.ck-widget,.ck-widget *){background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) div:not(.ck-widget,.ck-widget *):not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) div:not(.ck-widget,.ck-widget *){background-image:url(${j});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) div:not(.ck-widget,.ck-widget *){background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>DIV</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) footer{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) footer:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) footer{background-image:url(${z});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) footer{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>FOOTER</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h1{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h1:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h1{background-image:url(${R});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h1{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>H1</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h2{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h2:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h2{background-image:url(${O});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h2{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>H2</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h3{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h3:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h3{background-image:url(${I});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h3{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>H3</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h4{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h4:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h4{background-image:url(${U});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h4{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>H4</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h5{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h5:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h5{background-image:url(${$});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h5{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>H5</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h6{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h6:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h6{background-image:url(${P});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) h6{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>H6</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) header{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) header:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) header{background-image:url(${H});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) header{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>HEADER</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) main{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) main:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) main{background-image:url(${F});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) main{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>MAIN</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) nav{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) nav:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) nav{background-image:url(${K});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) nav{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>NAV</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) pre{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) pre:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) pre{background-image:url(${q});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) pre{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>PRE</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ol{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ol:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ol{background-image:url(${Q});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ol{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>OL</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ul{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ul:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ul{background-image:url(${G});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) ul{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>UL</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) p{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) p:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) p{background-image:url(${J});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) p{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>P</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) section{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) section:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) section{background-image:url(${W});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) section{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>SECTION</text></svg>");background-position:calc(100% - 1px) 1px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) :where(figure.image,figure.table) figcaption{background-repeat:no-repeat;padding-top:15px}.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) :where(figure.image,figure.table) figcaption:not(.ck-widget_selected):not(.ck-widget:hover){outline:1px dashed var(--ck-show-blocks-border-color)}[dir=ltr] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) :where(figure.image,figure.table) figcaption{background-image:url(${X});background-position:1px 1px}[dir=rtl] .ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks:not(.ck-widget) :where(figure.image,figure.table) figcaption{background-image:url("data:image/svg+xml;utf8,<svg width='120' height='12' xmlns='http://www.w3.org/2000/svg' ><text style='paint-order:stroke fill; clip-path: inset(-3px); transform:translate(-2px, 0)' stroke='%23EAEAEA' stroke-width='13' dominant-baseline='middle' fill='black' x='100%' text-anchor='end' y='7' font-size='9px' font-family='Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace'>FIGCAPTION</text></svg>");background-position:calc(100% - 1px) 1px}`,""]);const Y=V},83:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>ADDRESS</text></svg>"},84:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>FOOTER</text></svg>"},163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},206:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>PRE</text></svg>"},228:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>DIV</text></svg>"},237:e=>{"use strict";e.exports=CKEditor5.dll},252:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},256:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>H5</text></svg>"},282:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>NAV</text></svg>"},291:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>P</text></svg>"},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",i=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),i&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),i&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,i,n,a){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(r[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);i&&r[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},309:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>DETAILS</text></svg>"},310:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>H3</text></svg>"},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},355:(e,t,o)=>{e.exports=o(237)("./src/icons.js")},424:e=>{"use strict";var t={};e.exports=function(e,o){var i=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(o)}},436:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>BLOCKQUOTE</text></svg>"},490:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>MAIN</text></svg>"},510:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>UL</text></svg>"},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}},524:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>H1</text></svg>"},599:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>H4</text></svg>"},656:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>SECTION</text></svg>"},693:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>HEADER</text></svg>"},719:e=>{"use strict";var t=[];function o(e){for(var o=-1,i=0;i<t.length;i++)if(t[i].identifier===e){o=i;break}return o}function i(e,i){for(var a={},r=[],s=0;s<e.length;s++){var l=e[s],c=i.base?l[0]+i.base:l[0],d=a[c]||0,k="".concat(c," ").concat(d);a[c]=d+1;var p=o(k),g={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(g);else{var w=n(g,i);i.byIndex=s,t.splice(s,0,{identifier:k,updater:w,references:1})}r.push(k)}return r}function n(e,t){var o=t.domAPI(t);o.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,n){var a=i(e=e||[],n=n||{});return function(e){e=e||[];for(var r=0;r<a.length;r++){var s=o(a[r]);t[s].references--}for(var l=i(e,n),c=0;c<a.length;c++){var d=o(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},757:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>H2</text></svg>"},767:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>FIGCAPTION</text></svg>"},772:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>OL</text></svg>"},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},863:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function i(e,t,i,n){var a;if(i)a="";else{a="",n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,a);else{var s=document.createTextNode(a),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(s,l[t]):e.appendChild(s)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,o=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){i(o,t,!1,e)},remove:function(e){i(o,t,!0,e)}}}},921:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>H6</text></svg>"},923:e=>{"use strict";e.exports="data:image/svg+xml;utf8,<svg width=%27120%27 height=%2712%27 xmlns=%27http://www.w3.org/2000/svg%27 ><text style=%27paint-order:stroke fill; clip-path: inset%28-3px%29%27 stroke=%27%23EAEAEA%27 stroke-width=%2713%27 dominant-baseline=%27middle%27 fill=%27black%27 x=%273%27 y=%277%27 font-size=%279px%27 font-family=%27Consolas, %22Lucida Console%22, %22Lucida Sans Typewriter%22, %22DejaVu Sans Mono%22, %22Bitstream Vera Sans Mono%22, %22Liberation Mono%22, Monaco, %22Courier New%22, Courier, monospace%27>ASIDE</text></svg>"}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var a=t[i]={id:i,exports:{}};return e[i](a,a.exports,o),a.exports}o.m=e,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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})},o.b="undefined"!=typeof document&&document.baseURI||self.location.href;var i={};(()=>{"use strict";o.r(i),o.d(i,{ShowBlocks:()=>_,ShowBlocksCommand:()=>t,ShowBlocksEditing:()=>n,ShowBlocksUI:()=>m});var e=o(782);class t extends e.Command{constructor(e){super(e),this.affectsData=!1,this.value=!1}execute(){const e="ck-show-blocks",t=this.editor.editing.view;t.change(o=>{for(const i of t.document.roots)i.hasClass(e)?(o.removeClass(e,i),this.value=!1):(o.addClass(e,i),this.value=!0)})}}class n extends e.Plugin{static get pluginName(){return"ShowBlocksEditing"}static get isOfficialPlugin(){return!0}init(){const{editor:e}=this;e.commands.add("showBlocks",new t(e))}}var a=o(355),r=o(311),s=o(719),l=o.n(s),c=o(863),d=o.n(c),k=o(424),p=o.n(k),g=o(517),w=o.n(g),u=o(163),b=o.n(u),h=o(74),x={attributes:{"data-cke":!0}};x.setAttributes=w(),x.insert=p().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=b();l()(h.A,x);h.A&&h.A.locals&&h.A.locals;class m extends e.Plugin{static get pluginName(){return"ShowBlocksUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("showBlocks",()=>{const e=this._createButton(r.ButtonView);return e.set({tooltip:!0,icon:a.IconShowBlocks}),e}),e.ui.componentFactory.add("menuBar:showBlocks",()=>this._createButton(r.MenuBarMenuListItemButtonView))}_createButton(e){const t=this.editor,o=t.locale,i=t.commands.get("showBlocks"),n=new e(o),a=o.t;return n.set({label:a("Show blocks"),isToggleable:!0,role:"menuitemcheckbox"}),n.bind("isEnabled").to(i),n.bind("isOn").to(i,"value",i,"isEnabled",(e,t)=>e&&t),this.listenTo(n,"execute",()=>{t.execute("showBlocks"),t.editing.view.focus()}),n}}class _ extends e.Plugin{static get pluginName(){return"ShowBlocks"}static get isOfficialPlugin(){return!0}static get requires(){return[n,m]}}})(),(window.CKEditor5=window.CKEditor5||{}).showBlocks=i})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Show source":"Show source"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var d=0;d<e.length;d++){var u=[].concat(e[d]);o&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},355:(e,t,i)=>{e.exports=i(237)("./src/icons.js")},370:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var o=i(792),n=i.n(o),r=i(305),s=i.n(r)()(n());s.push([e.id,'.ck-source-editing-area{overflow:hidden;position:relative}.ck-source-editing-area textarea,.ck-source-editing-area:after{border:1px solid transparent;font-family:monospace;font-size:var(--ck-font-size-normal);line-height:var(--ck-line-height-base);margin:0;padding:var(--ck-spacing-large);white-space:pre-wrap}.ck-source-editing-area:after{content:attr(data-value) " ";display:block;visibility:hidden}.ck-source-editing-area textarea{border-color:var(--ck-color-base-border);border-radius:0;box-sizing:border-box;height:100%;outline:none;overflow:hidden;position:absolute;resize:none;width:100%}.ck-rounded-corners .ck-source-editing-area textarea,.ck-source-editing-area textarea.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck-source-editing-area textarea:not([readonly]):focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}',""]);const a=s},424:e=>{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(i){e.setAttribute(i,t[i])})}},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},719:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var r={},s=[],a=0;a<e.length;a++){var c=e[a],d=o.base?c[0]+o.base:c[0],u=r[d]||0,l="".concat(d," ").concat(u);r[d]=u+1;var h=i(l),g={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(g);else{var p=n(g,o);o.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}s.push(l)}return s}function n(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var r=o(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var a=i(r[s]);t[a].references--}for(var c=o(e,n),d=0;d<r.length;d++){var u=i(r[d]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}r=c}}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},863:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,r);else{var a=document.createTextNode(r),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o={};(()=>{"use strict";i.r(o),i.d(o,{SourceEditing:()=>y});var e=i(782),t=i(355),n=i(311),r=i(584),s=i(719),a=i.n(s),c=i(863),d=i.n(c),u=i(424),l=i.n(u),h=i(517),g=i.n(h),p=i(163),m=i.n(p),f=i(370),b={attributes:{"data-cke":!0}};b.setAttributes=g(),b.insert=l().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m();a()(f.A,b);f.A&&f.A.locals&&f.A.locals;const v="SourceEditingMode";class y extends e.Plugin{static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[e.PendingActions]}_elementReplacer;_replacedRoots;_dataFromRoots;constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new r.ElementReplacer,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}init(){this._checkCompatibility();const e=this.editor,i=e.locale.t;e.ui.componentFactory.add("sourceEditing",()=>{const e=this._createButton(n.ButtonView);return e.set({label:i("Source"),icon:t.IconSource,tooltip:!0,class:"ck-source-editing-button"}),e}),e.ui.componentFactory.add("menuBar:sourceEditing",()=>{const e=this._createButton(n.MenuBarMenuListItemButtonView);return e.set({label:i("Show source"),role:"menuitemcheckbox"}),e}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(e,t,i)=>{i?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(e,t,i)=>this._handleReadOnlyMode(!i)),this.listenTo(e,"change:isReadOnly",(e,t,i)=>this._handleReadOnlyMode(i))),e.data.on("get",()=>{this.isSourceEditingMode&&this.updateEditorData()},{priority:"high"})}updateEditorData(){const e=this.editor,t={};for(const[e,i]of this._replacedRoots){const o=this._dataFromRoots.get(e),n=i.dataset.value;o!==n&&(t[e]=n,this._dataFromRoots.set(e,n))}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,t=e.config.get("sourceEditing.allowCollaborationFeatures");if(!t&&e.plugins.has("RealTimeCollaborativeEditing"))throw new r.CKEditorError("source-editing-incompatible-with-real-time-collaboration",null);!t&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some(t=>e.plugins.has(t))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,i=e.model;i.change(e=>{e.setSelection(null),e.removeSelectionAttribute(i.document.selection.getAttributeKeys())});for(const[i,o]of t.domRoots){const n=w(e.data.get({rootName:i})),s=(0,r.createElement)(o.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),a=(0,r.createElement)(o.ownerDocument,"div",{class:"ck-source-editing-area","data-value":n},[s]);s.value=n,s.setSelectionRange(0,0),s.addEventListener("input",()=>{a.dataset.value=s.value,e.ui.update()}),t.change(e=>{const o=t.document.getRoot(i);e.addClass("ck-hidden",o)}),e.ui.setEditableElement("sourceEditing:"+i,s),this._replacedRoots.set(i,a),this._elementReplacer.replace(o,a),this._dataFromRoots.set(i,n)}this._hideDocumentOutline(),this._refreshAnnotationsVisibility(),this._focusSourceEditing()}_hideSourceEditing(){const e=this.editor.editing.view;this.updateEditorData(),e.change(t=>{for(const[i]of this._replacedRoots)t.removeClass("ck-hidden",e.document.getRoot(i))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),this._showDocumentOutline(),this._refreshAnnotationsVisibility(),e.focus()}_hideDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="none")}_showDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="")}_refreshAnnotationsVisibility(){this.editor.plugins.has("Annotations")&&this.editor.plugins.get("Annotations").refreshVisibility()}_focusSourceEditing(){const e=this.editor,[t]=this._replacedRoots.values(),i=t.querySelector("textarea");e.editing.view.document.isFocused=!1,i.focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled(v);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(v)}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled(v);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(v)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const e=this.editor.ui.view.editable;return e&&!e.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(t){const i=this.editor,o=new t(i.locale);return o.set({withText:!0,isToggleable:!0}),o.bind("isOn").to(this,"isSourceEditingMode"),o.bind("isEnabled").to(this,"isEnabled",i,"isReadOnly",i.plugins.get(e.PendingActions),"hasAny",(e,t,i)=>!!e&&(!t&&!i)),this.listenTo(o,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),o}}function w(e){return function(e){return e.startsWith("<")}(e)?(0,r.formatHtml)(e):e}})(),(window.CKEditor5=window.CKEditor5||{}).sourceEditing=o})();;
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{All:"All","Almost equal to":"Almost equal to",Angle:"Angle","Approximately equal to":"Approximately equal to",Arrows:"Arrows","Asterisk operator":"Asterisk operator","Austral sign":"Austral sign","back with leftwards arrow above":"back with leftwards arrow above","Bitcoin sign":"Bitcoin sign",Category:"Category","Cedi sign":"Cedi sign","Cent sign":"Cent sign","Colon sign":"Colon sign","Contains as member":"Contains as member","Copyright sign":"Copyright sign","Cruzeiro sign":"Cruzeiro sign",Currency:"Currency","Currency sign":"Currency sign","Degree sign":"Degree sign","Division sign":"Division sign","Dollar sign":"Dollar sign","Dong sign":"Dong sign","Double dagger":"Double dagger","Double exclamation mark":"Double exclamation mark","Double low-9 quotation mark":"Double low-9 quotation mark","Double question mark":"Double question mark","downwards arrow to bar":"downwards arrow to bar","downwards dashed arrow":"downwards dashed arrow","downwards double arrow":"downwards double arrow","downwards simple arrow":"downwards simple arrow","Drachma sign":"Drachma sign","Element of":"Element of","Em dash":"Em dash","Empty set":"Empty set","En dash":"En dash","end with leftwards arrow above":"end with leftwards arrow above","Euro sign":"Euro sign","Euro-currency sign":"Euro-currency sign","Exclamation question mark":"Exclamation question mark","For all":"For all","Fraction slash":"Fraction slash","French franc sign":"French franc sign","German penny sign":"German penny sign","Greater-than or equal to":"Greater-than or equal to","Greater-than sign":"Greater-than sign","Guarani sign":"Guarani sign","Horizontal ellipsis":"Horizontal ellipsis","Hryvnia sign":"Hryvnia sign","Identical to":"Identical to","Indian rupee sign":"Indian rupee sign",Infinity:"Infinity",Integral:"Integral",Intersection:"Intersection","Inverted exclamation mark":"Inverted exclamation mark","Inverted question mark":"Inverted question mark","Kip sign":"Kip sign",Latin:"Latin","Latin capital letter a with breve":"Latin capital letter a with breve","Latin capital letter a with macron":"Latin capital letter a with macron","Latin capital letter a with ogonek":"Latin capital letter a with ogonek","Latin capital letter c with acute":"Latin capital letter c with acute","Latin capital letter c with caron":"Latin capital letter c with caron","Latin capital letter c with circumflex":"Latin capital letter c with circumflex","Latin capital letter c with dot above":"Latin capital letter c with dot above","Latin capital letter d with caron":"Latin capital letter d with caron","Latin capital letter d with stroke":"Latin capital letter d with stroke","Latin capital letter e with breve":"Latin capital letter e with breve","Latin capital letter e with caron":"Latin capital letter e with caron","Latin capital letter e with dot above":"Latin capital letter e with dot above","Latin capital letter e with macron":"Latin capital letter e with macron","Latin capital letter e with ogonek":"Latin capital letter e with ogonek","Latin capital letter eng":"Latin capital letter eng","Latin capital letter g with breve":"Latin capital letter g with breve","Latin capital letter g with cedilla":"Latin capital letter g with cedilla","Latin capital letter g with circumflex":"Latin capital letter g with circumflex","Latin capital letter g with dot above":"Latin capital letter g with dot above","Latin capital letter h with circumflex":"Latin capital letter h with circumflex","Latin capital letter h with stroke":"Latin capital letter h with stroke","Latin capital letter i with breve":"Latin capital letter i with breve","Latin capital letter i with dot above":"Latin capital letter i with dot above","Latin capital letter i with macron":"Latin capital letter i with macron","Latin capital letter i with ogonek":"Latin capital letter i with ogonek","Latin capital letter i with tilde":"Latin capital letter i with tilde","Latin capital letter j with circumflex":"Latin capital letter j with circumflex","Latin capital letter k with cedilla":"Latin capital letter k with cedilla","Latin capital letter l with acute":"Latin capital letter l with acute","Latin capital letter l with caron":"Latin capital letter l with caron","Latin capital letter l with cedilla":"Latin capital letter l with cedilla","Latin capital letter l with middle dot":"Latin capital letter l with middle dot","Latin capital letter l with stroke":"Latin capital letter l with stroke","Latin capital letter n with acute":"Latin capital letter n with acute","Latin capital letter n with caron":"Latin capital letter n with caron","Latin capital letter n with cedilla":"Latin capital letter n with cedilla","Latin capital letter o with breve":"Latin capital letter o with breve","Latin capital letter o with double acute":"Latin capital letter o with double acute","Latin capital letter o with macron":"Latin capital letter o with macron","Latin capital letter r with acute":"Latin capital letter r with acute","Latin capital letter r with caron":"Latin capital letter r with caron","Latin capital letter r with cedilla":"Latin capital letter r with cedilla","Latin capital letter s with acute":"Latin capital letter s with acute","Latin capital letter s with caron":"Latin capital letter s with caron","Latin capital letter s with cedilla":"Latin capital letter s with cedilla","Latin capital letter s with circumflex":"Latin capital letter s with circumflex","Latin capital letter t with caron":"Latin capital letter t with caron","Latin capital letter t with cedilla":"Latin capital letter t with cedilla","Latin capital letter t with stroke":"Latin capital letter t with stroke","Latin capital letter u with breve":"Latin capital letter u with breve","Latin capital letter u with double acute":"Latin capital letter u with double acute","Latin capital letter u with macron":"Latin capital letter u with macron","Latin capital letter u with ogonek":"Latin capital letter u with ogonek","Latin capital letter u with ring above":"Latin capital letter u with ring above","Latin capital letter u with tilde":"Latin capital letter u with tilde","Latin capital letter w with circumflex":"Latin capital letter w with circumflex","Latin capital letter y with circumflex":"Latin capital letter y with circumflex","Latin capital letter y with diaeresis":"Latin capital letter y with diaeresis","Latin capital letter z with acute":"Latin capital letter z with acute","Latin capital letter z with caron":"Latin capital letter z with caron","Latin capital letter z with dot above":"Latin capital letter z with dot above","Latin capital ligature ij":"Latin capital ligature ij","Latin capital ligature oe":"Latin capital ligature oe","Latin small letter a with breve":"Latin small letter a with breve","Latin small letter a with macron":"Latin small letter a with macron","Latin small letter a with ogonek":"Latin small letter a with ogonek","Latin small letter c with acute":"Latin small letter c with acute","Latin small letter c with caron":"Latin small letter c with caron","Latin small letter c with circumflex":"Latin small letter c with circumflex","Latin small letter c with dot above":"Latin small letter c with dot above","Latin small letter d with caron":"Latin small letter d with caron","Latin small letter d with stroke":"Latin small letter d with stroke","Latin small letter dotless i":"Latin small letter dotless i","Latin small letter e with breve":"Latin small letter e with breve","Latin small letter e with caron":"Latin small letter e with caron","Latin small letter e with dot above":"Latin small letter e with dot above","Latin small letter e with macron":"Latin small letter e with macron","Latin small letter e with ogonek":"Latin small letter e with ogonek","Latin small letter eng":"Latin small letter eng","Latin small letter f with hook":"Latin small letter f with hook","Latin small letter g with breve":"Latin small letter g with breve","Latin small letter g with cedilla":"Latin small letter g with cedilla","Latin small letter g with circumflex":"Latin small letter g with circumflex","Latin small letter g with dot above":"Latin small letter g with dot above","Latin small letter h with circumflex":"Latin small letter h with circumflex","Latin small letter h with stroke":"Latin small letter h with stroke","Latin small letter i with breve":"Latin small letter i with breve","Latin small letter i with macron":"Latin small letter i with macron","Latin small letter i with ogonek":"Latin small letter i with ogonek","Latin small letter i with tilde":"Latin small letter i with tilde","Latin small letter j with circumflex":"Latin small letter j with circumflex","Latin small letter k with cedilla":"Latin small letter k with cedilla","Latin small letter kra":"Latin small letter kra","Latin small letter l with acute":"Latin small letter l with acute","Latin small letter l with caron":"Latin small letter l with caron","Latin small letter l with cedilla":"Latin small letter l with cedilla","Latin small letter l with middle dot":"Latin small letter l with middle dot","Latin small letter l with stroke":"Latin small letter l with stroke","Latin small letter long s":"Latin small letter long s","Latin small letter n preceded by apostrophe":"Latin small letter n preceded by apostrophe","Latin small letter n with acute":"Latin small letter n with acute","Latin small letter n with caron":"Latin small letter n with caron","Latin small letter n with cedilla":"Latin small letter n with cedilla","Latin small letter o with breve":"Latin small letter o with breve","Latin small letter o with double acute":"Latin small letter o with double acute","Latin small letter o with macron":"Latin small letter o with macron","Latin small letter r with acute":"Latin small letter r with acute","Latin small letter r with caron":"Latin small letter r with caron","Latin small letter r with cedilla":"Latin small letter r with cedilla","Latin small letter s with acute":"Latin small letter s with acute","Latin small letter s with caron":"Latin small letter s with caron","Latin small letter s with cedilla":"Latin small letter s with cedilla","Latin small letter s with circumflex":"Latin small letter s with circumflex","Latin small letter t with caron":"Latin small letter t with caron","Latin small letter t with cedilla":"Latin small letter t with cedilla","Latin small letter t with stroke":"Latin small letter t with stroke","Latin small letter u with breve":"Latin small letter u with breve","Latin small letter u with double acute":"Latin small letter u with double acute","Latin small letter u with macron":"Latin small letter u with macron","Latin small letter u with ogonek":"Latin small letter u with ogonek","Latin small letter u with ring above":"Latin small letter u with ring above","Latin small letter u with tilde":"Latin small letter u with tilde","Latin small letter w with circumflex":"Latin small letter w with circumflex","Latin small letter y with circumflex":"Latin small letter y with circumflex","Latin small letter z with acute":"Latin small letter z with acute","Latin small letter z with caron":"Latin small letter z with caron","Latin small letter z with dot above":"Latin small letter z with dot above","Latin small ligature ij":"Latin small ligature ij","Latin small ligature oe":"Latin small ligature oe","Left double quotation mark":"Left double quotation mark","Left single quotation mark":"Left single quotation mark","Left-pointing double angle quotation mark":"Left-pointing double angle quotation mark","leftwards arrow to bar":"leftwards arrow to bar","leftwards dashed arrow":"leftwards dashed arrow","leftwards double arrow":"leftwards double arrow","leftwards simple arrow":"leftwards simple arrow","Less-than or equal to":"Less-than or equal to","Less-than sign":"Less-than sign","Lira sign":"Lira sign","Livre tournois sign":"Livre tournois sign","Logical and":"Logical and","Logical or":"Logical or",Macron:"Macron","Manat sign":"Manat sign",Mathematical:"Mathematical","Mill sign":"Mill sign","Minus sign":"Minus sign","Multiplication sign":"Multiplication sign","N-ary product":"N-ary product","N-ary summation":"N-ary summation",Nabla:"Nabla","Naira sign":"Naira sign","New sheqel sign":"New sheqel sign","Nordic mark sign":"Nordic mark sign","Not an element of":"Not an element of","Not equal to":"Not equal to","Not sign":"Not sign","on with exclamation mark with left right arrow above":"on with exclamation mark with left right arrow above",Overline:"Overline","Paragraph sign":"Paragraph sign","Partial differential":"Partial differential","Per mille sign":"Per mille sign","Per ten thousand sign":"Per ten thousand sign","Peseta sign":"Peseta sign","Peso sign":"Peso sign","Plus-minus sign":"Plus-minus sign","Pound sign":"Pound sign","Proportional to":"Proportional to","Question exclamation mark":"Question exclamation mark","Registered sign":"Registered sign","Reversed paragraph sign":"Reversed paragraph sign","Right double quotation mark":"Right double quotation mark","Right single quotation mark":"Right single quotation mark","Right-pointing double angle quotation mark":"Right-pointing double angle quotation mark","rightwards arrow to bar":"rightwards arrow to bar","rightwards dashed arrow":"rightwards dashed arrow","rightwards double arrow":"rightwards double arrow","rightwards simple arrow":"rightwards simple arrow","Ruble sign":"Ruble sign","Rupee sign":"Rupee sign","Section sign":"Section sign","Single left-pointing angle quotation mark":"Single left-pointing angle quotation mark","Single low-9 quotation mark":"Single low-9 quotation mark","Single right-pointing angle quotation mark":"Single right-pointing angle quotation mark","soon with rightwards arrow above":"soon with rightwards arrow above","Special characters":"Special characters","Spesmilo sign":"Spesmilo sign","Square root":"Square root","Tenge sign":"Tenge sign",Text:"Text","There exists":"There exists","Tilde operator":"Tilde operator","top with upwards arrow above":"top with upwards arrow above","Trade mark sign":"Trade mark sign","Tugrik sign":"Tugrik sign","Turkish lira sign":"Turkish lira sign","Two dot leader":"Two dot leader",Union:"Union","up down arrow with base":"up down arrow with base","upwards arrow to bar":"upwards arrow to bar","upwards dashed arrow":"upwards dashed arrow","upwards double arrow":"upwards double arrow","upwards simple arrow":"upwards simple arrow","Vulgar fraction one half":"Vulgar fraction one half","Vulgar fraction one quarter":"Vulgar fraction one quarter","Vulgar fraction three quarters":"Vulgar fraction three quarters","Won sign":"Won sign","Yen sign":"Yen sign"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={25:(t,e,a)=>{"use strict";a.d(e,{A:()=>n});var i=a(792),r=a.n(i),l=a(305),c=a.n(l)()(r());c.push([t.id,".ck.ck-special-characters>.ck-dialog__content>div{display:grid;height:100%;max-width:100%;width:350px;grid-column-gap:0;grid-row-gap:0;grid-template-columns:1fr;grid-template-rows:auto 1fr auto}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories{grid-area:1/1/2/2;padding:var(--ck-spacing-medium) var(--ck-spacing-large)}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories>.ck-labeled-field-view{padding-top:var(--ck-spacing-standard);width:100%}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories>.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both;background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories>.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}@media (prefers-reduced-motion:reduce){.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories>.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories>.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories>.ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories .ck-dropdown{display:block;width:100%}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories .ck-dropdown>button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-categories .ck-dropdown>button>span{width:100%}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-grid{grid-area:2/1/3/2;max-height:200px}.ck.ck-special-characters>.ck-dialog__content>div>.ck-character-info{grid-area:3/1/4/2}.ck.ck-special-characters-navigation>.ck-label{max-width:160px;overflow:hidden;text-overflow:ellipsis}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}@media screen and (max-width:600px){.ck.ck-special-characters-navigation{max-width:190px}.ck.ck-special-characters-navigation>.ck-form__header__label{overflow:hidden;text-overflow:ellipsis}}",""]);const n=c},163:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},237:t=>{"use strict";t.exports=CKEditor5.dll},305:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var a="",i=void 0!==e[5];return e[4]&&(a+="@supports (".concat(e[4],") {")),e[2]&&(a+="@media ".concat(e[2]," {")),i&&(a+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),a+=t(e),i&&(a+="}"),e[2]&&(a+="}"),e[4]&&(a+="}"),a}).join("")},e.i=function(t,a,i,r,l){"string"==typeof t&&(t=[[null,t,void 0]]);var c={};if(i)for(var n=0;n<this.length;n++){var s=this[n][0];null!=s&&(c[s]=!0)}for(var o=0;o<t.length;o++){var h=[].concat(t[o]);i&&c[h[0]]||(void 0!==l&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=l),a&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=a):h[2]=a),r&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=r):h[4]="".concat(r)),e.push(h))}},e}},311:(t,e,a)=>{t.exports=a(237)("./src/ui.js")},355:(t,e,a)=>{t.exports=a(237)("./src/icons.js")},406:(t,e,a)=>{"use strict";a.d(e,{A:()=>n});var i=a(792),r=a.n(i),l=a(305),c=a.n(l)()(r());c.push([t.id,".ck.ck-character-info{border-top:1px solid var(--ck-color-base-border);display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-character-info>*{font-size:var(--ck-font-size-small);text-transform:uppercase}.ck.ck-character-info .ck-character-info__name{max-width:280px;overflow:hidden;text-overflow:ellipsis}.ck.ck-character-info .ck-character-info__code{opacity:.6}",""]);const n=c},424:t=>{"use strict";var e={};t.exports=function(t,a){var i=function(t){if(void 0===e[t]){var a=document.querySelector(t);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}e[t]=a}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(a)}},517:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(a){t.setAttribute(a,e[a])})}},584:(t,e,a)=>{t.exports=a(237)("./src/utils.js")},719:t=>{"use strict";var e=[];function a(t){for(var a=-1,i=0;i<e.length;i++)if(e[i].identifier===t){a=i;break}return a}function i(t,i){for(var l={},c=[],n=0;n<t.length;n++){var s=t[n],o=i.base?s[0]+i.base:s[0],h=l[o]||0,d="".concat(o," ").concat(h);l[o]=h+1;var w=a(d),u={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==w)e[w].references++,e[w].updater(u);else{var g=r(u,i);i.byIndex=n,e.splice(n,0,{identifier:d,updater:g,references:1})}c.push(d)}return c}function r(t,e){var a=e.domAPI(e);a.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;a.update(t=e)}else a.remove()}}t.exports=function(t,r){var l=i(t=t||[],r=r||{});return function(t){t=t||[];for(var c=0;c<l.length;c++){var n=a(l[c]);e[n].references--}for(var s=i(t,r),o=0;o<l.length;o++){var h=a(l[o]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}l=s}}},782:(t,e,a)=>{t.exports=a(237)("./src/core.js")},792:t=>{"use strict";t.exports=function(t){return t[1]}},834:(t,e,a)=>{t.exports=a(237)("./src/typing.js")},863:t=>{"use strict";var e,a=(e=[],function(t,a){return e[t]=a,e.filter(Boolean).join("\n")});function i(t,e,i,r){var l;if(i)l="";else{l="",r.supports&&(l+="@supports (".concat(r.supports,") {")),r.media&&(l+="@media ".concat(r.media," {"));var c=void 0!==r.layer;c&&(l+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),l+=r.css,c&&(l+="}"),r.media&&(l+="}"),r.supports&&(l+="}")}if(t.styleSheet)t.styleSheet.cssText=a(e,l);else{var n=document.createTextNode(l),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(n,s[e]):t.appendChild(n)}}var r={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=r.singletonCounter++,a=r.singleton||(r.singleton=t.insertStyleElement(t));return{update:function(t){i(a,e,!1,t)},remove:function(t){i(a,e,!0,t)}}}},998:(t,e,a)=>{"use strict";a.d(e,{A:()=>n});var i=a(792),r=a.n(i),l=a(305),c=a.n(l)()(r());c.push([t.id,".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid .ck-character-grid__tiles{display:grid}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{overflow-x:hidden;overflow-y:auto}.ck.ck-character-grid .ck-character-grid__tiles{grid-template-columns:repeat(auto-fill,minmax(var(--ck-character-grid-tile-size),1fr));margin:var(--ck-spacing-standard) var(--ck-spacing-large);grid-gap:var(--ck-spacing-standard)}.ck.ck-character-grid .ck-character-grid__tile{border:0;font-size:1.5em;height:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-character-grid-tile-size)}@media (prefers-reduced-motion:reduce){.ck.ck-character-grid .ck-character-grid__tile{transition:none}}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);text-align:center;width:100%}",""]);const n=c}},e={};function a(i){var r=e[i];if(void 0!==r)return r.exports;var l=e[i]={id:i,exports:{}};return t[i](l,l.exports,a),l.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";a.r(i),a.d(i,{SpecialCharacters:()=>P,SpecialCharactersArrows:()=>V,SpecialCharactersCurrency:()=>E,SpecialCharactersEssentials:()=>I,SpecialCharactersLatin:()=>D,SpecialCharactersMathematical:()=>N,SpecialCharactersText:()=>A,_SpecialCharactersCategoriesView:()=>S,_SpecialCharactersGridView:()=>f,_SpecialCharactersInfoView:()=>x,_SpecialCharactersView:()=>_});var t=a(782),e=a(834),r=a(355),l=a(311),c=a(584),n=a(719),s=a.n(n),o=a(863),h=a.n(o),d=a(424),w=a.n(d),u=a(517),g=a.n(u),p=a(163),m=a.n(p),L=a(998),k={attributes:{"data-cke":!0}};k.setAttributes=g(),k.insert=w().bind(null,"head"),k.domAPI=h(),k.insertStyleElement=m();s()(L.A,k);L.A&&L.A.locals&&L.A.locals;class f extends l.View{tiles;focusTracker;keystrokes;constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new c.FocusTracker,this.keystrokes=new c.KeystrokeHandler,(0,l.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>c.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}createTile(t,e){const a=new l.ButtonView(this.locale);return a.set({label:t,withText:!0,class:"ck-character-grid__tile"}),a.extendTemplate({attributes:{title:e},on:{mouseover:a.bindTemplate.to("mouseover"),focus:a.bindTemplate.to("focus")}}),a.on("mouseover",()=>{this.fire("tileHover",{name:e,character:t})}),a.on("focus",()=>{this.fire("tileFocus",{name:e,character:t})}),a.on("execute",()=>{this.fire("execute",{name:e,character:t})}),a}render(){super.render();for(const t of this.tiles)this.focusTracker.add(t.element);this.tiles.on("change",(t,{added:e,removed:a})=>{if(e.length>0)for(const t of e)this.focusTracker.add(t.element);if(a.length>0)for(const t of a)this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.first.focus()}}var b=a(406),v={attributes:{"data-cke":!0}};v.setAttributes=g(),v.insert=w().bind(null,"head"),v.domAPI=h(),v.insertStyleElement=m();s()(b.A,v);b.A&&b.A.locals&&b.A.locals;class x extends l.View{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",y),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",t=>t||"​")}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function y(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}class _ extends l.View{items;focusTracker;keystrokes;_focusCycler;categoriesView;gridView;infoView;constructor(t,e,a,i){super(t),this.categoriesView=e,this.gridView=a,this.infoView=i,this.items=this.createCollection(),this.focusTracker=new c.FocusTracker,this.keystrokes=new c.KeystrokeHandler,this._focusCycler=new l.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[this.categoriesView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.categoriesView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}var C=a(25),T={attributes:{"data-cke":!0}};T.setAttributes=g(),T.insert=w().bind(null,"head"),T.domAPI=h(),T.insertStyleElement=m();s()(C.A,T);C.A&&C.A.locals&&C.A.locals;class S extends l.View{_groupNames;_dropdownView;constructor(t,e){super(t),this.set("currentGroupName",Array.from(e.entries())[0][0]),this._groupNames=e,this._dropdownView=new l.LabeledFieldView(t,l.createLabeledDropdown),this.setTemplate({tag:"div",attributes:{class:["ck","ck-character-categories"]},children:[this._dropdownView]})}render(){super.render(),this._setupDropdown()}focus(){this._dropdownView.focus()}_setupDropdown(){const t=new c.Collection;for(const[e,a]of this._groupNames){const i={type:"button",model:new l.UIModel({name:e,label:a,role:"menuitemradio",withText:!0})};i.model.bind("isOn").to(this,"currentGroupName",t=>t===e),t.add(i)}const e=(0,this.locale.t)("Category");this._dropdownView.set({label:e,isEmpty:!1}),this._dropdownView.fieldView.panelPosition="rtl"===this.locale.uiLanguageDirection?"se":"sw",this._dropdownView.fieldView.buttonView.set({withText:!0,tooltip:e,ariaLabel:e,ariaLabelledBy:void 0,isOn:!1}),this._dropdownView.fieldView.buttonView.bind("label").to(this,"currentGroupName",t=>this._groupNames.get(t)),this._dropdownView.fieldView.on("execute",({source:t})=>{this.currentGroupName=t.name}),(0,l.addListToDropdown)(this._dropdownView.fieldView,t,{ariaLabel:e,role:"menu"})}}const q="All";class P extends t.Plugin{_characters;_groups;_allSpecialCharactersGroupLabel;static get requires(){return[e.Typing,l.Dialog]}static get pluginName(){return"SpecialCharacters"}static get licenseFeatureCode(){return"SCH"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(t){super(t);const e=t.t;this._characters=new Map,this._groups=new Map,this._allSpecialCharactersGroupLabel=e("All")}init(){const t=this.editor;t.ui.componentFactory.add("specialCharacters",()=>{const t=this._createDialogButton(l.ButtonView);return t.set({tooltip:!0}),t}),t.ui.componentFactory.add("menuBar:specialCharacters",()=>this._createDialogButton(l.MenuBarMenuListItemButtonView))}addItems(t,e,a={label:t}){if(t===q)throw new c.CKEditorError("special-character-invalid-group-name",null);const i=this._getGroup(t,a.label);for(const t of e)i.items.add(t.title),this._characters.set(t.title,t.character)}getGroups(){const t=Array.from(this._groups.keys()),e=this.editor.config.get("specialCharacters.order")||[],a=e.find(e=>!t.includes(e));if(a)throw new c.CKEditorError("special-character-invalid-order-group-name",null,{invalidGroup:a});return new Set([...e,...t])}getCharactersForGroup(t){if(t===q)return new Set(this._characters.keys());const e=this._groups.get(t);return e?e.items:void 0}getCharacter(t){return this._characters.get(t)}_getGroup(t,e){return this._groups.has(t)||this._groups.set(t,{items:new Set,label:e}),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const a=this.getCharactersForGroup(t);for(const t of a){const a=this.getCharacter(t);e.tiles.add(e.createTile(a,t))}}_createDropdownPanelContent(t){const e=Array.from(this.getGroups()).map(t=>[t,this._groups.get(t).label]),a=new Map([[q,this._allSpecialCharactersGroupLabel],...e]),i=new S(t,a),r=new f(t),l=new x(t);return r.on("tileHover",(t,e)=>{l.set(e)}),r.on("tileFocus",(t,e)=>{l.set(e)}),i.on("change:currentGroupName",(t,e,a)=>{this._updateGrid(a,r)}),this._updateGrid(i.currentGroupName,r),{categoriesView:i,gridView:r,infoView:l}}_createDialogButton(t){const e=this.editor,a=e.locale,i=new t(e.locale),l=e.commands.get("insertText"),c=a.t,n=this.editor.plugins.get("Dialog");return i.set({label:c("Special characters"),icon:r.IconSpecialCharacters,isToggleable:!0}),i.bind("isOn").to(n,"id",t=>"specialCharacters"===t),i.bind("isEnabled").to(l,"isEnabled"),i.on("execute",()=>{"specialCharacters"!==n.id?this._showDialog():n.hide()}),i}_showDialog(){const t=this.editor,e=t.plugins.get("Dialog"),a=t.locale,i=a.t,{categoriesView:r,gridView:c,infoView:n}=this._createDropdownPanelContent(a),s=new _(a,r,c,n);c.on("execute",(e,a)=>{t.execute("insertText",{text:a.character})}),e.show({id:"specialCharacters",title:i("Special characters"),className:"ck-special-characters",content:s,position:l.DialogViewPosition.EDITOR_TOP_SIDE})}}class V extends t.Plugin{static get pluginName(){return"SpecialCharactersArrows"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Arrows",[{title:e("leftwards simple arrow"),character:"←"},{title:e("rightwards simple arrow"),character:"→"},{title:e("upwards simple arrow"),character:"↑"},{title:e("downwards simple arrow"),character:"↓"},{title:e("leftwards double arrow"),character:"⇐"},{title:e("rightwards double arrow"),character:"⇒"},{title:e("upwards double arrow"),character:"⇑"},{title:e("downwards double arrow"),character:"⇓"},{title:e("leftwards dashed arrow"),character:"⇠"},{title:e("rightwards dashed arrow"),character:"⇢"},{title:e("upwards dashed arrow"),character:"⇡"},{title:e("downwards dashed arrow"),character:"⇣"},{title:e("leftwards arrow to bar"),character:"⇤"},{title:e("rightwards arrow to bar"),character:"⇥"},{title:e("upwards arrow to bar"),character:"⤒"},{title:e("downwards arrow to bar"),character:"⤓"},{title:e("up down arrow with base"),character:"↨"},{title:e("back with leftwards arrow above"),character:"🔙"},{title:e("end with leftwards arrow above"),character:"🔚"},{title:e("on with exclamation mark with left right arrow above"),character:"🔛"},{title:e("soon with rightwards arrow above"),character:"🔜"},{title:e("top with upwards arrow above"),character:"🔝"}],{label:e("Arrows")})}}class A extends t.Plugin{static get pluginName(){return"SpecialCharactersText"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:e("Single left-pointing angle quotation mark")},{character:"›",title:e("Single right-pointing angle quotation mark")},{character:"«",title:e("Left-pointing double angle quotation mark")},{character:"»",title:e("Right-pointing double angle quotation mark")},{character:"‘",title:e("Left single quotation mark")},{character:"’",title:e("Right single quotation mark")},{character:"“",title:e("Left double quotation mark")},{character:"”",title:e("Right double quotation mark")},{character:"‚",title:e("Single low-9 quotation mark")},{character:"„",title:e("Double low-9 quotation mark")},{character:"¡",title:e("Inverted exclamation mark")},{character:"¿",title:e("Inverted question mark")},{character:"‥",title:e("Two dot leader")},{character:"…",title:e("Horizontal ellipsis")},{character:"‡",title:e("Double dagger")},{character:"‰",title:e("Per mille sign")},{character:"‱",title:e("Per ten thousand sign")},{character:"‼",title:e("Double exclamation mark")},{character:"⁈",title:e("Question exclamation mark")},{character:"⁉",title:e("Exclamation question mark")},{character:"⁇",title:e("Double question mark")},{character:"©",title:e("Copyright sign")},{character:"®",title:e("Registered sign")},{character:"™",title:e("Trade mark sign")},{character:"§",title:e("Section sign")},{character:"¶",title:e("Paragraph sign")},{character:"⁋",title:e("Reversed paragraph sign")}],{label:e("Text")})}}class N extends t.Plugin{static get pluginName(){return"SpecialCharactersMathematical"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:e("Less-than sign")},{character:">",title:e("Greater-than sign")},{character:"≤",title:e("Less-than or equal to")},{character:"≥",title:e("Greater-than or equal to")},{character:"–",title:e("En dash")},{character:"—",title:e("Em dash")},{character:"¯",title:e("Macron")},{character:"‾",title:e("Overline")},{character:"°",title:e("Degree sign")},{character:"−",title:e("Minus sign")},{character:"±",title:e("Plus-minus sign")},{character:"÷",title:e("Division sign")},{character:"⁄",title:e("Fraction slash")},{character:"×",title:e("Multiplication sign")},{character:"ƒ",title:e("Latin small letter f with hook")},{character:"∫",title:e("Integral")},{character:"∑",title:e("N-ary summation")},{character:"∞",title:e("Infinity")},{character:"√",title:e("Square root")},{character:"∼",title:e("Tilde operator")},{character:"≅",title:e("Approximately equal to")},{character:"≈",title:e("Almost equal to")},{character:"≠",title:e("Not equal to")},{character:"≡",title:e("Identical to")},{character:"∈",title:e("Element of")},{character:"∉",title:e("Not an element of")},{character:"∋",title:e("Contains as member")},{character:"∏",title:e("N-ary product")},{character:"∧",title:e("Logical and")},{character:"∨",title:e("Logical or")},{character:"¬",title:e("Not sign")},{character:"∩",title:e("Intersection")},{character:"∪",title:e("Union")},{character:"∂",title:e("Partial differential")},{character:"∀",title:e("For all")},{character:"∃",title:e("There exists")},{character:"∅",title:e("Empty set")},{character:"∇",title:e("Nabla")},{character:"∗",title:e("Asterisk operator")},{character:"∝",title:e("Proportional to")},{character:"∠",title:e("Angle")},{character:"¼",title:e("Vulgar fraction one quarter")},{character:"½",title:e("Vulgar fraction one half")},{character:"¾",title:e("Vulgar fraction three quarters")}],{label:e("Mathematical")})}}class D extends t.Plugin{static get pluginName(){return"SpecialCharactersLatin"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:e("Latin capital letter a with macron")},{character:"ā",title:e("Latin small letter a with macron")},{character:"Ă",title:e("Latin capital letter a with breve")},{character:"ă",title:e("Latin small letter a with breve")},{character:"Ą",title:e("Latin capital letter a with ogonek")},{character:"ą",title:e("Latin small letter a with ogonek")},{character:"Ć",title:e("Latin capital letter c with acute")},{character:"ć",title:e("Latin small letter c with acute")},{character:"Ĉ",title:e("Latin capital letter c with circumflex")},{character:"ĉ",title:e("Latin small letter c with circumflex")},{character:"Ċ",title:e("Latin capital letter c with dot above")},{character:"ċ",title:e("Latin small letter c with dot above")},{character:"Č",title:e("Latin capital letter c with caron")},{character:"č",title:e("Latin small letter c with caron")},{character:"Ď",title:e("Latin capital letter d with caron")},{character:"ď",title:e("Latin small letter d with caron")},{character:"Đ",title:e("Latin capital letter d with stroke")},{character:"đ",title:e("Latin small letter d with stroke")},{character:"Ē",title:e("Latin capital letter e with macron")},{character:"ē",title:e("Latin small letter e with macron")},{character:"Ĕ",title:e("Latin capital letter e with breve")},{character:"ĕ",title:e("Latin small letter e with breve")},{character:"Ė",title:e("Latin capital letter e with dot above")},{character:"ė",title:e("Latin small letter e with dot above")},{character:"Ę",title:e("Latin capital letter e with ogonek")},{character:"ę",title:e("Latin small letter e with ogonek")},{character:"Ě",title:e("Latin capital letter e with caron")},{character:"ě",title:e("Latin small letter e with caron")},{character:"Ĝ",title:e("Latin capital letter g with circumflex")},{character:"ĝ",title:e("Latin small letter g with circumflex")},{character:"Ğ",title:e("Latin capital letter g with breve")},{character:"ğ",title:e("Latin small letter g with breve")},{character:"Ġ",title:e("Latin capital letter g with dot above")},{character:"ġ",title:e("Latin small letter g with dot above")},{character:"Ģ",title:e("Latin capital letter g with cedilla")},{character:"ģ",title:e("Latin small letter g with cedilla")},{character:"Ĥ",title:e("Latin capital letter h with circumflex")},{character:"ĥ",title:e("Latin small letter h with circumflex")},{character:"Ħ",title:e("Latin capital letter h with stroke")},{character:"ħ",title:e("Latin small letter h with stroke")},{character:"Ĩ",title:e("Latin capital letter i with tilde")},{character:"ĩ",title:e("Latin small letter i with tilde")},{character:"Ī",title:e("Latin capital letter i with macron")},{character:"ī",title:e("Latin small letter i with macron")},{character:"Ĭ",title:e("Latin capital letter i with breve")},{character:"ĭ",title:e("Latin small letter i with breve")},{character:"Į",title:e("Latin capital letter i with ogonek")},{character:"į",title:e("Latin small letter i with ogonek")},{character:"İ",title:e("Latin capital letter i with dot above")},{character:"ı",title:e("Latin small letter dotless i")},{character:"IJ",title:e("Latin capital ligature ij")},{character:"ij",title:e("Latin small ligature ij")},{character:"Ĵ",title:e("Latin capital letter j with circumflex")},{character:"ĵ",title:e("Latin small letter j with circumflex")},{character:"Ķ",title:e("Latin capital letter k with cedilla")},{character:"ķ",title:e("Latin small letter k with cedilla")},{character:"ĸ",title:e("Latin small letter kra")},{character:"Ĺ",title:e("Latin capital letter l with acute")},{character:"ĺ",title:e("Latin small letter l with acute")},{character:"Ļ",title:e("Latin capital letter l with cedilla")},{character:"ļ",title:e("Latin small letter l with cedilla")},{character:"Ľ",title:e("Latin capital letter l with caron")},{character:"ľ",title:e("Latin small letter l with caron")},{character:"Ŀ",title:e("Latin capital letter l with middle dot")},{character:"ŀ",title:e("Latin small letter l with middle dot")},{character:"Ł",title:e("Latin capital letter l with stroke")},{character:"ł",title:e("Latin small letter l with stroke")},{character:"Ń",title:e("Latin capital letter n with acute")},{character:"ń",title:e("Latin small letter n with acute")},{character:"Ņ",title:e("Latin capital letter n with cedilla")},{character:"ņ",title:e("Latin small letter n with cedilla")},{character:"Ň",title:e("Latin capital letter n with caron")},{character:"ň",title:e("Latin small letter n with caron")},{character:"ʼn",title:e("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:e("Latin capital letter eng")},{character:"ŋ",title:e("Latin small letter eng")},{character:"Ō",title:e("Latin capital letter o with macron")},{character:"ō",title:e("Latin small letter o with macron")},{character:"Ŏ",title:e("Latin capital letter o with breve")},{character:"ŏ",title:e("Latin small letter o with breve")},{character:"Ő",title:e("Latin capital letter o with double acute")},{character:"ő",title:e("Latin small letter o with double acute")},{character:"Œ",title:e("Latin capital ligature oe")},{character:"œ",title:e("Latin small ligature oe")},{character:"Ŕ",title:e("Latin capital letter r with acute")},{character:"ŕ",title:e("Latin small letter r with acute")},{character:"Ŗ",title:e("Latin capital letter r with cedilla")},{character:"ŗ",title:e("Latin small letter r with cedilla")},{character:"Ř",title:e("Latin capital letter r with caron")},{character:"ř",title:e("Latin small letter r with caron")},{character:"Ś",title:e("Latin capital letter s with acute")},{character:"ś",title:e("Latin small letter s with acute")},{character:"Ŝ",title:e("Latin capital letter s with circumflex")},{character:"ŝ",title:e("Latin small letter s with circumflex")},{character:"Ş",title:e("Latin capital letter s with cedilla")},{character:"ş",title:e("Latin small letter s with cedilla")},{character:"Š",title:e("Latin capital letter s with caron")},{character:"š",title:e("Latin small letter s with caron")},{character:"Ţ",title:e("Latin capital letter t with cedilla")},{character:"ţ",title:e("Latin small letter t with cedilla")},{character:"Ť",title:e("Latin capital letter t with caron")},{character:"ť",title:e("Latin small letter t with caron")},{character:"Ŧ",title:e("Latin capital letter t with stroke")},{character:"ŧ",title:e("Latin small letter t with stroke")},{character:"Ũ",title:e("Latin capital letter u with tilde")},{character:"ũ",title:e("Latin small letter u with tilde")},{character:"Ū",title:e("Latin capital letter u with macron")},{character:"ū",title:e("Latin small letter u with macron")},{character:"Ŭ",title:e("Latin capital letter u with breve")},{character:"ŭ",title:e("Latin small letter u with breve")},{character:"Ů",title:e("Latin capital letter u with ring above")},{character:"ů",title:e("Latin small letter u with ring above")},{character:"Ű",title:e("Latin capital letter u with double acute")},{character:"ű",title:e("Latin small letter u with double acute")},{character:"Ų",title:e("Latin capital letter u with ogonek")},{character:"ų",title:e("Latin small letter u with ogonek")},{character:"Ŵ",title:e("Latin capital letter w with circumflex")},{character:"ŵ",title:e("Latin small letter w with circumflex")},{character:"Ŷ",title:e("Latin capital letter y with circumflex")},{character:"ŷ",title:e("Latin small letter y with circumflex")},{character:"Ÿ",title:e("Latin capital letter y with diaeresis")},{character:"Ź",title:e("Latin capital letter z with acute")},{character:"ź",title:e("Latin small letter z with acute")},{character:"Ż",title:e("Latin capital letter z with dot above")},{character:"ż",title:e("Latin small letter z with dot above")},{character:"Ž",title:e("Latin capital letter z with caron")},{character:"ž",title:e("Latin small letter z with caron")},{character:"ſ",title:e("Latin small letter long s")}],{label:e("Latin")})}}class E extends t.Plugin{static get pluginName(){return"SpecialCharactersCurrency"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:e("Dollar sign")},{character:"€",title:e("Euro sign")},{character:"¥",title:e("Yen sign")},{character:"£",title:e("Pound sign")},{character:"¢",title:e("Cent sign")},{character:"₠",title:e("Euro-currency sign")},{character:"₡",title:e("Colon sign")},{character:"₢",title:e("Cruzeiro sign")},{character:"₣",title:e("French franc sign")},{character:"₤",title:e("Lira sign")},{character:"¤",title:e("Currency sign")},{character:"₿",title:e("Bitcoin sign")},{character:"₥",title:e("Mill sign")},{character:"₦",title:e("Naira sign")},{character:"₧",title:e("Peseta sign")},{character:"₨",title:e("Rupee sign")},{character:"₩",title:e("Won sign")},{character:"₪",title:e("New sheqel sign")},{character:"₫",title:e("Dong sign")},{character:"₭",title:e("Kip sign")},{character:"₮",title:e("Tugrik sign")},{character:"₯",title:e("Drachma sign")},{character:"₰",title:e("German penny sign")},{character:"₱",title:e("Peso sign")},{character:"₲",title:e("Guarani sign")},{character:"₳",title:e("Austral sign")},{character:"₴",title:e("Hryvnia sign")},{character:"₵",title:e("Cedi sign")},{character:"₶",title:e("Livre tournois sign")},{character:"₷",title:e("Spesmilo sign")},{character:"₸",title:e("Tenge sign")},{character:"₹",title:e("Indian rupee sign")},{character:"₺",title:e("Turkish lira sign")},{character:"₻",title:e("Nordic mark sign")},{character:"₼",title:e("Manat sign")},{character:"₽",title:e("Ruble sign")}],{label:e("Currency")})}}class I extends t.Plugin{static get pluginName(){return"SpecialCharactersEssentials"}static get isOfficialPlugin(){return!0}static get requires(){return[E,A,N,V,D]}}})(),(window.CKEditor5=window.CKEditor5||{}).specialCharacters=i})();;
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the left with no text wrapping":"Align table to the left with no text wrapping","Align table to the left with text wrapping":"Align table to the left with text wrapping","Align table to the right":"Align table to the right","Align table to the right with no text wrapping":"Align table to the right with no text wrapping","Align table to the right with text wrapping":"Align table to the right with text wrapping",Alignment:"Alignment",Background:"Background",Border:"Border","Cell properties":"Cell properties","Cell type":"Cell type","Center table":"Center table","Center table with no text wrapping":"Center table with no text wrapping","Choose table type":"Choose table type",Color:"Color",Column:"Column","Content table":"Content table",Dashed:"Dashed","Data cell":"Data cell","Delete column":"Delete column","Delete row":"Delete row",Dimensions:"Dimensions",Dotted:"Dotted",Double:"Double","Enter table caption":"Enter table caption",Groove:"Groove","Header cell":"Header cell","Header column":"Header column","Header row":"Header row",Height:"Height","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Insert table layout":"Insert table layout",Inset:"Inset","Justify cell text":"Justify cell text","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Layout table":"Layout table","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table",None:"None",Outset:"Outset",Padding:"Padding",Ridge:"Ridge",Row:"Row","Select column":"Select column","Select row":"Select row",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Style:"Style",Table:"Table","Table Alignment":"Table Alignment","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table layout":"Table layout","Table properties":"Table properties","Table toolbar":"Table toolbar","Table type":"Table type","Table type options":"Table type options",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"Vertical text alignment toolbar":"Vertical text alignment toolbar",Width:"Width"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var e={29:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,":root{--ck-form-default-width:340px}.ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form.ck-form_default-width{width:var(--ck-form-default-width)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-number,.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}@media screen and (max-width:600px){.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit{align-items:stretch;flex-direction:column;padding:0}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit>.ck{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_with-submit .ck-button_with-text{justify-content:center}.ck.ck-form.ck-responsive-form .ck.ck-form__row.ck-form__row_large-bottom-padding{padding-bottom:var(--ck-spacing-large)}}[dir=ltr] .ck.ck-form.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-form.ck-responsive-form>:not(:last-child){margin-left:0}",""]);const a=n},49:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,'.ck-editor__editable.ck-editor__editable_inline>.ck-widget.ck-widget_with-selection-handle.layout-table:first-child{margin-top:var(--ck-spacing-large)}.ck-editor__editable.ck-editor__editable_inline>.ck-widget.ck-widget_with-selection-handle.layout-table:last-child,.ck-editor__editable.ck-editor__editable_inline>.ck-widget.ck-widget_with-selection-handle.layout-table:nth-last-child(2):has(+.ck-fake-selection-container){margin-bottom:var(--ck-spacing-large)}.ck-editor__editable .table.layout-table{display:table;margin:0}.ck-editor__editable .table.layout-table.ck-widget:hover{z-index:var(--ck-z-default)}.ck-editor__editable .table.layout-table.ck-widget:hover>.ck-widget__selection-handle{opacity:.75;visibility:visible}.ck-editor__editable .table.layout-table.ck-widget:hover>.ck-widget__selection-handle:hover{opacity:1}.ck-editor__editable .table.layout-table.ck-widget:has(.ck-widget.table:hover)>.ck-widget__selection-handle{opacity:0;visibility:hidden}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_selected{z-index:var(--ck-z-default)}.ck-content figure.table.layout-table,.ck-content table.table.layout-table{margin-bottom:0;margin-top:0}.ck-content figure.table.layout-table>table,.ck-content table.table.layout-table{border-spacing:0}:root{--ck-table-layout-widget-type-around-button-size:16px;--ck-table-layout-widget-type-around-icon-width:10px;--ck-table-layout-widget-type-around-icon-height:8px;--ck-table-layout-widget-handler-icon-size:10px;--ck-table-layout-default-border-color:#d4d4d4}.ck-editor__editable .table.layout-table>table{border-collapse:revert;height:100%;width:100%}.ck-editor__editable .table.layout-table>table:not([style*="border:"],[style*=border-top],[style*=border-bottom],[style*=border-left],[style*=border-right],[style*=border-width],[style*=border-style],[style*=border-color]){border-color:transparent;border-width:0;outline:none}.ck-editor__editable .table.layout-table>table>tbody>tr>td{box-shadow:revert;min-width:2em;padding:revert;text-indent:1px}.ck-editor__editable .table.layout-table>table>tbody>tr>td[style*=" width:"],.ck-editor__editable .table.layout-table>table>tbody>tr>td[style*="\'width:"],.ck-editor__editable .table.layout-table>table>tbody>tr>td[style*=";width:"],.ck-editor__editable .table.layout-table>table>tbody>tr>td[style^="width:"]{min-width:auto}.ck-editor__editable .table.layout-table>table>tbody>tr>td:focus{background-color:transparent}.ck-editor__editable .table.layout-table>table>tbody>tr>td:not([style*="border:"],[style*=border-top],[style*=border-bottom],[style*=border-left],[style*=border-right],[style*=border-width],[style*=border-style],[style*=border-color]){border-color:transparent;border-width:0;outline:var(--ck-table-layout-default-border-color) 1px dashed;outline-offset:-1px}.ck-editor__editable .table.layout-table>table>tbody>tr>td:not([style*="border:"],[style*=border-top],[style*=border-bottom],[style*=border-left],[style*=border-right],[style*=border-width],[style*=border-style],[style*=border-color]):focus{outline:var(--ck-color-focus-border) 1px solid}.ck-editor__editable .table.layout-table>table>tbody>tr>td>.ck-table-bogus-paragraph{text-indent:0;width:calc(100% - 1px)}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around{--ck-widget-type-around-button-size:var(--ck-table-layout-widget-type-around-button-size)}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_after,.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_before{transform:translateY(0);z-index:2}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_before{border-radius:0 0 100px 100px;left:min(10%,30px);margin-left:var(--ck-table-layout-widget-type-around-button-size)}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_before:after{border-radius:0 0 100px 100px}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_after,.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button.ck-widget__type-around__button_after:after{border-radius:100px 100px 0 0}.ck-editor__editable .table.layout-table.ck-widget>.ck-widget__type-around>.ck-widget__type-around__button svg{height:var(--ck-table-layout-widget-type-around-icon-height);width:var(--ck-table-layout-widget-type-around-icon-width)}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_with-selection-handle>.ck-widget__selection-handle{--ck-widget-handler-icon-size:var(--ck-table-layout-widget-handler-icon-size);transform:translateY(calc(0px - var(--ck-widget-outline-thickness)));z-index:3}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:0}.ck-editor__editable .table.layout-table.ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:0}',""]);const a=n},85:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental{--ck-table-form-default-input-width:80px}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-form__row.ck-table-form__action-row>.ck.ck-button{flex-grow:0}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental .ck-form__row.ck-form__row.ck-table-form__action-row>.ck.ck-button .ck-button__label{color:currentColor}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-form__dimensions-row{--ck-table-form-dimensions-input-width:calc(var(--ck-table-form-default-input-width)*2 + var(--ck-spacing-large));max-width:var(--ck-table-form-dimensions-input-width);min-width:var(--ck-table-form-dimensions-input-width);padding:0;width:var(--ck-table-form-dimensions-input-width)}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0;max-width:var(--ck-table-form-default-input-width);min-width:var(--ck-table-form-default-input-width);width:var(--ck-table-form-default-input-width)}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);left:-.5ch;line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small);overflow:visible;position:relative;width:0}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar.ck-table-cell-properties-form__horizontal-alignment-toolbar,.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-form__cell-type-row{--ck-table-form-dimensions-input-width:calc(var(--ck-table-form-default-input-width)*2 + var(--ck-spacing-large));max-width:var(--ck-table-form-dimensions-input-width);min-width:var(--ck-table-form-dimensions-input-width);padding:0;width:var(--ck-table-form-dimensions-input-width)}.ck.ck-table-cell-properties-form.ck-table-cell-properties-form_experimental.ck-table-cell-properties-form_experimental-no-cell-type .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar.ck-table-cell-properties-form__vertical-alignment-toolbar{flex-grow:1}",""]);const a=n},151:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck-content .table th{text-align:start}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-content figure.table:not(.layout-table){display:table}.ck-content figure.table:not(.layout-table)>table{height:100%;width:100%}.ck-content .table:not(.layout-table){margin:.9em auto}.ck-content figure.table:not(.layout-table)>table,.ck-content table.table:not(.layout-table){border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0}.ck-content figure.table:not(.layout-table)>table>tbody>tr>th,.ck-content figure.table:not(.layout-table)>table>thead>tr>th,.ck-content table.table:not(.layout-table)>tbody>tr>th,.ck-content table.table:not(.layout-table)>thead>tr>th{background:rgba(0,0,0,.05);font-weight:700}.ck-content figure.table:not(.layout-table)>table>tbody>tr>td,.ck-content figure.table:not(.layout-table)>table>tbody>tr>th,.ck-content figure.table:not(.layout-table)>table>thead>tr>td,.ck-content figure.table:not(.layout-table)>table>thead>tr>th,.ck-content table.table:not(.layout-table)>tbody>tr>td,.ck-content table.table:not(.layout-table)>tbody>tr>th,.ck-content table.table:not(.layout-table)>thead>tr>td,.ck-content table.table:not(.layout-table)>thead>tr>th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content figure.table:not(.layout-table)>table>tbody>tr>td>p:first-of-type,.ck-content figure.table:not(.layout-table)>table>tbody>tr>th>p:first-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>td>p:first-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>th>p:first-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>td>p:first-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>th>p:first-of-type,.ck-content table.table:not(.layout-table)>thead>tr>td>p:first-of-type,.ck-content table.table:not(.layout-table)>thead>tr>th>p:first-of-type{margin-top:0}.ck-content figure.table:not(.layout-table)>table>tbody>tr>td>p:last-of-type,.ck-content figure.table:not(.layout-table)>table>tbody>tr>th>p:last-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>td>p:last-of-type,.ck-content figure.table:not(.layout-table)>table>thead>tr>th>p:last-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>td>p:last-of-type,.ck-content table.table:not(.layout-table)>tbody>tr>th>p:last-of-type,.ck-content table.table:not(.layout-table)>thead>tr>td>p:last-of-type,.ck-content table.table:not(.layout-table)>thead>tr>th>p:last-of-type{margin-bottom:0}@media print{.ck-content figure.table:not(.layout-table){height:fit-content;width:fit-content}.ck-content figure.table:not(.layout-table)>table{height:auto}}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const a=n},163:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},188:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);border-radius:0;height:20px;width:20px}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const a=n},237:e=>{"use strict";e.exports=CKEditor5.dll},305:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",l=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),l&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),l&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,l,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(l)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(n[s]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);l&&n[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},331:(e,t,o)=>{e.exports=o(237)("./src/clipboard.js")},337:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row,.ck.ck-table-form .ck-form__row.ck-table-form__cell-type-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__cell-type-row,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__cell-type-row .ck-labeled-field-view,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__cell-type-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__cell-type-row .ck-table-form__dimension-operator,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck-form__row>:not(.ck-label,.ck-table-form__dimension-operator){flex-grow:1}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both;background:var(--ck-color-base-error);border-radius:0;color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}@media (prefers-reduced-motion:reduce){.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const a=n},355:(e,t,o)=>{e.exports=o(237)("./src/icons.js")},380:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const a=n},419:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,':root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3);--ck-table-content-default-border-color:#d4d4d4;--ck-table-border-none-helper-line-color:#d4d4d4;--ck-table-border-none-helper-line-style:dashed;--ck-table-border-none-helper-line-width:1px}.ck-widget.table table[style*="border-style:none"],.ck-widget.table table[style*="border:none"]{outline:var(--ck-table-content-default-border-color) 1px dashed}.ck-widget.table td.ck-editor__nested-editable,.ck-widget.table th.ck-editor__nested-editable{outline:unset}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused:not(.ck-editor__editable_selected),.ck-widget.table td.ck-editor__nested-editable:not(.ck-editor__editable_selected):focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused:not(.ck-editor__editable_selected),.ck-widget.table th.ck-editor__nested-editable:not(.ck-editor__editable_selected):focus{background:var(--ck-color-table-focused-cell-background);outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table) :where(td[style*="border:none"],td[style*="border-style:none"],th[style*="border:none"],th[style*="border-style:none"]){border:var(--ck-table-border-none-helper-line-style) var(--ck-table-border-none-helper-line-width) var(--ck-table-border-none-helper-line-color)!important}:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table) :where(td[style*="border-top-style:none"],th[style*="border-top-style:none"]),:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table)>:where(table[style*="border-top-style:none"]){border-top:var(--ck-table-border-none-helper-line-style) var(--ck-table-border-none-helper-line-width) var(--ck-table-border-none-helper-line-color)!important}:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table) :where(td[style*="border-right-style:none"],th[style*="border-right-style:none"]),:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table)>:where(table[style*="border-right-style:none"]){border-right:var(--ck-table-border-none-helper-line-style) var(--ck-table-border-none-helper-line-width) var(--ck-table-border-none-helper-line-color)!important}:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table) :where(td[style*="border-bottom-style:none"],th[style*="border-bottom-style:none"]),:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table)>:where(table[style*="border-bottom-style:none"]){border-bottom:var(--ck-table-border-none-helper-line-style) var(--ck-table-border-none-helper-line-width) var(--ck-table-border-none-helper-line-color)!important}:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table) :where(td[style*="border-left-style:none"],th[style*="border-left-style:none"]),:where(.ck.ck-editor__editable.ck-table-show-hidden-borders .ck-widget.table)>:where(table[style*="border-left-style:none"]){border-left:var(--ck-table-border-none-helper-line-style) var(--ck-table-border-none-helper-line-width) var(--ck-table-border-none-helper-line-color)!important}',""]);const a=n},424:e=>{"use strict";var t={};e.exports=function(e,o){var l=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(o)}},433:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word}.ck.ck-editor__editable .table td,.ck.ck-editor__editable .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:0;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:0;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const a=n},489:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const a=n},517:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}},538:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}@media (prefers-reduced-motion:reduce){.ck .ck-insert-table-dropdown-grid-box{transition:none}}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const a=n},562:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck.ck-form__row.ck-table-form__action-row{justify-content:flex-end}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row>:not(.ck-label)+*{margin-inline-start:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}",""]);const a=n},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},664:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const a=n},719:e=>{"use strict";var t=[];function o(e){for(var o=-1,l=0;l<t.length;l++)if(t[l].identifier===e){o=l;break}return o}function l(e,l){for(var r={},n=[],a=0;a<e.length;a++){var s=e[a],c=l.base?s[0]+l.base:s[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var b=o(u),h={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==b)t[b].references++,t[b].updater(h);else{var m=i(h,l);l.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}n.push(u)}return n}function i(e,t){var o=t.domAPI(t);o.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,i){var r=l(e=e||[],i=i||{});return function(e){e=e||[];for(var n=0;n<r.length;n++){var a=o(r[n]);t[a].references--}for(var s=l(e,i),c=0;c<r.length;c++){var d=o(r[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=s}}},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},792:e=>{"use strict";e.exports=function(e){return e[1]}},794:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown{flex-grow:0}.ck.ck-table-form .ck-form__row:not(.ck-table-form__action-row)>:not(.ck-label,.ck-table-form__dimension-operator){flex-grow:1}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form.ck-table-properties-form_experimental{--ck-table-form-default-input-width:80px}.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:var(--ck-table-form-default-input-width);min-width:var(--ck-table-form-default-input-width);width:var(--ck-table-form-default-input-width)}.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row{--ck-table-form-dimensions-input-width:calc(var(--ck-table-form-default-input-width)*2 + var(--ck-spacing-large));max-width:var(--ck-table-form-dimensions-input-width);min-width:var(--ck-table-form-dimensions-input-width);padding:0;width:var(--ck-table-form-dimensions-input-width)}.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0;max-width:var(--ck-table-form-default-input-width);min-width:var(--ck-table-form-default-input-width);width:var(--ck-table-form-default-input-width)}.ck.ck-table-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);left:-.5ch;line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small);overflow:visible;position:relative;width:0}.ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both;background:var(--ck-color-base-error);border-radius:0;color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck-rounded-corners .ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}@media (prefers-reduced-motion:reduce){.ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-table-form.ck-table-properties-form_experimental .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const a=n},863:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function l(e,t,l,i){var r;if(l)r="";else{r="",i.supports&&(r+="@supports (".concat(i.supports,") {")),i.media&&(r+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(r+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),r+=i.css,n&&(r+="}"),i.media&&(r+="}"),i.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,r);else{var a=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(a,s[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,o=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){l(o,t,!1,e)},remove:function(e){l(o,t,!0,e)}}}},865:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,".ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row>:not(.ck-label)+*{margin-inline-start:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=n},901:(e,t,o)=>{e.exports=o(237)("./src/widget.js")},965:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,":root{--ck-content-color-table-caption-background:#f7f7f7;--ck-content-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption,.ck-content figure.table>table>caption{background-color:var(--ck-content-color-table-caption-background);caption-side:top;color:var(--ck-content-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;overflow-wrap:anywhere;padding:.6em;text-align:center;word-break:normal}@media (forced-colors:active){.ck-content .table>figcaption,.ck-content figure.table>table>caption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .table>figcaption.table__caption_highlighted,.ck.ck-editor__editable figure.table>table>caption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before,.ck.ck-editor__editable figure.table>table>caption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-content-color-table-caption-background)}}",""]);const a=n},993:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var l=o(792),i=o.n(l),r=o(305),n=o.n(r)()(i());n.push([e.id,":root{--ck-content-table-style-spacing:1.5em}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck-content .table.table-style-align-left{float:left;margin-right:var(--ck-content-table-style-spacing)}.ck-content .table.table-style-align-right{float:right;margin-left:var(--ck-content-table-style-spacing)}.ck-content .table.table-style-align-center{margin-left:auto;margin-right:auto}.ck-content .table.table-style-block-align-left{margin-left:0;margin-right:auto}.ck-content .table.table-style-block-align-right{margin-left:auto;margin-right:0}.ck-editor__editable .table.layout-table.table-style-align-center{margin-left:auto;margin-right:auto}.ck-editor__editable .table.layout-table.table-style-align-left{margin-right:var(--ck-content-table-style-spacing)}.ck-editor__editable .table.layout-table.table-style-align-right{margin-left:var(--ck-content-table-style-spacing)}.ck-editor__editable .table.layout-table.table-style-block-align-left{margin-left:0;margin-right:auto}.ck-editor__editable .table.layout-table.table-style-block-align-right{margin-left:auto;margin-right:0}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{flex:1}.ck.ck-table-properties-form.ck-table-properties-form_experimental .ck-form__row.ck-table-properties-form__alignment-row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}.ck.ck-table-properties-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__action-row{justify-content:flex-end}.ck.ck-table-properties-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__action-row>.ck.ck-button{flex-grow:0}.ck.ck-table-properties-form.ck-table-properties-form_experimental .ck-form__row.ck-table-form__action-row>.ck.ck-button .ck-button__label{color:currentColor}",""]);const a=n}},t={};function o(l){var i=t[l];if(void 0!==i)return i.exports;var r=t[l]={id:l,exports:{}};return e[l](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var l in t)o.o(t,l)&&!o.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},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 l={};(()=>{"use strict";o.r(l),o.d(l,{InsertColumnCommand:()=>ie,InsertRowCommand:()=>le,InsertTableCommand:()=>oe,InsertTableLayoutCommand:()=>Jo,MergeCellCommand:()=>ne,MergeCellsCommand:()=>ze,PlainTableOutput:()=>Ot,RemoveColumnCommand:()=>ce,RemoveRowCommand:()=>se,SelectColumnCommand:()=>Ue,SelectRowCommand:()=>je,SetHeaderColumnCommand:()=>ue,SetHeaderRowCommand:()=>de,SplitCellCommand:()=>re,Table:()=>zt,TableAlignmentCommand:()=>Sl,TableBackgroundColorCommand:()=>Cl,TableBorderColorCommand:()=>vl,TableBorderStyleCommand:()=>Tl,TableBorderWidthCommand:()=>Al,TableCaption:()=>Xl,TableCaptionEditing:()=>Kl,TableCaptionUI:()=>Gl,TableCellBackgroundColorCommand:()=>Lo,TableCellBorderColorCommand:()=>Do,TableCellBorderStyleCommand:()=>Wo,TableCellBorderWidthCommand:()=>No,TableCellHeightCommand:()=>Eo,TableCellHorizontalAlignmentCommand:()=>Fo,TableCellPaddingCommand:()=>Ro,TableCellProperties:()=>$o,TableCellPropertiesEditing:()=>Uo,TableCellPropertiesUI:()=>Vo,TableCellPropertiesUIExperimental:()=>pi,TableCellPropertiesView:()=>fo,TableCellPropertiesViewExperimental:()=>hi,TableCellPropertyCommand:()=>So,TableCellTypeCommand:()=>zo,TableCellVerticalAlignmentCommand:()=>Bo,TableCellWidthCommand:()=>Po,TableCellWidthEditing:()=>Io,TableClipboard:()=>St,TableColumnResize:()=>bl,TableColumnResizeEditing:()=>cl,TableEditing:()=>gt,TableHeightCommand:()=>Vl,TableKeyboard:()=>Et,TableLayout:()=>_l,TableLayoutEditing:()=>fl,TableLayoutUI:()=>Ko,TableMouse:()=>Ft,TableProperties:()=>zl,TablePropertiesEditing:()=>Pl,TablePropertiesUI:()=>Nl,TablePropertiesUIExperimental:()=>di,TablePropertiesView:()=>Fl,TablePropertiesViewExperimental:()=>ai,TablePropertyCommand:()=>yl,TableSelection:()=>xt,TableToolbar:()=>$t,TableTypeCommand:()=>hl,TableUI:()=>Ct,TableUtils:()=>Le,TableWalker:()=>w,TableWidthCommand:()=>xl,TableWidthsCommand:()=>rl,ToggleTableCaptionCommand:()=>$l,_InsertTableView:()=>yt,_TABLE_COLUMN_MIN_WIDTH_AS_PERCENTAGE:()=>be,_TABLE_COLUMN_MIN_WIDTH_IN_PIXELS:()=>he,_TABLE_COLUMN_RESIZE_DISTANCE_THRESHOLD:()=>ge,_TABLE_COLUMN_WIDTH_PRECISION:()=>me,_TABLE_DEFAULT_COLORS:()=>ro,_TableColorInputView:()=>qt,_TableMouseEventsObserver:()=>Bt,_addDefaultUnitToNumericValue:()=>U,_adjustLastTableColumnIndex:()=>D,_adjustLastTableRowIndex:()=>W,_clamp:()=>ve,_colorTableFieldValidator:()=>eo,_convertParagraphInTableCell:()=>Y,_createEmptyTableCell:()=>y,_createFilledArray:()=>Te,_cropTableToDimensions:()=>V,_downcastTable:()=>q,_downcastTableAttribute:()=>s,_downcastTableAttributeToStyle:()=>a,_downcastTableCell:()=>X,_downcastTableResizedClass:()=>al,_downcastTableRow:()=>J,_enableTableCellProperty:()=>v,_ensureParagraphInTableCell:()=>H,_fillTableOrCellToolbar:()=>io,_getBalloonTableCellPositionData:()=>To,_getBalloonTablePositionData:()=>vo,_getBorderTableStyleLabels:()=>Yt,_getChangedResizedTables:()=>pe,_getDefaultTableValueAdjusted:()=>c,_getDomTableCellOuterWidth:()=>Ve,_getElementWidthInPixels:()=>_e,_getHorizontallyOverlappingTableCells:()=>I,_getLabeledTableColorInputCreator:()=>no,_getLocalizedTableColorErrorText:()=>Zt,_getLocalizedTableLengthErrorText:()=>Qt,_getNormalizedDefaultTableBaseProperties:()=>$,_getNormalizedDefaultTableCellProperties:()=>G,_getNormalizedDefaultTableProperties:()=>K,_getSelectedTableWidget:()=>Ht,_getSelectionAffectedTable:()=>T,_getSelectionAffectedTableWidget:()=>Mt,_getTableBorderBoxSingleValue:()=>j,_getTableCaptionFromModelElement:()=>Hl,_getTableCaptionFromModelSelection:()=>jl,_getTableColumnEdgesIndexes:()=>ye,_getTableColumnElements:()=>Ie,_getTableColumnGroupElement:()=>Pe,_getTableColumnMinWidthAsPercentage:()=>fe,_getTableColumnsWidths:()=>Re,_getTableOrCellBorderStyleDefinitions:()=>lo,_getTableWidgetAncestor:()=>jt,_getTableWidthInPixels:()=>we,_getVerticallyOverlappingTableCells:()=>S,_injectTableCaptionPostFixer:()=>Ol,_injectTableCellParagraphPostFixer:()=>Je,_injectTableLayoutPostFixer:()=>$e,_isSingleTableParagraphWithoutAttributes:()=>Z,_isTableHeadingColumnCell:()=>C,_isTableModelElement:()=>Ml,_lengthTableFieldValidator:()=>to,_lineWidthTableFieldValidator:()=>oo,_matchTableCaptionViewElement:()=>Ul,_normalizeTableColumnWidths:()=>xe,_removeEmptyTableColumns:()=>L,_removeEmptyTableRows:()=>B,_removeEmptyTableRowsColumns:()=>F,_repositionTableContextualBalloon:()=>Co,_skipEmptyTableRow:()=>M,_splitTableCellHorizontally:()=>P,_splitTableCellVertically:()=>R,_sumArray:()=>Ae,_tableCellRefreshHandler:()=>tt,_tableHeadingsRefreshHandler:()=>et,_toPrecision:()=>Ce,_translateTableColspanAttribute:()=>Ee,_trimTableCellIfNeeded:()=>E,_upcastNormalizedTableStyleToAttribute:()=>r,_upcastTable:()=>O,_upcastTableBorderStyles:()=>n,_upcastTableColgroupElement:()=>nl,_upcastTableFigure:()=>z,_updateTableColumnElements:()=>Se,_updateTableNumericAttribute:()=>_});var e=o(782),t=o(901),i=o(584);function r(e,t){const{modelAttribute:o,styleName:l,attributeName:i,attributeType:r,viewElement:n,defaultValue:a,shouldUpcast:s=()=>!0,reduceBoxSides:u=!1}=t;e.for("upcast").attributeToAttribute({view:{name:n,styles:{[l]:/[\s\S]+/}},model:{key:o,value:(e,t,o)=>{if(!s(e))return;const i=c(a,"",o),r=e.getNormalizedStyle(l),n=u?d(r):r;if(i!==n)return n;t.consumable.consume(e,{styles:l})}}}),i&&e.for("upcast").attributeToAttribute({view:{name:n,attributes:{[i]:/.+/}},model:{key:o,value:(e,t,o)=>{if("figure"==e.name||e.hasStyle(l)||"table"==e.name&&"figure"==e.parent.name&&e.parent.hasStyle(l))return;const n=c(a,"",o);let s=e.getAttribute(i);if(s&&"length"==r){const e=parseFloat(s);s=isNaN(e)?n:e+(s.includes("%")?"%":"px")}if(n!==s)return s;t.consumable.consume(e,{attributes:i})}}})}function n(e,t,o,l){const{conversion:i}=e;i.for("upcast").add(e=>e.on("element:"+t,(e,t,i)=>{if(!t.modelRange)return;const r=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(e=>t.viewItem.hasStyle(e));if(!r.length)return;const n={styles:r};if(!i.consumable.test(t.viewItem,n))return;const a=[...t.modelRange.getItems({shallow:!0})].pop(),s=a.findAncestor("table",{includeSelf:!0});let c=l;s&&"layout"==s.getAttribute("tableType")&&(c={style:"none",color:"",width:""}),i.consumable.consume(t.viewItem,n);const u={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},b={style:d(u.style),color:d(u.color),width:d(u.width)};b.style!==c.style&&i.writer.setAttribute(o.style,b.style,a),b.color!==c.color&&i.writer.setAttribute(o.color,b.color,a),b.width!==c.width&&i.writer.setAttribute(o.width,b.width,a)})),e.config.get("experimentalFlags.upcastTableBorderZeroAttributes")&&i.for("upcast").add(e=>{e.on(`element:${t}`,(e,t,l)=>{const{modelRange:i,viewItem:r}=t,n=r.is("element","table")?r:r.findAncestor("table");if(!l.consumable.test(n,{attributes:"border"}))return;if("0"!==n.getAttribute("border"))return;const a=i?.start?.nodeAfter;a&&!Object.values(o).some(e=>a.hasAttribute(e))&&(l.writer.setAttribute(o.style,"none",a),r.is("element","table")&&l.consumable.consume(r,{attributes:"border"}))})})}function a(e,t){const{modelElement:o,modelAttribute:l,styleName:i}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:l},view:e=>({key:"style",value:{[i]:e}})})}function s(e,t){const{modelAttribute:o,styleName:l}=t;e.for("downcast").add(e=>e.on(`attribute:${o}:table`,(e,t,o)=>{const{item:i,attributeNewValue:r}=t,{mapper:n,writer:a}=o;if(!o.consumable.consume(t.item,e.name))return;const s=[...n.toViewElement(i).getChildren()].find(e=>e.is("element","table"));r?a.setStyle(l,r,s):a.removeStyle(l,s)}))}function c(e,t,o){const l=o.modelRange&&(0,i.first)(o.modelRange.getItems({shallow:!0})),r=l&&l.is("element")&&l.findAncestor("table",{includeSelf:!0});return r&&"layout"===r.getAttribute("tableType")?t:e}function d(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every(t=>e[t]))return e;const o=e.top;return t.every(t=>e[t]===o)?o:e}const u={className:"table-style-align-left"},b={className:"table-style-align-center"},h={className:"table-style-align-right"},m={className:"table-style-block-align-left"},g={className:"table-style-block-align-right"},p=[{view:{name:/^(table|figure)$/,styles:{float:/^(left|none|right)$/}},getAlign:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t},getConsumables(e){const t=e.getStyle("float"),o=["float"];return"left"===t&&e.hasStyle("margin-right")?o.push("margin-right"):"right"===t&&e.hasStyle("margin-left")&&o.push("margin-left"),{styles:o}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"auto"}},getAlign:()=>"center",getConsumables:()=>({styles:["margin-left","margin-right"]})},{view:{name:/^(table|figure)$/,key:"class",value:"table-style-align-left"},getAlign:()=>"left",getConsumables:()=>({classes:u.className})},{view:{name:/^(table|figure)$/,key:"class",value:h.className},getAlign:()=>"right",getConsumables:()=>({classes:h.className})},{view:{name:/^(table|figure)$/,key:"class",value:b.className},getAlign:()=>"center",getConsumables:()=>({classes:b.className})},{view:{name:/^(table|figure)$/,key:"class",value:m.className},getAlign:()=>"blockLeft",getConsumables:()=>({classes:m.className})},{view:{name:/^(table|figure)$/,key:"class",value:g.className},getAlign:()=>"blockRight",getConsumables:()=>({classes:g.className})},{view:{name:/^(table|figure)$/,styles:{"margin-left":"0","margin-right":"auto"}},getAlign:()=>"blockLeft",getConsumables:()=>({styles:["margin-left","margin-right"]})},{view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"0"}},getAlign:()=>"blockRight",getConsumables:()=>({styles:["margin-left","margin-right"]})},{view:{name:"table",attributes:{align:/^(left|center|right)$/}},getAlign:e=>e.getAttribute("align"),getConsumables:()=>({attributes:"align"})}],f={center:{align:"center",style:"margin-left: auto; margin-right: auto;",className:"table-style-align-center"},left:{align:"left",style:"float: left;",className:"table-style-align-left"},right:{align:"right",style:"float: right;",className:"table-style-align-right"},blockLeft:{align:void 0,style:"margin-left: 0; margin-right: auto;",className:m.className},blockRight:{align:void 0,style:"margin-left: auto; margin-right: 0;",className:g.className}};class w{_table;_startRow;_endRow;_startColumn;_endColumn;_includeAllSlots;_skipRows;_row;_rowIndex;_column;_cellIndex;_spannedCells;_nextCellAtColumn;_jumpedToStartRow=!1;constructor(e,t={}){this._table=e,this._startRow=void 0!==t.row?t.row:t.startRow||0,this._endRow=void 0!==t.row?t.row:t.endRow,this._startColumn=void 0!==t.column?t.column:t.startColumn||0,this._endColumn=void 0!==t.column?t.column:t.endColumn,this._includeAllSlots=!!t.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0,value:void 0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null;const o=this._getSpanned();if(o)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(o.cell,o.row,o.column));else{const o=e.getChild(this._cellIndex);if(!o)return this._advanceToNextRow();const l=parseInt(o.getAttribute("colspan")||"1"),i=parseInt(o.getAttribute("rowspan")||"1");(l>1||i>1)&&this._recordSpans(o,i,l),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+l}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new k(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,o=this._column<this._startColumn,l=void 0!==this._endColumn&&this._column>this._endColumn;return e||t||o||l}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const l={cell:e,row:this._row,column:this._column};for(let e=this._row;e<this._row+t;e++)for(let t=this._column;t<this._column+o;t++)e==this._row&&t==this._column||this._markSpannedCell(e,t,l)}_markSpannedCell(e,t,o){this._spannedCells.has(e)||this._spannedCells.set(e,new Map);this._spannedCells.get(e).set(t,o)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||"1"),0)}}class k{cell;row;column;cellAnchorRow;cellAnchorColumn;_cellIndex;_rowIndex;_table;constructor(e,t,o,l){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=o,this.cellAnchorColumn=l,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function _(e,t,o,l,i=1){null!=t&&null!=i&&t>i?l.setAttribute(e,t,o):l.removeAttribute(e,o)}function y(e,t,o={}){const l=e.createElement("tableCell",o);return e.insertElement("paragraph",l),e.insert(l,t),l}function C(e,t){const o=t.parent.parent,l=parseInt(o.getAttribute("headingColumns")||"0"),{column:i}=e.getCellLocation(t);return!!l&&i<l}function v(e,t,o){const{modelAttribute:l}=o;e.extend("tableCell",{allowAttributes:[l]}),e.setAttributeProperties(l,{isFormatting:!0}),r(t,{viewElement:/^(td|th)$/,...o}),a(t,{modelElement:"tableCell",...o})}function T(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}function A({table:e,row:t,column:o}){const l=new w(e,{row:t,column:o});for(const{cell:e}of l){if("header"!==e.getAttribute("tableCellType"))return!1}return!0}function x(e){const{model:t,config:o}=e;return t.schema.checkAttribute("tableCell","tableCellType")&&!0===o.get("experimentalFlags.tableCellTypeSupport")}function V(e,t,o){const{startRow:l,startColumn:i,endRow:r,endColumn:n}=t,a=o.createElement("table"),s=e.getAttribute("tableType");s&&o.setAttribute("tableType",s,a);const c=r-l+1;for(let e=0;e<c;e++)o.insertElement("tableRow",a,"end");const d=[...new w(e,{startRow:l,endRow:r,startColumn:i,endColumn:n,includeAllSlots:!0})];for(const{row:e,column:t,cell:s,isAnchor:c,cellAnchorRow:u,cellAnchorColumn:b}of d){const d=e-l,h=a.getChild(d);if(c){const l=o.cloneElement(s);o.append(l,h),E(l,e,t,r,n,o)}else(u<l||b<i)&&y(o,o.createPositionAt(h,"end"))}return function(e,t,o,l,i){const r=parseInt(t.getAttribute("headingRows")||"0");if(r>0){_("headingRows",r-o,e,i,0)}const n=parseInt(t.getAttribute("headingColumns")||"0");if(n>0){_("headingColumns",n-l,e,i,0)}}(a,e,l,i,o),a}function S(e,t,o=0){const l=[],i=new w(e,{startRow:o,endRow:t-1});for(const e of i){const{row:o,cellHeight:i}=e;o<t&&t<=o+i-1&&l.push(e)}return l}function P(e,t,o){const l=e.parent,i=l.parent,r=l.index,n=t-r,a={},s=parseInt(e.getAttribute("rowspan"))-n;s>1&&(a.rowspan=s);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const d=r+n,u=[...new w(i,{startRow:r,endRow:d,includeAllSlots:!0})];let b,h=null;for(const t of u){const{row:l,column:i,cell:r}=t;r===e&&void 0===b&&(b=i),void 0!==b&&b===i&&l===d&&(h=y(o,t.getPositionBefore(),a))}return _("rowspan",n,e,o),h}function I(e,t){const o=[],l=new w(e);for(const e of l){const{column:l,cellWidth:i}=e;l<t&&t<=l+i-1&&o.push(e)}return o}function R(e,t,o,l){const i=o-t,r={},n=parseInt(e.getAttribute("colspan"))-i;n>1&&(r.colspan=n);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(r.rowspan=a);const s=y(l,l.createPositionAfter(e),r);return _("colspan",i,e,l),s}function E(e,t,o,l,i,r){const n=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");if(o+n-1>i){_("colspan",i-o+1,e,r,1)}if(t+a-1>l){_("rowspan",l-t+1,e,r,1)}}function L(e,t){const o=t.getColumns(e),l=new Array(o).fill(0);for(const{column:t}of new w(e))l[t]++;const i=l.reduce((e,t,o)=>t?e:[...e,o],[]);if(i.length>0){const o=i[i.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function B(e,t){const o=[],l=t.getRows(e);for(let t=0;t<l;t++){e.getChild(t).isEmpty&&o.push(t)}if(o.length>0){const l=o[o.length-1];return t.removeRows(e,{at:l}),!0}return!1}function F(e,t){L(e,t)||B(e,t)}function W(e,t){const o=Array.from(new w(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every(({cellHeight:e})=>1===e))return t.lastRow;const l=o[0].cellHeight-1;return t.lastRow+l}function D(e,t){const o=Array.from(new w(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every(({cellWidth:e})=>1===e))return t.lastColumn;const l=o[0].cellWidth-1;return t.lastColumn+l}function N(e){for(const t of e.getChildren())if(t.is("element","table"))return t}function z(){return e=>{e.on("element:figure",(e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const l=N(t.viewItem);if(!l||!o.consumable.test(l,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const r=o.convertItem(l,t.modelCursor),n=(0,i.first)(r.modelRange.getItems());if(!n||!n.is("element","table"))return o.consumable.revert(t.viewItem,{name:!0,classes:"table"}),void(r.modelRange&&!r.modelRange.isCollapsed&&(t.modelRange=r.modelRange,t.modelCursor=r.modelCursor));o.convertChildren(t.viewItem,o.writer.createPositionAt(n,"end")),o.updateConversionResult(n,t)})}}function O(){return e=>{e.on("element:table",(e,t,o)=>{const l=t.viewItem;if(!o.consumable.test(l,{name:!0}))return;const{rows:i,headingRows:r,headingColumns:n}=function(e){let t,o=!0;const l=[],i=[];let r;for(const t of Array.from(e.getChildren())){if("tbody"!==t.name&&"thead"!==t.name&&"tfoot"!==t.name)continue;"thead"!==t.name||r||(o=!0,r=t);const e=Array.from(t.getChildren()).filter(e=>e.is("element","tr"));let n=null;for(const a of e){const e=Array.from(a.getChildren()).filter(e=>e.is("element","td")||e.is("element","th"));r&&t===r||"tbody"===t.name&&e.length>0&&(null===n||e.length===n)&&e.every(e=>e.is("element","th"))&&o?(l.push(a),o=!0):(i.push(a),o=!1),n=Math.max(n||0,e.length)}}const n=function(e){let t=new Map,o=0;const l=e.map(e=>{const l=[],i=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name),r=new Map;for(;i.length||l.length<o;){const e=t.get(l.length);if(e&&e.remaining>0)l.push(e.cell);else{const e=i.shift();if(!e){l.push(null);continue}{const t=parseInt(e.getAttribute("colspan")||"1"),o=parseInt(e.getAttribute("rowspan")||"1");for(let i=0;i<t;i++)o>1&&r.set(l.length,{cell:e,remaining:o-1}),l.push(e)}}}for(const[e,o]of t.entries())o.remaining-=1,o.remaining>0&&!r.has(e)&&r.set(e,o);return t=r,o=Math.max(o,l.length),l});for(const e of l)for(;e.length<o;)e.push(null);return l}(i);for(const e of n){let o=0;for(;o<e.length&&"th"===e[o]?.name;)o+=1;(void 0===t||o<t)&&(t=o)}return{headingRows:l.length,headingColumns:t||0,rows:[...l,...i]}}(l),a={};n&&(a.headingColumns=n),r&&(a.headingRows=r);const s=o.writer.createElement("table",a);if(o.safeInsert(s,t.modelCursor)){if(o.consumable.consume(l,{name:!0}),i.forEach(e=>o.convertItem(e,o.writer.createPositionAt(s,"end"))),o.convertChildren(l,o.writer.createPositionAt(s,"end")),s.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(s,"end")),y(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(s,t)}})}}function M(){return e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}}function H(e){return t=>{t.on(`element:${e}`,(e,t,{writer:o})=>{if(!t.modelRange)return;const l=t.modelRange.start.nodeAfter,i=o.createPositionAt(l,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",i);const r=Array.from(l.getChildren());if(r.every(e=>e.is("element","$marker"))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(l,0));for(const t of r)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}},{priority:"low"})}}function j(e){if(!e||(null===(t=e)||"object"!=typeof t&&"function"!=typeof t))return e;var t;const{top:o,right:l,bottom:i,left:r}=e;return o==l&&l==i&&i==r?o:void 0}function U(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function $(e,t={}){const o={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}function K(e,t){return $({borderStyle:"double",borderColor:"hsl(0, 0%, 70%)",borderWidth:"1px",...e},t)}function G(e,t){return $({borderStyle:"solid",borderColor:"hsl(0, 0%, 75%)",borderWidth:"1px",...e},t)}function q(e,o){return(l,{writer:i})=>{const r=l.getAttribute("headingRows")||0,n=i.createContainerElement("table",null,[]),a=i.createContainerElement("figure",{class:"table"},n);r>0&&i.insert(i.createPositionAt(n,"end"),i.createContainerElement("thead",null,i.createSlot(e=>e.is("element","tableRow")&&e.index<r))),r<e.getRows(l)&&i.insert(i.createPositionAt(n,"end"),i.createContainerElement("tbody",null,i.createSlot(e=>e.is("element","tableRow")&&e.index>=r)));for(const{positionOffset:e,filter:t}of o.additionalSlots)i.insert(i.createPositionAt(n,e),i.createSlot(t));return i.insert(i.createPositionAt(n,"after"),i.createSlot(e=>!e.is("element","tableRow")&&!o.additionalSlots.some(({filter:t})=>t(e)))),o.asWidget?function(e,o){return o.setCustomProperty("table",!0,e),(0,t.toWidget)(e,o,{hasSelectionHandle:!0})}(a,i):a}}function J(){return(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}function X(e){return(t,{writer:l})=>{if(e.cellTypeEnabled?.()){return o(l,"header"===t.getAttribute("tableCellType")?"th":"td")}const i=t.parent,r=i.parent,n=r.getChildIndex(i),a=new w(r,{row:n}),s=r.getAttribute("headingRows")||0,c=r.getAttribute("headingColumns")||0;let d=null;for(const e of a)if(e.cell==t){d=o(l,e.row<s||e.column<c?"th":"td");break}return d};function o(o,l){return e.asWidget?(0,t.toWidgetEditable)(o.createEditableElement(l),o,{withAriaRole:!1}):o.createContainerElement(l)}}function Y(e={}){return(t,{writer:o})=>{if(!t.parent.is("element","tableCell"))return null;if(!Z(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function Z(e){return 1==e.parent.childCount&&!function(e){for(const t of e.getAttributeKeys())if(!t.startsWith("selection:")&&"htmlEmptyBlock"!=t)return!0;return!1}(e)}function Q(e){return(t,o)=>{const l=e.plugins.has("PlainTableOutput"),i=o.options.isClipboardPipeline,r=e.config.get("experimentalFlags.useExtendedTableBlockAlignment"),n=te(e,t);return l||n||r&&i?function(e,t,o){const l=t.writer,i=e.getAttribute("headingRows")||0,r=l.createSlot(e=>e.is("element","tableRow")&&e.index<i),n=l.createSlot(e=>e.is("element","tableRow")&&e.index>=i),a=l.createSlot(e=>!e.is("element","tableRow")),s=l.createContainerElement("thead",null,r),c=l.createContainerElement("tbody",null,n),d=[];i&&d.push(s);i<e.childCount&&d.push(c);const u={class:"table"};if(o.plugins.has("TablePropertiesEditing")&&t.options.isClipboardPipeline){const t=K(o.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),l=e.getAttribute("tableAlignment");let i=t.alignment;"layout"===e.getAttribute("tableType")&&(i="");const r=l||i;r&&(u.class+=" "+f[r].className,u.style=f[r].style,void 0!==f[r].align&&(u.align=f[r].align))}return l.createContainerElement("table",u,[a,...d])}(t,o,e):null}}function ee(e){return(t,{writer:o,options:l})=>{const i=e.plugins.has("PlainTableOutput"),r=l.isClipboardPipeline,n=e.config.get("experimentalFlags.useExtendedTableBlockAlignment"),a=te(e,t);return(i||a||n&&r)&&"table"===t.parent.name?o.createContainerElement("caption"):null}}function te(e,t){const o=e.plugins.has("TableLayoutEditing"),l=e.config.get("table.tableLayout.stripFigureFromContentTable")??!0,i=t.findAncestor("table",{includeSelf:!0}),r=i?.getAttribute("tableType");return o&&(l||"layout"===r)}class oe extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,l=o===o.root?o:o.parent;return t.checkChild(l,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,l=t.plugins.get("TableUtils"),i=t.config.get("table.defaultHeadings.rows"),r=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&r&&(e.headingColumns=r),o.change(t=>{const i=l.createTable(t,e);o.insertObject(i,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))})}}class le extends e.Command{order;constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),l="above"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getRowIndexes(i),n=l?r.first:r.last,a=i[0].findAncestor("table");o.insertRows(a,{at:l?n:n+1,copyStructureFromAbove:!l})}}class ie extends e.Command{order;constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),l="left"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getColumnIndexes(i),n=l?r.first:r.last,a=i[0].findAncestor("table");o.insertColumns(a,{columns:1,at:l?n:n+1})}}class re extends e.Command{direction;constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}class ne extends e.Command{direction;isHorizontal;constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],l=this.value,i=this.direction;e.change(e=>{const t="right"==i||"down"==i,r=t?o:l,n=t?l:o,a=n.parent;!function(e,t,o){ae(e)||(ae(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(n,r,e);const s=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(s)||"1"),d=parseInt(l.getAttribute(s)||"1");e.setAttribute(s,c+d,r),e.setSelection(e.createRangeIn(r));const u=this.editor.plugins.get("TableUtils");F(a.findAncestor("table"),u)})}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const l=this.isHorizontal?function(e,t,o){const l=e.parent,i=l.parent,r="right"==t?e.nextSibling:e.previousSibling,n=(i.getAttribute("headingColumns")||0)>0;if(!r)return;const a="right"==t?e:r,s="right"==t?r:e,{column:c}=o.getCellLocation(a),{column:d}=o.getCellLocation(s),u=parseInt(a.getAttribute("colspan")||"1"),b=C(o,a),h=C(o,s);if(n&&b!=h)return;return c+u===d?r:void 0}(o,this.direction,t):function(e,t,o){const l=e.parent,i=l.parent,r=i.getChildIndex(l);if("down"==t&&r===o.getRows(i)-1||"up"==t&&0===r)return null;const n=parseInt(e.getAttribute("rowspan")||"1"),a=i.getAttribute("headingRows")||0,s="down"==t&&r+n===a,c="up"==t&&r===a;if(a&&(s||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),u="down"==t?r+d:r,b=[...new w(i,{endRow:u})],h=b.find(t=>t.cell===e),m=h.column,g=b.find(({row:e,cellHeight:o,column:l})=>l===m&&("down"==t?e===u:u===e+o));return g&&g.cell?g.cell:null}(o,this.direction,t);if(!l)return;const i=this.isHorizontal?"rowspan":"colspan",r=parseInt(o.getAttribute(i)||"1");return parseInt(l.getAttribute(i)||"1")===r?l:void 0}}function ae(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class se extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const l=o.findAncestor("table"),i=e.getRows(l)-1,r=e.getRowIndexes(t),n=0===r.first&&r.last===i;this.isEnabled=!n}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),l=t.getRowIndexes(o),i=o[0],r=i.findAncestor("table"),n=t.getCellLocation(i).column;e.change(e=>{const o=l.last-l.first+1;t.removeRows(r,{at:l.first,rows:o});const i=function(e,t,o,l){const i=e.getChild(Math.min(t,l-1));let r=i.getChild(0),n=0;for(const e of i.getChildren()){if(n>o)return r;r=e,n+=parseInt(e.getAttribute("colspan")||"1")}return r}(r,l.first,n,t.getRows(r));e.setSelection(e.createPositionAt(i,0))})}}class ce extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const l=o.findAncestor("table"),i=e.getColumns(l),{first:r,last:n}=e.getColumnIndexes(t);this.isEnabled=n-r<i-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,o]=function(e,t){const o=t.getSelectionAffectedTableCells(e),l=o[0],i=o.pop(),r=[l,i];return l.isBefore(i)?r:r.reverse()}(this.editor.model.document.selection,e),l=t.parent.parent,i=[...new w(l)],r={first:i.find(e=>e.cell===t).column,last:i.find(e=>e.cell===o).column},n=function(e,t,o,l){const i=parseInt(o.getAttribute("colspan")||"1");return i>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:l.first?e.reverse().find(({column:e})=>e<l.first).cell:e.reverse().find(({column:e})=>e>l.last).cell}(i,t,o,r);this.editor.model.change(t=>{const o=r.last-r.first+1;e.removeColumns(l,{at:r.first,columns:o}),t.setSelection(t.createPositionAt(n,0))})}}class de extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection);if(0===o.length)return this.isEnabled=!1,void(this.value=!1);const l=o[0].findAncestor("table");this.isEnabled=t.schema.checkAttribute(l,"headingRows"),this.value=o.every(e=>this._isInHeading(e,e.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,l=t.getSelectionAffectedTableCells(o.document.selection),i=l[0].findAncestor("table"),{first:r,last:n}=t.getRowIndexes(l),a=this.value?r:n+1,s=i.getAttribute("headingRows")||0;o.change(e=>{if(a){const t=S(i,a,a>s?s:0);for(const{cell:o}of t)P(o,a,e)}t.setHeadingRowsCount(e,i,a)})}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||"0");return!!o&&e.parent.index<o}}class ue extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection);if(0===o.length)return this.isEnabled=!1,void(this.value=!1);const l=o[0].findAncestor("table");this.isEnabled=t.schema.checkAttribute(l,"headingColumns"),this.value=o.every(t=>C(e,t))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,l=t.getSelectionAffectedTableCells(o.document.selection),i=l[0].findAncestor("table"),{first:r,last:n}=t.getColumnIndexes(l),a=this.value?r:n+1;o.change(e=>{if(a){const t=I(i,a);for(const{cell:o,column:l}of t)R(o,l,a,e)}t.setHeadingColumnsCount(e,i,a)})}}const be=5,he=40,me=2,ge=3;function pe(e){const t=new Set;for(const o of e.document.differ.getChanges()){let l=null;switch(o.type){case"insert":l=["table","tableRow","tableCell"].includes(o.name)?o.position:null;break;case"remove":l=["tableRow","tableCell"].includes(o.name)?o.position:null;break;case"attribute":o.range.start.nodeAfter&&(l=["table","tableRow","tableCell"].includes(o.range.start.nodeAfter.name)?o.range.start:null)}if(!l)continue;const i=l.nodeAfter&&l.nodeAfter.is("element","table")?l.nodeAfter:l.findAncestor("table");for(const o of e.createRangeOn(i).getItems())o.is("element","table")&&Pe(o)&&t.add(o)}return t}function fe(e,t){return 100*he/we(e,t)}function we(e,t){const o=ke(e,"tbody",t)||ke(e,"thead",t);return _e(t.editing.view.domConverter.mapViewToDom(o))}function ke(e,t,o){return[...[...o.editing.mapper.toViewElement(e).getChildren()].find(e=>e.is("element","table")).getChildren()].find(e=>e.is("element",t))}function _e(e){const t=i.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function ye(e,t){const o=t.getCellLocation(e).column;return{leftEdge:o,rightEdge:o+(e.getAttribute("colspan")||1)-1}}function Ce(e){const t=Math.pow(10,me),o="number"==typeof e?e:parseFloat(e);return Math.round(o*t)/t}function ve(e,t,o){return Ce(e<=t?t:e>=o?o:e)}function Te(e,t){return Array(e).fill(t)}function Ae(e){return e.map(e=>"number"==typeof e?e:parseFloat(e)).filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0)}function xe(e){let t=function(e){const t=e.filter(e=>"auto"===e).length;if(0===t)return e.map(e=>Ce(e));const o=Ae(e),l=Math.max((100-o)/t,be);return e.map(e=>"auto"===e?l:e).map(e=>Ce(e))}(e.map(e=>"auto"===e||void 0===e?"auto":parseFloat(e.replace("%",""))));const o=Ae(t);return 100!==o&&(t=t.map(e=>Ce(100*e/o)).map((e,t,o)=>{if(!(t===o.length-1))return e;return Ce(e+100-Ae(o))})),t.map(e=>e+"%")}function Ve(e){const t=i.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function Se(e,t,o,l){for(let i=0;i<Math.max(o.length,e.length);i++){const r=e[i],n=o[i];n?r?l.setAttribute("columnWidth",n,r):l.appendElement("tableColumn",{columnWidth:n},t):l.remove(r)}}function Pe(e){if(e.is("element","tableColumnGroup"))return e;const t=e.getChildren();return Array.from(t).find(e=>e.is("element","tableColumnGroup"))}function Ie(e){const t=Pe(e);return t?Array.from(t.getChildren()):[]}function Re(e){return Ie(e).map(e=>e.getAttribute("columnWidth"))}function Ee(e,t){return Ie(e).reduce((e,o)=>{const l=o.getAttribute("columnWidth"),i=o.getAttribute("colSpan");if(!i)return e.push(l),e;for(let t=0;t<i;t++)e.push(l);return t.removeAttribute("colSpan",o),e},[])}class Le extends e.Plugin{static get pluginName(){return"TableUtils"}static get isOfficialPlugin(){return!0}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,l=o.getChildIndex(t),i=new w(o,{row:l});for(const{cell:t,row:o,column:l}of i)if(t===e)return{row:o,column:l}}createTable(e,t){const o=e.createElement("table"),l=t.rows||2,i=t.columns||2;return Be(e,o,0,l,i),t.headingRows&&this.setHeadingRowsCount(e,o,Math.min(t.headingRows,l)),t.headingColumns&&this.setHeadingColumnsCount(e,o,Math.min(t.headingColumns,i)),o}insertRows(e,t={}){const o=this.editor.model,l=t.at||0,r=t.rows||1,n=void 0!==t.copyStructureFromAbove,a=t.copyStructureFromAbove?l-1:l,s=x(this.editor),c=this.getRows(e),d=this.getColumns(e);if(l>c)throw new i.CKEditorError("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change(t=>{let o=e.getAttribute("headingRows")||0;const i=e.getAttribute("headingColumns")||0;if(o>l&&(o+=r,this.setHeadingRowsCount(t,e,o,{shallow:!0})),!n&&(0===l||l===c)){const n=Be(t,e,l,r,d);if(s)for(let e=0;e<n.length;e++){const r=n[e];for(let n=0;n<d;n++){const a=r[n];(l+e<o||n<i)&&t.setAttribute("tableCellType","header",a)}}return}const u=n?Math.max(l,a):l,b=new w(e,{endRow:u}),h=new Array(d).fill(1);for(const{row:e,column:o,cellHeight:i,cellWidth:s,cell:c}of b){const d=e+i-1,u=e<=a&&a<=d;e<l&&l<=d?(t.setAttribute("rowspan",i+r,c),h[o]=-s):n&&u&&(h[o]=s)}for(let n=0;n<r;n++){const r=t.createElement("tableRow");t.insert(r,e,l);for(let e=0;e<h.length;e++){const a=h[e],c=t.createPositionAt(r,"end");if(a>0){const r=y(t,c,a>1?{colspan:a}:void 0);s&&(l+n<o||e<i)&&t.setAttribute("tableCellType","header",r)}e+=Math.abs(a)-1}}})}insertColumns(e,t={}){const o=this.editor.model,l=t.at||0,i=t.columns||1,r=x(this.editor);o.change(t=>{const o=e.getAttribute("headingRows")||0;let n=e.getAttribute("headingColumns");l<n&&(n+=i,this.setHeadingColumnsCount(t,e,n,{shallow:!0}));const a=this.getColumns(e);if(0===l||a===l){let a=0;for(const s of e.getChildren()){if(!s.is("element","tableRow"))continue;const e=Fe(i,t,t.createPositionAt(s,l?"end":0));if(r)for(let i=0;i<e.length;i++)(l+i<n||a<o)&&t.setAttribute("tableCellType","header",e[i]);a++}return}const s=new w(e,{column:l,includeAllSlots:!0});for(const e of s){const{row:a,cell:c,cellAnchorColumn:d,cellAnchorRow:u,cellWidth:b,cellHeight:h}=e;if(d<l){t.setAttribute("colspan",b+i,c);const e=u+h-1;for(let t=a;t<=e;t++)s.skipRow(t)}else{const s=Fe(i,t,e.getPositionBefore());if(r)for(let e=0;e<s.length;e++)(l+e<n||a<o)&&t.setAttribute("tableCellType","header",s[e])}}})}removeRows(e,t){const o=this.editor.model,l=t.rows||1,r=this.getRows(e),n=t.at,a=n+l-1;if(a>r-1)throw new i.CKEditorError("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change(t=>{const o={first:n,last:a},{cellsToMove:l,cellsToTrim:i}=function(e,{first:t,last:o}){const l=new Map,i=[];for(const{row:r,column:n,cellHeight:a,cell:s}of new w(e,{endRow:o})){const e=r+a-1;if(r>=t&&r<=o&&e>o){const e=a-(o-r+1);l.set(n,{cell:s,rowspan:e})}if(r<t&&e>=t){let l;l=e>=o?o-t+1:e-t+1,i.push({cell:s,rowspan:a-l})}}return{cellsToMove:l,cellsToTrim:i}}(e,o);if(l.size){!function(e,t,o,l){const i=new w(e,{includeAllSlots:!0,row:t}),r=[...i],n=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:i}of r)if(o.has(e)){const{cell:t,rowspan:i}=o.get(e),r=a?l.createPositionAfter(a):l.createPositionAt(n,0);l.move(l.createRangeOn(t),r),_("rowspan",i,t,l),a=t}else i&&(a=t)}(e,a+1,l,t)}for(let o=a;o>=n;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of i)_("rowspan",e,o,t);if(function(e,{first:t,last:o},l){const i=e.getAttribute("headingRows")||0;if(t<i){_("headingRows",o<i?i-(o-t+1):t,e,l,0)}}(e,o,t),L(e,this)||B(e,this),x(this.editor)){let o=e.getAttribute("headingRows")||0;const l=this.getRows(e);for(;o<l&&A({table:e,row:o});)o++;this.setHeadingRowsCount(t,e,o,{shallow:!0})}})}removeColumns(e,t){const o=this.editor.model,l=t.at,i=t.columns||1,r=t.at+i-1;o.change(t=>{!function(e,t,o){const l=e.getAttribute("headingColumns")||0;if(l&&t.first<l){const i=Math.min(l-1,t.last)-t.first+1;o.setAttribute("headingColumns",l-i,e)}}(e,{first:l,last:r},t);const o=Ie(e);for(let i=r;i>=l;i--){for(const{cell:o,column:l,cellWidth:r}of[...new w(e)])l<=i&&r>1&&l+r>i?_("colspan",r-1,o,t):l===i&&t.remove(o);if(o[i]){const e=0===i?o[1]:o[i-1],l=parseFloat(o[i].getAttribute("columnWidth")),r=parseFloat(e.getAttribute("columnWidth"));t.remove(o[i]),t.setAttribute("columnWidth",l+r+"%",e)}}if(B(e,this)||L(e,this),x(this.editor)){let o=e.getAttribute("headingColumns")||0;const l=this.getColumns(e);for(;o<l&&A({table:e,column:o});)o++;this.setHeadingColumnsCount(t,e,o,{shallow:!0})}})}splitCellVertically(e,t=2){const o=this.editor.model,l=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||"1"),r=parseInt(e.getAttribute("colspan")||"1");o.change(o=>{if(r>1){const{newCellsSpan:l,updatedSpan:n}=We(r,t);_("colspan",n,e,o);const a={};l>1&&(a.colspan=l),i>1&&(a.rowspan=i);Fe(r>t?t-1:r-1,o,o.createPositionAfter(e),a)}if(r<t){const n=t-r,a=[...new w(l)],{column:s}=a.find(({cell:t})=>t===e),c=a.filter(({cell:t,cellWidth:o,column:l})=>t!==e&&l===s||l<s&&l+o>s);for(const{cell:e,cellWidth:t}of c)o.setAttribute("colspan",t+n,e);const d={};i>1&&(d.rowspan=i),Fe(n,o,o.createPositionAfter(e),d);const u=l.getAttribute("headingColumns")||0;u>s&&_("headingColumns",u+n,l,o)}})}splitCellHorizontally(e,t=2){const o=this.editor.model,l=e.parent,i=l.parent,r=i.getChildIndex(l),n=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");o.change(o=>{if(n>1){const l=[...new w(i,{startRow:r,endRow:r+n-1,includeAllSlots:!0})],{newCellsSpan:s,updatedSpan:c}=We(n,t);_("rowspan",c,e,o);const{column:d}=l.find(({cell:t})=>t===e),u={};s>1&&(u.rowspan=s),a>1&&(u.colspan=a);let b=0;for(const e of l){const{column:t,row:l}=e,i=t===d;b>=s&&i&&(b=0),l>=r+c&&i&&(b||Fe(1,o,e.getPositionBefore(),u),b++)}}if(n<t){const l=t-n,s=[...new w(i,{startRow:0,endRow:r})];for(const{cell:t,cellHeight:i,row:n}of s)if(t!==e&&n+i>r){const e=i+l;o.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),Be(o,i,r+1,l,1,c);const d=i.getAttribute("headingRows")||0;d>r&&_("headingRows",d+l,i,o)}})}getColumns(e){return[...e.getChild(0).getChildren()].filter(e=>e.is("element","tableCell")).reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||"1"),0)}getRows(e){return Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0)}createTableWalker(e,t={}){return new w(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}setHeadingRowsCount(e,t,o,l={}){const{shallow:i,resetFormerHeadingCells:r=!0,autoExpand:n=!0}=l,a=t.getAttribute("headingRows")||0;if(o!==a&&(_("headingRows",o,t,e,0),!i&&x(this.editor))){for(const{cell:l,row:i,column:r}of new w(t,{endRow:o-1}))Ne({table:t,writer:e,cell:l,row:i,column:r});if(r&&o<a)for(let l=o;l<a&&A({table:t,row:l});l++)for(const{cell:o,row:i,column:r}of new w(t,{row:l}))Ne({table:t,writer:e,cell:o,row:i,column:r});if(n&&o>a){const l=this.getRows(t);for(;o<l&&A({table:t,row:o});)o++;_("headingRows",o,t,e,0)}}}setHeadingColumnsCount(e,t,o,l={}){const{shallow:i,resetFormerHeadingCells:r=!0,autoExpand:n=!0}=l,a=t.getAttribute("headingColumns")||0;if(o!==a&&(_("headingColumns",o,t,e,0),!i&&x(this.editor))){for(const{cell:l,row:i,column:r}of new w(t,{endColumn:o-1}))Ne({table:t,writer:e,cell:l,row:i,column:r});if(r&&o<a)for(let l=o;l<a&&A({table:t,column:l});l++)for(const{cell:o,row:i,column:r}of new w(t,{column:l}))Ne({table:t,writer:e,cell:o,row:i,column:r});if(n&&o>a){const l=this.getColumns(t);for(;o<l&&A({table:t,column:o});)o++;_("headingColumns",o,t,e,0)}}}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map(e=>e.parent.index);return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new w(t)].filter(t=>e.includes(t.cell)).map(e=>e.column);return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let l=0;for(const i of e){const{row:e,column:r}=this.getCellLocation(i),n=parseInt(i.getAttribute("rowspan"))||1,a=parseInt(i.getAttribute("colspan"))||1;t.add(e),o.add(r),n>1&&t.add(e+n-1),a>1&&o.add(r+a-1),l+=n*a}const i=function(e,t){const o=Array.from(e.values()),l=Array.from(t.values()),i=Math.max(...o),r=Math.min(...o),n=Math.max(...l),a=Math.min(...l);return(i-r+1)*(n-a+1)}(t,o);return i==l}sortRanges(e){return Array.from(e).sort(De)}_getFirstLastIndexesObject(e){const t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),l=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,l))return!1;const i=this.getColumnIndexes(e),r=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(i,r)}_areIndexesInSameSection({first:e,last:t},o){return e<o===t<o}}function Be(e,t,o,l,i,r={}){const n=[];for(let a=0;a<l;a++){const l=e.createElement("tableRow");e.insert(l,t,o),n.push(Fe(i,e,e.createPositionAt(l,"end"),r))}return n}function Fe(e,t,o,l={}){const i=[];let r=o;for(let o=0;o<e;o++){const e=y(t,r,l);i.push(e),r=t.createPositionAfter(e)}return i}function We(e,t){if(e<t)return{newCellsSpan:1,updatedSpan:1};const o=Math.floor(e/t);return{newCellsSpan:o,updatedSpan:e-o*t+o}}function De(e,t){const o=e.start,l=t.start;return o.isBefore(l)?-1:1}function Ne({writer:e,table:t,row:o,column:l,cell:i}){const r=t.getAttribute("headingRows")||0,n=t.getAttribute("headingColumns")||0;o>=r&&l>=n?e.removeAttribute("tableCellType",i):e.setAttribute("tableCellType","header",i)}class ze extends e.Command{refresh(){const e=this.editor.plugins.get(Le),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t)}execute(){const e=this.editor.model,t=this.editor.plugins.get(Le);e.change(o=>{const l=t.getSelectedTableCells(e.document.selection),i=l.shift(),{mergeWidth:r,mergeHeight:n}=function(e,t,o){let l=0,i=0;for(const e of t){const{row:t,column:r}=o.getCellLocation(e);l=He(e,r,l,"colspan"),i=He(e,t,i,"rowspan")}const{row:r,column:n}=o.getCellLocation(e),a=l-n,s=i-r;return{mergeWidth:a,mergeHeight:s}}(i,l,t);_("colspan",r,i,o),_("rowspan",n,i,o);for(const e of l)Oe(e,i,o);F(i.findAncestor("table"),t),o.setSelection(i,"in")})}}function Oe(e,t,o){Me(e)||(Me(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function Me(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function He(e,t,o,l){const i=parseInt(e.getAttribute(l)||"1");return Math.max(o,t+i)}class je extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),l=t.getRowIndexes(o),i=o[0].findAncestor("table"),r=[];for(let t=l.first;t<=l.last;t++)for(const o of i.getChild(t).getChildren())r.push(e.createRangeOn(o));e.change(e=>{e.setSelection(r)})}}class Ue extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),l=o[0],i=o.pop(),r=l.findAncestor("table"),n=e.getCellLocation(l),a=e.getCellLocation(i),s=Math.min(n.column,a.column),c=Math.max(n.column,a.column),d=[];for(const e of new w(r,{startColumn:s,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change(e=>{e.setSelection(d)})}}function $e(e){e.document.registerPostFixer(t=>function(e,t){const o=t.document.differ.getChanges();let l=!1;const i=new Set;for(const t of o){let o=null;"insert"==t.type&&"table"==t.name&&(o=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),qe(t)&&(o=t.range.start.findAncestor("table")),o&&!i.has(o)&&(l=Ke(o,e)||l,l=Ge(o,e)||l,i.add(o))}return l}(t,e))}function Ke(e,t){let o=!1;const l=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),o=Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0),l=[];for(const{row:i,cell:r,cellHeight:n}of new w(e)){if(n<2)continue;const e=i<t?t:o;if(i+n>e){const t=e-i;l.push({cell:r,rowspan:t})}}return l}(e);if(l.length){o=!0;for(const e of l)_("rowspan",e.rowspan,e.cell,t,1)}return o}function Ge(e,t){let o=!1;const l=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new w(e,{includeAllSlots:!0}))t[o]++;return t}(e),i=[];for(const[t,o]of l.entries())!o&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){o=!0;for(const o of i.reverse())t.remove(e.getChild(o)),l.splice(o,1)}const r=l.filter((t,o)=>e.getChild(o).is("element","tableRow")),n=r[0];if(!r.every(e=>e===n)){const l=r.reduce((e,t)=>t>e?t:e,0);for(const[i,n]of r.entries()){const r=l-n;if(r){for(let o=0;o<r;o++)y(t,t.createPositionAt(e.getChild(i),"end"));o=!0}}}return o}function qe(e){if("attribute"!==e.type)return!1;const t=e.attributeKey;return"headingRows"===t||"colspan"===t||"rowspan"===t}function Je(e){e.document.registerPostFixer(t=>function(e,t){const o=t.document.differ.getChanges();let l=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(l=Xe(t.position.nodeAfter,e)||l),"insert"==t.type&&"tableRow"==t.name&&(l=Ye(t.position.nodeAfter,e)||l),"insert"==t.type&&"tableCell"==t.name&&(l=Ze(t.position.nodeAfter,e)||l),"remove"!=t.type&&"insert"!=t.type||!Qe(t)||(l=Ze(t.position.parent,e)||l);return l}(t,e))}function Xe(e,t){let o=!1;for(const l of e.getChildren())l.is("element","tableRow")&&(o=Ye(l,t)||o);return o}function Ye(e,t){let o=!1;for(const l of e.getChildren())o=Ze(l,t)||o;return o}function Ze(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter(e=>e.is("$text"));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function Qe(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function et(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,l=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,l="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),l="tableRow"==e.name);if(!o)continue;const i=o.getAttribute("headingRows")||0,r=o.getAttribute("headingColumns")||0,n=new w(o);for(const e of n){const o=e.row<i||e.column<r?"th":"td",n=t.mapper.toViewElement(e.cell);n&&n.is("element")&&n.name!=o&&t.reconvertItem(l?e.cell.parent:e.cell)}}}function tt(e,t){const o=e.document.differ,l=new Set;for(const e of o.getChanges()){const t="attribute"==e.type?e.range.start.parent:e.position.parent;t.is("element","tableCell")&&l.add(t)}for(const e of l.values()){const o=Array.from(e.getChildren()).filter(e=>ot(e,t.mapper));for(const e of o)t.reconvertItem(e)}}function ot(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&Z(e)!==o.is("element","span")}var lt=o(719),it=o.n(lt),rt=o(863),nt=o.n(rt),at=o(424),st=o.n(at),ct=o(517),dt=o.n(ct),ut=o(163),bt=o.n(ut),ht=o(419),mt={attributes:{"data-cke":!0}};mt.setAttributes=dt(),mt.insert=st().bind(null,"head"),mt.domAPI=nt(),mt.insertStyleElement=bt();it()(ht.A,mt);ht.A&&ht.A.locals&&ht.A.locals;class gt extends e.Plugin{_additionalSlots;static get pluginName(){return"TableEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Le]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,o=t.schema,l=e.conversion,i=e.plugins.get(Le);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),l.for("upcast").add(z()),l.for("upcast").add(O()),l.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:q(i,{asWidget:!0,additionalSlots:this._additionalSlots})}),l.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:q(i,{additionalSlots:this._additionalSlots})}),l.for("upcast").elementToElement({model:"tableRow",view:"tr"}),l.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),l.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),l.for("upcast").elementToElement({model:"tableCell",view:"td"}),l.for("upcast").elementToElement({model:"tableCell",view:"th"}),l.for("upcast").add(H("td")),l.for("upcast").add(H("th")),l.for("editingDowncast").elementToElement({model:"tableCell",view:X({asWidget:!0,cellTypeEnabled:()=>x(this.editor)})}),l.for("dataDowncast").elementToElement({model:"tableCell",view:X({cellTypeEnabled:()=>x(this.editor)})}),l.for("editingDowncast").elementToElement({model:"paragraph",view:Y({asWidget:!0}),converterPriority:"high"}),l.for("dataDowncast").elementToElement({model:"paragraph",view:Y(),converterPriority:"high"}),l.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),l.for("upcast").attributeToAttribute({model:{key:"colspan",value:pt("colspan")},view:"colspan"}),l.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),l.for("upcast").attributeToAttribute({model:{key:"rowspan",value:pt("rowspan")},view:"rowspan"}),this._addPlainTableOutputConverters(),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.config.define("table.showHiddenBorders",!0),e.config.get("table.showHiddenBorders")&&e.editing.view.change(t=>{for(const o of e.editing.view.document.roots)t.addClass("ck-table-show-hidden-borders",o)}),e.commands.add("insertTable",new oe(e)),e.commands.add("insertTableRowAbove",new le(e,{order:"above"})),e.commands.add("insertTableRowBelow",new le(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new ie(e,{order:"left"})),e.commands.add("insertTableColumnRight",new ie(e,{order:"right"})),e.commands.add("removeTableRow",new se(e)),e.commands.add("removeTableColumn",new ce(e)),e.commands.add("splitTableCellVertically",new re(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new re(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new ze(e)),e.commands.add("mergeTableCellRight",new ne(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new ne(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new ne(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new ne(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new ue(e)),e.commands.add("setTableRowHeader",new de(e)),e.commands.add("selectTableRow",new je(e)),e.commands.add("selectTableColumn",new Ue(e)),$e(t),Je(t),this.listenTo(t.document,"change:data",()=>{x(e)||et(t,e.editing),tt(t,e.editing)})}registerAdditionalSlot(e){this._additionalSlots.push(e)}_addPlainTableOutputConverters(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:Q(e),converterPriority:"high"}),e.plugins.has("TableCaptionEditing")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:ee(e),converterPriority:"high"}),e.plugins.has("TablePropertiesEditing")&&function(e){const t={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[o,l]of Object.entries(t))e.conversion.for("dataDowncast").add(t=>t.on(`attribute:${l}:table`,(t,l,i)=>{const{item:r,attributeNewValue:n}=l,{mapper:a,writer:s}=i,c=e.plugins.has("PlainTableOutput"),d=i.options.isClipboardPipeline,u=e.config.get("experimentalFlags.useExtendedTableBlockAlignment"),b=te(e,r);if(!(c||b||u&&d))return;if(!i.consumable.consume(r,t.name))return;const h=a.toViewElement(r);n?s.setStyle(o,n,h):s.removeStyle(o,h)},{priority:"high"}))}(e)}}function pt(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var ft=o(355),wt=o(311),kt=o(538),_t={attributes:{"data-cke":!0}};_t.setAttributes=dt(),_t.insert=st().bind(null,"head"),_t.domAPI=nt(),_t.insertStyleElement=bt();it()(kt.A,_t);kt.A&&kt.A.locals&&kt.A.locals;class yt extends wt.View{items;keystrokes;focusTracker;constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new i.KeystrokeHandler,this.focusTracker=new i.FocusTracker,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(e,t)=>`${t} × ${e}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{const{row:o,column:l}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(l,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(e,t,o)=>{if(!o)return;const{row:l,column:i}=o.dataset;this.set({rows:parseInt(l),columns:parseInt(i)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),(0,wt.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((o,l)=>{const i=Math.floor(l/10)<e&&l%10<t;o.set("isOn",i)})}_createGridButton(e,t,o,l){const i=new wt.ButtonView(e);return i.set({label:l,class:"ck-insert-table-dropdown-grid-box"}),i.extendTemplate({attributes:{"data-row":t,"data-column":o}}),i}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const o=Math.floor(t/10),l=t%10,i=`${o+1} × ${l+1}`;e.push(this._createGridButton(this.locale,o+1,l+1,i))}return this.createCollection(e)}}class Ct extends e.Plugin{static get pluginName(){return"TableUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t,o="ltr"===e.locale.contentLanguageDirection;e.ui.componentFactory.add("insertTable",o=>{const l=e.commands.get("insertTable"),i=(0,wt.createDropdown)(o);let r;return i.bind("isEnabled").to(l),i.buttonView.set({icon:ft.IconTable,label:t("Insert table"),tooltip:!0}),i.on("change:isOpen",()=>{r||(r=new yt(o),i.panelView.children.add(r),r.delegate("execute").to(i),i.on("execute",()=>{e.execute("insertTable",{rows:r.rows,columns:r.columns}),e.editing.view.focus()}))}),i}),e.ui.componentFactory.add("menuBar:insertTable",o=>{const l=e.commands.get("insertTable"),i=new wt.MenuBarMenuView(o),r=new yt(o);return r.delegate("execute").to(i),i.on("change:isOpen",(e,t,o)=>{o||r.reset()}),r.on("execute",()=>{e.execute("insertTable",{rows:r.rows,columns:r.columns}),e.editing.view.focus()}),i.buttonView.set({label:t("Table"),icon:ft.IconTable}),i.panelView.children.add(r),i.bind("isEnabled").to(l),i}),e.ui.componentFactory.add("tableColumn",e=>{const l=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),ft.IconTableColumn,l,e)}),e.ui.componentFactory.add("tableRow",e=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),ft.IconTableRow,o,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{const l=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),ft.IconTableMergeCell,l,e)})}_prepareDropdown(e,t,o,l){const i=this.editor,r=(0,wt.createDropdown)(l),n=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(n,"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(r,"execute",e=>{i.execute(e.source.commandName),e.source instanceof wt.SwitchButtonView||i.editing.view.focus()}),r}_prepareMergeSplitButtonDropdown(e,t,o,l){const i=this.editor,r=(0,wt.createDropdown)(l,wt.SplitButtonView),n="mergeTableCells",a=i.commands.get(n),s=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([a,...s],"isEnabled",(...e)=>e.some(e=>e)),this.listenTo(r.buttonView,"execute",()=>{i.execute(n),i.editing.view.focus()}),this.listenTo(r,"execute",e=>{i.execute(e.source.commandName),i.editing.view.focus()}),r}_fillDropdownWithListOptions(e,t){const o=this.editor,l=[],r=new i.Collection;for(const e of t)vt(e,o,l,r);return(0,wt.addListToDropdown)(e,r),l}}function vt(e,t,o,l){if("button"===e.type||"switchbutton"===e.type){const l=e.model=new wt.UIModel(e.model),{commandName:i,bindIsOn:r}=e.model,n=t.commands.get(i);o.push(n),l.set({commandName:i}),l.bind("isEnabled").to(n),r&&l.bind("isOn").to(n,"value"),l.set({withText:!0})}l.add(e)}var Tt=o(489),At={attributes:{"data-cke":!0}};At.setAttributes=dt(),At.insert=st().bind(null,"head"),At.domAPI=nt(),At.insertStyleElement=bt();it()(Tt.A,At);Tt.A&&Tt.A.locals&&Tt.A.locals;class xt extends e.Plugin{static get pluginName(){return"TableSelection"}static get isOfficialPlugin(){return!0}static get requires(){return[Le,Le]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this.listenTo(o.document,"insertText",(e,t)=>this._handleInsertTextEvent(e,t),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(Le),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(Le),t=this.getSelectedTableCells();return t?this.editor.model.change(o=>{const l=o.createDocumentFragment(),{first:i,last:r}=e.getColumnIndexes(t),{first:n,last:a}=e.getRowIndexes(t),s=t[0].findAncestor("table");let c=a,d=r;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:r,firstRow:n,lastRow:a};c=W(s,e),d=D(s,e)}const u=V(s,{startRow:n,startColumn:i,endRow:c,endColumn:d},o);return o.insert(u,l,0),l}):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(o.cells.map(t=>e.createRangeOn(t)),{backward:o.backward})})}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=this.editor.model.document.selection,t=(0,i.first)(e.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,o,l)=>{const i=l.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(i);const r=this.getSelectedTableCells();if(!r)return;for(const e of r){const o=l.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",o),t.add(o)}const n=l.mapper.toViewElement(r[r.length-1]);i.setSelection(n,0)},{priority:"lowest"}))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(o=>{const l=o.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(l);o.setSelection(i)})}})}_handleDeleteContent(e,t){const o=this.editor.plugins.get(Le),l=t[0],i=t[1],r=this.editor.model,n=!i||"backward"==i.direction,a=o.getSelectedTableCells(l);a.length&&(e.stop(),r.change(e=>{const t=a[n?a.length-1:0];r.change(e=>{for(const t of a)r.deleteContent(e.createSelection(t,"in"))});const o=r.schema.getNearestSelectionRange(e.createPositionAt(t,0));l.is("documentSelection")?e.setSelection(o):l.setTo(o)}))}_handleInsertTextEvent(e,t){const o=this.editor,l=this.getSelectedTableCells();if(!l)return;const i=o.editing.view,r=o.editing.mapper,n=l.map(e=>i.createRangeOn(r.toViewElement(e)));t.selection=i.createSelection(n),t.preventDefault()}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),l=o.getCellLocation(e),i=o.getCellLocation(t),r=Math.min(l.row,i.row),n=Math.max(l.row,i.row),a=Math.min(l.column,i.column),s=parseInt(t.getAttribute("colspan")||"1")-1,c=Math.max(l.column,i.column+s),d=new Array(n-r+1).fill(null).map(()=>[]),u={startRow:r,endRow:n,startColumn:a,endColumn:c};for(const{row:t,cell:o}of new w(e.findAncestor("table"),u))d[t-r].push(o);const b=i.row<l.row,h=i.column<l.column;return b&&d.reverse(),h&&d.forEach(e=>e.reverse()),{cells:d.flat(),backward:b||h}}}var Vt=o(331);class St extends e.Plugin{static get pluginName(){return"TableClipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[Vt.ClipboardMarkersUtils,Vt.ClipboardPipeline,xt,Le]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e,"cut",(e,t)=>this._onCopyCut(e,t)),this._listenToContentInsertion(),this.decorate("_replaceTableSlotCell")}_listenToContentInsertion(){const{editor:e}=this,t=e.plugins.get(Vt.ClipboardPipeline),o=e.plugins.get(xt);let l=!1;t.on("contentInsertion",(e,t)=>{l="paste"===t.method}),this.listenTo(e.model,"insertContent",(e,[t,i])=>{(l||null!==o.getSelectedTableCells())&&this._onInsertContent(e,t,i)},{priority:"high"}),t.on("contentInsertion",()=>{l=!1},{priority:"lowest"})}_onCopyCut(e,t){const o=this.editor.editing.view,l=this.editor.plugins.get(xt),i=this.editor.plugins.get(Vt.ClipboardMarkersUtils);l.getSelectedTableCells()&&("cut"!=e.name||this.editor.model.canEditAt(this.editor.model.document.selection))&&(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:"cut"===e.name},()=>{const r=i._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,()=>l.getSelectionAsFragment());o.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(r),method:e.name})}))}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const l=this.editor.model,i=this.editor.plugins.get(Le),r=this.editor.plugins.get(Vt.ClipboardMarkersUtils),n=this.getTableIfOnlyTableInContent(t,l);if(!n)return;const a=i.getSelectionAffectedTableCells(l.document.selection);a.length?(e.stop(),t.is("documentFragment")?r._pasteMarkersIntoTransformedElement(t.markers,e=>this._replaceSelectedCells(n,a,e)):this.editor.model.change(e=>{this._replaceSelectedCells(n,a,e)})):F(n,i)}_replaceSelectedCells(e,t,o){const l=this.editor.plugins.get(Le),i={width:l.getColumns(e),height:l.getRows(e)},r=function(e,t,o,l){const i=e[0].findAncestor("table"),r=l.getColumnIndexes(e),n=l.getRowIndexes(e),a={firstColumn:r.first,lastColumn:r.last,firstRow:n.first,lastRow:n.last},s=1===e.length;s&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,o,l){const i=l.getColumns(e),r=l.getRows(e);o>i&&l.insertColumns(e,{at:i,columns:o-i});t>r&&l.insertRows(e,{at:r,rows:t-r})}(i,a.lastRow+1,a.lastColumn+1,l));s||!l.isSelectionRectangular(e)?function(e,t,o){const{firstRow:l,lastRow:i,firstColumn:r,lastColumn:n}=t,a={first:l,last:i},s={first:r,last:n};It(e,r,a,o),It(e,n+1,a,o),Pt(e,l,s,o),Pt(e,i+1,s,o,l)}(i,a,o):(a.lastRow=W(i,a),a.lastColumn=D(i,a));return a}(t,i,o,l),n=r.lastRow-r.firstRow+1,a=r.lastColumn-r.firstColumn+1;e=V(e,{startRow:0,startColumn:0,endRow:Math.min(n,i.height)-1,endColumn:Math.min(a,i.width)-1},o);const s=t[0].findAncestor("table"),c=this._replaceSelectedCellsWithPasted(e,i,s,r,o);if(this.editor.plugins.get("TableSelection").isEnabled){const e=l.sortRanges(c.map(e=>o.createRangeOn(e)));o.setSelection(e)}else o.setSelection(c[0],0);return s}_replaceSelectedCellsWithPasted(e,t,o,l,i){const{width:r,height:n}=t,a=function(e,t,o){const l=new Array(o).fill(null).map(()=>new Array(t).fill(null));for(const{column:t,row:o,cell:i}of new w(e))l[o][t]=i;return l}(e,r,n),s=[...new w(o,{startRow:l.firstRow,endRow:l.lastRow,startColumn:l.firstColumn,endColumn:l.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of s){const{row:t,column:o}=e;o===l.firstColumn&&(d=e.getPositionBefore());const s=t-l.firstRow,u=o-l.firstColumn,b=a[s%n][u%r],h=b?i.cloneElement(b):null,m=this._replaceTableSlotCell(e,h,d,i);m&&(E(m,t,o,l.lastRow,l.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const u=parseInt(o.getAttribute("headingRows")||"0"),b=parseInt(o.getAttribute("headingColumns")||"0"),h=l.firstRow<u&&u<=l.lastRow,m=l.firstColumn<b&&b<=l.lastColumn;if(h){const e=Pt(o,u,{first:l.firstColumn,last:l.lastColumn},i,l.firstRow);c.push(...e)}if(m){const e=It(o,b,{first:l.firstRow,last:l.lastRow},i);c.push(...e)}return c}_replaceTableSlotCell(e,t,o,l){const{cell:i,isAnchor:r}=e;return r&&l.remove(i),t?(l.insert(t,o),t):null}getTableIfOnlyTableInContent(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(1==e.childCount&&e.getChild(0).is("element","table"))return e.getChild(0);const o=t.createRangeIn(e);for(const e of o.getItems())if(e.is("element","table")){const l=t.createRange(o.start,t.createPositionBefore(e));if(t.hasContent(l,{ignoreWhitespaces:!0}))return null;const i=t.createRange(t.createPositionAfter(e),o.end);return t.hasContent(i,{ignoreWhitespaces:!0})?null:e}return null}}function Pt(e,t,o,l,i=0){if(t<1)return;return S(e,t,i).filter(({column:e,cellWidth:t})=>Rt(e,t,o)).map(({cell:e})=>P(e,t,l))}function It(e,t,o,l){if(t<1)return;return I(e,t).filter(({row:e,cellHeight:t})=>Rt(e,t,o)).map(({cell:e,column:o})=>R(e,o,t,l))}function Rt(e,t,o){const l=e+t-1,{first:i,last:r}=o;return e>=i&&e<=r||e<i&&l>=i}class Et extends e.Plugin{static get pluginName(){return"TableKeyboard"}static get isOfficialPlugin(){return!0}static get requires(){return[xt,Le]}init(){const e=this.editor,t=e.editing.view.document,o=e.t;this.listenTo(t,"arrowKey",(...e)=>this._onArrowKey(...e),{context:"table"}),this.listenTo(t,"tab",(...e)=>this._handleTabOnSelectedTable(...e),{context:"figure"}),this.listenTo(t,"tab",(...e)=>this._handleTab(...e),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:o("Keystrokes that can be used in a table cell"),keystrokes:[{label:o("Move the selection to the next cell"),keystroke:"Tab"},{label:o("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:o("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:o("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const o=this.editor.model.document.selection.getSelectedElement();o&&o.is("element","table")&&t.stopPropagation()}_handleTab(e,t){const o=this.editor,l=this.editor.plugins.get(Le),i=this.editor.plugins.get("TableSelection"),r=o.model.document.selection,n=!t.shiftKey;let a=l.getTableCellsContainingSelection(r)[0];if(a||(a=i.getFocusCell()),!a)return;t.stopPropagation();const s=a.parent,c=s.parent,d=c.getChildIndex(s),u=s.getChildIndex(a)===s.childCount-1,b=d===l.getRows(c)-1;n&&b&&u&&o.execute("insertTableRowBelow")}_onArrowKey(e,t){const o=this.editor,l=t.keyCode,r=(0,i.getLocalizedArrowKeyCodeDirection)(l,o.locale.contentLanguageDirection);this._handleArrowKeys(r,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(Le),l=this.editor.plugins.get("TableSelection"),i=this.editor.model,r=i.document.selection,n=["right","down"].includes(e),a=o.getSelectedTableCells(r);if(a.length){let o;return o=t?l.getFocusCell():n?a[a.length-1]:a[0],this._navigateFromCellInDirection(o,e,t),!0}const s=r.focus.findAncestor("tableCell");if(!s)return!1;if(!r.isCollapsed)if(t){if(r.isBackward==n&&!r.containsEntireContent(s))return!1}else{const e=r.getSelectedElement();if(!e||!i.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(r,s,n)&&(this._navigateFromCellInDirection(s,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const l=this.editor.model,i=this.editor.model.schema,r=o?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(r).is("element","tableCell")){return l.createPositionAt(t,o?"end":0).isTouching(r)}const n=l.createSelection(r);return l.modifySelection(n,{direction:o?"forward":"backward"}),r.isEqual(n.focus)}_navigateFromCellInDirection(e,t,o=!1){const l=this.editor.model,i=e.findAncestor("table"),r=[...new w(i,{includeAllSlots:!0})],{row:n,column:a}=r[r.length-1],s=r.find(({cell:t})=>t==e);let{row:c,column:d}=s;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=s.cellWidth;break;case"down":c+=s.cellHeight}if(c<0||c>n||d<0&&c<=0||d>a&&c>=n)return void l.change(e=>{e.setSelection(e.createRangeOn(i))});d<0?(d=o?0:a,c--):d>a&&(d=o?a:0,c++);const u=r.find(e=>e.row==c&&e.column==d).cell,b=["right","down"].includes(t),h=this.editor.plugins.get("TableSelection");if(o&&h.isEnabled){const t=h.getAnchorCell()||e;h.setCellSelection(t,u)}else{const e=l.createPositionAt(u,b?0:"end");l.change(t=>{t.setSelection(e)})}}}var Lt=o(783);class Bt extends Lt.DomEventObserver{domEventType=["mousemove","mouseleave"];onDomEvent(e){this.fire(e.type,e)}}class Ft extends e.Plugin{static get pluginName(){return"TableMouse"}static get isOfficialPlugin(){return!0}static get requires(){return[xt,Le]}init(){this.editor.editing.view.addObserver(Bt),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(Le);let o=!1;const l=e.plugins.get(xt);this.listenTo(e.editing.view.document,"mousedown",(i,r)=>{const n=e.model.document.selection;if(!this.isEnabled||!l.isEnabled)return;if(!r.domEvent.shiftKey)return;const a=l.getAnchorCell()||t.getTableCellsContainingSelection(n)[0];if(!a)return;const s=this._getModelTableCellFromDomEvent(r);s&&Wt(a,s)&&(o=!0,l.setCellSelection(a,s),r.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{o=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{o&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,l=!1,i=!1;const r=e.plugins.get(xt);this.listenTo(e.editing.view.document,"mousedown",(e,o)=>{this.isEnabled&&r.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))}),this.listenTo(e.editing.view.document,"mousemove",(e,n)=>{if(!n.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(n);a&&Wt(t,a)&&(o=a,l||o==t||(l=!0)),l&&(i=!0,r.setCellSelection(t,o),n.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{l=!1,i=!1,t=null,o=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{i&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function Wt(e,t){return e.parent.parent==t.parent.parent}var Dt=o(151),Nt={attributes:{"data-cke":!0}};Nt.setAttributes=dt(),Nt.insert=st().bind(null,"head"),Nt.domAPI=nt(),Nt.insertStyleElement=bt();it()(Dt.A,Nt);Dt.A&&Dt.A.locals&&Dt.A.locals;class zt extends e.Plugin{static get requires(){return[gt,Ct,xt,Ft,Et,St,t.Widget]}static get pluginName(){return"Table"}static get isOfficialPlugin(){return!0}}class Ot extends e.Plugin{static get pluginName(){return"PlainTableOutput"}static get isOfficialPlugin(){return!0}static get requires(){return[zt]}init(){this.editor.conversion.for("upcast").add(e=>{e.on("element:table",(e,t,o)=>{o.consumable.consume(t.viewItem,{classes:"table"})})})}}function Mt(e){const t=Ht(e);return t||jt(e)}function Ht(e){const t=e.getSelectedElement();return t&&Ut(t)?t:null}function jt(e){const t=e.getFirstPosition();if(!t)return null;let o=t.parent;for(;o;){if(o.is("element")&&Ut(o))return o;o=o.parent}return null}function Ut(e){return e.is("element")&&!!e.getCustomProperty("table")&&(0,t.isWidget)(e)}class $t extends e.Plugin{static get requires(){return[t.WidgetToolbarRepository]}static get pluginName(){return"TableToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,o=e.t,l=e.plugins.get(t.WidgetToolbarRepository),i=e.config.get("table.contentToolbar"),r=e.config.get("table.tableToolbar");i&&l.register("tableContent",{ariaLabel:o("Table toolbar"),items:i,getRelatedElement:jt}),r&&l.register("table",{ariaLabel:o("Table toolbar"),items:r,getRelatedElement:Ht})}}var Kt=o(188),Gt={attributes:{"data-cke":!0}};Gt.setAttributes=dt(),Gt.insert=st().bind(null,"head"),Gt.domAPI=nt(),Gt.insertStyleElement=bt();it()(Kt.A,Gt);Kt.A&&Kt.A.locals&&Kt.A.locals;class qt extends wt.View{options;focusTracker;focusCycler;_focusables;dropdownView;inputView;keystrokes;_stillTyping;constructor(e,t){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=t,this.focusTracker=new i.FocusTracker,this._focusables=new wt.ViewCollection,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new i.KeystrokeHandler,this._stillTyping=!1,this.focusCycler=new wt.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",(e,t,o)=>this._setInputValue(o))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach(e=>{this.focusTracker.add(e.element),this._focusables.add(e)}),this.keystrokes.listenTo(this.element)}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,l=this._createColorSelector(e),i=(0,wt.createDropdown)(e),r=new wt.View;return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",e=>""!=e)]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(r),i.buttonView.label=t("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(l),i.bind("isEnabled").to(this,"isReadOnly",e=>!e),i.on("change:isOpen",(e,t,o)=>{o&&(l.updateSelectedColors(),l.showColorGridsFragment())}),i}_createInputTextView(){const e=this.locale,t=new wt.InputTextView(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",()=>{const e=t.element.value,o=this.options.colorDefinitions.find(t=>e===t.label);this._stillTyping=!0,this.value=o&&o.color||e}),t.on("blur",()=>{this._stillTyping=!1,this._setInputValue(t.element.value)}),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,o=this.options.defaultColorValue||"",l=t(o?"Restore default":"Remove color"),i=new wt.ColorSelectorView(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:l,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});i.appendUI(),i.on("execute",(e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||o,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1});let r=this.value;return i.on("colorPicker:cancel",()=>{this.value=r,this.fire("input"),this.dropdownView.isOpen=!1}),i.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{r=this.value}),i.bind("selectedColor").to(this,"value"),i}_setInputValue(e){if(!this._stillTyping){const t=Jt(e),o=this.options.colorDefinitions.find(e=>t===Jt(e.color));this.inputView.value=o?o.label:e||""}}}function Jt(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Xt=e=>""===e;function Yt(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function Zt(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Qt(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function eo(e){return e=e.trim().toLowerCase(),Xt(e)||(0,Lt.isColorStyleValue)(e)}function to(e){return e=e.trim(),Xt(e)||ao(e)||(0,Lt.isLengthStyleValue)(e)||(0,Lt.isPercentageStyleValue)(e)}function oo(e){return e=e.trim(),Xt(e)||ao(e)||(0,Lt.isLengthStyleValue)(e)}function lo(e,t){const o=new i.Collection,l=Yt(e.t);for(const i in l){const r={type:"button",model:new wt.UIModel({_borderStyleValue:i,label:l[i],role:"menuitemradio",withText:!0})};"none"===i?r.model.bind("isOn").to(e,"borderStyle",e=>"none"===t?!e:e===i):r.model.bind("isOn").to(e,"borderStyle",e=>e===i),o.add(r)}return o}function io(e){const{view:t,icons:o,toolbar:l,labels:i,propertyName:r,nameToValue:n,defaultValue:a}=e;for(const e in i){const s=new wt.ButtonView(t.locale);s.set({role:"radio",isToggleable:!0,label:i[e],icon:o[e],tooltip:i[e]});const c=n?n(e):e;s.bind("isOn").to(t,r,e=>{let t=e;return""===e&&a&&(t=a),c===t}),s.on("execute",()=>{!a&&c&&t[r]===c?t[r]=void 0:t[r]=c}),l.items.add(s)}}const ro=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function no(e){return(t,o,l)=>{const i=new qt(t.locale,{colorDefinitions:(r=e.colorConfig,r.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var r;return i.inputView.set({id:o,ariaDescribedById:l}),i.bind("isReadOnly").to(t,"isEnabled",e=>!e),i.bind("hasError").to(t,"errorText",e=>!!e),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused").to(i),i}}function ao(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var so=o(29),co={attributes:{"data-cke":!0}};co.setAttributes=dt(),co.insert=st().bind(null,"head"),co.domAPI=nt(),co.insertStyleElement=bt();it()(so.A,co);so.A&&so.A.locals&&so.A.locals;var uo=o(865),bo={attributes:{"data-cke":!0}};bo.setAttributes=dt(),bo.insert=st().bind(null,"head"),bo.domAPI=nt(),bo.insertStyleElement=bt();it()(uo.A,bo);uo.A&&uo.A.locals&&uo.A.locals;var ho=o(337),mo={attributes:{"data-cke":!0}};mo.setAttributes=dt(),mo.insert=st().bind(null,"head"),mo.domAPI=nt(),mo.insertStyleElement=bt();it()(ho.A,mo);ho.A&&ho.A.locals&&ho.A.locals;var go=o(380),po={attributes:{"data-cke":!0}};po.setAttributes=dt(),po.insert=st().bind(null,"head"),po.domAPI=nt(),po.insertStyleElement=bt();it()(go.A,po);go.A&&go.A.locals&&go.A.locals;class fo extends wt.View{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;paddingInput;widthInput;heightInput;horizontalAlignmentToolbar;verticalAlignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:l,borderColorInput:r,borderRowLabel:n}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:s}=this._createBackgroundFields(),{widthInput:c,operatorLabel:d,heightInput:u,dimensionsLabel:b}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:m,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new i.FocusTracker,this.keystrokes=new i.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=l,this.borderColorInput=r,this.backgroundInput=s,this.paddingInput=this._createPaddingField(),this.widthInput=c,this.heightInput=u,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=m;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new wt.ViewCollection,this._focusCycler=new wt.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new wt.FormHeaderView(e,{label:this.t("Cell properties")})),this.children.add(new wt.FormRowView(e,{labelView:n,children:[n,o,r,l],class:"ck-table-form__border-row"})),this.children.add(new wt.FormRowView(e,{labelView:a,children:[a,s],class:"ck-table-form__background-row"})),this.children.add(new wt.FormRowView(e,{children:[new wt.FormRowView(e,{labelView:b,children:[b,c,d,u],class:"ck-table-form__dimensions-row"}),new wt.FormRowView(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new wt.FormRowView(e,{labelView:g,children:[g,h,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new wt.FormRowView(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,wt.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=no({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),l=this.locale,i=this.t,r=i("Style"),n=new wt.LabelView(l);n.text=i("Border");const a=Yt(i),s=new wt.LabeledFieldView(l,wt.createLabeledDropdown);s.set({label:r,class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>a[e||"none"]),s.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),s.bind("isEmpty").to(this,"borderStyle",e=>!e),(0,wt.addListToDropdown)(s.fieldView,lo(this,t.style),{role:"menu",ariaLabel:r});const c=new wt.LabeledFieldView(l,wt.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",wo),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const d=new wt.LabeledFieldView(l,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",wo),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(e,o,l,i)=>{wo(l)||(this.borderColor="",this.borderWidth=""),wo(i)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:n,borderStyleDropdown:s,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Background");const l=no({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new wt.LabeledFieldView(e,l);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",()=>{this.backgroundColor=i.fieldView.value}),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Dimensions");const l=new wt.LabeledFieldView(e,wt.createLabeledInputText);l.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),l.fieldView.bind("value").to(this,"width"),l.fieldView.on("input",()=>{this.width=l.fieldView.element.value});const i=new wt.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new wt.LabeledFieldView(e,wt.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",()=>{this.height=r.fieldView.element.value}),{dimensionsLabel:o,widthInput:l,operatorLabel:i,heightInput:r}}_createPaddingField(){const e=this.locale,t=this.t,o=new wt.LabeledFieldView(e,wt.createLabeledInputText);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",()=>{this.padding=o.fieldView.element.value}),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e),l={left:ft.IconAlignLeft,center:ft.IconAlignCenter,right:ft.IconAlignRight,justify:ft.IconAlignJustify,top:ft.IconAlignTop,middle:ft.IconAlignMiddle,bottom:ft.IconAlignBottom};o.text=t("Table cell text alignment");const i=new wt.ToolbarView(e),r="rtl"===e.contentLanguageDirection;i.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Horizontal text alignment toolbar")}),io({view:this,icons:l,toolbar:i,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(r){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const n=new wt.ToolbarView(e);return n.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Vertical text alignment toolbar")}),io({view:this,icons:l,toolbar:n,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:i,verticalAlignmentToolbar:n,alignmentLabel:o}}_createActionButtons(){const e=this.locale,t=this.t,o=new wt.ButtonView(e),l=new wt.ButtonView(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return o.set({label:t("Save"),icon:ft.IconCheck,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(i,"errorText",(...e)=>e.every(e=>!e)),l.set({label:t("Cancel"),icon:ft.IconCancel,class:"ck-button-cancel",withText:!0}),l.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:l}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),l=t("Align cell text to the center"),i=t("Align cell text to the right"),r=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:l,left:o,justify:r}:{left:o,center:l,right:i,justify:r}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function wo(e){return"none"!==e}function ko(e,t,{signal:o,edges:l}={}){let i,r=null;const n=null!=l&&l.includes("leading"),a=null==l||l.includes("trailing"),s=()=>{null!==r&&(e.apply(i,r),i=void 0,r=null)};let c=null;const d=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,a&&s(),b()},t)},u=()=>{null!==c&&(clearTimeout(c),c=null)},b=()=>{u(),i=void 0,r=null},h=function(...e){if(o?.aborted)return;i=this,r=e;const t=null==c;d(),n&&t&&s()};return h.schedule=d,h.cancel=b,h.flush=()=>{u(),s()},o?.addEventListener("abort",b,{once:!0}),h}function _o(e,t=0,o={}){"object"!=typeof o&&(o={});const{leading:l=!1,trailing:i=!0,maxWait:r}=o,n=Array(2);let a;l&&(n[0]="leading"),i&&(n[1]="trailing");let s=null;const c=ko(function(...t){a=e.apply(this,t),s=null},t,{edges:n}),d=function(...t){return null!=r&&(null===s&&(s=Date.now()),Date.now()-s>=r)?(a=e.apply(this,t),s=Date.now(),c.cancel(),c.schedule(),a):(c.apply(this,t),a)};return d.cancel=c.cancel,d.flush=()=>(c.flush(),a),d}const yo=(()=>[wt.BalloonPanelView.defaultPositions.northArrowSouth,wt.BalloonPanelView.defaultPositions.northArrowSouthWest,wt.BalloonPanelView.defaultPositions.northArrowSouthEast,wt.BalloonPanelView.defaultPositions.southArrowNorth,wt.BalloonPanelView.defaultPositions.southArrowNorthWest,wt.BalloonPanelView.defaultPositions.southArrowNorthEast,wt.BalloonPanelView.defaultPositions.viewportStickyNorth])();function Co(e,t){const o=e.plugins.get("ContextualBalloon"),l=e.editing.view.document.selection;let i;"cell"===t?jt(l)&&(i=To(e)):Mt(l)&&(i=vo(e)),i&&o.updatePosition(i)}function vo(e){const t=T(e.model.document.selection),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:yo}}function To(e){const t=e.editing.mapper,o=e.editing.view.domConverter,l=e.model.document.selection;if(l.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,l=t.editing.view.domConverter,r=Array.from(e).map(e=>{const t=Ao(e.start),r=o.toViewElement(t);return new i.Rect(l.mapViewToDom(r))});return i.Rect.getBoundingRect(r)}(l.getRanges(),e),positions:yo};const r=Ao(l.getFirstPosition()),n=t.toViewElement(r);return{target:o.mapViewToDom(n),positions:yo}}function Ao(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}const xo={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class Vo extends e.Plugin{_defaultContentTableCellProperties;_defaultLayoutTableCellProperties;_balloon;view;_viewWithContentTableDefaults;_viewWithLayoutTableDefaults;_undoStepBatch;_isReady;static get requires(){return[wt.ContextualBalloon]}static get pluginName(){return"TableCellPropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:ro,backgroundColors:ro})}init(){const e=this.editor,t=e.t;this._defaultContentTableCellProperties=G(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._defaultLayoutTableCellProperties=$(void 0,{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(wt.ContextualBalloon),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",o=>{const l=new wt.ButtonView(o);l.set({label:t("Cell properties"),icon:ft.IconTableCellProperties,tooltip:!0}),this.listenTo(l,"execute",()=>this._showView());const i=Object.values(xo).map(t=>e.commands.get(t));return l.bind("isEnabled").toMany(i,"isEnabled",(...e)=>e.some(e=>e)),l})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,o=t.config.get("table.tableCellProperties"),l=(0,wt.normalizeColorOptions)(o.borderColors),i=(0,wt.getLocalizedColorOptions)(t.locale,l),r=(0,wt.normalizeColorOptions)(o.backgroundColors),n=(0,wt.getLocalizedColorOptions)(t.locale,r),a=!1!==o.colorPicker,s=new fo(t.locale,{borderColors:i,backgroundColors:n,defaultTableCellProperties:e,colorPickerConfig:!!a&&(o.colorPicker||{})}),c=t.t;s.render(),this.listenTo(s,"submit",()=>{this._hideView()}),this.listenTo(s,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()}),s.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),(0,wt.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=Zt(c),u=Qt(c);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:d,validator:eo})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:u,validator:oo})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:u,validator:to})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:u,validator:to})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:u,validator:to})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:d,validator:eo})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(xo).map(([t,o])=>{const l=t,i=this.view===this._viewWithContentTableDefaults?this._defaultContentTableCellProperties[l]||"":this._defaultLayoutTableCellProperties[l]||"";return[t,e.get(o).value||i]}).forEach(([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}),this._isReady=!0}_showView(){const e=this.editor,t=Mt(e.editing.view.document.selection),o=t&&e.editing.mapper.toModelElement(t),l=!o||"layout"!==o.getAttribute("tableType");l&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableCellProperties):l||this._viewWithLayoutTableDefaults||(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableCellProperties)),this.view=l?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:To(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;jt(e.editing.view.document.selection)?this._isViewVisible&&Co(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,l)=>{this._isReady&&this.editor.execute(e,{value:l,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:l,errorText:i}=e,r=_o(()=>{o.errorText=i},500);return(e,i,n)=>{r.cancel(),this._isReady&&(l(n)?(this.editor.execute(t,{value:n,batch:this._undoStepBatch}),o.errorText=null):r())}}}class So extends e.Command{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,t,o){switch(super(e),this.attributeName=t,this._defaultContentTableValue=o,t){case"tableCellType":this._defaultLayoutTableValue="data";break;case"tableCellBorderStyle":this._defaultLayoutTableValue="none";break;case"tableCellHorizontalAlignment":this._defaultLayoutTableValue="left";break;case"tableCellVerticalAlignment":this._defaultLayoutTableValue="middle";break;default:this._defaultLayoutTableValue=void 0}}refresh(){const e=this.editor.model.document.selection,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e),o=T(e);this._defaultValue=o&&"layout"===o.getAttribute("tableType")?this._defaultLayoutTableValue:this._defaultContentTableValue,this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,l=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(l.document.selection),r=this._getValueToSet(t);l.enqueueChange(o,e=>{r?i.forEach(t=>e.setAttribute(this.attributeName,r,t)):i.forEach(t=>e.removeAttribute(this.attributeName,t)),this.fire("afterExecute",{writer:e,tableCells:i,valueToSet:r})})}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every(e=>this._getAttribute(e)===t)?t:void 0}}class Po extends So{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=U(e,"px"))!==this._defaultValue)return e}}class Io extends e.Plugin{static get pluginName(){return"TableCellWidthEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[gt]}init(){const e=this.editor,t=G(e.config.get("table.tableCellProperties.defaultProperties"));v(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:t.width}),e.commands.add("tableCellWidth",new Po(e,t.width))}}class Ro extends So{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=U(e,"px");if(t!==this._defaultValue)return t}}class Eo extends So{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=U(e,"px");if(t!==this._defaultValue)return t}}class Lo extends So{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class Bo extends So{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class Fo extends So{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class Wo extends So{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Do extends So{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class No extends So{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=U(e,"px");if(t!==this._defaultValue)return t}}class zo extends So{constructor(e){super(e,"tableCellType","data"),this.on("afterExecute",(e,t)=>{const{writer:o,tableCells:l}=t,i=this.editor.plugins.get(Le),r=function(e){const t=new Map;for(const o of e){const e=o.findAncestor("table");t.has(e)||t.set(e,[]),t.get(e).push(o)}return t}(l);Oo(i,o,r.keys())})}refresh(){super.refresh();const e=T(this.editor.model.document.selection);this.isEnabled&&e&&"layout"===e.getAttribute("tableType")&&(this.isEnabled=!1)}_getAttribute(e){return e?.getAttribute(this.attributeName)||"data"}}function Oo(e,t,o){let l=!1;for(const i of o){let o=i.getAttribute("headingRows")||0,r=i.getAttribute("headingColumns")||0;const n=r>o;if(n){const n=Mo(e,i,"column",r,o);n!==r&&(e.setHeadingColumnsCount(t,i,n,{shallow:!0}),r=n,l=!0)}const a=Mo(e,i,"row",o,r);if(a!==o&&(e.setHeadingRowsCount(t,i,a,{shallow:!0}),o=a,l=!0),!n){const n=Mo(e,i,"column",r,o);n!==r&&(e.setHeadingColumnsCount(t,i,n,{shallow:!0}),l=!0)}}return l}function Mo(e,t,o,l,i){const r="row"===o?e.getRows(t):e.getColumns(t);let n=l;for(let e=0;e<r;e++){const l=new w(t,{[o]:e});let r=!0,a=!1;for(const{cell:e,row:t,column:n}of l){if("header"!==e.getAttribute("tableCellType")){r=!1;break}("row"===o?n:t)>=i&&(a=!0)}if(!r)return Math.min(n,e);a&&(n=Math.max(n,e+1))}return Math.min(n,r)}const Ho=/^(top|middle|bottom)$/,jo=/^(left|center|right|justify)$/;class Uo extends e.Plugin{static get pluginName(){return"TableCellPropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[gt,Io]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const l=G(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Lt.addBorderStylesRules),function(e,t){const{conversion:o}=e,{schema:l}=e.model,i={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};l.extend("tableCell",{allowAttributes:Object.values(i)});for(const e of Object.values(i))l.setAttributeProperties(e,{isFormatting:!0});n(e,"td",i,t),n(e,"th",i,t),a(o,{modelElement:"tableCell",modelAttribute:i.style,styleName:"border-style"}),a(o,{modelElement:"tableCell",modelAttribute:i.color,styleName:"border-color"}),a(o,{modelElement:"tableCell",modelAttribute:i.width,styleName:"border-width"})}(e,{color:l.borderColor,style:l.borderStyle,width:l.borderWidth}),e.commands.add("tableCellBorderStyle",new Wo(e,l.borderStyle)),e.commands.add("tableCellBorderColor",new Do(e,l.borderColor)),e.commands.add("tableCellBorderWidth",new No(e,l.borderWidth)),v(t,o,{modelAttribute:"tableCellHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:l.height}),e.commands.add("tableCellHeight",new Eo(e,l.height)),e.data.addStyleProcessorRules(Lt.addPaddingStylesRules),v(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:l.padding}),e.commands.add("tableCellPadding",new Ro(e,l.padding)),e.data.addStyleProcessorRules(Lt.addBackgroundStylesRules),v(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:l.backgroundColor}),e.commands.add("tableCellBackgroundColor",new Lo(e,l.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),e.setAttributeProperties("tableCellHorizontalAlignment",{isFormatting:!0}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":jo}},model:{key:"tableCellHorizontalAlignment",value:(e,t,l)=>{const i=c(o,"left",l),r=e.getStyle("text-align");if(r!==i)return r;t.consumable.consume(e,{styles:"text-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:jo}},model:{key:"tableCellHorizontalAlignment",value:(e,t,l)=>{const i=c(o,"left",l),r=e.getAttribute("align");if(r!==i)return r;t.consumable.consume(e,{attributes:"align"})}}})}(t,o,l.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new Fo(e,l.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),e.setAttributeProperties("tableCellVerticalAlignment",{isFormatting:!0}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":Ho}},model:{key:"tableCellVerticalAlignment",value:(e,t,l)=>{const i=c(o,"middle",l),r=e.getStyle("vertical-align");if(r!==i)return r;t.consumable.consume(e,{styles:"vertical-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:Ho}},model:{key:"tableCellVerticalAlignment",value:(e,t,l)=>{const i=c(o,"middle",l),r=e.getAttribute("valign");if(r!==i)return r;t.consumable.consume(e,{attributes:"valign"})}}})}(t,o,l.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new Bo(e,l.verticalAlignment)),e.config.get("experimentalFlags.tableCellTypeSupport")&&(!function(e){const{model:t,conversion:o,editing:l}=e,{schema:r}=t,n=e.plugins.get(Le);r.extend("tableCell",{allowAttributes:["tableCellType"]}),r.setAttributeProperties("tableCellType",{isFormatting:!0}),r.addAttributeCheck(e=>{const t=Array.from(e).reverse().find(e=>"table"===e.name);if("layout"===t?.getAttribute("tableType"))return!1},"tableCellType"),o.for("upcast").add(e=>{e.on("element:th",(e,t,o)=>{const{writer:l}=o,{modelRange:i}=t,r=i?.start.nodeAfter;r?.is("element","tableCell")&&l.setAttribute("tableCellType","header",r)}),e.on("element:table",(e,t,o)=>{const{writer:l}=o,{modelRange:i}=t,r=i?.start.nodeAfter;if(r?.is("element","table")&&"layout"===r.getAttribute("tableType"))for(const{cell:e}of new w(r))if("header"===e.getAttribute("tableCellType")){l.setAttribute("tableType","content",r);break}},{priority:i.priorities.low-1})}),t.document.registerPostFixer(e=>{const o=t.document.differ.getChanges(),l=new Set;for(const e of o){if("attribute"===e.type&&("headingRows"===e.attributeKey||"headingColumns"===e.attributeKey)){const t=e.range.start.nodeAfter;t?.is("element","table")&&"$graveyard"!==t.root.rootName&&l.add(t)}if("attribute"===e.type&&"tableCellType"===e.attributeKey){const t=e.range.start.nodeAfter;if(t?.is("element","tableCell")&&"$graveyard"!==t.root.rootName){const e=t.findAncestor("table");e&&l.add(e)}}if("insert"===e.type&&e.position.nodeAfter)for(const{item:o}of t.createRangeOn(e.position.nodeAfter))if(o.is("element","tableCell")&&o.getAttribute("tableCellType")&&"$graveyard"!==o.root.rootName){const e=o.findAncestor("table");e&&l.add(e)}}return Oo(n,e,l)}),t.document.on("change:data",()=>{const{differ:e}=t.document,o=new Set;for(const t of e.getChanges())if("attribute"===t.type&&"tableCellType"===t.attributeKey){const e=t.range.start.nodeAfter;e.is("element","tableCell")&&o.add(e)}for(const e of o){const t=l.mapper.toViewElement(e),o="header"===e.getAttribute("tableCellType")?"th":"td";t?.name!==o&&l.reconvertItem(e)}})}(e),e.commands.add("tableCellType",new zo(e)))}}class $o extends e.Plugin{static get pluginName(){return"TableCellProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[Uo,Vo]}}class Ko extends e.Plugin{static get pluginName(){return"TableLayoutUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.ui.componentFactory.add("insertTableLayout",o=>{const l=e.commands.get("insertTableLayout"),i=(0,wt.createDropdown)(o);let r;return i.bind("isEnabled").to(l),i.buttonView.set({icon:ft.IconTableLayout,label:t("Insert table layout"),tooltip:!0}),i.on("change:isOpen",()=>{r||(r=new yt(o),i.panelView.children.add(r),r.delegate("execute").to(i),i.on("execute",()=>{e.execute("insertTableLayout",{rows:r.rows,columns:r.columns}),e.editing.view.focus()}))}),i}),e.ui.componentFactory.add("menuBar:insertTableLayout",o=>{const l=e.commands.get("insertTableLayout"),i=new wt.MenuBarMenuView(o),r=new yt(o);return r.delegate("execute").to(i),i.on("change:isOpen",(e,t,o)=>{o||r.reset()}),r.on("execute",()=>{e.execute("insertTableLayout",{rows:r.rows,columns:r.columns}),e.editing.view.focus()}),i.buttonView.set({label:t("Table layout"),icon:ft.IconTableLayout}),i.panelView.children.add(r),i.bind("isEnabled").to(l),i}),e.ui.componentFactory.add("tableType",()=>{const e=this.editor,t=e.t,o=new wt.DropdownButtonView(e.locale);return o.set({label:t("Table type"),icon:ft.IconTableProperties,tooltip:!0}),Go(e,o)})}afterInit(){const{editor:e}=this,{ui:t,plugins:o}=e;let l;if(o.has("TablePropertiesUIExperimental"))l=o.get("TablePropertiesUIExperimental");else{if(!o.has("TablePropertiesUI"))return;l=o.get("TablePropertiesUI")}t.componentFactory.add("tableProperties",t=>{const o=l._createTablePropertiesButton(),i=new wt.SplitButtonView(t,o);return Go(e,i)})}}function Go(e,t){const o=e.t,l=e.locale,r=e.commands.get("tableType"),n=(0,wt.createDropdown)(l,t),a=function(e){const t=e.t,o=e.commands.get("tableType"),l=new i.Collection;return l.add(qo(o,"layout",t("Layout table"))),l.add(qo(o,"content",t("Content table"))),l}(e);return(0,wt.addListToDropdown)(n,a,{ariaLabel:o("Table type options"),role:"menu"}),t.tooltip=o("Choose table type"),n.on("execute",e=>{const t=e.source.tableType;t&&r.execute(t)}),n}function qo(e,t,o){const l=new wt.UIModel({label:o,role:"menuitemradio",withText:!0,tableType:t});return l.bind("isEnabled").to(e,"isEnabled"),l.bind("isOn").to(e,"value",e=>e===t),{type:"button",model:l}}class Jo extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,l=o===o.root?o:o.parent;return t.checkChild(l,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,l=t.plugins.get("TableUtils");o.change(i=>{const r={rows:e.rows||2,columns:e.columns||2},n=l.createTable(i,r);i.setAttribute("tableType","layout",n),o.insertObject(n,null,null,{findOptimalPosition:"auto"});const a=100/r.columns+"%",s=Array(r.columns).fill(a);t.commands.get("resizeColumnWidths").execute({tableWidth:"100%",columnWidths:s,table:n}),i.setSelection(i.createPositionAt(n.getNodeByPath([0,0,0]),0))})}}function Xo(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function Yo(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Zo(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Qo="[object Arguments]",el="[object Object]";function tl(e,t,o,l,i,r,n){const a=n(e,t,o,l,i,r);if(void 0!==a)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return e===t;case"number":return e===t||Object.is(e,t);case"object":return ol(e,t,r,n)}return ol(e,t,r,n)}function ol(e,t,o,l){if(Object.is(e,t))return!0;let i=Zo(e),r=Zo(t);if(i===Qo&&(i=el),r===Qo&&(r=el),i!==r)return!1;switch(i){case"[object String]":return e.toString()===t.toString();case"[object Number]":{const o=e.valueOf(),l=t.valueOf();return(n=o)===(a=l)||Number.isNaN(n)&&Number.isNaN(a)}case"[object Boolean]":case"[object Date]":case"[object Symbol]":return Object.is(e.valueOf(),t.valueOf());case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Function]":return e===t}var n,a;const s=(o=o??new Map).get(e),c=o.get(t);if(null!=s&&null!=c)return s===t;o.set(e,t),o.set(t,e);try{switch(i){case"[object Map]":if(e.size!==t.size)return!1;for(const[i,r]of e.entries())if(!t.has(i)||!tl(r,t.get(i),i,e,t,o,l))return!1;return!0;case"[object Set]":{if(e.size!==t.size)return!1;const i=Array.from(e.values()),r=Array.from(t.values());for(let n=0;n<i.length;n++){const a=i[n],s=r.findIndex(i=>tl(a,i,void 0,e,t,o,l));if(-1===s)return!1;r.splice(s,1)}return!0}case"[object Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":case"[object BigUint64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object BigInt64Array]":case"[object Float32Array]":case"[object Float64Array]":if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)!==Buffer.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!tl(e[i],t[i],i,e,t,o,l))return!1;return!0;case"[object ArrayBuffer]":return e.byteLength===t.byteLength&&ol(new Uint8Array(e),new Uint8Array(t),o,l);case"[object DataView]":return e.byteLength===t.byteLength&&e.byteOffset===t.byteOffset&&ol(new Uint8Array(e),new Uint8Array(t),o,l);case"[object Error]":return e.name===t.name&&e.message===t.message;case el:{if(!(ol(e.constructor,t.constructor,o,l)||Xo(e)&&Xo(t)))return!1;const i=[...Object.keys(e),...Yo(e)],r=[...Object.keys(t),...Yo(t)];if(i.length!==r.length)return!1;for(let r=0;r<i.length;r++){const n=i[r],a=e[n];if(!Object.hasOwn(t,n))return!1;if(!tl(a,t[n],n,e,t,o,l))return!1}return!0}default:return!1}}finally{o.delete(e),o.delete(t)}}function ll(){}function il(e,t){return function(e,t,o){return tl(e,t,void 0,void 0,void 0,void 0,o)}(e,t,ll)}class rl extends e.Command{refresh(){this.isEnabled=!0}execute(e={}){const{model:t,plugins:o}=this.editor;let{table:l=t.document.selection.getSelectedElement(),columnWidths:i,tableWidth:r}=e;i&&(i=Array.isArray(i)?i:i.split(",")),t.change(e=>{r?e.setAttribute("tableWidth",r,l):e.removeAttribute("tableWidth",l);const t=o.get("TableColumnResizeEditing").getColumnGroupElement(l);if(!i&&!t)return;if(!i)return e.remove(t);const n=xe(i);if(t)Array.from(t.getChildren()).forEach((t,o)=>e.setAttribute("columnWidth",n[o],t));else{const t=e.createElement("tableColumnGroup");n.forEach(o=>e.appendElement("tableColumn",{columnWidth:o},t)),e.append(t,l)}})}}function nl(e){return t=>t.on("element:colgroup",(t,o,l)=>{const i=o.modelCursor.findAncestor("table"),r=Pe(i);if(!r)return;const n=Ie(r),a=e.getColumns(i);let s=Ee(r,l.writer);s=Array.from({length:a},(e,t)=>s[t]||"auto"),(s.length!=n.length||s.includes("auto"))&&Se(n,r,xe(s),l.writer)},{priority:"low"})}function al(){return e=>e.on("insert:table",(e,t,o)=>{const l=o.writer,i=t.item,r=o.mapper.toViewElement(i),n=r.is("element","table")?r:Array.from(r.getChildren()).find(e=>e.is("element","table"));Pe(i)?l.addClass("ck-table-resized",n):l.removeClass("ck-table-resized",n)},{priority:"low"})}const sl=(0,i.toUnit)("px");class cl extends e.Plugin{_isResizingActive;_resizingData;_domEmitter;_tableUtilsPlugin;_initialMouseEventData=null;static get requires(){return[gt,Le]}static get pluginName(){return"TableColumnResizeEditing"}static get licenseFeatureCode(){return"TCR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new((0,i.DomEmitterMixin)()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",(t,o,l)=>{const i=l?"removeClass":"addClass";e.editing.view.change(t=>{for(const o of e.editing.view.document.roots)t[i]("ck-column-resize_disabled",e.editing.view.document.getRoot(o.rootName))})})}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:e=>e.is("element","tableColumnGroup"),positionOffset:0});const o=new rl(e);e.commands.add("resizeTableWidth",o),e.commands.add("resizeColumnWidths",o),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",o,"isEnabled",(e,t,o)=>!e&&t&&o)}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return Pe(e)}getTableColumnElements(e){return Ie(e)}getTableColumnsWidths(e){return Re(e)}_extendSchema(){const e=this.editor.model.schema;e.extend("table",{allowAttributes:["tableWidth"]}),e.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),e.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0}),e.setAttributeProperties("columnWidth",{isFormatting:!0})}_registerPostFixer(){const e=this.editor.model;function t(e,t,o){const l=o._tableUtilsPlugin.getColumns(t);if(0===l-e.length)return e;const i=e.map(e=>Number(e.replace("%",""))),r=function(e,t){const o=new Set;for(const l of e.getChanges())if("insert"==l.type&&l.position.nodeAfter&&"tableCell"==l.position.nodeAfter.name&&l.position.nodeAfter.getAncestors().includes(t))o.add(l.position.nodeAfter);else if("remove"==l.type){const e=l.position.nodeBefore||l.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&o.add(e)}return o}(o.editor.model.document.differ,t);for(const e of r){const r=l-i.length;if(0===r)continue;const n=r>0,a=o._tableUtilsPlugin.getCellLocation(e).column;if(n){const e=Te(r,fe(t,o.editor));i.splice(a,0,...e)}else{const e=i.splice(a,Math.abs(r));i[a]+=Ae(e)}}return i.map(e=>e+"%")}e.document.registerPostFixer(o=>{let l=!1;for(const i of pe(e)){const e=this.getColumnGroupElement(i),r=this.getTableColumnElements(e),n=this.getTableColumnsWidths(e);let a=xe(n);a=t(a,i,this),il(n,a)||(Se(r,e,a,o),l=!0)}return l})}_registerConverters(){const e=this.editor.conversion;e.for("upcast").attributeToAttribute({view:{name:/^(figure|table)$/,styles:{width:/[\s\S]+/}},model:{key:"tableWidth",value:e=>{if(!e.parent.is("element","figure"))return e.getStyle("width")}}}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),e.elementToElement({model:"tableColumnGroup",view:"colgroup"}),e.elementToElement({model:"tableColumn",view:"col"}),e.for("downcast").add(al()),e.for("upcast").add(e=>{e.on("element:table",(e,t,o)=>{o.consumable.consume(t.viewItem,{classes:"ck-table-resized"})})}),e.for("upcast").add(nl(this._tableUtilsPlugin)),e.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:e=>{const t=e.getStyle("width");return t&&(t.endsWith("%")||t.endsWith("pt"))?t:"auto"}}}),e.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),e.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:e=>({key:"style",value:{width:e}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(Bt),e.document.on("mouseover",this._onMouseOverHandler.bind(this),{priority:"high"}),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),e.document.on("mouseout",this._onMouseOutHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(i.global.window.document,"mousemove",function(e,t=0,o={}){"object"!=typeof o&&(o={});const{leading:l=!0,trailing:i=!0}=o;return _o(e,t,{leading:l,trailing:i,maxWait:t})}(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(i.global.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_recalculateResizerElement(e){const t=this.editor,o=t.editing.view.domConverter,l=o.mapViewToDom(e.findAncestor("table")),r=o.mapViewToDom(e.findAncestor(e=>["td","th"].includes(e.name))),n=new i.Rect(l),a=new i.Rect(r),s=sl(Number((n.top-a.top).toFixed(4))),c=sl(Number((a.bottom-n.bottom).toFixed(4)));t.editing.view.change(t=>{t.setStyle("top",s,e),t.setStyle("bottom",c,e)})}_resetResizerStyles(e){this.editor.editing.view.change(t=>{t.removeStyle("top",e),t.removeStyle("bottom",e)})}_onMouseOverHandler(e,t){const o=t.target;o.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&this._recalculateResizerElement(o)}_onMouseOutHandler(e,t){const o=t.target;o.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&(this._isResizingActive||this._resetResizerStyles(o))}_onMouseDownHandler(e,t){const o=t.target;if(!o.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;const l=this.editor,i=l.editing.mapper.toModelElement(o.findAncestor("figure"));l.model.canEditAt(i)&&(t.preventDefault(),e.stop(),this._initialMouseEventData=t)}_startResizingAfterThreshold(){const e=this._initialMouseEventData,{target:t}=e,o=this.editor.editing.mapper.toModelElement(t.findAncestor("figure")),l=t.findAncestor("table"),i=function(e,t,o){const l=Array(t.getColumns(e)),i=new w(e);for(const e of i){const t=o.editing.mapper.toViewElement(e.cell),i=Ve(o.editing.view.domConverter.mapViewToDom(t));(!l[e.column]||i<l[e.column])&&(l[e.column]=Ce(i))}return l}(o,this._tableUtilsPlugin,this.editor);Array.from(l.getChildren()).find(e=>e.is("element","colgroup"))||this.editor.editing.view.change(e=>{!function(e,t,o){const l=e.createContainerElement("colgroup");for(let o=0;o<t.length;o++){const i=e.createEmptyElement("col"),r=`${Ce(t[o]/Ae(t)*100)}%`;e.setStyle("width",r,i),e.insert(e.createPositionAt(l,"end"),i)}e.insert(e.createPositionAt(o,0),l)}(e,i,l)}),this._isResizingActive=!0,this._resizingData=this._getResizingData(e,i),this.editor.editing.view.change(e=>function(e,t,o){const l=o.widths.viewFigureWidth/o.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",o.elements.viewResizer),e.setStyle("width",`${Ce(100*l)}%`,t.findAncestor("figure"))}(e,l,this._resizingData))}_onMouseMoveHandler(e,t){if(this._initialMouseEventData){const e=this._initialMouseEventData.domEvent;if(!(Math.abs(t.clientX-e.clientX)>=ge))return;this._startResizingAfterThreshold(),this._initialMouseEventData=null}if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:o,flags:{isRightEdge:l,isTableCentered:i,isLtrContent:r},elements:{viewFigure:n,viewLeftColumn:a,viewRightColumn:s,viewResizer:c},widths:{viewFigureParentWidth:d,tableWidth:u,leftColumnWidth:b,rightColumnWidth:h}}=this._resizingData,m=-b+he,g=l?d-u:h-he,p=(r?1:-1)*(l&&i?2:1),f=ve((t.clientX-o)*p,Math.min(m,0),Math.max(g,0));0!==f&&(this.editor.editing.view.change(e=>{const t=Ce(100*(b+f)/u);if(e.setStyle("width",`${t}%`,a),l){const t=Ce(100*(u+f)/d);e.setStyle("width",`${t}%`,n)}else{const t=Ce(100*(h-f)/u);e.setStyle("width",`${t}%`,s)}}),this._recalculateResizerElement(c))}_onMouseUpHandler(){if(this._initialMouseEventData=null,!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:o,viewColgroup:l}=this._resizingData.elements,i=this.editor,r=i.editing.view,n=this.getColumnGroupElement(t),a=Array.from(l.getChildren()).filter(e=>e.is("view:element")),s=n?this.getTableColumnsWidths(n):null,c=a.map(e=>e.getStyle("width")),d=!il(s,c),u=t.getAttribute("tableWidth"),b=o.getStyle("width"),h=u!==b;(d||h)&&(this._isResizingAllowed?i.execute("resizeTableWidth",{table:t,tableWidth:`${Ce(b)}%`,columnWidths:c}):r.change(e=>{if(s)for(const t of a)e.setStyle("width",s.shift(),t);else e.remove(l);h&&(u?e.setStyle("width",u,o):e.removeStyle("width",o)),s||u||e.removeClass("ck-table-resized",[...o.getChildren()].find(e=>"table"===e.name))})),r.change(t=>{t.removeClass("ck-table-column-resizer__active",e)});r.domConverter.mapViewToDom(e).matches(":hover")||this._resetResizerStyles(e),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const o=this.editor,l=e.domEvent.clientX,i=e.target,r=i.findAncestor("td")||i.findAncestor("th"),n=o.editing.mapper.toModelElement(r),a=n.findAncestor("table"),s=ye(n,this._tableUtilsPlugin).rightEdge,c=this._tableUtilsPlugin.getColumns(a)-1;let d=a.getAttribute("tableAlignment");"layout"!==a.getAttribute("tableType")&&(d||=o.config.get("table.tableProperties.defaultProperties.alignment"),d||="center");const u=s===c,b="rtl"!==o.locale.contentLanguageDirection,h="center"===d,m=r.findAncestor("table"),g=m.findAncestor("figure"),p=[...m.getChildren()].find(e=>e.is("element","colgroup")),f=p.getChild(s),w=u?void 0:p.getChild(s+1);return{columnPosition:l,flags:{isRightEdge:u,isTableCentered:h,isLtrContent:b},elements:{viewResizer:i,modelTable:a,viewFigure:g,viewColgroup:p,viewLeftColumn:f,viewRightColumn:w},widths:{viewFigureParentWidth:_e(o.editing.view.domConverter.mapViewToDom(g.parent)),viewFigureWidth:_e(o.editing.view.domConverter.mapViewToDom(g)),tableWidth:we(a,o),leftColumnWidth:t[s],rightColumnWidth:u?void 0:t[s+1]}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add(e=>{e.on("insert:tableCell",(e,t,o)=>{const l=t.item,i=o.mapper.toViewElement(l),r=o.writer;r.insert(r.createPositionAt(i,"end"),r.createUIElement("div",{class:"ck-table-column-resizer"}))},{priority:"lowest"})})}}var dl=o(433),ul={attributes:{"data-cke":!0}};ul.setAttributes=dt(),ul.insert=st().bind(null,"head"),ul.domAPI=nt(),ul.insertStyleElement=bt();it()(dl.A,ul);dl.A&&dl.A.locals&&dl.A.locals;class bl extends e.Plugin{static get requires(){return[cl,Io]}static get pluginName(){return"TableColumnResize"}static get isOfficialPlugin(){return!0}}class hl extends e.Command{refresh(){const e=T(this.editor.model.document.selection);e?(this.isEnabled=!0,this.value=e.getAttribute("tableType")):(this.isEnabled=!1,this.value=null)}execute(e){const t=this.editor.model,o=T(t.document.selection);o.getAttribute("tableType")!==e&&t.change(l=>{l.setAttribute("tableType",e,o),t.schema.removeDisallowedAttributes([o],l);const i=o.getChildren();for(const e of i)t.schema.checkChild(o,e)||l.remove(e)})}}var ml=o(49),gl={attributes:{"data-cke":!0}};gl.setAttributes=dt(),gl.insert=st().bind(null,"head"),gl.domAPI=nt(),gl.insertStyleElement=bt();it()(ml.A,gl);ml.A&&ml.A.locals&&ml.A.locals;const pl=["content","layout"];class fl extends e.Plugin{static get pluginName(){return"TableLayoutEditing"}static get licenseFeatureCode(){return"TL"}static get requires(){return[bl]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){this._defineSchema(),this._defineConverters(),this._defineClipboardPasteHandlers(),this._registerTableTypeAttributePostfixer(),this.editor.commands.add("insertTableLayout",new Jo(this.editor)),this.editor.commands.add("tableType",new hl(this.editor))}_defineSchema(){const{schema:e}=this.editor.model;e.extend("table",{allowAttributes:"tableType"}),e.addChildCheck(kl,"caption"),e.addAttributeCheck(kl,"headingRows"),e.addAttributeCheck(kl,"headingColumns")}_defineConverters(){const{editor:e}=this,{conversion:t}=e,o=e.config.get("table.tableLayout.preferredExternalTableType");t.for("upcast").add(function(e,t){return o=>{o.on("element:table",(o,l,i)=>{const r=l.viewItem;if(!i.consumable.test(r,{name:!0}))return;if("content"==wl(r,t))return;const n=i.writer.createElement("table",{tableType:"layout"});if(i.safeInsert(n,l.modelCursor)){i.consumable.consume(r,{name:!0}),i.consumable.consume(r,{attributes:["role"]}),i.consumable.consume(r,{classes:["layout-table"]}),e.config.get("experimentalFlags.upcastTableBorderZeroAttributes")&&"0"===r.getAttribute("border")&&i.consumable.consume(r,{attributes:["border"]});for(const e of r.getChildren())if(e.is("element"))for(const t of e.getChildren())t.is("element","tr")&&i.convertItem(t,i.writer.createPositionAt(n,"end"));if(i.convertChildren(r,i.writer.createPositionAt(n,"end")),n.isEmpty){const e=i.writer.createElement("tableRow");i.writer.insert(e,i.writer.createPositionAt(n,"end")),y(i.writer,i.writer.createPositionAt(e,"end"))}i.updateConversionResult(n,l)}},{priority:"high"}),o.on("element:table",(e,o,l)=>{const{viewItem:i,modelRange:r}=o;r&&(l.writer.setAttribute("tableType",wl(i,t),r),l.consumable.consume(i,{classes:["layout-table"]}),l.consumable.consume(i,{classes:["content-table"]}))},{priority:"low"})}}(e,o)),t.for("dataDowncast").add(e=>e.on("attribute:tableType:table",(e,t,o)=>{const{item:l,attributeNewValue:i}=t,{mapper:r,writer:n}=o;if(!o.consumable.test(l,e.name))return;const a=r.toViewElement(l);n.addClass(`${i}-table`,a),"layout"==i&&n.setAttribute("role","presentation",a),o.consumable.consume(l,e.name)})),t.for("editingDowncast").attributeToAttribute({model:{key:"tableType",values:["layout","content"]},view:{layout:{key:"class",value:["layout-table"]},content:{key:"class",value:["content-table"]}}})}_defineClipboardPasteHandlers(){const{plugins:e}=this.editor;if(!e.has("ClipboardPipeline"))return;const t=e.get("ClipboardPipeline");this.listenTo(t,"contentInsertion",(e,t)=>{t.sourceEditorId||this.editor.model.change(e=>{for(const{item:o}of e.createRangeIn(t.content))o.is("element","table")&&e.setAttribute("tableType","content",o)})})}_registerTableTypeAttributePostfixer(){const e=this.editor;e.model.document.registerPostFixer(t=>{const o=e.model.document.differ.getChanges();let l=!1;for(const i of o){if("insert"==i.type&&"$text"!=i.name){const e=i.position.nodeAfter,o=t.createRangeOn(e);for(const e of o.getItems())e.is("element","table")&&!e.hasAttribute("tableType")&&(t.setAttribute("tableType","content",e),l=!0)}if("attribute"==i.type&&"tableType"==i.attributeKey)for(const o of i.range.getItems())if(o.is("element","table")){e.model.schema.removeDisallowedAttributes([o],t);const i=o.getChildren();for(const r of i)e.model.schema.checkChild(o,r)||(t.remove(r),l=!0)}}return l})}}function wl(e,t){if(e.hasClass("content-table"))return"content";if(e.hasClass("layout-table"))return"layout";if(t&&pl.includes(t))return t;return e.parent.is("element","figure")||Array.from(e.getChildren()).some(e=>e.is("element","caption"))?"content":"layout"}function kl(e){if(e.endsWith("table")&&"layout"==e.last.getAttribute("tableType"))return!1}class _l extends e.Plugin{static get pluginName(){return"TableLayout"}static get isOfficialPlugin(){return!0}static get requires(){return[bl,fl,Ko]}}class yl extends e.Command{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,t,o){super(e),this.attributeName=t,this._defaultContentTableValue=o,this._defaultLayoutTableValue="tableBorderStyle"===t?"none":void 0}refresh(){const e=T(this.editor.model.document.selection);this._defaultValue=e&&"layout"===e.getAttribute("tableType")?this._defaultLayoutTableValue:this._defaultContentTableValue,this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:l,batch:i}=e,r=T(o),n=this._getValueToSet(l);t.enqueueChange(i,e=>{n?e.setAttribute(this.attributeName,n,r):e.removeAttribute(this.attributeName,r)})}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class Cl extends yl{constructor(e,t){super(e,"tableBackgroundColor",t)}}class vl extends yl{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Tl extends yl{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Al extends yl{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=j(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=U(e,"px");if(t!==this._defaultValue)return t}}class xl extends yl{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=U(e,"px"))!==this._defaultValue)return e}}class Vl extends yl{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=U(e,"px"))!==this._defaultValue)return e}}class Sl extends yl{constructor(e,t){super(e,"tableAlignment",t)}}class Pl extends e.Plugin{static get pluginName(){return"TablePropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[gt]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const l=K(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),a=!1!==e.config.get("table.tableProperties.alignment.useInlineStyles");if(e.data.addStyleProcessorRules(Lt.addMarginStylesRules),e.data.addStyleProcessorRules(Lt.addBorderStylesRules),function(e,t){const{conversion:o}=e,{schema:l}=e.model,i={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};l.extend("table",{allowAttributes:Object.values(i)});for(const e of Object.values(i))l.setAttributeProperties(e,{isFormatting:!0});n(e,"table",i,t),s(o,{modelAttribute:i.color,styleName:"border-color"}),s(o,{modelAttribute:i.style,styleName:"border-style"}),s(o,{modelAttribute:i.width,styleName:"border-width"})}(e,{color:l.borderColor,style:l.borderStyle,width:l.borderWidth}),e.commands.add("tableBorderColor",new vl(e,l.borderColor)),e.commands.add("tableBorderStyle",new Tl(e,l.borderStyle)),e.commands.add("tableBorderWidth",new Al(e,l.borderWidth)),e.config.get("experimentalFlags.useExtendedTableBlockAlignment")?function(e,t,o,l){e.extend("table",{allowAttributes:["tableAlignment"]}),e.setAttributeProperties("tableAlignment",{isFormatting:!0}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment",values:["left","center","right","blockLeft","blockRight"]},view:{left:l?{key:"style",value:{float:"left","margin-right":"var(--ck-content-table-style-spacing, 1.5em)"}}:{key:"class",value:u.className},right:l?{key:"style",value:{float:"right","margin-left":"var(--ck-content-table-style-spacing, 1.5em)"}}:{key:"class",value:h.className},center:l?{key:"style",value:{"margin-left":"auto","margin-right":"auto"}}:{key:"class",value:b.className},blockLeft:l?{key:"style",value:{"margin-left":"0","margin-right":"auto"}}:{key:"class",value:m.className},blockRight:l?{key:"style",value:{"margin-left":"auto","margin-right":"0"}}:{key:"class",value:g.className}},converterPriority:"high"}),p.forEach(e=>{t.for("upcast").attributeToAttribute({view:e.view,model:{key:"tableAlignment",value:(t,l,i)=>{if(function(e){return"figure"==e.name&&!e.hasClass("table")}(t))return;const r=c(o,"",i),n=e.getAlign(t),a=e.getConsumables(t);return l.consumable.consume(t,a),n!==r?n:void 0}}})}),t.for("upcast").add(function(e){return t=>{t.on("element:div",(t,o,l)=>{if(!l.consumable.test(o.viewItem,{name:!0,attributes:"align"}))return;const r=N(o.viewItem);if(!r||!l.consumable.test(r,{name:!0}))return;l.consumable.consume(o.viewItem,{name:!0,attributes:"align"});const n=l.convertItem(r,o.modelCursor),a=(0,i.first)(n.modelRange.getItems());if(!a||!a.is("element","table"))return l.consumable.revert(o.viewItem,{name:!0,attributes:"align"}),void(n.modelRange&&!n.modelRange.isCollapsed&&(o.modelRange=n.modelRange,o.modelCursor=n.modelCursor));const s=function(e,t,o){if(e)switch(e){case"right":return"right"===t?"right":"left"===t?"left":"blockRight";case"center":return"center";case"left":return void 0===t?"blockLeft":"left";default:return o}return}(o.viewItem.getAttribute("align"),r.getAttribute("align"),c(e,"",o));s&&l.writer.setAttribute("tableAlignment",s,a),l.convertChildren(o.viewItem,l.writer.createPositionAt(a,"end")),l.updateConversionResult(a,o)})}}(o))}(t,o,l.alignment,a):function(e,t,o){const l=/^(left|center|right)$/,i=/^(left|none|right)$/;e.extend("table",{allowAttributes:["tableAlignment"]}),e.setAttributeProperties("tableAlignment",{isFormatting:!0}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment",values:["left","center","right"]},view:{left:{key:"style",value:{float:"left"}},right:{key:"style",value:{float:"right"}},center:(e,t,o)=>({key:"style",value:"layout"!==o.item.getAttribute("tableType")?{float:"none"}:{"margin-left":"auto","margin-right":"auto"}})},converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:i}},model:{key:"tableAlignment",value:(e,t,l)=>{if("figure"==e.name&&!e.hasClass("table"))return;const i=c(o,"",l);let r=e.getStyle("float");if("none"===r&&(r="center"),r!==i)return r;t.consumable.consume(e,{styles:"float"})}}}).attributeToAttribute({view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"auto"}},model:{key:"tableAlignment",value:(e,t,l)=>{if("figure"==e.name&&!e.hasClass("table"))return;const i="center";if(i!==c(o,"",l))return i;t.consumable.consume(e,{styles:["margin-left","margin-right"]})}}}).attributeToAttribute({view:{name:"table",attributes:{align:l}},model:{key:"tableAlignment",value:(e,t,l)=>{const i=c(o,"",l),r=e.getAttribute("align");if(r!==i)return r;t.consumable.consume(e,{attributes:"align"})}}})}(t,o,l.alignment),e.commands.add("tableAlignment",new Sl(e,l.alignment)),El(t,o,{modelAttribute:"tableWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:l.width}),e.commands.add("tableWidth",new xl(e,l.width)),El(t,o,{modelAttribute:"tableHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:l.height}),e.commands.add("tableHeight",new Vl(e,l.height)),e.data.addStyleProcessorRules(Lt.addBackgroundStylesRules),function(e,t,o){const{modelAttribute:l}=o;e.extend("table",{allowAttributes:[l]}),e.setAttributeProperties(l,{isFormatting:!0}),r(t,{viewElement:"table",...o}),s(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:l.backgroundColor}),e.commands.add("tableBackgroundColor",new Cl(e,l.backgroundColor)),e.config.get("experimentalFlags.useExtendedTableBlockAlignment")){const t=e.editing.view.document;this.listenTo(t,"clipboardOutput",(t,o)=>{e.editing.view.change(e=>{for(const{item:t}of e.createRangeIn(o.content))Il(t,e);o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content))})},{priority:"lowest"})}}}function Il(e,t){if(!e.is("element","table"))return;const o=e.getAttribute("align"),l=e.getStyle("float"),i=e.getStyle("margin-left"),r=e.getStyle("margin-right");o&&"center"===o||l&&"right"===l&&o&&"right"===o?Rl(t,o,e):void 0===l&&"auto"===i&&"0"===r&&Rl(t,"right",e)}function Rl(e,t,o){const l=e.createPositionBefore(o),i=e.createContainerElement("div",{align:t},o);e.insert(l,i)}function El(e,t,o){const{modelAttribute:l}=o;e.extend("table",{allowAttributes:[l]}),e.setAttributeProperties(l,{isFormatting:!0}),r(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name||"figure"==e.name&&!e.hasClass("table")),...o}),a(t,{modelElement:"table",...o})}var Ll=o(664),Bl={attributes:{"data-cke":!0}};Bl.setAttributes=dt(),Bl.insert=st().bind(null,"head"),Bl.domAPI=nt(),Bl.insertStyleElement=bt();it()(Ll.A,Bl);Ll.A&&Ll.A.locals&&Ll.A.locals;class Fl extends wt.View{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;widthInput;heightInput;alignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:l,borderColorInput:r,borderRowLabel:n}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:s}=this._createBackgroundFields(),{widthInput:c,operatorLabel:d,heightInput:u,dimensionsLabel:b}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new i.FocusTracker,this.keystrokes=new i.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=l,this.borderColorInput=r,this.backgroundInput=s,this.widthInput=c,this.heightInput=u,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=p,this._focusables=new wt.ViewCollection,this._focusCycler=new wt.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new wt.FormHeaderView(e,{label:this.t("Table properties")})),this.children.add(new wt.FormRowView(e,{labelView:n,children:[n,o,r,l],class:"ck-table-form__border-row"})),this.children.add(new wt.FormRowView(e,{labelView:a,children:[a,s],class:"ck-table-form__background-row"})),this.children.add(new wt.FormRowView(e,{children:[new wt.FormRowView(e,{labelView:b,children:[b,c,d,u],class:"ck-table-form__dimensions-row"}),new wt.FormRowView(e,{labelView:m,children:[m,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new wt.FormRowView(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,wt.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=no({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),l=this.locale,i=this.t,r=i("Style"),n=new wt.LabelView(l);n.text=i("Border");const a=Yt(i),s=new wt.LabeledFieldView(l,wt.createLabeledDropdown);s.set({label:r,class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>a[e||"none"]),s.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),s.bind("isEmpty").to(this,"borderStyle",e=>!e),(0,wt.addListToDropdown)(s.fieldView,lo(this,t.style),{role:"menu",ariaLabel:r});const c=new wt.LabeledFieldView(l,wt.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Wl),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const d=new wt.LabeledFieldView(l,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Wl),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(e,o,l,i)=>{Wl(l)||(this.borderColor="",this.borderWidth=""),Wl(i)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:n,borderStyleDropdown:s,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Background");const l=no({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new wt.LabeledFieldView(e,l);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",()=>{this.backgroundColor=i.fieldView.value}),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Dimensions");const l=new wt.LabeledFieldView(e,wt.createLabeledInputText);l.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),l.fieldView.bind("value").to(this,"width"),l.fieldView.on("input",()=>{this.width=l.fieldView.element.value});const i=new wt.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new wt.LabeledFieldView(e,wt.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",()=>{this.height=r.fieldView.element.value}),{dimensionsLabel:o,widthInput:l,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Alignment");const l=new wt.ToolbarView(e);return l.set({role:"radiogroup",isCompact:!0,ariaLabel:t("Table alignment toolbar")}),io({view:this,icons:{left:ft.IconObjectInlineLeft,center:ft.IconObjectCenter,right:ft.IconObjectInlineRight},toolbar:l,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:l}}_createActionButtons(){const e=this.locale,t=this.t,o=new wt.ButtonView(e),l=new wt.ButtonView(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return o.set({label:t("Save"),icon:ft.IconCheck,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(i,"errorText",(...e)=>e.every(e=>!e)),l.set({label:t("Cancel"),icon:ft.IconCancel,class:"ck-button-cancel",withText:!0}),l.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:l}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),l=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:l,left:o}:{left:o,center:l,right:i}}}function Wl(e){return"none"!==e}const Dl={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Nl extends e.Plugin{_defaultContentTableProperties;_defaultLayoutTableProperties;_balloon;view=null;_viewWithContentTableDefaults=null;_viewWithLayoutTableDefaults=null;_undoStepBatch;_isReady;static get requires(){return[wt.ContextualBalloon]}static get pluginName(){return"TablePropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:ro,backgroundColors:ro})}init(){const e=this.editor;this._defaultContentTableProperties=K(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._defaultLayoutTableProperties=$(),this._balloon=e.plugins.get(wt.ContextualBalloon),e.ui.componentFactory.add("tableProperties",()=>this._createTablePropertiesButton())}_createTablePropertiesButton(){const e=this.editor,t=e.t,o=new wt.ButtonView(e.locale);o.set({label:t("Table properties"),icon:ft.IconTableProperties,tooltip:!0}),this.listenTo(o,"execute",()=>this._showView());const l=Object.values(Dl).map(t=>e.commands.get(t));return o.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(e=>e)),o}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,o=t.config.get("table.tableProperties"),l=(0,wt.normalizeColorOptions)(o.borderColors),i=(0,wt.getLocalizedColorOptions)(t.locale,l),r=(0,wt.normalizeColorOptions)(o.backgroundColors),n=(0,wt.getLocalizedColorOptions)(t.locale,r),a=!1!==o.colorPicker,s=new Fl(t.locale,{borderColors:i,backgroundColors:n,defaultTableProperties:e,colorPickerConfig:!!a&&(o.colorPicker||{})}),c=t.t;s.render(),this.listenTo(s,"submit",()=>{this._hideView()}),this.listenTo(s,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()}),s.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),(0,wt.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=Zt(c),u=Qt(c);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:d,validator:eo})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:u,validator:oo})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:d,validator:eo})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:u,validator:to})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:u,validator:to})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(Dl).map(([t,o])=>{const l=t,i=this.view===this._viewWithContentTableDefaults?this._defaultContentTableProperties[l]||"":this._defaultLayoutTableProperties[l]||"";return[l,e.get(o).value||i]}).forEach(([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}),this._isReady=!0}_showView(){const e=this.editor,t=Mt(e.editing.view.document.selection),o=t&&e.editing.mapper.toModelElement(t),l=!o||"layout"!==o.getAttribute("tableType");l&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableProperties):l||this._viewWithLayoutTableDefaults||(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableProperties)),this.view=l?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:vo(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Mt(e.editing.view.document.selection)?this._isViewVisible&&Co(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,l)=>{this._isReady&&this.editor.execute(e,{value:l,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:l,errorText:i}=e,r=_o(()=>{o.errorText=i},500);return(e,i,n)=>{r.cancel(),this._isReady&&(l(n)?(this.editor.execute(t,{value:n,batch:this._undoStepBatch}),o.errorText=null):r())}}}class zl extends e.Plugin{static get pluginName(){return"TableProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[Pl,Nl]}}function Ol(e){e.document.registerPostFixer(t=>function(e,t){const o=t.document.differ.getChanges();let l=!1;for(const t of o){if("insert"!=t.type)continue;const o=t.position.parent;if(o.is("element","table")||"table"==t.name){const i="table"==t.name?t.position.nodeAfter:o,r=Array.from(i.getChildren()).filter(e=>e.is("element","caption")),n=r.shift();if(!n)continue;for(const t of r)e.move(e.createRangeIn(t),n,"end"),e.remove(t);n.nextSibling&&(e.move(e.createRangeOn(n),i,"end"),l=!0),l=!!r.length||l}}return l}(t,e))}function Ml(e){return!!e&&e.is("element","table")}function Hl(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function jl(e){const t=T(e);return t?Hl(t):null}function Ul(e){const t=e.parent;return"figcaption"==e.name&&t&&t.is("element","figure")&&t.hasClass("table")||"caption"==e.name&&t&&t.is("element","table")?{name:!0}:null}class $l extends e.Command{refresh(){const e=this.editor,t=T(e.model.document.selection);this.isEnabled=!!t&&e.model.schema.checkChild(t,"caption"),this.isEnabled?this.value=!!Hl(t):this.value=!1}execute({focusCaptionOnShow:e=!1}={}){this.editor.model.change(t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)})}_showTableCaption(e,t){const o=this.editor.model,l=T(o.document.selection),i=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(l)||e.createElement("caption");o.insertContent(i,l,"end"),t&&e.setSelection(i,"in")}_hideTableCaption(e){const t=this.editor.model,o=T(t.document.selection),l=this.editor.plugins.get("TableCaptionEditing"),i=Hl(o);l._saveCaption(o,i),t.deleteContent(e.createSelection(i,"on"))}}class Kl extends e.Plugin{_savedCaptionsMap=new WeakMap;_captionIdsMapping=new WeakMap;static get pluginName(){return"TableCaptionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,o=e.model.schema,l=e.editing.view,r=e.t,n=e.config.get("table.tableCaption.useCaptionElement");if(o.isRegistered("caption")?o.extend("caption",{allowIn:"table"}):o.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new $l(this.editor)),n){e.plugins.get("TableEditing").registerAdditionalSlot({filter:e=>e.is("element","caption"),positionOffset:"end"})}e.conversion.for("upcast").elementToElement({view:Ul,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>Ml(e.parent)?t.createContainerElement(n?"caption":"figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!Ml(e.parent))return null;const i=o.createEditableElement(n?"caption":"figcaption");return o.setCustomProperty("tableCaption",!0,i),i.placeholder=r("Enter table caption"),(0,Lt.enableViewPlaceholder)({view:l,element:i,keepOnFocus:!0}),(0,t.toWidgetEditable)(i,o)}}),e.conversion.for("editingDowncast").add(e=>{e.on("insert:table",(e,t,{writer:o,mapper:l})=>{const r=t.item,n=l.toViewElement(r);if(!n)return;const a=Array.from(n.getChildren()).find(e=>e.is("element","table"));if(!a)return;const s=Hl(r);if(!s)return void o.removeAttribute("aria-labelledby",a);const c=l.toViewElement(s);if(!c)return;let d;d=c.hasAttribute("id")?c.getAttribute("id"):this._captionIdsMapping.get(s)??`ck-editor__caption_${(0,i.uid)()}`,this._captionIdsMapping.set(s,d),o.setAttribute("id",d,c),o.setAttribute("aria-labelledby",d,a)},{priority:"low"})}),Ol(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Lt.ModelElement.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class Gl extends e.Plugin{static get pluginName(){return"TableCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,o=e.t;e.ui.componentFactory.add("toggleTableCaption",l=>{const i=e.commands.get("toggleTableCaption"),r=new wt.ButtonView(l);return r.set({icon:ft.IconCaption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(i,"value","isEnabled"),r.bind("label").to(i,"value",e=>o(e?"Toggle caption off":"Toggle caption on")),this.listenTo(r,"execute",()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),i.value){const o=jl(e.model.document.selection),l=e.editing.mapper.toViewElement(o);if(!l)return;t.scrollToTheSelection(),t.change(e=>{e.addClass("table__caption_highlighted",l)})}e.editing.view.focus()}),r})}}var ql=o(965),Jl={attributes:{"data-cke":!0}};Jl.setAttributes=dt(),Jl.insert=st().bind(null,"head"),Jl.domAPI=nt(),Jl.insertStyleElement=bt();it()(ql.A,Jl);ql.A&&ql.A.locals&&ql.A.locals;class Xl extends e.Plugin{static get pluginName(){return"TableCaption"}static get isOfficialPlugin(){return!0}static get requires(){return[Kl,Gl]}}function Yl(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function Zl(e,t){const o=new i.Collection,l=Yl(e.t);for(const i in l){const r={type:"button",model:new wt.UIModel({_borderStyleValue:i,label:l[i],role:"menuitemradio",withText:!0})};"none"===i?r.model.bind("isOn").to(e,"borderStyle",e=>"none"===t?!e:e===i):r.model.bind("isOn").to(e,"borderStyle",e=>e===i),o.add(r)}return o}function Ql(e){const{view:t,icons:o,toolbar:l,labels:i,propertyName:r,nameToValue:n,defaultValue:a}=e;for(const e in i){const s=new wt.ButtonView(t.locale);s.set({role:"radio",isToggleable:!0,label:i[e],icon:o[e],tooltip:i[e]});const c=n?n(e):e;s.bind("isOn").to(t,r,e=>{let t=e;return""===e&&a&&(t=a),c===t}),s.on("execute",()=>{!a&&c&&t[r]===c?t[r]=void 0:t[r]=c}),l.items.add(s)}}function ei(e){return(t,o,l)=>{const i=new qt(t.locale,{colorDefinitions:(r=e.colorConfig,r.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var r;return i.inputView.set({id:o,ariaDescribedById:l}),i.bind("isReadOnly").to(t,"isEnabled",e=>!e),i.bind("hasError").to(t,"errorText",e=>!!e),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused").to(i),i}}var ti=o(562),oi={attributes:{"data-cke":!0}};oi.setAttributes=dt(),oi.insert=st().bind(null,"head"),oi.domAPI=nt(),oi.insertStyleElement=bt();it()(ti.A,oi);ti.A&&ti.A.locals&&ti.A.locals;var li=o(794),ii={attributes:{"data-cke":!0}};ii.setAttributes=dt(),ii.insert=st().bind(null,"head"),ii.domAPI=nt(),ii.insertStyleElement=bt();it()(li.A,ii);li.A&&li.A.locals&&li.A.locals;var ri=o(993),ni={attributes:{"data-cke":!0}};ni.setAttributes=dt(),ni.insert=st().bind(null,"head"),ni.domAPI=nt(),ni.insertStyleElement=bt();it()(ri.A,ni);ri.A&&ri.A.locals&&ri.A.locals;class ai extends wt.View{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;widthInput;heightInput;alignmentToolbar;saveButtonView;cancelButtonView;backButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:l,borderColorInput:r,borderRowLabel:n}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:s}=this._createBackgroundFields(),{widthInput:c,operatorLabel:d,heightInput:u,dimensionsLabel:b}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new i.FocusTracker,this.keystrokes=new i.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=l,this.borderColorInput=r,this.backgroundInput=s,this.widthInput=c,this.heightInput=u,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=p,this.backButtonView=this._createBackButton(),this._focusables=new wt.ViewCollection,this._focusCycler=new wt.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const f=new wt.FormHeaderView(e,{label:this.t("Table properties")});f.children.add(this.backButtonView,0),this.children.add(f),this.children.add(new wt.FormRowView(e,{labelView:n,children:[n,o,l,r],class:"ck-table-form__border-row"})),this.children.add(new wt.FormRowView(e,{children:[new wt.FormRowView(e,{labelView:b,children:[b,c,d,u],class:"ck-table-form__dimensions-row"}),new wt.FormRowView(e,{labelView:a,children:[a,s],class:"ck-table-form__background-row"})]})),this.children.add(new wt.FormRowView(e,{labelView:m,children:[m,h],class:"ck-table-properties-form__alignment-row"})),this.children.add(new wt.FormRowView(e,{children:[this.cancelButtonView,this.saveButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form","ck-table-properties-form_experimental"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,wt.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderWidthInput,this.borderColorInput,this.widthInput,this.heightInput,this.backgroundInput,this.alignmentToolbar,this.cancelButtonView,this.saveButtonView,this.backButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=ei({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),l=this.locale,i=this.t,r=i("Style"),n=new wt.LabelView(l);n.text=i("Border");const a=Yl(i),s=new wt.LabeledFieldView(l,wt.createLabeledDropdown);s.set({label:r,class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>a[e||"none"]),s.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),s.bind("isEmpty").to(this,"borderStyle",e=>!e),(0,wt.addListToDropdown)(s.fieldView,Zl(this,t.style),{role:"menu",ariaLabel:r});const c=new wt.LabeledFieldView(l,wt.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",si),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const d=new wt.LabeledFieldView(l,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",si),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(e,o,l,i)=>{si(l)||(this.borderColor="",this.borderWidth=""),si(i)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:n,borderStyleDropdown:s,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Background");const l=ei({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new wt.LabeledFieldView(e,l);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",()=>{this.backgroundColor=i.fieldView.value}),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Dimensions");const l=new wt.LabeledFieldView(e,wt.createLabeledInputText);l.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),l.fieldView.bind("value").to(this,"width"),l.fieldView.on("input",()=>{this.width=l.fieldView.element.value});const i=new wt.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new wt.LabeledFieldView(e,wt.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",()=>{this.height=r.fieldView.element.value}),{dimensionsLabel:o,widthInput:l,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Table Alignment");const l=new wt.ToolbarView(e);return l.set({role:"radiogroup",isCompact:!0,ariaLabel:t("Table alignment toolbar")}),Ql({view:this,icons:{left:ft.IconObjectInlineLeft,center:ft.IconObjectCenter,right:ft.IconObjectInlineRight,blockLeft:ft.IconObjectLeft,blockRight:ft.IconObjectRight},toolbar:l,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:l}}_createActionButtons(){const e=this.locale,t=this.t,o=new wt.ButtonView(e),l=new wt.ButtonView(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return o.set({label:t("Save"),class:"ck-button-action",type:"submit",withText:!0}),o.bind("isEnabled").toMany(i,"errorText",(...e)=>e.every(e=>!e)),l.set({label:t("Cancel"),withText:!0}),l.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:l}}_createBackButton(){const e=this.locale.t,t=new wt.ButtonView(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:ft.IconPreviousArrow,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left with no text wrapping"),l=t("Align table to the right with no text wrapping"),i=t("Align table to the left with text wrapping"),r=t("Center table with no text wrapping"),n=t("Align table to the right with text wrapping");return"rtl"===e.uiLanguageDirection?{right:n,left:i,blockRight:l,center:r,blockLeft:o}:{blockLeft:o,center:r,blockRight:l,left:i,right:n}}}function si(e){return"none"!==e}const ci={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class di extends e.Plugin{_defaultContentTableProperties;_defaultLayoutTableProperties;_balloon;view=null;_viewWithContentTableDefaults=null;_viewWithLayoutTableDefaults=null;_undoStepBatch;_isReady;static get requires(){return[wt.ContextualBalloon]}static get pluginName(){return"TablePropertiesUIExperimental"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:ro,backgroundColors:ro})}init(){const e=this.editor;this._defaultContentTableProperties=K(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._defaultLayoutTableProperties=$(),this._balloon=e.plugins.get(wt.ContextualBalloon),e.ui.componentFactory.add("tableProperties",()=>this._createTablePropertiesButton())}_createTablePropertiesButton(){const e=this.editor,t=e.t,o=new wt.ButtonView(e.locale);o.set({label:t("Table properties"),icon:ft.IconTableProperties,tooltip:!0}),this.listenTo(o,"execute",()=>this._showView());const l=Object.values(ci).map(t=>e.commands.get(t));return o.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(e=>e)),o}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,o=t.config.get("table.tableProperties"),l=(0,wt.normalizeColorOptions)(o.borderColors),i=(0,wt.getLocalizedColorOptions)(t.locale,l),r=(0,wt.normalizeColorOptions)(o.backgroundColors),n=(0,wt.getLocalizedColorOptions)(t.locale,r),a=!1!==o.colorPicker,s=new ai(t.locale,{borderColors:i,backgroundColors:n,defaultTableProperties:e,colorPickerConfig:!!a&&(o.colorPicker||{})}),c=t.t;s.render(),this.listenTo(s,"submit",()=>{this._hideView()}),this.listenTo(s,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()}),s.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),(0,wt.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=Zt(c),u=Qt(c);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:d,validator:eo})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:u,validator:oo})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:d,validator:eo})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:u,validator:to})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:u,validator:to})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(ci).map(([t,o])=>{const l=t,i=this.view===this._viewWithContentTableDefaults?this._defaultContentTableProperties[l]||"":this._defaultLayoutTableProperties[l]||"";return[l,e.get(o).value||i]}).forEach(([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}),this._isReady=!0}_showView(){const e=this.editor,t=Mt(e.editing.view.document.selection),o=t&&e.editing.mapper.toModelElement(t),l=!o||"layout"!==o.getAttribute("tableType");l&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableProperties):l||this._viewWithLayoutTableDefaults||(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableProperties)),this.view=l?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:vo(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Mt(e.editing.view.document.selection)?this._isViewVisible&&Co(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,l)=>{this._isReady&&this.editor.execute(e,{value:l,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:l,errorText:i}=e,r=_o(()=>{o.errorText=i},500);return(e,i,n)=>{r.cancel(),this._isReady&&(l(n)?(this.editor.execute(t,{value:n,batch:this._undoStepBatch}),o.errorText=null):r())}}}var ui=o(85),bi={attributes:{"data-cke":!0}};bi.setAttributes=dt(),bi.insert=st().bind(null,"head"),bi.domAPI=nt(),bi.insertStyleElement=bt();it()(ui.A,bi);ui.A&&ui.A.locals&&ui.A.locals;class hi extends wt.View{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;cellTypeDropdown;paddingInput;widthInput;heightInput;horizontalAlignmentToolbar;verticalAlignmentToolbar;saveButtonView;cancelButtonView;backButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:"",cellType:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:l,borderColorInput:r,borderRowLabel:n}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:s}=this._createBackgroundFields(),{cellTypeRowLabel:c,cellTypeDropdown:d}=this._createCellTypeField(),{widthInput:u,operatorLabel:b,heightInput:h,dimensionsLabel:m}=this._createDimensionFields(),{horizontalAlignmentToolbar:g,verticalAlignmentToolbar:p,alignmentLabel:f}=this._createAlignmentFields();this.focusTracker=new i.FocusTracker,this.keystrokes=new i.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=l,this.borderColorInput=r,this.backgroundInput=s,this.cellTypeDropdown=d,this.paddingInput=this._createPaddingField(),this.widthInput=u,this.heightInput=h,this.horizontalAlignmentToolbar=g,this.verticalAlignmentToolbar=p;const{saveButtonView:w,cancelButtonView:k}=this._createActionButtons();this.saveButtonView=w,this.cancelButtonView=k,this.backButtonView=this._createBackButton(),this._focusables=new wt.ViewCollection,this._focusCycler=new wt.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const _=new wt.FormHeaderView(e,{label:this.t("Cell properties")});_.children.add(this.backButtonView,0),this.children.add(_),this.children.add(new wt.FormRowView(e,{labelView:n,children:this.options.isTableCellTypeSupported?[n,o,l,r]:[n,o,r,l],class:"ck-table-form__border-row"+(this.options.isTableCellTypeSupported?" ck-table-form__border-row_experimental":"")})),this.children.add(new wt.FormRowView(e,{children:this.options.isTableCellTypeSupported?[new wt.FormRowView(e,{labelView:c,children:[c,d],class:"ck-table-form__cell-type-row"}),new wt.FormRowView(e,{labelView:a,children:[a,s],class:"ck-table-form__background-row"})]:[new wt.FormRowView(e,{labelView:a,children:[a,s],class:"ck-table-form__background-row"})]})),this.children.add(new wt.FormRowView(e,{children:[new wt.FormRowView(e,{labelView:m,children:[m,u,b,h],class:"ck-table-form__dimensions-row"}),new wt.FormRowView(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new wt.FormRowView(e,{labelView:f,children:[f,g,p],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new wt.FormRowView(e,{children:[this.cancelButtonView,this.saveButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form","ck-table-cell-properties-form_experimental",this.options.isTableCellTypeSupported?"ck-table-cell-properties-form_experimental-no-cell-type":""],tabindex:"-1"},children:this.children})}render(){super.render(),(0,wt.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.cellTypeDropdown,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.cancelButtonView,this.saveButtonView,this.backButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=ei({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),l=this.locale,i=this.t,r=i("Style"),n=new wt.LabelView(l);n.text=i("Border");const a=Yl(i),s=new wt.LabeledFieldView(l,wt.createLabeledDropdown);s.set({label:r,class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",e=>a[e||"none"]),s.fieldView.on("execute",e=>{this.borderStyle=e.source._borderStyleValue}),s.bind("isEmpty").to(this,"borderStyle",e=>!e),(0,wt.addListToDropdown)(s.fieldView,Zl(this,t.style),{role:"menu",ariaLabel:r});const c=new wt.LabeledFieldView(l,wt.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",mi),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const d=new wt.LabeledFieldView(l,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",mi),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(e,o,l,i)=>{mi(l)||(this.borderColor="",this.borderWidth=""),mi(i)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:n,borderStyleDropdown:s,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Background");const l=ei({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new wt.LabeledFieldView(e,l);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",()=>{this.backgroundColor=i.fieldView.value}),{backgroundRowLabel:o,backgroundInput:i}}_createCellTypeField(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Cell type");const l=this._cellTypeLabels,i=new wt.LabeledFieldView(e,wt.createLabeledDropdown);return i.set({label:t("Cell type"),class:"ck-table-cell-properties-form__cell-type"}),i.fieldView.buttonView.set({ariaLabel:t("Cell type"),ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:t("Cell type")}),i.fieldView.buttonView.bind("label").to(this,"cellType",e=>l[e||"data"]),i.fieldView.on("execute",e=>{this.cellType=e.source._cellTypeValue}),i.bind("isEmpty").to(this,"cellType",e=>!e),(0,wt.addListToDropdown)(i.fieldView,this._getCellTypeDefinitions(),{role:"menu",ariaLabel:t("Cell type")}),{cellTypeRowLabel:o,cellTypeDropdown:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e);o.text=t("Dimensions");const l=new wt.LabeledFieldView(e,wt.createLabeledInputText);l.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),l.fieldView.bind("value").to(this,"width"),l.fieldView.on("input",()=>{this.width=l.fieldView.element.value});const i=new wt.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new wt.LabeledFieldView(e,wt.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",()=>{this.height=r.fieldView.element.value}),{dimensionsLabel:o,widthInput:l,operatorLabel:i,heightInput:r}}_createPaddingField(){const e=this.locale,t=this.t,o=new wt.LabeledFieldView(e,wt.createLabeledInputText);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",()=>{this.padding=o.fieldView.element.value}),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new wt.LabelView(e),l={left:ft.IconAlignLeft,center:ft.IconAlignCenter,right:ft.IconAlignRight,justify:ft.IconAlignJustify,top:ft.IconAlignTop,middle:ft.IconAlignMiddle,bottom:ft.IconAlignBottom};o.text=t("Table cell text alignment");const i=new wt.ToolbarView(e),r="rtl"===e.contentLanguageDirection;i.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Horizontal text alignment toolbar"),class:"ck-table-cell-properties-form__horizontal-alignment-toolbar"}),Ql({view:this,icons:l,toolbar:i,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(r){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const n=new wt.ToolbarView(e);return n.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Vertical text alignment toolbar"),class:"ck-table-cell-properties-form__vertical-alignment-toolbar"}),Ql({view:this,icons:l,toolbar:n,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:i,verticalAlignmentToolbar:n,alignmentLabel:o}}_createActionButtons(){const e=this.locale,t=this.t,o=new wt.ButtonView(e),l=new wt.ButtonView(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return o.set({label:t("Save"),class:"ck-button-action",type:"submit",withText:!0}),o.bind("isEnabled").toMany(i,"errorText",(...e)=>e.every(e=>!e)),l.set({label:t("Cancel"),withText:!0}),l.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:l}}_createBackButton(){const e=this.locale.t,t=new wt.ButtonView(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:ft.IconPreviousArrow,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_getCellTypeDefinitions(){const e=new i.Collection,t=this._cellTypeLabels;for(const o of["data","header"]){const l={type:"button",model:new wt.UIModel({_cellTypeValue:o,label:t[o],role:"menuitemradio",withText:!0})};l.model.bind("isOn").to(this,"cellType",e=>e===o),e.add(l)}return e}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),l=t("Align cell text to the center"),i=t("Align cell text to the right"),r=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:l,left:o,justify:r}:{left:o,center:l,right:i,justify:r}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}get _cellTypeLabels(){const e=this.t;return{data:e("Data cell"),header:e("Header cell")}}}function mi(e){return"none"!==e}const gi={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment",cellType:"tableCellType"};class pi extends e.Plugin{_defaultContentTableCellProperties;_defaultLayoutTableCellProperties;_balloon;view;_viewWithContentTableDefaults;_viewWithLayoutTableDefaults;_undoStepBatch;_isReady;static get requires(){return[wt.ContextualBalloon]}static get pluginName(){return"TableCellPropertiesUIExperimental"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:ro,backgroundColors:ro})}init(){const e=this.editor,t=e.t;this._defaultContentTableCellProperties=G(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._defaultLayoutTableCellProperties=$(void 0,{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(wt.ContextualBalloon),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",o=>{const l=new wt.ButtonView(o);l.set({label:t("Cell properties"),icon:ft.IconTableCellProperties,tooltip:!0}),this.listenTo(l,"execute",()=>this._showView());const i=Object.values(gi).map(t=>e.commands.get(t)).filter(e=>!!e);return l.bind("isEnabled").toMany(i,"isEnabled",(...e)=>e.some(e=>e)),l})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,o=t.config.get("table.tableCellProperties"),l=(0,wt.normalizeColorOptions)(o.borderColors),i=(0,wt.getLocalizedColorOptions)(t.locale,l),r=(0,wt.normalizeColorOptions)(o.backgroundColors),n=(0,wt.getLocalizedColorOptions)(t.locale,r),a=!1!==o.colorPicker,s=!!t.config.get("experimentalFlags.tableCellTypeSupport"),c=new hi(t.locale,{borderColors:i,backgroundColors:n,defaultTableCellProperties:e,colorPickerConfig:!!a&&(o.colorPicker||{}),isTableCellTypeSupported:s}),d=t.t;c.render(),this.listenTo(c,"submit",()=>{this._hideView()}),this.listenTo(c,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()}),c.keystrokes.set("Esc",(e,t)=>{this._hideView(),t()}),(0,wt.clickOutsideHandler)({emitter:c,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const u=Zt(d),b=Qt(d);c.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),c.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:c.borderColorInput,commandName:"tableCellBorderColor",errorText:u,validator:eo})),c.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:c.borderWidthInput,commandName:"tableCellBorderWidth",errorText:b,validator:oo})),c.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:c.paddingInput,commandName:"tableCellPadding",errorText:b,validator:to})),c.on("change:width",this._getValidatedPropertyChangeCallback({viewField:c.widthInput,commandName:"tableCellWidth",errorText:b,validator:to})),c.on("change:height",this._getValidatedPropertyChangeCallback({viewField:c.heightInput,commandName:"tableCellHeight",errorText:b,validator:to})),c.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:c.backgroundInput,commandName:"tableCellBackgroundColor",errorText:u,validator:eo})),c.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),c.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment"));const h=t.commands.get("tableCellType");return h&&(c.cellTypeDropdown.bind("isEnabled").to(h,"isEnabled"),c.on("change:cellType",this._getPropertyChangeCallback("tableCellType"))),c}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(gi).flatMap(([t,o])=>{const l=e.get(o);if(!l)return[];const i=t;let r;r="cellType"===i?"":this.view===this._viewWithContentTableDefaults?this._defaultContentTableCellProperties[i]||"":this._defaultLayoutTableCellProperties[i]||"";return[[t,l.value||r]]}).forEach(([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}),this._isReady=!0}_showView(){const e=this.editor,t=Mt(e.editing.view.document.selection),o=t&&e.editing.mapper.toModelElement(t),l=!o||"layout"!==o.getAttribute("tableType");l&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableCellProperties):l||this._viewWithLayoutTableDefaults||(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableCellProperties)),this.view=l?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:To(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;jt(e.editing.view.document.selection)?this._isViewVisible&&Co(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,l)=>{this._isReady&&this.editor.execute(e,{value:l,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:l,errorText:i}=e,r=_o(()=>{o.errorText=i},500);return(e,i,n)=>{r.cancel(),this._isReady&&(l(n)?(this.editor.execute(t,{value:n,batch:this._undoStepBatch}),o.errorText=null):r())}}}})(),(window.CKEditor5=window.CKEditor5||{}).table=l})();;
/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
(function(Drupal,drupalSettings){Drupal.behaviors.activeLinks={attach(context){const path=drupalSettings.path;const queryString=JSON.stringify(path.currentQuery);const querySelector=queryString?`[data-drupal-link-query="${CSS.escape(queryString)}"]`:':not([data-drupal-link-query])';const originalSelectors=[`[data-drupal-link-system-path="${CSS.escape(path.currentPath)}"]`];let selectors;if(path.isFront)originalSelectors.push('[data-drupal-link-system-path="<front>"]');selectors=[].concat(originalSelectors.map((selector)=>`${selector}:not([hreflang])`),originalSelectors.map((selector)=>`${selector}[hreflang="${path.currentLanguage}"]`));selectors=selectors.map((current)=>current+querySelector);const activeLinks=context.querySelectorAll(selectors.join(','));const il=activeLinks.length;for(let i=0;i<il;i++){activeLinks[i].classList.add('is-active');activeLinks[i].setAttribute('aria-current','page');}},detach(context,settings,trigger){if(trigger==='unload'){const activeLinks=context.querySelectorAll('[data-drupal-link-system-path].is-active');const il=activeLinks.length;for(let i=0;i<il;i++){activeLinks[i].classList.remove('is-active');activeLinks[i].removeAttribute('aria-current');}}}};})(Drupal,drupalSettings);;
(($,Drupal,once)=>{Drupal.behaviors.claroAutoCompete={attach(context){once('claroAutoComplete','input.form-autocomplete',context).forEach((value)=>{const $input=$(value);const classRemove=($autoCompleteElem)=>{$autoCompleteElem.removeClass('is-autocompleting');$autoCompleteElem.siblings('[data-drupal-selector="autocomplete-message"]').addClass('hidden');};$input.autocomplete({search(event){const result=Drupal.autocomplete.options.search(event);if(result){$(event.target).addClass('is-autocompleting');$(event.target).siblings('[data-drupal-selector="autocomplete-message"]').removeClass('hidden');}return result;},response(event){classRemove($(event.target));}});});}};})(jQuery,Drupal,once);;
(function($,Drupal,debounce){$.fn.drupalGetSummary=function(){const callback=this.data('summaryCallback');if(!this[0]||!callback)return '';const result=callback(this[0]);return result?result.trim():'';};$.fn.drupalSetSummary=function(callback){const self=this;if(typeof callback!=='function'){const val=callback;callback=function(){return val;};}return (this.data('summaryCallback',callback).off('formUpdated.summary').on('formUpdated.summary',()=>{self.trigger('summaryUpdated');}).trigger('summaryUpdated'));};Drupal.behaviors.formSingleSubmit={attach(){function onFormSubmit(e){const $form=$(e.currentTarget);const formValues=new URLSearchParams(new FormData(e.target)).toString();const previousValues=$form.attr('data-drupal-form-submit-last');if(previousValues===formValues)e.preventDefault();else $form.attr('data-drupal-form-submit-last',formValues);}$(once('form-single-submit','body')).on('submit.singleSubmit','form:not([method~="GET"])',onFormSubmit);}};function triggerFormUpdated(element){$(element).trigger('formUpdated');}function fieldsList(form){return [].map.call(form.querySelectorAll('[name][id]'),(el)=>el.id);}Drupal.behaviors.formUpdated={attach(context){const $context=$(context);const contextIsForm=context.tagName==='FORM';const $forms=$(once('form-updated',contextIsForm?$context:$context.find('form')));let formFields;if($forms.length)$.makeArray($forms).forEach((form)=>{const events='change.formUpdated input.formUpdated ';const eventHandler=debounce((event)=>{triggerFormUpdated(event.target);},300);formFields=fieldsList(form).join(',');form.setAttribute('data-drupal-form-fields',formFields);$(form).on(events,eventHandler);});if(contextIsForm){formFields=fieldsList(context).join(',');const currentFields=$(context).attr('data-drupal-form-fields');if(formFields!==currentFields)triggerFormUpdated(context);}},detach(context,settings,trigger){const $context=$(context);const contextIsForm=context.tagName==='FORM';if(trigger==='unload')once.remove('form-updated',contextIsForm?$context:$context.find('form')).forEach((form)=>{form.removeAttribute('data-drupal-form-fields');$(form).off('.formUpdated');});}};Drupal.behaviors.fillUserInfoFromBrowser={attach(context,settings){const userInfo=['name','mail','homepage'];const $forms=$(once('user-info-from-browser','[data-user-info-from-browser]'));if($forms.length)userInfo.forEach((info)=>{const $element=$forms.find(`[name=${info}]`);const browserData=localStorage.getItem(`Drupal.visitor.${info}`);if(!$element.length)return;const emptyValue=$element[0].value==='';const defaultValue=$element.attr('data-drupal-default-value')===$element[0].value;if(browserData&&(emptyValue||defaultValue))$element.each(function(index,item){item.value=browserData;});});$forms.on('submit',()=>{userInfo.forEach((info)=>{const $element=$forms.find(`[name=${info}]`);if($element.length)localStorage.setItem(`Drupal.visitor.${info}`,$element[0].value);});});}};const handleFragmentLinkClickOrHashChange=(e)=>{let url;if(e.type==='click')url=e.currentTarget.location?e.currentTarget.location:e.currentTarget;else url=window.location;const hash=url.hash.substring(1);if(hash){const $target=$(`#${hash}`);$('body').trigger('formFragmentLinkClickOrHashChange',[$target]);setTimeout(()=>$target.trigger('focus'),300);}};const debouncedHandleFragmentLinkClickOrHashChange=debounce(handleFragmentLinkClickOrHashChange,300,true);$(window).on('hashchange.form-fragment',debouncedHandleFragmentLinkClickOrHashChange);$(document).on('click.form-fragment','a[href*="#"]',debouncedHandleFragmentLinkClickOrHashChange);})(jQuery,Drupal,Drupal.debounce);;
(($,Drupal)=>{function DetailsSummarizedContent(node){this.$node=$(node);this.setupSummary();}$.extend(DetailsSummarizedContent,{instances:[]});$.extend(DetailsSummarizedContent.prototype,{setupSummary(){this.$detailsSummarizedContentWrapper=$(Drupal.theme('detailsSummarizedContentWrapper'));this.$node.on('summaryUpdated',this.onSummaryUpdated.bind(this)).trigger('summaryUpdated').find('> summary').append(this.$detailsSummarizedContentWrapper);},onSummaryUpdated(){const text=this.$node.drupalGetSummary();this.$detailsSummarizedContentWrapper.html(Drupal.theme('detailsSummarizedContentText',text));}});Drupal.behaviors.detailsSummary={attach(context){DetailsSummarizedContent.instances=DetailsSummarizedContent.instances.concat(once('details','details',context).map((details)=>new DetailsSummarizedContent(details)));}};Drupal.DetailsSummarizedContent=DetailsSummarizedContent;Drupal.theme.detailsSummarizedContentWrapper=()=>`<span class="summary"></span>`;Drupal.theme.detailsSummarizedContentText=(text)=>text?` (${text})`:'';})(jQuery,Drupal);;
(function($,Drupal){Drupal.behaviors.detailsAria={attach(){$(once('detailsAria','body')).on('click.detailsAria','summary',(event)=>{const $summary=$(event.currentTarget);const open=$(event.currentTarget.parentNode).attr('open')==='open'?'false':'true';$summary.attr({'aria-expanded':open});});}};})(jQuery,Drupal);;
(function($){const handleFragmentLinkClickOrHashChange=(e,$target)=>{$target.parents('details').not('[open]').find('> summary').trigger('click');};$('body').on('formFragmentLinkClickOrHashChange.details',handleFragmentLinkClickOrHashChange);window.addEventListener('invalid',(event)=>{if(event.target.matches('details input[required]'))handleFragmentLinkClickOrHashChange(event,$(event.target));},{capture:true});})(jQuery);;
(($,Drupal)=>{Drupal.behaviors.claroDetails={attach(context){$(once('claroDetails',context===document?'html':context)).on('click',(event)=>{if(event.target.nodeName==='SUMMARY')$(event.target).trigger('focus');});}};Drupal.theme.detailsSummarizedContentWrapper=()=>`<span class="claro-details__summary-summary"></span>`;Drupal.theme.detailsSummarizedContentText=(text)=>text||'';})(jQuery,Drupal);;
(function($,Drupal){const states={postponed:[]};Drupal.states=states;function invert(a,invertState){return invertState&&typeof a!=='undefined'?!a:a;}function compare(a,b){if(a===b)return typeof a==='undefined'?a:true;return typeof a==='undefined'||typeof b==='undefined';}function ternary(a,b){if(typeof a==='undefined')return b;if(typeof b==='undefined')return a;return a&&b;}Drupal.behaviors.states={attach(context,settings){const elements=once('states','[data-drupal-states]',context);const il=elements.length;for(let i=0;i<il;i++){const config=JSON.parse(elements[i].getAttribute('data-drupal-states'));Object.keys(config||{}).forEach((state)=>{new states.Dependent({element:$(elements[i]),state:states.State.sanitize(state),constraints:config[state]});});}while(states.postponed.length)states.postponed.shift()();}};states.Dependent=function(args){$.extend(this,{values:{},oldValue:null},args);this.dependees=this.getDependees();Object.keys(this.dependees||{}).forEach((selector)=>{this.initializeDependee(selector,this.dependees[selector]);});};states.Dependent.comparisons={RegExp(reference,value){return reference.test(value);},Function(reference,value){return reference(value);},Array(reference,value){if(!Array.isArray(value))return false;return JSON.stringify(reference.sort())===JSON.stringify(value.sort());},Number(reference,value){return typeof value==='string'?compare(reference.toString(),value):compare(reference,value);}};states.Dependent.prototype={initializeDependee(selector,dependeeStates){this.values[selector]={};Object.keys(dependeeStates).forEach((i)=>{let state=dependeeStates[i];if($.inArray(state,dependeeStates)===-1)return;state=states.State.sanitize(state);this.values[selector][state.name]=null;$(selector).on(`state:${state}`,{selector,state},(e)=>{this.update(e.data.selector,e.data.state,e.value);});new states.Trigger({selector,state});});},compare(reference,selector,state){const value=this.values[selector][state.name];if(reference.constructor.name in states.Dependent.comparisons)return states.Dependent.comparisons[reference.constructor.name](reference,value);return compare(reference,value);},update(selector,state,value){if(value!==this.values[selector][state.name]){this.values[selector][state.name]=value;this.reevaluate();}},reevaluate(){let value=this.verifyConstraints(this.constraints);if(value!==this.oldValue){this.oldValue=value;value=invert(value,this.state.invert);this.element.trigger({type:`state:${this.state}`,value,trigger:true});}},verifyConstraints(constraints,selector){let result;if(Array.isArray(constraints)){const hasXor=$.inArray('xor',constraints)===-1;const len=constraints.length;for(let i=0;i<len;i++)if(constraints[i]!=='xor'){const constraint=this.checkConstraints(constraints[i],selector,i);if(constraint&&(hasXor||result))return hasXor;result=result||constraint;}}else{if($.isPlainObject(constraints)){for(const n in constraints)if(constraints.hasOwnProperty(n)){result=ternary(result,this.checkConstraints(constraints[n],selector,n));if(result===false)return false;}}}return result;},checkConstraints(value,selector,state){if(typeof state!=='string'||/[0-9]/.test(state[0]))state=null;else{if(typeof selector==='undefined'){selector=state;state=null;}}if(state!==null){state=states.State.sanitize(state);return invert(this.compare(value,selector,state),state.invert);}return this.verifyConstraints(value,selector);},getDependees(){const cache={};const _compare=this.compare;this.compare=function(reference,selector,state){(cache[selector]||(cache[selector]=[])).push(state.name);};this.verifyConstraints(this.constraints);this.compare=_compare;return cache;}};states.Trigger=function(args){$.extend(this,args);if(this.state in states.Trigger.states){this.element=$(this.selector);if(!this.element.data(`trigger:${this.state}`))this.initialize();}};states.Trigger.prototype={initialize(){const trigger=states.Trigger.states[this.state];if(typeof trigger==='function')trigger.call(window,this.element);else Object.keys(trigger||{}).forEach((event)=>{this.defaultTrigger(event,trigger[event]);});this.element.data(`trigger:${this.state}`,true);},defaultTrigger(event,valueFn){let oldValue=valueFn.call(this.element);this.element.on(event,function(e){const value=valueFn.call(this.element,e);if(oldValue!==value){this.element.trigger({type:`state:${this.state}`,value,oldValue});oldValue=value;}}.bind(this));states.postponed.push(function(){this.element.trigger({type:`state:${this.state}`,value:oldValue,oldValue:null});}.bind(this));}};states.Trigger.states={empty:{keyup(){return this.val()==='';},change(){return this.val()==='';}},checked:{change(){let checked=false;this.each(function(){checked=$(this).prop('checked');return !checked;});return checked;}},value:{keyup(){if(this.length>1)return this.filter(':checked').val()||false;return this.val();},change(){if(this.length>1)return this.filter(':checked').val()||false;return this.val();}},collapsed:{collapsed(e){return typeof e!=='undefined'&&'value' in e?e.value:!this[0].hasAttribute('open');}}};states.State=function(state){this.pristine=state;this.name=state;let process=true;do{while(this.name.charAt(0)==='!'){this.name=this.name.substring(1);this.invert=!this.invert;}if(this.name in states.State.aliases)this.name=states.State.aliases[this.name];else process=false;}while(process);};states.State.sanitize=function(state){if(state instanceof states.State)return state;return new states.State(state);};states.State.aliases={enabled:'!disabled',invisible:'!visible',invalid:'!valid',untouched:'!touched',optional:'!required',filled:'!empty',unchecked:'!checked',irrelevant:'!relevant',expanded:'!collapsed',open:'!collapsed',closed:'collapsed',readwrite:'!readonly'};states.State.prototype={invert:false,toString(){return this.name;}};const $document=$(document);$document.on('state:disabled',(e)=>{const tagsSupportDisable='button, fieldset, optgroup, option, select, textarea, input';if(e.trigger)$(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled',e.value).find(tagsSupportDisable).addBack(tagsSupportDisable).prop('disabled',e.value);});$document.on('state:readonly',(e)=>{if(e.trigger)$(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-readonly',e.value).find('input, textarea').prop('readonly',e.value);});$document.on('state:required',(e)=>{if(e.trigger)if(e.value){const label=`label${e.target.id?`[for=${e.target.id}]`:''}`;const $label=$(e.target).attr({required:'required','aria-required':'true'}).closest('.js-form-item, .js-form-wrapper').find(label);if(!$label.hasClass('js-form-required').length)$label.addClass('js-form-required form-required');}else $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required');});$document.on('state:visible',(e)=>{if(e.trigger){let $element=$(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper');if(e.target.tagName==='A')$element=$(e.target);$element.toggle(e.value);}});$document.on('state:checked',(e)=>{if(e.trigger)$(e.target).closest('.js-form-item, .js-form-wrapper').find('input').prop('checked',e.value).trigger('change');});$document.on('state:collapsed',(e)=>{if(e.trigger)if(e.target.hasAttribute('open')===e.value)$(e.target).find('> summary').trigger('click');});})(jQuery,Drupal);;
(function($,Drupal){Drupal.behaviors.filterGuidelines={attach(context){function updateFilterGuidelines(event){const $this=$(event.target);const {value}=event.target;$this.closest('.js-filter-wrapper').find('[data-drupal-format-id]').hide().filter(`[data-drupal-format-id="${value}"]`).show();}$(once('filter-guidelines','.js-filter-guidelines',context)).find(':header').hide().closest('.js-filter-wrapper').find('select.js-filter-list').on('change.filterGuidelines',updateFilterGuidelines).trigger('change.filterGuidelines');}};})(jQuery,Drupal);;
(function($,Drupal){Drupal.behaviors.menuUiDetailsSummaries={attach(context){$(context).find('.menu-link-form').drupalSetSummary((context)=>{const $context=$(context);if($context.find('.js-form-item-menu-enabled input:checked').length)return Drupal.checkPlain($context.find('.js-form-item-menu-title input')[0].value);return Drupal.t('Not in menu');});}};Drupal.behaviors.menuUiLinkAutomaticTitle={attach(context){const $context=$(context);$context.find('.menu-link-form').each(function(){const $this=$(this);const $checkbox=$this.find('.js-form-item-menu-enabled input');const $linkTitle=$context.find('.js-form-item-menu-title input');const $title=$this.closest('form').find('.js-form-item-title-0-value input');if(!($checkbox.length&&$linkTitle.length&&$title.length))return;if($checkbox[0].checked&&$linkTitle[0].value.length)$linkTitle.data('menuLinkAutomaticTitleOverridden',true);$linkTitle.on('keyup',()=>{$linkTitle.data('menuLinkAutomaticTitleOverridden',true);});$checkbox.on('change',()=>{if($checkbox[0].checked){if(!$linkTitle.data('menuLinkAutomaticTitleOverridden'))$linkTitle[0].value=$title[0].value;}else{$linkTitle[0].value='';$linkTitle.removeData('menuLinkAutomaticTitleOverridden');}$checkbox.closest('.vertical-tabs-pane').trigger('summaryUpdated');$checkbox.trigger('formUpdated');});$title.on('keyup',()=>{if(!$linkTitle.data('menuLinkAutomaticTitleOverridden')&&$checkbox[0].checked){$linkTitle[0].value=$title[0].value;$linkTitle.trigger('formUpdated');}});});}};})(jQuery,Drupal);;
(function($,Drupal){Drupal.behaviors.entityContentDetailsSummaries={attach(context){const $context=$(context);$context.find('.entity-content-form-revision-information').drupalSetSummary((context)=>{const $revisionContext=$(context);const revisionCheckbox=$revisionContext.find('.js-form-item-revision input');if((revisionCheckbox.length&&revisionCheckbox[0].checked)||(!revisionCheckbox.length&&$revisionContext.find('.js-form-item-revision-log textarea').length))return Drupal.t('New revision');return Drupal.t('No revision');});$context.find('details.entity-translation-options').drupalSetSummary((context)=>{const $translationContext=$(context);let translate;let $checkbox=$translationContext.find('.js-form-item-translation-translate input');if($checkbox.length)translate=$checkbox[0].checked?Drupal.t('Needs to be updated'):Drupal.t('Does not need to be updated');else{$checkbox=$translationContext.find('.js-form-item-translation-retranslate input');translate=$checkbox[0]?.checked?Drupal.t('Flag other translations as outdated'):Drupal.t('Do not flag other translations as outdated');}return translate;});}};})(jQuery,Drupal);;
(function($,Drupal,drupalSettings){Drupal.behaviors.nodeDetailsSummaries={attach(context){const $context=$(context);$context.find('.node-form-author').drupalSetSummary((context)=>{const nameElement=context.querySelector('.field--name-uid input');const name=nameElement&&nameElement.value;const dateElement=context.querySelector('.field--name-created input');const date=dateElement&&dateElement.value;if(name&&date)return Drupal.t('By @name on @date',{'@name':name,'@date':date});if(name)return Drupal.t('By @name',{'@name':name});if(date)return Drupal.t('Authored on @date',{'@date':date});});$context.find('.node-form-options').drupalSetSummary((context)=>{const $optionsContext=$(context);const values=[];if($optionsContext.find('input:checked').length){$optionsContext.find('input:checked').next('label').each(function(){values.push(Drupal.checkPlain(this.textContent.trim()));});return values.join(', ');}return Drupal.t('Not promoted');});}};})(jQuery,Drupal,drupalSettings);;
(function($,Drupal){Drupal.behaviors.pathDetailsSummaries={attach(context){$(context).find('.path-form').drupalSetSummary((context)=>{const pathElement=document.querySelector('.js-form-item-path-0-alias input');const path=pathElement&&pathElement.value;return path?Drupal.t('Alias: @alias',{'@alias':path}):Drupal.t('No alias');});}};})(jQuery,Drupal);;
(function($,Drupal){Drupal.behaviors.textSummary={attach(context,settings){once('text-summary','.js-text-summary',context).forEach((summary)=>{const $widget=$(summary).closest('.js-text-format-wrapper');const $summary=$widget.find('.js-text-summary-wrapper');const $summaryLabel=$summary.find('label').eq(0);const $full=$widget.children('.js-form-type-textarea');let $fullLabel=$full.find('label').eq(0);if($fullLabel.length===0)$fullLabel=$('<label></label>').prependTo($full);if($fullLabel.hasClass('visually-hidden')){$fullLabel.html((index,oldHtml)=>`<span class="visually-hidden">${oldHtml}</span>`);$fullLabel.removeClass('visually-hidden');}const $link=$(`<span class="field-edit-link"> (<button type="button" class="link link-edit-summary">${Drupal.t('Hide summary')}</button>)</span>`);const $button=$link.find('button');let toggleClick=true;$link.on('click',(e)=>{if(toggleClick){$summary.hide();$button.html(Drupal.t('Edit summary'));$link.appendTo($fullLabel);}else{$summary.show();$button.html(Drupal.t('Hide summary'));$link.appendTo($summaryLabel);}e.preventDefault();toggleClick=!toggleClick;}).appendTo($summaryLabel);if(summary.value==='')$link.trigger('click');});}};})(jQuery,Drupal);;
(function($,Drupal,drupalSettings){let activeItem=Drupal.url(drupalSettings.path.currentPath);$.fn.drupalToolbarMenuHorizontal=function(){let currentPath=drupalSettings.path.currentPath;const menu=once('toolbar-menu-horizontal',this);if(menu.length){const $menu=$(menu);if(activeItem){const count=currentPath.split('/').length;for(let i=0;i<count;i++){const $menuItem=$menu.find(`a[data-drupal-link-system-path="${currentPath}"]`);if($menuItem.length!==0){$menuItem.closest('a').addClass('is-active');break;}const lastIndex=currentPath.lastIndexOf('/');currentPath=currentPath.slice(0,lastIndex);}}}};$.fn.drupalToolbarMenu=function(){const ui={handleOpen:Drupal.t('Extend'),handleClose:Drupal.t('Collapse')};function toggleList($item,switcher){const $toggle=$item.children('.toolbar-box').children('.toolbar-handle');switcher=typeof switcher!=='undefined'?switcher:!$item.hasClass('open');$item.toggleClass('open',switcher);$toggle.toggleClass('open',switcher);$toggle.find('.action').each((index,element)=>{element.textContent=switcher?ui.handleClose:ui.handleOpen;});}function toggleClickHandler(event){const $toggle=$(event.target);const $item=$toggle.closest('li');toggleList($item);const $openItems=$item.siblings().filter('.open');toggleList($openItems,false);}function linkClickHandler(event){if(!Drupal.toolbar.models.toolbarModel.get('isFixed'))Drupal.toolbar.models.toolbarModel.set('activeTab',null);event.stopPropagation();}function initItems($menu){const options={class:'toolbar-icon toolbar-handle',action:ui.handleOpen,text:''};$menu.find('li > a').wrap('<div class="toolbar-box">');$menu.find('li').each((index,element)=>{const $item=$(element);if($item.children('ul.toolbar-menu').length){const $box=$item.children('.toolbar-box');const $link=$box.find('a');options.text=Drupal.t('@label',{'@label':$link.length?$link[0].textContent:''});$item.children('.toolbar-box').append($(Drupal.theme('toolbarMenuItemToggle',options)).hide().fadeIn(150));}});}function markListLevels($lists,level){level=!level?1:level;const $lis=$lists.children('li').addClass(`level-${level}`);$lists=$lis.children('ul');if($lists.length)markListLevels($lists,level+1);}function openActiveItem($menu){let currentPath=drupalSettings.path.currentPath;const pathItem=$menu.find(`a[href="${window.location.pathname}"]`);if(pathItem.length&&!activeItem)activeItem=window.location.pathname;if(activeItem){const $activeItem=$menu.find(`a[href="${activeItem}"]`).addClass('menu-item--active');if(pathItem.length===0&&activeItem){const count=currentPath.split('/').length;for(let i=0;i<count;i++){const $menuItem=$menu.find(`a[data-drupal-link-system-path="${currentPath}"]`);if($menuItem.length!==0){const $activeTrail=$menuItem.parentsUntil('.root','li').addClass('menu-item--active-trail');toggleList($activeTrail,true);break;}const lastIndex=currentPath.lastIndexOf('/');currentPath=currentPath.slice(0,lastIndex);}}else{const $activeTrail=$activeItem.parentsUntil('.root','li').addClass('menu-item--active-trail');toggleList($activeTrail,true);}}}return this.each(function(selector){const menu=once('toolbar-menu-vertical',this);if(menu.length){const $menu=$(menu);$menu.on('click.toolbar','.toolbar-box',toggleClickHandler).on('click.toolbar','.toolbar-box a',linkClickHandler);$menu.addClass('root');initItems($menu);markListLevels($menu);openActiveItem($menu);}});};Drupal.theme.toolbarMenuItemToggle=function(options){return `<button class="${options.class}"><span class="action">${options.action}</span> <span class="label">${options.text}</span></button>`;};})(jQuery,Drupal,drupalSettings);;
(function($,Drupal,drupalSettings){(()=>{if(!sessionStorage.getItem('Drupal.toolbar.toolbarState'))return;const toolbarState=JSON.parse(sessionStorage.getItem('Drupal.toolbar.toolbarState'));const {activeTray,orientation,isOriented}=toolbarState;const activeTrayElement=document.querySelector(`.toolbar-tray[data-toolbar-tray="${activeTray}"]`);const activeTrayToggle=document.querySelector(`.toolbar-item[data-toolbar-tray="${activeTray}"]`);if(activeTrayElement){activeTrayElement.classList.add(`toolbar-tray-${orientation}`,'is-active');activeTrayToggle.classList.add('is-active');}if(isOriented)document.querySelector('#toolbar-administration').classList.add('toolbar-oriented');})();const options=$.extend({breakpoints:{'toolbar.narrow':'','toolbar.standard':'','toolbar.wide':''}},drupalSettings.toolbar,{strings:{horizontal:Drupal.t('Horizontal orientation'),vertical:Drupal.t('Vertical orientation')}});Drupal.behaviors.toolbar={attach(context){if(!window.matchMedia('only screen').matches)return;once('toolbar','#toolbar-administration',context).forEach((toolbar)=>{const model=new Drupal.toolbar.ToolbarModel({locked:JSON.parse(localStorage.getItem('Drupal.toolbar.trayVerticalLocked')),activeTab:document.getElementById(JSON.parse(localStorage.getItem('Drupal.toolbar.activeTabID'))),height:$('#toolbar-administration').outerHeight()});Drupal.toolbar.models.toolbarModel=model;Object.keys(options.breakpoints).forEach((label)=>{const mq=options.breakpoints[label];const mql=window.matchMedia(mq);Drupal.toolbar.mql[label]=mql;mql.addListener(Drupal.toolbar.mediaQueryChangeHandler.bind(null,model,label));Drupal.toolbar.mediaQueryChangeHandler.call(null,model,label,mql);});Drupal.toolbar.views.toolbarVisualView=new Drupal.toolbar.ToolbarVisualView({el:toolbar,model,strings:options.strings});Drupal.toolbar.views.toolbarAuralView=new Drupal.toolbar.ToolbarAuralView({el:toolbar,model,strings:options.strings});Drupal.toolbar.views.bodyVisualView=new Drupal.toolbar.BodyVisualView({el:toolbar,model});model.trigger('change:isFixed',model,model.get('isFixed'));model.trigger('change:activeTray',model,model.get('activeTray'));const menuModel=new Drupal.toolbar.MenuModel();Drupal.toolbar.models.menuModel=menuModel;Drupal.toolbar.views.menuVisualView=new Drupal.toolbar.MenuVisualView({el:$(toolbar).find('.toolbar-menu-administration').get(0),model:menuModel,strings:options.strings});Drupal.toolbar.setSubtrees.done((subtrees)=>{menuModel.set('subtrees',subtrees);const theme=drupalSettings.ajaxPageState.theme;localStorage.setItem(`Drupal.toolbar.subtrees.${theme}`,JSON.stringify(subtrees));model.set('areSubtreesLoaded',true);});Drupal.toolbar.views.toolbarVisualView.loadSubtrees();$(document).on('drupalViewportOffsetChange.toolbar',(event,offsets)=>{model.set('offsets',offsets);});model.on('change:orientation',(model,orientation)=>{$(document).trigger('drupalToolbarOrientationChange',orientation);}).on('change:activeTab',(model,tab)=>{$(document).trigger('drupalToolbarTabChange',tab);}).on('change:activeTray',(model,tray)=>{$(document).trigger('drupalToolbarTrayChange',tray);});const toolbarState=sessionStorage.getItem('Drupal.toolbar.toolbarState')?JSON.parse(sessionStorage.getItem('Drupal.toolbar.toolbarState')):{};if(Drupal.toolbar.models.toolbarModel.get('orientation')==='horizontal'&&Drupal.toolbar.models.toolbarModel.get('activeTab')===null&&!toolbarState.orientation)Drupal.toolbar.models.toolbarModel.set({activeTab:$('.toolbar-bar .toolbar-tab:not(.home-toolbar-tab) a').get(0)});window.addEventListener('dialog:aftercreate',(e)=>{const $element=$(e.target);const {settings}=e;const toolbarBar=document.getElementById('toolbar-bar');if(toolbarBar){toolbarBar.style.marginTop='0';if(settings.drupalOffCanvasPosition==='top'){const height=Drupal.offCanvas.getContainer($element).outerHeight();toolbarBar.style.marginTop=`${height}px`;$element.on('dialogContentResize.off-canvas',()=>{const newHeight=Drupal.offCanvas.getContainer($element).outerHeight();toolbarBar.style.marginTop=`${newHeight}px`;});}}});window.addEventListener('dialog:beforeclose',()=>{const toolbarBar=document.getElementById('toolbar-bar');if(toolbarBar)toolbarBar.style.marginTop='0';});});if(once('toolbarAntiFlicker','#toolbar-administration',context).length)Drupal.toolbar.models.toolbarModel.on('change:activeTab change:orientation change:isOriented change:isTrayToggleVisible change:offsets',function(){const userButton=document.querySelector('#toolbar-item-user');const hasActiveTab=!!$(this.get('activeTab')).length>0;const previousToolbarState=sessionStorage.getItem('Drupal.toolbar.toolbarState')?JSON.parse(sessionStorage.getItem('Drupal.toolbar.toolbarState')):{};const toolbarState={...previousToolbarState,orientation:Drupal.toolbar.models.toolbarModel.get('orientation'),hasActiveTab,activeTabId:hasActiveTab?this.get('activeTab').id:null,activeTray:$(this.get('activeTab')).attr('data-toolbar-tray'),isOriented:this.get('isOriented'),isFixed:this.get('isFixed'),userButtonMinWidth:userButton?userButton.clientWidth:0};sessionStorage.setItem('Drupal.toolbar.toolbarState',JSON.stringify(toolbarState));});}};Drupal.toolbar={views:{},models:{},mql:{},setSubtrees:new $.Deferred(),mediaQueryChangeHandler(model,label,mql){switch(label){case 'toolbar.narrow':model.set({isOriented:mql.matches,isTrayToggleVisible:false});if(!mql.matches||!model.get('orientation'))model.set({orientation:'vertical'},{validate:true});break;case 'toolbar.standard':model.set({isFixed:mql.matches});break;case 'toolbar.wide':model.set({orientation:mql.matches&&!model.get('locked')?'horizontal':'vertical'},{validate:true});model.set({isTrayToggleVisible:mql.matches});break;default:break;}}};Drupal.theme.toolbarOrientationToggle=function(){return ('<div class="toolbar-toggle-orientation"><div class="toolbar-lining">'+'<button class="toolbar-icon" type="button"></button>'+'</div></div>');};Drupal.AjaxCommands.prototype.setToolbarSubtrees=function(ajax,response,status){Drupal.toolbar.setSubtrees.resolve(response.subtrees);};})(jQuery,Drupal,drupalSettings);;
(function(Backbone,Drupal){Drupal.toolbar.MenuModel=Backbone.Model.extend({defaults:{subtrees:null}});})(Backbone,Drupal);;
(function(Backbone,Drupal){Drupal.toolbar.ToolbarModel=Backbone.Model.extend({defaults:{activeTab:null,activeTray:null,isOriented:false,isFixed:false,areSubtreesLoaded:false,isViewportOverflowConstrained:false,orientation:'horizontal',locked:false,isTrayToggleVisible:true,height:null,offsets:{top:0,right:0,bottom:0,left:0}},validate(attributes,options){if(attributes.orientation==='horizontal'&&this.get('locked')&&!options.override)return Drupal.t('The toolbar cannot be set to a horizontal orientation when it is locked.');}});})(Backbone,Drupal);;
(function($,Drupal,Backbone){Drupal.toolbar.BodyVisualView=Backbone.View.extend({initialize(){this.listenTo(this.model,'change:activeTray ',this.render);this.listenTo(this.model,'change:isFixed change:isViewportOverflowConstrained',this.isToolbarFixed);},isToolbarFixed(){const isViewportOverflowConstrained=this.model.get('isViewportOverflowConstrained');$('body').toggleClass('toolbar-fixed',isViewportOverflowConstrained||this.model.get('isFixed'));},render(){$('body').toggleClass('toolbar-tray-open',!!this.model.get('activeTray'));}});})(jQuery,Drupal,Backbone);;
(function($,Backbone,Drupal){Drupal.toolbar.MenuVisualView=Backbone.View.extend({initialize(){this.listenTo(this.model,'change:subtrees',this.render);this.render();},render(){this.renderVertical();this.renderHorizontal();},renderHorizontal(){if('drupalToolbarMenu' in $.fn)this.$el.children('.toolbar-menu').drupalToolbarMenuHorizontal();},renderVertical(){const subtrees=this.model.get('subtrees');if(!this.model.get('subtrees'))return;Object.keys(subtrees||{}).forEach((id)=>{$(once('toolbar-subtrees',this.$el.find(`#toolbar-link-${id}`))).after(subtrees[id]);});if('drupalToolbarMenu' in $.fn)this.$el.children('.toolbar-menu').drupalToolbarMenu();}});})(jQuery,Backbone,Drupal);;
(function(Backbone,Drupal){Drupal.toolbar.ToolbarAuralView=Backbone.View.extend({initialize(options){this.strings=options.strings;this.listenTo(this.model,'change:orientation',this.onOrientationChange);this.listenTo(this.model,'change:activeTray',this.onActiveTrayChange);},onOrientationChange(model,orientation){Drupal.announce(Drupal.t('Tray orientation changed to @orientation.',{'@orientation':orientation}));},onActiveTrayChange(model,tray){const relevantTray=tray===null?model.previous('activeTray'):tray;if(!relevantTray)return;const action=tray===null?Drupal.t('closed'):Drupal.t('opened');const trayNameElement=relevantTray.querySelector('.toolbar-tray-name');let text;if(trayNameElement!==null)text=Drupal.t('Tray "@tray" @action.',{'@tray':trayNameElement.textContent,'@action':action});else text=Drupal.t('Tray @action.',{'@action':action});Drupal.announce(text);}});})(Backbone,Drupal);;
(function($,Drupal,drupalSettings,Backbone){Drupal.toolbar.ToolbarVisualView=Backbone.View.extend({events(){const touchEndToClick=function(event){event.preventDefault();event.target.click();};return {'click .toolbar-bar .toolbar-tab .trigger':'onTabClick','click .toolbar-toggle-orientation button':'onOrientationToggleClick','touchend .toolbar-bar .toolbar-tab .trigger':touchEndToClick,'touchend .toolbar-toggle-orientation button':touchEndToClick};},initialize(options){this.strings=options.strings;this.listenTo(this.model,'change:activeTab change:orientation change:isOriented change:isTrayToggleVisible',this.render);this.listenTo(this.model,'change:mqMatches',this.onMediaQueryChange);this.listenTo(this.model,'change:offsets',this.adjustPlacement);this.listenTo(this.model,'change:activeTab change:orientation change:isOriented',this.updateToolbarHeight);this.$el.find('.toolbar-tray .toolbar-lining').has('.toolbar-menu').append(Drupal.theme('toolbarOrientationToggle'));this.model.trigger('change:activeTab');},updateToolbarHeight(){const toolbarTabOuterHeight=$('#toolbar-bar').find('.toolbar-tab').outerHeight()||0;const toolbarTrayHorizontalOuterHeight=$('.is-active.toolbar-tray-horizontal').outerHeight()||0;this.model.set('height',toolbarTabOuterHeight+toolbarTrayHorizontalOuterHeight);$('body')[0].style.paddingTop=`${this.model.get('height')}px`;$('html')[0].style.scrollPaddingTop=`${this.model.get('height')}px`;this.triggerDisplace();},triggerDisplace(){_.defer(()=>{Drupal.displace(true);});},render(){this.updateTabs();this.updateTrayOrientation();this.updateBarAttributes();$('[data-toolbar-anti-flicker-loading]').remove();$('html').removeClass(['toolbar-loading','toolbar-horizontal','toolbar-vertical','toolbar-tray-open','toolbar-fixed','toolbar-oriented','toolbar-anti-flicker']);$('body').removeClass('toolbar-loading');if(this.model.changed.orientation==='vertical'||this.model.changed.activeTab)this.loadSubtrees();return this;},onTabClick(event){if(event.currentTarget.hasAttribute('data-toolbar-tray')){const activeTab=this.model.get('activeTab');const clickedTab=event.currentTarget;this.model.set('activeTab',!activeTab||clickedTab!==activeTab?clickedTab:null);event.preventDefault();event.stopPropagation();}},onOrientationToggleClick(event){const orientation=this.model.get('orientation');const antiOrientation=orientation==='vertical'?'horizontal':'vertical';const locked=antiOrientation==='vertical';if(locked)localStorage.setItem('Drupal.toolbar.trayVerticalLocked','true');else localStorage.removeItem('Drupal.toolbar.trayVerticalLocked');this.model.set({locked,orientation:antiOrientation},{validate:true,override:true});event.preventDefault();event.stopPropagation();},updateTabs(){const $tab=$(this.model.get('activeTab'));$(this.model.previous('activeTab')).removeClass('is-active').attr('aria-pressed',false);$(this.model.previous('activeTray')).removeClass('is-active');localStorage.removeItem('Drupal.toolbar.activeTabID');if($tab.length>0){$tab.addClass('is-active').attr('aria-pressed',true);const name=$tab.attr('data-toolbar-tray');const id=$tab.get(0).id;if(id)localStorage.setItem('Drupal.toolbar.activeTabID',JSON.stringify(id));const $tray=this.$el.find(`[data-toolbar-tray="${name}"].toolbar-tray`);if($tray.length){$tray.addClass('is-active');this.model.set('activeTray',$tray.get(0));}else this.model.set('activeTray',null);}else{this.model.set('activeTray',null);localStorage.removeItem('Drupal.toolbar.activeTabID');}},updateBarAttributes(){const isOriented=this.model.get('isOriented');if(isOriented)this.$el.find('.toolbar-bar').attr('data-offset-top','');else this.$el.find('.toolbar-bar').removeAttr('data-offset-top');this.$el.toggleClass('toolbar-oriented',isOriented);},updateTrayOrientation(){const orientation=this.model.get('orientation');const antiOrientation=orientation==='vertical'?'horizontal':'vertical';$('body').toggleClass('toolbar-vertical',orientation==='vertical').toggleClass('toolbar-horizontal',orientation==='horizontal');const removeClass=antiOrientation==='horizontal'?'toolbar-tray-horizontal':'toolbar-tray-vertical';const $trays=this.$el.find('.toolbar-tray').removeClass(removeClass).addClass(`toolbar-tray-${orientation}`);const iconClass=`toolbar-icon-toggle-${orientation}`;const iconAntiClass=`toolbar-icon-toggle-${antiOrientation}`;const $orientationToggle=this.$el.find('.toolbar-toggle-orientation').toggle(this.model.get('isTrayToggleVisible'));const $orientationToggleButton=$orientationToggle.find('button');$orientationToggleButton[0].value=antiOrientation;$orientationToggleButton.attr('title',this.strings[antiOrientation]).removeClass(iconClass).addClass(iconAntiClass);$orientationToggleButton[0].textContent=this.strings[antiOrientation];const dir=document.documentElement.dir;const edge=dir==='rtl'?'right':'left';$trays.removeAttr('data-offset-left data-offset-right data-offset-top');$trays.filter('.toolbar-tray-vertical.is-active').attr(`data-offset-${edge}`,'');$trays.filter('.toolbar-tray-horizontal.is-active').attr('data-offset-top','');},adjustPlacement(){const $trays=this.$el.find('.toolbar-tray');if(!this.model.get('isOriented'))$trays.removeClass('toolbar-tray-horizontal').addClass('toolbar-tray-vertical');},loadSubtrees(){const $activeTab=$(this.model.get('activeTab'));const orientation=this.model.get('orientation');if(!this.model.get('areSubtreesLoaded')&&typeof $activeTab.data('drupal-subtrees')!=='undefined'&&orientation==='vertical'){const subtreesHash=drupalSettings.toolbar.subtreesHash;const theme=drupalSettings.ajaxPageState.theme;const endpoint=Drupal.url(`toolbar/subtrees/${subtreesHash}`);const cachedSubtreesHash=localStorage.getItem(`Drupal.toolbar.subtreesHash.${theme}`);const cachedSubtrees=JSON.parse(localStorage.getItem(`Drupal.toolbar.subtrees.${theme}`));const isVertical=this.model.get('orientation')==='vertical';if(isVertical&&subtreesHash===cachedSubtreesHash&&cachedSubtrees)Drupal.toolbar.setSubtrees.resolve(cachedSubtrees);else{if(isVertical){localStorage.removeItem(`Drupal.toolbar.subtreesHash.${theme}`);localStorage.removeItem(`Drupal.toolbar.subtrees.${theme}`);Drupal.ajax({url:endpoint}).execute();localStorage.setItem(`Drupal.toolbar.subtreesHash.${theme}`,subtreesHash);}}}}});})(jQuery,Drupal,drupalSettings,Backbone);;
(function($,Drupal,drupalSettings){const pathInfo=drupalSettings.path;const escapeAdminPath=sessionStorage.getItem('escapeAdminPath');const windowLocation=window.location;if(!pathInfo.currentPathIsAdmin&&!/destination=/.test(windowLocation.search))sessionStorage.setItem('escapeAdminPath',windowLocation);Drupal.behaviors.escapeAdmin={attach(){const toolbarEscape=once('escapeAdmin','[data-toolbar-escape-admin]');if(toolbarEscape.length&&pathInfo.currentPathIsAdmin&&escapeAdminPath!==null)$(toolbarEscape).attr('href',escapeAdminPath);}};})(jQuery,Drupal,drupalSettings);;

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net