From 966c5a84c3d51ddd73de1cf21e89794a88840119 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= <zoujingli@qq.com>
Date: Fri, 8 Mar 2024 19:52:14 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=8F=92=E4=BB=B6=20Static?=
 =?UTF-8?q?=20=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 public/static/plugs/ckeditor5/ckeditor.css    | 26 ++++++++++---------
 public/static/plugs/ckeditor5/ckeditor.js     |  6 ++---
 .../static/plugs/ckeditor5/translations/ar.js |  2 +-
 .../plugs/ckeditor5/translations/ast.js       |  2 +-
 .../static/plugs/ckeditor5/translations/az.js |  2 +-
 .../static/plugs/ckeditor5/translations/bg.js |  2 +-
 .../static/plugs/ckeditor5/translations/bn.js |  2 +-
 .../static/plugs/ckeditor5/translations/ca.js |  2 +-
 .../static/plugs/ckeditor5/translations/cs.js |  2 +-
 .../static/plugs/ckeditor5/translations/da.js |  2 +-
 .../plugs/ckeditor5/translations/de-ch.js     |  2 +-
 .../static/plugs/ckeditor5/translations/de.js |  2 +-
 .../static/plugs/ckeditor5/translations/el.js |  2 +-
 .../plugs/ckeditor5/translations/en-au.js     |  2 +-
 .../plugs/ckeditor5/translations/en-gb.js     |  2 +-
 .../static/plugs/ckeditor5/translations/en.js |  2 +-
 .../static/plugs/ckeditor5/translations/eo.js |  2 +-
 .../static/plugs/ckeditor5/translations/es.js |  2 +-
 .../static/plugs/ckeditor5/translations/et.js |  2 +-
 .../static/plugs/ckeditor5/translations/eu.js |  2 +-
 .../static/plugs/ckeditor5/translations/fa.js |  2 +-
 .../static/plugs/ckeditor5/translations/fi.js |  2 +-
 .../static/plugs/ckeditor5/translations/fr.js |  2 +-
 .../static/plugs/ckeditor5/translations/gl.js |  2 +-
 .../static/plugs/ckeditor5/translations/he.js |  2 +-
 .../static/plugs/ckeditor5/translations/hi.js |  2 +-
 .../static/plugs/ckeditor5/translations/hr.js |  2 +-
 .../static/plugs/ckeditor5/translations/hu.js |  2 +-
 .../static/plugs/ckeditor5/translations/id.js |  2 +-
 .../static/plugs/ckeditor5/translations/it.js |  2 +-
 .../static/plugs/ckeditor5/translations/ja.js |  2 +-
 .../static/plugs/ckeditor5/translations/km.js |  2 +-
 .../static/plugs/ckeditor5/translations/kn.js |  2 +-
 .../static/plugs/ckeditor5/translations/ko.js |  2 +-
 .../static/plugs/ckeditor5/translations/ku.js |  2 +-
 .../static/plugs/ckeditor5/translations/lt.js |  2 +-
 .../static/plugs/ckeditor5/translations/lv.js |  2 +-
 .../static/plugs/ckeditor5/translations/ms.js |  2 +-
 .../static/plugs/ckeditor5/translations/nb.js |  2 +-
 .../static/plugs/ckeditor5/translations/ne.js |  2 +-
 .../static/plugs/ckeditor5/translations/nl.js |  2 +-
 .../static/plugs/ckeditor5/translations/no.js |  2 +-
 .../static/plugs/ckeditor5/translations/pl.js |  2 +-
 .../plugs/ckeditor5/translations/pt-br.js     |  2 +-
 .../static/plugs/ckeditor5/translations/pt.js |  2 +-
 .../static/plugs/ckeditor5/translations/ro.js |  2 +-
 .../static/plugs/ckeditor5/translations/ru.js |  2 +-
 .../static/plugs/ckeditor5/translations/sk.js |  2 +-
 .../static/plugs/ckeditor5/translations/sl.js |  2 +-
 .../static/plugs/ckeditor5/translations/sq.js |  2 +-
 .../plugs/ckeditor5/translations/sr-latn.js   |  2 +-
 .../static/plugs/ckeditor5/translations/sr.js |  2 +-
 .../static/plugs/ckeditor5/translations/sv.js |  2 +-
 .../static/plugs/ckeditor5/translations/th.js |  2 +-
 .../static/plugs/ckeditor5/translations/tk.js |  2 +-
 .../static/plugs/ckeditor5/translations/tr.js |  2 +-
 .../static/plugs/ckeditor5/translations/tt.js |  2 +-
 .../static/plugs/ckeditor5/translations/ug.js |  2 +-
 .../static/plugs/ckeditor5/translations/uk.js |  2 +-
 .../static/plugs/ckeditor5/translations/ur.js |  2 +-
 .../static/plugs/ckeditor5/translations/uz.js |  2 +-
 .../static/plugs/ckeditor5/translations/vi.js |  2 +-
 .../static/plugs/ckeditor5/translations/zh.js |  2 +-
 public/static/plugs/vue/vue.min.js            |  6 ++---
 64 files changed, 81 insertions(+), 79 deletions(-)

diff --git a/public/static/plugs/ckeditor5/ckeditor.css b/public/static/plugs/ckeditor5/ckeditor.css
index e2347f231..3f7859e97 100644
--- a/public/static/plugs/ckeditor5/ckeditor.css
+++ b/public/static/plugs/ckeditor5/ckeditor.css
@@ -1,18 +1,19 @@
 /*! For licensing, see https://gitee.com/zoujingli/think-admin-editor */
 /*!
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
  * For licensing, see LICENSE.md.
  */
-.ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-modal) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}
+.ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-dialog-background:var(--ck-custom-background);--ck-color-dialog-form-header-border:var(--ck-custom-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}
 .ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}
 .ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}
 .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}
+.ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-list-button-padding);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}
 .ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-selector__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}
 .ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}
 .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0;transform:translate(calc(var(--ck-spacing-medium)*-1),-6px) scale(.75);transform-origin:100% 0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}
 :root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}
 .ck-textarea{overflow-x:hidden}
-:root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}
+:root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}
 .ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}
 .ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}
 .ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}
@@ -22,21 +23,22 @@
 .ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}
 .color-picker-hex-input{width:max-content}.color-picker-hex-input .ck.ck-input{min-width:unset}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:unset}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:unset}.ck.ck-color-picker__row .ck.ck-input-text{width:unset}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}
 .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{align-items:center;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{display:flex;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{flex:1}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{width:100%}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker{padding:8px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker{height:100px;min-width:180px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{padding:0 8px 8px}
-:root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}
-.ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}
+.ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:44px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header>.ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header>.ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{--ck-font-size-base:15px;font-weight:700}
+.ck.ck-dialog .ck.ck-dialog__actions{display:flex;justify-content:flex-end;padding:var(--ck-spacing-large)}.ck.ck-dialog .ck.ck-dialog__actions>*+*{margin-left:var(--ck-spacing-large)}
+.ck.ck-dialog-overlay{bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{animation:none;background:none;pointer-events:none}.ck.ck-dialog{overscroll-behavior:none;position:absolute;width:fit-content}.ck.ck-dialog .ck.ck-form__header{flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}:root{--ck-dialog-overlay-background-color:rgba(0,0,0,.5);--ck-dialog-drop-shadow:0px 0px 6px 2px rgba(0,0,0,.15);--ck-dialog-max-width:100vw;--ck-dialog-max-height:90vh;--ck-color-dialog-background:var(--ck-color-base-background);--ck-color-dialog-form-header-border:var(--ck-color-base-border)}.ck.ck-dialog-overlay{animation:ck-dialog-fade-in .3s;background:var(--ck-dialog-overlay-background-color);z-index:var(--ck-z-dialog)}.ck.ck-dialog{border-radius:0}.ck-rounded-corners .ck.ck-dialog,.ck.ck-dialog.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dialog{--ck-drop-shadow:var(--ck-dialog-drop-shadow);background:var(--ck-color-dialog-background);border:1px solid var(--ck-color-base-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:var(--ck-dialog-max-height);max-width:var(--ck-dialog-max-width)}.ck.ck-dialog .ck.ck-form__header{border-bottom:1px solid var(--ck-color-dialog-form-header-border)}@keyframes ck-dialog-fade-in{0%{background:transparent}to{background:var(--ck-dialog-overlay-background-color)}}
+:root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-panel)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}
+.ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-dialog) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}
 .ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}
 :root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background)}
-.ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header .ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header .ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{font-weight:700}
 .ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}
-.ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}
-.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}
+.ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}
+.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}
 .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}:root{--ck-search-field-view-horizontal-spacing:calc(var(--ck-icon-size) + var(--ck-spacing-medium))}.ck.ck-search>.ck-labeled-field-view .ck-input{width:100%}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon{--ck-labeled-field-label-default-position-x:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon>.ck-labeled-field-view__input-wrapper>.ck-icon{opacity:.5;pointer-events:none}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input,[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input:not(.ck-input-text_empty){padding-left:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset{--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset.ck-labeled-field-view_empty{--ck-labeled-field-empty-unfocused-max-width:100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{background:none;min-height:auto;min-width:auto;opacity:.5;padding:0}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{left:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset:hover{opacity:1}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input:not(.ck-input-text_empty),[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{padding-right:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-search__results{min-width:100%}.ck.ck-search>.ck-search__results>.ck-search__info{padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-search>.ck-search__results>.ck-search__info *{white-space:normal}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{font-weight:700}.ck.ck-search>.ck-search__results>.ck-search__info>span:last-child{margin-top:var(--ck-spacing-medium)}
-.ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-modal)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}
+.ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}
 .ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:initial}
-.ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-list-button-padding);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}
 .ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:1}:root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{animation:rotate 1.5s linear infinite}.ck.ck-spinner,.ck.ck-spinner-container{height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}.ck.ck-spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent}@keyframes rotate{to{transform:rotate(1turn)}}
 .ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}
-.ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.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-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius: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)}
+.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-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.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-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius: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)}
 .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)}
 .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}
 .ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}
@@ -79,4 +81,4 @@
 .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}
 :root{--ck-color-selector-caption-background:#f7f7f7;--ck-color-selector-caption-text:#333;--ck-color-selector-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-selector-caption-background);caption-side:top;color:var(--ck-color-selector-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.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-selector-caption-highlighted-background)}to{background-color:var(--ck-color-selector-caption-background)}}
 :root{--ck-color-selector-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 table{overflow:hidden}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word;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-selector-column-resizer-hover);bottom:-999999px;opacity:.25;top:-999999px}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}
-.ck ol,.ck ul{margin:revert;padding:revert}.ck li{list-style:revert}
+.ck ol,.ck ul{margin:revert;padding:revert}.ck li{list-style:revert}.ck-powered-by{display:none}
diff --git a/public/static/plugs/ckeditor5/ckeditor.js b/public/static/plugs/ckeditor5/ckeditor.js
index 549136476..380379143 100644
--- a/public/static/plugs/ckeditor5/ckeditor.js
+++ b/public/static/plugs/ckeditor5/ckeditor.js
@@ -1,7 +1,7 @@
-!function(e){const t=e["zh-cn"]=e["zh-cn"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"第 %0 步,共 %1 步",Accept:"接受","Align cell text to the bottom":"使单元格文本对齐到底部","Align cell text to the center":"使单元格文本水平居中","Align cell text to the left":"使单元格文本左对齐","Align cell text to the middle":"使单元格文本垂直居中","Align cell text to the right":"使单元格文本右对齐","Align cell text to the top":"使单元格文本对齐到顶部","Align center":"居中对齐","Align left":"左对齐","Align right":"右对齐","Align table to the left":"使表格左对齐","Align table to the right":"使表格右对齐",Alignment:"对齐",Aquamarine:"海蓝色",Background:"背景",Big:"大",Black:"黑色","Block quote":"块引用",Blue:"蓝色",Bold:"加粗",Border:"边框","Break text":"文字断行","Bulleted List":"项目符号列表","Bulleted list styles toolbar":"项目符号列表样式工具条",Cancel:"取消","Caption for image: %0":"图片说明:%0","Caption for the image":"图片说明:","Cell properties":"单元格属性","Center table":"表格居中","Centered image":"图片居中","Change image text alternative":"更改图片替换文本","Choose heading":"标题类型",Circle:"空心圆点",Clear:"清除","Click to edit block":"单击以编辑块",Code:"代码",Color:"颜色","Color picker":"颜色选择器",Column:"列",Dashed:"虚线",Decimal:"阿拉伯数字","Decimal with leading zero":"前导零阿拉伯数字","Decrease indent":"减少缩进",Default:"默认","Delete column":"删除本列","Delete row":"删除本行","Dim grey":"暗灰色",Dimensions:"尺寸",Disc:"实心圆点","Document colors":"文档中的颜色",Dotted:"点状虚线",Double:"双线",Downloadable:"可下载","Drag to move":"拖拽以移动","Dropdown toolbar":"下拉工具栏","Edit block":"编辑框","Edit link":"修改链接","Editor block content toolbar":"编辑器块内容工具栏","Editor contextual toolbar":"编辑器上下文工具栏","Editor editing area: %0":"编辑器编辑区域:%0","Editor toolbar":"编辑器工具栏","Enter image caption":"输入图片标题","Enter table caption":"输入表标题","Font Background Color":"字体背景色","Font Color":"字体颜色","Font Family":"字体","Font Size":"字体大小","Full size image":"全尺寸图片",Green:"绿色",Grey:"灰色",Groove:"凹槽边框","Header column":"标题列","Header row":"标题行",Heading:"标题","Heading 1":"标题 1","Heading 2":"标题 2","Heading 3":"标题 3","Heading 4":"标题 4","Heading 5":"标题 5","Heading 6":"标题 6",Height:"高度",HEX:"十六进制","Horizontal line":"水平线","Horizontal text alignment toolbar":"水平文本对齐工具栏","HTML object":"HTML对象",Huge:"极大","Image resize list":"图片大小列表","Image toolbar":"图片工具栏","image widget":"图片组件","In line":"行内","Increase indent":"增加缩进",Insert:"插入","Insert column left":"左侧插入列","Insert column right":"右侧插入列","Insert image":"插入图像","Insert image via URL":"通过URL地址插入图片","Insert paragraph after block":"在后面插入段落","Insert paragraph before block":"在前面插入段落","Insert row above":"在上面插入一行","Insert row below":"在下面插入一行","Insert table":"插入表格",Inset:"凹边框",Italic:"倾斜",Justify:"两端对齐","Justify cell text":"对齐单元格文本","Left aligned image":"图片左侧对齐","Light blue":"浅蓝色","Light green":"浅绿色","Light grey":"浅灰色",Link:"超链接","Link image":"链接图片","Link URL":"链接网址","List properties":"列表属性","Lower-latin":"小写拉丁字母","Lower–roman":"小写罗马数字","Merge cell down":"向下合并单元格","Merge cell left":"向左合并单元格","Merge cell right":"向右合并单元格","Merge cell up":"向上合并单元格","Merge cells":"合并单元格",Next:"下一步","No results found":"未找到结果","No searchable items":"没有可搜索的项目",None:"无","Numbered List":"项目编号列表","Numbered list styles toolbar":"项目编号列表样式工具条","Open in a new tab":"在新标签页中打开","Open link in new tab":"在新标签页中打开链接",Orange:"橙色",Original:"原始大小",Outset:"凸边框",Padding:"内边距",Paragraph:"段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下“Enter”键,在小组件后输入;按下“Shift+Enter”键,在小组件前输入",Previous:"上一步",Purple:"紫色",Red:"红色",Redo:"重做","Remove color":"移除颜色","Remove Format":"移除格式","Replace from computer":"从电脑替换","Replace image":"替换图片","Replace image from computer":"从电脑替换图片","Resize image":"调整图像大小","Resize image to %0":"调整图像大小为%0","Resize image to the original size":"调整图像大小为原始大小","Restore default":"恢复默认","Reversed order":"顺序反转","Rich Text Editor":"富文本编辑器",Ridge:"垄状边框","Right aligned image":"图片右侧对齐",Row:"行",Save:"保存","Select all":"全选","Select column":"选择列","Select row":"选择行","Show more items":"显示更多","Side image":"图片侧边显示",Small:"小",Solid:"实线","Split cell horizontally":"横向拆分单元格","Split cell vertically":"纵向拆分单元格",Square:"实心方块","Start at":"起始编号","Start index must be greater than 0.":"起始编号必须大于0。",Strikethrough:"删除线",Style:"样式",Subscript:"下标",Superscript:"上标","Table alignment toolbar":"表格对齐工具栏","Table cell text alignment":"表格单元格中的文本水平对齐","Table properties":"表格属性","Table toolbar":"表格工具栏","Text alignment":"对齐","Text alignment toolbar":"对齐工具栏","Text alternative":"替换文本",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'颜色无效。尝试使用"#FF0000"、"rgb(255,0,0)"或者"red"。','The value is invalid. Try "10px" or "2em" or simply "2".':"无效值。尝试使用“10px”、“2ex”或者只写“2”。","This link has no URL":"此链接没有设置网址",Tiny:"极小","To-do List":"待办列表","Toggle caption off":"关闭表标题","Toggle caption on":"打开表标题","Toggle the circle list style":"切换空心原点列表样式","Toggle the decimal list style":"切换阿拉伯数字列表样式","Toggle the decimal with leading zero list style":"切换前导零阿拉伯数字列表样式","Toggle the disc list style":"切换实心原点列表样式","Toggle the lower–latin list style":"切换小写拉丁字母列表样式","Toggle the lower–roman list style":"切换小写罗马数字列表样式","Toggle the square list style":"切换实心方块列表样式","Toggle the upper–latin list style":"切换大写拉丁字母列表样式","Toggle the upper–roman list style":"切换大写罗马数字列表样式",Turquoise:"青色","Type or paste your content here.":"在这里输入或粘贴内容","Type your title":"输入标题",Underline:"下划线",Undo:"撤销",Unlink:"取消超链接",Update:"更新","Update image URL":"更新图片URL地址","Upload failed":"上传失败","Upload from computer":"从电脑上传","Upload image from computer":"从电脑上传图片","Upload in progress":"正在上传","Upper-latin":"大写拉丁字母","Upper-roman":"大写罗马数字","Vertical text alignment toolbar":"垂直文本对齐工具栏",White:"白色","Widget toolbar":"小部件工具栏",Width:"宽度","Wrap text":"文字环绕",Yellow:"黄色"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
+!function(e){const t=e["zh-cn"]=e["zh-cn"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"第 %0 步,共 %1 步",Accept:"接受","Align cell text to the bottom":"使单元格文本对齐到底部","Align cell text to the center":"使单元格文本水平居中","Align cell text to the left":"使单元格文本左对齐","Align cell text to the middle":"使单元格文本垂直居中","Align cell text to the right":"使单元格文本右对齐","Align cell text to the top":"使单元格文本对齐到顶部","Align center":"居中对齐","Align left":"左对齐","Align right":"右对齐","Align table to the left":"使表格左对齐","Align table to the right":"使表格右对齐",Alignment:"对齐",Aquamarine:"海蓝色",Background:"背景",Big:"大",Black:"黑色","Block quote":"块引用",Blue:"蓝色",Bold:"加粗",Border:"边框","Break text":"文字断行","Bulleted List":"项目符号列表","Bulleted list styles toolbar":"项目符号列表样式工具条",Cancel:"取消","Caption for image: %0":"图片说明:%0","Caption for the image":"图片说明:","Cell properties":"单元格属性","Center table":"表格居中","Centered image":"图片居中","Change image text alternative":"更改图片替换文本","Choose heading":"标题类型",Circle:"空心圆点",Clear:"清除","Click to edit block":"单击以编辑块",Close:"关闭",Code:"代码",Color:"颜色","Color picker":"颜色选择器",Column:"列",Dashed:"虚线",Decimal:"阿拉伯数字","Decimal with leading zero":"前导零阿拉伯数字","Decrease indent":"减少缩进",Default:"默认","Delete column":"删除本列","Delete row":"删除本行","Dim grey":"暗灰色",Dimensions:"尺寸",Disc:"实心圆点","Document colors":"文档中的颜色",Dotted:"点状虚线",Double:"双线",Downloadable:"可下载","Drag to move":"拖拽以移动","Dropdown toolbar":"下拉工具栏","Edit block":"编辑框","Edit link":"修改链接","Editor block content toolbar":"编辑器块内容工具栏","Editor contextual toolbar":"编辑器上下文工具栏","Editor dialog":"编辑器对话框","Editor editing area: %0":"编辑器编辑区域:%0","Editor toolbar":"编辑器工具栏","Enter image caption":"输入图片标题","Enter table caption":"输入表标题","Font Background Color":"字体背景色","Font Color":"字体颜色","Font Family":"字体","Font Size":"字体大小","Full size image":"全尺寸图片",Green:"绿色",Grey:"灰色",Groove:"凹槽边框","Header column":"标题列","Header row":"标题行",Heading:"标题","Heading 1":"标题 1","Heading 2":"标题 2","Heading 3":"标题 3","Heading 4":"标题 4","Heading 5":"标题 5","Heading 6":"标题 6",Height:"高度",HEX:"十六进制","Horizontal line":"水平线","Horizontal text alignment toolbar":"水平文本对齐工具栏","HTML object":"HTML对象",Huge:"极大","Image resize list":"图片大小列表","Image toolbar":"图片工具栏","image widget":"图片组件","In line":"行内","Increase indent":"增加缩进",Insert:"插入","Insert column left":"左侧插入列","Insert column right":"右侧插入列","Insert image":"插入图像","Insert image via URL":"通过URL地址插入图片","Insert paragraph after block":"在后面插入段落","Insert paragraph before block":"在前面插入段落","Insert row above":"在上面插入一行","Insert row below":"在下面插入一行","Insert table":"插入表格",Inset:"凹边框",Italic:"倾斜",Justify:"两端对齐","Justify cell text":"对齐单元格文本","Left aligned image":"图片左侧对齐","Light blue":"浅蓝色","Light green":"浅绿色","Light grey":"浅灰色",Link:"超链接","Link image":"链接图片","Link URL":"链接网址","List properties":"列表属性","Lower-latin":"小写拉丁字母","Lower–roman":"小写罗马数字","Merge cell down":"向下合并单元格","Merge cell left":"向左合并单元格","Merge cell right":"向右合并单元格","Merge cell up":"向上合并单元格","Merge cells":"合并单元格",Next:"下一步","No results found":"未找到结果","No searchable items":"没有可搜索的项目",None:"无","Numbered List":"项目编号列表","Numbered list styles toolbar":"项目编号列表样式工具条","Open in a new tab":"在新标签页中打开","Open link in new tab":"在新标签页中打开链接",Orange:"橙色",Original:"原始大小",Outset:"凸边框",Padding:"内边距",Paragraph:"段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下“Enter”键,在小组件后输入;按下“Shift+Enter”键,在小组件前输入",Previous:"上一步",Purple:"紫色",Red:"红色",Redo:"重做","Remove color":"移除颜色","Remove Format":"移除格式","Replace from computer":"从电脑替换","Replace image":"替换图片","Replace image from computer":"从电脑替换图片","Resize image":"调整图像大小","Resize image to %0":"调整图像大小为%0","Resize image to the original size":"调整图像大小为原始大小","Restore default":"恢复默认","Reversed order":"顺序反转","Rich Text Editor":"富文本编辑器",Ridge:"垄状边框","Right aligned image":"图片右侧对齐",Row:"行",Save:"保存","Select all":"全选","Select column":"选择列","Select row":"选择行","Show more items":"显示更多","Side image":"图片侧边显示",Small:"小",Solid:"实线","Split cell horizontally":"横向拆分单元格","Split cell vertically":"纵向拆分单元格",Square:"实心方块","Start at":"起始编号","Start index must be greater than 0.":"起始编号必须大于0。",Strikethrough:"删除线",Style:"样式",Subscript:"下标",Superscript:"上标","Table alignment toolbar":"表格对齐工具栏","Table cell text alignment":"表格单元格中的文本水平对齐","Table properties":"表格属性","Table toolbar":"表格工具栏","Text alignment":"对齐","Text alignment toolbar":"对齐工具栏","Text alternative":"替换文本",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'颜色无效。尝试使用"#FF0000"、"rgb(255,0,0)"或者"red"。','The value is invalid. Try "10px" or "2em" or simply "2".':"无效值。尝试使用“10px”、“2ex”或者只写“2”。","This link has no URL":"此链接没有设置网址",Tiny:"极小","To-do List":"待办列表","Toggle caption off":"关闭表标题","Toggle caption on":"打开表标题","Toggle the circle list style":"切换空心原点列表样式","Toggle the decimal list style":"切换阿拉伯数字列表样式","Toggle the decimal with leading zero list style":"切换前导零阿拉伯数字列表样式","Toggle the disc list style":"切换实心原点列表样式","Toggle the lower–latin list style":"切换小写拉丁字母列表样式","Toggle the lower–roman list style":"切换小写罗马数字列表样式","Toggle the square list style":"切换实心方块列表样式","Toggle the upper–latin list style":"切换大写拉丁字母列表样式","Toggle the upper–roman list style":"切换大写罗马数字列表样式",Turquoise:"青色","Type or paste your content here.":"在这里输入或粘贴内容","Type your title":"输入标题",Underline:"下划线",Undo:"撤销",Unlink:"取消超链接",Update:"更新","Update image URL":"更新图片URL地址","Upload failed":"上传失败","Upload from computer":"从电脑上传","Upload image from computer":"从电脑上传图片","Upload in progress":"正在上传","Upper-latin":"大写拉丁字母","Upper-roman":"大写罗马数字","Vertical text alignment toolbar":"垂直文本对齐工具栏",White:"白色","Widget toolbar":"小部件工具栏",Width:"宽度","Wrap text":"文字环绕",Yellow:"黄色"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
 /*! For licensing, see https://gitee.com/zoujingli/think-admin-editor */
 /*!
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
  * For licensing, see LICENSE.md.
  */
-function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()}(self,(()=>(()=>{var e={168:(e,t,i)=>{const n=i(874),s={};for(const e of Object.keys(n))s[n[e]]=e;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const e of Object.keys(o)){if(!("channels"in o[e]))throw new Error("missing channels property: "+e);if(!("labels"in o[e]))throw new Error("missing channel labels property: "+e);if(o[e].labels.length!==o[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:i}=o[e];delete o[e].channels,delete o[e].labels,Object.defineProperty(o[e],"channels",{value:t}),Object.defineProperty(o[e],"labels",{value:i})}o.rgb.hsl=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.min(t,i,n),o=Math.max(t,i,n),r=o-s;let a,l;o===s?a=0:t===o?a=(i-n)/r:i===o?a=2+(n-t)/r:n===o&&(a=4+(t-i)/r),a=Math.min(60*a,360),a<0&&(a+=360);const c=(s+o)/2;return l=o===s?0:c<=.5?r/(o+s):r/(2-o-s),[a,100*l,100*c]},o.rgb.hsv=function(e){let t,i,n,s,o;const r=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(r,a,l),d=c-Math.min(r,a,l),h=function(e){return(c-e)/6/d+.5};return 0===d?(s=0,o=0):(o=d/c,t=h(r),i=h(a),n=h(l),r===c?s=n-i:a===c?s=1/3+t-n:l===c&&(s=2/3+i-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*o,100*c]},o.rgb.hwb=function(e){const t=e[0],i=e[1];let n=e[2];const s=o.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(i,n));return n=1-1/255*Math.max(t,Math.max(i,n)),[s,100*r,100*n]},o.rgb.cmyk=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-i,1-n);return[100*((1-t-s)/(1-s)||0),100*((1-i-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*s]},o.rgb.keyword=function(e){const t=s[e];if(t)return t;let i,o=1/0;for(const t of Object.keys(n)){const s=n[t],l=(a=s,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);l<o&&(o=l,i=t)}var r,a;return i},o.keyword.rgb=function(e){return n[e]},o.rgb.xyz=function(e){let t=e[0]/255,i=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*i+.1805*n),100*(.2126*t+.7152*i+.0722*n),100*(.0193*t+.1192*i+.9505*n)]},o.rgb.lab=function(e){const t=o.rgb.xyz(e);let i=t[0],n=t[1],s=t[2];i/=95.047,n/=100,s/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*n-16,500*(i-n),200*(n-s)]},o.hsl.rgb=function(e){const t=e[0]/360,i=e[1]/100,n=e[2]/100;let s,o,r;if(0===i)return r=255*n,[r,r,r];s=n<.5?n*(1+i):n+i-n*i;const a=2*n-s,l=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,r=6*o<1?a+6*(s-a)*o:2*o<1?s:3*o<2?a+(s-a)*(2/3-o)*6:a,l[e]=255*r;return l},o.hsl.hsv=function(e){const t=e[0];let i=e[1]/100,n=e[2]/100,s=i;const o=Math.max(n,.01);n*=2,i*=n<=1?n:2-n,s*=o<=1?o:2-o;return[t,100*(0===n?2*s/(o+s):2*i/(n+i)),100*((n+i)/2)]},o.hsv.rgb=function(e){const t=e[0]/60,i=e[1]/100;let n=e[2]/100;const s=Math.floor(t)%6,o=t-Math.floor(t),r=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o));switch(n*=255,s){case 0:return[n,l,r];case 1:return[a,n,r];case 2:return[r,n,l];case 3:return[r,a,n];case 4:return[l,r,n];case 5:return[n,r,a]}},o.hsv.hsl=function(e){const t=e[0],i=e[1]/100,n=e[2]/100,s=Math.max(n,.01);let o,r;r=(2-i)*n;const a=(2-i)*s;return o=i*s,o/=a<=1?a:2-a,o=o||0,r/=2,[t,100*o,100*r]},o.hwb.rgb=function(e){const t=e[0]/360;let i=e[1]/100,n=e[2]/100;const s=i+n;let o;s>1&&(i/=s,n/=s);const r=Math.floor(6*t),a=1-n;o=6*t-r,0!=(1&r)&&(o=1-o);const l=i+o*(a-i);let c,d,h;switch(r){default:case 6:case 0:c=a,d=l,h=i;break;case 1:c=l,d=a,h=i;break;case 2:c=i,d=a,h=l;break;case 3:c=i,d=l,h=a;break;case 4:c=l,d=i,h=a;break;case 5:c=a,d=i,h=l}return[255*c,255*d,255*h]},o.cmyk.rgb=function(e){const t=e[0]/100,i=e[1]/100,n=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,i*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s))]},o.xyz.rgb=function(e){const t=e[0]/100,i=e[1]/100,n=e[2]/100;let s,o,r;return s=3.2406*t+-1.5372*i+-.4986*n,o=-.9689*t+1.8758*i+.0415*n,r=.0557*t+-.204*i+1.057*n,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),r=Math.min(Math.max(0,r),1),[255*s,255*o,255*r]},o.xyz.lab=function(e){let t=e[0],i=e[1],n=e[2];t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*i-16,500*(t-i),200*(i-n)]},o.lab.xyz=function(e){let t,i,n;i=(e[0]+16)/116,t=e[1]/500+i,n=i-e[2]/200;const s=i**3,o=t**3,r=n**3;return i=s>.008856?s:(i-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,t*=95.047,i*=100,n*=108.883,[t,i,n]},o.lab.lch=function(e){const t=e[0],i=e[1],n=e[2];let s;s=360*Math.atan2(n,i)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(i*i+n*n),s]},o.lch.lab=function(e){const t=e[0],i=e[1],n=e[2]/360*2*Math.PI;return[t,i*Math.cos(n),i*Math.sin(n)]},o.rgb.ansi16=function(e,t=null){const[i,n,s]=e;let r=null===t?o.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===r&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){const t=e[0],i=e[1],n=e[2];if(t===i&&i===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},o.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const i=.5*(1+~~(e>50));return[(1&t)*i*255,(t>>1&1)*i*255,(t>>2&1)*i*255]},o.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},o.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let i=t[0];3===t[0].length&&(i=i.split("").map((e=>e+e)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},o.rgb.hcg=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,i),n),o=Math.min(Math.min(t,i),n),r=s-o;let a,l;return a=r<1?o/(1-r):0,l=r<=0?0:s===t?(i-n)/r%6:s===i?2+(n-t)/r:4+(t-i)/r,l/=6,l%=1,[360*l,100*r,100*a]},o.hsl.hcg=function(e){const t=e[1]/100,i=e[2]/100,n=i<.5?2*t*i:2*t*(1-i);let s=0;return n<1&&(s=(i-.5*n)/(1-n)),[e[0],100*n,100*s]},o.hsv.hcg=function(e){const t=e[1]/100,i=e[2]/100,n=t*i;let s=0;return n<1&&(s=(i-n)/(1-n)),[e[0],100*n,100*s]},o.hcg.rgb=function(e){const t=e[0]/360,i=e[1]/100,n=e[2]/100;if(0===i)return[255*n,255*n,255*n];const s=[0,0,0],o=t%1*6,r=o%1,a=1-r;let l=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=r,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=r;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=r,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return l=(1-i)*n,[255*(i*s[0]+l),255*(i*s[1]+l),255*(i*s[2]+l)]},o.hcg.hsv=function(e){const t=e[1]/100,i=t+e[2]/100*(1-t);let n=0;return i>0&&(n=t/i),[e[0],100*n,100*i]},o.hcg.hsl=function(e){const t=e[1]/100,i=e[2]/100*(1-t)+.5*t;let n=0;return i>0&&i<.5?n=t/(2*i):i>=.5&&i<1&&(n=t/(2*(1-i))),[e[0],100*n,100*i]},o.hcg.hwb=function(e){const t=e[1]/100,i=t+e[2]/100*(1-t);return[e[0],100*(i-t),100*(1-i)]},o.hwb.hcg=function(e){const t=e[1]/100,i=1-e[2]/100,n=i-t;let s=0;return n<1&&(s=(i-n)/(1-n)),[e[0],100*n,100*s]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=function(e){return[0,0,e[0]]},o.gray.hsv=o.gray.hsl,o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(i.length)+i},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},85:(e,t,i)=>{const n=i(168),s=i(111),o={};Object.keys(n).forEach((e=>{o[e]={},Object.defineProperty(o[e],"channels",{value:n[e].channels}),Object.defineProperty(o[e],"labels",{value:n[e].labels});const t=s(e);Object.keys(t).forEach((i=>{const n=t[i];o[e][i]=function(e){const t=function(...t){const i=t[0];if(null==i)return i;i.length>1&&(t=i);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),o[e][i].raw=function(e){const t=function(...t){const i=t[0];return null==i?i:(i.length>1&&(t=i),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=o},111:(e,t,i)=>{const n=i(168);function s(e){const t=function(){const e={},t=Object.keys(n);for(let i=t.length,n=0;n<i;n++)e[t[n]]={distance:-1,parent:null};return e}(),i=[e];for(t[e].distance=0;i.length;){const e=i.pop(),s=Object.keys(n[e]);for(let n=s.length,o=0;o<n;o++){const n=s[o],r=t[n];-1===r.distance&&(r.distance=t[e].distance+1,r.parent=e,i.unshift(n))}}return t}function o(e,t){return function(i){return t(e(i))}}function r(e,t){const i=[t[e].parent,e];let s=n[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)i.unshift(t[r].parent),s=o(n[t[r].parent][r],s),r=t[r].parent;return s.conversion=i,s}e.exports=function(e){const t=s(e),i={},n=Object.keys(t);for(let e=n.length,s=0;s<e;s++){const e=n[s];null!==t[e].parent&&(i[e]=r(e,t))}return i}},874:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{"use strict";function e({emitter:e,activator:t,callback:i,contextElements:n}){e.listenTo(document,"mousedown",((e,s)=>{if(!t())return;const o="function"==typeof s.composedPath?s.composedPath():[],r="function"==typeof n?n():n;for(const e of r)if(e.contains(s.target)||o.includes(e))return;i()}))}function t(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function s({view:e}){e.listenTo(e.element,"submit",((t,i)=>{i.preventDefault(),e.fire("submit")}),{useCapture:!0})}function o({keystrokeHandler:e,focusTracker:t,gridItems:i,numberOfColumns:n,uiLanguageDirection:s}){const o="number"==typeof n?()=>n:n;function r(e){return n=>{const s=i.find((e=>e.element===t.focusedElement)),o=i.getIndex(s),r=e(o,i);i.get(r).focus(),n.stopPropagation(),n.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function l(e,t){return 0===e?t-1:e-1}e.set("arrowright",r(((e,t)=>"rtl"===s?l(e,t.length):a(e,t.length)))),e.set("arrowleft",r(((e,t)=>"rtl"===s?a(e,t.length):l(e,t.length)))),e.set("arrowup",r(((e,t)=>{let i=e-o();return i<0&&(i=e+o()*Math.floor(t.length/o()),i>t.length-1&&(i-=o())),i}))),e.set("arrowdown",r(((e,t)=>{let i=e+o();return i>t.length-1&&(i=e%o()),i})))}i.d(n,{default:()=>FE});const r=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),a={isMac:c(r),isWindows:function(e){return e.indexOf("windows")>-1}(r),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(r),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(r),isiOS:function(e){return!!e.match(/iphone|ipad/i)||c(e)&&navigator.maxTouchPoints>0}(r),isAndroid:function(e){return e.indexOf("android")>-1}(r),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(r),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},l=a;function c(e){return e.indexOf("macintosh")>-1}function d(e,t,i,n){i=i||function(e,t){return e===t};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,i){const n=h(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=u(e,n),o=u(t,n),r=h(s,o,i),a=e.length-r,l=t.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}(s,o,i),a=n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:s}=e;if(-1===i)return Array(t).fill("equal");let o=[];i>0&&(o=o.concat(Array(i).fill("equal")));s-i>0&&(o=o.concat(Array(s-i).fill("insert")));n-i>0&&(o=o.concat(Array(n-i).fill("delete")));s<t&&(o=o.concat(Array(t-s).fill("equal")));return o}(r,o.length):function(e,t){const i=[],{firstIndex:n,lastIndexOld:s,lastIndexNew:o}=t;o-n>0&&i.push({index:n,type:"insert",values:e.slice(n,o)});s-n>0&&i.push({index:n+(o-n),type:"delete",howMany:s-n});return i}(o,r);return a}function h(e,t,i){for(let n=0;n<Math.max(e.length,t.length);n++)if(void 0===e[n]||void 0===t[n]||!i(e[n],t[n]))return n;return-1}function u(e,t){return e.slice(t).reverse()}function m(e,t,i){i=i||function(e,t){return e===t};const n=e.length,s=t.length;if(n>200||s>200||n+s>300)return m.fastDiff(e,t,i,!0);let o,r;if(s<n){const i=e;e=t,t=i,o="delete",r="insert"}else o="insert",r="delete";const a=e.length,l=t.length,c=l-a,d={},h={};function u(n){const s=(void 0!==h[n-1]?h[n-1]:-1)+1,c=void 0!==h[n+1]?h[n+1]:-1,u=s>c?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(s>c?o:r);let m=Math.max(s,c),g=m-n;for(;g<a&&m<l&&i(e[g],t[m]);)g++,m++,d[n].push("equal");return m}let g,f=0;do{for(g=-f;g<c;g++)h[g]=u(g);for(g=c+f;g>c;g--)h[g]=u(g);h[c]=u(c),f++}while(h[c]!==l);return d[c].slice(1)}m.fastDiff=d;const g=function(){return function e(){e.called=!0}};class f{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=g(),this.off=g()}}const p=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function b(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+p[e>>0&255]+p[e>>8&255]+p[e>>16&255]+p[e>>24&255]+p[t>>0&255]+p[t>>8&255]+p[t>>16&255]+p[t>>24&255]+p[i>>0&255]+p[i>>8&255]+p[i>>16&255]+p[i>>24&255]+p[n>>0&255]+p[n>>8&255]+p[n>>16&255]+p[n>>24&255]}const w={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function v(e,t){const i=w.get(t.priority);for(let n=0;n<e.length;n++)if(w.get(e[n].priority)<i)return void e.splice(n,0,t);e.push(t)}const _="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class y extends Error{constructor(e,t,i){super(function(e,t){const i=new WeakSet,n=(e,t)=>{if("object"==typeof t&&null!==t){if(i.has(t))return`[object ${t.constructor.name}]`;i.add(t)}return t},s=t?` ${JSON.stringify(t,n)}`:"",o=C(e);return e+s+o}(e,i)),this.name="CKEditorError",this.context=t,this.data=i}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const i=new y(e.message,t);throw i.stack=e.stack,i}}function k(e,t){console.warn(...A(e,t))}function C(e){return`\nRead more: ${_}#error-${e}`}function A(e,t){const i=C(e);return t?[e,t,i]:[e,i]}const x="40.2.0",T=new Date(2023,11,12);if(globalThis.CKEDITOR_VERSION)throw new y("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=x;const E=Symbol("listeningTo"),S=Symbol("emitterId"),P=Symbol("delegations"),I=V(Object);function V(e){if(!e)return I;return class extends e{on(e,t,i){this.listenTo(this,e,t,i)}once(e,t,i){let n=!1;this.listenTo(this,e,((e,...i)=>{n||(n=!0,e.off(),t.call(this,e,...i))}),i)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,i,n={}){let s,o;this[E]||(this[E]={});const r=this[E];O(e)||R(e);const a=O(e);(s=r[a])||(s=r[a]={emitter:e,callbacks:{}}),(o=s.callbacks[t])||(o=s.callbacks[t]=[]),o.push(i),function(e,t,i,n,s){t._addEventListener?t._addEventListener(i,n,s):e._addEventListener.call(t,i,n,s)}(this,e,t,i,n)}stopListening(e,t,i){const n=this[E];let s=e&&O(e);const o=n&&s?n[s]:void 0,r=o&&t?o.callbacks[t]:void 0;if(!(!n||e&&!o||t&&!r))if(i){D(this,e,t,i);-1!==r.indexOf(i)&&(1===r.length?delete o.callbacks[t]:D(this,e,t,i))}else if(r){for(;i=r.pop();)D(this,e,t,i);delete o.callbacks[t]}else if(o){for(t in o.callbacks)this.stopListening(e,t);delete n[s]}else{for(s in n)this.stopListening(n[s].emitter);delete this[E]}}fire(e,...t){try{const i=e instanceof f?e:new f(this,e),n=i.name;let s=N(this,n);if(i.path.push(this),s){const e=[i,...t];s=Array.from(s);for(let t=0;t<s.length&&(s[t].callback.apply(this,e),i.off.called&&(delete i.off.called,this._removeEventListener(n,s[t].callback)),!i.stop.called);t++);}const o=this[P];if(o){const e=o.get(n),s=o.get("*");e&&F(e,i,t),s&&F(s,i,t)}return i.return}catch(e){y.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,i)=>{this[P]||(this[P]=new Map),e.forEach((e=>{const n=this[P].get(e);n?n.set(t,i):this[P].set(e,new Map([[t,i]]))}))}}}stopDelegating(e,t){if(this[P])if(e)if(t){const i=this[P].get(e);i&&i.delete(t)}else this[P].delete(e);else this[P].clear()}_addEventListener(e,t,i){!function(e,t){const i=B(e);if(i[t])return;let n=t,s=null;const o=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},o.push(i[n]),s&&i[n].childEvents.push(s),s=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of o)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(s)}}(this,e);const n=M(this,e),s={callback:t,priority:w.get(i.priority)};for(const e of n)v(e,s)}_removeEventListener(e,t){const i=M(this,e);for(const e of i)for(let i=0;i<e.length;i++)e[i].callback==t&&(e.splice(i,1),i--)}}}function R(e,t){e[S]||(e[S]=t||b())}function O(e){return e[S]}function B(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function M(e,t){const i=B(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t<i.childEvents.length;t++){const s=M(e,i.childEvents[t]);n=n.concat(s)}return n}function N(e,t){let i;return e._events&&(i=e._events[t])&&i.callbacks.length?i.callbacks:t.indexOf(":")>-1?N(e,t.substr(0,t.lastIndexOf(":"))):null}function F(e,t,i){for(let[n,s]of e){s?"function"==typeof s&&(s=s(t.name)):s=t.name;const e=new f(t.source,s);e.path=[...t.path],n.fire(e,...i)}}function D(e,t,i,n){t._removeEventListener?t._removeEventListener(i,n):e._removeEventListener.call(t,i,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{V[e]=I.prototype[e]}));const L=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},z=Symbol("observableProperties"),H=Symbol("boundObservables"),W=Symbol("boundProperties"),j=Symbol("decoratedMethods"),U=Symbol("decoratedOriginal"),q=G(V());function G(e){if(!e)return q;return class extends e{set(e,t){if(L(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);K(this);const i=this[z];if(e in this&&!i.has(e))throw new y("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let s=this.fire(`set:${e}`,e,t,n);void 0===s&&(s=t),n===s&&i.has(e)||(i.set(e,s),this.fire(`change:${e}`,e,s,n))}}),this[e]=t}bind(...e){if(!e.length||!Q(e))throw new y("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new y("observable-bind-duplicate-properties",this);K(this);const t=this[W];e.forEach((e=>{if(t.has(e))throw new y("observable-bind-rebind",this)}));const i=new Map;return e.forEach((e=>{const n={property:e,to:[]};t.set(e,n),i.set(e,n)})),{to:J,toMany:Z,_observable:this,_bindProperties:e,_to:[],_bindings:i}}unbind(...e){if(!this[z])return;const t=this[W],i=this[H];if(e.length){if(!Q(e))throw new y("observable-unbind-wrong-properties",this);e.forEach((e=>{const n=t.get(e);n&&(n.to.forEach((([e,t])=>{const s=i.get(e),o=s[t];o.delete(n),o.size||delete s[t],Object.keys(s).length||(i.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else i.forEach(((e,t)=>{this.stopListening(t,"change")})),i.clear(),t.clear()}decorate(e){K(this);const t=this[e];if(!t)throw new y("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,i)=>{e.return=t.apply(this,i)})),this[e]=function(...t){return this.fire(e,t)},this[e][U]=t,this[j]||(this[j]=[]),this[j].push(e)}stopListening(e,t,i){if(!e&&this[j]){for(const e of this[j])this[e]=this[e][U];delete this[j]}super.stopListening(e,t,i)}}}function K(e){e[z]||(Object.defineProperty(e,z,{value:new Map}),Object.defineProperty(e,H,{value:new Map}),Object.defineProperty(e,W,{value:new Map}))}function J(...e){const t=function(...e){if(!e.length)throw new y("observable-bind-to-parse-error",null);const t={to:[]};let i;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)i.properties.push(e);else{if("object"!=typeof e)throw new y("observable-bind-to-parse-error",null);i={observable:e,properties:[]},t.to.push(i)}})),t}(...e),i=Array.from(this._bindings.keys()),n=i.length;if(!t.callback&&t.to.length>1)throw new y("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new y("observable-bind-to-extra-callback",this);var s;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==n)throw new y("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(i[0]).callback=t.callback),s=this._observable,this._to.forEach((e=>{const t=s[H];let i;t.get(e.observable)||s.listenTo(e.observable,"change",((n,o)=>{i=t.get(e.observable)[o],i&&i.forEach((e=>{Y(s,e.property)}))}))})),function(e){let t;e._bindings.forEach(((i,n)=>{e._to.forEach((s=>{t=s.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([s.observable,t]),function(e,t,i,n){const s=e[H],o=s.get(i),r=o||{};r[n]||(r[n]=new Set);r[n].add(t),o||s.set(i,r)}(e._observable,i,s.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{Y(this._observable,e)}))}function Z(e,t,i){if(this._bindings.size>1)throw new y("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const i=e.map((e=>[e,t]));return Array.prototype.concat.apply([],i)}(e,t),i)}function Q(e){return e.every((e=>"string"==typeof e))}function Y(e,t){const i=e[W].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map((e=>e[0][e[1]]))):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{G[e]=q.prototype[e]}));class X{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function ee(e){let t=0;for(const i of e)t++;return t}function te(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)if(e[n]!=t[n])return n;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function ie(e){return!(!e||!e[Symbol.iterator])}const ne="object"==typeof global&&global&&global.Object===Object&&global;var se="object"==typeof self&&self&&self.Object===Object&&self;const oe=ne||se||Function("return this")();const re=oe.Symbol;var ae=Object.prototype,le=ae.hasOwnProperty,ce=ae.toString,de=re?re.toStringTag:void 0;const he=function(e){var t=le.call(e,de),i=e[de];try{e[de]=void 0;var n=!0}catch(e){}var s=ce.call(e);return n&&(t?e[de]=i:delete e[de]),s};var ue=Object.prototype.toString;const me=function(e){return ue.call(e)};var ge=re?re.toStringTag:void 0;const fe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ge&&ge in Object(e)?he(e):me(e)};const pe=Array.isArray;const be=function(e){return null!=e&&"object"==typeof e};const we=function(e){return"string"==typeof e||!pe(e)&&be(e)&&"[object String]"==fe(e)};function ve(e,t,i={},n=[]){const s=i&&i.xmlns,o=s?e.createElementNS(s,t):e.createElement(t);for(const e in i)o.setAttribute(e,i[e]);!we(n)&&ie(n)||(n=[n]);for(let t of n)we(t)&&(t=e.createTextNode(t)),o.appendChild(t);return o}const _e=function(e,t){return function(i){return e(t(i))}};const ye=_e(Object.getPrototypeOf,Object);var ke=Function.prototype,Ce=Object.prototype,Ae=ke.toString,xe=Ce.hasOwnProperty,Te=Ae.call(Object);const Ee=function(e){if(!be(e)||"[object Object]"!=fe(e))return!1;var t=ye(e);if(null===t)return!0;var i=xe.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Ae.call(i)==Te};const Se=function(){this.__data__=[],this.size=0};const Pe=function(e,t){return e===t||e!=e&&t!=t};const Ie=function(e,t){for(var i=e.length;i--;)if(Pe(e[i][0],t))return i;return-1};var Ve=Array.prototype.splice;const Re=function(e){var t=this.__data__,i=Ie(t,e);return!(i<0)&&(i==t.length-1?t.pop():Ve.call(t,i,1),--this.size,!0)};const Oe=function(e){var t=this.__data__,i=Ie(t,e);return i<0?void 0:t[i][1]};const Be=function(e){return Ie(this.__data__,e)>-1};const Me=function(e,t){var i=this.__data__,n=Ie(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function Ne(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}Ne.prototype.clear=Se,Ne.prototype.delete=Re,Ne.prototype.get=Oe,Ne.prototype.has=Be,Ne.prototype.set=Me;const Fe=Ne;const De=function(){this.__data__=new Fe,this.size=0};const Le=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const ze=function(e){return this.__data__.get(e)};const He=function(e){return this.__data__.has(e)};const $e=function(e){if(!L(e))return!1;var t=fe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const We=oe["__core-js_shared__"];var je=function(){var e=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const Ue=function(e){return!!je&&je in e};var qe=Function.prototype.toString;const Ge=function(e){if(null!=e){try{return qe.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Ke=/^\[object .+?Constructor\]$/,Je=Function.prototype,Ze=Object.prototype,Qe=Je.toString,Ye=Ze.hasOwnProperty,Xe=RegExp("^"+Qe.call(Ye).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const et=function(e){return!(!L(e)||Ue(e))&&($e(e)?Xe:Ke).test(Ge(e))};const tt=function(e,t){return null==e?void 0:e[t]};const it=function(e,t){var i=tt(e,t);return et(i)?i:void 0};const nt=it(oe,"Map");const st=it(Object,"create");const ot=function(){this.__data__=st?st(null):{},this.size=0};const rt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var at=Object.prototype.hasOwnProperty;const lt=function(e){var t=this.__data__;if(st){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return at.call(t,e)?t[e]:void 0};var ct=Object.prototype.hasOwnProperty;const dt=function(e){var t=this.__data__;return st?void 0!==t[e]:ct.call(t,e)};const ht=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=st&&void 0===t?"__lodash_hash_undefined__":t,this};function ut(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ut.prototype.clear=ot,ut.prototype.delete=rt,ut.prototype.get=lt,ut.prototype.has=dt,ut.prototype.set=ht;const mt=ut;const gt=function(){this.size=0,this.__data__={hash:new mt,map:new(nt||Fe),string:new mt}};const ft=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const pt=function(e,t){var i=e.__data__;return ft(t)?i["string"==typeof t?"string":"hash"]:i.map};const bt=function(e){var t=pt(this,e).delete(e);return this.size-=t?1:0,t};const wt=function(e){return pt(this,e).get(e)};const vt=function(e){return pt(this,e).has(e)};const _t=function(e,t){var i=pt(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function yt(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}yt.prototype.clear=gt,yt.prototype.delete=bt,yt.prototype.get=wt,yt.prototype.has=vt,yt.prototype.set=_t;const kt=yt;const Ct=function(e,t){var i=this.__data__;if(i instanceof Fe){var n=i.__data__;if(!nt||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new kt(n)}return i.set(e,t),this.size=i.size,this};function At(e){var t=this.__data__=new Fe(e);this.size=t.size}At.prototype.clear=De,At.prototype.delete=Le,At.prototype.get=ze,At.prototype.has=He,At.prototype.set=Ct;const xt=At;const Tt=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e};const Et=function(){try{var e=it(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const St=function(e,t,i){"__proto__"==t&&Et?Et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};var Pt=Object.prototype.hasOwnProperty;const It=function(e,t,i){var n=e[t];Pt.call(e,t)&&Pe(n,i)&&(void 0!==i||t in e)||St(e,t,i)};const Vt=function(e,t,i,n){var s=!i;i||(i={});for(var o=-1,r=t.length;++o<r;){var a=t[o],l=n?n(i[a],e[a],a,i,e):void 0;void 0===l&&(l=e[a]),s?St(i,a,l):It(i,a,l)}return i};const Rt=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n};const Ot=function(e){return be(e)&&"[object Arguments]"==fe(e)};var Bt=Object.prototype,Mt=Bt.hasOwnProperty,Nt=Bt.propertyIsEnumerable;const Ft=Ot(function(){return arguments}())?Ot:function(e){return be(e)&&Mt.call(e,"callee")&&!Nt.call(e,"callee")};const Dt=function(){return!1};var Lt="object"==typeof exports&&exports&&!exports.nodeType&&exports,zt=Lt&&"object"==typeof module&&module&&!module.nodeType&&module,Ht=zt&&zt.exports===Lt?oe.Buffer:void 0;const $t=(Ht?Ht.isBuffer:void 0)||Dt;var Wt=/^(?:0|[1-9]\d*)$/;const jt=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&Wt.test(e))&&e>-1&&e%1==0&&e<t};const Ut=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var qt={};qt["[object Float32Array]"]=qt["[object Float64Array]"]=qt["[object Int8Array]"]=qt["[object Int16Array]"]=qt["[object Int32Array]"]=qt["[object Uint8Array]"]=qt["[object Uint8ClampedArray]"]=qt["[object Uint16Array]"]=qt["[object Uint32Array]"]=!0,qt["[object Arguments]"]=qt["[object Array]"]=qt["[object ArrayBuffer]"]=qt["[object Boolean]"]=qt["[object DataView]"]=qt["[object Date]"]=qt["[object Error]"]=qt["[object Function]"]=qt["[object Map]"]=qt["[object Number]"]=qt["[object Object]"]=qt["[object RegExp]"]=qt["[object Set]"]=qt["[object String]"]=qt["[object WeakMap]"]=!1;const Gt=function(e){return be(e)&&Ut(e.length)&&!!qt[fe(e)]};const Kt=function(e){return function(t){return e(t)}};var Jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Jt&&"object"==typeof module&&module&&!module.nodeType&&module,Qt=Zt&&Zt.exports===Jt&&ne.process;const Yt=function(){try{var e=Zt&&Zt.require&&Zt.require("util").types;return e||Qt&&Qt.binding&&Qt.binding("util")}catch(e){}}();var Xt=Yt&&Yt.isTypedArray;const ei=Xt?Kt(Xt):Gt;var ti=Object.prototype.hasOwnProperty;const ii=function(e,t){var i=pe(e),n=!i&&Ft(e),s=!i&&!n&&$t(e),o=!i&&!n&&!s&&ei(e),r=i||n||s||o,a=r?Rt(e.length,String):[],l=a.length;for(var c in e)!t&&!ti.call(e,c)||r&&("length"==c||s&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||jt(c,l))||a.push(c);return a};var ni=Object.prototype;const si=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ni)};const oi=_e(Object.keys,Object);var ri=Object.prototype.hasOwnProperty;const ai=function(e){if(!si(e))return oi(e);var t=[];for(var i in Object(e))ri.call(e,i)&&"constructor"!=i&&t.push(i);return t};const li=function(e){return null!=e&&Ut(e.length)&&!$e(e)};const ci=function(e){return li(e)?ii(e):ai(e)};const di=function(e,t){return e&&Vt(t,ci(t),e)};const hi=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t};var ui=Object.prototype.hasOwnProperty;const mi=function(e){if(!L(e))return hi(e);var t=si(e),i=[];for(var n in e)("constructor"!=n||!t&&ui.call(e,n))&&i.push(n);return i};const gi=function(e){return li(e)?ii(e,!0):mi(e)};const fi=function(e,t){return e&&Vt(t,gi(t),e)};var pi="object"==typeof exports&&exports&&!exports.nodeType&&exports,bi=pi&&"object"==typeof module&&module&&!module.nodeType&&module,wi=bi&&bi.exports===pi?oe.Buffer:void 0,vi=wi?wi.allocUnsafe:void 0;const _i=function(e,t){if(t)return e.slice();var i=e.length,n=vi?vi(i):new e.constructor(i);return e.copy(n),n};const yi=function(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t};const ki=function(e,t){for(var i=-1,n=null==e?0:e.length,s=0,o=[];++i<n;){var r=e[i];t(r,i,e)&&(o[s++]=r)}return o};const Ci=function(){return[]};var Ai=Object.prototype.propertyIsEnumerable,xi=Object.getOwnPropertySymbols;const Ti=xi?function(e){return null==e?[]:(e=Object(e),ki(xi(e),(function(t){return Ai.call(e,t)})))}:Ci;const Ei=function(e,t){return Vt(e,Ti(e),t)};const Si=function(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e};const Pi=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Si(t,Ti(e)),e=ye(e);return t}:Ci;const Ii=function(e,t){return Vt(e,Pi(e),t)};const Vi=function(e,t,i){var n=t(e);return pe(e)?n:Si(n,i(e))};const Ri=function(e){return Vi(e,ci,Ti)};const Oi=function(e){return Vi(e,gi,Pi)};const Bi=it(oe,"DataView");const Mi=it(oe,"Promise");const Ni=it(oe,"Set");const Fi=it(oe,"WeakMap");var Di="[object Map]",Li="[object Promise]",zi="[object Set]",Hi="[object WeakMap]",$i="[object DataView]",Wi=Ge(Bi),ji=Ge(nt),Ui=Ge(Mi),qi=Ge(Ni),Gi=Ge(Fi),Ki=fe;(Bi&&Ki(new Bi(new ArrayBuffer(1)))!=$i||nt&&Ki(new nt)!=Di||Mi&&Ki(Mi.resolve())!=Li||Ni&&Ki(new Ni)!=zi||Fi&&Ki(new Fi)!=Hi)&&(Ki=function(e){var t=fe(e),i="[object Object]"==t?e.constructor:void 0,n=i?Ge(i):"";if(n)switch(n){case Wi:return $i;case ji:return Di;case Ui:return Li;case qi:return zi;case Gi:return Hi}return t});const Ji=Ki;var Zi=Object.prototype.hasOwnProperty;const Qi=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Zi.call(e,"index")&&(i.index=e.index,i.input=e.input),i};const Yi=oe.Uint8Array;const Xi=function(e){var t=new e.constructor(e.byteLength);return new Yi(t).set(new Yi(e)),t};const en=function(e,t){var i=t?Xi(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)};var tn=/\w*$/;const nn=function(e){var t=new e.constructor(e.source,tn.exec(e));return t.lastIndex=e.lastIndex,t};var sn=re?re.prototype:void 0,on=sn?sn.valueOf:void 0;const rn=function(e){return on?Object(on.call(e)):{}};const an=function(e,t){var i=t?Xi(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)};const ln=function(e,t,i){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Xi(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return en(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return an(e,i);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return nn(e);case"[object Symbol]":return rn(e)}};var cn=Object.create;const dn=function(){function e(){}return function(t){if(!L(t))return{};if(cn)return cn(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();const hn=function(e){return"function"!=typeof e.constructor||si(e)?{}:dn(ye(e))};const un=function(e){return be(e)&&"[object Map]"==Ji(e)};var mn=Yt&&Yt.isMap;const gn=mn?Kt(mn):un;const fn=function(e){return be(e)&&"[object Set]"==Ji(e)};var pn=Yt&&Yt.isSet;const bn=pn?Kt(pn):fn;var wn="[object Arguments]",vn="[object Function]",_n="[object Object]",yn={};yn[wn]=yn["[object Array]"]=yn["[object ArrayBuffer]"]=yn["[object DataView]"]=yn["[object Boolean]"]=yn["[object Date]"]=yn["[object Float32Array]"]=yn["[object Float64Array]"]=yn["[object Int8Array]"]=yn["[object Int16Array]"]=yn["[object Int32Array]"]=yn["[object Map]"]=yn["[object Number]"]=yn[_n]=yn["[object RegExp]"]=yn["[object Set]"]=yn["[object String]"]=yn["[object Symbol]"]=yn["[object Uint8Array]"]=yn["[object Uint8ClampedArray]"]=yn["[object Uint16Array]"]=yn["[object Uint32Array]"]=!0,yn["[object Error]"]=yn[vn]=yn["[object WeakMap]"]=!1;const kn=function e(t,i,n,s,o,r){var a,l=1&i,c=2&i,d=4&i;if(n&&(a=o?n(t,s,o,r):n(t)),void 0!==a)return a;if(!L(t))return t;var h=pe(t);if(h){if(a=Qi(t),!l)return yi(t,a)}else{var u=Ji(t),m=u==vn||"[object GeneratorFunction]"==u;if($t(t))return _i(t,l);if(u==_n||u==wn||m&&!o){if(a=c||m?{}:hn(t),!l)return c?Ii(t,fi(a,t)):Ei(t,di(a,t))}else{if(!yn[u])return o?t:{};a=ln(t,u,l)}}r||(r=new xt);var g=r.get(t);if(g)return g;r.set(t,a),bn(t)?t.forEach((function(s){a.add(e(s,i,n,s,t,r))})):gn(t)&&t.forEach((function(s,o){a.set(o,e(s,i,n,o,t,r))}));var f=h?void 0:(d?c?Oi:Ri:c?gi:ci)(t);return Tt(f||t,(function(s,o){f&&(s=t[o=s]),It(a,o,e(s,i,n,o,t,r))})),a};const Cn=function(e,t){return kn(e,5,t="function"==typeof t?t:void 0)};const An=function(e){return be(e)&&1===e.nodeType&&!Ee(e)};class xn{constructor(e,t){this._config={},t&&this.define(Tn(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,i,n=!1){if(Ee(t))return void this._setObjectToTarget(e,t,n);const s=t.split(".");t=s.pop();for(const t of s)Ee(e[t])||(e[t]={}),e=e[t];if(Ee(i))return Ee(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,i,n);n&&void 0!==e[t]||(e[t]=i)}_getFromSource(e,t){const i=t.split(".");t=i.pop();for(const t of i){if(!Ee(e[t])){e=null;break}e=e[t]}return e?Tn(e[t]):void 0}_setObjectToTarget(e,t,i){Object.keys(t).forEach((n=>{this._setToTarget(e,n,t[n],i)}))}}function Tn(e){return Cn(e,En)}function En(e){return An(e)||"function"==typeof e?e:void 0}function Sn(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Pn(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const In=Vn(V());function Vn(e){if(!e)return In;return class extends e{listenTo(e,t,i,n={}){if(Sn(e)||Pn(e)){const s={capture:!!n.useCapture,passive:!!n.usePassive},o=this._getProxyEmitter(e,s)||new Rn(e,s);this.listenTo(o,t,i,n)}else super.listenTo(e,t,i,n)}stopListening(e,t,i){if(Sn(e)||Pn(e)){const n=this._getAllProxyEmitters(e);for(const e of n)this.stopListening(e,t,i)}else super.stopListening(e,t,i)}_getProxyEmitter(e,t){return function(e,t){const i=e[E];return i&&i[t]?i[t].emitter:null}(this,On(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Vn[e]=In.prototype[e]}));class Rn extends(V()){constructor(e,t){super(),R(this,On(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,i){this.attach(e),V().prototype._addEventListener.call(this,e,t,i)}_removeEventListener(e,t){V().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function On(e,t){let i=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=b())}(e);for(const e of Object.keys(t).sort())t[e]&&(i+="-"+e);return i}let Bn;try{Bn={window,document}}catch(e){Bn={window:{},document:{}}}const Mn=Bn;function Nn(e){return"[object Text]"==Object.prototype.toString.call(e)}function Fn(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Dn(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Ln(e){return e&&e.parentNode?e.offsetParent===Mn.document.body?null:e.offsetParent:null}const zn=["top","right","bottom","left","width","height"];class Hn{constructor(e){const t=Fn(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),jn(e)||t)if(t){const t=Hn.getDomRangeRects(e);$n(this,Hn.getBoundingRect(t))}else $n(this,e.getBoundingClientRect());else if(Pn(e)){const{innerWidth:t,innerHeight:i}=e;$n(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else $n(this,e)}clone(){return new Hn(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new Hn(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(Wn(e))return t;let i,n=e,s=e.parentNode||e.commonAncestorContainer;for(;s&&!Wn(s);){const e="visible"===((o=s)instanceof HTMLElement?o.ownerDocument.defaultView.getComputedStyle(o).overflow:"visible");n instanceof HTMLElement&&"absolute"===Un(n)&&(i=n);const r=Un(s);if(e||i&&("relative"===r&&e||"relative"!==r)){n=s,s=s.parentNode;continue}const a=new Hn(s),l=t.getIntersection(a);if(!l)return null;l.getArea()<t.getArea()&&(t=l),n=s,s=s.parentNode}var o;return t}isEqual(e){for(const t of zn)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:t}=Mn.window,i=this.clone().moveBy(e,t);if(jn(i._source)){const e=Ln(i._source);e&&function(e,t){const i=new Hn(t),n=Dn(t);let s=0,o=0;s-=i.left,o-=i.top,s+=t.scrollLeft,o+=t.scrollTop,s-=n.left,o-=n.top,e.moveBy(s,o)}(i,e)}return i}excludeScrollbarsAndBorders(){const e=this._source;let t,i,n;if(Pn(e))t=e.innerWidth-e.document.documentElement.clientWidth,i=e.innerHeight-e.document.documentElement.clientHeight,n=e.getComputedStyle(e.document.documentElement).direction;else{const s=Dn(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,i=e.offsetHeight-e.clientHeight-s.top-s.bottom,n=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===n?this.right-=t:this.left+=t,this.height-=i,this.bottom-=i,this}static getDomRangeRects(e){const t=[],i=Array.from(e.getClientRects());if(i.length)for(const e of i)t.push(new Hn(e));else{let i=e.startContainer;Nn(i)&&(i=i.parentNode);const n=new Hn(i.getBoundingClientRect());n.right=n.left,n.width=0,t.push(n)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const n of e)i++,t.left=Math.min(t.left,n.left),t.top=Math.min(t.top,n.top),t.right=Math.max(t.right,n.right),t.bottom=Math.max(t.bottom,n.bottom);return 0==i?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new Hn(t))}}function $n(e,t){for(const i of zn)e[i]=t[i]}function Wn(e){return!!jn(e)&&e===e.ownerDocument.body}function jn(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}function Un(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}class qn{constructor(e,t){qn._observerInstance||qn._createObserver(),this._element=e,this._callback=t,qn._addElementCallback(e,t),qn._observerInstance.observe(e)}get element(){return this._element}destroy(){qn._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){qn._elementCallbacks||(qn._elementCallbacks=new Map);let i=qn._elementCallbacks.get(e);i||(i=new Set,qn._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=qn._getElementCallbacks(e);i&&(i.delete(t),i.size||(qn._elementCallbacks.delete(e),qn._observerInstance.unobserve(e))),qn._elementCallbacks&&!qn._elementCallbacks.size&&(qn._observerInstance=null,qn._elementCallbacks=null)}static _getElementCallbacks(e){return qn._elementCallbacks?qn._elementCallbacks.get(e):null}static _createObserver(){qn._observerInstance=new Mn.window.ResizeObserver((e=>{for(const t of e){const e=qn._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}}))}}function Gn(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Kn(e){return t=>t+e}function Jn(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Zn(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function Qn(e){return e&&e.nodeType===Node.COMMENT_NODE}function Yn(e){try{Mn.document.createAttribute(e)}catch(e){return!1}return!0}function Xn(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function es({element:e,target:t,positions:i,limiter:n,fitInViewport:s,viewportOffsetConfig:o}){$e(t)&&(t=t()),$e(n)&&(n=n());const r=Ln(e),a=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Hn(Mn.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(o),l=new Hn(e),c=ts(t,a);let d;if(!c||!a.getIntersection(c))return null;const h={targetRect:c,elementRect:l,positionedElementAncestor:r,viewportRect:a};if(n||s){if(n){const e=ts(n,a);e&&(h.limiterRect=e)}d=function(e,t){const{elementRect:i}=t,n=i.getArea(),s=e.map((e=>new is(e,t))).filter((e=>!!e.name));let o=0,r=null;for(const e of s){const{limiterIntersectionArea:t,viewportIntersectionArea:i}=e;if(t===n)return e;const s=i**2+t**2;s>o&&(o=s,r=e)}return r}(i,h)}else d=new is(i[0],h);return d}function ts(e,t){const i=new Hn(e).getVisible();return i?i.getIntersection(t):null}qn._observerInstance=null,qn._elementCallbacks=null;class is{constructor(e,t){const i=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!i)return;const{left:n,top:s,name:o,config:r}=i;this.name=o,this.config=r,this._positioningFunctionCoordinates={left:n,top:s},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function ns(e){const t=e.parentNode;t&&t.removeChild(e)}function ss({window:e,rect:t,alignToTop:i,forceScroll:n,viewportOffset:s}){const o=t.clone().moveBy(0,s.bottom),r=t.clone().moveBy(0,-s.top),a=new Hn(e).excludeScrollbarsAndBorders(),l=i&&n,c=[r,o].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,m=h;l?h-=a.top-t.top+s.top:c||(as(r,a)?h-=a.top-t.top+s.top:rs(o,a)&&(h+=i?t.top-a.top-s.top:t.bottom-a.bottom+s.bottom)),c||(ls(t,a)?d-=a.left-t.left+s.left:cs(t,a)&&(d+=t.right-a.right+s.right)),d==u&&h===m||e.scrollTo(d,h)}function os({parent:e,getRect:t,alignToTop:i,forceScroll:n,ancestorOffset:s=0,limiterElement:o}){const r=ds(e),a=i&&n;let l,c,d;const h=o||r.document.body;for(;e!=h;)c=t(),l=new Hn(e).excludeScrollbarsAndBorders(),d=l.contains(c),a?e.scrollTop-=l.top-c.top+s:d||(as(c,l)?e.scrollTop-=l.top-c.top+s:rs(c,l)&&(e.scrollTop+=i?c.top-l.top-s:c.bottom-l.bottom+s)),d||(ls(c,l)?e.scrollLeft-=l.left-c.left+s:cs(c,l)&&(e.scrollLeft+=c.right-l.right+s)),e=e.parentNode}function rs(e,t){return e.bottom>t.bottom}function as(e,t){return e.top<t.top}function ls(e,t){return e.left<t.left}function cs(e,t){return e.right>t.right}function ds(e){return Fn(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function hs(e){if(Fn(e)){let t=e.commonAncestorContainer;return Nn(t)&&(t=t.parentNode),t}return e.parentNode}function us(e,t){const i=ds(e),n=new Hn(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new Hn(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}const ms={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},gs={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},fs=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),ps=Object.fromEntries(Object.entries(fs).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function bs(e){let t;if("string"==typeof e){if(t=fs[e.toLowerCase()],!t)throw new y("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?fs.alt:0)+(e.ctrlKey?fs.ctrl:0)+(e.shiftKey?fs.shift:0)+(e.metaKey?fs.cmd:0);return t}function ws(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return bs(e.slice(0,-1));const t=bs(e);return(l.isMac||l.isiOS)&&t==fs.ctrl?fs.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function vs(e){let t=ws(e);return Object.entries(l.isMac||l.isiOS?ms:gs).reduce(((e,[i,n])=>(0!=(t&fs[i])&&(t&=~fs[i],e+=n),e)),"")+(t?ps[t]:"")}function _s(e,t){const i="ltr"===t;switch(e){case fs.arrowleft:return i?"left":"right";case fs.arrowright:return i?"right":"left";case fs.arrowup:return"up";case fs.arrowdown:return"down"}}function ys(e){return Array.isArray(e)?e:[e]}function ks(e,t,i=1){if("number"!=typeof i)throw new y("translation-service-quantity-not-a-number",null,{quantity:i});const n=Object.keys(Mn.window.CKEDITOR_TRANSLATIONS).length;1===n&&(e=Object.keys(Mn.window.CKEDITOR_TRANSLATIONS)[0]);const s=t.id||t.string;if(0===n||!function(e,t){return!!Mn.window.CKEDITOR_TRANSLATIONS[e]&&!!Mn.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,s))return 1!==i?t.plural:t.string;const o=Mn.window.CKEDITOR_TRANSLATIONS[e].dictionary,r=Mn.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),a=o[s];if("string"==typeof a)return a;return a[Number(r(i))]}Mn.window.CKEDITOR_TRANSLATIONS||(Mn.window.CKEDITOR_TRANSLATIONS={});const Cs=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function As(e){return Cs.includes(e)?"rtl":"ltr"}class xs{constructor({uiLanguage:e="en",contentLanguage:t}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=As(this.uiLanguage),this.contentLanguageDirection=As(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=ys(t),"string"==typeof e&&(e={string:e});const i=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,i)=>i<t.length?t[i]:e))}(ks(this.uiLanguage,e,i),t)}}class Ts extends(V()){constructor(e={},t={}){super();const i=ie(e);if(i||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new y("collection-add-item-invalid-index",this);let i=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),s=t+i;this._items.splice(s,0,n),this._itemMap.set(e,n),this.fire("add",n,s),i++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new y("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,i]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:i}),t}map(e,t){return this._items.map(e,t)}forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new y("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,i=(i,n,s)=>{const o=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(n);if(o&&r)this._bindToExternalToInternalMap.set(n,r),this._bindToInternalToExternalMap.set(r,n);else{const i=e(n);if(!i)return void this._skippedIndexesFromExternal.push(s);let o=s;for(const e of this._skippedIndexesFromExternal)s>e&&o--;for(const e of t._skippedIndexesFromExternal)o>=e&&o++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,o);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)o<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)i(0,e,t.getIndex(e));this.listenTo(t,"add",i),this.listenTo(t,"remove",((e,t,i)=>{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(i<t&&e.push(t-1),i>t&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let i;if(t in e){if(i=e[t],"string"!=typeof i)throw new y("collection-add-invalid-id",this);if(this.get(i))throw new y("collection-add-item-already-exists",this)}else e[t]=i=b();return i}_remove(e){let t,i,n,s=!1;const o=this._idProperty;if("string"==typeof e?(i=e,n=this._itemMap.get(i),s=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],s=!n,n&&(i=n[o])):(n=e,i=n[o],t=this._items.indexOf(n),s=-1==t||!this._itemMap.get(i)),s)throw new y("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(i);const r=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(r),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Es(e){const t=e.next();return t.done?null:t.value}class Ss extends(Vn(G())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new y("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Ps{constructor(){this._listener=new(Vn())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+bs(t),t)}))}set(e,t,i={}){const n=ws(e),s=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,((e,i)=>{t(i,(()=>{i.preventDefault(),i.stopPropagation(),e.stop()})),e.return=!0}),{priority:s})}press(e){return!!this._listener.fire("_keydown:"+bs(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function Is(e){return ie(e)?new Map(e):function(e){const t=new Map;for(const i in e)t.set(i,e[i]);return t}(e)}function Vs(e,t){let i;function n(...s){n.cancel(),i=setTimeout((()=>e(...s)),t)}return n.cancel=()=>{clearTimeout(i)},n}function Rs(e,t){return!!(i=e.charAt(t-1))&&1==i.length&&/[\ud800-\udbff]/.test(i)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var i}function Os(e,t){return!!(i=e.charAt(t))&&1==i.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(i);var i}const Bs=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((e=>e.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function Ms(e,t){const i=String(e).matchAll(Bs);return Array.from(i).some((e=>e.index<t&&t<e.index+e[0].length))}class Ns extends Ts{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,i)=>{this._renderViewIntoCollectionParent(t,i)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new y("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const i of this)for(const n of e)i.delegate(n).to(t);this.on("add",((i,n)=>{for(const i of e)n.delegate(i).to(t)})),this.on("remove",((i,n)=>{for(const i of e)n.stopDelegating(i,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}class Fs extends(Vn(G())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Ts,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,i)=>{i.locale=e,i.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Ds.bind(this,this)}createCollection(e){const t=new Ns(e);return this._viewCollections.add(t),t}registerChild(e){ie(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){ie(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Ds(e)}extendTemplate(e){Ds.extend(this.template,e)}render(){if(this.isRendered)throw new y("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}class Ds extends(V()){constructor(e){super(),Object.assign(this,Ks(Gs(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new y("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const i of t.children)eo(i)?yield i:to(i)&&(yield*e(i))}(this)}static bind(e,t){return{to:(i,n)=>new zs({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n}),if:(i,n,s)=>new Hs({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:s})}}static extend(e,t){if(e._isRendered)throw new y("template-extend-render",[this,e]);Ys(e,Ks(Gs(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new y("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),$s(this.text)?this._bindToObservable({schema:this.text,updater:js(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,i=e.revertData;for(const n in this.attributes){const s=t.getAttribute(n),o=this.attributes[n];i&&(i.attributes[n]=s);const r=no(o)?o[0].ns:null;if($s(o)){const a=no(o)?o[0].value:o;i&&so(n)&&a.unshift(s),this._bindToObservable({schema:a,updater:Us(t,n,r),data:e})}else if("style"==n&&"string"!=typeof o[0])this._renderStyleAttribute(o[0],e);else{i&&s&&so(n)&&o.unshift(s);const e=o.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(Zs,"");Xs(e)||t.setAttributeNS(r,n,e)}}}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const s=e[n];$s(s)?this._bindToObservable({schema:[s],updater:qs(i,n),data:t}):i.style[n]=s}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let s=0;for(const o of this.children)if(io(o)){if(!n){o.setParent(t);for(const e of o)i.appendChild(e.element)}}else if(eo(o))n||(o.isRendered||o.render(),i.appendChild(o.element));else if(Sn(o))i.appendChild(o);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),o._renderNode({intoFragment:!1,node:i.childNodes[s++],isApplying:!0,revertData:t})}else i.appendChild(o.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map((i=>{const[n,s]=t.split("@");return i.activateDomEventListener(n,s,e)}));e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const n=i.revertData;Ws(e,t,i);const s=e.filter((e=>!Xs(e))).filter((e=>e.observable)).map((n=>n.activateAttributeListener(e,t,i)));n&&n.bindings.push(s)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const i=e;for(const e in t.attributes){const n=t.attributes[e];null===n?i.removeAttribute(e):i.setAttribute(e,n)}for(let e=0;e<t.children.length;++e)this._revertTemplateFromNode(i.childNodes[e],t.children[e])}}class Ls{constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,i){const n=()=>Ws(e,t,i);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class zs extends Ls{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,i){const n=(e,i)=>{t&&!i.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class Hs extends Ls{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!Xs(super.getValue(e))&&(this.valueIfTrue||!0)}}function $s(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some($s):e instanceof Ls)}function Ws(e,t,{node:i}){const n=function(e,t){return e.map((e=>e instanceof Ls?e.getValue(t):e))}(e,i);let s;s=1==e.length&&e[0]instanceof Hs?n[0]:n.reduce(Zs,""),Xs(s)?t.remove():t.set(s)}function js(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function Us(e,t,i){return{set(n){e.setAttributeNS(i,t,n)},remove(){e.removeAttributeNS(i,t)}}}function qs(e,t){return{set(i){e.style[t]=i},remove(){e.style[t]=null}}}function Gs(e){return Cn(e,(e=>{if(e&&(e instanceof Ls||to(e)||eo(e)||io(e)))return e}))}function Ks(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=ys(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Js(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=ys(e[t].value)),Js(e,t)}(e.attributes);const t=[];if(e.children)if(io(e.children))t.push(e.children);else for(const i of e.children)to(i)||eo(i)||Sn(i)?t.push(i):t.push(new Ds(i));e.children=t}return e}function Js(e,t){e[t]=ys(e[t])}function Zs(e,t){return Xs(t)?e:Xs(e)?t:`${e} ${t}`}function Qs(e,t){for(const i in t)e[i]?e[i].push(...t[i]):e[i]=t[i]}function Ys(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),Qs(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),Qs(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new y("ui-template-extend-children-mismatch",e);let i=0;for(const n of t.children)Ys(e.children[i++],n)}}function Xs(e){return!e&&0!==e}function eo(e){return e instanceof Fs}function to(e){return e instanceof Ds}function io(e){return e instanceof Ns}function no(e){return L(e[0])&&e[0].ns}function so(e){return"class"==e||"style"==e}class oo extends Ns{constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new Ds({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=ve(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}class ro extends Fs{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",(e=>!e)),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:i}of Array.from(e.attributes))ro.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,i);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}ro.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];class ao extends Fs{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}class lo extends Fs{constructor(e,t=new ao){super(e),this._focusDelayed=null;const i=this.bindTemplate,n=b();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${n}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new ro,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const s={tag:"button",attributes:{class:["ck","ck-button",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e)),i.if("isVisible","ck-hidden",(e=>!e)),i.to("isOn",(e=>e?"ck-on":"ck-off")),i.if("withText","ck-button_with-text"),i.if("withKeystroke","ck-button_with-keystroke")],role:i.to("role"),type:i.to("type",(e=>e||"button")),tabindex:i.to("tabindex"),"aria-label":i.to("ariaLabel"),"aria-labelledby":i.to("ariaLabelledBy"),"aria-disabled":i.if("isEnabled",!0,(e=>!e)),"aria-pressed":i.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":i.to("_tooltipString"),"data-cke-tooltip-position":i.to("tooltipPosition")},children:this.children,on:{click:i.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};l.isSafari&&(this._focusDelayed||(this._focusDelayed=Vs((()=>this.focus()),0)),s.on.mousedown=i.to((()=>{this._focusDelayed()})),s.on.mouseup=i.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(s)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new Fs;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>vs(e)))}]}),e}_getTooltipString(e,t,i){return e?"string"==typeof e?e:(i&&(i=vs(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}class co extends lo{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Fs;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function ho(e,t){const i=e.t,n={Black:i("Black"),"Dim grey":i("Dim grey"),Grey:i("Grey"),"Light grey":i("Light grey"),White:i("White"),Red:i("Red"),Orange:i("Orange"),Yellow:i("Yellow"),"Light green":i("Light green"),Green:i("Green"),Aquamarine:i("Aquamarine"),Turquoise:i("Turquoise"),"Light blue":i("Light blue"),Blue:i("Blue"),Purple:i("Purple")};return t.map((e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e}))}function uo(e){return e.map(mo).filter((e=>!!e))}function mo(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class go extends lo{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class fo extends Fs{constructor(e,t){super(e);const i=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new Ss,this.keystrokes=new Ps,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),i.forEach((e=>{const t=new go;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",((e,t,i)=>{for(const e of this.items)e.isOn=e.color===i}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),o({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var po=i(874);const bo=function(e){var t,i,n=[],s=1;if("string"==typeof e)if(po[e])n=po[e].slice(),i="rgb";else if("transparent"===e)s=0,i="rgb",n=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1);s=1,(l=o.length)<=4?(n=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],4===l&&(s=parseInt(o[3]+o[3],16)/255)):(n=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],8===l&&(s=parseInt(o[6]+o[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var r=t[1],a="rgb"===r;i=o=r.replace(/a$/,"");var l="cmyk"===o?4:"gray"===o?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===l?parseFloat(e)/100:"rgb"===o?255*parseFloat(e)/100:parseFloat(e);if("h"===o[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==wo[e])return wo[e]}return parseFloat(e)})),r===o&&n.push(1),s=a||void 0===n[l]?1:n[l],n=n.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(n=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),i=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(n=[e[0],e[1],e[2]],i="rgb",s=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(i="rgb",n=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",n=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),s=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(s/=100)):(i="rgb",n=[e>>>16,(65280&e)>>>8,255&e]);return{space:i,values:n,alpha:s}};var wo={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var vo=i(85);function _o(e,t){if(!e)return"";const i=yo(e);if(!i)return"";if(i.space===t)return e;if(n=i,!Object.keys(vo).includes(n.space))return"";var n;const s=vo[i.space][t];if(!s)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(s("hex"===i.space?i.hexValue:i.values),t)}function yo(e){if(e.startsWith("#")){const t=bo(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=bo(e);return t.space?t:null}const ko=function(){return oe.Date.now()};var Co=/\s/;const Ao=function(e){for(var t=e.length;t--&&Co.test(e.charAt(t)););return t};var xo=/^\s+/;const To=function(e){return e?e.slice(0,Ao(e)+1).replace(xo,""):e};const Eo=function(e){return"symbol"==typeof e||be(e)&&"[object Symbol]"==fe(e)};var So=/^[-+]0x[0-9a-f]+$/i,Po=/^0b[01]+$/i,Io=/^0o[0-7]+$/i,Vo=parseInt;const Ro=function(e){if("number"==typeof e)return e;if(Eo(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=To(e);var i=Po.test(e);return i||Io.test(e)?Vo(e.slice(2),i?2:8):So.test(e)?NaN:+e};var Oo=Math.max,Bo=Math.min;const Mo=function(e,t,i){var n,s,o,r,a,l,c=0,d=!1,h=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var i=n,o=s;return n=s=void 0,c=t,r=e.apply(o,i)}function g(e){var i=e-l;return void 0===l||i>=t||i<0||h&&e-c>=o}function f(){var e=ko();if(g(e))return p(e);a=setTimeout(f,function(e){var i=t-(e-l);return h?Bo(i,o-(e-c)):i}(e))}function p(e){return a=void 0,u&&n?m(e):(n=s=void 0,r)}function b(){var e=ko(),i=g(e);if(n=arguments,s=this,l=e,i){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),d?m(e):r}(l);if(h)return clearTimeout(a),a=setTimeout(f,t),m(l)}return void 0===a&&(a=setTimeout(f,t)),r}return t=Ro(t)||0,L(i)&&(d=!!i.leading,o=(h="maxWait"in i)?Oo(Ro(i.maxWait)||0,t):o,u="trailing"in i?!!i.trailing:u),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=s=a=void 0},b.flush=function(){return void 0===a?r:p(ko())},b};class No extends Fs{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${b()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class Fo extends Fs{constructor(e,t){super(e);const i=`ck-labeled-field-view-${b()}`,n=`ck-labeled-field-view-status-${b()}`;this.fieldView=t(this,i,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",(e=>!e)),s.if("isEmpty","ck-labeled-field-view_empty"),s.if("isFocused","ck-labeled-field-view_focused"),s.if("placeholder","ck-labeled-field-view_placeholder"),s.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new No(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Fs(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",(e=>!e))],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Do extends Fs{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new Ss,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,i)=>{this._setDomElementValue(i),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class Lo extends Do{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class zo extends Lo{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Ho extends Lo{constructor(e,{min:t,max:i,step:n}={}){super(e);const s=this.bindTemplate;this.set("min",t),this.set("max",i),this.set("step",n),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:s.to("min"),max:s.to("max"),step:s.to("step")}})}}class $o extends Fs{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():k("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}class Wo extends Fs{constructor(e,t,i){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Ps,this.focusTracker=new Ss,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e))],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.on("change:isOpen",((e,t,i)=>{if(i)if("auto"===this.panelPosition){const e=Wo._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:i,southWest:n,northEast:s,northWest:o,southMiddleEast:r,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Wo.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[i,n,r,a,e,s,o,l,c,t]:[n,i,a,r,e,o,s,c,l,t]}}Wo.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Wo._getOptimalPosition=es;const jo='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class Uo extends lo{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new ro;return e.content=jo,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class qo extends(V()){constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let i=e.actions[t];"string"==typeof i&&(i=[i]);for(const n of i)e.keystrokeHandler.set(n,((e,i)=>{this[t](),i()}))}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(Go)||null}get last(){return this.focusables.filter(Go).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n})),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||(e===this.first?this.fire("forwardCycle"):this._focus(e,1))}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||(e===this.last?this.fire("backwardCycle"):this._focus(e,-1))}_focus(e,t){e&&e.focus(t)}_getFocusableItem(e){const t=this.current,i=this.focusables.length;if(!i)return null;if(null===t)return this[1===e?"first":"last"];let n=(t+i+e)%i;do{const t=this.focusables.get(n);if(Go(t))return t;n=(n+i+e)%i}while(n!==t);return null}}function Go(e){return!(!("focus"in e)||!Xn(e.element))}class Ko extends Fs{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Jo extends Fs{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function Zo(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}class Qo extends(G()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Yo,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Yo),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function Yo(e){e.return=!1,e.stop()}class Xo extends(G()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{if(!this.affectsData)return;const i=e.model.document.selection,n=!("$graveyard"==i.getFirstPosition().root.rootName)&&e.model.canEditAt(i);(e.isReadOnly||this._isEnabledBasedOnSelection&&!n)&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",er,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",er),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function er(e){e.return=!1,e.stop()}class tr extends Xo{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){v(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class ir extends(V()){constructor(e,t=[],i=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new y("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],i=[]){const n=this,s=this._context;!function e(t,i=new Set){t.forEach((t=>{a(t)&&(i.has(t)||(i.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,i)))}))}(e),h(e);const o=[...function e(t,i=new Set){return t.map((e=>a(e)?e:n._availablePlugins.get(e))).reduce(((t,n)=>i.has(n)?t:(i.add(n),n.requires&&(h(n.requires,n),e(n.requires,i).forEach((e=>t.add(e)))),t.add(n))),new Set)}(e.filter((e=>!c(e,t))))];!function(e,t){for(const i of t){if("function"!=typeof i)throw new y("plugincollection-replace-plugin-invalid-type",null,{pluginItem:i});const t=i.pluginName;if(!t)throw new y("plugincollection-replace-plugin-missing-name",null,{pluginItem:i});if(i.requires&&i.requires.length)throw new y("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const s=n._availablePlugins.get(t);if(!s)throw new y("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const o=e.indexOf(s);if(-1===o){if(n._contextPlugins.has(s))return;throw new y("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(s.requires&&s.requires.length)throw new y("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(o,1,i),n._availablePlugins.set(t,i)}}(o,i);const r=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(s),n._add(e,t),t}))}(o);return u(r,"init").then((()=>u(r,"afterInit"))).then((()=>r));function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function h(e,i=null){e.map((e=>a(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new y("plugincollection-soft-required",s,{missingPlugin:e,requiredBy:d(t)});throw new y("plugincollection-plugin-not-found",s,{plugin:e})}(e,i),function(e,t){if(!l(t))return;if(l(e))return;throw new y("plugincollection-context-required",s,{plugin:d(e),requiredBy:d(t)})}(e,i),function(e,i){if(!i)return;if(!c(e,t))return;throw new y("plugincollection-required",s,{plugin:d(e),requiredBy:d(i)})}(e,i)}))}function u(e,t){return e.reduce(((e,i)=>i[t]?n._contextPlugins.has(i)?e:e.then(i[t].bind(i)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new y("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}class nr{constructor(e){this._contextOwner=null,this.config=new xn(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new ir(this,t);const i=this.config.get("language")||{};this.locale=new xs({uiLanguage:"string"==typeof i?i:i.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new Ts}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const i of e.concat(t)){if("function"!=typeof i)throw new y("context-initplugins-constructor-only",null,{Plugin:i});if(!0!==i.isContextPlugin)throw new y("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new y("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const i=new this(e);t(i.initPlugins().then((()=>i)))}))}}class sr extends(G()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}const or=new WeakMap;let rr=!1;function ar({view:e,element:t,text:i,isDirectHost:n=!0,keepOnFocus:s=!1}){const o=e.document;function r(i){or.get(o).set(t,{text:i,isDirectHost:n,keepOnFocus:s,hostElement:n?t:null}),e.change((e=>cr(o,e)))}or.has(o)||(or.set(o,new Map),o.registerPostFixer((e=>cr(o,e))),o.on("change:isComposing",(()=>{e.change((e=>cr(o,e)))}),{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",((e,t,i)=>{r(i)})),t.placeholder?r(t.placeholder):i&&r(i),i&&function(){rr||k("enableplaceholder-deprecated-text-option");rr=!0}()}function lr(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function cr(e,t){const i=or.get(e),n=[];let s=!1;for(const[e,o]of i)o.isDirectHost&&(n.push(e),dr(t,e,o)&&(s=!0));for(const[e,o]of i){if(o.isDirectHost)continue;const i=hr(e);i&&(n.includes(i)||(o.hostElement=i,dr(t,e,o)&&(s=!0)))}return s}function dr(e,t,i){const{text:n,isDirectHost:s,hostElement:o}=i;let r=!1;o.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,o),r=!0);return(s||1==t.childCount)&&function(e,t){if(!e.isAttached())return!1;const i=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(i)return!1;const n=e.document,s=n.selection.anchor;return!(n.isComposing&&s&&s.parent===e||!t&&n.isFocused&&(!s||s.parent===e))}(o,i.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,o)&&(r=!0):lr(e,o)&&(r=!0),r}function hr(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class ur{is(){throw new Error("is() method is abstract")}}const mr=function(e){return kn(e,4)};class gr extends(V(ur)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new y("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),n=e.getAncestors(t);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=te(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]<i[n]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire(`change:${e}`,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=mr(this);return delete e.parent,e}}gr.prototype.is=function(e){return"node"===e||"view:node"===e};class fr extends gr{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof fr&&(this===e||this.data===e.data)}_clone(){return new fr(this.document,this.data)}}fr.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e};class pr extends ur{constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.data.length)throw new y("view-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.data.length)throw new y("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}}pr.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class br{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const i=wr(t,e);if(i)return{element:t,pattern:e,match:i}}return null}matchAll(...e){const t=[];for(const i of e)for(const e of this._patterns){const n=wr(i,e);n&&t.push({element:i,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function wr(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=new Set(t.getAttributeKeys());Ee(e)?(void 0!==e.style&&k("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&k("matcher-pattern-deprecated-attributes-class-key",e)):(i.delete("style"),i.delete("class"));return vr(e,i,(e=>t.getAttribute(e)))}(t.attributes,e),!i.attributes)||t.classes&&(i.classes=function(e,t){return vr(e,t.getClassNames(),(()=>{}))}(t.classes,e),!i.classes)||t.styles&&(i.styles=function(e,t){return vr(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!i.styles)?null:i}function vr(e,t,i){const n=function(e){if(Array.isArray(e))return e.map((e=>Ee(e)?(void 0!==e.key&&void 0!==e.value||k("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if(Ee(e))return Object.entries(e);return[[e,!0]]}(e),s=Array.from(t),o=[];if(n.forEach((([e,t])=>{s.forEach((n=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,n)&&function(e,t,i){if(!0===e)return!0;const n=i(t);return e===n||e instanceof RegExp&&!!String(n).match(e)}(t,n,i)&&o.push(n)}))})),n.length&&!(o.length<n.length))return o}var _r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yr=/^\w*$/;const kr=function(e,t){if(pe(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!Eo(e))||(yr.test(e)||!_r.test(e)||null!=t&&e in Object(t))};function Cr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,s=t?t.apply(this,n):n[0],o=i.cache;if(o.has(s))return o.get(s);var r=e.apply(this,n);return i.cache=o.set(s,r)||o,r};return i.cache=new(Cr.Cache||kt),i}Cr.Cache=kt;const Ar=Cr;const xr=function(e){var t=Ar(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t};var Tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/\\(\\)?/g,Sr=xr((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Tr,(function(e,i,n,s){t.push(n?s.replace(Er,"$1"):i||e)})),t}));const Pr=Sr;const Ir=function(e,t){for(var i=-1,n=null==e?0:e.length,s=Array(n);++i<n;)s[i]=t(e[i],i,e);return s};var Vr=re?re.prototype:void 0,Rr=Vr?Vr.toString:void 0;const Or=function e(t){if("string"==typeof t)return t;if(pe(t))return Ir(t,e)+"";if(Eo(t))return Rr?Rr.call(t):"";var i=t+"";return"0"==i&&1/t==-Infinity?"-0":i};const Br=function(e){return null==e?"":Or(e)};const Mr=function(e,t){return pe(e)?e:kr(e,t)?[e]:Pr(Br(e))};const Nr=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const Fr=function(e){if("string"==typeof e||Eo(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const Dr=function(e,t){for(var i=0,n=(t=Mr(t,e)).length;null!=e&&i<n;)e=e[Fr(t[i++])];return i&&i==n?e:void 0};const Lr=function(e,t,i){var n=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(s);++n<s;)o[n]=e[n+t];return o};const zr=function(e,t){return t.length<2?e:Dr(e,Lr(t,0,-1))};const Hr=function(e,t){return t=Mr(t,e),null==(e=zr(e,t))||delete e[Fr(Nr(t))]};const $r=function(e,t){return null==e||Hr(e,t)};const Wr=function(e,t,i){var n=null==e?void 0:Dr(e,t);return void 0===n?i:n};const jr=function(e,t,i){(void 0!==i&&!Pe(e[t],i)||void 0===i&&!(t in e))&&St(e,t,i)};const Ur=function(e){return function(t,i,n){for(var s=-1,o=Object(t),r=n(t),a=r.length;a--;){var l=r[e?a:++s];if(!1===i(o[l],l,o))break}return t}}();const qr=function(e){return be(e)&&li(e)};const Gr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};const Kr=function(e){return Vt(e,gi(e))};const Jr=function(e,t,i,n,s,o,r){var a=Gr(e,i),l=Gr(t,i),c=r.get(l);if(c)jr(e,i,c);else{var d=o?o(a,l,i+"",e,t,r):void 0,h=void 0===d;if(h){var u=pe(l),m=!u&&$t(l),g=!u&&!m&&ei(l);d=l,u||m||g?pe(a)?d=a:qr(a)?d=yi(a):m?(h=!1,d=_i(l,!0)):g?(h=!1,d=an(l,!0)):d=[]:Ee(l)||Ft(l)?(d=a,Ft(a)?d=Kr(a):L(a)&&!$e(a)||(d=hn(l))):h=!1}h&&(r.set(l,d),s(d,l,n,o,r),r.delete(l)),jr(e,i,d)}};const Zr=function e(t,i,n,s,o){t!==i&&Ur(i,(function(r,a){if(o||(o=new xt),L(r))Jr(t,i,a,n,e,s,o);else{var l=s?s(Gr(t,a),r,a+"",t,i,o):void 0;void 0===l&&(l=r),jr(t,a,l)}}),gi)};const Qr=function(e){return e};const Yr=function(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)};var Xr=Math.max;const ea=function(e,t,i){return t=Xr(void 0===t?e.length-1:t,0),function(){for(var n=arguments,s=-1,o=Xr(n.length-t,0),r=Array(o);++s<o;)r[s]=n[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=n[s];return a[t]=i(r),Yr(e,this,a)}};const ta=function(e){return function(){return e}};const ia=Et?function(e,t){return Et(e,"toString",{configurable:!0,enumerable:!1,value:ta(t),writable:!0})}:Qr;var na=Date.now;const sa=function(e){var t=0,i=0;return function(){var n=na(),s=16-(n-i);if(i=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}};const oa=sa(ia);const ra=function(e,t){return oa(ea(e,t,Qr),e+"")};const aa=function(e,t,i){if(!L(i))return!1;var n=typeof t;return!!("number"==n?li(i)&&jt(t,i.length):"string"==n&&t in i)&&Pe(i[t],e)};const la=function(e){return ra((function(t,i){var n=-1,s=i.length,o=s>1?i[s-1]:void 0,r=s>2?i[2]:void 0;for(o=e.length>3&&"function"==typeof o?(s--,o):void 0,r&&aa(i[0],i[1],r)&&(o=s<3?void 0:o,s=1),t=Object(t);++n<s;){var a=i[n];a&&e(t,a,n,o)}return t}))};const ca=la((function(e,t,i){Zr(e,t,i)}));const da=function(e,t,i,n){if(!L(e))return e;for(var s=-1,o=(t=Mr(t,e)).length,r=o-1,a=e;null!=a&&++s<o;){var l=Fr(t[s]),c=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=r){var d=a[l];void 0===(c=n?n(d,l,a):void 0)&&(c=L(d)?d:jt(t[s+1])?[]:{})}It(a,l,c),a=a[l]}return e};const ha=function(e,t,i){return null==e?e:da(e,t,i)};class ua{constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=function(e){let t=null,i=0,n=0,s=null;const o=new Map;if(""===e)return o;";"!=e.charAt(e.length-1)&&(e+=";");for(let r=0;r<e.length;r++){const a=e.charAt(r);if(null===t)switch(a){case":":s||(s=e.substr(i,r-i),n=r+1);break;case'"':case"'":t=a;break;case";":{const t=e.substr(n,r-n);s&&o.set(s.trim(),t.trim()),s=null,i=r+1;break}}else a===t&&(t=null)}return o}(e);for(const[e,i]of t)this._styleProcessor.toNormalizedForm(e,i,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)}set(e,t){if(L(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=ga(e);$r(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!L(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),n=Wr(this._styles,i);if(!n)return;!Object.keys(n).length&&this.remove(i)}}class ma{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if(L(t))fa(i,ga(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:s,value:o}=n(t);fa(i,s,o)}else fa(i,e,t)}getNormalized(e,t){if(!e)return ca({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return Wr(t,i);const n=i(e,t);if(n)return n}return Wr(t,ga(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);if(void 0===i)return[];if(this._reducers.has(e)){return this._reducers.get(e)(i)}return[[e,i]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const i=this.getNormalized(t,e);return i&&"object"==typeof i?Object.keys(i).length:i})),i=new Set([...t,...Object.keys(e)]);return Array.from(i)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function ga(e){return e.replace("-",".")}function fa(e,t,i){let n=i;L(i)&&(n=ca({},Wr(e,t),i)),ha(e,t,n)}class pa extends gr{constructor(e,t,i,n){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=Is(e);for(const[e,i]of t)null===i?t.delete(e):"string"!=typeof i&&t.set(e,String(i));return t}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");ba(this._classes,e),this._attrs.delete("class")}this._styles=new ua(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof pa))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new br(...e);let i=this.parent;for(;i&&!i.is("documentFragment");){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new fr(e,t)];ie(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new fr(e,t):t instanceof pr?new fr(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i<e+t;i++)this._children[i].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){const i=String(t);this._fireChange("attributes",this),"class"==e?ba(this._classes,i):"style"==e?this._styles.setTo(i):this._attrs.set(e,i)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of ys(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of ys(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of ys(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function ba(e,t){const i=t.split(/\s+/);e.clear(),i.forEach((t=>e.add(t)))}pa.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class wa extends pa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=va}}function va(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}wa.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class _a extends(G(wa)){constructor(e,t,i,n){super(e,t,i,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}_a.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const ya=Symbol("rootName");class ka extends _a{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(ya)}set rootName(e){this._setCustomProperty(ya,e)}set _name(e){this.name=e}}ka.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ca{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new y("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new y("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Aa._createAt(e.startPosition):this._position=Aa._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i;do{i=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(i instanceof fr){if(e.isAtEnd)return this._position=Aa._createAfter(i),this._next();n=i.data[e.offset]}else n=i.getChild(e.offset);if(n instanceof pa){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new Aa(n,0);return this._position=e,this._formatReturnValue("elementStart",n,t,e,1)}if(n instanceof fr){if(this.singleCharacters)return e=new Aa(n,0),this._position=e,this._next();let i,s=n.data.length;return n==this._boundaryEndParent?(s=this.boundaries.end.offset,i=new pr(n,0,s),e=Aa._createAfter(i)):(i=new pr(n,0,n.data.length),e.offset++),this._position=e,this._formatReturnValue("text",i,t,e,s)}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset}const s=new pr(i,e.offset,n);return e.offset+=n,this._position=e,this._formatReturnValue("text",s,t,e,n)}return e=Aa._createAfter(i),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(i instanceof fr){if(e.isAtStart)return this._position=Aa._createBefore(i),this._previous();n=i.data[e.offset-1]}else n=i.getChild(e.offset-1);if(n instanceof pa)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new Aa(n,n.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof fr){if(this.singleCharacters)return e=new Aa(n,n.data.length),this._position=e,this._previous();let i,s=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new pr(n,t,n.data.length-t),s=i.data.length,e=Aa._createBefore(i)}else i=new pr(n,0,n.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",i,t,e,s)}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const s=new pr(i,e.offset,n);return this._position=e,this._formatReturnValue("text",s,t,e,n)}return e=Aa._createBefore(i),this._position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,n,s){return t instanceof pr&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=Aa._createAfter(t.textNode):(n=Aa._createAfter(t.textNode),this._position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=Aa._createBefore(t.textNode):(n=Aa._createBefore(t.textNode),this._position=n))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:s}}}}class Aa extends ur{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof _a);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=Aa._createAt(this),i=t.offset+e;return t.offset=i<0?0:i,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new Ca(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const n=te(t,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]<i[n]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new Ca(e)}clone(){return new Aa(this.parent,this.offset)}static _createAt(e,t){if(e instanceof Aa)return new this(e.parent,e.offset);{const i=e;if("end"==t)t=i.is("$text")?i.data.length:i.childCount;else{if("before"==t)return this._createBefore(i);if("after"==t)return this._createAfter(i);if(0!==t&&!t)throw new y("view-createpositionat-offset-required",i)}return new Aa(i,t)}}static _createAfter(e){if(e.is("$textProxy"))return new Aa(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new y("view-position-after-root",e,{root:e});return new Aa(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new Aa(e.textNode,e.offsetInText);if(!e.parent)throw new y("view-position-before-root",e,{root:e});return new Aa(e.parent,e.index)}}Aa.prototype.is=function(e){return"position"===e||"view:position"===e};class xa extends ur{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new Ca({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(Ta,{direction:"backward"}),t=this.end.getLastMatchingPosition(Ta);return e.parent.is("$text")&&e.isAtStart&&(e=Aa._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=Aa._createAfter(t.parent)),new xa(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(Ta);if(e.isAfter(this.end)||e.isEqual(this.end))return new xa(e,e);let t=this.end.getLastMatchingPosition(Ta,{direction:"backward"});const i=e.nodeAfter,n=t.nodeBefore;return i&&i.is("$text")&&(e=new Aa(i,0)),n&&n.is("$text")&&(t=new Aa(n,n.data.length)),new xa(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const i=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),n=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return i&&n}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new xa(this.start,e.start)),this.containsPosition(e.end)&&t.push(new xa(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,i=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(i=e.end),new xa(t,i)}return null}getWalker(e={}){return e.boundaries=this,new Ca(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new xa(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Ca(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Ca(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,i,n){return new this(new Aa(e,t),new Aa(i,n))}static _createFromPositionAndShift(e,t){const i=e,n=e.getShiftedBy(t);return t>0?new this(i,n):new this(n,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Aa._createBefore(e),t)}}function Ta(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}xa.prototype.is=function(e){return"range"===e||"view:range"===e};class Ea extends(V(ur)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ee(this.getRanges());if(t!=ee(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,i,n]=e;if("object"==typeof i&&(n=i,i=void 0),null===t)this._setRanges([]),this._setFakeOptions(n);else if(t instanceof Ea||t instanceof Sa)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof xa)this._setRanges([t],n&&n.backward),this._setFakeOptions(n);else if(t instanceof Aa)this._setRanges([new xa(t)]),this._setFakeOptions(n);else if(t instanceof gr){const e=!!n&&!!n.backward;let s;if(void 0===i)throw new y("view-selection-setto-required-second-parameter",this);s="in"==i?xa._createIn(t):"on"==i?xa._createOn(t):new xa(Aa._createAt(t,i)),this._setRanges([s],e),this._setFakeOptions(n)}else{if(!ie(t))throw new y("view-selection-setto-not-selectable",this);this._setRanges(t,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new y("view-selection-setfocus-no-ranges",this);const i=Aa._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==i.compareWith(n)?this._addRange(new xa(i,n),!0):this._addRange(new xa(n,i)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof xa))throw new y("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new y("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new xa(e.start,e.end))}}Ea.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Sa extends(V(ur)){constructor(...e){super(),this._selection=new Ea,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Sa.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class Pa extends f{constructor(e,t,i){super(e,t),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Ia=Symbol("bubbling contexts");function Va(e){return class extends e{fire(e,...t){try{const i=e instanceof f?e:new f(this,e),n=Ma(this);if(!n.size)return;if(Ra(i,"capturing",this),Oa(n,"$capture",i,...t))return i.return;const s=i.startRange||this.selection.getFirstRange(),o=s?s.getContainedElement():null,r=!!o&&Boolean(Ba(n,o));let a=o||function(e){if(!e)return null;const t=e.start.parent,i=e.end.parent,n=t.getPath(),s=i.getPath();return n.length>s.length?t:i}(s);if(Ra(i,"atTarget",a),!r){if(Oa(n,"$text",i,...t))return i.return;Ra(i,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Oa(n,"$root",i,...t))return i.return}else if(a.is("element")&&Oa(n,a.name,i,...t))return i.return;if(Oa(n,a,i,...t))return i.return;a=a.parent,Ra(i,"bubbling",a)}return Ra(i,"bubbling",this),Oa(n,"$document",i,...t),i.return}catch(e){y.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,i){const n=ys(i.context||"$document"),s=Ma(this);for(const o of n){let n=s.get(o);n||(n=new(V()),s.set(o,n)),this.listenTo(n,e,t,i)}}_removeEventListener(e,t){const i=Ma(this);for(const n of i.values())this.stopListening(n,e,t)}}}{const e=Va(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{Va[t]=e.prototype[t]}))}function Ra(e,t,i){e instanceof Pa&&(e._eventPhase=t,e._currentTarget=i)}function Oa(e,t,i,...n){const s="string"==typeof t?e.get(t):Ba(e,t);return!!s&&(s.fire(i,...n),i.stop.called)}function Ba(e,t){for(const[i,n]of e)if("function"==typeof i&&i(t))return n;return null}function Ma(e){return e[Ia]||(e[Ia]=new Map),e[Ia]}class Na extends(Va(G())){constructor(e){super(),this._postFixers=new Set,this.selection=new Sa,this.roots=new Ts({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}}class Fa extends pa{constructor(e,t,i,n){super(e,t,i,n),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Da}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new y("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Da(){if(La(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(La(e)>1)return null;e=e.parent}return!e||La(e)>1?null:this.childCount}function La(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Fa.DEFAULT_PRIORITY=10,Fa.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class za extends pa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Ha}_insertChild(e,t){if(t&&(t instanceof gr||Array.from(t).length>0))throw new y("view-emptyelement-cannot-add",[this,t]);return 0}}function Ha(){return null}za.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class $a extends pa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=ja}_insertChild(e,t){if(t&&(t instanceof gr||Array.from(t).length>0))throw new y("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Wa(e){e.document.on("arrowKey",((t,i)=>function(e,t,i){if(t.keyCode==fs.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,s=e.focusOffset,o=i.domPositionToView(t,s);if(null===o)return;let r=!1;const a=o.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=i.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,e.domConverter)),{priority:"low"})}function ja(){return null}$a.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ua extends pa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=qa}_insertChild(e,t){if(t&&(t instanceof gr||Array.from(t).length>0))throw new y("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function qa(){return null}Ua.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ga extends(V(ur)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new fr(e,t)];ie(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new fr(e,t):t instanceof pr?new fr(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i<e+t;i++)this._children[i].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}Ga.prototype.is=function(e){return"documentFragment"===e||"view:documentFragment"===e};class Ka{constructor(e){this._cloneGroups=new Map,this._slotFactory=null,this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new Ga(this.document,e)}createText(e){return new fr(this.document,e)}createAttributeElement(e,t,i={}){const n=new Fa(this.document,e,t);return"number"==typeof i.priority&&(n._priority=i.priority),i.id&&(n._id=i.id),i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createContainerElement(e,t,i={},n={}){let s=null;Ee(i)?n=i:s=i;const o=new wa(this.document,e,t,s);return n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createEditableElement(e,t,i={}){const n=new _a(this.document,e,t);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createEmptyElement(e,t,i={}){const n=new za(this.document,e,t);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createUIElement(e,t,i){const n=new $a(this.document,e,t);return i&&(n.render=i),n}createRawElement(e,t,i,n={}){const s=new Ua(this.document,e,t);return i&&(s.render=i),n.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),s}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){Ee(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof Aa?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new y("view-writer-break-non-container-element",this.document);if(!t.parent)throw new y("view-writer-break-root",this.document);if(e.isAtStart)return Aa._createBefore(t);if(!e.isAtEnd){const i=t._clone(!1);this.insert(Aa._createAfter(t),i);const n=new xa(e,Aa._createAt(t,"end")),s=new Aa(i,0);this.move(n,s)}return Aa._createAfter(t)}mergeAttributes(e){const t=e.offset,i=e.parent;if(i.is("$text"))return e;if(i.is("attributeElement")&&0===i.childCount){const e=i.parent,t=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Aa(e,t))}const n=i.getChild(t-1),s=i.getChild(t);if(!n||!s)return e;if(n.is("$text")&&s.is("$text"))return Xa(n,s);if(n.is("attributeElement")&&s.is("attributeElement")&&n.isSimilar(s)){const e=n.childCount;return n._appendChild(s.getChildren()),s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new Aa(n,e))}return e}mergeContainers(e){const t=e.nodeBefore,i=e.nodeAfter;if(!(t&&i&&t.is("containerElement")&&i.is("containerElement")))throw new y("view-writer-merge-containers-invalid-position",this.document);const n=t.getChild(t.childCount-1),s=n instanceof fr?Aa._createAt(n,"end"):Aa._createAt(t,"end");return this.move(xa._createIn(i),Aa._createAt(t,"end")),this.remove(xa._createOn(i)),s}insert(e,t){tl(t=ie(t)?[...t]:[t],this.document);const i=t.reduce(((e,t)=>{const i=e[e.length-1],n=!t.is("uiElement");return i&&i.breakAttributes==n?i.nodes.push(t):e.push({breakAttributes:n,nodes:[t]}),e}),[]);let n=null,s=e;for(const{nodes:e,breakAttributes:t}of i){const i=this._insertNodes(s,e,t);n||(n=i.start),s=i.end}return n?new xa(n,s):new xa(e)}remove(e){const t=e instanceof xa?e:xa._createOn(e);if(nl(t,this.document),t.isCollapsed)return new Ga(this.document);const{start:i,end:n}=this._breakAttributesRange(t,!0),s=i.parent,o=n.offset-i.offset,r=s._removeChildren(i.offset,o);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new Ga(this.document,r)}clear(e,t){nl(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of i){const i=n.item;let s;if(i.is("element")&&t.isSimilar(i))s=xa._createOn(i);else if(!n.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(s=xa._createIn(e))}s&&(s.end.isAfter(e.end)&&(s.end=e.end),s.start.isBefore(e.start)&&(s.start=e.start),this.remove(s))}}move(e,t){let i;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,s=n.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=n.childCount-s}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof Fa))throw new y("view-writer-wrap-invalid-attribute",this.document);if(nl(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(i=n.parent,!Array.from(i.getChildren()).some((e=>!e.is("uiElement"))))&&(n=n.getLastMatchingPosition((e=>e.item.is("uiElement")))),n=this._wrapPosition(n,t);const s=this.document.selection;return s.isCollapsed&&s.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new xa(n)}return this._wrapRange(e,t);var i}unwrap(e,t){if(!(t instanceof Fa))throw new y("view-writer-unwrap-invalid-attribute",this.document);if(nl(e,this.document),e.isCollapsed)return e;const{start:i,end:n}=this._breakAttributesRange(e,!0),s=i.parent,o=this._unwrapChildren(s,i.offset,n.offset,t),r=this.mergeAttributes(o.start);r.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new xa(r,a)}rename(e,t){const i=new wa(this.document,e,t.getAttributes());return this.insert(Aa._createAfter(t),i),this.move(xa._createIn(t),Aa._createAt(i,0)),this.remove(xa._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Aa._createAt(e,t)}createPositionAfter(e){return Aa._createAfter(e)}createPositionBefore(e){return Aa._createBefore(e)}createRange(e,t){return new xa(e,t)}createRangeOn(e){return xa._createOn(e)}createRangeIn(e){return xa._createIn(e)}createSelection(...e){return new Ea(...e)}createSlot(e="children"){if(!this._slotFactory)throw new y("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,i){let n,s;if(n=i?Ja(e):e.parent.is("$text")?e.parent.parent:e.parent,!n)throw new y("view-writer-invalid-position-container",this.document);s=i?this._breakAttributes(e,!0):e.parent.is("$text")?Ya(e):e;const o=n._insertChild(s.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=s.getShiftedBy(o),a=this.mergeAttributes(s);a.isEqual(s)||r.offset--;const l=this.mergeAttributes(r);return new xa(a,l)}_wrapChildren(e,t,i,n){let s=t;const o=[];for(;s<i;){const t=e.getChild(s),i=t.is("$text"),r=t.is("attributeElement");if(r&&this._wrapAttributeElement(n,t))o.push(new Aa(e,s));else if(i||!r||Za(n,t)){const i=n._clone();t._remove(),i._appendChild(t),e._insertChild(s,i),this._addToClonedElementsGroup(i),o.push(new Aa(e,s))}else this._wrapChildren(t,0,t.childCount,n);s++}let r=0;for(const e of o){if(e.offset-=r,e.offset==t)continue;this.mergeAttributes(e).isEqual(e)||(r++,i--)}return xa._createFromParentsAndOffsets(e,t,e,i)}_unwrapChildren(e,t,i,n){let s=t;const o=[];for(;s<i;){const t=e.getChild(s);if(t.is("attributeElement"))if(t.isSimilar(n)){const n=t.getChildren(),r=t.childCount;t._remove(),e._insertChild(s,n),this._removeFromClonedElementsGroup(t),o.push(new Aa(e,s),new Aa(e,s+r)),s+=r,i+=r-1}else this._unwrapAttributeElement(n,t)?(o.push(new Aa(e,s),new Aa(e,s+1)),s++):(this._unwrapChildren(t,0,t.childCount,n),s++);else s++}let r=0;for(const e of o){if(e.offset-=r,e.offset==t||e.offset==i)continue;this.mergeAttributes(e).isEqual(e)||(r++,i--)}return xa._createFromParentsAndOffsets(e,t,e,i)}_wrapRange(e,t){const{start:i,end:n}=this._breakAttributesRange(e,!0),s=i.parent,o=this._wrapChildren(s,i.offset,n.offset,t),r=this.mergeAttributes(o.start);r.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new xa(r,a)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return Qa(e.clone());e.parent.is("$text")&&(e=Ya(e));const i=this.createAttributeElement("_wrapPosition-fake-element");i._priority=Number.POSITIVE_INFINITY,i.isSimilar=()=>!1,e.parent._insertChild(e.offset,i);const n=new xa(e,e.getShiftedBy(1));this.wrap(n,t);const s=new Aa(i.parent,i.index);i._remove();const o=s.nodeBefore,r=s.nodeAfter;return o instanceof fr&&r instanceof fr?Xa(o,r):Qa(s)}_wrapAttributeElement(e,t){if(!sl(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!sl(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const i=e.start,n=e.end;if(nl(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new xa(i,i)}const s=this._breakAttributes(n,t),o=s.parent.childCount,r=this._breakAttributes(i,t);return s.offset+=s.parent.childCount-o,new xa(r,s)}_breakAttributes(e,t=!1){const i=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new y("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new y("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new y("view-writer-cannot-break-raw-element",this.document);if(!t&&n.is("$text")&&il(n.parent))return e.clone();if(il(n))return e.clone();if(n.is("$text"))return this._breakAttributes(Ya(e),t);if(i==n.childCount){const e=new Aa(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new Aa(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,s=n._clone();n.parent._insertChild(e,s),this._addToClonedElementsGroup(s);const o=n.childCount-i,r=n._removeChildren(i,o);s._appendChild(r);const a=new Aa(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function Ja(e){let t=e.parent;for(;!il(t);){if(!t)return;t=t.parent}return t}function Za(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function Qa(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new Aa(t,t.data.length);const i=e.nodeAfter;return i&&i.is("$text")?new Aa(i,0):e}function Ya(e){if(e.offset==e.parent.data.length)return new Aa(e.parent.parent,e.parent.index+1);if(0===e.offset)return new Aa(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new fr(e.root.document,t)),new Aa(e.parent.parent,e.parent.index+1)}function Xa(e,t){const i=e.data.length;return e._data+=t.data,t._remove(),new Aa(e,i)}const el=[fr,Fa,wa,za,Ua,$a];function tl(e,t){for(const i of e){if(!el.some((e=>i instanceof e)))throw new y("view-writer-insert-invalid-node-type",t);i.is("$text")||tl(i.getChildren(),t)}}function il(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function nl(e,t){const i=Ja(e.start),n=Ja(e.end);if(!i||!n||i!==n)throw new y("view-writer-invalid-range-container",t)}function sl(e,t){return null===e.id&&null===t.id}const ol=e=>e.createTextNode(" "),rl=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},al=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},ll=7,cl="⁠".repeat(ll);function dl(e){return"string"==typeof e?e.substr(0,ll)===cl:Nn(e)&&e.data.substr(0,ll)===cl}function hl(e){return e.data.length==ll&&dl(e)}function ul(e){const t="string"==typeof e?e:e.data;return dl(e)?t.slice(ll):t}function ml(e,t){if(t.keyCode==fs.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;dl(t)&&i<=ll&&e.collapse(t,0)}}}class gl extends(G()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),l.isBlink&&!l.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new y("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!l.isAndroid)return;let e=null;const t=!(l.isBlink&&!l.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Aa._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;dl(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=fl(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.childNodes),n=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),s=this._diffNodeLists(i,n),o=this._findUpdateActions(s,i,n,pl);if(-1!==o.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const s of o)if("update"===s){const s=t.equal+t.insert,o=t.equal+t.delete,r=e.getChild(s);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,i[o]),ns(n[s]),t.equal++}else t[s]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Aa._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Nn(t.parent)&&dl(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!dl(e))throw new y("view-renderer-filler-was-lost",this);hl(e)?e.remove():e.data=e.data.substr(ll),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(i===t.getFillerOffset())return!1;const n=e.nodeBefore,s=e.nodeAfter;return!(n instanceof fr||s instanceof fr)&&(!l.isAndroid||!n&&!s)}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e);let n=this.domConverter.viewToDom(e).data;const s=t.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(n=cl+n),vl(i,n)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.attributes).map((e=>e.name)),n=e.getAttributeKeys();for(const i of n)this.domConverter.setDomElementAttribute(t,i,e.getAttribute(i),e);for(const n of i)e.hasAttribute(n)||this.domConverter.removeDomElementAttribute(t,n)}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;if(l.isAndroid){let e=null;for(const t of Array.from(i.childNodes)){if(e&&Nn(e)&&Nn(t)){i.normalize();break}e=t}}const n=t.inlineFillerPosition,s=i.childNodes,o=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));n&&n.parent===e&&fl(i.ownerDocument,o,n.offset);const r=this._diffNodeLists(s,o),a=this._findUpdateActions(r,s,o,bl);let c=0;const d=new Set;for(const e of a)"delete"===e?(d.add(s[c]),ns(s[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of a)"insert"===e?(Zn(i,c,o[c]),c++):"update"===e?(vl(s[c],o[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(o[c])),c++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;const n=i[i.length-1];n==t&&i.pop();return i}(e,this._fakeSelectionContainer),m(e,t,wl.bind(null,this.domConverter))}_findUpdateActions(e,t,i,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let s=[],o=[],r=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?r.push(i[a.equal+a.insert]):"delete"===l?o.push(t[a.equal+a.delete]):(s=s.concat(m(o,r,n).map((e=>"equal"===e?"update":e))),s.push("equal"),o=[],r=[]),a[l]++;return s.concat(m(o,r,n).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(l.isBlink&&!l.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&l.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),s=t.createRange();n.removeAllRanges(),s.selectNodeContents(i),n.addRange(s)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(i.parent,i.offset,n.parent,n.offset),l.isGecko&&function(e,t){const i=e.parent;if(i.nodeType!=Node.ELEMENT_NODE||e.offset!=i.childNodes.length-1)return;const n=i.childNodes[e.offset];n&&"BR"==n.tagName&&t.addRange(t.getRangeAt(0))}(n,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const i=e.activeElement,n=this.domConverter.mapDomToView(i);i&&n&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function fl(e,t,i){const n=t instanceof Array?t:t.childNodes,s=n[i];if(Nn(s))return s.data=cl+s.data,s;{const s=e.createTextNode(cl);return Array.isArray(t)?n.splice(i,0,s):Zn(t,i,s),s}}function pl(e,t){return Sn(e)&&Sn(t)&&!Nn(e)&&!Nn(t)&&!Qn(e)&&!Qn(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function bl(e,t){return Sn(e)&&Sn(t)&&Nn(e)&&Nn(t)}function wl(e,t,i){return t===i||(Nn(t)&&Nn(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}function vl(e,t){const i=e.data;if(i==t)return;const n=d(i,t);for(const t of n)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const _l=al(Mn.document),yl=ol(Mn.document),kl=rl(Mn.document),Cl="data-ck-unsafe-attribute-",Al="data-ck-unsafe-element";class xl{constructor(e,{blockFillerMode:t,renderingMode:i="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new br,this._inlineObjectElementMatcher=new br,this._elementsWithTemporaryCustomProperties=new Set,this.document=e,this.renderingMode=i,this.blockFillerMode=t||("editing"===i?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?Mn.document:Mn.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Ea(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,i){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===i&&("src"===e||"srcset"===e)||("source"===i&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const i=(new DOMParser).parseFromString(t,"text/html"),n=i.createDocumentFragment(),s=i.body.childNodes;for(;s.length>0;)n.appendChild(s[0]);const o=i.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=o.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Pl(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(n)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const i=e;if(this.mapViewToDom(i)){if(!i.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(i);this._elementsWithTemporaryCustomProperties.add(i)}let n;if(i.is("documentFragment"))n=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(n,i);else{if(i.is("uiElement"))return n="$comment"===i.name?this._domDocument.createComment(i.getCustomProperty("$rawContent")):i.render(this._domDocument,this),t.bind&&this.bindElements(n,i),n;this._shouldRenameElement(i.name)?(Pl(i.name),n=this._createReplacementDomElement(i.name)):n=i.hasAttribute("xmlns")?this._domDocument.createElementNS(i.getAttribute("xmlns"),i.name):this._domDocument.createElement(i.name),i.is("rawElement")&&i.render(n,this),t.bind&&this.bindElements(n,i);for(const e of i.getAttributeKeys())this.setDomElementAttribute(n,e,i.getAttribute(e),i)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(i,t))n.appendChild(e);return n}}setDomElementAttribute(e,t,i,n){const s=this.shouldRenderAttribute(t,i,e.tagName.toLowerCase())||n&&n.shouldRenderUnsafeAttribute(t);s||k("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:i}),Yn(t)?(e.hasAttribute(t)&&!s?e.removeAttribute(t):e.hasAttribute(Cl+t)&&s&&e.removeAttribute(Cl+t),e.setAttribute(s?t:Cl+t,i)):k("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:i})}removeDomElementAttribute(e,t){t!=Al&&(e.removeAttribute(t),e.removeAttribute(Cl+t))}*viewChildrenToDom(e,t={}){const i=e.getFillerOffset&&e.getFillerOffset();let n=0;for(const s of e.getChildren()){i===n&&(yield this._getBlockFiller());const e=s.is("element")&&!!s.getCustomProperty("dataPipeline:transparentRendering")&&!Es(s.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(s,t):(e&&k("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:s}),yield this.viewToDom(s,t)),n++}i===n&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),n=this._domDocument.createRange();return n.setStart(t.parent,t.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let n=e.offset;return dl(i)&&(n+=ll),{parent:i,offset:n}}{let i,n,s;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;s=i.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!n)return null;i=n.parentNode,s=n.nextSibling}if(Nn(s)&&dl(s))return{parent:s,offset:ll};return{parent:i,offset:n?Jn(n)+1:0}}}domToView(e,t={}){const i=[],n=this._domToView(e,t,i),s=n.next().value;return s?(n.next(),this._processDomInlineNodes(null,i,t),s.is("$text")&&0==s.data.length?null:s):null}*domChildrenToView(e,t={},i=[]){for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n],o=this._domToView(s,t,i),r=o.next().value;null!==r&&(this._isBlockViewElement(r)&&this._processDomInlineNodes(e,i,t),yield r,o.next())}this._processDomInlineNodes(e,i,t)}domSelectionToView(e){if(function(e){if(!l.isGecko)return!1;if(!e.rangeCount)return!1;const t=e.getRangeAt(0).startContainer;try{Object.prototype.toString.call(t)}catch(e){return!0}return!1}(e))return new Ea([]);if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;Nn(t)&&(t=t.parentNode);const i=this.fakeSelectionToView(t);if(i)return i}const t=this.isDomSelectionBackward(e),i=[];for(let t=0;t<e.rangeCount;t++){const n=e.getRangeAt(t),s=this.domRangeToView(n);s&&i.push(s)}return new Ea(i,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),i=this.domPositionToView(e.endContainer,e.endOffset);return t&&i?new xa(t,i):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,Jn(e));const i=this.mapDomToView(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return Aa._createBefore(i);if(Nn(e)){if(hl(e))return this.domPositionToView(e.parentNode,Jn(e));const i=this.findCorrespondingViewText(e);let n=t;return i?(dl(e)&&(n-=ll,n=n<0?0:n),new Aa(i,n)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new Aa(t,0)}else{const i=e.childNodes[t-1];if(Nn(i)&&hl(i)||i&&this.isBlockFiller(i))return this.domPositionToView(i.parentNode,Jn(i));const n=Nn(i)?this.findCorrespondingViewText(i):this.mapDomToView(i);if(n&&n.parent)return new Aa(n.parent,n.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(hl(e))return null;const t=this.getHostViewElement(e);if(t)return t;const i=e.previousSibling;if(i){if(!this.isElement(i))return null;const e=this.mapDomToView(i);if(e){const t=e.nextSibling;return t instanceof fr?t:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof fr?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:i}=Mn.window,n=[];El(t,(e=>{const{scrollLeft:t,scrollTop:i}=e;n.push([t,i])})),t.focus(),El(t,(e=>{const[t,i]=n.shift();e.scrollLeft=t,e.scrollTop=i})),Mn.window.scrollTo(e,i)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),i=this.domSelectionToView(t);i&&i.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(_l):!("BR"!==e.tagName||!Sl(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(kl)||function(e,t){const i=e.isEqualNode(yl);return i&&Sl(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=function(e){const t=[];let i=e;for(;i&&i.nodeType!=Node.DOCUMENT_NODE;)t.unshift(i),i=i.parentNode;return t}(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return ol(this._domDocument);case"markedNbsp":return rl(this._domDocument);case"br":return al(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Nn(e)&&dl(e)&&t<ll)return!1;if(this.isElement(e)&&dl(e.childNodes[t]))return!1;const i=this.mapDomToView(e);return!i||!i.is("uiElement")&&!i.is("rawElement")}*_domToView(e,t,i){if(this.isBlockFiller(e))return null;const n=this.getHostViewElement(e);if(n)return n;if(Qn(e)&&t.skipComments)return null;if(Nn(e)){if(hl(e))return null;{const t=e.data;if(""===t)return null;const n=new fr(this.document,t);return i.push(n),n}}{let n=this.mapDomToView(e);if(n)return this._isInlineObjectElement(n)&&i.push(n),n;if(this.isDocumentFragment(e))n=new Ga(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);const s=e.attributes;if(s)for(let e=s.length,t=0;t<e;t++)n._setAttribute(s[t].name,s[t].value);if(this._isViewElementWithRawContent(n,t))return n._setCustomProperty("$rawContent",e.innerHTML),this._isBlockViewElement(n)||i.push(n),n;if(Qn(e))return n._setCustomProperty("$rawContent",e.data),n}yield n;const s=[];if(!1!==t.withChildren)for(const i of this.domChildrenToView(e,t,s))n._appendChild(i);if(this._isInlineObjectElement(n))i.push(n);else for(const e of s)i.push(e)}}_processDomInlineNodes(e,t,i){if(!t.length)return;if(e&&!this.isDocumentFragment(e)&&!this._isBlockDomElement(e))return;let n=!1;for(let e=0;e<t.length;e++){const s=t[e];if(!s.is("$text")){n=!1;continue}let o,r=!1;if(Tl(s,this.preElements))o=ul(s.data);else{o=s.data.replace(/[ \n\t\r]{1,}/g," "),r=/[^\S\u00A0]/.test(o.charAt(o.length-1));const a=e>0?t[e-1]:null,l=e+1<t.length?t[e+1]:null,c=!a||a.is("element")&&"br"==a.name||n,d=!l&&!dl(s.data);!1!==i.withChildren&&(c&&(o=o.replace(/^ /,"")),d&&(o=o.replace(/ $/,""))),o=ul(o),o=o.replace(/ \u00A0/g,"  ");const h=l&&l.is("element")&&"br"!=l.name,u=l&&l.is("$text")&&" "==l.data.charAt(0);(/[ \u00A0]\u00A0$/.test(o)||!l||h||u)&&(o=o.replace(/\u00A0$/," ")),(c||a&&a.is("element")&&"br"!=a.name)&&(o=o.replace(/^\u00A0/," "))}0==o.length&&s.parent?(s._remove(),t.splice(e,1),e--):(s._data=o,n=r)}t.length=0}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const i=this._getTouchingInlineViewNode(e,!1);!(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i))&&i||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingInlineViewNode(e,!0),n=i&&i.is("$textProxy")&&" "==i.data.charAt(0);" "!=t.charAt(t.length-2)&&i&&!n||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_getTouchingInlineViewNode(e,t){const i=new Ca({startPosition:t?Aa._createAfter(e):Aa._createBefore(e),direction:t?"forward":"backward"});for(const e of i){if(e.item.is("element","br"))return null;if(this._isInlineObjectElement(e.item))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("$textProxy"))return e.item}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if(Qn(e))return new $a(this.document,"$comment");const i=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new pa(this.document,i)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const i=this._domDocument.createElement("span");if(i.setAttribute(Al,e),t){for(;t.firstChild;)i.appendChild(t.firstChild);for(const e of t.getAttributeNames())i.setAttribute(e,t.getAttribute(e))}return i}}function Tl(e,t){return e.getAncestors().some((e=>e.is("element")&&t.includes(e.name)))}function El(e,t){let i=e;for(;i;)t(i),i=i.parentElement}function Sl(e,t){const i=e.parentNode;return!!i&&!!i.tagName&&t.includes(i.tagName.toLowerCase())}function Pl(e){"script"===e&&k("domconverter-unsafe-script-element-detected"),"style"===e&&k("domconverter-unsafe-style-element-detected")}class Il extends(Vn()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}const Vl=la((function(e,t){Vt(t,gi(t),e)}));class Rl{constructor(e,t,i){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,Vl(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ol extends Il{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Rl(this.view,t,i))}}class Bl extends Ol{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return bs(this)}};this.fire(e.type,e,t)}}class Ml extends Il{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Mo((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&i.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new Ea(t.getRanges(),{backward:t.isBackward,fake:!1});e!=fs.arrowleft&&e!=fs.arrowup||i.setTo(i.getFirstPosition()),e!=fs.arrowright&&e!=fs.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}const Nl=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Fl=function(e){return this.__data__.has(e)};function Dl(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new kt;++t<i;)this.add(e[t])}Dl.prototype.add=Dl.prototype.push=Nl,Dl.prototype.has=Fl;const Ll=Dl;const zl=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1};const Hl=function(e,t){return e.has(t)};const $l=function(e,t,i,n,s,o){var r=1&i,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,m=2&i?new Ll:void 0;for(o.set(e,t),o.set(t,e);++h<a;){var g=e[h],f=t[h];if(n)var p=r?n(f,g,h,t,e,o):n(g,f,h,e,t,o);if(void 0!==p){if(p)continue;u=!1;break}if(m){if(!zl(t,(function(e,t){if(!Hl(m,t)&&(g===e||s(g,e,i,n,o)))return m.push(t)}))){u=!1;break}}else if(g!==f&&!s(g,f,i,n,o)){u=!1;break}}return o.delete(e),o.delete(t),u};const Wl=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i};const jl=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i};var Ul=re?re.prototype:void 0,ql=Ul?Ul.valueOf:void 0;const Gl=function(e,t,i,n,s,o,r){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Yi(e),new Yi(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Wl;case"[object Set]":var l=1&n;if(a||(a=jl),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;n|=2,r.set(e,t);var d=$l(a(e),a(t),n,s,o,r);return r.delete(e),d;case"[object Symbol]":if(ql)return ql.call(e)==ql.call(t)}return!1};var Kl=Object.prototype.hasOwnProperty;const Jl=function(e,t,i,n,s,o){var r=1&i,a=Ri(e),l=a.length;if(l!=Ri(t).length&&!r)return!1;for(var c=l;c--;){var d=a[c];if(!(r?d in t:Kl.call(t,d)))return!1}var h=o.get(e),u=o.get(t);if(h&&u)return h==t&&u==e;var m=!0;o.set(e,t),o.set(t,e);for(var g=r;++c<l;){var f=e[d=a[c]],p=t[d];if(n)var b=r?n(p,f,d,t,e,o):n(f,p,d,e,t,o);if(!(void 0===b?f===p||s(f,p,i,n,o):b)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var w=e.constructor,v=t.constructor;w==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof v&&v instanceof v||(m=!1)}return o.delete(e),o.delete(t),m};var Zl="[object Arguments]",Ql="[object Array]",Yl="[object Object]",Xl=Object.prototype.hasOwnProperty;const ec=function(e,t,i,n,s,o){var r=pe(e),a=pe(t),l=r?Ql:Ji(e),c=a?Ql:Ji(t),d=(l=l==Zl?Yl:l)==Yl,h=(c=c==Zl?Yl:c)==Yl,u=l==c;if(u&&$t(e)){if(!$t(t))return!1;r=!0,d=!1}if(u&&!d)return o||(o=new xt),r||ei(e)?$l(e,t,i,n,s,o):Gl(e,t,l,i,n,s,o);if(!(1&i)){var m=d&&Xl.call(e,"__wrapped__"),g=h&&Xl.call(t,"__wrapped__");if(m||g){var f=m?e.value():e,p=g?t.value():t;return o||(o=new xt),s(f,p,i,n,o)}}return!!u&&(o||(o=new xt),Jl(e,t,i,n,s,o))};const tc=function e(t,i,n,s,o){return t===i||(null==t||null==i||!be(t)&&!be(i)?t!=t&&i!=i:ec(t,i,n,s,e,o))};const ic=function(e,t,i){var n=(i="function"==typeof i?i:void 0)?i(e,t):void 0;return void 0===n?tc(e,t,void 0,i):!!n};class nc extends Il{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,i=new Set,n=new Set;for(const i of e){const e=t.mapDomToView(i.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==i.type||this._isBogusBrMutation(i)||n.add(e))}for(const s of e){const e=t.mapDomToView(s.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===s.type){const e=t.findCorrespondingViewText(s.target);e&&!n.has(e.parent)?i.add(e):!e&&dl(s.target)&&n.add(t.mapDomToView(s.target.parentNode))}}let s=!1;for(const e of i)s=!0,this.renderer.markToSync("text",e);for(const e of n){const i=t.mapViewToDom(e),n=Array.from(e.getChildren()),o=Array.from(t.domChildrenToView(i,{withChildren:!1}));ic(n,o,sc)||(s=!0,this.renderer.markToSync("children",e))}s&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function sc(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class oc extends Ol{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((i,n)=>{const s=t.selection.editableElement;null!==s&&s!==n.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class rc extends Il{constructor(e){super(e),this.mutationObserver=e.getObserver(nc),this.focusObserver=e.getObserver(oc),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Mo((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=Mo((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,i=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",i,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",i,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",i,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,i)=>{this.document.isComposing&&!l.isAndroid||(this._handleSelectionChange(i,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const i=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(i.anchorNode))return;this.mutationObserver.flush();const n=this.domConverter.domSelectionToView(i);if(0!=n.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(n)||!this.domConverter.isDomSelectionCorrect(i))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(n))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:n,domSelection:i};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ac extends Ol{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class lc{constructor(e,t={}){this._files=t.cacheFiles?cc(e):null,this._native=e}get files(){return this._files||(this._files=cc(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,i){this._native.setDragImage(e,t,i)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function cc(e){const t=Array.from(e.files||[]),i=Array.from(e.items||[]);return t.length?t:i.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class dc extends Ol{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),i=this.view,n=i.document;let s=null,o=null,r=[];if(e.dataTransfer&&(s=new lc(e.dataTransfer)),null!==e.data?o=e.data:s&&(o=s.getData("text/plain")),n.selection.isFake)r=Array.from(n.selection.getRanges());else if(t.length)r=t.map((e=>{const t=i.domConverter.domPositionToView(e.startContainer,e.startOffset),n=i.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?i.createRange(t,n):n?i.createRange(n):void 0})).filter((e=>!!e));else if(l.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(i.domConverter.domSelectionToView(t).getRanges())}if(l.isAndroid&&"insertCompositionText"==e.inputType&&o&&o.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[i.createRange(r[0].end)]});else if("insertText"==e.inputType&&o&&o.includes("\n")){const t=o.split(/\n{1,2}/g);let i=r;for(let o=0;o<t.length;o++){const r=t[o];""!=r&&(this.fire(e.type,e,{data:r,dataTransfer:s,targetRanges:i,inputType:e.inputType,isComposing:e.isComposing}),i=[n.selection.getFirstRange()]),o+1<t.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:i}),i=[n.selection.getFirstRange()])}}else this.fire(e.type,e,{data:o,dataTransfer:s,targetRanges:r,inputType:e.inputType,isComposing:e.isComposing})}}class hc extends Il{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&((i=t.keyCode)==fs.arrowright||i==fs.arrowleft||i==fs.arrowup||i==fs.arrowdown)){const i=new Pa(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(i,t),i.stop.called&&e.stop()}var i}))}observe(){}stopObserving(){}}class uc extends Il{constructor(e){super(e);const t=this.document;t.on("keydown",((e,i)=>{if(!this.isEnabled||i.keyCode!=fs.tab||i.ctrlKey)return;const n=new Pa(t,"tab",t.selection.getFirstRange());t.fire(n,i),n.stop.called&&e.stop()}))}observe(){}stopObserving(){}}const mc=function(e){return kn(e,5)};class gc extends(G()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Na(e),this.domConverter=new xl(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new gl(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Ka(this.document),this.addObserver(nc),this.addObserver(oc),this.addObserver(rc),this.addObserver(Bl),this.addObserver(Ml),this.addObserver(ac),this.addObserver(hc),this.addObserver(dc),this.addObserver(uc),this.document.on("arrowKey",ml,{priority:"low"}),Wa(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),l.isiOS&&this.listenTo(this.document,"blur",((e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(e,t="main"){const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:s}of Array.from(e.attributes))n[t]=s,"class"===t?this._writer.addClass(s.split(" "),i):this._writer.setAttribute(t,s,i);this._initialDomRootAttributes.set(e,n);const s=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};s(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),i.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),i.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),i.on("change:isReadOnly",(()=>this.change(s))),i.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:i=20,ancestorOffset:n=20}={}){const s=this.document.selection.getFirstRange();if(!s)return;const o=mc({alignToTop:e,forceScroll:t,viewportOffset:i,ancestorOffset:n});"number"==typeof i&&(i={top:i,bottom:i,left:i,right:i});const r={target:this.domConverter.viewRangeToDom(s),viewportOffset:i,ancestorOffset:n,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",r,o),function({target:e,viewportOffset:t=0,ancestorOffset:i=0,alignToTop:n,forceScroll:s}){const o=ds(e);let r=o,a=null;for(t=function(e){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:e}(t);r;){let l;l=hs(r==o?e:a),os({parent:l,getRect:()=>us(e,r),alignToTop:n,ancestorOffset:i,forceScroll:s});const c=us(e,r);if(ss({window:r,rect:c,viewportOffset:t,alignToTop:n,forceScroll:s}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}(r)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new y("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){y.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(oc).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Aa._createAt(e,t)}createPositionAfter(e){return Aa._createAfter(e)}createPositionBefore(e){return Aa._createBefore(e)}createRange(e,t){return new xa(e,t)}createRangeOn(e){return xa._createOn(e)}createRangeIn(e){return xa._createIn(e)}createSelection(...e){return new Ea(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class fc{is(){throw new Error("is() method is abstract")}}class pc extends fc{constructor(e){super(),this.parent=null,this._attrs=Is(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new y("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new y("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),n=e.getAncestors(t);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=te(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]<i[n]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=Is(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}pc.prototype.is=function(e){return"node"===e||"model:node"===e};class bc{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new y("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const i of this._nodes){if(e>=t&&e<t+i.offsetSize)return this.getNodeIndex(i);t+=i.offsetSize}if(t!=e)throw new y("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof pc))throw new y("model-nodelist-insertnodes-not-node",this);this._nodes=function(e,t,i,n){if(Math.max(t.length,e.length)>1e4)return e.slice(0,i).concat(t).concat(e.slice(i+n,e.length));{const s=Array.from(e);return s.splice(i,n,...t),s}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class wc extends pc{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new wc(this.data,this.getAttributes())}static fromJSON(e){return new wc(e.data,e.attributes)}}wc.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class vc extends fc{constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new y("model-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.offsetSize)throw new y("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}vc.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class _c extends pc{constructor(e,t,i){super(t),this._children=new bc,this.name=e,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}findAncestor(e,t={}){let i=t.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new _c(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new wc(e)];ie(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new wc(e):e instanceof vc?new wc(e.data,e.getAttributes()):e))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}static fromJSON(e){let t;if(e.children){t=[];for(const i of e.children)i.name?t.push(_c.fromJSON(i)):t.push(wc.fromJSON(i))}return new _c(e.name,e.attributes,t)}}_c.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class yc{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new y("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new y("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Cc._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i,n,s;do{n=this.position,s=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this._position=n,this._visitedParent=s)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=Ac(t,i),s=n||xc(t,i,n);if(s instanceof _c){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=s;return this._position=t,kc("elementStart",s,e,t,1)}if(s instanceof wc){let n;if(this.singleCharacters)n=1;else{let e=s.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),n=e-t.offset}const o=t.offset-s.startOffset,r=new vc(s,o,n);return t.offset+=n,this._position=t,kc("text",r,e,t,n)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=i.parent,this.ignoreElementEnd?this._next():kc("elementEnd",i,e,t)}_previous(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&0===t.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const n=t.parent,s=Ac(t,n),o=s||Tc(t,n,s);if(o instanceof _c)return t.offset--,this.shallow?(this._position=t,kc("elementStart",o,e,t,1)):(t.path.push(o.maxOffset),this._position=t,this._visitedParent=o,this.ignoreElementEnd?this._previous():kc("elementEnd",o,e,t));if(o instanceof wc){let n;if(this.singleCharacters)n=1;else{let e=o.startOffset;this._boundaryStartParent==i&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),n=t.offset-e}const s=t.offset-o.startOffset,r=new vc(o,s-n,n);return t.offset-=n,this._position=t,kc("text",r,e,t,n)}return t.path.pop(),this._position=t,this._visitedParent=i.parent,kc("elementStart",i,e,t,1)}}function kc(e,t,i,n,s){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:s}}}class Cc extends fc{constructor(e,t,i="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new y("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new y("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChild(e.offsetToIndex(this.path[t])),!e)throw new y("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new y("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Ac(this,this.parent)}get nodeAfter(){const e=this.parent;return xc(this,e,Ac(this,e))}get nodeBefore(){const e=this.parent;return Tc(this,e,Ac(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=te(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new yc(t);return i.skip(e),i.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=te(this.path,e.path),i="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,i)}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}getShiftedBy(e){const t=this.clone(),i=t.offset+e;return t.offset=i<0?0:i,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let i=0;i<t;i++){const t=this.path[i]-e.path[i];if(t<-1||t>1)return!1;if(1===t)return Ec(e,this,i);if(-1===t)return Ec(this,e,i)}return this.path.length===e.path.length||(this.path.length>e.path.length?Sc(this.path,t):Sc(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==te(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Cc._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?Cc._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=Cc._createAt(this);if(this.root!=e.root)return i;if("same"==te(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;i.offset-=t}}else if("prefix"==te(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;i.path[n]-=t}}return i}_getTransformedByInsertion(e,t){const i=Cc._createAt(this);if(this.root!=e.root)return i;if("same"==te(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(i.offset+=t);else if("prefix"==te(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;e.offset<=this.path[n]&&(i.path[n]+=t)}return i}_getTransformedByMove(e,t,i){if(t=t._getTransformedByDeletion(e,i),e.isEqual(t))return Cc._createAt(this);const n=this._getTransformedByDeletion(e,i);return null===n||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(i).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):n._getTransformedByInsertion(t,i)}_getCombined(e,t){const i=e.path.length-1,n=Cc._createAt(t);return n.stickiness=this.stickiness,n.offset=n.offset+this.path[i]-e.offset,n.path=[...n.path,...this.path.slice(i+1)],n}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,i="toNone"){if(e instanceof Cc)return new Cc(e.root,e.path,e.stickiness);{const n=e;if("end"==t)t=n.maxOffset;else{if("before"==t)return this._createBefore(n,i);if("after"==t)return this._createAfter(n,i);if(0!==t&&!t)throw new y("model-createpositionat-offset-required",[this,e])}if(!n.is("element")&&!n.is("documentFragment"))throw new y("model-position-parent-incorrect",[this,e]);const s=n.getPath();return s.push(t),new this(n.root,s,i)}}static _createAfter(e,t){if(!e.parent)throw new y("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new y("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const i=new Cc(t.graveyard,e.path);return i.stickiness=e.stickiness,i}if(!t.getRoot(e.root))throw new y("model-position-fromjson-no-root",t,{rootName:e.root});return new Cc(t.getRoot(e.root),e.path,e.stickiness)}}function Ac(e,t){const i=t.getChild(t.offsetToIndex(e.offset));return i&&i.is("$text")&&i.startOffset<e.offset?i:null}function xc(e,t,i){return null!==i?null:t.getChild(t.offsetToIndex(e.offset))}function Tc(e,t,i){return null!==i?null:t.getChild(t.offsetToIndex(e.offset)-1)}function Ec(e,t,i){return i+1!==e.path.length&&(!!Sc(t.path,i+1)&&!!function(e,t){let i=e.parent,n=e.path.length-1,s=0;for(;n>=t;){if(e.path[n]+s!==i.maxOffset)return!1;s=1,n--,i=i.parent}return!0}(e,i+1))}function Sc(e,t){for(;t<e.length;){if(0!==e[t])return!1;t++}return!0}Cc.prototype.is=function(e){return"position"===e||"model:position"===e};class Pc extends fc{constructor(e,t){super(),this.start=Cc._createAt(e),this.end=t?Cc._createAt(t):Cc._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new yc({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==te(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const i=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),n=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return i&&n}containsItem(e){const t=Cc._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Pc(this.start,e.start)),this.containsPosition(e.end)&&t.push(new Pc(e.end,this.end))):t.push(new Pc(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,i=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(i=e.end),new Pc(t,i)}return null}getJoined(e,t=!1){let i=this.isIntersecting(e);if(i||(i=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!i)return null;let n=this.start,s=this.end;return e.start.isBefore(n)&&(n=e.start),e.end.isAfter(s)&&(s=e.end),new Pc(n,s)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,i=Cc._createAt(this.start);let n=i.parent;for(;i.path.length>t+1;){const t=n.maxOffset-i.offset;0!==t&&e.push(new Pc(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],n=t-i.offset;0!==n&&e.push(new Pc(i,i.getShiftedBy(n))),i.offset=t,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new yc(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new yc(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new yc(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Pc(this.start,this.end)]}getTransformedByOperations(e){const t=[new Pc(this.start,this.end)];for(const i of e)for(let e=0;e<t.length;e++){const n=t[e].getTransformedByOperation(i);t.splice(e,1,...n),e+=n.length-1}for(let e=0;e<t.length;e++){const i=t[e];for(let n=e+1;n<t.length;n++){const e=t[n];(i.containsRange(e)||e.containsRange(i)||i.isEqual(e))&&t.splice(n,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const i=e.sourcePosition,n=e.howMany,s=e.targetPosition;return this._getTransformedByMove(i,s,n,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let i=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(i=this.end.getShiftedBy(1)),t.root!=i.root&&(i=this.end.getShiftedBy(-1)),new Pc(t,i)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new Pc(this.start);let t=this.start._getTransformedByMergeOperation(e),i=this.end._getTransformedByMergeOperation(e);return t.root!=i.root&&(i=this.end.getShiftedBy(-1)),t.isAfter(i)?(e.sourcePosition.isBefore(e.targetPosition)?(t=Cc._createAt(i),t.offset=0):(e.deletionPosition.isEqual(t)||(i=e.deletionPosition),t=e.targetPosition),new Pc(t,i)):new Pc(t,i)}_getTransformedByInsertion(e,t,i=!1){if(i&&this.containsPosition(e))return[new Pc(this.start,e),new Pc(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const i=new Pc(this.start,this.end);return i.start=i.start._getTransformedByInsertion(e,t),i.end=i.end._getTransformedByInsertion(e,t),[i]}}_getTransformedByMove(e,t,i,n=!1){if(this.isCollapsed){const n=this.start._getTransformedByMove(e,t,i);return[new Pc(n)]}const s=Pc._createFromPositionAndShift(e,i),o=t._getTransformedByDeletion(e,i);if(this.containsPosition(t)&&!n&&(s.containsPosition(this.start)||s.containsPosition(this.end))){const n=this.start._getTransformedByMove(e,t,i),s=this.end._getTransformedByMove(e,t,i);return[new Pc(n,s)]}let r;const a=this.getDifference(s);let l=null;const c=this.getIntersection(s);if(1==a.length?l=new Pc(a[0].start._getTransformedByDeletion(e,i),a[0].end._getTransformedByDeletion(e,i)):2==a.length&&(l=new Pc(this.start,this.end._getTransformedByDeletion(e,i))),r=l?l._getTransformedByInsertion(o,i,null!==c||n):[],c){const e=new Pc(c.start._getCombined(s.start,o),c.end._getCombined(s.start,o));2==r.length?r.splice(1,0,e):r.push(e)}return r}_getTransformedByDeletion(e,t){let i=this.start._getTransformedByDeletion(e,t),n=this.end._getTransformedByDeletion(e,t);return null==i&&null==n?null:(null==i&&(i=e),null==n&&(n=e),new Pc(i,n))}static _createFromPositionAndShift(e,t){const i=e,n=e.getShiftedBy(t);return t>0?new this(i,n):new this(n,i)}static _createIn(e){return new this(Cc._createAt(e,0),Cc._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Cc._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new y("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const i=e.indexOf(t),n=new this(t.start,t.end);if(i>0)for(let t=i-1;e[t].end.isEqual(n.start);t++)n.start=Cc._createAt(e[t].start);for(let t=i+1;t<e.length&&e[t].start.isEqual(n.end);t++)n.end=Cc._createAt(e[t].end);return n}static fromJSON(e,t){return new this(Cc.fromJSON(e.start,t),Cc.fromJSON(e.end,t))}}Pc.prototype.is=function(e){return"range"===e||"model:range"===e};class Ic extends(V()){constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);if(!i)throw new y("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(i),s=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=Cc._createAt(n,s)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const i=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(i)==e&&this._modelToViewMapping.delete(i))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Pc(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new xa(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const i={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e){return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let i=0;i<t;i++)n+=this.getModelLength(e.getChild(i));return n}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name)){return this._viewToModelLengthCallbacks.get(e.name)(e)}if(this._viewToModelMapping.has(e))return 1;if(e.is("$text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const i of e.getChildren())t+=this.getModelLength(i);return t}}findPositionIn(e,t){let i,n=0,s=0,o=0;if(e.is("$text"))return new Aa(e,t);for(;s<t;)i=e.getChild(o),n=this.getModelLength(i),s+=n,o++;return s==t?this._moveViewPositionToTextNode(new Aa(e,o)):this.findPositionIn(i,t-(s-n))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,i=e.nodeAfter;return t instanceof fr?new Aa(t,t.data.length):i instanceof fr?new Aa(i,0):e}}class Vc{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=Rc(t),e instanceof vc&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Rc(t),e instanceof vc&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Rc(t),e instanceof vc&&(e=this._getSymbolForTextProxy(e));const i=this._consumable.get(e);if(void 0===i)return null;const n=i.get(t);return void 0===n?null:n}revert(e,t){t=Rc(t),e instanceof vc&&(e=this._getSymbolForTextProxy(e));const i=this.test(e,t);return!1===i?(this._consumable.get(e).set(t,!0),!0):!0!==i&&null}verifyAllConsumed(e){const t=[];for(const[i,n]of this._consumable)for(const[s,o]of n){const n=s.split(":")[0];o&&e==n&&t.push({event:s,item:i.name||i.description})}if(t.length)throw new y("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const i=this._textProxyRegistry.get(e.startOffset);if(i){const n=i.get(e.endOffset);n&&(t=n.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,i=e.endOffset,n=e.parent,s=Symbol("$textProxy:"+e.data);let o,r;return o=this._textProxyRegistry.get(t),o||(o=new Map,this._textProxyRegistry.set(t,o)),r=o.get(i),r||(r=new Map,o.set(i,r)),r.set(n,s),s}}function Rc(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}class Oc extends(V()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,i){const n=this._createConversionApi(i,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,n);const s=this._reduceChanges(e.getChanges());for(const e of s)"insert"===e.type?this._convertInsert(Pc._createFromPositionAndShift(e.position,e.length),n):"reinsert"===e.type?this._convertReinsert(Pc._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,n):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);n.mapper.flushDeferredBindings();for(const e of n.mapper.flushUnboundMarkerNames()){const i=t.get(e).getRange();this._convertMarkerRemove(e,i,n),this._convertMarkerAdd(e,i,n)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,n);n.consumable.verifyAllConsumed("insert")}convert(e,t,i,n={}){const s=this._createConversionApi(i,void 0,n);this._convertInsert(e,s);for(const[e,i]of t)this._convertMarkerAdd(e,i,s);s.consumable.verifyAllConsumed("insert")}convertSelection(e,t,i){const n=this._createConversionApi(i);this.fire("cleanSelection",{selection:e},n);const s=e.getFirstPosition().root;if(!n.mapper.toViewElement(s))return;const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(n.consumable,e,o),this.fire("selection",{selection:e},n),e.isCollapsed){for(const t of o)if(n.consumable.test(e,"addMarker:"+t.name)){const i=t.getRange();if(!Bc(e.getFirstPosition(),t,n.mapper))continue;const s={item:e,markerName:t.name,markerRange:i};this.fire(`addMarker:${t.name}`,s,n)}for(const t of e.getAttributeKeys())if(n.consumable.test(e,"attribute:"+t)){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,i,n)}}}_convertInsert(e,t,i={}){i.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const i of Array.from(e.getWalker({shallow:!0})).map(Mc))this._testAndFire("insert",i,t)}_convertRemove(e,t,i,n){this.fire(`remove:${i}`,{position:e,length:t},n)}_convertAttribute(e,t,i,n,s){this._addConsumablesForRange(s.consumable,e,`attribute:${t}`);for(const o of e){const e={item:o.item,range:Pc._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${t}`,e,s)}}_convertReinsert(e,t){const i=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,i);for(const e of i.map(Mc))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,i){if("$graveyard"==t.root.rootName)return;const n=`addMarker:${e}`;if(i.consumable.add(t,n),this.fire(n,{markerName:e,markerRange:t},i),i.consumable.consume(t,n)){this._addConsumablesForRange(i.consumable,t,n);for(const s of t.getItems()){if(!i.consumable.test(s,n))continue;const o={item:s,range:Pc._createOn(s),markerName:e,markerRange:t};this.fire(n,o,i)}}}_convertMarkerRemove(e,t,i){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},i)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const i of t){const t=i.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i)}}return e}_addConsumablesForRange(e,t,i){for(const n of t.getItems())e.add(n,i);return e}_addConsumablesForSelection(e,t,i){e.add(t,"selection");for(const n of i)e.add(t,"addMarker:"+n.name);for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i);return e}_testAndFire(e,t,i){const n=function(e,t){const i=t.item.is("element")?t.item.name:"$text";return`${e}:${i}`}(e,t),s=t.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(t.item):t.item,o=this._firedEventsMap.get(i),r=o.get(s);if(r){if(r.has(n))return;r.add(n)}else o.set(s,new Set([n]));this.fire(n,t,i)}_testAndFireAddAttributes(e,t){const i={item:e,range:Pc._createOn(e)};for(const e of i.item.getAttributeKeys())i.attributeKey=e,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(e),this._testAndFire(`attribute:${e}`,i,t)}_createConversionApi(e,t=new Set,i={}){const n={...this._conversionApi,consumable:new Vc,writer:e,options:i,convertItem:e=>this._convertInsert(Pc._createOn(e),n),convertChildren:e=>this._convertInsert(Pc._createIn(e),n,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,n),canReuseView:e=>!t.has(n.mapper.toModelElement(e))};return this._firedEventsMap.set(n,new Map),n}}function Bc(e,t,i){const n=t.getRange(),s=Array.from(e.getAncestors());s.shift(),s.reverse();return!s.some((e=>{if(n.containsItem(e)){return!!i.toViewElement(e).getCustomProperty("addHighlight")}}))}function Mc(e){return{item:e.item,range:Pc._createFromPositionAndShift(e.previousPosition,e.length)}}class Nc extends(V(fc)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Pc(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new Pc(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new Pc(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,i,n]=e;if("object"==typeof i&&(n=i,i=void 0),null===t)this._setRanges([]);else if(t instanceof Nc)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Pc)this._setRanges([t],!!n&&!!n.backward);else if(t instanceof Cc)this._setRanges([new Pc(t)]);else if(t instanceof pc){const e=!!n&&!!n.backward;let s;if("in"==i)s=Pc._createIn(t);else if("on"==i)s=Pc._createOn(t);else{if(void 0===i)throw new y("model-selection-setto-required-second-parameter",[this,t]);s=new Pc(Cc._createAt(t,i))}this._setRanges([s],e)}else{if(!ie(t))throw new y("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,n&&!!n.backward)}}_setRanges(e,t=!1){const i=Array.from(e),n=i.some((t=>{if(!(t instanceof Pc))throw new y("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(i.length!==this._ranges.length||n)&&(this._replaceAllRanges(i),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new y("model-selection-setfocus-no-ranges",[this,e]);const i=Cc._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(n)?(this._pushRange(new Pc(i,n)),this._lastRangeBackward=!0):(this._pushRange(new Pc(n,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Lc(t.start,e);Hc(i,t)&&(yield i);for(const i of t.getWalker()){const n=i.item;"elementEnd"==i.type&&Dc(n,e,t)&&(yield n)}const n=Lc(t.end,e);$c(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=Cc._createAt(e,0),i=Cc._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Pc(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new y("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function Fc(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Dc(e,t,i){return Fc(e,t)&&zc(e,i)}function Lc(e,t){const i=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let s=!1;const o=n.find((e=>!s&&(s=i.isLimit(e),!s&&Fc(e,t))));return n.forEach((e=>t.add(e))),o}function zc(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);if(!i)return!0;return!t.containsRange(Pc._createOn(i),!0)}function Hc(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(Cc._createAt(e,e.maxOffset))&&zc(e,t))}function $c(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(Cc._createAt(e,0))&&zc(e,t))}Nc.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Wc extends(V(Pc)){constructor(e,t){super(e,t),jc.call(this)}detach(){this.stopListening()}toRange(){return new Pc(this.start,this.end)}static fromRange(e){return new Wc(e.start,e.end)}}function jc(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&Uc.call(this,i)}),{priority:"low"})}function Uc(e){const t=this.getTransformedByOperation(e),i=Pc._createFromRanges(t),n=!i.isEqual(this),s=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let o=null;if(n){"$graveyard"==i.root.rootName&&(o="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:o})}else s&&this.fire("change:content",this.toRange(),{deletionPosition:o})}Wc.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const qc="selection:";class Gc extends(V(fc)){constructor(e){super(),this._selection=new Kc(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return qc+e}static _isStoreAttributeKey(e){return e.startsWith(qc)}}Gc.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class Kc extends Nc{constructor(e){super(),this.markers=new Ts({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,i,n)=>{this._updateMarker(t,n)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const i=e.document.differ;for(const n of i.getChanges()){if("insert"!=n.type)continue;const i=n.position.parent;n.length===i.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(i.getAttributeKeys()).filter((e=>e.startsWith(qc)));for(const n of t)e.removeAttribute(n,i)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=b();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new y("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new y("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=Wc.fromRange(e);return t.on("change:range",((e,i,n)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const i=t.name.split(":",1)[0];if(!this._observedMarkers.has(i))continue;const n=t.getRange();for(const i of this.getRanges())n.containsRange(i,!i.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(e,t){const i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let n=!1;const s=Array.from(this.markers),o=this.markers.has(e);if(t){let i=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){i=!0;break}i&&!o?(this.markers.add(e),n=!0):!i&&o&&(this.markers.remove(e),n=!0)}else o&&(this.markers.remove(e),n=!0);n&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateAttributes(e){const t=Is(this._getSurroundingAttributes()),i=Is(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||n.push(e);for(const[e]of i)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,i=!0){const n=i?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const i=t?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,i),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,n]of e){this._setAttribute(i,n,!1)&&t.add(i)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(qc)){const i=t.substr(10);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let i=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,s=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=Jc(n,t)),i||(i=Jc(s,t)),!this.isGravityOverridden&&!i){let e=n;for(;e&&!i;)e=e.previousSibling,i=Jc(e,t)}if(!i){let e=s;for(;e&&!i;)e=e.nextSibling,i=Jc(e,t)}i||(i=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item)){i=Jc(n.item,t);break}if("text"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function Jc(e,t){if(!e)return null;if(e instanceof vc||e instanceof wc)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const i=[];for(const[n,s]of e.getAttributes())t.checkAttribute("$text",n)&&!1!==t.getAttributeProperties(n).copyFromObject&&i.push([n,s]);return i}class Zc{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class Qc extends Zc{elementToElement(e){return this.add(function(e){const t=ed(e.model),i=td(e.view,"container");t.attributes.length&&(t.children=!0);return n=>{n.on(`insert:${t.name}`,function(e,t=cd){return(i,n,s)=>{if(!t(n.item,s.consumable,{preflight:!0}))return;const o=e(n.item,s,n);if(!o)return;t(n.item,s.consumable);const r=s.mapper.toViewPosition(n.range.start);s.mapper.bindElements(n.item,o),s.writer.insert(r,o),s.convertAttributes(n.item),ad(o,n.item.getChildren(),s,{reconversion:n.reconversion})}}(i,rd(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&n.on("reduceChanges",od(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=ed(e.model),i=td(e.view,"container");return t.children=!0,n=>{if(n._conversionApi.schema.checkChild(t.name,"$text"))throw new y("conversion-element-to-structure-disallowed-text",n,{elementName:t.name});var s,o;n.on(`insert:${t.name}`,(s=i,o=rd(t),(e,t,i)=>{if(!o(t.item,i.consumable,{preflight:!0}))return;const n=new Map;i.writer._registerSlotFactory(function(e,t,i){return(n,s)=>{const o=n.createContainerElement("$slot");let r=null;if("children"===s)r=Array.from(e.getChildren());else{if("function"!=typeof s)throw new y("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:s});r=Array.from(e.getChildren()).filter((e=>s(e)))}return t.set(o,r),o}}(t.item,n,i));const r=s(t.item,i,t);if(i.writer._clearSlotFactory(),!r)return;!function(e,t,i){const n=Array.from(t.values()).flat(),s=new Set(n);if(s.size!=n.length)throw new y("conversion-slot-filter-overlap",i.dispatcher,{element:e});if(s.size!=e.childCount)throw new y("conversion-slot-filter-incomplete",i.dispatcher,{element:e})}(t.item,n,i),o(t.item,i.consumable);const a=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,r),i.writer.insert(a,r),i.convertAttributes(t.item),function(e,t,i,n){i.mapper.on("modelToViewPosition",r,{priority:"highest"});let s=null,o=null;for([s,o]of t)ad(e,o,i,n),i.writer.move(i.writer.createRangeIn(s),i.writer.createPositionBefore(s)),i.writer.remove(s);function r(e,t){const i=t.modelPosition.nodeAfter,n=o.indexOf(i);n<0||(t.viewPosition=t.mapper.findPositionIn(s,n))}i.mapper.off("modelToViewPosition",r)}(r,n,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),n.on("reduceChanges",od(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=mc(e);let t=e.model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;t.name&&(i+=":"+t.name);if(t.values)for(const i of t.values)e.view[i]=td(e.view[i],"attribute");else e.view=td(e.view,"attribute");const n=id(e);return t=>{t.on(i,function(e){return(t,i,n)=>{if(!n.consumable.test(i.item,t.name))return;const s=e(i.attributeOldValue,n,i),o=e(i.attributeNewValue,n,i);if(!s&&!o)return;n.consumable.consume(i.item,t.name);const r=n.writer,a=r.document.selection;if(i.item instanceof Nc||i.item instanceof Gc)r.wrap(a.getFirstRange(),o);else{let e=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&s&&(e=r.unwrap(e,s)),null!==i.attributeNewValue&&o&&r.wrap(e,o)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=mc(e);let t=e.model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;t.name&&(i+=":"+t.name);if(t.values)for(const i of t.values)e.view[i]=nd(e.view[i]);else e.view=nd(e.view);const n=id(e);return t=>{var s;t.on(i,(s=n,(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const n=s(t.attributeOldValue,i,t),o=s(t.attributeNewValue,i,t);if(!n&&!o)return;i.consumable.consume(t.item,e.name);const r=i.mapper.toViewElement(t.item),a=i.writer;if(!r)throw new y("conversion-attribute-to-attribute-on-text",i.dispatcher,t);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e=ys(n.value);for(const t of e)a.removeClass(t,r)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,r)}else a.removeAttribute(n.key,r);if(null!==t.attributeNewValue&&o)if("class"==o.key){const e=ys(o.value);for(const t of e)a.addClass(t,r)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)a.setStyle(t,o.value[t],r)}else a.setAttribute(o.key,o.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=td(e.view,"ui");return i=>{var n;i.on(`addMarker:${e.model}`,(n=t,(e,t,i)=>{t.isOpening=!0;const s=n(t,i);t.isOpening=!1;const o=n(t,i);if(!s||!o)return;const r=t.markerRange;if(r.isCollapsed&&!i.consumable.consume(r,e.name))return;for(const t of r)if(!i.consumable.consume(t.item,e.name))return;const a=i.mapper,l=i.writer;l.insert(a.toViewPosition(r.start),s),i.mapper.bindElementToMarker(s,t.markerName),r.isCollapsed||(l.insert(a.toViewPosition(r.end),o),i.mapper.bindElementToMarker(o,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${e.model}`,((e,t,i)=>{const n=i.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on(`addMarker:${e.model}`,(i=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof Nc||t.item instanceof Gc||t.item.is("$textProxy")))return;const s=sd(i,t,n);if(!s)return;if(!n.consumable.consume(t.item,e.name))return;const o=n.writer,r=Yc(o,s),a=o.document.selection;if(t.item instanceof Nc||t.item instanceof Gc)o.wrap(a.getFirstRange(),r);else{const e=n.mapper.toViewRange(t.range),i=o.wrap(e,r);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,i,n)=>{if(!i.item)return;if(!(i.item instanceof _c))return;const s=sd(e,i,n);if(!s)return;if(!n.consumable.test(i.item,t.name))return;const o=n.mapper.toViewElement(i.item);if(o&&o.getCustomProperty("addHighlight")){n.consumable.consume(i.item,t.name);for(const e of Pc._createIn(i.item))n.consumable.consume(e.item,t.name);o.getCustomProperty("addHighlight")(o,s,n.writer),n.mapper.bindElementToMarker(o,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,i,n)=>{if(i.markerRange.isCollapsed)return;const s=sd(e,i,n);if(!s)return;const o=Yc(n.writer,s),r=n.mapper.markerNameToElements(i.markerName);if(r){for(const e of r)if(n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement"))n.writer.unwrap(n.writer.createRangeOn(e),o);else{e.getCustomProperty("removeHighlight")(e,s.id,n.writer)}n.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=mc(e);const t=e.model;let i=e.view;i||(i=i=>({group:t,name:i.substr(e.model.length+1)}));return n=>{var s;n.on(`addMarker:${t}`,(s=i,(e,t,i)=>{const n=s(t.markerName,i);if(!n)return;const o=t.markerRange;i.consumable.consume(o,e.name)&&(Xc(o,!1,i,t,n),Xc(o,!0,i,t,n),e.stop())}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${t}`,function(e){return(t,i,n)=>{const s=e(i.markerName,n);if(!s)return;const o=n.mapper.markerNameToElements(i.markerName);if(o){for(const e of o)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(r(`data-${s.group}-start-before`,e),r(`data-${s.group}-start-after`,e),r(`data-${s.group}-end-before`,e),r(`data-${s.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(s.name),0==i.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(i),{priority:e.converterPriority||"normal"})}}(e))}}function Yc(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),"number"==typeof t.priority&&(i._priority=t.priority),i._id=t.id,i}function Xc(e,t,i,n,s){const o=t?e.start:e.end,r=o.nodeAfter&&o.nodeAfter.is("element")?o.nodeAfter:null,a=o.nodeBefore&&o.nodeBefore.is("element")?o.nodeBefore:null;if(r||a){let e,o;t&&r||!t&&!a?(e=r,o=!0):(e=a,o=!1);const l=i.mapper.toViewElement(e);if(l)return void function(e,t,i,n,s,o){const r=`data-${o.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(o.name),n.writer.setAttribute(r,a.join(","),e),n.mapper.bindElementToMarker(e,s.markerName)}(l,t,o,i,n,s)}!function(e,t,i,n,s){const o=`${s.group}-${t?"start":"end"}`,r=s.name?{name:s.name}:null,a=i.writer.createUIElement(o,r);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,n.markerName)}(i.mapper.toViewPosition(o),t,i,n,s)}function ed(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?ys(e.attributes):[],children:!!e.children}}function td(e,t){return"function"==typeof e?e:(i,n)=>function(e,t,i){"string"==typeof e&&(e={name:e});let n;const s=t.writer,o=Object.assign({},e.attributes);if("container"==i)n=s.createContainerElement(e.name,o);else if("attribute"==i){const t={priority:e.priority||Fa.DEFAULT_PRIORITY};n=s.createAttributeElement(e.name,o,t)}else n=s.createUIElement(e.name,o);if(e.styles){const t=Object.keys(e.styles);for(const i of t)s.setStyle(i,e.styles[i],n)}if(e.classes){const t=e.classes;if("string"==typeof t)s.addClass(t,n);else for(const e of t)s.addClass(e,n)}return n}(e,n,t)}function id(e){return e.model.values?(t,i,n)=>{const s=e.view[t];return s?s(t,i,n):null}:e.view}function nd(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function sd(e,t,i){const n="function"==typeof e?e(t,i):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function od(e){const t=function(e){return(t,i)=>{if(!t.is("element",e.name))return!1;if("attribute"==i.type){if(e.attributes.includes(i.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,i)=>{const n=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const e of i.changes){const s="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(s&&t(s,e)){if(!i.reconvertedElements.has(s)){i.reconvertedElements.add(s);const e=Cc._createBefore(s);let t=n.length;for(let i=n.length-1;i>=0;i--){const s=n[i],o=("attribute"==s.type?s.range.start:s.position).compareWith(e);if("before"==o||"remove"==s.type&&"same"==o)break;t=i}n.splice(t,0,{type:"remove",name:s.name,position:e,length:1},{type:"reinsert",name:s.name,position:e,length:1})}}else n.push(e)}i.changes=n}}function rd(e){return(t,i,n={})=>{const s=["insert"];for(const i of e.attributes)t.hasAttribute(i)&&s.push(`attribute:${i}`);return!!s.every((e=>i.test(t,e)))&&(n.preflight||s.forEach((e=>i.consume(t,e))),!0)}}function ad(e,t,i,n){for(const s of t)ld(e.root,s,i,n)||i.convertItem(s)}function ld(e,t,i,n){const{writer:s,mapper:o}=i;if(!n.reconversion)return!1;const r=o.toViewElement(t);return!(!r||r.root==e)&&(!!i.canReuseView(r)&&(s.move(s.createRangeOn(r),o.toViewPosition(Cc._createBefore(t))),!0))}function cd(e,t,{preflight:i}={}){return i?t.test(e,"insert"):t.consume(e,"insert")}function dd(e){const{schema:t,document:i}=e.model;for(const n of i.getRoots())if(n.isEmpty&&!t.checkChild(n,"$text")&&t.checkChild(n,"paragraph"))return e.insertElement("paragraph",n),!0;return!1}function hd(e,t,i){const n=i.createContext(e);return!!i.checkChild(n,"paragraph")&&!!i.checkChild(n.push("paragraph"),t)}function ud(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class md extends Zc{elementToElement(e){return this.add(gd(e))}elementToAttribute(e){return this.add(function(e){e=mc(e),bd(e);const t=wd(e,!1),i=fd(e.view),n=i?`element:${i}`:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=mc(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let i;if("class"==t||"style"==t){i={["class"==t?"classes":"styles"]:e.view.value}}else{i={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(i.name=e.view.name);return e.view=i,t}(e));bd(e,t);const i=wd(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,i)=>{const n="string"==typeof e?e:e(t,i);return i.writer.createElement("$marker",{"data-name":n})}}(e.model);return gd({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=mc(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},i=pd(vd(t,"start")),n=pd(vd(t,"end"));return s=>{s.on(`element:${e.view}-start`,i,{priority:e.converterPriority||"normal"}),s.on(`element:${e.view}-end`,n,{priority:e.converterPriority||"normal"});const o=w.low,r=w.highest,a=w.get(e.converterPriority)/r;s.on("element",function(e){return(t,i,n)=>{const s=`data-${e.view}`;function o(t,s){for(const o of s){const s=e.model(o,n),r=n.writer.createElement("$marker",{"data-name":s});n.writer.insert(r,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}(n.consumable.test(i.viewItem,{attributes:s+"-end-after"})||n.consumable.test(i.viewItem,{attributes:s+"-start-after"})||n.consumable.test(i.viewItem,{attributes:s+"-end-before"})||n.consumable.test(i.viewItem,{attributes:s+"-start-before"}))&&(i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor)),n.consumable.consume(i.viewItem,{attributes:s+"-end-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(s+"-end-after").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-start-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(s+"-start-after").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-end-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(s+"-end-before").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-start-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(s+"-start-before").split(",")))}}(t),{priority:o+a})}}(e))}}function gd(e){const t=pd(e=mc(e)),i=fd(e.view),n=i?`element:${i}`:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"normal"})}}function fd(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function pd(e){const t=new br(e.view);return(i,n,s)=>{const o=t.match(n.viewItem);if(!o)return;const r=o.match;if(r.name=!0,!s.consumable.test(n.viewItem,r))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,n.viewItem,s);a&&s.safeInsert(a,n.modelCursor)&&(s.consumable.consume(n.viewItem,r),s.convertChildren(n.viewItem,a),s.updateConversionResult(a,n))}}function bd(e,t=null){const i=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,s="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:n,value:s}}function wd(e,t){const i=new br(e.view);return(n,s,o)=>{if(!s.modelRange&&t)return;const r=i.match(s.viewItem);if(!r)return;if(!function(e,t){const i="function"==typeof e?e(t):e;if("object"==typeof i&&!fd(i))return!1;return!i.classes&&!i.attributes&&!i.styles}(e.view,s.viewItem)?delete r.match.name:r.match.name=!0,!o.consumable.test(s.viewItem,r.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(s.viewItem,o):e.model.value;if(null===l)return;s.modelRange||Object.assign(s,o.convertChildren(s.viewItem,s.modelCursor));const c=function(e,t,i,n){let s=!1;for(const o of Array.from(e.getItems({shallow:i})))n.schema.checkAttribute(o,t.key)&&(s=!0,o.hasAttribute(t.key)||n.writer.setAttribute(t.key,t.value,o));return s}(s.modelRange,{key:a,value:l},t,o);c&&(o.consumable.test(s.viewItem,{name:!0})&&(r.match.name=!0),o.consumable.consume(s.viewItem,r.match))}}function vd(e,t){return{view:`${e.view}-${t}`,model:(t,i)=>{const n=t.getAttribute("name"),s=e.model(n,i);return i.writer.createElement("$marker",{"data-name":s})}}}function _d(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.selection,n=t.schema,s=[];let o=!1;for(const e of i.getRanges()){const t=yd(e,n);t&&!t.isEqual(e)?(s.push(t),o=!0):s.push(e)}o&&e.setSelection(function(e){const t=[...e],i=new Set;let n=1;for(;n<t.length;){const e=t[n],s=t.slice(0,n);for(const[o,r]of s.entries())if(!i.has(o))if(e.isEqual(r))i.add(o);else if(e.isIntersecting(r)){i.add(o),i.add(n);const s=e.getJoined(r);t.push(s)}n++}return t.filter(((e,t)=>!i.has(t)))}(s),{backward:i.isBackward});return!1}(t,e)))}function yd(e,t){return e.isCollapsed?function(e,t){const i=e.start,n=t.getNearestSelectionRange(i);if(!n){const e=i.getAncestors().reverse().find((e=>t.isObject(e)));return e?Pc._createOn(e):null}if(!n.isCollapsed)return n;const s=n.start;if(i.isEqual(s))return null;return new Pc(s)}(e,t):function(e,t){const{start:i,end:n}=e,s=t.checkChild(i,"$text"),o=t.checkChild(n,"$text"),r=t.getLimitElement(i),a=t.getLimitElement(n);if(r===a){if(s&&o)return null;if(function(e,t,i){const n=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),s=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return n||s}(i,n,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),s=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),o=e?e.start:i,r=s?s.end:n;return new Pc(o,r)}}const l=r&&!r.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,s=l&&(!e||!Cd(i.nodeAfter,t)),o=c&&(!e||!Cd(n.nodeBefore,t));let d=i,h=n;return s&&(d=Cc._createBefore(kd(r,t))),o&&(h=Cc._createAfter(kd(a,t))),new Pc(d,h)}return null}(e,t)}function kd(e,t){let i=e,n=i;for(;t.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function Cd(e,t){return e&&t.isSelectable(e)}class Ad extends(G()){constructor(e,t){super(),this.model=e,this.view=new gc(t),this.mapper=new Ic,this.downcastDispatcher=new Oc({mapper:this.mapper,schema:e.schema});const i=this.model.document,n=i.selection,s=this.model.markers;var o,r,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(i,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(i.differ,s,e),this.downcastDispatcher.convertSelection(n,s,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,n)=>{const s=n.newSelection,o=[];for(const e of s.getRanges())o.push(t.toModelRange(e));const r=e.createSelection(o,{backward:s.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(o=this.mapper,r=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||l.isAndroid)for(let e=0;e<t.targetRanges.length;e++){const i=t.targetRanges[e],n=o.toModelRange(i),s=yd(n,r);s&&!s.isEqual(n)&&(t.targetRanges[e]=o.toViewRange(s))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,s=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(s,o)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,i)=>{const n=i.mapper.toViewPosition(t.position),s=t.position.getShiftedBy(t.length),o=i.mapper.toViewPosition(s,{isPhantom:!0}),r=i.writer.createRange(n,o),a=i.writer.remove(r.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((e,t,i)=>{const n=i.writer,s=n.document.selection;for(const e of s.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);n.setSelection(null)})),this.downcastDispatcher.on("selection",((e,t,i)=>{const n=t.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const s=[];for(const e of n.getRanges())s.push(i.mapper.toViewRange(e));i.writer.setSelection(s,{backward:n.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const n=t.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const s=i.writer,o=n.getFirstPosition(),r=i.mapper.toViewPosition(o),a=s.breakAttributes(r);s.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new ka(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,i=this.model.markers.get(t);if(!i)throw new y("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(i)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class xd{constructor(){this._consumables=new Map}add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new Ed(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const s=e.getStyleNames();for(const e of s)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new xd),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,xd.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=xd.createFrom(i,t);return t}}const Td=["attributes","classes","styles"];class Ed{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Td)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Td)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Td)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Td)t in e&&this._revert(t,e[t])}_add(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new y("viewconsumable-invalid-attribute",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Sd extends(G()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Pd(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Pd(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new y("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new y("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const i=this.getDefinition(e.last);return!!i&&i.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Cc){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof _c))throw new y("schema-check-merge-no-element-before",this);if(!(i instanceof _c))throw new y("schema-check-merge-no-element-after",this);return this.checkMerge(t,i)}for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[i,n])=>{if(!n)return;const s=e(i,n);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[i,n])=>{const s=e(i,n);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof Cc)t=e.parent;else{t=(e instanceof Pc?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new wc("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e,t="both"){if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new Pc(e);let i,n;const s=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(i=new yc({boundaries:Pc._createIn(s),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new yc({boundaries:Pc._createIn(s),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(i,n)){const t=e.walker==i?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return Pc._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new Pc(n.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(e,t,i){const n=i.model;for(const[s,o]of Object.entries(t))n.schema.checkAttribute(e,s)&&i.setAttribute(s,o,e)}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))$d(this,i,t);else{const e=Pc._createIn(i).getPositions();for(const i of e){$d(this,i.nodeBefore||i.parent,t)}}}getAttributesWithProperty(e,t,i){const n={};for(const[s,o]of e.getAttributes()){const e=this.getAttributeProperties(s);void 0!==e[t]&&(void 0!==i&&i!==e[t]||(n[s]=o))}return n}createContext(e){return new Pd(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const n of i)e[n]=Id(t[n],n);for(const t of i)Vd(e,t);for(const t of i)Rd(e,t);for(const t of i)Od(e,t);for(const t of i)Bd(e,t),Md(e,t);for(const t of i)Nd(e,t),Fd(e,t),Dd(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,i=t.length-1){const n=t.getItem(i);if(e.allowIn.includes(n.name)){if(0==i)return!0;{const e=this.getDefinition(n);return this._checkContextMatch(e,t,i-1)}}return!1}*_getValidRangesForRange(e,t){let i=e.start,n=e.start;for(const s of e.getItems({shallow:!0}))s.is("element")&&(yield*this._getValidRangesForRange(Pc._createIn(s),t)),this.checkAttribute(s,t)||(i.isEqual(n)||(yield new Pc(i,n)),i=Cc._createAfter(s)),n=Cc._createAfter(s);i.isEqual(n)||(yield new Pc(i,n))}}class Pd{constructor(e){if(e instanceof Pd)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Hd)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Pd([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Id(e,t){const i={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const i of e){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const n of e)t[n]=!!i[n]}}(e,i),Ld(e,i,"allowIn"),Ld(e,i,"allowContentOf"),Ld(e,i,"allowWhere"),Ld(e,i,"allowAttributes"),Ld(e,i,"allowAttributesOf"),Ld(e,i,"allowChildren"),Ld(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,i),i}function Vd(e,t){const i=e[t];for(const n of i.allowChildren){const i=e[n];i&&i.allowIn.push(t)}i.allowChildren.length=0}function Rd(e,t){for(const i of e[t].allowContentOf)if(e[i]){zd(e,i).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function Od(e,t){for(const i of e[t].allowWhere){const n=e[i];if(n){const i=n.allowIn;e[t].allowIn.push(...i)}}delete e[t].allowWhere}function Bd(e,t){for(const i of e[t].allowAttributesOf){const n=e[i];if(n){const i=n.allowAttributes;e[t].allowAttributes.push(...i)}}delete e[t].allowAttributesOf}function Md(e,t){const i=e[t];for(const t of i.inheritTypesFrom){const n=e[t];if(n){const e=Object.keys(n).filter((e=>e.startsWith("is")));for(const t of e)t in i||(i[t]=n[t])}}delete i.inheritTypesFrom}function Nd(e,t){const i=e[t],n=i.allowIn.filter((t=>e[t]));i.allowIn=Array.from(new Set(n))}function Fd(e,t){const i=e[t];for(const n of i.allowIn){e[n].allowChildren.push(t)}}function Dd(e,t){const i=e[t];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function Ld(e,t,i){for(const n of e){const e=n[i];"string"==typeof e?t[i].push(e):Array.isArray(e)&&t[i].push(...e)}}function zd(e,t){const i=e[t];return(n=e,Object.keys(n).map((e=>n[e]))).filter((e=>e.allowIn.includes(i.name)));var n}function Hd(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function $d(e,t,i){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||i.removeAttribute(n,t)}class Wd extends(V()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const n of new Pd(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const s=t.createElement(n.name,e);i&&t.insert(s,i),i=Cc._createAt(s,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=xd.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),s=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,s);s.markers=function(e,t){const i=new Set,n=new Map,s=Pc._createIn(e).getItems();for(const e of s)e.is("element","$marker")&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),s=t.createPositionBefore(e);n.has(i)?n.get(i).end=s.clone():n.set(i,new Pc(s.clone())),t.remove(e)}return n}(s,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,s}_convertItem(e,t){const i={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof Pc))throw new y("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:Cc._createAt(t,0);const n=new Pc(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof Pc&&(n.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:n,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(i[i.length-1])));const s=this._cursorParents.get(e);t.modelCursor=s?n.createPositionAt(s,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:n}=this.conversionApi;let s=i.findAllowedParent(t,e);if(s){if(s===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(s)&&(s=null)}if(!s)return hd(t,e,i)?{position:ud(t,n)}:null;const o=this.conversionApi.writer.split(t,s),r=[];for(const e of o.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),i=e.item;this._registerSplitPair(t,i)}const a=o.range.end.parent;return this._cursorParents.set(e,a),{position:o.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class jd{getHtml(e){const t=Mn.document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Ud{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new xl(e,{renderingMode:"data"}),this.htmlWriter=new jd}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}class qd extends(V()){constructor(e,t){super(),this.model=e,this.mapper=new Ic,this.downcastDispatcher=new Oc({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,s=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(s,o)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Wd({schema:e.schema}),this.viewDocument=new Na(t),this.stylesProcessor=t,this.htmlProcessor=new Ud(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Ka(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:i,consumable:n,writer:s})=>{let o=t.modelCursor;if(!n.test(t.viewItem))return;if(!i.checkChild(o,"$text")){if(!hd(o,"$text",i))return;if(0==t.viewItem.data.trim().length)return;const e=o.nodeBefore;o=ud(o,s),e&&e.is("element","$marker")&&(s.move(s.createRangeOn(e),o),o=s.createPositionAfter(e))}n.consume(t.viewItem);const r=s.createText(t.viewItem.data);s.insert(r,o),t.modelRange=s.createRange(o,o.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),G().prototype.decorate.call(this,"init"),G().prototype.decorate.call(this,"set"),G().prototype.decorate.call(this,"get"),G().prototype.decorate.call(this,"toView"),G().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},dd)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new y("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(t);return n.isAttached()||k("datacontroller-get-detached-root",this),"empty"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t={}){const i=this.toView(e,t);return this.processor.toData(i)}toView(e,t={}){const i=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const s=Pc._createIn(e),o=new Ga(i);this.mapper.bindElements(e,o);const r=e.is("documentFragment")?e.markers:function(e){const t=[],i=e.root.document;if(!i)return new Map;const n=Pc._createIn(e);for(const e of i.model.markers){const i=e.getRange(),s=i.isCollapsed,o=i.start.isEqual(n.start)||i.end.isEqual(n.end);if(s&&o)t.push([e.name,i]);else{const s=n.getIntersection(i);s&&t.push([e.name,s])}}return t.sort((([e,t],[i,n])=>{if("after"!==t.end.compareWith(n.start))return 1;if("before"!==t.start.compareWith(n.end))return-1;switch(t.start.compareWith(n.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(n.end)){case"before":return 1;case"after":return-1;default:return i.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(s,r,n,t),o}init(e){if(this.model.document.version)throw new y("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new y("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.insert(this.parse(t[i],n),n,0)}})),Promise.resolve()}set(e,t={}){let i={};if("string"==typeof e?i.main=e:i=e,!this._checkIfRootsExists(Object.keys(i)))throw new y("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(i)){const n=this.model.document.getRoot(t);e.remove(e.createRangeIn(n)),e.insert(this.parse(i[t],n),n,0)}}))}parse(e,t="$root"){const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e,t="$root"){return this.model.change((i=>this.upcastDispatcher.convert(e,i,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Gd{constructor(e,t){this._helpers=new Map,this._downcast=ys(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=ys(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new y("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new y("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of Kd(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of Kd(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of Kd(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:i}){if(this._helpers.has(e))throw new y("conversion-group-exists",this);const n=i?new Qc(t):new md(t);this._helpers.set(e,n)}}function*Kd(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},n=e.view[t],s=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Jd(i,n,s)}else yield*Jd(e.model,e.view,e.upcastAlso)}function*Jd(e,t,i){if(yield{model:e,view:t},i)for(const t of ys(i))yield{model:e,view:t}}class Zd{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function Qd(e,t){const i=eh(t),n=i.reduce(((e,t)=>e+t.offsetSize),0),s=e.parent;ih(e);const o=e.index;return s._insertChild(o,i),th(s,o+i.length),th(s,o),new Pc(e,e.getShiftedBy(n))}function Yd(e){if(!e.isFlat)throw new y("operation-utils-remove-range-not-flat",this);const t=e.start.parent;ih(e.start),ih(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return th(t,e.start.index),i}function Xd(e,t){if(!e.isFlat)throw new y("operation-utils-move-range-not-flat",this);const i=Yd(e);return Qd(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function eh(e){const t=[];!function e(i){if("string"==typeof i)t.push(new wc(i));else if(i instanceof vc)t.push(new wc(i.data,i.getAttributes()));else if(i instanceof pc)t.push(i);else if(ie(i))for(const t of i)e(t);else{}}(e);for(let e=1;e<t.length;e++){const i=t[e],n=t[e-1];i instanceof wc&&n instanceof wc&&nh(i,n)&&(t.splice(e-1,2,new wc(n.data+i.data,n.getAttributes())),e--)}return t}function th(e,t){const i=e.getChild(t-1),n=e.getChild(t);if(i&&n&&i.is("$text")&&n.is("$text")&&nh(i,n)){const s=new wc(i.data+n.data,i.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,s)}}function ih(e){const t=e.textNode,i=e.parent;if(t){const n=e.offset-t.startOffset,s=t.index;i._removeChildren(s,1);const o=new wc(t.data.substr(0,n),t.getAttributes()),r=new wc(t.data.substr(n),t.getAttributes());i._insertChild(s,[o,r])}}function nh(e,t){const i=e.getAttributes(),n=t.getAttributes();for(const e of i){if(e[1]!==t.getAttribute(e[0]))return!1;n.next()}return n.next().done}class sh extends Zd{constructor(e,t,i,n){super(n),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}get affectedSelectable(){return[Pc._createFromPositionAndShift(this.sourcePosition,this.howMany),Pc._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new sh(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new sh(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,i=this.sourcePosition.offset,n=this.targetPosition.offset;if(i+this.howMany>e.maxOffset)throw new y("move-operation-nodes-do-not-exist",this);if(e===t&&i<n&&n<i+this.howMany)throw new y("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==te(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=i&&this.targetPosition.path[e]<i+this.howMany)throw new y("move-operation-node-into-itself",this)}}_execute(){Xd(Pc._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const i=Cc.fromJSON(e.sourcePosition,t),n=Cc.fromJSON(e.targetPosition,t);return new this(i,e.howMany,n,e.baseVersion)}}class oh extends Zd{constructor(e,t,i){super(i),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new bc(eh(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new bc([...this.nodes].map((e=>e._clone(!0)))),t=new oh(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Cc(e,[0]);return new sh(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new y("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new bc([...e].map((e=>e._clone(!0)))),Qd(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(_c.fromJSON(t)):i.push(wc.fromJSON(t));const n=new oh(Cc.fromJSON(e.position,t),i,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class rh extends Zd{constructor(e,t,i,n,s){super(s),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=i,this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Cc(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Pc(this.splitPosition,e)}get affectedSelectable(){const e=[Pc._createFromPositionAndShift(this.splitPosition,0),Pc._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Pc._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new rh(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Cc(e,[0]);return new ah(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new y("split-operation-position-invalid",this);if(!e.parent)throw new y("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new y("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new y("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)Xd(Pc._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();Qd(this.insertionPosition,t)}Xd(new Pc(Cc._createAt(e,this.splitPosition.offset),Cc._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new Cc(e.root,t,"toPrevious")}static fromJSON(e,t){const i=Cc.fromJSON(e.splitPosition,t),n=Cc.fromJSON(e.insertionPosition,t),s=e.graveyardPosition?Cc.fromJSON(e.graveyardPosition,t):null;return new this(i,e.howMany,n,s,e.baseVersion)}}class ah extends Zd{constructor(e,t,i,n,s){super(s),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new Cc(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Pc(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[Pc._createOn(e),Pc._createFromPositionAndShift(this.targetPosition,0),Pc._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new ah(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),i=new Cc(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new rh(e,this.howMany,i,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new y("merge-operation-source-position-invalid",this);if(!t.parent)throw new y("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new y("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;Xd(Pc._createIn(e),this.targetPosition),Xd(Pc._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const i=Cc.fromJSON(e.sourcePosition,t),n=Cc.fromJSON(e.targetPosition,t),s=Cc.fromJSON(e.graveyardPosition,t);return new this(i,e.howMany,n,s,e.baseVersion)}}class lh extends Zd{constructor(e,t,i,n,s,o){super(o),this.name=e,this.oldRange=t?t.clone():null,this.newRange=i?i.clone():null,this.affectsData=s,this._markers=n}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new lh(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new lh(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new lh(e.name,e.oldRange?Pc.fromJSON(e.oldRange,t):null,e.newRange?Pc.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}const ch=function(e,t){return tc(e,t)};class dh extends Zd{constructor(e,t,i,n,s){super(s),this.range=e.clone(),this.key=t,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new dh(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new dh(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new y("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!ch(e.getAttribute(this.key),this.oldValue))throw new y("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new y("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){ch(this.oldValue,this.newValue)||function(e,t,i){ih(e.start),ih(e.end);for(const n of e.getItems({shallow:!0})){const e=n.is("$textProxy")?n.textNode:n;null!==i?e._setAttribute(t,i):e._removeAttribute(t),th(e.parent,e.index)}th(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new dh(Pc.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class hh extends Zd{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new hh(this.baseVersion)}getReversed(){return new hh(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class uh extends Zd{constructor(e,t,i,n){super(n),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=i}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new uh(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new uh(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof _c))throw new y("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new y("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new uh(Cc.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class mh extends Zd{constructor(e,t,i,n,s){super(s),this.root=e,this.key=t,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new mh(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new mh(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new y("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new y("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new y("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new y("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new mh(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class gh extends Zd{constructor(e,t,i,n,s){if(super(s),this.rootName=e,this.elementName=t,this.isAdd=i,this._document=n,!this._document.getRoot(this.rootName)){this._document.createRoot(this.elementName,this.rootName)._isAttached=!1}}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new gh(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new gh(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new gh(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}const fh={};fh[dh.className]=dh,fh[oh.className]=oh,fh[lh.className]=lh,fh[sh.className]=sh,fh[hh.className]=hh,fh[Zd.className]=Zd,fh[uh.className]=uh,fh[mh.className]=mh,fh[gh.className]=gh,fh[rh.className]=rh,fh[ah.className]=ah;class ph{static fromJSON(e,t){return fh[e.__className].fromJSON(e,t)}}const bh=new Map;function wh(e,t,i){let n=bh.get(e);n||(n=new Map,bh.set(e,n)),n.set(t,i)}function vh(e){return[e]}function _h(e,t,i={}){const n=function(e,t){const i=bh.get(e);return i&&i.has(t)?i.get(t):vh}(e.constructor,t.constructor);try{return n(e=e.clone(),t,i)}catch(e){throw e}}function yh(e,t,i){e=e.slice(),t=t.slice();const n=new kh(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(e),n.setOriginalOperations(t);const s=n.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:s};const o=new WeakMap;for(const t of e)o.set(t,0);const r={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a<e.length;){const i=e[a],s=o.get(i);if(s==t.length){a++;continue}const r=t[s],l=_h(i,r,n.getContext(i,r,!0)),c=_h(r,i,n.getContext(r,i,!1));n.updateRelation(i,r),n.setOriginalOperations(l,i),n.setOriginalOperations(c,r);for(const e of l)o.set(e,s+c.length);e.splice(a,1,...l),t.splice(s,1,...c)}if(i.padWithNoOps){const i=e.length-r.originalOperationsACount,n=t.length-r.originalOperationsBCount;Ah(e,n-i),Ah(t,i-n)}return Ch(e,r.nextBaseVersionB),Ch(t,r.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:s}}class kh{constructor(e,t,i=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!i,this._relations=new Map}setOriginalOperations(e,t=null){const i=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,i||t)}updateRelation(e,t){if(e instanceof sh)t instanceof ah?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof sh&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof rh){if(t instanceof ah)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof sh)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const i=Pc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const n=i.end.offset-e.splitPosition.offset,s=e.splitPosition.offset-i.start.offset;this._setRelation(e,t,{howMany:n,offset:s})}}}else if(e instanceof ah)t instanceof ah?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof rh&&e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource");else if(e instanceof lh){const i=e.newRange;if(!i)return;if(t instanceof sh){const n=Pc._createFromPositionAndShift(t.sourcePosition,t.howMany),s=n.containsPosition(i.start)||n.start.isEqual(i.start),o=n.containsPosition(i.end)||n.end.isEqual(i.end);!s&&!o||n.containsRange(i)||this._setRelation(e,t,{side:s?"left":"right",path:s?i.start.path.slice():i.end.path.slice()})}else if(t instanceof ah){const n=i.start.isEqual(t.targetPosition),s=i.start.isEqual(t.deletionPosition),o=i.end.isEqual(t.deletionPosition),r=i.end.isEqual(t.sourcePosition);(n||s||o||r)&&this._setRelation(e,t,{wasInLeftElement:n,wasStartBeforeMergedElement:s,wasEndBeforeMergedElement:o,wasInRightElement:r})}}}getContext(e,t,i){return{aIsStrong:i,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const i=this.originalOperations.get(t),n=this._history.getUndoneOperation(i);if(!n)return null;const s=this.originalOperations.get(e),o=this._relations.get(s);return o&&o.get(n)||null}_setRelation(e,t,i){const n=this.originalOperations.get(e),s=this.originalOperations.get(t);let o=this._relations.get(n);o||(o=new Map,this._relations.set(n,o)),o.set(s,i)}}function Ch(e,t){for(const i of e)i.baseVersion=t++}function Ah(e,t){for(let i=0;i<t;i++)e.push(new hh(0))}function xh(e,t,i){const n=e.nodes.getNode(0).getAttribute(t);if(n==i)return null;const s=new Pc(e.position,e.position.getShiftedBy(e.howMany));return new dh(s,t,n,i,0)}function Th(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function Eh(e,t){const i=[];for(let n=0;n<e.length;n++){const s=e[n],o=new sh(s.start,s.end.offset-s.start.offset,t,0);i.push(o);for(let t=n+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)[0];t=t._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)}return i}wh(dh,dh,((e,t,i)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map((t=>new dh(t,e.key,e.oldValue,e.newValue,0))),s=e.range.getIntersection(t.range);return s&&i.aIsStrong&&n.push(new dh(s,t.key,t.newValue,e.newValue,0)),0==n.length?[new hh(0)]:n}return[e]})),wh(dh,oh,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new dh(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const n=xh(t,e.key,e.oldValue);n&&i.unshift(n)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),wh(dh,ah,((e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(Pc._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||i.push(n),i.map((t=>new dh(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),wh(dh,sh,((e,t)=>{const i=function(e,t){const i=Pc._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,s=[];i.containsRange(e,!0)?n=e:e.start.hasSameParentAs(i.start)?(s=e.getDifference(i),n=e.getIntersection(i)):s=[e];const o=[];for(let e of s){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),n=e.start.hasSameParentAs(i),s=e._getTransformedByInsertion(i,t.howMany,n);o.push(...s)}n&&o.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return o}(e.range,t);return i.map((t=>new dh(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),wh(dh,rh,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new Pc(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),wh(oh,dh,((e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=xh(e,t.key,t.newValue);n&&i.push(n)}return i})),wh(oh,oh,((e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),wh(oh,sh,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),wh(oh,rh,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),wh(oh,ah,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),wh(lh,oh,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),wh(lh,lh,((e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new hh(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),wh(lh,ah,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),wh(lh,sh,((e,t,i)=>{if(e.oldRange&&(e.oldRange=Pc._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(i.abRelation){const n=Pc._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=n.end,e.newRange.start.path=i.abRelation.path,[e];if("right"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=i.abRelation.path,[e]}e.newRange=Pc._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),wh(lh,rh,((e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=Cc._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement&&(e.newRange.start=Cc._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=Cc._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=Cc._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),wh(ah,oh,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),wh(ah,ah,((e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new Cc(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new hh(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,s="$graveyard"==t.targetPosition.root.rootName;if(s&&!n||!(n&&!s)&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new sh(i,e.howMany,n,0)]}return[new hh(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),wh(ah,sh,((e,t,i)=>{const n=Pc._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&!i.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new hh(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),wh(ah,rh,((e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,s=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||s||"mergeTargetNotMoved"==i.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),wh(sh,oh,((e,t)=>{const i=Pc._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),wh(sh,sh,((e,t,i)=>{const n=Pc._createFromPositionAndShift(e.sourcePosition,e.howMany),s=Pc._createFromPositionAndShift(t.sourcePosition,t.howMany);let o,r=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),o=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Th(e,t)&&Th(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(s,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Eh([n],o);if(s.containsPosition(e.targetPosition)&&s.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Eh([n],o);const l=te(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Eh([n],o);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(r=!1):r=!0;const c=[],d=n.getDifference(s);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==te(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);c.push(...n)}const h=n.getIntersection(s);return null!==h&&r&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(h):1==c.length?s.start.isBefore(n.start)||s.start.isEqual(n.start)?c.unshift(h):c.push(h):c.splice(1,0,h)),0===c.length?[new hh(e.baseVersion)]:Eh(c,o)})),wh(sh,rh,((e,t,i)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const s=Pc._createFromPositionAndShift(e.sourcePosition,e.howMany);if(s.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(s.start.hasSameParentAs(t.splitPosition)&&s.containsPosition(t.splitPosition)){let e=new Pc(t.splitPosition,s.end);e=e._getTransformedBySplitOperation(t);return Eh([new Pc(s.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(n=e.targetPosition);const o=[s._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=s.start.isEqual(t.graveyardPosition)||s.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!i.aWasUndone&&o.push(Pc._createFromPositionAndShift(t.insertionPosition,1))}return Eh(o,n)})),wh(sh,ah,((e,t,i)=>{const n=Pc._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new hh(0)]}else if(!i.aWasUndone){const i=[];let n=t.graveyardPosition.clone(),s=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(i.push(new sh(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),s=s._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const o=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new sh(n,1,o,0),a=r.getMovedRangeStart().path.slice();a.push(0);const l=new Cc(r.targetPosition.root,a);s=s._getTransformedByMove(n,o,1);const c=new sh(s,t.howMany,l,0);return i.push(r),i.push(c),i}const s=Pc._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=s.start,e.howMany=s.end.offset-s.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),wh(uh,oh,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),wh(uh,ah,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),wh(uh,sh,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),wh(uh,uh,((e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new hh(0)];e.oldName=t.newName}return[e]})),wh(uh,rh,((e,t)=>{if("same"==te(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new uh(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),wh(mh,mh,((e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new hh(0)];e.oldValue=t.newValue}return[e]})),wh(gh,gh,((e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new hh(0)]:[e])),wh(rh,oh,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e]))),wh(rh,ah,((e,t,i)=>{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const n=new Cc(t.graveyardPosition.root,i),s=rh.getInsertionPosition(new Cc(t.graveyardPosition.root,i)),o=new rh(n,0,s,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=rh.getInsertionPosition(e.splitPosition),e.graveyardPosition=o.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[o,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=rh.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),wh(rh,sh,((e,t,i)=>{const n=Pc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const s=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&s){const i=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),s=n.path.slice();s.push(0);const o=new Cc(n.root,s);return[new sh(i,e.howMany,o,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const s=e.splitPosition.isEqual(t.targetPosition);if(s&&("insertAtSource"==i.baRelation||"splitBefore"==i.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=rh.getInsertionPosition(e.splitPosition),[e];if(s&&i.abRelation&&i.abRelation.howMany){const{howMany:t,offset:n}=i.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(n),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=rh.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=rh.getInsertionPosition(e.splitPosition),[e]})),wh(rh,rh,((e,t,i)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new hh(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new hh(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,s="$graveyard"==t.splitPosition.root.rootName;if(s&&!n||!(n&&!s)&&i.aIsStrong){const i=[];return t.howMany&&i.push(new sh(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new sh(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new hh(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const n=new Cc(t.insertionPosition.root,i);return[e,new sh(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=rh.getInsertionPosition(e.splitPosition),[e]}));class Sh extends(V(Cc)){constructor(e,t,i="toNone"){if(super(e,t,i),!this.root.is("rootElement"))throw new y("model-liveposition-root-not-rootelement",e);Ph.call(this)}detach(){this.stopListening()}toPosition(){return new Cc(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function Ph(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&Ih.call(this,i)}),{priority:"low"})}function Ih(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Sh.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Vh{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},k("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:i=!0,isUndo:n=!1,isTyping:s=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=i,this.isUndo=n,this.isTyping=s}get type(){return k("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Rh{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),i=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),i||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Pc._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),i.range&&i.range.root.is("rootElement")&&!i.range.root._isLoaded&&(i.range=null);let n=this._changedMarkers.get(e);n?n.newMarkerData=i:(n={newMarkerData:i,oldMarkerData:t},this._changedMarkers.set(e,n)),null==n.oldMarkerData.range&&null==i.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldMarkerData.range&&e.push({name:t,range:i.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newMarkerData.range&&e.push({name:t,range:i.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const i=e.range&&!t.range,n=!e.range&&t.range,s=e.range&&t.range&&!e.range.isEqual(t.range);if(i||n||s)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1)),n=this._elementSnapshots.get(e),s=Oh(e.getChildren()),o=Bh(n.length,i);let r=0,a=0;for(const i of o)if("i"===i)t.push(this._getInsertDiff(e,r,s[r])),r++;else if("r"===i)t.push(this._getRemoveDiff(e,r,n[a])),a++;else if("a"===i){const i=s[r].attributes,o=n[a].attributes;let l;if("$text"==s[r].name)l=new Pc(Cc._createAt(e,r),Cc._createAt(e,r+1));else{const t=e.offsetToIndex(r);l=new Pc(Cc._createAt(e,r),Cc._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(l,o,i)),r++,a++}else r++,a++}t.sort(((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1));for(let e=1,i=0;e<t.length;e++){const n=t[i],s=t[e],o="remove"==n.type&&"remove"==s.type&&"$text"==n.name&&"$text"==s.name&&n.position.isEqual(s.position),r="insert"==n.type&&"insert"==s.type&&"$text"==n.name&&"$text"==s.name&&n.position.parent==s.position.parent&&n.position.offset+n.length==s.position.offset,a="attribute"==n.type&&"attribute"==s.type&&n.position.parent==s.position.parent&&n.range.isFlat&&s.range.isFlat&&n.position.offset+n.length==s.position.offset&&n.attributeKey==s.attributeKey&&n.attributeOldValue==s.attributeOldValue&&n.attributeNewValue==s.attributeNewValue;o||r||a?(n.length++,a&&(n.range.end=n.range.end.getShiftedBy(1)),t[e]=null):i=e}t=t.filter((e=>e));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(Mh),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const i=this._changedRoots.get(e);void 0!==i.state?(delete i.state,void 0===i.attributes&&this._changedRoots.delete(e)):i.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,i,n){const s=this._changedRoots.get(e)||{name:e},o=s.attributes||{};if(o[t]){const e=o[t];n===e.oldValue?delete o[t]:e.newValue=n}else o[t]={oldValue:i,newValue:n};0===Object.entries(o).length?(delete s.attributes,void 0===s.state&&this._changedRoots.delete(e)):(s.attributes=o,this._changedRoots.set(e,s))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=Pc._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_markInsert(e,t,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"insert",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,n)}_markRemove(e,t,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"remove",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,n),this._removeAllNestedChanges(e,t,i)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const i=this._getChangesForElement(e);this._handleChange(t,i),i.push(t);for(let e=0;e<i.length;e++)i[e].howMany<1&&(i.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,Oh(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const i of t){const n=e.offset+e.howMany,s=i.offset+i.howMany;if("insert"==e.type&&("insert"==i.type&&(e.offset<=i.offset?i.offset+=e.howMany:e.offset<s&&(i.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==i.type&&e.offset<i.offset&&(i.offset+=e.howMany),"attribute"==i.type))if(e.offset<=i.offset)i.offset+=e.howMany;else if(e.offset<s){const s=i.howMany;i.howMany=e.offset-i.offset,t.unshift({type:"attribute",offset:n,howMany:s-i.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==i.type)if(n<=i.offset)i.offset-=e.howMany;else if(n<=s)if(e.offset<i.offset){const t=n-i.offset;i.offset=e.offset,i.howMany-=t,e.nodesToHandle-=t}else i.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=i.offset)e.nodesToHandle-=i.howMany,i.howMany=0;else if(e.offset<s){const t=s-e.offset;i.howMany-=t,e.nodesToHandle-=t}if("remove"==i.type&&(n<=i.offset?i.offset-=e.howMany:e.offset<i.offset&&(e.nodesToHandle+=i.howMany,i.howMany=0)),"attribute"==i.type)if(n<=i.offset)i.offset-=e.howMany;else if(e.offset<i.offset){const t=n-i.offset;i.offset=e.offset,i.howMany-=t}else if(e.offset<s)if(n<=s){const n=i.howMany;i.howMany=e.offset-i.offset;const s=n-i.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:s,count:this._changeCount++})}else i.howMany-=s-e.offset}if("attribute"==e.type){if("insert"==i.type)if(e.offset<i.offset&&n>i.offset){if(n>s){const e={type:"attribute",offset:s,howMany:n-s,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offset<s&&(n>s?(e.nodesToHandle=n-s,e.offset=s):e.nodesToHandle=0);if("remove"==i.type&&e.offset<i.offset&&n>i.offset){const s={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(s,t),t.push(s),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&n<=s?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&n>=s&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i){return{type:"insert",position:Cc._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,i){return{type:"remove",position:Cc._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,i){const n=[];i=new Map(i);for(const[s,o]of t){const t=i.has(s)?i.get(s):null;t!==o&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:o,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(s)}for(const[t,s]of i)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:s,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),n=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&n>=e.offset&&n<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,i){const n=new Pc(Cc._createAt(e,t),Cc._createAt(e,t+i));for(const e of n.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function Oh(e){const t=[];for(const i of e)if(i.is("$text"))for(let e=0;e<i.data.length;e++)t.push({name:"$text",attributes:new Map(i.getAttributes())});else t.push({name:i.name,attributes:new Map(i.getAttributes())});return t}function Bh(e,t){const i=[];let n=0,s=0;for(const e of t){if(e.offset>n){for(let t=0;t<e.offset-n;t++)i.push("e");s+=e.offset-n}if("insert"==e.type){for(let t=0;t<e.howMany;t++)i.push("i");n=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)i.push("r");n=e.offset,s+=e.howMany}else i.push(..."a".repeat(e.howMany).split("")),n=e.offset+e.howMany,s+=e.howMany}if(s<e)for(let t=0;t<e-s-n;t++)i.push("e");return i}function Mh(e){const t="position"in e&&"$graveyard"==e.position.root.rootName,i="range"in e&&"$graveyard"==e.range.root.rootName;return!t&&!i}class Nh{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new y("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const i=this._operations[0];void 0===e&&(e=i.baseVersion);let n=t-1;for(const[t,i]of this._gaps)e>t&&e<i&&(e=i),n>t&&n<i&&(n=t-1);if(n<i.baseVersion||e>this.lastOperation.baseVersion)return[];let s=this._baseVersionToOperationIndex.get(e);void 0===s&&(s=0);let o=this._baseVersionToOperationIndex.get(n);return void 0===o&&(o=this._operations.length-1),this._operations.slice(s,o+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Fh extends _c{constructor(e,t,i="main"){super(t),this._isAttached=!0,this._isLoaded=!0,this._document=e,this.rootName=i}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Fh.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const Dh="$graveyard";class Lh extends(V()){constructor(e){super(),this.model=e,this.history=new Nh,this.selection=new Gc(this),this.roots=new Ts({idProperty:"rootName"}),this.differ=new Rh(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Dh),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.history.addOperation(i)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,i,n,s)=>{const o={...t.getData(),range:n};this.differ.bufferMarkerChange(t.name,s,o),null===i&&t.on("change",((e,i)=>{const n=t.getData();this.differ.bufferMarkerChange(t.name,{...n,range:i},n)}))})),this.registerPostFixer((e=>{let t=!1;for(const i of this.roots)i.isAttached()||i.isEmpty||(e.remove(e.createRangeIn(i)),t=!0);for(const i of this.model.markers)i.getRange().root.isAttached()||(e.removeMarker(i),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Dh)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new y("model-document-createroot-name-exists",this,{name:t});const i=new Fh(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map((e=>e.rootName))}getRoots(e=!1){return this.roots.filter((t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=mr(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,n=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return zh(e.start)&&zh(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function zh(e){const t=e.textNode;if(t){const i=t.data,n=e.offset-t.startOffset;return!Rs(i,n)&&!Os(i,n)}return!0}class Hh extends(V()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof $h?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,i=!1,n=!1){const s=e instanceof $h?e.name:e;if(s.includes(","))throw new y("markercollection-incorrect-marker-name",this);const o=this._markers.get(s);if(o){const e=o.getData(),r=o.getRange();let a=!1;return r.isEqual(t)||(o._attachLiveRange(Wc.fromRange(t)),a=!0),i!=o.managedUsingOperations&&(o._managedUsingOperations=i,a=!0),"boolean"==typeof n&&n!=o.affectsData&&(o._affectsData=n,a=!0),a&&this.fire(`update:${s}`,o,r,t,e),o}const r=Wc.fromRange(t),a=new $h(s,r,i,n);return this._markers.set(s,a),this.fire(`update:${s}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof $h?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire(`update:${t}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof $h?e.name:e,i=this._markers.get(t);if(!i)throw new y("markercollection-refresh-marker-not-exists",this);const n=i.getRange();this.fire(`update:${t}`,i,n,n,i.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class $h extends(V(fc)){constructor(e,t,i,n){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}$h.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Wh extends Zd{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new y("detach-operation-on-document-node",this)}_execute(){Yd(Pc._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class jh extends fc{constructor(e){super(),this.markers=new Map,this._children=new bc,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(_c.fromJSON(i)):t.push(wc.fromJSON(i));return new jh(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new wc(e)];ie(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new wc(e):e instanceof vc?new wc(e.data,e.getAttributes()):e))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}}jh.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Uh{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new wc(e,t)}createElement(e,t){return new _c(e,t)}createDocumentFragment(){return new jh}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,i=0){if(this._assertWriterUsedCorrectly(),e instanceof wc&&""==e.data)return;const n=Cc._createAt(t,i);if(e.parent){if(Zh(e.root,n.root))return void this.move(Pc._createOn(e),n);if(e.root.document)throw new y("model-writer-insert-forbidden-move",this);this.remove(e)}const s=n.root.document?n.root.document.version:null,o=new oh(n,e,s);if(e instanceof wc&&(o.shouldReceiveAttributes=!0),this.batch.addOperation(o),this.model.applyOperation(o),e instanceof jh)for(const[t,i]of e.markers){const e=Cc._createAt(i.root,0),s={range:new Pc(i.start._getCombined(e,n),i.end._getCombined(e,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,s):this.addMarker(t,s)}}insertText(e,t,i,n){t instanceof jh||t instanceof _c||t instanceof Cc?this.insert(this.createText(e),t,i):this.insert(this.createText(e,t),i,n)}insertElement(e,t,i,n){t instanceof jh||t instanceof _c||t instanceof Cc?this.insert(this.createElement(e),t,i):this.insert(this.createElement(e,t),i,n)}append(e,t){this.insert(e,t,"end")}appendText(e,t,i){t instanceof jh||t instanceof _c?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),i,"end")}appendElement(e,t,i){t instanceof jh||t instanceof _c?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),i,"end")}setAttribute(e,t,i){if(this._assertWriterUsedCorrectly(),i instanceof Pc){const n=i.getMinimalFlatRanges();for(const i of n)qh(this,e,t,i)}else Gh(this,e,t,i)}setAttributes(e,t){for(const[i,n]of Is(e))this.setAttribute(i,n,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof Pc){const i=t.getMinimalFlatRanges();for(const t of i)qh(this,e,null,t)}else Gh(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof Pc)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof Pc))throw new y("writer-move-invalid-range",this);if(!e.isFlat)throw new y("writer-move-range-not-flat",this);const n=Cc._createAt(t,i);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Zh(e.root,n.root))throw new y("writer-move-different-document",this);const s=e.root.document?e.root.document.version:null,o=new sh(e.start,e.end.offset-e.start.offset,n,s);this.batch.addOperation(o),this.model.applyOperation(o)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof Pc?e:Pc._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),Jh(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof _c))throw new y("writer-merge-no-element-before",this);if(!(i instanceof _c))throw new y("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(Pc._createIn(i),Cc._createAt(t,"end")),this.remove(i)}_merge(e){const t=Cc._createAt(e.nodeBefore,"end"),i=Cc._createAt(e.nodeAfter,0),n=e.root.document.graveyard,s=new Cc(n,[0]),o=e.root.document.version,r=new ah(i,e.nodeAfter.maxOffset,t,s,o);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof _c))throw new y("writer-rename-not-element-instance",this);const i=e.root.document?e.root.document.version:null,n=new uh(Cc._createBefore(e),e.name,t,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let i,n,s=e.parent;if(!s.parent)throw new y("writer-split-element-no-parent",this);if(t||(t=s.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new y("writer-split-invalid-limit-element",this);do{const t=s.root.document?s.root.document.version:null,o=s.maxOffset-e.offset,r=rh.getInsertionPosition(e),a=new rh(e,o,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),i||n||(i=s,n=e.parent.nextSibling),s=(e=this.createPositionAfter(e.parent)).parent}while(s!==t);return{position:e,range:new Pc(Cc._createAt(i,"end"),Cc._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new y("writer-wrap-range-not-flat",this);const i=t instanceof _c?t:new _c(t);if(i.childCount>0)throw new y("writer-wrap-element-not-empty",this);if(null!==i.parent)throw new y("writer-wrap-element-attached",this);this.insert(i,e.start);const n=new Pc(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,Cc._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new y("writer-unwrap-element-no-parent",this);this.move(Pc._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new y("writer-addmarker-no-usingoperation",this);const i=t.usingOperation,n=t.range,s=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new y("writer-addmarker-marker-exists",this);if(!n)throw new y("writer-addmarker-no-range",this);return i?(Kh(this,e,null,n,s),this.model.markers.get(e)):this.model.markers._set(e,n,i,s)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,n=this.model.markers.get(i);if(!n)throw new y("writer-updatemarker-marker-not-exists",this);if(!t)return k("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),void this.model.markers._refresh(n);const s="boolean"==typeof t.usingOperation,o="boolean"==typeof t.affectsData,r=o?t.affectsData:n.affectsData;if(!s&&!t.range&&!o)throw new y("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=t.range?t.range:a;s&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?Kh(this,i,null,l,r):(Kh(this,i,a,null,r),this.model.markers._set(i,l,void 0,r)):n.managedUsingOperations?Kh(this,i,a,l,r):this.model.markers._set(i,l,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new y("writer-removemarker-no-marker",this);const i=this.model.markers.get(t);if(!i.managedUsingOperations)return void this.model.markers._remove(t);Kh(this,t,i.getRange(),null,i.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const i=this.model.document.getRoot(e);if(i&&i.isAttached())throw new y("writer-addroot-root-exists",this);const n=this.model.document,s=new gh(e,t,!0,n,n.version);return this.batch.addOperation(s),this.model.applyOperation(s),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new y("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const i=this.model.document,n=new gh(t.rootName,t.name,!1,i,i.version);this.batch.addOperation(n),this.model.applyOperation(n)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of Is(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=Gc._getStoreAttributeKey(e);this.setAttribute(n,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=Gc._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new y("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let s=!1;if("move"===e){const e=t;s=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const e=t,i=e.nodeBefore,o=e.nodeAfter,r=n.start.parent==i&&n.start.isAtEnd,a=n.end.parent==o&&0==n.end.offset,l=n.end.nodeAfter==o,c=n.start.nodeAfter==o;s=r||a||l||c}s&&this.updateMarker(i.name,{range:n})}}}function qh(e,t,i,n){const s=e.model,o=s.document;let r,a,l,c=n.start;for(const e of n.getWalker({shallow:!0}))l=e.item.getAttribute(t),r&&a!=l&&(a!=i&&d(),c=r),r=e.nextPosition,a=l;function d(){const n=new Pc(c,r),l=n.root.document?o.version:null,d=new dh(n,t,a,i,l);e.batch.addOperation(d),s.applyOperation(d)}r instanceof Cc&&r!=c&&a!=i&&d()}function Gh(e,t,i,n){const s=e.model,o=s.document,r=n.getAttribute(t);let a,l;if(r!=i){if(n.root===n){const e=n.document?o.version:null;l=new mh(n,t,r,i,e)}else{a=new Pc(Cc._createBefore(n),e.createPositionAfter(n));const s=a.root.document?o.version:null;l=new dh(a,t,r,i,s)}e.batch.addOperation(l),s.applyOperation(l)}}function Kh(e,t,i,n,s){const o=e.model,r=o.document,a=new lh(t,i,n,o.markers,!!s,r.version);e.batch.addOperation(a),o.applyOperation(a)}function Jh(e,t,i,n){let s;if(e.root.document){const i=n.document,o=new Cc(i.graveyard,[0]);s=new sh(e,t,o,i.version)}else s=new Wh(e,t);i.addOperation(s),n.applyOperation(s)}function Zh(e,t){return e===t||e instanceof Fh&&t instanceof Fh}function Qh(e,t,i={}){if(t.isCollapsed)return;const n=t.getFirstRange();if("$graveyard"==n.root.rootName)return;const s=e.schema;e.change((e=>{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(i,"paragraph")}(s,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),tu(e,e.createPositionAt(i,0),t)}(e,t);const o={};if(!i.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(o,s.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,i=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(n);if(i&&n.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"});const s=i.getLastPosition(),o=t.createRange(s,n);t.hasContent(o,{ignoreMarkers:!0})||(n=s)}}return[Sh.fromPosition(i,"toPrevious"),Sh.fromPosition(n,"toNext")]}(n);r.isTouching(a)||e.remove(e.createRange(r,a)),i.leaveUnmerged||(!function(e,t,i){const n=e.model;if(!eu(e.model.schema,t,i))return;const[s,o]=function(e,t){const i=e.getAncestors(),n=t.getAncestors();let s=0;for(;i[s]&&i[s]==n[s];)s++;return[i[s],n[s]]}(t,i);if(!s||!o)return;!n.hasContent(s,{ignoreMarkers:!0})&&n.hasContent(o,{ignoreMarkers:!0})?Xh(e,t,i,s.parent):Yh(e,t,i,s.parent)}(e,r,a),s.removeDisallowedAttributes(r.parent.getChildren(),e)),iu(e,t,r),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!i&&n}(s,r)&&tu(e,r,t,o),r.detach(),a.detach()}))}function Yh(e,t,i,n){const s=t.parent,o=i.parent;if(s!=n&&o!=n){for(t=e.createPositionAfter(s),(i=e.createPositionBefore(o)).isEqual(t)||e.insert(o,t),e.merge(t);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}eu(e.model.schema,t,i)&&Yh(e,t,i,n)}}function Xh(e,t,i,n){const s=t.parent,o=i.parent;if(s!=n&&o!=n){for(t=e.createPositionAfter(s),(i=e.createPositionBefore(o)).isEqual(t)||e.insert(s,i);t.parent.isEmpty;){const i=t.parent;t=e.createPositionBefore(i),e.remove(i)}i=e.createPositionBefore(o),function(e,t){const i=t.nodeBefore,n=t.nodeAfter;i.name!=n.name&&e.rename(i,n.name);e.clearAttributes(i),e.setAttributes(Object.fromEntries(n.getAttributes()),i),e.merge(t)}(e,i),eu(e.model.schema,t,i)&&Xh(e,t,i,n)}}function eu(e,t,i){const n=t.parent,s=i.parent;return n!=s&&(!e.isLimit(n)&&!e.isLimit(s)&&function(e,t,i){const n=new Pc(e,t);for(const e of n.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e))}function tu(e,t,i,n={}){const s=e.createElement("paragraph");e.model.schema.setAllowedAttributes(s,n,e),e.insert(s,t),iu(e,i,e.createPositionAt(s,0))}function iu(e,t,i){t instanceof Gc?e.setSelection(i):t.setTo(i)}function nu(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{i.push(e.start.parent),t.remove(e)})),i.forEach((e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}}))}class su{constructor(e,t,i){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),i=this.writer.createPositionAfter(e);if(i.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new y("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Pc._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Pc(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Sh.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new y("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Sh.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Sh.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof _c))return;if(!this._canMergeLeft(e))return;const t=Sh._createBefore(e);t.stickiness="toNext";const i=Sh.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Sh._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Sh._createAt(t.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof _c))return;if(!this._canMergeRight(e))return;const t=Sh._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new y("insertcontent-invalid-insertion-position",this);this.position=Cc._createAt(t.nodeBefore,"end");const i=Sh.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Sh._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Sh._createAt(t.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof _c&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof _c&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function ou(e,t,i="auto"){const n=e.getSelectedElement();if(n&&t.schema.isObject(n)&&!t.schema.isInline(n))return"before"==i||"after"==i?t.createRange(t.createPositionAt(n,i)):t.createRangeOn(n);const s=Es(e.getSelectedBlocks());if(!s)return t.createRange(e.focus);if(s.isEmpty)return t.createRange(t.createPositionAt(s,0));const o=t.createPositionAfter(s);return e.focus.isTouching(o)?t.createRange(o):t.createRange(t.createPositionBefore(s))}function ru(e,t,i,n={}){if(!e.schema.isObject(t))throw new y("insertobject-element-not-an-object",e,{object:t});const s=i||e.document.selection;let o=s;n.findOptimalPosition&&e.schema.isBlock(t)&&(o=e.createSelection(ou(s,e,n.findOptimalPosition)));const r=Es(s.getSelectedBlocks()),a={};return r&&Object.assign(a,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((i=>{o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});let s=t;const r=o.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(s=i.createElement("paragraph"),i.insert(t,s)),e.schema.setAllowedAttributes(s,a,i);const l=e.insertContent(s,o);return l.isCollapsed||n.setSelection&&function(e,t,i,n){const s=e.model;if("on"==i)return void e.setSelection(t,"on");if("after"!=i)throw new y("insertobject-invalid-place-parameter-value",s);let o=t.nextSibling;if(s.schema.isInline(t))return void e.setSelection(t,"after");const r=o&&s.schema.checkChild(o,"$text");!r&&s.schema.checkChild(t.parent,"paragraph")&&(o=e.createElement("paragraph"),s.schema.setAllowedAttributes(o,n,e),s.insertContent(o,e.createPositionAfter(t)));o&&e.setSelection(o,0)}(i,t,n.setSelection,a),l}))}const au=' ,.?!:;"-()';function lu(e,t){const{isForward:i,walker:n,unit:s,schema:o,treatEmojiAsSingleUnit:r}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let i=e.position.textNode;i||(i=t?e.position.nodeAfter:e.position.nodeBefore);for(;i&&i.is("$text");){const n=e.position.offset-i.startOffset;if(hu(i,n,t))i=t?e.position.nodeAfter:e.position.nodeBefore;else{if(du(i.data,n,t))break;e.next()}}return e.position}(n,i):function(e,t,i){const n=e.position.textNode;if(n){const s=n.data;let o=e.position.offset-n.startOffset;for(;Rs(s,o)||"character"==t&&Os(s,o)||i&&Ms(s,o);)e.next(),o=e.position.offset-n.startOffset}return e.position}(n,s,r);if(a==(i?"elementStart":"elementEnd")){if(o.isSelectable(l))return Cc._createAt(l,i?"after":"before");if(o.checkChild(c,"$text"))return c}else{if(o.isLimit(l))return void n.skip((()=>!0));if(o.checkChild(c,"$text"))return c}}function cu(e,t){const i=e.root,n=Cc._createAt(i,t?"end":0);return t?new Pc(e,n):new Pc(n,e)}function du(e,t,i){const n=t+(i?0:-1);return au.includes(e.charAt(n))}function hu(e,t,i){return t===(i?e.offsetSize:0)}class uu extends(G()){constructor(){super(),this.markers=new Hh,this.document=new Lh(this),this.schema=new Sd,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),_d(this),this.document.registerPostFixer(dd),this.on("insertContent",((e,[t,i])=>{e.return=function(e,t,i){return e.change((n=>{const s=i||e.document.selection;s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});const o=new su(e,n,s.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[i,n]of t.markers){const{start:t,end:s}=n,o=t.isEqual(s);e.push({position:t,name:i,isCollapsed:o},{position:s,name:i,isCollapsed:o})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:i,name:s,isCollapsed:o}of e){let e=null,a=null;const l=i.parent===t&&i.isAtStart,c=i.parent===t&&i.isAtEnd;l||c?o&&(a=l?"start":"end"):(e=n.createElement("$marker"),n.insert(e,i)),r.push({name:s,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];o.handleNodes(a);let l=o.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=l?Wc.fromRange(l):null,t={};for(let e=r.length-1;e>=0;e--){const{name:i,element:s,collapsed:a}=r[e],l=!t[i];if(l&&(t[i]=[]),s){const e=n.createPositionAt(s,"before");t[i].push(e),n.remove(s)}else{const e=o.getAffectedRange();if(!e){a&&t[i].push(o.position);continue}a?t[i].push(e[a]):t[i].push(l?e.start:e.end)}}for(const[e,[i,s]]of Object.entries(t))i&&s&&i.root===s.root&&n.addMarker(e,{usingOperation:!0,affectsData:!0,range:new Pc(i,s)});e&&(l=e.toRange(),e.detach())}l&&(s instanceof Gc?n.setSelection(l):s.setTo(l));const c=o.getAffectedRange()||e.createRange(s.anchor);return o.destroy(),c}))}(this,t,i)})),this.on("insertObject",((e,[t,i,n])=>{e.return=ru(this,t,i,n)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Vh,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){y.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Vh):e instanceof Vh||(e=new Vh(e)):e=new Vh,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){y.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i,...n){const s=mu(t,i);return this.fire("insertContent",[e,s,i,...n])}insertObject(e,t,i,n,...s){const o=mu(t,i);return this.fire("insertObject",[e,o,n,n,...s])}deleteContent(e,t){Qh(this,e,t)}modifySelection(e,t){!function(e,t,i={}){const n=e.schema,s="backward"!=i.direction,o=i.unit?i.unit:"character",r=!!i.treatEmojiAsSingleUnit,a=t.focus,l=new yc({boundaries:cu(a,s),singleCharacters:!0,direction:s?"forward":"backward"}),c={walker:l,schema:n,isForward:s,unit:o,treatEmojiAsSingleUnit:r};let d;for(;d=l.next();){if(d.done)return;const i=lu(c,d.value);if(i)return void(t instanceof Gc?e.change((e=>{e.setSelectionFocus(i)})):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const i=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return i;const s=n.start.root,o=n.start.getCommonPath(n.end),r=s.getNodeByPath(o);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(r,n.start.path[o.length]),e.createPositionAt(r,n.end.path[o.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(i,0),l)[0],s=e.createRange(e.createPositionAt(i,0),t.start);nu(e.createRange(t.end,e.createPositionAt(i,"end")),e),nu(s,e)}return i}))}(this,e)}hasContent(e,t={}){const i=e instanceof Pc?e:Pc._createIn(e);if(i.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:s=!1}=t;if(!s)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=mu(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,i){return new Cc(e,t,i)}createPositionAt(e,t){return Cc._createAt(e,t)}createPositionAfter(e){return Cc._createAfter(e)}createPositionBefore(e){return Cc._createBefore(e)}createRange(e,t){return new Pc(e,t)}createRangeIn(e){return Pc._createIn(e)}createRangeOn(e){return Pc._createOn(e)}createSelection(...e){return new Nc(...e)}createBatch(e){return new Vh(e)}createOperationFromJSON(e){return ph.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Uh(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function mu(e,t){if(e)return e instanceof Nc||e instanceof Gc?e:e instanceof pc?t||0===t?new Nc(e,t):e.is("rootElement")?new Nc(e,"in"):new Nc(e,"on"):new Nc(e)}class gu extends Ol{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class fu extends Ol{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class pu{constructor(e){this.document=e}createDocumentFragment(e){return new Ga(this.document,e)}createElement(e,t,i){return new pa(this.document,e,t,i)}createText(e){return new fr(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const n=i.getChildIndex(e);return this.removeChildren(n,1,i),this.insertChild(n,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new pa(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){Ee(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return Aa._createAt(e,t)}createPositionAfter(e){return Aa._createAfter(e)}createPositionBefore(e){return Aa._createBefore(e)}createRange(e,t){return new xa(e,t)}createRangeOn(e){return xa._createOn(e)}createRangeIn(e){return xa._createIn(e)}createSelection(...e){return new Ea(...e)}}const bu=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,wu=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,vu=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,_u=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,yu=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,ku=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,Cu=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Au(e){return e.startsWith("#")?bu.test(e):e.startsWith("rgb")?wu.test(e)||vu.test(e):e.startsWith("hsl")?_u.test(e)||yu.test(e):Cu.has(e.toLowerCase())}const xu=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Tu(e){return xu.includes(e)}const Eu=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Su(e){return Eu.test(e)}const Pu=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Iu(e){return Pu.test(e)}const Vu=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Ru(e){return Vu.includes(e)}const Ou=["center","top","bottom","left","right"];function Bu(e){return Ou.includes(e)}const Mu=["fixed","scroll","local"];function Nu(e){return Mu.includes(e)}const Fu=/^url\(/;function Du(e){return Fu.test(e)}function Lu(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Wu(e),i=t[0],n=t[2]||i,s=t[1]||i;return{top:i,bottom:n,right:s,left:t[3]||s}}function zu(e){return t=>{const{top:i,right:n,bottom:s,left:o}=t,r=[];return[i,n,o,s].every((e=>!!e))?r.push([e,Hu(t)]):(i&&r.push([e+"-top",i]),n&&r.push([e+"-right",n]),s&&r.push([e+"-bottom",s]),o&&r.push([e+"-left",o])),r}}function Hu({top:e,right:t,bottom:i,left:n}){const s=[];return n!==t?s.push(e,t,i,n):i!==e?s.push(e,t,i):t!==e?s.push(e,t):s.push(e),s.join(" ")}function $u(e){return t=>({path:e,value:Lu(t)})}function Wu(e){const t=e.matchAll(ku);return Array.from(t).map((e=>e[0]))}function ju(e){e.setNormalizer("background",(e=>{const t={},i=Wu(e);for(const e of i)Ru(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Bu(e)?(t.position=t.position||[],t.position.push(e)):Nu(e)?t.attachment=e:Au(e)?t.color=e:Du(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Uu(e){e.setNormalizer("border",(e=>{const{color:t,style:i,width:n}=Yu(e);return{path:"border",value:{color:Lu(t),style:Lu(i),width:Lu(n)}}})),e.setNormalizer("border-top",qu("top")),e.setNormalizer("border-right",qu("right")),e.setNormalizer("border-bottom",qu("bottom")),e.setNormalizer("border-left",qu("left")),e.setNormalizer("border-color",Gu("color")),e.setNormalizer("border-width",Gu("width")),e.setNormalizer("border-style",Gu("style")),e.setNormalizer("border-top-color",Ju("color","top")),e.setNormalizer("border-top-style",Ju("style","top")),e.setNormalizer("border-top-width",Ju("width","top")),e.setNormalizer("border-right-color",Ju("color","right")),e.setNormalizer("border-right-style",Ju("style","right")),e.setNormalizer("border-right-width",Ju("width","right")),e.setNormalizer("border-bottom-color",Ju("color","bottom")),e.setNormalizer("border-bottom-style",Ju("style","bottom")),e.setNormalizer("border-bottom-width",Ju("width","bottom")),e.setNormalizer("border-left-color",Ju("color","left")),e.setNormalizer("border-left-style",Ju("style","left")),e.setNormalizer("border-left-width",Ju("width","left")),e.setExtractor("border-top",Zu("top")),e.setExtractor("border-right",Zu("right")),e.setExtractor("border-bottom",Zu("bottom")),e.setExtractor("border-left",Zu("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",zu("border-color")),e.setReducer("border-style",zu("border-style")),e.setReducer("border-width",zu("border-width")),e.setReducer("border-top",Xu("top")),e.setReducer("border-right",Xu("right")),e.setReducer("border-bottom",Xu("bottom")),e.setReducer("border-left",Xu("left")),e.setReducer("border",function(){return t=>{const i=Qu(t,"top"),n=Qu(t,"right"),s=Qu(t,"bottom"),o=Qu(t,"left"),r=[i,n,s,o],a={width:e(r,"width"),style:e(r,"style"),color:e(r,"color")},l=em(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,i])=>(i&&(e.push([`border-${t}`,i]),r.forEach((e=>delete e[t]))),e)),[]);return[...c,...em(i,"top"),...em(n,"right"),...em(s,"bottom"),...em(o,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function qu(e){return t=>{const{color:i,style:n,width:s}=Yu(t),o={};return void 0!==i&&(o.color={[e]:i}),void 0!==n&&(o.style={[e]:n}),void 0!==s&&(o.width={[e]:s}),{path:"border",value:o}}}function Gu(e){return t=>({path:"border",value:Ku(t,e)})}function Ku(e,t){return{[t]:Lu(e)}}function Ju(e,t){return i=>({path:"border",value:{[e]:{[t]:i}}})}function Zu(e){return(t,i)=>{if(i.border)return Qu(i.border,e)}}function Qu(e,t){const i={};return e.width&&e.width[t]&&(i.width=e.width[t]),e.style&&e.style[t]&&(i.style=e.style[t]),e.color&&e.color[t]&&(i.color=e.color[t]),i}function Yu(e){const t={},i=Wu(e);for(const e of i)Su(e)||/thin|medium|thick/.test(e)?t.width=e:Tu(e)?t.style=e:t.color=e;return t}function Xu(e){return t=>em(t,e)}function em(e,t){const i=[];if(e&&e.width&&i.push("width"),e&&e.style&&i.push("style"),e&&e.color&&i.push("color"),3==i.length){const n=i.map((t=>e[t])).join(" ");return["all"==t?["border",n]:[`border-${t}`,n]]}return"all"==t?[]:i.map((i=>[`border-${t}-${i}`,e[i]]))}function tm(e){e.setNormalizer("margin",$u("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",zu("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function im(e){e.setNormalizer("padding",$u("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",zu("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class nm{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new y("commandcollection-command-not-found",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class sm extends Ps{constructor(e){super(),this.editor=e}set(e,t,i={}){if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}class om extends(G()){constructor(e={}){super();const t=this.constructor,i=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new nr({language:i}),this._context._addEditor(this,!e.context);const n=Array.from(t.builtinPlugins||[]);this.config=new xn(e,t.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new ir(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new nm,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new uu,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const s=new ma;this.data=new qd(this.model,s),this.editing=new Ad(this.model,s),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Gd([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new sm(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new y("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new y("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new y("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],n=e.get("extraPlugins")||[],s=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(n),i,s)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){y.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}function rm(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=rm(Object);rm.setData=e.prototype.setData,rm.getData=e.prototype.getData}function am(e){return class extends e{updateSourceElement(e){if(!this.sourceElement)throw new y("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),i=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!i)return void Gn(this.sourceElement,"");const n="string"==typeof e?e:this.data.get();Gn(this.sourceElement,n)}}}am.updateSourceElement=am(Object).prototype.updateSourceElement;class lm extends sr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Ts({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new y("pendingactions-add-invalid-message",this);const t=new(G());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const cm='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',dm='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',hm='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',um={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:cm,caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:dm,cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:hm,history:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1z"/><path d="M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052z"/><path d="M11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1l4.16-4.482ZM17.8 1c.652 0 1.2.47 1.2 1.1v12.862c0 .64-.532 1.038-1.184 1.038H2.184C1.532 16 1 15.603 1 14.962V2.1C1 1.47 1.537 1 2.2 1h15.6Zm-5.655 6a2.129 2.129 0 0 1 .157-2.364 2.133 2.133 0 1 1-.157 2.363Z"/></svg>',imageUpload:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.2 1C.536 1 0 1.47 0 2.1v12.863C0 15.603.547 16 1.199 16h6.3c.908-1.19 1.892-2.41 2.8-3.6L6.615 9.15a.694.694 0 0 0-.957-.033L1.5 13.5v-11h15v6c.6.6 1.012.857 1.5 1.5V2.1c0-.63-.55-1.1-1.201-1.1h-15.6Zm11.724 2.805a2.133 2.133 0 0 0-.998.283 2.129 2.129 0 0 0-.992 1.295c-.074.27-.095.55-.057.828a2.136 2.136 0 0 0 1.56 1.783 2.13 2.13 0 0 0 2.612-1.506 2.129 2.129 0 0 0-2.125-2.683Z"/><path d="M15.208 19.011c.436 0 .79-.327.79-.763v-5.4l2.059 2.455a.79.79 0 0 0 1.212-1.015l-3.352-3.995a.79.79 0 0 0-.996-.179.786.786 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017L14.5 12.9v5.3c0 .437.272.811.709.811Z"/></svg>',imageAssetManager:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.54 1 0 1.47 0 2.1v12.86c0 .64.448 1.029 1.1 1.039h6.4v-6l-.885-.85a.692.692 0 0 0-.955-.033L1.5 13.5v-11h15V10H18V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.129 2.129 0 0 0-1.621.832A2.125 2.125 0 0 0 11.146 7a2.13 2.13 0 0 0 3.905-.512 2.135 2.135 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.367-.44Z"/><path clip-rule="evenodd" d="M19.5 12.5v6.156c0 .224-.192.439-.35.597a.844.844 0 0 1-.597.247H9.834a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.532c.223 0 .476.049.634.207l1 .793h4.5c.224 0 .491.214.65.372.158.158.35.404.35.628ZM18 13h-4.5l-1-1h-2v6H18v-5Z"/></svg>',imageUrl:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_355_284)"><path d="M1.201 1C.54 1 0 1.47 0 2.1v12.863C0 15.603.548 16 1.2 16H8c.022-1.034.222-1.961.783-2.9L9.5 12 6.617 9.15a.694.694 0 0 0-.957-.033L1.5 13.5v-11h15v5.8c.58.188 1.012.43 1.5.8v-7c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.133 2.133 0 0 0-.996.283 2.131 2.131 0 0 0-.994 1.295 2.136 2.136 0 0 0 1.506 2.611 2.13 2.13 0 0 0 2.61-1.505 2.128 2.128 0 0 0-2.126-2.684Z"/><path d="M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.649.649 0 0 0-.096.493.665.665 0 0 0 .278.417.7.7 0 0 0 .944-.233 1.741 1.741 0 0 1 2.478-.464 1.869 1.869 0 0 1 .476 2.55.634.634 0 0 0-.071.5.648.648 0 0 0 .309.397.628.628 0 0 0 .869-.19l.027-.042a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.781-.044.065a3.228 3.228 0 0 0 .82 4.404 3.005 3.005 0 0 0 4.275-.799l.13-.196a.626.626 0 0 0 .092-.475.642.642 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.028a1.742 1.742 0 0 1-2.477.462 1.87 1.87 0 0 1-.476-2.551l.03-.047a.647.647 0 0 0 .086-.485.66.66 0 0 0-.275-.407l-.04-.027a.609.609 0 0 0-.845.17Z"/><path d="M15.312 13.925c.24-.36.154-.837-.19-1.067-.346-.229-.82-.123-1.059.237l-1.268 1.907c-.239.36-.153.837.192 1.066.345.23.818.124 1.057-.236l1.268-1.907Z"/></g><defs><clipPath id="clip0_355_284"><rect width="20" height="20"/></clipPath></defs></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>\n',textAlternative:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M.91 10.488A.909.909 0 0 0 0 11.4v6.877c0 .505.405.91.91.91h18.178a.909.909 0 0 0 .912-.91V11.4a.91.91 0 0 0-.912-.912H.91Zm2.758 1.5h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516l2.152-5.7Zm4.947 0h1.801v4.3h2.7v1.4h-4.5v-5.7Zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9v-1.4Zm-8.517 1.457-.614 2.059h1.262l-.648-2.06Z"/><path d="M3.035 0C2.446 0 2 .54 2 1.098V9.5h1.5v-8h13v8H18V1.098C18 .539 17.48 0 16.9 0H3.035Zm10.453 2.61a1.885 1.885 0 0 0-1.442.736 1.894 1.894 0 0 0-.376 1.396 1.89 1.89 0 0 0 1.387 1.58c.485.13 1.004.063 1.439-.187a1.887 1.887 0 0 0-1.008-3.526ZM7.463 7.163a.611.611 0 0 0-.432.154L5.071 9.5h5.119L7.88 7.348a.627.627 0 0 0-.417-.184Zm6.236 1.059a.62.62 0 0 0-.42.164L12.07 9.5h2.969l-.92-1.113a.617.617 0 0 0-.42-.164Z"/></svg>',loupe:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.68 13.74h-.001l4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474ZM13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M7 10H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h5z"/></svg>',objectSizeMedium:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M10 8H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',dragIndicator:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>'},{threeVerticalDots:mm}=um,gm={alignLeft:um.alignLeft,bold:um.bold,importExport:um.importExport,paragraph:um.paragraph,plus:um.plus,text:um.text,threeVerticalDots:um.threeVerticalDots,pilcrow:um.pilcrow,dragIndicator:um.dragIndicator};class fm extends Fs{constructor(e,t){super(e);const i=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ss,this.keystrokes=new Ps,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new pm(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const s="rtl"===e.uiLanguageDirection;this._focusCycler=new qo({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[s?"arrowright":"arrowleft","arrowup"],focusNext:[s?"arrowleft":"arrowright","arrowdown"]}});const o=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")];var r;this.options.shouldGroupWhenFull&&this.options.isFloating&&o.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:o,role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(r=this,r.bindTemplate.to((e=>{e.target===r.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new wm(this):new bm(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,i){this.items.addMany(this._buildItemsFromConfig(e,t,i))}_buildItemsFromConfig(e,t,i){const n=Zo(e),s=i||n.removeItems;return this._cleanItemsConfiguration(n.items,t,s).map((e=>L(e)?this._createNestedToolbarDropdown(e,t,s):"|"===e?new Ko:"-"===e?new Jo:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,i){const n=e.filter(((e,n,s)=>"|"===e||-1===i.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(k("toolbarview-line-break-ignored-when-grouping-items",s),!1):!(!L(e)&&!t.has(e))||(k("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,i=e.length,n=e.findIndex(t);if(-1===n)return[];const s=i-e.slice().reverse().findIndex(t);return e.slice(n,s).filter(((e,i,n)=>{if(t(e))return!0;return!(i>0&&n[i-1]===e)}))}_createNestedToolbarDropdown(e,t,i){let{label:n,icon:s,items:o,tooltip:r=!0,withText:a=!1}=e;if(o=this._cleanItemsConfiguration(o,t,i),!o.length)return null;const l=Am(this.locale);return n||k("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:r,withText:!!a}),!1!==s?l.buttonView.icon=gm[s]||s||mm:l.buttonView.withText=!0,xm(l,(()=>l.toolbarView._buildItemsFromConfig(o,t,i))),l}}class pm extends Fs{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class bm{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class wm{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),e.children.on("change",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const i=t.index,n=Array.from(t.added);for(const e of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=i;e<i+n.length;e++){const t=n[e-i];e>this.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!Xn(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,i=new Hn(e.lastChild),n=new Hn(e);if(!this.cachedPadding){const i=Mn.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}return"ltr"===t?i.right>n.right-this.cachedPadding:i.left<n.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new qn(this.viewElement,(t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Ko),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,i=Am(e);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",xm(i,this.groupedItems),i.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:mm}),i}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class vm extends Fs{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class _m extends Fs{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class ym extends Fs{constructor(e,t=new No){super(e);const i=this.bindTemplate,n=new km(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,n]),n.set({role:"group",ariaLabelledBy:t.id}),n.focusTracker.destroy(),n.keystrokes.destroy(),this.items=n.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",i.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){if(this.items){const e=this.items.find((e=>!(e instanceof _m)));e&&e.focus()}}}class km extends Fs{constructor(e){super(e),this._listItemGroupToChangeListeners=new WeakMap;const t=this.bindTemplate;this.focusables=new Ns,this.items=this.createCollection(),this.focusTracker=new Ss,this.keystrokes=new Ps,this._focusCycler=new qo({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof ym?this._registerFocusableItemsGroup(e):e instanceof vm&&this._registerFocusableListItem(e);this.items.on("change",((e,t)=>{for(const e of t.removed)e instanceof ym?this._deregisterFocusableItemsGroup(e):this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof ym?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,t.index)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,i)=>{for(const e of i.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(i.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+i.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach(((e,i)=>{const n=void 0!==t?t+i:void 0;this._registerFocusableListItem(e,n)}));const i=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,i),e.items.on("change",i)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}class Cm extends Fs{constructor(e,t){super(e);const i=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new Ps,this.focusTracker=new Ss,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",i.to("class"),i.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new lo;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new lo,t=e.bindTemplate;return e.icon=jo,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function Am(t,i=Uo){const n="function"==typeof i?new i(t):i,s=new $o(t),o=new Wo(t,n,s);return n.bind("isEnabled").to(o),n instanceof Cm?n.arrowView.bind("isOn").to(o,"isOpen"):n.bind("isOn").to(o,"isOpen"),function(t){(function(t){t.on("render",(()=>{e({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:()=>[t.element,...t.focusTracker._elements]})}))})(t),function(e){e.on("execute",(t=>{t.source instanceof co||(e.isOpen=!1)}))}(t),function(e){e.focusTracker.on("change:isFocused",((t,i,n)=>{e.isOpen&&!n&&(e.isOpen=!1)}))}(t),function(e){e.keystrokes.set("arrowdown",((t,i)=>{e.isOpen&&(e.panelView.focus(),i())})),e.keystrokes.set("arrowup",((t,i)=>{e.isOpen&&(e.panelView.focusLast(),i())}))}(t),function(e){e.on("change:isOpen",((t,i,n)=>{if(n)return;const s=e.panelView.element;s&&s.contains(Mn.document.activeElement)&&e.buttonView.focus()}))}(t),function(e){e.on("change:isOpen",((t,i,n)=>{n&&e.panelView.focus()}),{priority:"low"})}(t)}(o),o}function xm(e,t,i={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?Tm(e,t,i):e.once("change:isOpen",(()=>Tm(e,t,i)),{priority:"highest"}),i.enableActiveItemFocusOnDropdownOpen&&Pm(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function Tm(e,t,i){const n=e.locale,s=n.t,o=e.toolbarView=new fm(n),r="function"==typeof t?t():t;o.ariaLabel=i.ariaLabel||s("Dropdown toolbar"),i.maxWidth&&(o.maxWidth=i.maxWidth),i.class&&(o.class=i.class),i.isCompact&&(o.isCompact=i.isCompact),i.isVertical&&(o.isVertical=!0),r instanceof Ns?o.items.bindTo(r).using((e=>e)):o.items.addMany(r),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function Em(e,t,i={}){e.isOpen?Sm(e,t,i):e.once("change:isOpen",(()=>Sm(e,t,i)),{priority:"highest"}),Pm(e,(()=>e.listView.items.find((e=>e instanceof vm&&e.children.first.isOn))))}function Sm(e,t,i){const n=e.locale,s=e.listView=new km(n),o="function"==typeof t?t():t;s.ariaLabel=i.ariaLabel,s.role=i.role,Im(e,s.items,o,n),e.panelView.children.add(s),s.items.delegate("execute").to(e)}function Pm(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const i=t();i&&("function"==typeof i.focus?i.focus():k("ui-dropdown-focus-child-on-open-child-missing-focus",{view:i}))}),{priority:w.low-10})}function Im(e,t,i,n){t.bindTo(i).using((t=>{if("separator"===t.type)return new _m(n);if("group"===t.type){const i=new ym(n);return i.set({label:t.label}),Im(e,i.items,t.items,n),i.items.delegate("execute").to(e),i}if("button"===t.type||"switchbutton"===t.type){const e=new vm(n);let i;return"button"===t.type?(i=new lo(n),i.extendTemplate({attributes:{"aria-checked":i.bindTemplate.to("isOn")}})):i=new co(n),i.bind(...Object.keys(t.model)).to(t.model),i.delegate("execute").to(e),e.children.add(i),e}return null}))}const Vm=(e,t,i)=>{const n=new zo(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n},Rm=(e,t,i)=>{const n=new Ho(e.locale);return n.set({id:t,ariaDescribedById:i,inputMode:"numeric"}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n},Om=(e,t,i)=>{const n=Am(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isEnabled").to(e),n},Bm=(e,t=0,i=1)=>e>i?i:e<t?t:e,Mm=(e,t=0,i=Math.pow(10,t))=>Math.round(i*e)/i,Nm=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Mm(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?Mm(parseInt(e.substring(6,8),16)/255,2):1})),Fm=({h:e,s:t,v:i,a:n})=>{const s=(200-t)*i/100;return{h:Mm(e),s:Mm(s>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0),l:Mm(s/2),a:Mm(n,2)}},Dm=e=>{const{h:t,s:i,l:n}=Fm(e);return`hsl(${t}, ${i}%, ${n}%)`},Lm=({h:e,s:t,v:i,a:n})=>{e=e/360*6,t/=100,i/=100;const s=Math.floor(e),o=i*(1-t),r=i*(1-(e-s)*t),a=i*(1-(1-e+s)*t),l=s%6;return{r:Mm(255*[i,r,o,o,a,i][l]),g:Mm(255*[a,i,i,r,o,o][l]),b:Mm(255*[o,o,a,i,i,r][l]),a:Mm(n,2)}},zm=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Hm=({r:e,g:t,b:i,a:n})=>{const s=n<1?zm(Mm(255*n)):"";return"#"+zm(e)+zm(t)+zm(i)+s},$m=({r:e,g:t,b:i,a:n})=>{const s=Math.max(e,t,i),o=s-Math.min(e,t,i),r=o?s===e?(t-i)/o:s===t?2+(i-e)/o:4+(e-t)/o:0;return{h:Mm(60*(r<0?r+6:r)),s:Mm(s?o/s*100:0),v:Mm(s/255*100),a:n}},Wm=(e,t)=>{if(e===t)return!0;for(const i in e)if(e[i]!==t[i])return!1;return!0},jm={},Um=e=>{let t=jm[e];return t||(t=document.createElement("template"),t.innerHTML=e,jm[e]=t),t},qm=(e,t,i)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))};let Gm=!1;const Km=e=>"touches"in e,Jm=(e,t)=>{const i=Km(t)?t.touches[0]:t,n=e.el.getBoundingClientRect();qm(e.el,"move",e.getMove({x:Bm((i.pageX-(n.left+window.pageXOffset))/n.width),y:Bm((i.pageY-(n.top+window.pageYOffset))/n.height)}))};class Zm{constructor(e,t,i,n){const s=Um(`<div role="slider" tabindex="0" part="${t}" ${i}><div part="${t}-pointer"></div></div>`);e.appendChild(s.content.cloneNode(!0));const o=e.querySelector(`[part=${t}]`);o.addEventListener("mousedown",this),o.addEventListener("touchstart",this),o.addEventListener("keydown",this),this.el=o,this.xy=n,this.nodes=[o.firstChild,o]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(Gm?"touchmove":"mousemove",this),t(Gm?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(Gm&&!Km(e)||(Gm||(Gm=Km(e)),0)))(e)||!Gm&&0!=e.button)return;this.el.focus(),Jm(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Jm(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const i=t.keyCode;i>40||e.xy&&i<37||i<33||(t.preventDefault(),qm(e.el,"move",e.getMove({x:39===i?.01:37===i?-.01:34===i?.05:33===i?-.05:35===i?1:36===i?-1:0,y:40===i?.01:38===i?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const i in e)this.nodes[t].style.setProperty(i,e[i])}))}}class Qm extends Zm{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:Dm({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${Mm(e)}`)}getMove(e,t){return{h:t?Bm(this.h+360*e.x,0,360):360*e.x}}}class Ym extends Zm{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:Dm(e)},{"background-color":Dm({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${Mm(e.s)}%, Brightness ${Mm(e.v)}%`)}getMove(e,t){return{s:t?Bm(this.hsva.s+100*e.x,0,100):100*e.x,v:t?Bm(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const Xm=Symbol("same"),eg=Symbol("color"),tg=Symbol("hsva"),ig=Symbol("update"),ng=Symbol("parts"),sg=Symbol("css"),og=Symbol("sliders");class rg extends HTMLElement{static get observedAttributes(){return["color"]}get[sg](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[og](){return[Ym,Qm]}get color(){return this[eg]}set color(e){if(!this[Xm](e)){const t=this.colorModel.toHsva(e);this[ig](t),this[eg]=e}}constructor(){super();const e=Um(`<style>${this[sg].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[ng]=this[og].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,i){const n=this.colorModel.fromAttr(i);this[Xm](n)||(this.color=n)}handleEvent(e){const t=this[tg],i={...t,...e.detail};let n;this[ig](i),Wm(i,t)||this[Xm](n=this.colorModel.fromHsva(i))||(this[eg]=n,qm(this,"color-changed",{value:n}))}[Xm](e){return this.color&&this.colorModel.equal(e,this.color)}[ig](e){this[tg]=e,this[ng].forEach((t=>t.update(e)))}}const ag={defaultColor:"#000",toHsva:e=>$m(Nm(e)),fromHsva:({h:e,s:t,v:i})=>Hm(Lm({h:e,s:t,v:i,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||Wm(Nm(e),Nm(t)),fromAttr:e=>e};class lg extends rg{get colorModel(){return ag}}customElements.define("hex-color-picker",class extends lg{});class cg extends Fs{constructor(e,t={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const i=this.createCollection();t.hideInput||i.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:i}),this._config=t,this._debounceColorPickerEvent=Mo((e=>{this.set("color",e),this.fire("colorSelected",{color:this.color})}),150,{leading:!0}),this.on("set:color",((e,t,i)=>{e.return=_o(i,this._config.format||"hsl")})),this.on("change:color",(()=>{this._hexColor=dg(this.color)})),this.on("change:_hexColor",(()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),dg(this.color)!=dg(this._hexColor)&&(this.color=this._hexColor)}))}render(){if(super.render(),this.picker=Mn.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",(e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)}))}focus(){if(!this._config.hideInput&&(l.isGecko||l.isiOS||l.isSafari)){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new hg(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=new ug,t=this._createColorInput();return new mg(this.locale,[e,t])}_createColorInput(){const e=new Fo(this.locale,Vm),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=t.trim(),i=e.startsWith("#")?e.substring(1):e;[3,4,6,8].includes(i.length)&&/(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})/.test(i)&&this._debounceColorPickerEvent("#"+i)}})),e}}function dg(e){let t=function(e){if(!e)return"";const t=yo(e);return t?"hex"===t.space?t.hexValue:_o(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class hg extends Fs{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class ug extends Fs{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class mg extends Fs{constructor(e,t){super(e),this.children=this.createCollection(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}}class gg extends(G(Ts)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}const fg='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z"/></svg>';class pg extends Fs{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:r,focusTracker:a,focusables:l}){super(e);const c=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=a,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=i,this.documentColors=new gg,this.documentColorsCount=o,this._focusables=l,this._removeButtonLabel=n,this._colorPickerLabel=r,this._documentColorsLabel=s,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",c.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const s of i.getRoots()){const i=e.createRangeIn(s);for(const e of i.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=Ds.bind(this.documentColors,this.documentColors),t=new No(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker(),this.focus()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new lo,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:fg,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("colorPicker:show")}))}_createRemoveColorButton(){const e=new lo;return e.set({withText:!0,icon:hm,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",(()=>{this.fire("execute",{value:null,source:"removeColorButton"})})),e.render(),e}_createStaticColorsGrid(){const e=new fo(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=Ds.bind(this.documentColors,this.documentColors),t=new fo(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new go;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,i,n)=>{n&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class bg extends Fs{constructor(e,{focusTracker:t,focusables:i,keystrokes:n,colorPickerViewConfig:s}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=n,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=i,this._colorPickerViewConfig=s;const o=this.bindTemplate,{saveButtonView:r,cancelButtonView:a}=this._createActionButtons();this.saveButtonView=r,this.cancelButtonView=a,this.actionBarView=this._createActionBarView({saveButtonView:r,cancelButtonView:a}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",o.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new cg(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,i,n)=>{e.color=n})),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}_executeOnEnterPress(){this.keystrokes.set("enter",(e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())}))}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const i=new Fs,n=this.createCollection();return n.add(e),n.add(t),i.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:n}),i}_createActionButtons(){const e=this.locale,t=e.t,i=new lo(e),n=new lo(e);return i.set({icon:dm,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),n.set({icon:cm,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),i.on("execute",(()=>{this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})})),n.on("execute",(()=>{this.fire("colorPicker:cancel")})),{saveButtonView:i,cancelButtonView:n}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",((e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)}))}}class wg extends Fs{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:r,colorPickerViewConfig:a}){super(e),this.items=this.createCollection(),this.focusTracker=new Ss,this.keystrokes=new Ps,this._focusables=new Ns,this._colorPickerViewConfig=a,this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new pg(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:r,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new bg(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:a}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",((e,t,i)=>{this.colorGridsFragmentView.set("selectedColor",i),this.colorPickerFragmentView.set("selectedColor",i)})),this.colorGridsFragmentView.on("change:selectedColor",((e,t,i)=>{this.set("selectedColor",i)})),this.colorPickerFragmentView.on("change:selectedColor",((e,t,i)=>{this.set("selectedColor",i)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){this.colorPickerFragmentView.colorPickerView&&!this._isColorPickerFragmentVisible&&(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){2!==this.items.length&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{this.showColorPickerFragment()})),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class vg{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(_g(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new y("componentfactory-item-missing",this,{name:e});return this._components.get(_g(e)).callback(this.editor.locale)}has(e){return this._components.has(_g(e))}}function _g(e){return String(e).toLowerCase()}const yg=Kn("px"),kg=Mn.document.body,Cg={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class Ag extends Fs{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",yg),left:t.to("left",yg)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Ag.defaultPositions,i=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:kg,fitInViewport:!0},e),n=Ag._getOptimalPosition(i)||Cg,s=parseInt(n.left),o=parseInt(n.top),r=n.name,a=n.config||{},{withArrow:l=!0}=a;this.top=o,this.left=s,this.position=r,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=xg(e.target),i=e.limiter?xg(e.limiter):kg;this.listenTo(Mn.document,"scroll",((n,s)=>{const o=s.target,r=t&&o.contains(t),a=i&&o.contains(i);!r&&!a&&t&&i||this.attachTo(e)}),{useCapture:!0}),this.listenTo(Mn.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(Mn.document,"scroll"),this.stopListening(Mn.window,"resize")}}function xg(e){return An(e)?e:Fn(e)?e.commonAncestorContainer:"function"==typeof e?xg(e()):null}function Tg(e={}){const{sideOffset:t=Ag.arrowSideOffset,heightOffset:i=Ag.arrowHeightOffset,stickyVerticalOffset:n=Ag.stickyVerticalOffset,config:s}=e;return{northWestArrowSouthWest:(e,i)=>({top:o(e,i),left:e.left-t,name:"arrow_sw",...s&&{config:s}}),northWestArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.left-.25*i.width-t,name:"arrow_smw",...s&&{config:s}}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:"arrow_s",...s&&{config:s}}),northWestArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.left-.75*i.width+t,name:"arrow_sme",...s&&{config:s}}),northWestArrowSouthEast:(e,i)=>({top:o(e,i),left:e.left-i.width+t,name:"arrow_se",...s&&{config:s}}),northArrowSouthWest:(e,i)=>({top:o(e,i),left:e.left+e.width/2-t,name:"arrow_sw",...s&&{config:s}}),northArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.left+e.width/2-.25*i.width-t,name:"arrow_smw",...s&&{config:s}}),northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...s&&{config:s}}),northArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.left+e.width/2-.75*i.width+t,name:"arrow_sme",...s&&{config:s}}),northArrowSouthEast:(e,i)=>({top:o(e,i),left:e.left+e.width/2-i.width+t,name:"arrow_se",...s&&{config:s}}),northEastArrowSouthWest:(e,i)=>({top:o(e,i),left:e.right-t,name:"arrow_sw",...s&&{config:s}}),northEastArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.right-.25*i.width-t,name:"arrow_smw",...s&&{config:s}}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:"arrow_s",...s&&{config:s}}),northEastArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.right-.75*i.width+t,name:"arrow_sme",...s&&{config:s}}),northEastArrowSouthEast:(e,i)=>({top:o(e,i),left:e.right-i.width+t,name:"arrow_se",...s&&{config:s}}),southWestArrowNorthWest:e=>({top:r(e),left:e.left-t,name:"arrow_nw",...s&&{config:s}}),southWestArrowNorthMiddleWest:(e,i)=>({top:r(e),left:e.left-.25*i.width-t,name:"arrow_nmw",...s&&{config:s}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...s&&{config:s}}),southWestArrowNorthMiddleEast:(e,i)=>({top:r(e),left:e.left-.75*i.width+t,name:"arrow_nme",...s&&{config:s}}),southWestArrowNorthEast:(e,i)=>({top:r(e),left:e.left-i.width+t,name:"arrow_ne",...s&&{config:s}}),southArrowNorthWest:e=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...s&&{config:s}}),southArrowNorthMiddleWest:(e,i)=>({top:r(e),left:e.left+e.width/2-.25*i.width-t,name:"arrow_nmw",...s&&{config:s}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...s&&{config:s}}),southArrowNorthMiddleEast:(e,i)=>({top:r(e),left:e.left+e.width/2-.75*i.width+t,name:"arrow_nme",...s&&{config:s}}),southArrowNorthEast:(e,i)=>({top:r(e),left:e.left+e.width/2-i.width+t,name:"arrow_ne",...s&&{config:s}}),southEastArrowNorthWest:e=>({top:r(e),left:e.right-t,name:"arrow_nw",...s&&{config:s}}),southEastArrowNorthMiddleWest:(e,i)=>({top:r(e),left:e.right-.25*i.width-t,name:"arrow_nmw",...s&&{config:s}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...s&&{config:s}}),southEastArrowNorthMiddleEast:(e,i)=>({top:r(e),left:e.right-.75*i.width+t,name:"arrow_nme",...s&&{config:s}}),southEastArrowNorthEast:(e,i)=>({top:r(e),left:e.right-i.width+t,name:"arrow_ne",...s&&{config:s}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-i,name:"arrow_e",...s&&{config:s}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+i,name:"arrow_w",...s&&{config:s}}),viewportStickyNorth:(e,t,i,o)=>{const r=o||i;return e.getIntersection(r)?r.height-e.height>n?null:{top:r.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...s}}:null}};function o(e,t){return e.top-t.height-i}function r(e){return e.bottom+i}}Ag.arrowSideOffset=25,Ag.arrowHeightOffset=10,Ag.stickyVerticalOffset=20,Ag._getOptimalPosition=es,Ag.defaultPositions=Tg();const Eg="ck-tooltip";class Sg extends(Vn()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,Sg._editors.add(e),Sg._instance)return Sg._instance;Sg._instance=this,this.tooltipTextView=new Fs(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Ag(e.locale),this.balloonPanelView.class=Eg,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=Mo(this._pinTooltip,600),this.listenTo(Mn.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Sg._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Sg._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Sg._instance=null)}static getPositioningFunctions(e){const t=Sg.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const i=Pg(t);var n;i&&(i!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(i,{text:(n=i).dataset.ckeTooltipText,position:n.dataset.ckeTooltipPosition||"s",cssClass:n.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:i}){if("mouseleave"===e.name){if(!An(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=Pg(t),n=Pg(i);e&&e!==n&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:i,cssClass:n}){const s=Es(Sg._editors.values()).ui.view.body;s.has(this.balloonPanelView)||s.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:Sg.getPositioningFunctions(i)}),this._resizeObserver=new qn(e,(()=>{Xn(e)||this._unpinTooltip()})),this.balloonPanelView.class=[Eg,n].filter((e=>e)).join(" ");for(const e of Sg._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=i}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Sg._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){Xn(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Sg.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}}function Pg(e){return An(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}Sg.defaultBalloonPositions=Tg({heightOffset:5,sideOffset:13}),Sg._editors=new Set,Sg._instance=null;const Ig=function(e,t,i){var n=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return L(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),Mo(e,t,{leading:n,maxWait:t,trailing:s})},Vg=50,Rg=350,Og="Powered by";class Bg extends(Vn()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=Ig(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;(!!e.config.get("ui.poweredBy.forceVisible")||"VALID"!==function(e){function t(e){return e.length>=40&&e.length<=255?"VALID":"INVALID"}if(!e)return"INVALID";let i="";try{i=atob(e)}catch(e){return"INVALID"}const n=i.split("-"),s=n[0],o=n[1];if(!o)return t(e);try{atob(o)}catch(i){try{if(atob(s),!atob(s).length)return t(e)}catch(i){return t(e)}}if(s.length<40||s.length>255)return"INVALID";let r="";try{atob(s),r=atob(o)}catch(e){return"INVALID"}if(8!==r.length)return"INVALID";const a=Number(r.substring(0,4)),l=Number(r.substring(4,6))-1,c=Number(r.substring(6,8)),d=new Date(a,l,c);return d<T||isNaN(Number(d))?"INVALID":"VALID"}(e.config.get("licenseKey")))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,i)=>{this._updateLastFocusedEditableElement(),i?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,i)=>{this._updateLastFocusedEditableElement(),i&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new Ag,i=Fg(e),n=new Mg(e.locale,i.label);t.content.add(n),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const i=Fg(e),n="right"===i.side?function(e,t){return Ng(e,t,((e,i)=>e.left+e.width-i.width-t.horizontalOffset))}(t,i):function(e,t){return Ng(e,t,(e=>e.left+t.horizontalOffset))}(t,i);return{target:t,positions:[n]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,i=e.ui.focusTracker.focusedElement;if(!t||!i)return void(this._lastFocusedEditableElement=null);const n=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));n.includes(i)?this._lastFocusedEditableElement=i:this._lastFocusedEditableElement=n[0]}}class Mg extends Fs{constructor(e,t){super(e);const i=new ro,n=this.bindTemplate;i.set({content:'<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>\n',isColorInherited:!1}),i.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],i],on:{dragstart:n.to((e=>e.preventDefault()))}}]})}}function Ng(e,t,i){return(n,s)=>{const o=new Hn(e);if(o.width<Rg||o.height<Vg)return null;let r;r="inside"===t.position?o.bottom-s.height:o.bottom-s.height/2,r-=t.verticalOffset;const a=i(o,s),l=n.clone().moveTo(a,r).getIntersection(s.clone().moveTo(a,r)).getVisible();return!l||l.getArea()<s.getArea()?null:{top:r,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function Fg(e){const t=e.config.get("ui.poweredBy"),i=t&&t.position||"border";return{position:i,label:Og,verticalOffset:"inside"===i?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left",...t}}var Dg;!function(e){e.POLITE="polite",e.ASSERTIVE="assertive"}(Dg||(Dg={}));class Lg{constructor(e){this.editor=e}announce(e,t,i=Dg.POLITE){const n=this.editor;this.view||(this.view=new zg(n.locale),n.ui.view.body.add(this.view));let s=this.view.regionViews.find((t=>t.regionName===e));s||(s=new Hg(this.view.locale),this.view.regionViews.add(s)),s.set({regionName:e,text:t,politeness:i})}}class zg extends Fs{constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class Hg extends Fs{constructor(e){super(e);const t=this.bindTemplate;this.set("regionName",""),this.set("text",""),this.set("politeness",Dg.POLITE),this.setTemplate({tag:"div",attributes:{role:"region","data-region":t.to("regionName"),"aria-live":t.to("politeness")},children:[{text:t.to("text")}]})}}class $g extends(G()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[];const t=e.editing.view;this.editor=e,this.componentFactory=new vg(e),this.focusTracker=new Ss,this.tooltipManager=new Sg(e),this.poweredBy=new Bg(e),this.ariaLiveAnnouncer=new Lg(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const i=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?i():this.once("ready",i)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const i=e.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let i,n;e.keystrokes.set("Alt+F10",((e,s)=>{const o=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(o)&&!Array.from(t.domRoots.values()).includes(o)&&(i=o);const r=this._getCurrentFocusedToolbarDefinition();r&&n||(n=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e<n.length;e++){const e=n.shift();if(n.push(e),e!==r&&this._focusFocusableCandidateToolbar(e)){r&&r.options.afterBlur&&r.options.afterBlur();break}}s()})),e.keystrokes.set("Esc",((t,n)=>{const s=this._getCurrentFocusedToolbarDefinition();s&&(i?(i.focus(),i=null):e.editing.view.focus(),s.options.afterBlur&&s.options.afterBlur(),n())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:i,options:n}=t;(Xn(i.element)||n.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>Wg(e)-Wg(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:i}}=e;return i&&i(),!!Xn(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const i={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=i.top,t.viewportOffset.bottom+=i.bottom,t.viewportOffset.left+=i.left,t.viewportOffset.right+=i.right}}function Wg(e){const{toolbarView:t,options:i}=e;let n=10;return Xn(t.element)&&n--,i.isContextual&&n--,n}class jg extends Fs{constructor(e){super(e),this.body=new oo(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class Ug extends jg{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new No;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class qg extends Fs{constructor(e,t,i){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((i=>{const n=e.document.getRoot(t.name);i.addClass(t.isFocused?"ck-focused":"ck-blurred",n),i.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)}))}e.isRenderingInProgress?function i(n){e.once("change:isRenderingInProgress",((e,s,o)=>{o?i(n):t(n)}))}(this):t(this)}}class Gg extends qg{constructor(e,t,i,n={}){super(e,t,i);const s=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=n.label||(()=>s("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const i=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),i)}))}}class Kg extends Fs{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",i.to("class")]},children:this.children}),t.icon&&(this.iconView=new ro,this.iconView.content=t.icon,this.children.add(this.iconView));const n=new Fs(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"]},children:[{text:i.to("label")}]}),this.children.add(n)}}class Jg extends sr{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class Zg extends(G()){constructor(e,t){super(),t&&Vl(this,t),e&&this.set(e)}}const Qg=Kn("px");class Yg extends Qo{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new y("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new y("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new y("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new Ag(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Xg(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,i)=>{if(i<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,i])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new ef(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class Xg extends Fs{constructor(e){super(e);const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ss,this.buttonPrevView=this._createButtonView(t("Previous"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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>'),this.buttonNextView=this._createButtonView(t("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.382l-4.043 4.042z"/></svg>'),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new lo(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class ef extends Fs{constructor(e,t){super(e);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:i.to("top",Qg),left:i.to("left",Qg),width:i.to("width",Qg),height:i.to("height",Qg)}},children:this.content}),this.on("change:numberOfPanels",((e,t,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new Fs;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new Hn(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}const tf=Kn("px");class nf extends Fs{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new Ds({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?tf(this._contentPanelRect.height):null))}}}).render(),this._contentPanel=new Ds({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?tf(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_stickyTopOffset",(e=>e?tf(e):e)),bottom:t.to("_stickyBottomOffset",(e=>e?tf(e):e)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(Mn.document,"scroll",(()=>{this.checkIfShouldBeSticky()}),{useCapture:!0}),this.listenTo(this,"change:isActive",(()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const e=new Hn(this.limiterElement);let t=e.getVisible();if(t){const e=new Hn(Mn.window);e.top+=this.viewportTopOffset,e.height-=this.viewportTopOffset,t=t.getIntersection(e)}if(t&&e.top<t.top){const i=t.top;if(i+this._contentPanelRect.height+this.limiterBottomOffset>t.bottom){const i=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-i>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(i):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(i):this._unstick()}else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=tf(-Mn.window.scrollX)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=tf(-Mn.window.scrollX)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new Hn(this._contentPanel)}}class sf extends Fo{constructor(e,t){const i=e.t,n=Object.assign({},{showResetButton:!0,showIcon:!0,creator:Vm},t);super(e,n.creator),this.label=t.label,this._viewConfig=n,this._viewConfig.showIcon&&(this.iconView=new ro,this.iconView.content=um.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new lo(e),this.resetButtonView.set({label:i("Clear"),icon:um.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",(()=>{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(e=>!e)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class of extends Fs{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",(e=>!e))],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class rf extends Fs{constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new Ss,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new qo({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var af=/[\\^$.*+?()[\]{}|]/g,lf=RegExp(af.source);const cf=function(e){return(e=Br(e))&&lf.test(e)?e.replace(af,"\\$&"):e};class df extends Fs{constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new Ss,this.keystrokes=new Ps,this.resultsView=new rf(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new of,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new qo({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((e,{resultsCount:t,totalItemsCount:i})=>{this.resultsCount=t,this.totalItemsCount=i})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(e){const t=e?new RegExp(cf(e),"ig"):null,i=this.filteredView.filter(t);this.fire("search",{query:e,...i})}_createSearchTextQueryView(){const e=new sf(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",(()=>{this.search(e.fieldView.element.value)})),e.on("reset",(()=>this.reset())),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function i(e,{query:t,resultsCount:i,totalItemsCount:n}){return"function"==typeof e?e(t,i,n):e}this.on("search",((n,s)=>{if(s.resultsCount)t.set({isVisible:!1});else{const n=this._config.infoView&&this._config.infoView.text;let o,r;s.totalItemsCount?n&&n.notFound?(o=n.notFound.primary,r=n.notFound.secondary):(o=e("No results found"),r=""):n&&n.noSearchableItems?(o=n.noSearchableItems.primary,r=n.noSearchableItems.secondary):(o=e("No searchable items"),r=""),t.set({primaryText:i(o,s),secondaryText:i(r,s),isVisible:!0})}}))}}class hf extends df{constructor(e,t){super(e,t),this._config=t;const i=Kn("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const n=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[n.if("isVisible","ck-hidden",(e=>!e)),n.to("_position",(e=>`ck-search__results_${e}`))],style:{width:n.to("_width",i)}}}),this.focusTracker.on("change:isFocused",((e,i,n)=>{this._updateResultsVisibility(),n?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())})),this.listenTo(Mn.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((e,{value:t})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=t,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new Hn(this.queryView.fieldView.element).width;const e=hf._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:hf.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}}hf.defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})],hf._getOptimalPosition=es;class uf extends Fs{constructor(e,t){super(e);const i=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new lo(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:jo}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}Kn("px");Kn("px");Kn("px");class mf extends $g{constructor(e,t){super(e),this.view=t,this._toolbarConfig=Zo(e.config.get("toolbar")),this._elementReplacer=new X,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,n=t.editing.view,s=i.editable,o=n.document.getRoot();s.name=o.rootName,i.render();const r=s.element;this.setEditableElement(s.name,r),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),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",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.sourceElement;let s;const o=e.config.get("placeholder");o&&(s="string"==typeof o?o:o[this.view.editable.name]),!s&&n&&"textarea"===n.tagName.toLowerCase()&&(s=n.getAttribute("placeholder")),s&&(i.placeholder=s),ar({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(e,t,i){const n=this.view.stickyPanel;if(n.isSticky){const e=new Hn(n.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(n,"change:isSticky",e),setTimeout((()=>{this.stopListening(n,"change:isSticky",e)}),20)}}}class gf extends Ug{constructor(e,t,i={}){super(e),this.stickyPanel=new nf(e),this.toolbar=new fm(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new Gg(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class ff{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const i=this._listeners[e]||[];for(const e of i)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const i=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:i}),i?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function pf(e,t=new Set){const i=[e],n=new Set;let s=0;for(;i.length>s;){const e=i[s++];if(!n.has(e)&&bf(e)&&!t.has(e))if(n.add(e),Symbol.iterator in e)try{for(const t of e)i.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&i.push(e[t])}return n}function bf(e){const t=Object.prototype.toString.call(e),i=typeof e;return!("number"===i||"boolean"===i||"string"===i||"symbol"===i||"function"===i||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function wf(e,t,i=new Set){if(e===t&&("object"==typeof(n=e)&&null!==n))return!0;var n;const s=pf(e,i),o=pf(t,i);for(const e of s)if(o.has(e))return!0;return!1}class vf extends ff{constructor(e,t={}){super(t),this._editor=null,this._initUsingData=!0,this._editables={},this._throttledSave=Ig(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,i)=>e.create(t,i)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{const e={},t=[],i=this._config.rootsAttributes||{},n={};for(const[s,o]of Object.entries(this._data.roots))o.isLoaded?(e[s]="",n[s]=i[s]||{}):t.push(s);const s={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:n,_watchdogInitialData:this._data};return delete s.initialData,s.extraPlugins.push(_f),this._initUsingData?this.create(e,s,s.context):An(this._elementOrData)?this.create(this._elementOrData,s,s.context):this.create(this._editables,s,s.context)})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,i){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=i,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter((e=>e.isAttached()&&"$graveyard"!=e.rootName)),{plugins:i}=e,n=i.has("CommentsRepository")&&i.get("CommentsRepository"),s=i.has("TrackChanges")&&i.get("TrackChanges"),o={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach((e=>{o.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}}));for(const t of e.model.markers)t._affectsData&&(o.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return n&&(o.commentThreads=JSON.stringify(n.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),s&&(o.suggestions=JSON.stringify(s.getSuggestions({toJSON:!0,skipNotAttached:!0}))),o}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const i=this.editor.ui.getEditableElement(t);i&&(e[t]=i)}return e}_isErrorComingFromThisItem(e){return wf(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return Cn(e,((e,t)=>An(e)||"context"===t?e:void 0))}}class _f{constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},(e=>{this._restoreCollaborationData(),this._restoreEditorData(e)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(e,t){if("name"in t){const i=e.createElement(t.name,t.attributes);if(t.children)for(const n of t.children)i._appendChild(this._createNode(e,n));return i}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach((([i,{content:n,attributes:s}])=>{const o=JSON.parse(n),r=JSON.parse(s),a=t.model.document.getRoot(i);for(const[t,i]of r)e.setAttribute(t,i,a);for(const t of o){const i=this._createNode(e,t);e.insert(i,a,"end")}})),Object.entries(this._data.markers).forEach((([i,n])=>{const{document:s}=t.model,{rangeJSON:{start:o,end:r},...a}=n,l=s.getRoot(o.root),c=e.createPositionFromPath(l,o.path,o.stickiness),d=e.createPositionFromPath(l,r.path,r.stickiness),h=e.createRange(c,d);e.addMarker(i,{range:h,...a})}))}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach((e=>{const t=this.editor.config.get("collaboration.channelId"),i=this.editor.plugins.get("CommentsRepository");if(i.hasCommentThread(e.threadId)){i.getCommentThread(e.threadId).remove()}i.addCommentThread({channelId:t,...e})})),t.forEach((e=>{const t=this.editor.plugins.get("TrackChangesEditing");if(t.hasSuggestion(e.id)){t.getSuggestion(e.id).attributes=e.attributes}else t.addSuggestionData(e)}))}}const yf=Symbol("MainQueueId");class kf{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const i=e===yf;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const n=(i?Promise.all(this._queues.values()):Promise.all([this._queues.get(yf),this._queues.get(e)])).then(t),s=n.catch((()=>{}));return this._queues.set(e,s),n.finally((()=>{this._activeActions--,this._queues.get(e)===s&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function Cf(e){return Array.isArray(e)?e:[e]}class Af extends(rm(am(om))){constructor(e,t={}){if(!xf(e)&&void 0!==t.initialData)throw new y("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return xf(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e)),xf(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new gf(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new mf(this,n),function(e){if(!$e(e.updateSourceElement))throw new y("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let i;const n=t.form,s=()=>e.updateSourceElement();$e(n.submit)&&(i=n.submit,n.submit=()=>{s(),i.apply(n)}),n.addEventListener("submit",s),e.on("destroy",(()=>{n.removeEventListener("submit",s),i&&(n.submit=i)}))}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((i=>{const n=new this(e,t);i(n.initPlugins().then((()=>n.ui.init(xf(e)?e:null))).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function xf(e){return An(e)}Af.Context=nr,Af.EditorWatchdog=vf,Af.ContextWatchdog=class extends ff{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new kf,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(yf,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=Cf(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new vf(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((i,{error:n,causesRestart:s})=>{this._fire("itemError",{itemId:e.id,error:n}),s&&this._actionQueues.enqueue(e.id,(()=>new Promise((i=>{const n=()=>{t.off("restart",n),this._fire("itemRestart",{itemId:e.id}),i()};t.on("restart",n)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=Cf(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(yf,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(yf,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=pf(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return wf(this._context,e.context)}};const Tf=["left","right","center","justify"];function Ef(e){return Tf.includes(e)}function Sf(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function Pf(e){const t=e.map((e=>{let t;return t="string"==typeof e?{name:e}:e,t})).filter((e=>{const t=Tf.includes(e.name);return t||k("alignment-config-name-not-recognized",{option:e}),t})),i=t.filter((e=>Boolean(e.className))).length;if(i&&i<t.length)throw new y("alignment-config-classnames-are-missing",{configuredOptions:e});return t.forEach(((t,i,n)=>{const s=n.slice(i+1);if(s.some((e=>e.name==t.name)))throw new y("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className){if(s.some((e=>e.className==t.className)))throw new y("alignment-config-classname-already-defined",{option:t,configuredOptions:e})}})),t}const If="alignment";class Vf extends Xo{refresh(){const e=this.editor.locale,t=Es(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(t)&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,i=t.locale,n=t.model,s=n.document,o=e.value;n.change((e=>{const t=Array.from(s.selection.getSelectedBlocks()).filter((e=>this._canBeAligned(e))),n=t[0].getAttribute("alignment");Sf(o,i)||n===o||!o?function(e,t){for(const i of e)t.removeAttribute(If,i)}(t,e):function(e,t,i){for(const n of e)t.setAttribute(If,i,n)}(t,e,o)}))}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,If)}}class Rf extends Qo{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:Tf.map((e=>({name:e})))})}init(){const e=this.editor,t=e.locale,i=e.model.schema,n=Pf(e.config.get("alignment.options")).filter((e=>Ef(e.name)&&!Sf(e.name,t))),s=n.some((e=>!!e.className));i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),s?e.conversion.attributeToAttribute(function(e){const t={};for(const i of e)t[i.name]={key:"class",value:i.className};const i={model:{key:"alignment",values:e.map((e=>e.name))},view:t};return i}(n)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:i}of e)t[i]={key:"style",value:{"text-align":i}};const i={model:{key:"alignment",values:e.map((e=>e.name))},view:t};return i}(n));const o=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"style",value:{"text-align":i}},model:{key:"alignment",value:i}});return t}(n);for(const t of o)e.conversion.for("upcast").attributeToAttribute(t);const r=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"align",value:i},model:{key:"alignment",value:i}});return t}(n);for(const t of r)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new Vf(e))}}const Of=new Map([["left",um.alignLeft],["right",um.alignRight],["center",um.alignCenter],["justify",um.alignJustify]]);class Bf extends Qo{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"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t,n=Pf(e.config.get("alignment.options"));n.map((e=>e.name)).filter(Ef).forEach((e=>this._addButton(e))),t.add("alignment",(s=>{const o=Am(s);xm(o,(()=>n.map((e=>t.create(`alignment:${e.name}`)))),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:i("Text alignment toolbar")}),o.buttonView.set({label:i("Text alignment"),tooltip:!0}),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const r="rtl"===s.contentLanguageDirection?Of.get("right"):Of.get("left"),a=e.commands.get("alignment");return o.buttonView.bind("icon").to(a,"value",(e=>Of.get(e)||r)),o.bind("isEnabled").to(a,"isEnabled"),this.listenTo(o,"execute",(()=>{e.editing.view.focus()})),o}))}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,(i=>{const n=t.commands.get("alignment"),s=new lo(i);return s.set({label:this.localizedOptionTitles[e],icon:Of.get(e),tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(n),s.bind("isOn").to(n,"value",(t=>t===e)),this.listenTo(s,"execute",(()=>{t.execute("alignment",{value:e}),t.editing.view.focus()})),s}))}}class Mf{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class Nf extends Xo{constructor(e,t){super(e),this._buffer=new Mf(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,i=t.document,n=e.text||"",s=n.length;let o=i.selection;if(e.selection?o=e.selection:e.range&&(o=t.createSelection(e.range)),!t.canEditAt(o))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock();const a=Array.from(i.selection.getAttributes());t.deleteContent(o),n&&t.insertContent(e.createText(n,a),o),r?e.setSelection(r):o.is("documentSelection")||e.setSelection(o),this._buffer.unlock(),this._buffer.input(s)}))}}const Ff=["insertText","insertReplacementText"];class Df extends Il{constructor(e){super(e),this.focusObserver=e.getObserver(oc),l.isAndroid&&Ff.push("insertCompositionText");const t=e.document;t.on("beforeinput",((i,n)=>{if(!this.isEnabled)return;const{data:s,targetRanges:o,inputType:r,domEvent:a}=n;if(!Ff.includes(r))return;this.focusObserver.flush();const l=new f(t,"insertText");t.fire(l,new Rl(e,a,{text:s,selection:e.createSelection(o)})),l.stop.called&&i.stop()})),t.on("compositionend",((i,{data:n,domEvent:s})=>{this.isEnabled&&!l.isAndroid&&n&&t.fire("insertText",new Rl(e,s,{text:n,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class Lf extends Qo{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,i=e.editing.view,n=t.document.selection;i.addObserver(Df);const s=new Nf(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",s),e.commands.add("input",s),this.listenTo(i.document,"insertText",((n,s)=>{i.document.isComposing||s.preventDefault();const{text:o,selection:r,resultRange:a}=s,c=Array.from(r.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=o;if(l.isAndroid){const e=Array.from(c[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),c[0].start=c[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(c[0].start=c[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:t.createSelection(c)};a&&(h.resultRange=e.editing.mapper.toModelRange(a)),e.execute("insertText",h),i.scrollToTheSelection()})),l.isAndroid?this.listenTo(i.document,"keydown",((e,o)=>{!n.isCollapsed&&229==o.keyCode&&i.document.isComposing&&zf(t,s)})):this.listenTo(i.document,"compositionstart",(()=>{n.isCollapsed||zf(t,s)}))}}function zf(e,t){if(!t.isEnabled)return;const i=t.buffer;i.lock(),e.enqueueChange(i.batch,(()=>{e.deleteContent(e.document.selection)})),i.unlock()}class Hf extends Xo{constructor(e,t){super(e),this.direction=t,this._buffer=new Mf(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,i=t.document;t.enqueueChange(this._buffer.batch,(n=>{this._buffer.lock();const s=n.createSelection(e.selection||i.selection);if(!t.canEditAt(s))return;const o=e.sequence||1,r=s.isCollapsed;if(s.isCollapsed&&t.modifySelection(s,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(o))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(s,o))return void this.editor.execute("paragraph",{selection:s});if(s.isCollapsed)return;let a=0;s.getFirstRange().getMinimalFlatRanges().forEach((e=>{a+=ee(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(s,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(a),n.setSelection(s),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const s=n.getChild(0);return!s||!s.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i),s=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(s,n),e.setSelection(s,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const i=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const n=e.getFirstPosition(),s=i.schema.getLimitElement(n),o=s.getChild(0);return n.parent==o&&(!!e.containsEntireContent(o)&&(!!i.schema.checkChild(s,"paragraph")&&"paragraph"!=o.name))}}const $f="word",Wf="selection",jf="backward",Uf="forward",qf={deleteContent:{unit:Wf,direction:jf},deleteContentBackward:{unit:"codePoint",direction:jf},deleteWordBackward:{unit:$f,direction:jf},deleteHardLineBackward:{unit:Wf,direction:jf},deleteSoftLineBackward:{unit:Wf,direction:jf},deleteContentForward:{unit:"character",direction:Uf},deleteWordForward:{unit:$f,direction:Uf},deleteHardLineForward:{unit:Wf,direction:Uf},deleteSoftLineForward:{unit:Wf,direction:Uf}};class Gf extends Il{constructor(e){super(e);const t=e.document;let i=0;t.on("keydown",(()=>{i++})),t.on("keyup",(()=>{i=0})),t.on("beforeinput",((n,s)=>{if(!this.isEnabled)return;const{targetRanges:o,domEvent:r,inputType:a}=s,c=qf[a];if(!c)return;const d={direction:c.direction,unit:c.unit,sequence:i};d.unit==Wf&&(d.selectionToRemove=e.createSelection(o[0])),"deleteContentBackward"===a&&(l.isAndroid&&(d.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let i=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,n=e.offset;if(Rs(t,n)||Os(t,n)||Ms(t,n))continue;i++}else i++;if(i>1)return!0}return!1}(o)&&(d.unit=Wf,d.selectionToRemove=e.createSelection(o)));const h=new Pa(t,"delete",o[0]);t.fire(h,new Rl(e,r,d)),h.stop.called&&n.stop()})),l.isBlink&&function(e){const t=e.view,i=t.document;let n=null,s=!1;function o(e){return e==fs.backspace||e==fs.delete}function r(e){return e==fs.backspace?jf:Uf}i.on("keydown",((e,{keyCode:t})=>{n=t,s=!1})),i.on("keyup",((a,{keyCode:l,domEvent:c})=>{const d=i.selection,h=e.isEnabled&&l==n&&o(l)&&!d.isCollapsed&&!s;if(n=null,h){const e=d.getFirstRange(),n=new Pa(i,"delete",e),s={unit:Wf,direction:r(l),selectionToRemove:d};i.fire(n,new Rl(t,c,s))}})),i.on("beforeinput",((e,{inputType:t})=>{const i=qf[t];o(n)&&i&&i.direction==r(n)&&(s=!0)}),{priority:"high"}),i.on("beforeinput",((e,{inputType:t,data:i})=>{n==fs.delete&&"insertText"==t&&""==i&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class Kf extends Qo{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,i=t.document,n=e.model.document;t.addObserver(Gf),this._undoOnBackspace=!1;const s=new Hf(e,"forward");e.commands.add("deleteForward",s),e.commands.add("forwardDelete",s),e.commands.add("delete",new Hf(e,"backward")),this.listenTo(i,"delete",((n,s)=>{i.isComposing||s.preventDefault();const{direction:o,sequence:r,selectionToRemove:a,unit:l}=s,c="forward"===o?"deleteForward":"delete",d={sequence:r};if("selection"==l){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=l;e.execute(c,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(i,"delete",((t,i)=>{this._undoOnBackspace&&"backward"==i.direction&&1==i.sequence&&"codePoint"==i.unit&&(this._undoOnBackspace=!1,e.execute("undo"),i.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(n,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Jf extends Qo{static get requires(){return[Lf,Kf]}static get pluginName(){return"Typing"}}function Zf(e,t){let i=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce(((e,{item:n})=>n.is("$text")||n.is("$textProxy")?e+n.data:(i=t.createPositionAfter(n),"")),""),range:t.createRange(i,e.end)}}class Qf extends(G()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:i})=>{i&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const i=this.model,n=i.document.selection,s=i.createRange(i.createPositionAt(n.focus.parent,0),n.focus),{text:o,range:r}=Zf(s,i),a=this.testCallback(o);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const i=Object.assign(t,{text:o,range:r});"object"==typeof a&&Object.assign(i,a),this.fire(`matched:${e}`,i)}}}class Yf extends Qo{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,i=e.editing.view,n=e.locale,s=t.document.selection;this.listenTo(i.document,"arrowKey",((e,t)=>{if(!s.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const i=t.keyCode==fs.arrowright,o=t.keyCode==fs.arrowleft;if(!i&&!o)return;const r=n.contentLanguageDirection;let a=!1;a="ltr"===r&&i||"rtl"===r&&o?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this.listenTo(s,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&sp(s.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,s=n.getFirstPosition();return!this._isGravityOverridden&&((!s.isAtStart||!Xf(n,t))&&(!!sp(s,t)&&(ip(e),Xf(n,t)&&sp(s,t,!0)?tp(i,t):this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,s=n.getFirstPosition();return this._isGravityOverridden?(ip(e),this._restoreGravity(),sp(s,t,!0)?tp(i,t):ep(i,t,s),!0):s.isAtStart?!!Xf(n,t)&&(ip(e),ep(i,t,s),!0):!Xf(n,t)&&sp(s,t,!0)?(ip(e),ep(i,t,s),!0):!!np(s,t)&&(s.isAtEnd&&!Xf(n,t)&&sp(s,t)?(ip(e),ep(i,t,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view.document;e.editing.view.addObserver(fu);let s=!1;this.listenTo(n,"mousedown",(()=>{s=!0})),this.listenTo(n,"selectionChange",(()=>{const e=this.attributes;if(!s)return;if(s=!1,!i.isCollapsed)return;if(!Xf(i,e))return;const n=i.getFirstPosition();sp(n,e)&&(n.isAtStart||sp(n,e,!0)?tp(t,e):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,i=this.attributes;this.listenTo(e,"insertContent",(()=>{const n=t.getFirstPosition();Xf(t,i)&&sp(n,i)&&tp(e,i)}),{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view;let s=!1,o=!1;this.listenTo(n.document,"delete",((e,t)=>{s="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{if(!s)return;const e=i.getFirstPosition();o=Xf(i,this.attributes)&&!np(e,this.attributes)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{s&&(s=!1,o||e.model.enqueueChange((()=>{const e=i.getFirstPosition();Xf(i,this.attributes)&&sp(e,this.attributes)&&(e.isAtStart||sp(e,this.attributes,!0)?tp(t,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function Xf(e,t){for(const i of t)if(e.hasAttribute(i))return!0;return!1}function ep(e,t,i){const n=i.nodeBefore;e.change((i=>{if(n){const t=[],s=e.schema.isObject(n)&&e.schema.isInline(n);for(const[i,o]of n.getAttributes())!e.schema.checkAttribute("$text",i)||s&&!1===e.schema.getAttributeProperties(i).copyFromObject||t.push([i,o]);i.setSelectionAttribute(t)}else i.removeSelectionAttribute(t)}))}function tp(e,t){e.change((e=>{e.removeSelectionAttribute(t)}))}function ip(e){e.preventDefault()}function np(e,t){return sp(e.getShiftedBy(-1),t)}function sp(e,t,i=!1){const{nodeBefore:n,nodeAfter:s}=e;for(const e of t){const t=n?n.getAttribute(e):void 0,o=s?s.getAttribute(e):void 0;if((!i||void 0!==t&&void 0!==o)&&o!==t)return!0}return!1}const op={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:hp('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:hp("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:hp("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:hp('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:hp('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:hp("'"),to:[null,"‚",null,"’"]}},rp={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},ap=["symbols","mathematical","typography","quotes"];function lp(e){return"string"==typeof e?new RegExp(`(${cf(e)})$`):e}function cp(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function dp(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function hp(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function up(e,t,i,n){return n.createRange(mp(e,t,i,!0,n),mp(e,t,i,!1,n))}function mp(e,t,i,n,s){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),r=null;for(;o&&o.getAttribute(t)==i;)r=o,o=n?o.previousSibling:o.nextSibling;return r?s.createPositionAt(r,n?"before":"after"):e}function gp(e,t,i,n){const s=e.editing.view,o=new Set;s.document.registerPostFixer((s=>{const r=e.model.document.selection;let a=!1;if(r.hasAttribute(t)){const l=up(r.getFirstPosition(),t,r.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",i)&&!e.hasClass(n)&&(s.addClass(n,e),o.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){s.change((e=>{for(const t of o.values())e.removeClass(n,t),o.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}function fp(e,t,i,n){let s,o=null;"function"==typeof n?s=n:(o=e.commands.get(n),s=()=>{e.execute(n)}),e.model.document.on("change:data",((r,a)=>{if(o&&!o.isEnabled||!t.isEnabled)return;const l=Es(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const h=d.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(o&&!0===o.value)return;const u=h.getChild(0),m=e.model.createRangeOn(u);if(!m.containsRange(l)&&!l.end.isEqual(m.end))return;const g=i.exec(u.data.substr(0,l.end.offset));g&&e.model.enqueueChange((t=>{const i=t.createPositionAt(h,0),n=t.createPositionAt(h,g[0].length),o=new Wc(i,n);if(!1!==s({match:g})){t.remove(o);const i=e.model.document.selection.getFirstRange(),n=t.createRangeIn(h);!h.isEmpty||n.isEqual(i)||n.containsRange(i,!0)||t.remove(h)}o.detach(),e.model.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function pp(e,t,i,n){let s,o;i instanceof RegExp?s=i:o=i,o=o||(e=>{let t;const i=[],n=[];for(;null!==(t=s.exec(e))&&!(t&&t.length<4);){let{index:e,1:s,2:o,3:r}=t;const a=s+o+r;e+=t[0].length-a.length;const l=[e,e+s.length],c=[e+s.length+o.length,e+s.length+o.length+r.length];i.push(l),i.push(c),n.push([e+s.length,e+s.length+o.length])}return{remove:i,format:n}}),e.model.document.on("change:data",((i,s)=>{if(s.isUndo||!s.isLocal||!t.isEnabled)return;const r=e.model,a=r.document.selection;if(!a.isCollapsed)return;const l=Array.from(r.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,h=d.parent,{text:u,range:m}=function(e,t){let i=e.start;const n=Array.from(e.getItems()).reduce(((e,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(i=t.createPositionAfter(n),""):e+n.data),"");return{text:n,range:t.createRange(i,e.end)}}(r.createRange(r.createPositionAt(h,0),d),r),g=o(u),f=bp(m.start,g.format,r),p=bp(m.start,g.remove,r);f.length&&p.length&&r.enqueueChange((t=>{if(!1!==n(t,f)){for(const e of p.reverse())t.remove(e);r.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function bp(e,t,i){return t.filter((e=>void 0!==e[0]&&void 0!==e[1])).map((t=>i.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1]))))}function wp(e,t){return(i,n)=>{if(!e.commands.get(t).isEnabled)return!1;const s=e.model.schema.getValidRanges(n,t);for(const e of s)i.setAttribute(t,!0,e);i.removeSelectionAttribute(t)}}class vp extends Xo{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const s=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of s)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const _p="bold";class yp extends Qo{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:_p}),e.model.schema.setAttributeProperties(_p,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:_p,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(_p,new vp(e,_p)),e.keystrokes.set("CTRL+B",_p)}}const kp="bold";class Cp extends Qo{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(kp,(i=>{const n=e.commands.get(kp),s=new lo(i);return s.set({label:t("Bold"),icon:um.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(kp),e.editing.view.focus()})),s}))}}const Ap="code";class xp extends Qo{static get pluginName(){return"CodeEditing"}static get requires(){return[Yf]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Ap}),e.model.schema.setAttributeProperties(Ap,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:Ap,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(Ap,new vp(e,Ap)),e.plugins.get(Yf).registerAttribute(Ap),gp(e,Ap,"code","ck-code_selected")}}const Tp="code";class Ep extends Qo{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Tp,(i=>{const n=e.commands.get(Tp),s=new lo(i);return s.set({label:t("Code"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>',tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(Tp),e.editing.view.focus()})),s}))}}const Sp="italic";class Pp extends Qo{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Sp}),e.model.schema.setAttributeProperties(Sp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Sp,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Sp,new vp(e,Sp)),e.keystrokes.set("CTRL+I",Sp)}}const Ip="italic";class Vp extends Qo{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Ip,(i=>{const n=e.commands.get(Ip),s=new lo(i);return s.set({label:t("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(Ip),e.editing.view.focus()})),s}))}}const Rp="strikethrough";class Op extends Qo{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Rp}),e.model.schema.setAttributeProperties(Rp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Rp,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(Rp,new vp(e,Rp)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const Bp="strikethrough";class Mp extends Qo{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Bp,(i=>{const n=e.commands.get(Bp),s=new lo(i);return s.set({label:t("Strikethrough"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(Bp),e.editing.view.focus()})),s}))}}const Np="underline";class Fp extends Qo{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Np}),e.model.schema.setAttributeProperties(Np,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Np,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(Np,new vp(e,Np)),e.keystrokes.set("CTRL+U","underline")}}const Dp="underline";class Lp extends Qo{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Dp,(i=>{const n=e.commands.get(Dp),s=new lo(i);return s.set({label:t("Underline"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(Dp),e.editing.view.focus()})),s}))}}function*zp(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class Hp extends Xo{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,i=t.document.selection,n=t.schema,s=i.isCollapsed,o=i.getFirstRange(),r=o.start.parent,a=o.end.parent;if(n.isLimit(r)||n.isLimit(a))return s||r!=a||t.deleteContent(i),!1;if(s){const t=zp(e.model.schema,i.getAttributes());return $p(e,o.start),e.setSelectionAttribute(t),!0}{const n=!(o.start.isAtStart&&o.end.isAtEnd),s=r==a;if(t.deleteContent(i,{leaveUnmerged:n}),n){if(s)return $p(e,i.focus),!0;e.setSelection(a,0)}}return!1}}function $p(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const Wp={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class jp extends Il{constructor(e){super(e);const t=this.document;let i=!1;t.on("keydown",((e,t)=>{i=t.shiftKey})),t.on("beforeinput",((n,s)=>{if(!this.isEnabled)return;let o=s.inputType;l.isSafari&&i&&"insertParagraph"==o&&(o="insertLineBreak");const r=s.domEvent,a=Wp[o];if(!a)return;const c=new Pa(t,"enter",s.targetRanges[0]);t.fire(c,new Rl(e,r,{isSoft:a.isSoft})),c.stop.called&&n.stop()}))}observe(){}stopObserving(){}}class Up extends Qo{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,i=t.document;t.addObserver(jp),e.commands.add("enter",new Hp(e)),this.listenTo(i,"enter",((n,s)=>{i.isComposing||s.preventDefault(),s.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class qp extends Xo{execute(){const e=this.editor.model,t=e.document;e.change((i=>{!function(e,t,i){const n=i.isCollapsed,s=i.getFirstRange(),o=s.start.parent,r=s.end.parent,a=o==r;if(n){const n=zp(e.schema,i.getAttributes());Gp(e,t,s.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(s.start.isAtStart&&s.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:n}),a?Gp(e,t,i.focus):n&&t.setSelection(r,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const n=t.getFirstRange(),s=n.start.parent,o=n.end.parent;if((Kp(s,e)||Kp(o,e))&&s!==o)return!1;return!0}(e.schema,t.selection)}}function Gp(e,t,i){const n=t.createElement("softBreak");e.insertContent(n,i),t.setSelection(n,"after")}function Kp(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Kp(e.parent,t))}class Jp extends Qo{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,i=e.conversion,n=e.editing.view,s=n.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(jp),e.commands.add("shiftEnter",new qp(e)),this.listenTo(s,"enter",((t,i)=>{s.isComposing||i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())}),{priority:"low"})}}class Zp extends Xo{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.schema,n=t.document.selection,s=Array.from(n.getSelectedBlocks()),o=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(o){const t=s.filter((e=>Qp(e)||Xp(i,e)));this._applyQuote(e,t)}else this._removeQuote(e,s.filter(Qp))}))}_getValue(){const e=Es(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!Qp(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=Es(e.getSelectedBlocks());return!!i&&Xp(t,i)}_removeQuote(e,t){Yp(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const i=e.createPositionBefore(t.start.parent);return void e.move(t,i)}t.end.isAtEnd||e.split(t.end);const i=e.createPositionAfter(t.end.parent);e.move(t,i)}))}_applyQuote(e,t){const i=[];Yp(e,t).reverse().forEach((t=>{let n=Qp(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),i.push(n)})),i.reverse().reduce(((t,i)=>t.nextSibling==i?(e.merge(e.createPositionAfter(t)),t):i))}}function Qp(e){return"blockQuote"==e.parent.name?e.parent:null}function Yp(e,t){let i,n=0;const s=[];for(;n<t.length;){const o=t[n],r=t[n+1];i||(i=e.createPositionBefore(o)),r&&o.nextSibling==r||(s.push(e.createRange(i,e.createPositionAfter(o))),i=null),n++}return s}function Xp(e,t){const i=e.checkChild(t.parent,"blockQuote"),n=e.checkChild(["$root","blockQuote"],t);return i&&n}class eb extends Qo{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[Up,Kf]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new Zp(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer((i=>{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 i.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return i.unwrap(n),!0;if(n.is("element")){const e=i.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(i.createPositionBefore(n),n))return i.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return i.remove(t),!0}return!1}));const i=this.editor.editing.view.document,n=e.model.document.selection,s=e.commands.get("blockQuote");this.listenTo(i,"enter",((t,i)=>{if(!n.isCollapsed||!s.value)return;n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(i,"delete",((t,i)=>{if("backward"!=i.direction||!n.isCollapsed||!s.value)return;const o=n.getLastPosition().parent;o.isEmpty&&!o.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"})}}class tb extends Qo{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",(i=>{const n=e.commands.get("blockQuote"),s=new lo(i);return s.set({label:t("Block quote"),icon:um.quote,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),s}))}}class ib extends Ol{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function i(e){return(i,n)=>{n.preventDefault();const s=n.dropRange?[n.dropRange]:null,o=new f(t,e);t.fire(o,{dataTransfer:n.dataTransfer,method:i.name,targetRanges:s,target:n.target,domEvent:n.domEvent}),o.stop.called&&n.stopPropagation()}}this.listenTo(t,"paste",i("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",i("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",i("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,i="drop"==e.type||"paste"==e.type,n={dataTransfer:new lc(t,{cacheFiles:i})};"drop"!=e.type&&"dragover"!=e.type||(n.dropRange=function(e,t){const i=t.target.ownerDocument,n=t.clientX,s=t.clientY;let o;i.caretRangeFromPoint&&i.caretRangeFromPoint(n,s)?o=i.caretRangeFromPoint(n,s):t.rangeParent&&(o=i.createRange(),o.setStart(t.rangeParent,t.rangeOffset),o.collapse(!0));if(o)return e.domConverter.domRangeToView(o);return null}(this.view,e)),this.fire(e.type,e,n)}}const nb=["figcaption","li"],sb=["ol","ul"];function ob(e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return"\n";let t="",i=null;for(const n of e.getChildren())t+=rb(n,i)+ob(n),i=n;return t}function rb(e,t){return t?e.is("element","li")&&!e.isEmpty&&e.getChild(0).is("containerElement")||sb.includes(e.name)&&sb.includes(t.name)?"\n\n":e.is("containerElement")||t.is("containerElement")?nb.includes(e.name)||nb.includes(t.name)?"\n":"\n\n":"":""}class ab extends Qo{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(ib),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,i){const n=this.editor.model.getSelectedContent(t);this.fire("outputTransformation",{dataTransfer:e,content:n,method:i})}_setupPasteDrop(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document;this.listenTo(n,"clipboardInput",((t,i)=>{"paste"!=i.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(n,"clipboardInput",((e,t)=>{const n=t.dataTransfer;let s;if(t.content)s=t.content;else{let e="";n.getData("text/html")?e=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(/<!--[\s\S]*?-->/g,"")}(n.getData("text/html")):n.getData("text/plain")&&(((o=(o=n.getData("text/plain")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).includes("</p><p>")||o.includes("<br>"))&&(o=`<p>${o}</p>`),e=o),s=this.editor.data.htmlProcessor.toView(e)}var o;const r=new f(this,"inputTransformation");this.fire(r,{content:s,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),r.stop.called&&e.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,i)=>{if(i.content.isEmpty)return;const n=this.editor.data.toModel(i.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:n,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,i)=>{i.resultRange=t.insertContent(i.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,i=e.editing.view.document,n=(e,i)=>{const n=i.dataTransfer;i.preventDefault(),this._fireOutputTransformationEvent(n,t.selection,e.name)};this.listenTo(i,"copy",n,{priority:"low"}),this.listenTo(i,"cut",((t,i)=>{e.model.canEditAt(e.model.document.selection)?n(t,i):i.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,n)=>{const s=e.data.toView(n.content);i.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:s,method:n.method})}),{priority:"low"}),this.listenTo(i,"clipboardOutput",((i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",ob(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}class lb extends(V()){constructor(){super(...arguments),this._stack=[]}add(e,t){const i=this._stack,n=i[0];this._insertDescriptor(e);const s=i[0];n===s||cb(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:t})}remove(e,t){const i=this._stack,n=i[0];this._removeDescriptor(e);const s=i[0];n===s||cb(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex((t=>t.id===e.id));if(cb(e,t[i]))return;i>-1&&t.splice(i,1);let n=0;for(;t[n]&&db(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex((t=>t.id===e));i>-1&&t.splice(i,1)}}function cb(e,t){return e&&t&&e.priority==t.priority&&hb(e.classes)==hb(t.classes)}function db(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&hb(e.classes)>hb(t.classes)}function hb(e){return Array.isArray(e)?e.sort().join(","):e}const ub='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',mb="ck-widget",gb="ck-widget_selected";function fb(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function pb(e,t,i={}){if(!e.is("containerElement"))throw new y("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(mb,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=kb,t.setCustomProperty("widgetLabel",[],e),i.label&&function(e,t){const i=e.getCustomProperty("widgetLabel");i.push(t)}(e,i.label),i.hasSelectionHandle&&function(e,t){const i=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),i=new ro;return i.set("content",ub),i.render(),t.appendChild(i.element),t}));t.insert(t.createPositionAt(e,0),i),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),vb(e,t),e}function bb(e,t,i){if(t.classes&&i.addClass(ys(t.classes),e),t.attributes)for(const n in t.attributes)i.setAttribute(n,t.attributes[n],e)}function wb(e,t,i){if(t.classes&&i.removeClass(ys(t.classes),e),t.attributes)for(const n in t.attributes)i.removeAttribute(n,e)}function vb(e,t,i=bb,n=wb){const s=new lb;s.on("change:top",((t,s)=>{s.oldDescriptor&&n(e,s.oldDescriptor,s.writer),s.newDescriptor&&i(e,s.newDescriptor,s.writer)}));t.setCustomProperty("addHighlight",((e,t,i)=>s.add(t,i)),e),t.setCustomProperty("removeHighlight",((e,t,i)=>s.remove(t,i)),e)}function _b(e,t,i={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),i.label&&t.setAttribute("aria-label",i.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((i,n,s)=>{t.setAttribute("contenteditable",s?"false":"true",e)})),e.on("change:isFocused",((i,n,s)=>{s?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),vb(e,t),e}function yb(e,t){const i=e.getSelectedElement();if(i){const n=xb(e);if(n)return t.createRange(t.createPositionAt(i,n))}return ou(e,t)}function kb(){return null}const Cb="widget-type-around";function Ab(e,t,i){return!!e&&fb(e)&&!i.isInline(t)}function xb(e){return e.getAttribute(Cb)}const Tb=["before","after"],Eb=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,Sb="ck-widget__type-around_disabled";class Pb extends Qo{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[Up,Kf]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((i,n,s)=>{t.change((e=>{for(const i of t.document.roots)s?e.removeClass(Sb,i):e.addClass(Sb,i)})),s||e.model.change((e=>{e.removeSelectionAttribute(Cb)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,n=i.editing.view,s=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:s}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,i,n){this.listenTo(e,t,((...e)=>{this.isEnabled&&i(...e)}),n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=xb(e);if(!t)return!1;const i=e.getSelectedElement();return this._insertParagraph(i,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,n={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,s,o)=>{const r=o.mapper.toViewElement(s.item);if(r&&Ab(r,s.item,t)){!function(e,t,i){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const i=this.toDomElement(e);return function(e,t){for(const i of Tb){const n=new Ds({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${i}`],title:t[i],"aria-hidden":"true"},children:[e.ownerDocument.importNode(Eb,!0)]});e.appendChild(n.render())}}(i,t),function(e){const t=new Ds({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(i),i}));e.insert(e.createPositionAt(i,"end"),n)}(o.writer,n,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,n=t.schema,s=e.editing.view;function o(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(s.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[fb,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",((t,i)=>{i.directChange&&e.model.change((e=>{e.removeSelectionAttribute(Cb)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=i.getSelectedElement();if(t){if(Ab(e.editing.mapper.toViewElement(t),t,n))return}e.model.change((e=>{e.removeSelectionAttribute(Cb)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,i)=>{const s=i.writer;if(this._currentFakeCaretModelElement){const e=i.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(s.removeClass(Tb.map(o),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=i.mapper.toViewElement(r);if(!Ab(a,r,n))return;const l=xb(t.selection);l&&(s.addClass(o(l),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,i,n)=>{n||e.model.change((e=>{e.removeSelectionAttribute(Cb)}))}))}_handleArrowKeyPress(e,t){const i=this.editor,n=i.model,s=n.document.selection,o=n.schema,r=i.editing.view,a=function(e,t){const i=_s(e,t);return"down"===i||"right"===i}(t.keyCode,i.locale.contentLanguageDirection),l=r.document.selection.getSelectedElement();let c;Ab(l,i.editing.mapper.toModelElement(l),o)?c=this._handleArrowKeyPressOnSelectedWidget(a):s.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,i=xb(t.document.selection);return t.change((t=>{if(!i)return t.setSelectionAttribute(Cb,e?"after":"before"),!0;if(!(i===(e?"after":"before")))return t.removeSelectionAttribute(Cb),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,n=i.schema,s=t.plugins.get("Widget"),o=s._getObjectElementNextToSelection(e);return!!Ab(t.editing.mapper.toViewElement(o),o,n)&&(i.change((t=>{s._setSelectionOverElement(o),t.setSelectionAttribute(Cb,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,n=i.schema,s=t.editing.mapper,o=i.document.selection,r=e?o.getLastPosition().nodeBefore:o.getFirstPosition().nodeAfter;return!!Ab(s.toViewElement(r),r,n)&&(i.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(Cb,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((i,n)=>{const s=n.domTarget.closest(".ck-widget__type-around__button");if(!s)return;const o=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(s),r=function(e,t){const i=e.closest(".ck-widget");return t.mapDomToView(i)}(s,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,o),n.preventDefault(),i.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",((i,n)=>{if("atTarget"!=i.eventPhase)return;const s=t.getSelectedElement(),o=e.editing.mapper.toViewElement(s),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Ab(o,s,r)&&(this._insertParagraph(s,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),i.stop())}),{context:fb})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,i)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(i.selection=e.selection)}),{priority:"high"}),l.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,n=i.schema;this._listenToIfEnabled(t.document,"delete",((t,s)=>{if("atTarget"!=t.eventPhase)return;const o=xb(i.document.selection);if(!o)return;const r=s.direction,a=i.document.selection.getSelectedElement(),l="forward"==r;if("before"===o===l)e.execute("delete",{selection:i.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(i.createPositionAt(a,o),r);if(t)if(t.isCollapsed){const s=i.createSelection(t.start);if(i.modifySelection(s,{direction:r}),s.focus.isEqual(t.start)){const e=function(e,t){let i=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;i=n}return i}(n,t.start.parent);i.deleteContent(i.createSelection(e,"on"),{doNotAutoparagraph:!0})}else i.change((i=>{i.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else i.change((i=>{i.setSelection(t),e.execute(l?"deleteForward":"delete")}))}s.preventDefault(),t.stop()}),{context:fb})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[n,s])=>{if(s&&!s.is("documentSelection"))return;const o=xb(i);return o?(e.stop(),t.change((e=>{const s=i.getSelectedElement(),r=t.createPositionAt(s,o),a=e.createSelection(r),l=t.insertContent(n,a);return e.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,i)=>{const[,n,s={}]=i;if(n&&!n.is("documentSelection"))return;const o=xb(t);o&&(s.findOptimalPosition=o,i[3]=s)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[i])=>{if(i&&!i.is("documentSelection"))return;xb(t)&&e.stop()}),{priority:"high"})}}function Ib(e){const t=e.model;return(i,n)=>{const s=n.keyCode==fs.arrowup,o=n.keyCode==fs.arrowdown,r=n.shiftKey,a=t.document.selection;if(!s&&!o)return;const l=o;if(r&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,i){const n=e.model;if(i){const e=t.isCollapsed?t.focus:t.getLastPosition(),i=Vb(n,e,"forward");if(!i)return null;const s=n.createRange(e,i),o=Rb(n.schema,s,"backward");return o?n.createRange(e,o):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),i=Vb(n,e,"backward");if(!i)return null;const s=n.createRange(i,e),o=Rb(n.schema,s,"forward");return o?n.createRange(o,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(r)return}(c.isCollapsed||function(e,t,i){const n=e.model,s=e.view.domConverter;if(i){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const o=e.mapper.toViewRange(t),r=s.viewRangeToDom(o),a=Hn.getDomRangeRects(r);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change((e=>{const i=l?c.end:c.start;if(r){const n=t.createSelection(a.anchor);n.setFocus(i),e.setSelection(n)}else e.setSelection(i)})),i.stop(),n.preventDefault(),n.stopPropagation())}}}function Vb(e,t,i){const n=e.schema,s=e.createRangeIn(t.root),o="forward"==i?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of s.getWalker({startPosition:t,direction:i})){if(n.isLimit(r)&&!n.isInline(r))return e;if(a==o&&n.isBlock(r))return null}return null}function Rb(e,t,i){const n="backward"==i?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:i}))if(e.checkChild(n,"$text"))return n;return null}class Ob extends Qo{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Pb,Kf]}init(){const e=this.editor,t=e.editing.view,i=t.document;this.editor.editing.downcastDispatcher.on("selection",((t,i,n)=>{const s=n.writer,o=i.selection;if(o.isCollapsed)return;const r=o.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);var l;fb(a)&&(n.consumable.consume(o,"selection")&&s.setSelection(s.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((e,t,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,s=n.document.selection;let o=null;for(const e of s.getRanges())for(const t of e){const e=t.item;fb(e)&&!Bb(e,o)&&(n.addClass(gb,e),this._previouslySelected.add(e),o=e)}}),{priority:"low"}),t.addObserver(fu),this.listenTo(i,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(i,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[fb,"$text"]}),this.listenTo(i,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(i,"arrowKey",Ib(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const i=this.editor,n=i.editing.view,s=n.document;let o=t.target;if(t.domEvent.detail>=3)return void(this._selectBlockContent(o)&&t.preventDefault());if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(fb(t))return!1;t=t.parent}return!1}(o))return;if(!fb(o)&&(o=o.findAncestor(fb),!o))return;l.isAndroid&&t.preventDefault(),s.isFocused||n.focus();const r=i.editing.mapper.toModelElement(o);this._setSelectionOverElement(r)}_selectBlockContent(e){const t=this.editor,i=t.model,n=t.editing.mapper,s=i.schema,o=n.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),r=function(e,t){for(const i of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(i,"$text"))return i;if(t.isLimit(i)&&!t.isObject(i))break}return null}(n.toModelElement(o),i.schema);return!!r&&(i.change((e=>{const t=s.isLimit(r)?null:function(e,t){const i=new yc({startPosition:e});for(const{item:e}of i){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(r),s),i=e.createPositionAt(r,0),n=t?e.createPositionAt(t,0):e.createPositionAt(r,"end");e.setSelection(e.createRange(i,n))})),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,n=this.editor.model,s=n.schema,o=n.document.selection,r=o.getSelectedElement(),a=_s(i,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(r&&s.isObject(r)){const i=l?o.getLastPosition():o.getFirstPosition(),r=s.getNearestSelectionRange(i,l?"forward":"backward");return void(r&&(n.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!o.isCollapsed&&!t.shiftKey){const i=o.getFirstPosition(),r=o.getLastPosition(),a=i.nodeAfter,c=r.nodeBefore;return void((a&&s.isObject(a)||c&&s.isObject(c))&&(n.change((e=>{e.setSelection(l?r:i)})),t.preventDefault(),e.stop()))}if(!o.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&s.isObject(d)){if(s.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,n=i.schema,s=i.document.selection.getSelectedElement();s&&n.isObject(s)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);return i?(this.editor.model.change((e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(i)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,n=t.document.selection,s=t.createSelection(n);if(t.modifySelection(s,{direction:e?"forward":"backward"}),s.isEqual(n))return null;const o=e?s.focus.nodeBefore:s.focus.nodeAfter;return o&&i.isObject(o)?o:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(gb,t);this._previouslySelected.clear()}}function Bb(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class Mb extends Qo{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Yg]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!fb(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:n,balloonClassName:s="ck-toolbar-container"}){if(!i.length)return void k("widget-toolbar-no-items",{toolbarId:e});const o=this.editor,r=o.t,a=new fm(o.locale);if(a.ariaLabel=t||r("Widget toolbar"),this._toolbarDefinitions.has(e))throw new y("widget-toolbar-duplicated",this,{toolbarId:e});const l={view:a,getRelatedElement:n,balloonClassName:s,itemsConfig:i,initialized:!1};o.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const e=n(o.editing.view.document.selection);e&&this._showToolbar(l,e)},afterBlur:()=>{this._hideToolbar(l)}}),this._toolbarDefinitions.set(e,l)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const n of this._toolbarDefinitions.values()){const s=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&s)if(this.editor.ui.focusTracker.isFocused){const o=s.getAncestors().length;o>e&&(e=o,t=s,i=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?Nb(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:Fb(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);Nb(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function Nb(e,t){const i=e.plugins.get("ContextualBalloon"),n=Fb(e,t);i.updatePosition(n)}function Fb(e,t){const i=e.editing.view,n=Ag.defaultPositions;return{target:i.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class Db extends(G()){constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const n=new Hn(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)if(e.classList.contains(Lb(i)))return i}(e),this._referenceCoordinates=function(e,t){const i=new Hn(e),n=t.split("-"),s={x:"right"==n[1]?i.right:i.left,y:"bottom"==n[0]?i.bottom:i.top};return s.x+=e.ownerDocument.defaultView.scrollX,s.y+=e.ownerDocument.defaultView.scrollY,s}(t,function(e){const t=e.split("-"),i={top:"bottom",bottom:"top",left:"right",right:"left"};return`${i[t[0]]}-${i[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const s=i.style.width;s&&s.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(s):this._originalWidthPercents=function(e,t){const i=e.parentElement;let n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);const s=5;let o=0,r=i;for(;isNaN(n);){if(r=r.parentElement,++o>s)return 0;n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(r).width)}return t.width/n*100}(i,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Lb(e){return`ck-widget__resizer__handle-${e}`}class zb extends Fs{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,i,n)=>"px"===e.unit?`${t}×${i}`:`${n}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,i)=>t<50||i<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class Hb extends(G()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((i=>{const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const i=this.toDomElement(t);return e._appendHandles(i),e._appendSizeUI(i),i}));i.insert(i.createPositionAt(t,"end"),n),i.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new Db(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const i=this._options.unit||"%",n=("%"===i?t.widthPercents:t.width)+i;e.setStyle("width",n,this._options.viewElement)}));const i=this._getHandleHost(),n=new Hn(i),s=Math.round(n.width),o=Math.round(n.height),r=new Hn(i);t.width=Math.round(r.width),t.height=Math.round(r.height),this.redraw(n),this.state.update({...t,handleHostWidth:s,handleHostHeight:o})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((i=t)&&i.ownerDocument&&i.ownerDocument.contains(i)))return;var i;const n=t.parentElement,s=this._getHandleHost(),o=this._viewResizerWrapper,r=[o.getStyle("width"),o.getStyle("height"),o.getStyle("left"),o.getStyle("top")];let a;if(n.isSameNode(s)){const t=e||new Hn(s);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[s.offsetWidth+"px",s.offsetHeight+"px",s.offsetLeft+"px",s.offsetTop+"px"];"same"!==te(r,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},o)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,i={x:(n=e).pageX,y:n.pageY};var n;const s=!this._options.isCentered||this._options.isCentered(this),o={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};s&&t.activeHandlePosition.endsWith("-right")&&(o.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),s&&(o.x*=2);let r=Math.abs(t.originalWidth+o.x),a=Math.abs(t.originalHeight+o.y);return"width"==(r/t.aspectRatio>a?"width":"height")?a=r/t.aspectRatio:r=a*t.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new Ds({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(i=n,`ck-widget__resizer__handle-${i}`)}}).render());var i}_appendSizeUI(e){this._sizeView=new zb,this._sizeView.render(),e.appendChild(this._sizeView.element)}}class $b extends Qo{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=Mn.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(fu),this._observer=new(Vn()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=Ig((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(Mn.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",(()=>{const e=i.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new Hb(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const e=i.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;Hb.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}const Wb=Kn("px");class jb extends Fs{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",(e=>!e))],style:{left:e.to("left",(e=>Wb(e))),top:e.to("top",(e=>Wb(e))),width:e.to("width",(e=>Wb(e)))}}})}}class Ub extends Qo{constructor(){super(...arguments),this.removeDropMarkerDelayed=Vs((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=Ig((e=>this._updateDropMarker(e)),40),this._reconvertMarkerThrottled=Ig((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new jb,this._domEmitter=new(Vn()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,i,n,s,o){this.removeDropMarkerDelayed.cancel();const r=qb(this.editor,e,t,i,n,s,o);if(r)return o&&o.containsRange(r)?this.removeDropMarker():void this._updateDropMarkerThrottled(r)}getFinalDropRange(e,t,i,n,s,o){const r=qb(this.editor,e,t,i,n,s,o);return this.removeDropMarker(),r}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:i})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(i);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,i=t.model.markers;t.model.change((t=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}_updateDropTargetLine(e){const t=this.editor.editing,i=e.start.nodeBefore,n=e.start.nodeAfter,s=e.start.parent,o=i?t.mapper.toViewElement(i):null,r=o?t.view.domConverter.mapViewToDom(o):null,a=n?t.mapper.toViewElement(n):null,l=a?t.view.domConverter.mapViewToDom(a):null,c=t.mapper.toViewElement(s),d=t.view.domConverter.mapViewToDom(c),h=this._getScrollableRect(c),{scrollX:u,scrollY:m}=Mn.window,g=r?new Hn(r):null,f=l?new Hn(l):null,p=new Hn(d).excludeScrollbarsAndBorders(),b=g?g.bottom:p.top,w=f?f.top:p.bottom,v=Mn.window.getComputedStyle(d),_=b<=w?(b+w)/2:w;if(h.top<_&&_<h.bottom){const e=p.left+parseFloat(v.paddingLeft),t=p.right-parseFloat(v.paddingRight),i=Math.max(e+u,h.left),n=Math.min(t+u,h.right);this._dropTargetLineView.set({isVisible:!0,left:i,top:_+m,width:n-i})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let i;if(this._scrollables.has(t))i=this._scrollables.get(t).domElement;else{i=function(e){let t=e;do{t=t.parentElement;const e=Mn.window.getComputedStyle(t).overflowY;if("auto"==e||"scroll"==e)break}while("BODY"!=t.tagName);return t}(this.editor.editing.view.domConverter.mapViewToDom(e)),this._domEmitter.listenTo(i,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const n=new qn(i,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:i,resizeObserver:n})}return new Hn(i).excludeScrollbarsAndBorders()}}function qb(e,t,i,n,s,o,r){const a=e.model,l=e.editing.mapper;let c=Zb(e,t);for(;c;){if(!o)if(a.schema.checkChild(c,"$text")){if(i){const t=i[0].start,o=l.toModelPosition(t);if(!r||Array.from(r.getItems()).every((e=>a.schema.checkChild(o,e)))){if(a.schema.checkChild(o,"$text"))return a.createRange(o);if(t)return Kb(e,Zb(e,t.parent),n,s)}}}else if(a.schema.isInline(c))return Kb(e,c,n,s);if(a.schema.isBlock(c))return Kb(e,c,n,s);if(a.schema.checkChild(c,"$block")){const t=Array.from(c.getChildren()).filter((t=>t.is("element")&&!Gb(e,t)));let i=0,o=t.length;if(0==o)return a.createRange(a.createPositionAt(c,"end"));for(;i<o-1;){const r=Math.floor((i+o)/2);"before"==Jb(e,t[r],n,s)?o=r:i=r}return Kb(e,t[i],n,s)}c=c.parent}return null}function Gb(e,t){const i=e.editing.mapper,n=e.editing.view.domConverter,s=i.toViewElement(t),o=n.mapViewToDom(s);return"none"!=Mn.window.getComputedStyle(o).float}function Kb(e,t,i,n){const s=e.model;return s.createRange(s.createPositionAt(t,Jb(e,t,i,n)))}function Jb(e,t,i,n){const s=e.editing.mapper,o=e.editing.view.domConverter,r=s.toViewElement(t),a=o.mapViewToDom(r),l=new Hn(a);return e.model.schema.isInline(t)?i<(l.left+l.right)/2?"before":"after":n<(l.top+l.bottom)/2?"before":"after"}function Zb(e,t){const i=e.editing.mapper,n=e.editing.view,s=i.toModelElement(t);if(s)return s;const o=n.createPositionBefore(t),r=i.findMappedViewAncestor(o);return i.toModelElement(r)}class Qb extends Qo{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new(Vn())}static get pluginName(){return"DragDropBlockToolbar"}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),l.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(Mn.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(Mn.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(Mn.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&t.setAttribute("draggable","true"),this.on("change:isEnabled",((e,i,n)=>{t.setAttribute("draggable",n?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,i=t.document.selection,n=this.editor.editing.view,s=Array.from(i.getSelectedBlocks()),o=t.createRange(t.createPositionBefore(s[0]),t.createPositionAfter(s[s.length-1]));t.change((e=>e.setSelection(o))),this._isBlockDragging=!0,n.focus(),n.getObserver(ib).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),i=e.clientY,n=document.elementFromPoint(t,i),s=this.editor.editing.view;n&&n.closest(".ck-editor__editable")&&s.getObserver(ib).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:n,clientX:t,clientY:i,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}class Yb extends Qo{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=Vs((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new(Vn())}static get pluginName(){return"DragDrop"}static get requires(){return[ab,Ob,Ub,Qb]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(ib),t.addObserver(fu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,i)=>{i||this._finalizeDragging(!1)})),l.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document,s=e.plugins.get(Ub);this.listenTo(n,"dragstart",((e,i)=>{if(i.target&&i.target.is("editableElement"))return void i.preventDefault();if(this._prepareDraggedRange(i.target),!this._draggedRange)return void i.preventDefault();this._draggingUid=b(),i.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",i.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const n=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(i.dataTransfer,n,"dragstart");const{dataTransfer:s,domTarget:o,domEvent:r}=i,{clientX:a}=r;this._updatePreview({dataTransfer:s,domTarget:o,clientX:a}),i.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(n,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(Mn.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(n,"dragenter",(()=>{this.isEnabled&&i.focus()})),this.listenTo(n,"dragleave",(()=>{s.removeDropMarkerDelayed()})),this.listenTo(n,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:i,clientY:n}=t.domEvent;s.updateDropMarker(t.target,t.targetRanges,i,n,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),l.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get(Ub);this.listenTo(t,"clipboardInput",((t,n)=>{if("drop"!=n.method)return;const{clientX:s,clientY:o}=n.domEvent,r=i.getFinalDropRange(n.target,n.targetRanges,s,o,this._blockMode,this._draggedRange);if(!r)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==Xb(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0))return this._finalizeDragging(!1),void t.stop();n.targetRanges=[e.editing.mapper.toViewRange(r)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(ab);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(i)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i="move"==Xb(t.dataTransfer),n=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(n&&i)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,i=t.document;this.listenTo(i,"mousedown",((n,s)=>{if(l.isAndroid||!s)return;this._clearDraggableAttributesDelayed.cancel();let o=ew(s.target);if(l.isBlink&&!e.isReadOnly&&!o&&!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&fb(e)||(o=i.selection.editableElement)}o&&(t.change((e=>{e.setAttribute("draggable","true",o)})),this._draggableElement=e.editing.mapper.toModelElement(o))})),this.listenTo(i,"mouseup",(()=>{l.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,i=t.model;if(t.plugins.get(Ub).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&i.change((e=>{const t=i.createSelection(this._draggedRange);i.deleteContent(t,{doNotAutoparagraph:!0});const n=t.getFirstPosition().parent;n.isEmpty&&!i.schema.checkChild(n,"$text")&&i.schema.checkChild(n,"paragraph")&&e.insertElement("paragraph",n,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,i=t.model,n=i.document.selection,s=e?ew(e):null;if(s){const e=t.editing.mapper.toModelElement(s);if(this._draggedRange=Wc.fromRange(i.createRangeOn(e)),this._blockMode=i.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(n.isCollapsed&&!n.getFirstPosition().parent.isEmpty)return;const o=Array.from(n.getSelectedBlocks()),r=n.getFirstRange();if(0==o.length)return void(this._draggedRange=Wc.fromRange(r));const a=tw(i,o);if(o.length>1)this._draggedRange=Wc.fromRange(a),this._blockMode=!0;else if(1==o.length){const e=r.start.isTouching(a.start)&&r.end.isTouching(a.end);this._draggedRange=Wc.fromRange(e?a:r),this._blockMode=e}i.change((e=>e.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:e,domTarget:t,clientX:i}){const n=this.editor.editing.view,s=n.document.selection.editableElement,o=n.domConverter.mapViewToDom(s),r=Mn.window.getComputedStyle(o);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=ve(Mn.document,"div",{style:"position: fixed; left: -999999px;"}),Mn.document.body.appendChild(this._previewContainer));const a=new Hn(o);if(o.contains(t))return;const c=parseFloat(r.paddingLeft),d=ve(Mn.document,"div");d.className="ck ck-content",d.style.width=r.width,d.style.paddingLeft=`${a.left-i+c}px`,l.isiOS&&(d.style.backgroundColor="white"),d.innerHTML=e.getData("text/html"),e.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function Xb(e){return l.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function ew(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(fb);if(fb(e))return e;const t=e.findAncestor((e=>fb(e)||e.is("editableElement")));return fb(t)?t:null}function tw(e,t){const i=t[0],n=t[t.length-1],s=i.getCommonAncestor(n),o=e.createPositionBefore(i),r=e.createPositionAfter(n);if(s&&s.is("element")&&!e.schema.isLimit(s)){const t=e.createRangeOn(s),i=o.isTouching(t.start),n=r.isTouching(t.end);if(i&&n)return tw(e,[s])}return e.createRange(o,r)}class iw extends Qo{static get pluginName(){return"PastePlainText"}static get requires(){return[ab]}init(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document,s=t.document.selection;let o=!1;i.addObserver(ib),this.listenTo(n,"keydown",((e,t)=>{o=t.shiftKey})),e.plugins.get(ab).on("contentInsertion",((e,i)=>{(o||function(e,t){if(e.childCount>1)return!1;const i=e.getChild(0);if(t.isObject(i))return!1;return 0==Array.from(i.getAttributeKeys()).length}(i.content,t.schema))&&t.change((e=>{const n=Array.from(s.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));s.isCollapsed||t.deleteContent(s,{doNotAutoparagraph:!0}),n.push(...s.getAttributes());const o=e.createRangeIn(i.content);for(const t of o.getItems())t.is("$textProxy")&&e.setAttributes(n,t)}))}))}}class nw extends Qo{static get pluginName(){return"Clipboard"}static get requires(){return[ab,Yb,iw]}}class sw extends Xo{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!ow(e.schema,i))do{if(i=i.parent,!i)return}while(!ow(e.schema,i));e.change((e=>{e.setSelection(i,"in")}))}}function ow(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const rw=ws("Ctrl+A");class aw extends Qo{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new sw(e)),this.listenTo(t,"keydown",((t,i)=>{bs(i)===rw&&(e.execute("selectAll"),i.preventDefault())}))}}class lw extends Qo{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const i=e.commands.get("selectAll"),n=new lo(t),s=t.t;return n.set({label:s("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isEnabled").to(i,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),n}))}}class cw extends Qo{static get requires(){return[aw,lw]}static get pluginName(){return"SelectAll"}}class dw extends Xo{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const i=t[1];i.batchType||(i.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,i={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,i){const n=this.editor.model,s=n.document,o=[],r=e.map((e=>e.getTransformedByOperations(i))),a=r.flat();for(const e of r){const t=e.filter((e=>e.root!=s.graveyard)).filter((e=>!uw(e,a)));t.length&&(hw(t),o.push(t[0]))}o.length&&n.change((e=>{e.setSelection(o,{backward:t})}))}_undo(e,t){const i=this.editor.model,n=i.document;this._createdBatches.add(t);const s=e.operations.slice().filter((e=>e.isDocumentOperation));s.reverse();for(const e of s){const s=e.baseVersion+1,o=Array.from(n.history.getOperations(s)),r=yh([e.getReversed()],o,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let s of r){const o=s.affectedSelectable;o&&!i.canEditAt(o)&&(s=new hh(s.baseVersion)),t.addOperation(s),i.applyOperation(s),n.history.setOperationAsUndone(e,s)}}}}function hw(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;t<e.length;t++){const i=e[t-1].getJoined(e[t],!0);i&&(t--,e.splice(t,2,i))}}function uw(e,t){return t.some((t=>t!==e&&t.containsRange(e,!0)))}class mw extends dw{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,i=this._stack.splice(t,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,(()=>{this._undo(i.batch,n);const e=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,e)})),this.fire("revert",i.batch,n),this.refresh()}}class gw extends dw{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const i=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)})),this.refresh()}}class fw extends Qo{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new mw(e),this._redoCommand=new gw(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const i=t[0];if(!i.isDocumentOperation)return;const n=i.batch,s=this._redoCommand.createdBatches.has(n),o=this._undoCommand.createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(s?this._undoCommand.addBatch(n):o||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,i)=>{this._redoCommand.addBatch(i)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}const pw='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',bw='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class ww extends Qo{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?pw:bw,s="ltr"==t.uiLanguageDirection?bw:pw;this._addButton("undo",i("Undo"),"CTRL+Z",n),this._addButton("redo",i("Redo"),"CTRL+Y",s)}_addButton(e,t,i,n){const s=this.editor;s.ui.componentFactory.add(e,(o=>{const r=s.commands.get(e),a=new lo(o);return a.set({label:t,icon:n,keystroke:i,tooltip:!0}),a.bind("isEnabled").to(r,"isEnabled"),this.listenTo(a,"execute",(()=>{s.execute(e),s.editing.view.focus()})),a}))}}class vw extends Qo{static get requires(){return[fw,ww]}static get pluginName(){return"Undo"}}class _w extends Xo{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 t=this.editor.model,i=t.document.selection,n=e.value,s=e.batch,o=e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,n):e.removeSelectionAttribute(this.attributeKey);else{const s=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of s)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}};s?t.enqueueChange(s,(e=>{o(e)})):t.change((e=>{o(e)}))}}const yw="fontSize",kw="fontFamily",Cw="fontColor",Aw="fontBackgroundColor";function xw(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}function Tw(e){return t=>t.getStyle(e).replace(/\s/g,"")}function Ew(e){return(t,{writer:i})=>i.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class Sw extends _w{constructor(e){super(e,kw)}}function Pw(e){return e.map(Iw).filter((e=>void 0!==e))}function Iw(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),i=t[0],n=t.map(Vw).join(", ");return{title:i,model:n,view:{name:"span",styles:{"font-family":n},priority:7}}}(e):void 0}function Vw(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class Rw extends Qo{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define(kw,{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:kw}),e.model.schema.setAttributeProperties(kw,{isFormatting:!0,copyOnEnter:!0});const t=Pw(e.config.get("fontFamily.options")).filter((e=>e.model)),i=xw(kw,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(i),e.commands.add(kw,new Sw(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:kw,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:kw,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:kw,value:e=>e.getAttribute("face")}})}}class Ow extends Qo{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(kw),s=t("Font Family");e.ui.componentFactory.add(kw,(t=>{const o=Am(t);return Em(o,(()=>function(e,t){const i=new Ts;for(const n of e){const e={type:"button",model:new Zg({commandName:kw,commandParam:n.model,label:n.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",(e=>e===n.model||!(!e||!n.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===n.model.toLowerCase())),n.view&&"string"!=typeof n.view&&n.view.styles&&e.model.set("labelStyle",`font-family: ${n.view.styles["font-family"]}`),i.add(e)}return i}(i,n)),{role:"menu",ariaLabel:s}),o.buttonView.set({label:s,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',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}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return Pw(e.config.get(kw).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class Bw extends _w{constructor(e){super(e,yw)}}function Mw(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 Fw(e);var t;const i=function(e){return"string"==typeof e?Nw[e]:Nw[e.model]}(e);if(i)return Fw(i);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new y("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}},Fw(e)}(e)}(e))).filter((e=>void 0!==e))}const Nw={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 Fw(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const Dw=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class Lw extends Qo{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(yw,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:yw}),e.model.schema.setAttributeProperties(yw,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=Mw(this.editor.config.get("fontSize.options")).filter((e=>e.model)),n=xw(yw,i);t?(this._prepareAnyValueConverters(n),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add(yw,new Bw(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter((e=>!Su(String(e))&&!Iu(String(e))));if(i.length)throw new y("font-size-invalid-use-of-named-presets",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:yw,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:yw,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:yw,value:e=>{const t=e.getAttribute("size"),i="-"===t[0]||"+"===t[0];let n=parseInt(t,10);i&&(n=3+n);const s=Dw.length-1,o=Math.min(Math.max(n,0),s);return Dw[o]}}})}}class zw extends Qo{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(yw),s=t("Font Size");e.ui.componentFactory.add(yw,(t=>{const o=Am(t);return Em(o,(()=>function(e,t){const i=new Ts;for(const n of e){const e={type:"button",model:new Zg({commandName:yw,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)),i.add(e)}return i}(i,n)),{role:"menu",ariaLabel:s}),o.buttonView.set({label:s,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',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}))}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return Mw(e.config.get(yw).options).map((e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class Hw extends _w{constructor(e){super(e,Cw)}}class $w extends Qo{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(Cw,{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:Cw,value:Tw("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Cw,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:Cw,view:Ew("color")}),e.commands.add(Cw,new Hw(e)),e.model.schema.extend("$text",{allowAttributes:Cw}),e.model.schema.setAttributeProperties(Cw,{isFormatting:!0,copyOnEnter:!0})}}class Ww extends Qo{constructor(e,{commandName:t,componentName:i,icon:n,dropdownLabel:s}){super(e),this.commandName=t,this.componentName=i,this.icon=n,this.dropdownLabel=s,this.columns=e.config.get(`${this.componentName}.columns`),this.colorSelectorView=void 0}init(){const e=this.editor,t=e.locale,i=t.t,n=e.commands.get(this.commandName),s=e.config.get(this.componentName),o=ho(t,uo(s.colors)),r=s.documentColors,a=!1!==s.colorPicker;e.ui.componentFactory.add(this.componentName,(t=>{const l=Am(t);let c=!1;return this.colorSelectorView=function({dropdownView:e,colors:t,columns:i,removeButtonLabel:n,colorPickerLabel:s,documentColorsLabel:o,documentColorsCount:r,colorPickerViewConfig:a}){const l=e.locale,c=new wg(l,{colors:t,columns:i,removeButtonLabel:n,colorPickerLabel:s,documentColorsLabel:o,documentColorsCount:r,colorPickerViewConfig:a});return e.colorSelectorView=c,e.panelView.children.add(c),c}({dropdownView:l,colors:o.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:i("Remove color"),colorPickerLabel:i("Color picker"),documentColorsLabel:0!==r?i("Document colors"):"",documentColorsCount:void 0===r?this.columns:r,colorPickerViewConfig:!!a&&(s.colorPicker||{})}),this.colorSelectorView.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),this.colorSelectorView.on("execute",((t,i)=>{l.isOpen&&e.execute(this.commandName,{value:i.value,batch:this._undoStepBatch}),"colorPicker"!==i.source&&e.editing.view.focus(),"colorPickerSaveButton"===i.source&&(l.isOpen=!1)})),this.colorSelectorView.on("colorPicker:show",(()=>{this._undoStepBatch=e.model.createBatch()})),this.colorSelectorView.on("colorPicker:cancel",(()=>{this._undoStepBatch.operations.length&&(l.isOpen=!1,e.execute("undo",this._undoStepBatch)),e.editing.view.focus()})),l.on("change:isOpen",((t,i,n)=>{c||(c=!0,l.colorSelectorView.appendUI()),n&&(0!==r&&this.colorSelectorView.updateDocumentColors(e.model,this.componentName),this.colorSelectorView.updateSelectedColors(),this.colorSelectorView.showColorGridsFragment())})),Pm(l,(()=>l.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find((e=>e.isOn)))),l}))}}class jw extends Ww{constructor(e){const t=e.locale.t;super(e,{commandName:Cw,componentName:Cw,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class Uw extends _w{constructor(e){super(e,Aw)}}class qw extends Qo{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(Aw,{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(ju),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:Aw,value:Tw("background-color")}}),e.conversion.for("downcast").attributeToElement({model:Aw,view:Ew("background-color")}),e.commands.add(Aw,new Uw(e)),e.model.schema.extend("$text",{allowAttributes:Aw}),e.model.schema.setAttributeProperties(Aw,{isFormatting:!0,copyOnEnter:!0})}}class Gw extends Ww{constructor(e){const t=e.locale.t;super(e,{commandName:Aw,componentName:Aw,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class Kw extends Xo{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=Es(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&Jw(t,e.schema)}execute(e={}){const t=this.editor.model,i=t.document,n=e.selection||i.selection;t.canEditAt(n)&&t.change((e=>{const i=n.getSelectedBlocks();for(const n of i)!n.is("element","paragraph")&&Jw(n,t.schema)&&e.rename(n,"paragraph")}))}}function Jw(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Zw extends Xo{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,i=e.attributes;let n=e.position;t.canEditAt(n)&&t.change((e=>{if(n=this._findPositionToInsertParagraph(n,e),!n)return;const s=e.createElement("paragraph");i&&t.schema.setAllowedAttributes(s,i,e),t.insertContent(s,n),e.setSelection(s,"in")}))}_findPositionToInsertParagraph(e,t){const i=this.editor.model;if(i.schema.checkChild(e,"paragraph"))return e;const n=i.schema.findAllowedParent(e,"paragraph");if(!n)return null;const s=e.parent,o=i.schema.checkChild(s,"$text");return s.isEmpty||o&&e.isAtEnd?i.createPositionAfter(s):!s.isEmpty&&o&&e.isAtStart?i.createPositionBefore(s):t.split(e,n).position}}class Qw extends Qo{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new Kw(e)),e.commands.add("insertParagraph",new Zw(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>Qw.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Qw.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class Yw extends Xo{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Es(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>Xw(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,i=t.document,n=e.value;t.change((e=>{const s=Array.from(i.selection.getSelectedBlocks()).filter((e=>Xw(e,n,t.schema)));for(const t of s)t.is("element",n)||e.rename(t,n)}))}}function Xw(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const ev="paragraph";class tv extends Qo{static get pluginName(){return"HeadingEditing"}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[Qw]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const n of t)"paragraph"!==n.model&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new Yw(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,n)=>{const s=e.model.document.selection.getFirstPosition().parent;i.some((e=>s.is("element",e.model)))&&!s.is("element",ev)&&0===s.childCount&&n.writer.rename(s,ev)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:w.low+1})}}class iv extends Qo{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,i=function(e){const t=e.t,i={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=i[e.title];return t&&t!=e.title&&(e.title=t),e}))}(e),n=t("Choose heading"),s=t("Heading");e.ui.componentFactory.add("heading",(t=>{const o={},r=new Ts,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of i){const t={type:"button",model:new Zg({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"),c.push(l)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),r.add(t),o[e.model]=e.title}const d=Am(t);return Em(d,r,{ariaLabel:s,role:"menu"}),d.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),d.buttonView.bind("label").to(a,"value",l,"value",((e,t)=>{const i=e||t&&"paragraph";return"boolean"==typeof i?n:o[i]?o[i]:n})),this.listenTo(d,"execute",(t=>{const{commandName:i,commandValue:n}=t.source;e.execute(i,n?{value:n}:void 0),e.editing.view.focus()})),d}))}}new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class nv extends Xo{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=function(e,t,i){const n=function(e,t){const i=yb(e,t),n=i.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(e,i);return t.checkChild(n,"horizontalLine")}(i,t,e)}execute(){const e=this.editor.model;e.change((t=>{const i=t.createElement("horizontalLine");e.insertObject(i,null,null,{setSelection:"after"})}))}}class sv extends Qo{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),n.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),n.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:t})=>{const n=i("Horizontal line"),s=t.createContainerElement("div",null,t.createEmptyElement("hr"));return t.addClass("ck-horizontal-line",s),t.setCustomProperty("hr",!0,s),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),pb(e,t,{label:i})}(s,t,n)}}),n.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new nv(e))}}class ov extends Qo{static get pluginName(){return"HorizontalLineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("horizontalLine",(i=>{const n=e.commands.get("horizontalLine"),s=new lo(i);return s.set({label:t("Horizontal line"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 9h16v2H2z"/></svg>',tooltip:!0}),s.bind("isEnabled").to(n,"isEnabled"),this.listenTo(s,"execute",(()=>{e.execute("horizontalLine"),e.editing.view.focus()})),s}))}}const rv=function(e,t,i,n){var s=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++s]);++s<o;)i=t(i,e[s],s,e);return i};const av=function(e){return function(t){return null==e?void 0:e[t]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});var lv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cv=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");const dv=function(e){return(e=Br(e))&&e.replace(lv,av).replace(cv,"")};var hv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;const uv=function(e){return e.match(hv)||[]};var mv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;const gv=function(e){return mv.test(e)};var fv="\\ud800-\\udfff",pv="\\u2700-\\u27bf",bv="a-z\\xdf-\\xf6\\xf8-\\xff",wv="A-Z\\xc0-\\xd6\\xd8-\\xde",vv="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_v="["+vv+"]",yv="\\d+",kv="["+pv+"]",Cv="["+bv+"]",Av="[^"+fv+vv+yv+pv+bv+wv+"]",xv="(?:\\ud83c[\\udde6-\\uddff]){2}",Tv="[\\ud800-\\udbff][\\udc00-\\udfff]",Ev="["+wv+"]",Sv="(?:"+Cv+"|"+Av+")",Pv="(?:"+Ev+"|"+Av+")",Iv="(?:['’](?:d|ll|m|re|s|t|ve))?",Vv="(?:['’](?:D|LL|M|RE|S|T|VE))?",Rv="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ov="[\\ufe0e\\ufe0f]?",Bv=Ov+Rv+("(?:\\u200d(?:"+["[^"+fv+"]",xv,Tv].join("|")+")"+Ov+Rv+")*"),Mv="(?:"+[kv,xv,Tv].join("|")+")"+Bv,Nv=RegExp([Ev+"?"+Cv+"+"+Iv+"(?="+[_v,Ev,"$"].join("|")+")",Pv+"+"+Vv+"(?="+[_v,Ev+Sv,"$"].join("|")+")",Ev+"?"+Sv+"+"+Iv,Ev+"+"+Vv,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yv,Mv].join("|"),"g");const Fv=function(e){return e.match(Nv)||[]};const Dv=function(e,t,i){return e=Br(e),void 0===(t=i?void 0:t)?gv(e)?Fv(e):uv(e):e.match(t)||[]};var Lv=RegExp("['’]","g");const zv=function(e){return function(t){return rv(Dv(dv(t).replace(Lv,"")),e,"")}};const Hv=function(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:Lr(e,t,i)};var $v=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const Wv=function(e){return $v.test(e)};const jv=function(e){return e.split("")};var Uv="\\ud800-\\udfff",qv="["+Uv+"]",Gv="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Kv="\\ud83c[\\udffb-\\udfff]",Jv="[^"+Uv+"]",Zv="(?:\\ud83c[\\udde6-\\uddff]){2}",Qv="[\\ud800-\\udbff][\\udc00-\\udfff]",Yv="(?:"+Gv+"|"+Kv+")"+"?",Xv="[\\ufe0e\\ufe0f]?",e_=Xv+Yv+("(?:\\u200d(?:"+[Jv,Zv,Qv].join("|")+")"+Xv+Yv+")*"),t_="(?:"+[Jv+Gv+"?",Gv,Zv,Qv,qv].join("|")+")",i_=RegExp(Kv+"(?="+Kv+")|"+t_+e_,"g");const n_=function(e){return e.match(i_)||[]};const s_=function(e){return Wv(e)?n_(e):jv(e)};const o_=function(e){return function(t){t=Br(t);var i=Wv(t)?s_(t):void 0,n=i?i[0]:t.charAt(0),s=i?Hv(i,1).join(""):t.slice(1);return n[e]()+s}}("toUpperCase");const r_=zv((function(e,t,i){return e+(i?" ":"")+o_(t)}));function a_(e,t,i,n){t&&function(e,t,i){if(t.attributes)for(const[n]of Object.entries(t.attributes))e.removeAttribute(n,i);if(t.styles)for(const n of Object.keys(t.styles))e.removeStyle(n,i);t.classes&&e.removeClass(t.classes,i)}(e,t,n),i&&l_(e,i,n)}function l_(e,t,i){if(t.attributes)for(const[n,s]of Object.entries(t.attributes))e.setAttribute(n,s,i);t.styles&&e.setStyle(t.styles,i),t.classes&&e.addClass(t.classes,i)}function c_(e,t,i,n,s){const o=t.getAttribute(i),r={};for(const e of["attributes","styles","classes"]){if(e!=n){o&&o[e]&&(r[e]=o[e]);continue}if("classes"==n){const t=new Set(o&&o.classes||[]);s(t),t.size&&(r[e]=Array.from(t));continue}const t=new Map(Object.entries(o&&o[e]||{}));s(t),t.size&&(r[e]=Object.fromEntries(t))}Object.keys(r).length?t.is("documentSelection")?e.setSelectionAttribute(i,r):e.setAttribute(i,r,t):o&&(t.is("documentSelection")?e.removeSelectionAttribute(i):e.removeAttribute(i,t))}function d_(e){return`html${t=e,r_(t).replace(/ /g,"")}Attributes`;var t}function h_({model:e}){return(t,i)=>i.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function u_(e,{view:t,isInline:i}){const n=e.t;return(e,{writer:s})=>{const o=n("HTML object"),r=m_(t,e,s),a=e.getAttribute(d_(t));s.addClass("html-object-embed__content",r),a&&l_(s,a,r);return pb(s.createContainerElement(i?"span":"div",{class:"html-object-embed","data-html-object-embed-label":o},r),s,{label:o})}}function m_(e,t,i){return i.createRawElement(e,null,((e,i)=>{i.setContentOf(e,t.getAttribute("htmlContent"))}))}function g_({view:e,model:t,allowEmpty:i},n){return t=>{t.on(`element:${e}`,((e,t,o)=>{let r=n.processViewAttributes(t.viewItem,o);if(r||o.consumable.test(t.viewItem,{name:!0})){if(r=r||{},o.consumable.consume(t.viewItem,{name:!0}),t.modelRange||(t=Object.assign(t,o.convertChildren(t.viewItem,t.modelCursor))),i&&t.modelRange.isCollapsed&&Object.keys(r).length){const e=o.writer.createElement("htmlEmptyElement");if(!o.safeInsert(e,t.modelCursor))return;const i=o.getSplitParts(e);return t.modelRange=o.writer.createRange(t.modelRange.start,o.writer.createPositionAfter(i[i.length-1])),o.updateConversionResult(e,t),void s(e,r,o)}for(const e of t.modelRange.getItems())s(e,r,o)}}),{priority:"low"})};function s(e,i,n){if(n.schema.checkAttribute(e,t)){const s=function(e,t){const i=mc(e);let n="attributes";for(n in t)i[n]="classes"==n?Array.from(new Set([...e[n]||[],...t[n]])):{...e[n],...t[n]};return i}(i,e.getAttribute(t)||{});n.writer.setAttribute(t,s,e)}}}function f_({model:e,view:t},i){return(n,{writer:s,consumable:o})=>{if(!n.hasAttribute(e))return null;const r=s.createContainerElement(t),a=n.getAttribute(e);return o.consume(n,`attribute:${e}`),l_(s,a,r),r.getFillerOffset=()=>null,i?pb(r,s):r}}function p_({priority:e,view:t}){return(i,n)=>{if(!i)return;const{writer:s}=n,o=s.createAttributeElement(t,null,{priority:e});return l_(s,i,o),o}}function b_({view:e},t){return i=>{i.on(`element:${e}`,((e,i,n)=>{if(!i.modelRange||i.modelRange.isCollapsed)return;const s=t.processViewAttributes(i.viewItem,n);s&&n.writer.setAttribute(d_(i.viewItem.name),s,i.modelRange)}),{priority:"low"})}}function w_({view:e,model:t}){return i=>{i.on(`attribute:${d_(e)}:${t}`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t;a_(i.writer,n,s,i.mapper.toViewElement(t.item))}))}}const v_=[{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:"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:"$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:{allowChildren:["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:"htmlDivDl",view:"div",modelSchema:{allowChildren:["htmlDt","htmlDd"],allowIn:"htmlDl"}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDivDl"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}}],__=[{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"},{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}}];const y_=la((function(e,t,i,n){Zr(e,t,i,n)}));class k_ extends Qo{constructor(){super(...arguments),this._definitions=[]}static get pluginName(){return"DataSchema"}init(){for(const e of v_)this.registerBlockElement(e);for(const e of __)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t=!1){const i=new Set;for(const n of this._getMatchingViewDefinitions(e)){if(t)for(const e of this._getReferences(n.model))i.add(e);i.add(n)}return i}getDefinitionsForModel(e){return this._definitions.filter((t=>t.model==e))}_getMatchingViewDefinitions(e){return this._definitions.filter((t=>t.view&&function(e,t){if("string"==typeof e)return e===t;if(e instanceof RegExp)return e.test(t);return!1}(e,t.view)))}*_getReferences(e){const t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter((t=>t.model==e));for(const{modelSchema:n}of i)if(n)for(const i of t)for(const t of ys(n[i]||[])){const i=this._definitions.filter((e=>e.model==t));for(const n of i)t!==e&&(yield*this._getReferences(n.model),yield n)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter((([,t])=>t.model==e.model));if(0!=t.length)for(const[i,n]of t)this._definitions[i]=y_({},n,e,((e,t)=>Array.isArray(e)?e.concat(t):void 0));else this._definitions.push(e)}}const C_=function(e,t,i,n){for(var s=e.length,o=i+(n?1:-1);n?o--:++o<s;)if(t(e[o],o,e))return o;return-1};const A_=function(e){return e!=e};const x_=function(e,t,i){for(var n=i-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1};const T_=function(e,t,i){return t==t?x_(e,t,i):C_(e,A_,i)};const E_=function(e,t,i,n){for(var s=i-1,o=e.length;++s<o;)if(n(e[s],t))return s;return-1};var S_=Array.prototype.splice;const P_=function(e,t,i,n){var s=n?E_:T_,o=-1,r=t.length,a=e;for(e===t&&(t=yi(t)),i&&(a=Ir(e,Kt(i)));++o<r;)for(var l=0,c=t[o],d=i?i(c):c;(l=s(a,d,l,n))>-1;)a!==e&&S_.call(a,l,1),S_.call(e,l,1);return e};const I_=ra((function(e,t){return e&&e.length&&t&&t.length?P_(e,t):e}));class V_ extends Qo{constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new br,this._disallowedAttributes=new br,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 requires(){return[k_,Ob]}loadAllowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,i=N_(t);this.allowElement(e),i.forEach((e=>this.allowAttributes(e)))}}loadDisallowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,i=N_(t);0==i.length?this.disallowElement(e):i.forEach((e=>this.disallowAttributes(e)))}}loadAllowedEmptyElementsConfig(e){for(const t of e)this.allowEmptyElement(t)}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){return R_(e,t,this._disallowedAttributes),R_(e,t,this._allowedAttributes)}_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&"string"==typeof e.appliesToBlock)for(const t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",(()=>{this._fireRegisterEvent(e)}),{priority:w.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",(()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)}),{priority:w.highest+1})}_registerElementHandlers(){this.on("register",((e,t)=>{const i=this.editor.model.schema;if(t.isObject&&!i.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else{if(!t.isInline)throw new y("data-filter-invalid-definition",null,t);this._registerInlineElement(t)}e.stop()}),{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer((t=>{const i=e.document.differ.getChanges();let n=!1;const s=this._getCoupledAttributesMap();for(const e of i){if("attribute"!=e.type||null!==e.attributeNewValue)continue;const i=s.get(e.attributeKey);if(i)for(const{item:s}of e.range.getWalker({shallow:!0}))for(const e of i)s.hasAttribute(e)&&(t.removeAttribute(e,s),n=!0)}return n})),this.listenTo(t,"change:attribute",((i,{attributeKeys:n})=>{const s=new Set,o=this._getCoupledAttributesMap();for(const e of n){if(t.hasAttribute(e))continue;const i=o.get(e);if(i)for(const e of i)t.hasAttribute(e)&&s.add(e)}0!=s.size&&e.change((e=>{for(const t of s)e.removeSelectionAttribute(t)}))}))}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer((t=>{const i=e.document.differ.getChanges();let n=!1;for(const s of i)if("insert"===s.type&&"$text"!==s.name)for(const i of s.attributes.keys())i.startsWith("html")&&i.endsWith("Attributes")&&(e.schema.checkAttribute(s.name,i)||(t.removeAttribute(i,s.position.nodeAfter),n=!0));return n}))}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,{view:s,model:o}=e;i.register(o,e.modelSchema),s&&(i.extend(e.model,{allowAttributes:[d_(s),"htmlContent"]}),t.data.registerRawContentMatcher({name:s}),n.for("upcast").elementToElement({view:s,model:h_(e),converterPriority:w.low+2}),n.for("upcast").add(b_(e,this)),n.for("editingDowncast").elementToStructure({model:{name:o,attributes:[d_(s)]},view:u_(t,e)}),n.for("dataDowncast").elementToElement({model:o,view:(e,{writer:t})=>m_(s,e,t)}),n.for("dataDowncast").add(w_(e)))}_registerBlockElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,{view:s,model:o}=e;if(!i.isRegistered(e.model)){if(i.register(e.model,e.modelSchema),!s)return;n.for("upcast").elementToElement({model:o,view:s,converterPriority:w.low+2}),n.for("downcast").elementToElement({model:o,view:s})}s&&(i.extend(e.model,{allowAttributes:d_(s)}),n.for("upcast").add(b_(e,this)),n.for("downcast").add(w_(e)))}_registerInlineElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,s=e.model;e.appliesToBlock||(i.extend("$text",{allowAttributes:s}),e.attributeProperties&&i.setAttributeProperties(s,e.attributeProperties),n.for("upcast").add(g_(e,this)),n.for("downcast").attributeToElement({model:s,view:p_(e)}),e.allowEmpty&&(i.setAttributeProperties(s,{copyFromObject:!1}),i.isRegistered("htmlEmptyElement")||i.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"}),t.data.htmlProcessor.domConverter.registerInlineObjectMatcher((t=>t.name==e.view&&t.isEmpty&&Array.from(t.getAttributeKeys()).length?{name:!0}:null)),n.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:f_(e,!0)}),n.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:f_(e)})))}}function R_(e,t,i){const n=function(e,{consumable:t},i){const n=i.matchAll(e)||[],s=[];for(const i of n)O_(t,e,i),delete i.match.name,t.consume(e,i.match),s.push(i);return s}(e,t,i),{attributes:s,styles:o,classes:r}=function(e){const t={attributes:new Set,classes:new Set,styles:new Set};for(const i of e)for(const e in t){(i.match[e]||[]).forEach((i=>t[e].add(i)))}return t}(n),a={};if(s.size)for(const e of s)Yn(e)||s.delete(e);return s.size&&(a.attributes=B_(s,(t=>e.getAttribute(t)))),o.size&&(a.styles=B_(o,(t=>e.getStyle(t)))),r.size&&(a.classes=Array.from(r)),Object.keys(a).length?a:null}function O_(e,t,i){for(const n of["attributes","classes","styles"]){const s=i.match[n];if(s)for(const i of Array.from(s))e.test(t,{[n]:[i]})||I_(s,i)}}function B_(e,t){const i={};for(const n of e){void 0!==t(n)&&(i[n]=t(n))}return i}function M_(e,t){const{name:i}=e,n=e[t];return Ee(n)?Object.entries(n).map((([e,n])=>({name:i,[t]:{[e]:n}}))):Array.isArray(n)?n.map((e=>({name:i,[t]:[e]}))):[e]}function N_(e){const{name:t,attributes:i,classes:n,styles:s}=e,o=[];return i&&o.push(...M_({name:t,attributes:i},"attributes")),n&&o.push(...M_({name:t,classes:n},"classes")),s&&o.push(...M_({name:t,styles:s},"styles")),o}class F_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"CodeBlockElementSupport"}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(V_);e.on("register:pre",((t,i)=>{if("codeBlock"!==i.model)return;const n=this.editor,s=n.model.schema,o=n.conversion;s.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),o.for("upcast").add(function(e){return t=>{t.on("element:code",((t,i,n)=>{const s=i.viewItem,o=s.parent;function r(t,s){const o=e.processViewAttributes(t,n);o&&n.writer.setAttribute(s,o,i.modelRange)}o&&o.is("element","pre")&&(r(o,"htmlPreAttributes"),r(s,"htmlContentAttributes"))}),{priority:"low"})}}(e)),o.for("downcast").add((e=>{e.on("attribute:htmlPreAttributes:codeBlock",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t,o=i.mapper.toViewElement(t.item).parent;a_(i.writer,n,s,o)})),e.on("attribute:htmlContentAttributes:codeBlock",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t,o=i.mapper.toViewElement(t.item);a_(i.writer,n,s,o)}))})),t.stop()}))}}class D_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"DualContentModelElementSupport"}init(){this.editor.plugins.get(V_).on("register",((e,t)=>{const i=t,n=this.editor,s=n.model.schema,o=n.conversion;if(!i.paragraphLikeModel)return;if(s.isRegistered(i.model)||s.isRegistered(i.paragraphLikeModel))return;const r={model:i.paragraphLikeModel,view:i.view};s.register(i.model,i.modelSchema),s.register(r.model,{inheritAllFrom:"$block"}),o.for("upcast").elementToElement({view:i.view,model:(e,{writer:t})=>this._hasBlockContent(e)?t.createElement(i.model):t.createElement(r.model),converterPriority:w.low+.5}),o.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),o.for("downcast").elementToElement({view:r.view,model:r.model}),this._addAttributeConversion(r),e.stop()}))}_hasBlockContent(e){const t=this.editor.editing.view,i=t.domConverter.blockElements;for(const n of t.createRangeIn(e).getItems())if(n.is("element")&&i.includes(n.name))return!0;return!1}_addAttributeConversion(e){const t=this.editor,i=t.conversion,n=t.plugins.get(V_);t.model.schema.extend(e.model,{allowAttributes:d_(e.view)}),i.for("upcast").add(b_(e,n)),i.for("downcast").add(w_(e))}}class L_ extends Qo{static get requires(){return[k_,Up]}static get pluginName(){return"HeadingElementSupport"}init(){const e=this.editor;if(!e.plugins.has("HeadingEditing"))return;const t=e.config.get("heading.options");this.registerHeadingElements(e,t)}registerHeadingElements(e,t){const i=e.plugins.get(k_),n=[];for(const e of t)"model"in e&&"view"in e&&(i.registerBlockElement({view:e.view,model:e.model}),n.push(e.model));i.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:n}})}}function z_(e,t,i){const n=e.createRangeOn(t);for(const{item:e}of n.getWalker())if(e.is("element",i))return e}class H_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"ImageElementSupport"}init(){const e=this.editor;if(!e.plugins.has("ImageInlineEditing")&&!e.plugins.has("ImageBlockEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(V_);n.on("register:figure",(()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,i,n)=>{const s=i.viewItem;if(!i.modelRange||!s.hasClass("image"))return;const o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)}),{priority:"low"})}}(n))})),n.on("register:img",((s,o)=>{"imageBlock"!==o.model&&"imageInline"!==o.model||(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),i.for("upcast").add(function(e){return t=>{t.on("element:img",((t,i,n)=>{if(!i.modelRange)return;const s=i.viewItem,o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlImgAttributes",o,i.modelRange)}),{priority:"low"})}}(n)),i.for("downcast").add((e=>{function t(t){e.on(`attribute:${t}:imageInline`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t,o=i.mapper.toViewElement(t.item);a_(i.writer,n,s,o)}),{priority:"low"})}function i(t,i){e.on(`attribute:${i}:imageBlock`,((e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const{attributeOldValue:s,attributeNewValue:o}=i,r=n.mapper.toViewElement(i.item),a=z_(n.writer,r,t);a&&(a_(n.writer,s,o,a),n.consumable.consume(i.item,e.name))}),{priority:"low"}),"a"===t&&e.on("attribute:linkHref:imageBlock",((e,t,i)=>{if(!i.consumable.consume(t.item,"attribute:htmlLinkAttributes:imageBlock"))return;const n=i.mapper.toViewElement(t.item),s=z_(i.writer,n,"a");l_(i.writer,t.item.getAttribute("htmlLinkAttributes"),s)}),{priority:"low"})}t("htmlImgAttributes"),i("img","htmlImgAttributes"),i("figure","htmlFigureAttributes"),i("a","htmlLinkAttributes")})),e.plugins.has("LinkImage")&&i.for("upcast").add(function(e,t){const i=t.plugins.get("ImageUtils");return t=>{t.on("element:a",((t,n,s)=>{const o=n.viewItem;if(!i.findViewImgElement(o))return;const r=n.modelCursor.parent;if(!r.is("element","imageBlock"))return;const a=e.processViewAttributes(o,s);a&&s.writer.setAttribute("htmlLinkAttributes",a,r)}),{priority:"low"})}}(n,e)),s.stop())}))}}class $_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"MediaEmbedElementSupport"}init(){const e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;const t=e.model.schema,i=e.conversion,n=this.editor.plugins.get(V_),s=this.editor.plugins.get(k_),o=e.config.get("mediaEmbed.elementName");s.registerBlockElement({model:"media",view:o}),n.on("register:figure",(()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,i,n)=>{const s=i.viewItem;if(!i.modelRange||!s.hasClass("media"))return;const o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)}),{priority:"low"})}}(n))})),n.on(`register:${o}`,((e,s)=>{"media"===s.model&&(t.extend("media",{allowAttributes:[d_(o),"htmlFigureAttributes"]}),i.for("upcast").add(function(e,t){const i=(i,n,s)=>{function o(t,i){const o=e.processViewAttributes(t,s);o&&s.writer.setAttribute(i,o,n.modelRange)}o(n.viewItem,d_(t))};return e=>{e.on(`element:${t}`,i,{priority:"low"})}}(n,o)),i.for("dataDowncast").add(function(e){return t=>{function i(e,i){t.on(`attribute:${i}:media`,((t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const{attributeOldValue:s,attributeNewValue:o}=i,r=n.mapper.toViewElement(i.item),a=z_(n.writer,r,e);a_(n.writer,s,o,a)}))}i(e,d_(e)),i("figure","htmlFigureAttributes")}}(o)),e.stop())}))}}class W_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"ScriptElementSupport"}init(){const e=this.editor.plugins.get(V_);e.on("register:script",((t,i)=>{const n=this.editor,s=n.model.schema,o=n.conversion;s.register("htmlScript",i.modelSchema),s.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),n.data.registerRawContentMatcher({name:"script"}),o.for("upcast").elementToElement({view:"script",model:h_(i)}),o.for("upcast").add(b_(i,e)),o.for("downcast").elementToElement({model:"htmlScript",view:(e,{writer:t})=>m_("script",e,t)}),o.for("downcast").add(w_(i)),t.stop()}))}}class j_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"TableElementSupport"}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(V_),s=e.plugins.get("TableUtils");n.on("register:figure",(()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,i,n)=>{const s=i.viewItem;if(!i.modelRange||!s.hasClass("table"))return;const o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)}),{priority:"low"})}}(n))})),n.on("register:table",((o,r)=>{"table"===r.model&&(t.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),i.for("upcast").add(function(e){return t=>{t.on("element:table",((t,i,n)=>{if(!i.modelRange)return;const s=i.viewItem;o(s,"htmlTableAttributes");for(const e of s.getChildren())e.is("element","thead")&&o(e,"htmlTheadAttributes"),e.is("element","tbody")&&o(e,"htmlTbodyAttributes");function o(t,s){const o=e.processViewAttributes(t,n);o&&n.writer.setAttribute(s,o,i.modelRange)}}),{priority:"low"})}}(n)),i.for("downcast").add((e=>{function t(t,i){e.on(`attribute:${i}:table`,((e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const s=n.mapper.toViewElement(i.item),o=z_(n.writer,s,t);o&&(n.consumable.consume(i.item,e.name),a_(n.writer,i.attributeOldValue,i.attributeNewValue,o))}))}t("table","htmlTableAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")})),e.model.document.registerPostFixer(function(e,t){return i=>{const n=e.document.differ.getChanges();let s=!1;for(const e of n){if("attribute"!=e.type||"headingRows"!=e.attributeKey)continue;const n=e.range.start.nodeAfter,o=n.getAttribute("htmlTheadAttributes"),r=n.getAttribute("htmlTbodyAttributes");o&&!e.attributeNewValue?(i.removeAttribute("htmlTheadAttributes",n),s=!0):r&&e.attributeNewValue==t.getRows(n)&&(i.removeAttribute("htmlTbodyAttributes",n),s=!0)}return s}}(e.model,s)),o.stop())}))}}class U_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"StyleElementSupport"}init(){const e=this.editor.plugins.get(V_);e.on("register:style",((t,i)=>{const n=this.editor,s=n.model.schema,o=n.conversion;s.register("htmlStyle",i.modelSchema),s.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),n.data.registerRawContentMatcher({name:"style"}),o.for("upcast").elementToElement({view:"style",model:h_(i)}),o.for("upcast").add(b_(i,e)),o.for("downcast").elementToElement({model:"htmlStyle",view:(e,{writer:t})=>m_("style",e,t)}),o.for("downcast").add(w_(i)),t.stop()}))}}class q_ extends Qo{static get requires(){return[V_]}static get pluginName(){return"DocumentListElementSupport"}init(){const e=this.editor;if(!e.plugins.has("DocumentListEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(V_),s=e.plugins.get("DocumentListEditing"),o=["ul","ol","li"];s.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:l_}),s.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:l_}),s.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:l_}),n.on("register",((e,s)=>{if(!o.includes(s.view))return;if(e.stop(),t.checkAttribute("$block","htmlLiAttributes"))return;const r=o.map((e=>d_(e)));t.extend("$listItem",{allowAttributes:r}),i.for("upcast").add((e=>{e.on("element:ul",G_("htmlUlAttributes",n),{priority:"low"}),e.on("element:ol",G_("htmlOlAttributes",n),{priority:"low"}),e.on("element:li",G_("htmlLiAttributes",n),{priority:"low"})}))})),s.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:n,previousNodeInList:s}of t)if(s){if(s.getAttribute("listType")==n.getAttribute("listType")){const t=K_(s.getAttribute("listType")),o=s.getAttribute(t);!ch(n.getAttribute(t),o)&&i.model.schema.checkAttribute(n,t)&&(i.setAttribute(t,o,n),e.return=!0)}if(s.getAttribute("listItemId")==n.getAttribute("listItemId")){const t=s.getAttribute("htmlLiAttributes");!ch(n.getAttribute("htmlLiAttributes"),t)&&i.model.schema.checkAttribute(n,"htmlLiAttributes")&&(i.setAttribute("htmlLiAttributes",t,n),e.return=!0)}}})),s.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:n}of t){const t=n.getAttribute("listType");"numbered"!==t&&n.getAttribute("htmlOlAttributes")&&(i.removeAttribute("htmlOlAttributes",n),e.return=!0),"numbered"===t&&n.getAttribute("htmlUlAttributes")&&(i.removeAttribute("htmlUlAttributes",n),e.return=!0)}}))}afterInit(){const e=this.editor;if(!e.commands.get("indentList"))return;const t=e.commands.get("indentList");this.listenTo(t,"afterExecute",((t,i)=>{e.model.change((t=>{for(const n of i){const i=K_(n.getAttribute("listType"));e.model.schema.checkAttribute(n,i)&&t.setAttribute(i,{},n)}}))}))}}function G_(e,t){return(i,n,s)=>{const o=n.viewItem;n.modelRange||Object.assign(n,s.convertChildren(n.viewItem,n.modelCursor));const r=t.processViewAttributes(o,s);for(const t of n.modelRange.getItems({shallow:!0}))t.hasAttribute("listItemId")&&(t.hasAttribute(e)||s.writer.model.schema.checkAttribute(t,e)&&s.writer.setAttribute(e,r||{},t))}}function K_(e){return"numbered"===e?"htmlOlAttributes":"htmlUlAttributes"}class J_ extends Qo{static get requires(){return[V_,k_]}static get pluginName(){return"CustomElementSupport"}init(){const e=this.editor.plugins.get(V_),t=this.editor.plugins.get(k_);e.on("register:$customElement",((i,n)=>{i.stop();const s=this.editor,o=s.model.schema,r=s.conversion,a=s.editing.view.domConverter.unsafeElements,l=s.data.htmlProcessor.domConverter.preElements;o.register(n.model,n.modelSchema),o.extend(n.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),s.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),r.for("upcast").elementToElement({view:/.*/,model:(i,o)=>{if("$comment"==i.name)return null;if(!function(e){try{document.createElement(e)}catch(e){return!1}return!0}(i.name))return null;if(t.getDefinitionsForView(i.name).size)return null;a.includes(i.name)||a.push(i.name),l.includes(i.name)||l.push(i.name);const r=o.writer.createElement(n.model,{htmlElementName:i.name}),c=e.processViewAttributes(i,o);let d;if(c&&o.writer.setAttribute("htmlCustomElementAttributes",c,r),i.is("element","template")&&i.getCustomProperty("$rawContent"))d=i.getCustomProperty("$rawContent");else{const e=new pu(i.document).createDocumentFragment(i),t=s.data.htmlProcessor.domConverter.viewToDom(e),n=t.firstChild;for(;n.firstChild;)t.appendChild(n.firstChild);n.remove(),d=s.data.htmlProcessor.htmlWriter.getHtml(t)}o.writer.setAttribute("htmlContent",d,r);for(const{item:e}of s.editing.view.createRangeIn(i))o.consumable.consume(e,{name:!0});return r},converterPriority:"low"}),r.for("editingDowncast").elementToElement({model:{name:n.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{const i=e.getAttribute("htmlElementName"),n=t.createRawElement(i);return e.hasAttribute("htmlCustomElementAttributes")&&l_(t,e.getAttribute("htmlCustomElementAttributes"),n),n}}),r.for("dataDowncast").elementToElement({model:{name:n.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{const i=e.getAttribute("htmlElementName"),n=e.getAttribute("htmlContent"),s=t.createRawElement(i,null,((e,t)=>{t.setContentOf(e,n)}));return e.hasAttribute("htmlCustomElementAttributes")&&l_(t,e.getAttribute("htmlCustomElementAttributes"),s),s}})}))}}function*Z_(e,t,i){if(t)if(!(Symbol.iterator in t)&&t.is("documentSelection")&&t.isCollapsed)e.schema.checkAttributeInSelection(t,i)&&(yield t);else for(const n of function(e,t,i){return!(Symbol.iterator in t)&&(t.is("node")||t.is("$text")||t.is("$textProxy"))?e.schema.checkAttribute(t,i)?[e.createRangeOn(t)]:[]:e.schema.getValidRanges(e.createSelection(t).getRanges(),i)}(e,t,i))yield*n.getItems({shallow:!0})}function Q_(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function Y_(e,t){const i=e.plugins.get("ImageUtils"),n=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>{if(!i.isInlineImageView(e))return null;if(!n)return s(e);return("block"==e.getStyle("display")||e.findAncestor(i.isBlockImageView)?"imageBlock":"imageInline")!==t?null:s(e)};function s(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function X_(e,t){const i=Es(t.getSelectedBlocks());return!i||e.isObject(i)||i.isEmpty&&"listItem"!=i.name?"imageBlock":"imageInline"}function ey(e){return e&&e.endsWith("px")?parseInt(e):null}function ty(e){const t=ey(e.getStyle("width")),i=ey(e.getStyle("height"));return!(!t||!i)}const iy=/^(image|image-inline)$/;class ny extends Qo{constructor(){super(...arguments),this._domEmitter=new(Vn())}static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,i=null,n={}){const s=this.editor,o=s.model,r=o.document.selection,a=sy(s,t||r,i);e={...Object.fromEntries(r.getAttributes()),...e};for(const t in e)o.schema.checkAttribute(a,t)||delete e[t];return o.change((i=>{const{setImageSizes:s=!0}=n,r=i.createElement(a,e);return o.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==a?void 0:"auto"}),r.parent?(s&&this.setImageNaturalSizeAttributes(r),r):null}))}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change((i=>{const n=new Mn.window.Image;this._domEmitter.listenTo(n,"load",(()=>{e.getAttribute("width")||e.getAttribute("height")||this.editor.model.enqueueChange(i.batch,(t=>{t.setAttribute("width",n.naturalWidth,e),t.setAttribute("height",n.naturalHeight,e)})),this._domEmitter.stopListening(n,"load")})),n.src=t})))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:iy})}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){const i=sy(e,t,null);if("imageBlock"==i){const i=function(e,t){const i=yb(e,t),n=i.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,e.model);if(e.model.schema.checkChild(i,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,i){t.setCustomProperty("image",!0,e);return pb(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&fb(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function sy(e,t,i){const n=e.model.schema,s=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?i||("inline"===s?"imageInline":"auto"!==s?"imageBlock":t.is("selection")?X_(n,t):n.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const oy=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class ry extends Xo{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=t.model,s=i.getClosestSelectedImageElement(n.document.selection);n.change((t=>{t.setAttribute("alt",e.newValue,s)}))}}class ay extends Qo{static get requires(){return[ny]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new ry(this.editor))}}class ly extends Fs{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Ss,this.keystrokes=new Ps,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),um.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),um.cancel,"ck-button-cancel","cancel"),this._focusables=new Ns,this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),s({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,i,n){const s=new lo(this.locale);return s.set({label:e,icon:t,tooltip:!0}),s.extendTemplate({attributes:{class:i}}),n&&s.delegate("execute").to(this,n),s}_createLabeledInputView(){const e=this.locale.t,t=new Fo(this.locale,Vm);return t.label=e("Text alternative"),t}}function cy(e){const t=e.editing.view,i=Ag.defaultPositions,n=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(t.document.selection)),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class dy extends Qo{static get requires(){return[Yg]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(i=>{const n=e.commands.get("imageTextAlternative"),s=new lo(i);return s.set({label:t("Change image text alternative"),icon:um.textAlternative,tooltip:!0}),s.bind("isEnabled").to(n,"isEnabled"),s.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(s,"execute",(()=>{this._showForm()})),s}))}_createForm(){const i=this.editor,n=i.editing.view.document,s=i.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(t(ly))(i.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{i.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(i.ui,"update",(()=>{s.getClosestSelectedImageWidget(n.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const i=cy(e);t.updatePosition(i)}}(i):this._hideForm(!0)})),e({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:cy(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class hy extends Qo{static get requires(){return[ay,dy]}static get pluginName(){return"ImageTextAlternative"}}function uy(e,t){const i=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const s=n.writer,o=n.mapper.toViewElement(i.item),r=e.findViewImgElement(o);null===i.attributeNewValue?(s.removeAttribute("srcset",r),s.removeAttribute("sizes",r)):i.attributeNewValue&&(s.setAttribute("srcset",i.attributeNewValue,r),s.setAttribute("sizes","100vw",r))};return e=>{e.on(`attribute:srcset:${t}`,i)}}function my(e,t,i){const n=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const s=n.writer,o=n.mapper.toViewElement(i.item),r=e.findViewImgElement(o);s.setAttribute(i.attributeKey,i.attributeNewValue||"",r)};return e=>{e.on(`attribute:${i}:${t}`,n)}}class gy extends Il{observe(e){this.listenTo(e,"load",((e,t)=>{const i=t.target;this.checkShouldIgnoreEventFromTarget(i)||"IMG"==i.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class fy extends Xo{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&k("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&k("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=ys(e.source),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),s=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const o=i.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&o&&n.isImage(o)){const t=this.editor.model.createPositionAfter(o);n.insertImage({...e,...s},t)}else n.insertImage({...e,...s})}))}}class py extends Xo{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),i=this.editor.plugins.get("ImageUtils");this.editor.model.change((n=>{n.setAttribute("src",e.source,t),this.cleanupImage(n,t),i.setImageNaturalSizeAttributes(t)}))}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class by extends Qo{static get requires(){return[ny]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(gy),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const i=new fy(e),n=new py(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",i)}}class wy extends Qo{static get requires(){return[ny]}static get pluginName(){return"ImageSizeAttributes"}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n="imageBlock"===e?"figure":"img";function s(t,n,s,o){t.on(`attribute:${n}:${e}`,((t,n,r)=>{if(!r.consumable.consume(n.item,t.name))return;const a=r.writer,l=r.mapper.toViewElement(n.item),c=i.findViewImgElement(l);if(null!==n.attributeNewValue?a.setAttribute(s,n.attributeNewValue,c):a.removeAttribute(s,c),n.item.hasAttribute("sources"))return;const d=n.item.hasAttribute("resizedWidth");if("imageInline"===e&&!d&&!o)return;const h=n.item.getAttribute("width"),u=n.item.getAttribute("height");h&&u&&a.setStyle("aspect-ratio",`${h}/${u}`,c)}))}t.conversion.for("upcast").attributeToAttribute({view:{name:n,styles:{width:/.+/}},model:{key:"width",value:e=>ty(e)?ey(e.getStyle("width")):null}}).attributeToAttribute({view:{name:n,key:"width"},model:"width"}).attributeToAttribute({view:{name:n,styles:{height:/.+/}},model:{key:"height",value:e=>ty(e)?ey(e.getStyle("height")):null}}).attributeToAttribute({view:{name:n,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add((e=>{s(e,"width","width",!0),s(e,"height","height",!0)})),t.conversion.for("dataDowncast").add((e=>{s(e,"width","width",!1),s(e,"height","height",!1)}))}}class vy extends Xo{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(e={}){const t=this.editor,i=this.editor.model,n=t.plugins.get("ImageUtils"),s=n.getClosestSelectedImageElement(i.document.selection),o=Object.fromEntries(s.getAttributes());return o.src||o.uploadId?i.change((t=>{const{setImageSizes:r=!0}=e,a=Array.from(i.markers).filter((e=>e.getRange().containsItem(s))),l=n.insertImage(o,i.createSelection(s,"on"),this._modelElementName,{setImageSizes:r});if(!l)return null;const c=t.createRangeOn(l);for(const e of a){const i=e.getRange(),n="$graveyard"!=i.root.rootName?i.getJoined(c,!0):c;t.updateMarker(e,{range:n})}return{oldElement:s,newElement:l}})):null}}class _y extends Qo{static get requires(){return[ny]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("editingDowncast").add((e=>{e.on("attribute:placeholder",((e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;if(!t.item.is("element","imageBlock")&&!t.item.is("element","imageInline"))return;n.consumable.consume(t.item,e.name);const s=n.writer,o=n.mapper.toViewElement(t.item),r=i.findViewImgElement(o);t.attributeNewValue?(s.addClass("image_placeholder",r),s.setStyle("background-image",`url(${t.attributeNewValue})`,r),s.setCustomProperty("editingPipeline:doNotReuseOnce",!0,r)):(s.removeClass("image_placeholder",r),s.removeStyle("background-image",r))}))}))}_setupLoadListener(){const e=this.editor,t=e.model,i=e.editing,n=i.view,s=e.plugins.get("ImageUtils");n.addObserver(gy),this.listenTo(n.document,"imageLoaded",((e,o)=>{const r=n.domConverter.mapDomToView(o.target);if(!r)return;const a=s.getImageWidgetFromImageView(r);if(!a)return;const l=i.mapper.toModelElement(a);l&&l.hasAttribute("placeholder")&&t.enqueueChange({isUndoable:!1},(e=>{e.removeAttribute("placeholder",l)}))}))}}class yy extends Qo{static get requires(){return[by,wy,ny,_y,ab]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new vy(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>Q_(t)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:i})=>n.toImageWidget(Q_(i),i,t("image widget"))}),i.for("downcast").add(my(n,"imageBlock","src")).add(my(n,"imageBlock","alt")).add(uy(n,"imageBlock")),i.for("upcast").elementToElement({view:Y_(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,i,n)=>{if(!n.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const s=e.findViewImgElement(i.viewItem);if(!s||!n.consumable.test(s,{name:!0}))return;n.consumable.consume(i.viewItem,{name:!0,classes:"image"});const o=Es(n.convertItem(s,i.modelCursor).modelRange.getItems());o?(n.convertChildren(i.viewItem,o),n.updateConversionResult(o,i)):n.consumable.revert(i.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline");this.listenTo(s,"inputTransformation",((s,o)=>{const r=Array.from(o.content.getChildren());let a;if(!r.every(n.isInlineImageView))return;a=o.targetRanges?e.editing.mapper.toModelRange(o.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageBlock"===X_(t.schema,l)){const e=new pu(i.document),t=r.map((t=>e.createElement("figure",{class:"image"},t)));o.content=e.createDocumentFragment(t)}})),this.listenTo(s,"contentInsertion",((e,i)=>{"paste"===i.method&&t.change((e=>{const t=e.createRangeIn(i.content);for(const e of t.getItems())e.is("element","imageBlock")&&n.setImageNaturalSizeAttributes(e)}))}))}}class ky extends Fs{constructor(e,t=[]){super(e),this.focusTracker=new Ss,this.keystrokes=new Ps,this._focusables=new Ns,this.children=this.createCollection(),this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const e of t)this.children.add(e),this._focusables.add(e),e instanceof uf&&this._focusables.addMany(e.children);if(this._focusables.length>1)for(const e of this._focusables)Cy(e)&&(e.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()})));this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),s({view:this});for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}function Cy(e){return"focusCycler"in e}class Ay extends Qo{static get pluginName(){return"ImageInsertUI"}static get requires(){return[ny]}constructor(e){super(e),this._integrations=new Map,e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",(()=>{this.isImageSelected=i.isImage(t.getSelectedElement())}));const n=e=>this._createToolbarComponent(e);e.ui.componentFactory.add("insertImage",n),e.ui.componentFactory.add("imageInsert",n)}registerIntegration({name:e,observable:t,buttonViewCreator:i,formViewCreator:n,requiresForm:s}){this._integrations.has(e)&&k("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:i,formViewCreator:n,requiresForm:!!s})}_createToolbarComponent(e){const t=this.editor,i=e.t,n=this._prepareIntegrations();if(!n.length)return null;let s;const o=n[0];if(1==n.length){if(!o.requiresForm)return o.buttonViewCreator(!0);s=o.buttonViewCreator(!0)}else{const t=o.buttonViewCreator(!1);s=new Cm(e,t),s.tooltip=!0,s.bind("label").to(this,"isImageSelected",(e=>i(e?"Replace image":"Insert image")))}const r=this.dropdownView=Am(e,s),a=n.map((({observable:e})=>e));return r.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some((e=>e)))),r.once("change:isOpen",(()=>{const e=n.map((({formViewCreator:e})=>e(1==n.length))),i=new ky(t.locale,e);r.panelView.children.add(i)})),r}_prepareIntegrations(){const e=this.editor.config.get("image.insert.integrations"),t=[];if(!e.length)return k("image-insert-integrations-not-specified"),t;for(const i of e)this._integrations.has(i)?t.push(this._integrations.get(i)):["upload","assetManager","url"].includes(i)||k("image-insert-unknown-integration",{item:i});return t.length||k("image-insert-integrations-not-registered"),t}}class xy extends Qo{static get requires(){return[yy,Ob,hy,Ay]}static get pluginName(){return"ImageBlock"}}class Ty extends Qo{static get requires(){return[by,wy,ny,_y,ab]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new vy(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:i})=>n.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(i),i,t("image widget"))}),i.for("downcast").add(my(n,"imageInline","src")).add(my(n,"imageInline","alt")).add(uy(n,"imageInline")),i.for("upcast").elementToElement({view:Y_(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline");this.listenTo(s,"inputTransformation",((s,o)=>{const r=Array.from(o.content.getChildren());let a;if(!r.every(n.isBlockImageView))return;a=o.targetRanges?e.editing.mapper.toModelRange(o.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===X_(t.schema,l)){const e=new pu(i.document),t=r.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((i=>e.setAttribute(...i,n.findViewImgElement(t)))),t.getChild(0)):t));o.content=e.createDocumentFragment(t)}})),this.listenTo(s,"contentInsertion",((e,i)=>{"paste"===i.method&&t.change((e=>{const t=e.createRangeIn(i.content);for(const e of t.getItems())e.is("element","imageInline")&&n.setImageNaturalSizeAttributes(e)}))}))}}class Ey extends Qo{static get requires(){return[Ty,Ob,hy,Ay]}static get pluginName(){return"ImageInline"}}class Sy extends Qo{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[ny]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Py extends Xo{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(yy))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,s=n.getSelectedElement();if(!s){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=i.isImage(s),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(s):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageCaptionEditing"),s=this.editor.plugins.get("ImageUtils");let o=i.getSelectedElement();const r=n._getSavedCaption(o);s.isInlineImage(o)&&(this.editor.execute("imageTypeBlock"),o=i.getSelectedElement());const a=r||e.createElement("caption");e.append(a,o),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),s=t.plugins.get("ImageCaptionUtils");let o,r=i.getSelectedElement();r?o=s.getCaptionFromImageModelElement(r):(o=s.getCaptionFromModelSelection(i),r=o.parent),n._saveCaption(r,o),e.setSelection(r,"on"),e.remove(o)}}class Iy extends Qo{static get requires(){return[ny,Sy]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Py(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),s=e.t;e.conversion.for("upcast").elementToElement({view:e=>n.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>i.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:n})=>{if(!i.isBlockImage(e.parent))return null;const o=n.createEditableElement("figcaption");n.setCustomProperty("imageCaption",!0,o),o.placeholder=s("Enter image caption"),ar({view:t,element:o,keepOnFocus:!0});const r=e.parent.getAttribute("alt");return _b(o,n,{label:r?s("Caption for image: %0",[r]):s("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),s=e.commands.get("imageTypeBlock"),o=e=>{if(!e.return)return;const{oldElement:n,newElement:s}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=i.getCaptionFromImageModelElement(n);if(e)return void this._saveCaption(s,e)}const o=this._getSavedCaption(n);o&&this._saveCaption(s,o)};n&&this.listenTo(n,"execute",o,{priority:"low"}),s&&this.listenTo(s,"execute",o,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?_c.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const s=t.document.differ.getChanges();for(const t of s){if("alt"!==t.attributeKey)continue;const s=t.range.start.nodeAfter;if(i.isBlockImage(s)){const t=n.getCaptionFromImageModelElement(s);if(!t)return;e.editing.reconvertItem(t)}}}))}}class Vy extends Qo{static get requires(){return[Sy]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(s=>{const o=e.commands.get("toggleImageCaption"),r=new lo(s);return r.set({icon:um.caption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),r.bind("label").to(o,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(r,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const n=i.getCaptionFromModelSelection(e.model.document.selection);if(n){const i=e.editing.mapper.toViewElement(n);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",i)}))}e.editing.view.focus()})),r}))}}class Ry extends(G()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((i,n)=>{t.onload=()=>{const e=t.result;this._data=e,i(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class Oy extends Qo{constructor(){super(...arguments),this.loaders=new Ts,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[lm]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return k("filerepository-no-upload-adapter"),null;const t=new By(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof By?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,i)=>{e===t&&this._loadersMap.delete(i)}))}_updatePendingAction(){const e=this.editor.plugins.get(lm);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,i=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(i(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else e.remove(this._pendingAction),this._pendingAction=null}}class By extends(G()){constructor(e,t){super(),this.id=b(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Ry,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new y("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new y("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((i,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,i(e)})).catch((e=>{t.isFulfilled=!0,n(e)}))})),t}}class My extends lo{constructor(e){super(e),this.buttonView=this,this._fileInputView=new Ny(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",(()=>{this._fileInputView.open()})),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}class Ny extends Fs{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}function Fy(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function Dy(e){return new Promise(((t,i)=>{const n=e.getAttribute("src");fetch(n).then((e=>e.blob())).then((e=>{const i=Ly(e,n),s=i.replace("image/",""),o=new File([e],`image.${s}`,{type:i});t(o)})).catch((e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise(((t,i)=>{const n=Mn.document.createElement("img");n.addEventListener("load",(()=>{const e=Mn.document.createElement("canvas");e.width=n.width,e.height=n.height;e.getContext("2d").drawImage(n,0,0),e.toBlob((e=>e?t(e):i()))})),n.addEventListener("error",(()=>i())),n.src=e}))}(e).then((t=>{const i=Ly(t,e),n=i.replace("image/","");return new File([t],`image.${n}`,{type:i})}))}(n).then(t).catch(i):i(e)))}))}function Ly(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class zy extends Qo{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,i=i=>{const n=new My(i),s=e.commands.get("uploadImage"),o=e.config.get("image.upload.types"),r=Fy(o);return n.set({acceptedType:o.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0,label:t("Upload image from computer"),icon:um.imageUpload,tooltip:!0}),n.bind("isEnabled").to(s),n.on("done",((t,i)=>{const n=Array.from(i).filter((e=>r.test(e.type)));n.length&&(e.execute("uploadImage",{file:n}),e.editing.view.focus())})),n};if(e.ui.componentFactory.add("uploadImage",i),e.ui.componentFactory.add("imageUpload",i),e.plugins.has("ImageInsertUI")){const i=e.plugins.get("ImageInsertUI"),n=e.commands.get("uploadImage");i.registerIntegration({name:"upload",observable:n,buttonViewCreator:()=>{const n=e.ui.componentFactory.create("uploadImage");return n.bind("label").to(i,"isImageSelected",(e=>t(e?"Replace image from computer":"Upload image from computer"))),n},formViewCreator:()=>{const n=e.ui.componentFactory.create("uploadImage");return n.withText=!0,n.bind("label").to(i,"isImageSelected",(e=>t(e?"Replace from computer":"Upload from computer"))),n.on("execute",(()=>{i.dropdownView.isOpen=!1})),n}})}}}class Hy extends Qo{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,i)=>{const n=this.editor,s=t.item,o=s.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const r=n.plugins.get("ImageUtils"),a=n.plugins.get(Oy),l=o?t.attributeNewValue:null,c=this.placeholder,d=n.editing.mapper.toViewElement(s),h=i.writer;if("reading"==l)return $y(d,h),void Wy(r,c,d,h);if("uploading"==l){const e=a.loaders.get(o);return $y(d,h),void(e?(jy(d,h),function(e,t,i,n){const s=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),s),i.on("change:uploadedPercent",((e,t,i)=>{n.change((e=>{e.setStyle("width",i+"%",s)}))}))}(d,h,e,n.editing.view),function(e,t,i,n){if(n.data){const s=e.findViewImgElement(t);i.setAttribute("src",n.data,s)}}(r,d,h,e)):Wy(r,c,d,h))}"complete"==l&&a.loaders.get(o)&&function(e,t,i){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout((()=>{i.change((e=>e.remove(e.createRangeOn(n))))}),3e3)}(d,h,n.editing.view),function(e,t){qy(e,t,"progressBar")}(d,h),jy(d,h),function(e,t){t.removeClass("ck-appear",e)}(d,h)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function $y(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Wy(e,t,i,n){i.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",i);const s=e.findViewImgElement(i);s.getAttribute("src")!==t&&n.setAttribute("src",t,s),Uy(i,"placeholder")||n.insert(n.createPositionAfter(s),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function jy(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),qy(e,t,"placeholder")}function Uy(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function qy(e,t,i){const n=Uy(e,i);n&&t.remove(t.createRangeOn(n))}class Gy extends Xo{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=ys(e.file),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),s=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const o=i.getSelectedElement();if(t&&o&&n.isImage(o)){const t=this.editor.model.createPositionAfter(o);this._uploadImage(e,s,t)}else this._uploadImage(e,s)}))}_uploadImage(e,t,i){const n=this.editor,s=n.plugins.get(Oy).createLoader(e),o=n.plugins.get("ImageUtils");s&&o.insertImage({...t,uploadId:s.id},i)}}class Ky extends Qo{static get requires(){return[Oy,Jg,ab,ny]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,n=e.plugins.get(Oy),s=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline"),r=Fy(e.config.get("image.upload.types")),a=new Gy(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,i)=>{if(n=i.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const s=Array.from(i.dataTransfer.files).filter((e=>!!e&&r.test(e.type)));s.length&&(t.stop(),e.model.change((t=>{i.targetRanges&&t.setSelection(i.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.execute("uploadImage",{file:s})})))})),this.listenTo(o,"inputTransformation",((t,i)=>{const o=Array.from(e.editing.view.createRangeIn(i.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(s,e)&&!e.getAttribute("uploadProcessed"))).map((e=>({promise:Dy(e),imageElement:e})));if(!o.length)return;const r=new pu(e.editing.view.document);for(const e of o){r.setAttribute("uploadProcessed",!0,e.imageElement);const t=n.createLoader(e.promise);t&&(r.setAttribute("src","",e.imageElement),r.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),s=new Set;for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,o="$graveyard"==t.position.root.rootName;for(const t of Jy(e,i)){const e=t.getAttribute("uploadId");if(!e)continue;const i=n.loaders.get(e);i&&(o?s.has(e)||i.abort():(s.add(e),this._uploadImageElements.set(e,t),"idle"==i.status&&this._readAndUpload(i)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:i})=>{const n=i.urls?i.urls:i;this.editor.model.change((e=>{e.setAttribute("src",n.default,t),this._parseAndSetSrcsetAttributeOnImage(n,t,e),s.setImageNaturalSizeAttributes(t)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,i=t.model,n=t.locale.t,s=t.plugins.get(Oy),o=t.plugins.get(Jg),r=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))})),e.read().then((()=>{const n=e.upload(),s=a.get(e.id);if(l.isSafari){const e=t.editing.mapper.toViewElement(s),i=r.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!i.parent)return;const e=t.editing.view.domConverter.mapViewToDom(i.parent);if(!e)return;const n=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=n}))}return i.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",s)})),n})).then((t=>{i.enqueueChange({isUndoable:!1},(i=>{const n=a.get(e.id);i.setAttribute("uploadStatus","complete",n),this.fire("uploadComplete",{data:t,imageElement:n})})),c()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&o.showWarning(t,{title:n("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},(t=>{t.remove(a.get(e.id))})),c()}));function c(){i.enqueueChange({isUndoable:!1},(t=>{const i=a.get(e.id);t.removeAttribute("uploadId",i),t.removeAttribute("uploadStatus",i),a.delete(e.id)})),s.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const s=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");if(""!=s){const e={srcset:s};t.hasAttribute("width")||t.hasAttribute("height")||(e.width=n),i.setAttributes(e,t)}}}function Jy(e,t){const i=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>i.isImage(e.item))).map((e=>e.item))}class Zy extends Qo{static get pluginName(){return"ImageUpload"}static get requires(){return[Ky,zy,Hy]}}class Qy extends Fs{constructor(e){super(e),this.set("imageURLInputValue",""),this.set("isImageSelected",!1),this.set("isEnabled",!0),this.focusTracker=new Ss,this.keystrokes=new Ps,this._focusables=new Ns,this.focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.urlInputView=this._createUrlInputView(),this.insertButtonView=this._createInsertButton(),this.cancelButtonView=this._createCancelButton(),this._focusables.addMany([this.urlInputView,this.insertButtonView,this.cancelButtonView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-image-insert-url"]},children:[this.urlInputView,{tag:"div",attributes:{class:["ck","ck-image-insert-url__action-row"]},children:[this.insertButtonView,this.cancelButtonView]}]})}render(){super.render();for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createUrlInputView(){const e=this.locale,t=e.t,i=new Fo(e,Vm);return i.bind("label").to(this,"isImageSelected",(e=>t(e?"Update image URL":"Insert image via URL"))),i.bind("isEnabled").to(this),i.fieldView.placeholder="https://example.com/image.png",i.fieldView.bind("value").to(this,"imageURLInputValue",(e=>e||"")),i.fieldView.on("input",(()=>{this.imageURLInputValue=i.fieldView.element.value.trim()})),i}_createInsertButton(){const e=this.locale,t=e.t,i=new lo(e);return i.set({icon:um.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("label").to(this,"isImageSelected",(e=>t(e?"Update":"Insert"))),i.bind("isEnabled").to(this,"imageURLInputValue",this,"isEnabled",((...e)=>e.every((e=>e)))),i.delegate("execute").to(this,"submit"),i}_createCancelButton(){const e=this.locale,t=e.t,i=new lo(e);return i.set({label:t("Cancel"),icon:um.cancel,class:"ck-button-cancel",withText:!0}),i.bind("isEnabled").to(this),i.delegate("execute").to(this,"cancel"),i}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}}class Yy extends Qo{static get pluginName(){return"ImageInsertViaUrlUI"}static get requires(){return[Ay]}init(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI");const e=this.editor.commands.get("insertImage");this._imageInsertUI.registerIntegration({name:"url",observable:e,requiresForm:!0,buttonViewCreator:e=>this._createInsertUrlButton(e),formViewCreator:e=>this._createInsertUrlView(e)})}_createInsertUrlView(e){const t=this.editor,i=t.locale,n=i.t,s=t.commands.get("replaceImageSource"),o=t.commands.get("insertImage"),r=new Qy(i),a=e?null:new uf(i,[r]);return r.bind("isImageSelected").to(this._imageInsertUI),r.bind("isEnabled").toMany([o,s],"isEnabled",((...e)=>e.some((e=>e)))),r.imageURLInputValue=s.value||"",this._imageInsertUI.dropdownView.on("change:isOpen",(()=>{this._imageInsertUI.dropdownView.isOpen&&(r.imageURLInputValue=s.value||"",a&&(a.isCollapsed=!0))}),{priority:"low"}),r.on("submit",(()=>{s.isEnabled?t.execute("replaceImageSource",{source:r.imageURLInputValue}):t.execute("insertImage",{source:r.imageURLInputValue}),this._closePanel()})),r.on("cancel",(()=>this._closePanel())),a?(a.set({isCollapsed:!0}),a.bind("label").to(this._imageInsertUI,"isImageSelected",(e=>n(e?"Update image URL":"Insert image via URL"))),a):r}_createInsertUrlButton(e){const t=e?Uo:lo,i=this.editor,n=new t(i.locale),s=i.locale.t;return n.set({icon:um.imageUrl,tooltip:!0}),n.bind("label").to(this._imageInsertUI,"isImageSelected",(e=>s(e?"Update image URL":"Insert image via URL"))),n}_closePanel(){this.editor.editing.view.focus(),this._imageInsertUI.dropdownView.isOpen=!1}}class Xy extends Qo{static get pluginName(){return"ImageInsertViaUrl"}static get requires(){return[Yy,Ay]}}class ek extends Xo{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("resizedWidth")?this.value={width:t.getAttribute("resizedWidth"),height:null}:this.value=null}execute(e){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils"),s=n.getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},s&&i.change((t=>{t.setAttribute("resizedWidth",e.width,s),t.removeAttribute("resizedHeight",s),n.setImageNaturalSizeAttributes(s)}))}}class tk extends Qo{static get requires(){return[ny]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new ek(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils");t.conversion.for("downcast").add((t=>t.on(`attribute:resizedWidth:${e}`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,s=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,s),n.addClass("image_resized",s)):(n.removeStyle("width",s),n.removeClass("image_resized",s))})))),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:e=>({key:"style",value:{height:e}})}),t.conversion.for("editingDowncast").add((t=>t.on(`attribute:resizedHeight:${e}`,((t,n,s)=>{if(!s.consumable.consume(n.item,t.name))return;const o=s.writer,r=s.mapper.toViewElement(n.item),a="imageInline"===e?i.findViewImgElement(r):r;null!==n.attributeNewValue?o.setStyle("height",n.attributeNewValue,a):o.removeStyle("height",a)})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:e=>ty(e)?null:e.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:e=>ty(e)?null:e.getStyle("height")}})}}const ik={small:um.objectSizeSmall,medium:um.objectSizeMedium,large:um.objectSizeLarge,original:um.objectSizeFull};class nk extends Qo{static get requires(){return[tk]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:s}=e,o=n?n+this._resizeUnit:null;t.ui.componentFactory.add(i,(i=>{const n=new lo(i),r=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!ik[s])throw new y("imageresizebuttons-missing-icon",t,e);return n.set({label:a,icon:ik[s],tooltip:a,isToggleable:!0}),n.bind("isEnabled").to(this),n.bind("isOn").to(r,"value",sk(o)),this.listenTo(n,"execute",(()=>{t.execute("resizeImage",{width:o})})),n}))}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find((e=>!e.value)),s=s=>{const o=t.commands.get("resizeImage"),r=Am(s,Uo),a=r.buttonView,l=i("Resize image");return a.set({tooltip:l,commandValue:n.value,icon:ik.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:l,ariaLabelledBy:void 0}),a.bind("label").to(o,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(n))),r.bind("isEnabled").to(this),Em(r,(()=>this._getResizeDropdownListItemDefinitions(e,o)),{ariaLabel:i("Image resize list"),role:"menu"}),this.listenTo(r,"execute",(e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()})),r};t.ui.componentFactory.add("resizeImage",s),t.ui.componentFactory.add("imageResize",s)}_getOptionLabelValue(e,t=!1){const i=this.editor.t;return e.label?e.label:t?e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const i=new Ts;return e.map((e=>{const n=e.value?e.value+this._resizeUnit:null,s={type:"button",model:new Zg({commandName:"resizeImage",commandValue:n,label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null})};s.model.bind("isOn").to(t,"value",sk(n)),i.add(s)})),i}}function sk(e){return t=>null===e&&t===e||null!==t&&t.width===e}const ok="image_resized";class rk extends Qo{static get requires(){return[$b,ny]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils");t.addObserver(gy),this.listenTo(t.document,"imageLoaded",((n,s)=>{if(!s.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const o=e.editing.view.domConverter,r=o.domToView(s.target),a=i.getImageWidgetFromImageView(r);let l=this.editor.plugins.get($b).getResizerByViewElement(a);if(l)return void l.redraw();const c=e.editing.mapper,d=c.toModelElement(a);l=e.plugins.get($b).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:d,viewElement:a,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>o.mapViewToDom(c.toViewElement(d.parent)),isCentered(){const e=d.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(i){t.change((e=>{e.removeClass(ok,a)})),e.execute("resizeImage",{width:i})}}),l.on("updateSize",(()=>{a.hasClass(ok)||t.change((e=>{e.addClass(ok,a)}));const e="imageInline"===d.name?r:a;e.getStyle("height")&&t.change((t=>{t.removeStyle("height",e)}))})),l.bind("isEnabled").to(this)}))}}class ak extends Xo{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils");i.change((t=>{const s=e.value,{setImageSizes:o=!0}=e;let r=n.getClosestSelectedImageElement(i.document.selection);s&&this.shouldConvertImageType(s,r)&&(this.editor.execute(n.isBlockImage(r)?"imageTypeInline":"imageTypeBlock",{setImageSizes:o}),r=n.getClosestSelectedImageElement(i.document.selection)),!s||this._styles.get(s).isDefault?t.removeAttribute("imageStyle",r):t.setAttribute("imageStyle",s,r),o&&n.setImageNaturalSizeAttributes(r)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:lk,objectInline:ck,objectLeft:dk,objectRight:hk,objectCenter:uk,objectBlockLeft:mk,objectBlockRight:gk}=um,fk={get inline(){return{name:"inline",title:"In line",icon:ck,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:dk,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:mk,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:uk,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:hk,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:gk,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:uk,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:hk,modelElements:["imageBlock"],className:"image-style-side"}}},pk={full:lk,left:mk,right:gk,center:uk,inlineLeft:dk,inlineRight:hk,inline:ck},bk=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function wk(e){k("image-style-configuration-definition-invalid",e)}const vk={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map((e=>function(e){e="string"==typeof e?fk[e]?{...fk[e]}:{name:e}:function(e,t){const i={...t};for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(i[n]=e[n]);return i}(fk[e.name],e);"string"==typeof e.icon&&(e.icon=pk[e.icon]||e.icon);return e}(e))).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:i}){const{modelElements:n,name:s}=e;if(!(n&&n.length&&s))return wk({style:e}),!1;{const s=[t?"imageBlock":null,i?"imageInline":null];if(!n.some((e=>s.includes(e))))return k("image-style-missing-dependency",{style:e,missingPlugins:n.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...bk]:[]},warnInvalidStyle:wk,DEFAULT_OPTIONS:fk,DEFAULT_ICONS:pk,DEFAULT_DROPDOWN_DEFINITIONS:bk};function _k(e,t){for(const i of t)if(i.name===e)return i}class yk extends Qo{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[ny]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=vk,i=this.editor,n=i.plugins.has("ImageBlockEditing"),s=i.plugins.has("ImageInlineEditing");i.config.define("image.styles",t(n,s)),this.normalizedStyles=e({configuredStyles:i.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:s}),this._setupConversion(n,s),this._setupPostFixer(),i.commands.add("imageStyle",new ak(i,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,n=i.model.schema,s=(o=this.normalizedStyles,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=_k(t.attributeNewValue,o),s=_k(t.attributeOldValue,o),r=i.mapper.toViewElement(t.item),a=i.writer;s&&a.removeClass(s.className,r),n&&a.addClass(n.className,r)});var o;const r=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,i,n)=>{if(!i.modelRange)return;const s=i.viewItem,o=Es(i.modelRange.getItems());if(o&&n.schema.checkAttribute(o,"imageStyle"))for(const e of t[o.name])n.consumable.consume(s,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,o)}}(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",s),i.data.downcastDispatcher.on("attribute:imageStyle",s),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:figure",r,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:img",r,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(ny),n=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let s=!1;for(const o of t.differ.getChanges())if("insert"==o.type||"attribute"==o.type&&"imageStyle"==o.attributeKey){let t="insert"==o.type?o.position.nodeAfter:o.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!i.isImage(t))continue;const r=t.getAttribute("imageStyle");if(!r)continue;const a=n.get(r);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),s=!0)}return s}))}}class kk extends Qo{static get requires(){return[yk]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=Ck(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of i)this._createButton(e);const n=Ck([...t.filter(L),...vk.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of n)this._createDropdown(e,i)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,(n=>{let s;const{defaultItem:o,items:r,title:a}=e,l=r.filter((e=>t.find((({name:t})=>Ak(t)===e)))).map((e=>{const t=i.create(e);return e===o&&(s=t),t}));r.length!==l.length&&vk.warnInvalidStyle({dropdown:e});const c=Am(n,Cm),d=c.buttonView,h=d.arrowView;return xm(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:xk(a,s.label),class:null,tooltip:!0}),h.unbind("label"),h.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(Qr);return t<0?s.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(Qr);return xk(a,t<0?s.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(Qr))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(Qr)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:s.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(Qr))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(Ak(t),(i=>{const n=this.editor.commands.get("imageStyle"),s=new lo(i);return s.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(n,"isEnabled"),s.bind("isOn").to(n,"value",(e=>e===t)),s.on("execute",this._executeCommand.bind(this,t)),s}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function Ck(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}function Ak(e){return`imageStyle:${e}`}function xk(e,t){return(e?e+": ":"")+t}class Tk extends Qo{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new tr(e)),e.commands.add("outdent",new tr(e))}}const Ek='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',Sk='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>';class Pk extends Qo{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?Ek:Sk,s="ltr"==t.uiLanguageDirection?Sk:Ek;this._defineButton("indent",i("Increase indent"),n),this._defineButton("outdent",i("Decrease indent"),s)}_defineButton(e,t,i){const n=this.editor;n.ui.componentFactory.add(e,(s=>{const o=n.commands.get(e),r=new lo(s);return r.set({label:t,icon:i,tooltip:!0}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{n.execute(e),n.editing.view.focus()})),r}))}}class Ik extends Xo{constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=Es(this.editor.model.document.selection.getSelectedBlocks());e&&this._isIndentationChangeAllowed(e)?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=this._getBlocksToChange();e.change((e=>{for(const i of t){const t=i.getAttribute("blockIndent"),n=this._indentBehavior.getNextIndent(t);n?e.setAttribute("blockIndent",n,i):e.removeAttribute("blockIndent",i)}}))}_getBlocksToChange(){const e=this.editor.model.document.selection;return Array.from(e.getSelectedBlocks()).filter((e=>this._isIndentationChangeAllowed(e)))}_isIndentationChangeAllowed(e){const t=this.editor;if(!t.model.schema.checkAttribute(e,"blockIndent"))return!1;if(!t.plugins.has("DocumentListUtils"))return!0;if(!this._indentBehavior.isForward)return!0;return!t.plugins.get("DocumentListUtils").isListItemBlock(e)}}class Vk{constructor(e){this.isForward="forward"===e.direction,this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||"0");return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||"0");if(!(!e||e.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const i=t+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class Rk{constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t<this.classes.length-1:t>=0}getNextIndent(e){const t=this.classes.indexOf(e),i=this.isForward?1:-1;return this.classes[t+i]}}const Ok=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class Bk{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const n=i.writer,s=n.document.selection;for(const e of this._definitions){const o=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,o);for(const t in e.styles)n.setStyle(t,e.styles[t],o);n.setCustomProperty("link",!0,o),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(s.getFirstRange(),o):n.wrap(i.mapper.toViewRange(t.range),o):n.unwrap(i.mapper.toViewRange(t.range),o)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:i,mapper:n})=>{const s=n.toViewElement(t.item),o=Array.from(s.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const n=Is(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?i.addClass(t,o):i.setAttribute(e,t,o);e.classes&&i.addClass(e.classes,o);for(const t in e.styles)i.setStyle(t,e.styles[t],o)}else{for(const[e,t]of n)"class"===e?i.removeClass(t,o):i.removeAttribute(e,o);e.classes&&i.removeClass(e.classes,o);for(const t in e.styles)i.removeStyle(t,o)}}}))}}}const Mk=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Nk=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Fk=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Dk=/^((\w+:(\/{2,})?)|(\W))/i,Lk="Ctrl+K";function zk(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function Hk(e){const t=String(e);return function(e){const t=e.replace(Mk,"");return!!t.match(Nk)}(t)?t:"#"}function $k(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function Wk(e,t){const i=(n=e,Fk.test(n)?"mailto:":t);var n;const s=!!i&&!jk(e);return e&&s?i+e:e}function jk(e){return Dk.test(e)}function Uk(e){window.open(e,"_blank","noopener")}class qk extends Xo{constructor(){super(...arguments),this.manualDecorators=new Ts,this.automaticDecorators=new Bk}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()||Es(t.getSelectedBlocks());$k(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,t={}){const i=this.editor.model,n=i.document.selection,s=[],o=[];for(const e in t)t[e]?s.push(e):o.push(e);i.change((t=>{if(n.isCollapsed){const r=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=Gk(n);let l=up(r,"linkHref",n.getAttribute("linkHref"),i);n.getAttribute("linkHref")===a&&(l=this._updateLinkContent(i,t,l,e)),t.setAttribute("linkHref",e,l),s.forEach((e=>{t.setAttribute(e,!0,l)})),o.forEach((e=>{t.removeAttribute(e,l)})),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const o=Is(n.getAttributes());o.set("linkHref",e),s.forEach((e=>{o.set(e,!0)}));const{end:a}=i.insertContent(t.createText(e,o),r);t.setSelection(a)}["linkHref",...s,...o].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const r=i.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of r)this._isRangeToUpdate(e,a)&&l.push(e);for(const r of l){let a=r;if(1===l.length){const s=Gk(n);n.getAttribute("linkHref")===s&&(a=this._updateLinkContent(i,t,r,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),s.forEach((e=>{t.setAttribute(e,!0,a)})),o.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,n=i.getSelectedElement();return $k(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}_updateLinkContent(e,t,i,n){const s=t.createText(n,{linkHref:n});return e.insertContent(s,i)}}function Gk(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const i=t[0];return i.is("$text")||i.is("$textProxy")?i.data:null}}class Kk extends Xo{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();$k(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change((e=>{const s=i.isCollapsed?[up(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of s)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)}))}}class Jk extends(G()){constructor({id:e,label:t,attributes:i,classes:n,styles:s,defaultValue:o}){super(),this.id=e,this.set("value",void 0),this.defaultValue=o,this.label=t,this.attributes=i,this.classes=n,this.styles=s}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}const Zk="automatic",Qk=/^(https?:)?\/\//;class Yk extends Qo{static get pluginName(){return"LinkEditing"}static get requires(){return[Yf,Lf,ab]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:zk}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>zk(Hk(e),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 qk(e)),e.commands.add("unlink",new Kk(e));const t=function(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}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${o_(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===Zk))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode)));e.plugins.get(Yf).registerAttribute("linkHref"),gp(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:Zk,callback:e=>!!e&&Qk.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.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 Jk(e);i.add(n),t.conversion.for("downcast").attributeToElement({model:n.id,view:(e,{writer:t,schema:i},{item:s})=>{if((s.is("selection")||i.isInline(s))&&e){const e=t.createAttributeElement("a",n.attributes,{priority:5});n.classes&&t.addClass(n.classes,e);for(const i in n.styles)t.setStyle(i,n.styles[i],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(l.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const n=i.getAttribute("href");n&&(e.stop(),t.preventDefault(),Uk(n))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,i)=>{const n=e.commands.get("link").value;!!n&&i.keyCode===fs.enter&&i.altKey&&(t.stop(),Uk(n))}))}_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=Wk(n.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,n)}}))}))}}class Xk extends Fs{constructor(e,t){super(e),this.focusTracker=new Ss,this.keystrokes=new Ps,this._focusables=new Ns;const i=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),um.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),um.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),s({view:this});[this.urlInputView,...this._manualDecoratorSwitches,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()}_createUrlInput(){const e=this.locale.t,t=new Fo(this.locale,Vm);return t.label=e("Link URL"),t}_createButton(e,t,i,n){const s=new lo(this.locale);return s.set({label:e,icon:t,tooltip:!0}),s.extendTemplate({attributes:{class:i}}),n&&s.delegate("execute").to(this,n),s}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new co(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",((e,t)=>void 0===t&&void 0===e?!!i.defaultValue:!!e)),n.on("execute",(()=>{i.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Fs;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}class eC extends Fs{constructor(e){super(e),this.focusTracker=new Ss,this.keystrokes=new Ps,this._focusables=new Ns;const t=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(t("Edit link"),um.pencil,"edit"),this.set("href",void 0),this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].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()}_createButton(e,t,i){const n=new lo(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new lo(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&Hk(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||i("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const tC='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',iC="link-ui";class nC extends Qo{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Yg]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(gu),this._balloon=e.plugins.get(Yg),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:iC,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:iC,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new eC(e.locale),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(Lk,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,i=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),s=new(t(Xk))(e.locale,i);return s.urlInputView.fieldView.bind("value").to(i,"value"),s.urlInputView.bind("isEnabled").to(i,"isEnabled"),s.saveButtonView.bind("isEnabled").to(i),this.listenTo(s,"submit",(()=>{const{value:t}=s.urlInputView.fieldView.element,i=Wk(t,n);e.execute("link",i,s.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(s,"cancel",(()=>{this._closeFormView()})),s.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),s}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.ui.componentFactory.add("link",(e=>{const n=new lo(e);return n.isEnabled=!0,n.label=i("Link"),n.icon=tC,n.keystroke=Lk,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(Lk,((t,i)=>{i(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),e({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=o();const s=()=>{const e=this._getSelectedLinkElement(),t=o();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function o(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",s),this.listenTo(this._balloon,"change:visibleView",s)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let n;if(t.markers.has(iC)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(iC)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(i)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&fb(i))return sC(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=sC(i.start),s=sC(i.end);return n&&n==s&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(iC))t.updateMarker(iC,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(iC,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(iC,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(iC)&&e.change((e=>{e.removeMarker(iC)}))}}function sC(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const oC=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})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class rC extends Qo{static get requires(){return[Kf,Yk]}static get pluginName(){return"AutoLink"}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,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?up(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const i=this.editor.model,n=i.document.selection,s=n.getFirstPosition(),o=n.getLastPosition();let r=t.getJoined(this._expandLinkRange(i,s)||t);r&&(r=r.getJoined(this._expandLinkRange(i,o)||t)),r&&(r.start.isBefore(s)||r.end.isAfter(o))&&e.setSelection(r)}_enablePasteLinking(){const e=this.editor,t=e.model,i=t.document.selection,n=e.plugins.get("ClipboardPipeline"),s=e.commands.get("link");n.on("inputTransformation",((e,n)=>{if(!this.isEnabled||!s.isEnabled||i.isCollapsed)return;if(i.rangeCount>1)return;const o=i.getFirstRange(),r=n.dataTransfer.getData("text/plain");if(!r)return;const a=r.match(oC);a&&a[2]===r&&(t.change((e=>{this._selectEntireLinks(e,o),s.execute(r)})),e.stop())}),{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new Qf(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=aC(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,i)=>{const{batch:n,range:s,url:o}=i;if(!n.isTyping)return;const r=s.end.getShiftedBy(-1),a=r.getShiftedBy(-o.length),l=e.model.createRange(a,r);this._applyAutoLink(o,l)})),t.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();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);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 t=this.editor.model,{text:i,range:n}=Zf(e,t),s=aC(i);if(s){const e=t.createRange(n.end.getShiftedBy(-s.length),n.end);this._applyAutoLink(s,e)}}_applyAutoLink(e,t){const i=this.editor.model,n=Wk(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&jk(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((s=>{s.setAttribute("linkHref",e,t),i.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function aC(e){const t=oC.exec(e);return t?t[2]:null}class lC extends Qo{static get requires(){return["ImageEditing","ImageUtils",Yk]}static get pluginName(){return"LinkImageEditing"}init(){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,s)=>{const o=n.viewItem,r=i.findViewImgElement(o);if(!r)return;const a=r.findAncestor((e=>i.isBlockImageView(e)));if(t&&!a)return;const l={attributes:["href"]};if(!s.consumable.consume(o,l))return;const c=o.getAttribute("href");if(!c)return;let d=n.modelCursor.parent;if(!d.is("element","imageBlock")){const e=s.convertItem(r,n.modelCursor);n.modelRange=e.modelRange,n.modelCursor=e.modelCursor,d=n.modelCursor.nodeBefore}d&&d.is("element","imageBlock")&&s.writer.setAttribute("linkHref",c,d)}),{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 s=n.mapper.toViewElement(i.item),o=n.writer,r=Array.from(s.getChildren()).find((e=>e.is("element","a"))),a=t.findViewImgElement(s),l=a.parent.is("element","picture")?a.parent:a;if(r)i.attributeNewValue?o.setAttribute("href",i.attributeNewValue,r):(o.move(o.createRangeOn(l),o.createPositionAt(s,0)),o.remove(r));else{const e=o.createContainerElement("a",{href:i.attributeNewValue});o.insert(o.createPositionAt(s,0),e),o.move(o.createRangeOn(l),o.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(cC(i)),e.conversion.for("upcast").add(dC(e,i))}}function cC(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,((t,i,n)=>{const s=n.mapper.toViewElement(i.item),o=Array.from(s.getChildren()).find((e=>e.is("element","a")));if(o){for(const[t,i]of Is(e.attributes))n.writer.setAttribute(t,i,o);e.classes&&n.writer.addClass(e.classes,o);for(const t in e.styles)n.writer.setStyle(t,e.styles[t],o)}}))}}function dC(e,t){const i=e.plugins.has("ImageInlineEditing"),n=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,s,o)=>{const r=s.viewItem,a=n.findViewImgElement(r);if(!a)return;const l=a.findAncestor((e=>n.isBlockImageView(e)));if(i&&!l)return;const c=new br(t._createPattern()).match(r);if(!c)return;if(!o.consumable.consume(r,c.match))return;const d=s.modelCursor.nodeBefore||s.modelCursor.parent;o.writer.setAttribute(t.id,!0,d)}),{priority:"high"})}}class hC extends Qo{static get requires(){return[Yk,nC,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}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 lo(i),s=e.plugins.get("LinkUI"),o=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:tC,keystroke:Lk,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o,"isEnabled"),n.bind("isOn").to(o,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?s._addActionsView():s._showUI(!0)})),n}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}Symbol.iterator;Symbol.iterator;function uC(e,t){const i=t.mapper,n=t.writer,s="numbered"==e.getAttribute("listType")?"ol":"ul",o=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=CC,t}(n),r=n.createContainerElement(s,null);return n.insert(n.createPositionAt(r,0),o),i.bindElements(e,o),o}function mC(e,t,i,n){const s=t.parent,o=i.mapper,r=i.writer;let a=o.toViewPosition(n.createPositionBefore(e));const l=pC(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=o.toViewElement(l);a=r.breakContainer(r.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=o.toViewPosition(n.createPositionAt(c,"end"));const e=o.findMappedViewAncestor(a),t=function(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);a=t?r.createPositionBefore(t):r.createPositionAt(e,"end")}else a=o.toViewPosition(n.createPositionBefore(e));if(a=fC(a),r.insert(a,s),c&&"listItem"==c.name){const e=o.toViewElement(c),i=r.createRange(r.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of i)if(e.item.is("element","li")){const n=r.breakContainer(r.createPositionBefore(e.item)),s=e.item.parent,o=r.createPositionAt(t,"end");gC(r,o.nodeBefore,o.nodeAfter),r.move(r.createRangeOn(s),o),i._position=n}}else{const i=s.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const t of i.getChildren()){const i=o.toModelElement(t);if(!(i&&i.getAttribute("listIndent")>e.getAttribute("listIndent")))break;n=t}n&&(r.breakContainer(r.createPositionAfter(n)),r.move(r.createRangeOn(n.parent),r.createPositionAt(t,"end")))}}gC(r,s,s.nextSibling),gC(r,s.previousSibling,s)}function gC(e,t,i){return!t||!i||"ul"!=t.name&&"ol"!=t.name||t.name!=i.name||t.getAttribute("class")!==i.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function fC(e){return e.getLastMatchingPosition((e=>e.item.is("uiElement")))}function pC(e,t){const i=!!t.sameIndent,n=!!t.smallerIndent,s=t.listIndent;let o=e;for(;o&&"listItem"==o.name;){const e=o.getAttribute("listIndent");if(i&&s==e||n&&s>e)return o;o="forward"===t.direction?o.nextSibling:o.previousSibling}return null}function bC(e,t,i,n){e.ui.componentFactory.add(t,(s=>{const o=e.commands.get(t),r=new lo(s);return r.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),r.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),r}))}function wC(e,t){const i=[],n=e.parent,s={ignoreElementEnd:!1,startPosition:e,shallow:!0,direction:t},o=n.getAttribute("listIndent"),r=[...new yc(s)].filter((e=>e.item.is("element"))).map((e=>e.item));for(const e of r){if(!e.is("element","listItem"))break;if(e.getAttribute("listIndent")<o)break;if(!(e.getAttribute("listIndent")>o)){if(e.getAttribute("listType")!==n.getAttribute("listType"))break;if(e.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(e.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(e.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===t?i.unshift(e):i.push(e)}}return i}function vC(e){let t=[...e.document.selection.getSelectedBlocks()].filter((e=>e.is("element","listItem"))).map((t=>{const i=e.change((e=>e.createPositionAt(t,0)));return[...wC(i,"backward"),...wC(i,"forward")]})).flat();return t=[...new Set(t)],t}const _C=["disc","circle","square"],yC=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function kC(e){return _C.includes(e)?"bulleted":yC.includes(e)?"numbered":null}function CC(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:va.call(this)}const AC='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',xC='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>';class TC extends Qo{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;bC(this.editor,"numberedList",e("Numbered List"),AC),bC(this.editor,"bulletedList",e("Bulleted List"),xC)}}const EC={},SC={},PC={},IC=[{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"}];for(const{listStyle:e,typeAttribute:t,listType:i}of IC)EC[e]=i,SC[e]=t,t&&(PC[t]=e);class VC extends Fs{constructor(e,{enabledProperties:t,styleButtonViews:i,styleGridAriaLabel:n}){super(e),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new Ss,this.keystrokes=new Ps,this.focusables=new Ns;const s=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new qo({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),t.styles?(this.stylesView=this._createStylesView(i,n),this.children.add(this.stylesView)):s.push("ck-list-properties_without-styles"),(t.startIndex||t.reversed)&&(this._addNumberedListPropertyViews(t),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 e of this.stylesView.children)this.stylesView.focusTracker.add(e.element);o({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>Mn.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 e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}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(e,t){const i=new Fs(this.locale);return i.children=i.createCollection(),i.children.addMany(e),i.setTemplate({tag:"div",attributes:{"aria-label":t,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new Ss,i.keystrokes=new Ps,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(e){const t=this.locale.t,i=[];e.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),e.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),e.styles?(this.additionalPropertiesCollapsibleView=new uf(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:t("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((e,t,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const e=this.locale.t,t=new Fo(this.locale,Rm);return t.set({label:e("Start at"),class:"ck-numbered-list-properties__start-index"}),t.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),t.fieldView.on("input",(()=>{const i=t.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)||(i.checkValidity()?this.fire("listStart",{startIndex:n}):t.errorText=e("Start index must be greater than 0."))})),t}_createReversedSwitchButton(){const e=this.locale.t,t=new co(this.locale);return t.set({withText:!0,label:e("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),t.delegate("execute").to(this,"listReversed"),t}}class RC extends Qo{static get pluginName(){return"ListPropertiesUI"}init(){const e=this.editor,t=e.locale.t,i=e.config.get("list.properties");i.styles&&e.ui.componentFactory.add("bulletedList",OC({editor:e,parentCommandName:"bulletedList",buttonLabel:t("Bulleted List"),buttonIcon:xC,styleGridAriaLabel:t("Bulleted list styles toolbar"),styleDefinitions:[{label:t("Toggle the disc list style"),tooltip:t("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:t("Toggle the circle list style"),tooltip:t("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:t("Toggle the square list style"),tooltip:t("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}]})),(i.styles||i.startIndex||i.reversed)&&e.ui.componentFactory.add("numberedList",OC({editor:e,parentCommandName:"numberedList",buttonLabel:t("Numbered List"),buttonIcon:AC,styleGridAriaLabel:t("Numbered list styles toolbar"),styleDefinitions:[{label:t("Toggle the decimal list style"),tooltip:t("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:t("Toggle the decimal with leading zero list style"),tooltip:t("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the lower–roman list style"),tooltip:t("Lower–roman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the upper–roman list style"),tooltip:t("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the lower–latin list style"),tooltip:t("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the upper–latin list style"),tooltip:t("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}]}))}}function OC({editor:e,parentCommandName:t,buttonLabel:i,buttonIcon:n,styleGridAriaLabel:s,styleDefinitions:o}){const r=e.commands.get(t);return a=>{const l=Am(a,Cm),c=l.buttonView;return l.bind("isEnabled").to(r),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),c.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(r,"value",(e=>!!e)),l.once("change:isOpen",(()=>{const i=function({editor:e,dropdownView:t,parentCommandName:i,styleDefinitions:n,styleGridAriaLabel:s}){const o=e.locale,r=e.config.get("list.properties");let a=null;"numberedList"!=i&&(r.startIndex=!1,r.reversed=!1);if(r.styles){const t=e.commands.get("listStyle"),s=function({editor:e,listStyleCommand:t,parentCommandName:i}){const n=e.locale,s=e.commands.get(i);return({label:i,type:o,icon:r,tooltip:a})=>{const l=new lo(n);return l.set({label:i,icon:r,tooltip:a}),t.on("change:value",(()=>{l.isOn=t.value===o})),l.on("execute",(()=>{s.value?t.value!==o?e.execute("listStyle",{type:o}):e.execute("listStyle",{type:t.defaultType}):e.model.change((()=>{e.execute("listStyle",{type:o})}))})),l}}({editor:e,parentCommandName:i,listStyleCommand:t}),o="function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0;a=n.filter(o).map(s)}const l=new VC(o,{styleGridAriaLabel:s,enabledProperties:r,styleButtonViews:a});r.styles&&Pm(t,(()=>l.stylesView.children.find((e=>e.isOn))));if(r.startIndex){const t=e.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(t),l.startIndexFieldView.fieldView.bind("value").to(t),l.on("listStart",((t,i)=>e.execute("listStart",i)))}if(r.reversed){const t=e.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(t),l.reversedSwitchButtonView.bind("isOn").to(t,"value",(e=>!!e)),l.on("listReversed",(()=>{const i=t.value;e.execute("listReversed",{reversed:!i})}))}return l.delegate("execute").to(t),l}({editor:e,dropdownView:l,parentCommandName:t,styleGridAriaLabel:s,styleDefinitions:o});l.panelView.children.add(i)})),l.on("execute",(()=>{e.editing.view.focus()})),l}}class BC extends Xo{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let i=Array.from(t.selection.getSelectedBlocks());e.change((e=>{const t=i[i.length-1];let n=t.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>t.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const t of i){const i=t.getAttribute("listIndent")+this._indentBy;i<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",i,t)}this.fire("_executeCleanup",i)}))}_checkEnabled(){const e=Es(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),i=e.getAttribute("listType");let n=e.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=t;){if(n.getAttribute("listIndent")==t)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}class MC extends Xo{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document,n=Array.from(i.selection.getSelectedBlocks()).filter((e=>FC(e,t.schema))),s=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(s){let t=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,s=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e<i&&(i=e);const n=e-i;s.push({element:t,listIndent:n}),t=t.nextSibling}s=s.reverse();for(const t of s)e.setAttribute("listIndent",t.listIndent,t.element)}if(!s){let e=Number.POSITIVE_INFINITY;for(const t of n)t.is("element","listItem")&&t.getAttribute("listIndent")<e&&(e=t.getAttribute("listIndent"));e=0===e?1:e,NC(n,!0,e),NC(n,!1,e)}for(const t of n.reverse())s&&"listItem"==t.name?e.rename(t,"paragraph"):s||"listItem"==t.name?s||"listItem"!=t.name||t.getAttribute("listType")==this.type||e.setAttribute("listType",this.type,t):(e.setAttributes({listType:this.type,listIndent:0},t),e.rename(t,"listItem"));this.fire("_executeCleanup",n)}))}_getValue(){const e=Es(this.editor.model.document.selection.getSelectedBlocks());return!!e&&e.is("element","listItem")&&e.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=Es(e.getSelectedBlocks());return!!i&&FC(i,t)}}function NC(e,t,i){const n=t?e[0]:e[e.length-1];if(n.is("element","listItem")){let s=n[t?"previousSibling":"nextSibling"],o=n.getAttribute("listIndent");for(;s&&s.is("element","listItem")&&s.getAttribute("listIndent")>=i;)o>s.getAttribute("listIndent")&&(o=s.getAttribute("listIndent")),s.getAttribute("listIndent")==o&&e[t?"unshift":"push"](s),s=s[t?"previousSibling":"nextSibling"]}}function FC(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class DC extends Qo{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(e){return kC(e)}getSelectedListItems(e){return vC(e)}getSiblingNodes(e,t){return wC(e,t)}}function LC(e){return(t,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 o=i.item;mC(o,uC(o,n),n,e)}}const zC=(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const n=i.mapper.toViewElement(t.item),s=i.writer;s.breakContainer(s.createPositionBefore(n)),s.breakContainer(s.createPositionAfter(n));const o=n.parent,r="numbered"==t.attributeNewValue?"ol":"ul";s.rename(r,o)},HC=(e,t,i)=>{i.consumable.consume(t.item,e.name);const n=i.mapper.toViewElement(t.item).parent,s=i.writer;gC(s,n,n.nextSibling),gC(s,n.previousSibling,n)};const $C=(e,t,i)=>{if(i.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=i.mapper.toViewPosition(t.range.start);const n=i.writer,s=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=n.breakContainer(e),"li"==e.parent.name);){const t=e,i=n.createPositionAt(e.parent,"end");if(!t.isEqual(i)){const e=n.remove(n.createRange(t,i));s.push(e)}e=n.createPositionAfter(e.parent)}if(s.length>0){for(let t=0;t<s.length;t++){const i=e.nodeBefore;if(e=n.insert(e,s[t]).end,t>0){const t=gC(n,i,i.nextSibling);t&&t.parent==i&&e.offset--}}gC(n,e.nodeBefore,e.nodeAfter)}}},WC=(e,t,i)=>{const n=i.mapper.toViewPosition(t.position),s=n.nodeBefore,o=n.nodeAfter;gC(i.writer,s,o)},jC=(e,t,i)=>{if(i.consumable.consume(t.viewItem,{name:!0})){const e=i.writer,n=e.createElement("listItem"),s=function(e){let t=0,i=e.parent;for(;i;){if(i.is("element","li"))t++;else{const e=i.previousSibling;e&&e.is("element","li")&&t++}i=i.parent}return t}(t.viewItem);e.setAttribute("listIndent",s,n);const o=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",o,n),!i.safeInsert(n,t.modelCursor))return;const r=function(e,t,i){const{writer:n,schema:s}=i;let o=n.createPositionAfter(e);for(const r of t)if("ul"==r.name||"ol"==r.name)o=i.convertItem(r,o).modelCursor;else{const t=i.convertItem(r,n.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!s.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:JC(t.modelCursor),o=n.createPositionAfter(e))}return o}(n,t.viewItem.getChildren(),i);t.modelRange=e.createRange(t.modelCursor,r),i.updateConversionResult(n,t)}},UC=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e){!(t.is("element","li")||QC(t))&&t._remove()}}},qC=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let i=!1;for(const t of e)i&&!QC(t)&&t._remove(),QC(t)&&(i=!0)}};function GC(e){return(t,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const t=i.mapper.toViewElement(n),s=t.getAncestors().find(QC),o=e.createPositionAt(t,0).getWalker();for(const e of o){if("elementStart"==e.type&&e.item.is("element","li")){i.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==s){i.viewPosition=e.nextPosition;break}}}}}const KC=function(e,[t,i]){const n=this;let s,o=t.is("documentFragment")?t.getChild(0):t;if(s=i?n.createSelection(i):n.document.selection,o&&o.is("element","listItem")){const e=s.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}};function JC(e){const t=new yc({startPosition:e});let i;do{i=t.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function ZC(e,t,i,n,s,o){const r=pC(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e}),a=s.mapper,l=s.writer,c=r?r.getAttribute("listIndent"):null;let d;if(r)if(c==e){const e=a.toViewElement(r).parent;d=l.createPositionAfter(e)}else{const e=o.createPositionAt(r,"end");d=a.toViewPosition(e)}else d=i;d=fC(d);for(const e of[...n.getChildren()])QC(e)&&(d=l.move(l.createRangeOn(e),d).end,gC(l,e,e.nextSibling),gC(l,e.previousSibling,e))}function QC(e){return e.is("element","ol")||e.is("element","ul")}class YC extends Qo{static get pluginName(){return"ListEditing"}static get requires(){return[Up,Kf,DC]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,i=e.editing;var n;e.model.document.registerPostFixer((t=>function(e,t){const i=e.document.differ.getChanges(),n=new Map;let s=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)o(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",i),s=!0),i.hasAttribute("listType")&&(t.removeAttribute("listType",i),s=!0),i.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",i),s=!0),i.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",i),s=!0),i.hasAttribute("listStart")&&(t.removeAttribute("listStart",i),s=!0);for(const t of Array.from(e.createRangeIn(i)).filter((e=>e.item.is("element","listItem"))))o(t.previousPosition)}o(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?o(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&o(n.range.start);for(const e of n.values())r(e),a(e);return s;function o(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(n.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,n.has(e))return;n.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&n.set(t,t)}}function r(e){let i=0,n=null;for(;e&&e.is("element","listItem");){const o=e.getAttribute("listIndent");if(o>i){let r;null===n?(n=o-i,r=i):(n>o&&(n=o),r=o-n),t.setAttribute("listIndent",r,e),s=!0}else n=null,i=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let i=[],n=null;for(;e&&e.is("element","listItem");){const o=e.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>o&&(i=i.slice(0,o+1)),0!=o)if(i[o]){const n=i[o];e.getAttribute("listType")!=n&&(t.setAttribute("listType",n,e),s=!0)}else i[o]=e.getAttribute("listType");n=e,e=e.nextSibling}}}(e.model,t))),i.mapper.registerViewToModelLength("li",XC),t.mapper.registerViewToModelLength("li",XC),i.mapper.on("modelToViewPosition",GC(i.view)),i.mapper.on("viewToModelPosition",(n=e.model,(e,t)=>{const i=t.viewPosition,s=i.parent,o=t.mapper;if("ul"==s.name||"ol"==s.name){if(i.isAtEnd){const e=o.toModelElement(i.nodeBefore),s=o.getModelLength(i.nodeBefore);t.modelPosition=n.createPositionBefore(e).getShiftedBy(s)}else{const e=o.toModelElement(i.nodeAfter);t.modelPosition=n.createPositionBefore(e)}e.stop()}else if("li"==s.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const r=o.toModelElement(s);let a=1,l=i.nodeBefore;for(;l&&QC(l);)a+=o.getModelLength(l),l=l.previousSibling;t.modelPosition=n.createPositionBefore(r).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",GC(i.view)),e.conversion.for("editingDowncast").add((t=>{t.on("insert",$C,{priority:"high"}),t.on("insert:listItem",LC(e.model)),t.on("attribute:listType:listItem",zC,{priority:"high"}),t.on("attribute:listType:listItem",HC,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const s=n.mapper.toViewElement(i.item),o=n.writer;o.breakContainer(o.createPositionBefore(s)),o.breakContainer(o.createPositionAfter(s));const r=s.parent,a=r.previousSibling,l=o.createRangeOn(r);o.remove(l),a&&a.nextSibling&&gC(o,a,a.nextSibling),ZC(i.attributeOldValue+1,i.range.start,l.start,s,n,e),mC(i.item,s,n,e);for(const e of i.item.getChildren())n.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,i,n)=>{const s=n.mapper.toViewPosition(i.position).getLastMatchingPosition((e=>!e.item.is("element","li"))).nodeAfter,o=n.writer;o.breakContainer(o.createPositionBefore(s)),o.breakContainer(o.createPositionAfter(s));const r=s.parent,a=r.previousSibling,l=o.createRangeOn(r),c=o.remove(l);a&&a.nextSibling&&gC(o,a,a.nextSibling),ZC(n.mapper.toModelElement(s).getAttribute("listIndent")+1,i.position,l.start,s,n,e);for(const e of o.createRangeIn(c).getItems())n.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",WC,{priority:"low"})})),e.conversion.for("dataDowncast").add((t=>{t.on("insert",$C,{priority:"high"}),t.on("insert:listItem",LC(e.model))})),e.conversion.for("upcast").add((e=>{e.on("element:ul",UC,{priority:"high"}),e.on("element:ol",UC,{priority:"high"}),e.on("element:li",qC,{priority:"high"}),e.on("element:li",jC)})),e.model.on("insertContent",KC,{priority:"high"}),e.commands.add("numberedList",new MC(e,"numbered")),e.commands.add("bulletedList",new MC(e,"bulleted")),e.commands.add("indentList",new BC(e,"forward")),e.commands.add("outdentList",new BC(e,"backward"));const s=i.view.document;this.listenTo(s,"enter",((e,t)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(s,"delete",((e,t)=>{if("backward"!==t.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"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(e.editing.view.document,"tab",((t,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),i&&i.registerChildCommand(e.get("outdentList"))}}function XC(e){let t=1;for(const i of e.getChildren())if("ul"==i.name||"ol"==i.name)for(const e of i.getChildren())t+=XC(e);return t}class eA extends Xo{constructor(e,t){super(e),this.defaultType=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){this._tryToConvertItemsToList(e);const t=this.editor.model,i=vC(t);i.length&&t.change((t=>{for(const n of i)t.setAttribute("listStyle",e.type||this.defaultType,n)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=kC(e.type);if(!t)return;const i=this.editor,n=`${t}List`;i.commands.get(n).value||i.execute(n)}}class tA extends Xo{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,i=vC(t).filter((e=>"numbered"==e.getAttribute("listType")));t.change((t=>{for(const n of i)t.setAttribute("listReversed",!!e.reversed,n)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}class iA extends Xo{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,i=vC(t).filter((e=>"numbered"==e.getAttribute("listType")));t.change((t=>{for(const n of i)t.setAttribute("listStart",e>=0?e:1,n)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const nA="default";class sA extends Qo{static get requires(){return[YC]}static get pluginName(){return"ListPropertiesEditing"}constructor(e){super(e),e.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const e=this.editor,t=e.model,i=function(e){const t=[];e.styles&&t.push({attributeName:"listStyle",defaultValue:nA,addCommand(e){e.commands.add("listStyle",new eA(e,nA))},appliesToListItem:()=>!0,setAttributeOnDowncast(e,t,i){t&&t!==nA?e.setStyle("list-style-type",t,i):e.removeStyle("list-style-type",i)},getAttributeOnUpcast:e=>e.getStyle("list-style-type")||nA});e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,addCommand(e){e.commands.add("listReversed",new tA(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")});e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,addCommand(e){e.commands.add("listStart",new iA(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}});return t}(e.config.get("list.properties"));t.schema.extend("listItem",{allowAttributes:i.map((e=>e.attributeName))});for(const t of i)t.addCommand(e);var n;this.listenTo(e.commands.get("indentList"),"_executeCleanup",function(e,t){return(i,n)=>{const s=n[0],o=s.getAttribute("listIndent"),r=n.filter((e=>e.getAttribute("listIndent")===o));let a=null;s.previousSibling.getAttribute("listIndent")+1!==o&&(a=pC(s.previousSibling,{sameIndent:!0,direction:"backward",listIndent:o})),e.model.change((e=>{for(const i of r)for(const n of t)if(n.appliesToListItem(i)){const t=null==a?n.defaultValue:a.getAttribute(n.attributeName);e.setAttribute(n.attributeName,t,i)}}))}}(e,i)),this.listenTo(e.commands.get("outdentList"),"_executeCleanup",function(e,t){return(i,n)=>{if(!(n=n.reverse().filter((e=>e.is("element","listItem")))).length)return;const s=n[0].getAttribute("listIndent"),o=n[0].getAttribute("listType");let r=n[0].previousSibling;if(r.is("element","listItem"))for(;r.getAttribute("listIndent")!==s;)r=r.previousSibling;else r=null;r||(r=n[n.length-1].nextSibling),r&&r.is("element","listItem")&&r.getAttribute("listType")===o&&e.model.change((e=>{const i=n.filter((e=>e.getAttribute("listIndent")===s));for(const n of i)for(const i of t)if(i.appliesToListItem(n)){const t=i.attributeName,s=r.getAttribute(t);e.setAttribute(t,s,n)}}))}}(e,i)),this.listenTo(e.commands.get("bulletedList"),"_executeCleanup",aA(e)),this.listenTo(e.commands.get("numberedList"),"_executeCleanup",aA(e)),t.document.registerPostFixer(function(e,t){return i=>{let n=!1;const s=lA(e.model.document.differ.getChanges()).filter((e=>"todo"!==e.getAttribute("listType")));if(!s.length)return n;let o=s[s.length-1].nextSibling;if((!o||!o.is("element","listItem"))&&(o=s[0].previousSibling,o)){const e=s[0].getAttribute("listIndent");for(;o.is("element","listItem")&&o.getAttribute("listIndent")!==e&&(o=o.previousSibling,o););}for(const e of t){const t=e.attributeName;for(const r of s)if(e.appliesToListItem(r))if(r.hasAttribute(t)){const s=r.previousSibling;rA(s,r,e.attributeName)&&(i.setAttribute(t,s.getAttribute(t),r),n=!0)}else oA(o,r,e)?i.setAttribute(t,o.getAttribute(t),r):i.setAttribute(t,e.defaultValue,r),n=!0;else i.removeAttribute(t,r)}return n}}(e,i)),e.conversion.for("upcast").add((n=i,e=>{e.on("element:li",((e,t,i)=>{if(!t.modelRange)return;const s=t.viewItem.parent,o=t.modelRange.start.nodeAfter||t.modelRange.end.nodeBefore;for(const e of n)if(e.appliesToListItem(o)){const t=e.getAttributeOnUpcast(s);i.writer.setAttribute(e.attributeName,t,o)}}),{priority:"low"})})),e.conversion.for("downcast").add(function(e){return i=>{for(const n of e)i.on(`attribute:${n.attributeName}:listItem`,((e,i,s)=>{const o=s.writer,r=i.item,a=pC(r.previousSibling,{sameIndent:!0,listIndent:r.getAttribute("listIndent"),direction:"backward"}),l=s.mapper.toViewElement(r);t(r,a)||o.breakContainer(o.createPositionBefore(l)),n.setAttributeOnDowncast(o,i.attributeNewValue,l.parent)}),{priority:"low"})};function t(e,t){return t&&e.getAttribute("listType")===t.getAttribute("listType")&&e.getAttribute("listIndent")===t.getAttribute("listIndent")&&e.getAttribute("listStyle")===t.getAttribute("listStyle")&&e.getAttribute("listReversed")===t.getAttribute("listReversed")&&e.getAttribute("listStart")===t.getAttribute("listStart")}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const e=this.editor;e.commands.get("todoList")&&e.model.document.registerPostFixer(function(e){return t=>{const i=lA(e.model.document.differ.getChanges()).filter((e=>"todo"===e.getAttribute("listType")&&(e.hasAttribute("listStyle")||e.hasAttribute("listReversed")||e.hasAttribute("listStart"))));if(!i.length)return!1;for(const e of i)t.removeAttribute("listStyle",e),t.removeAttribute("listReversed",e),t.removeAttribute("listStart",e);return!0}}(e))}_mergeListAttributesWhileMergingLists(e){const t=this.editor.model;let i;this.listenTo(t,"deleteContent",((e,[t])=>{const n=t.getFirstPosition(),s=t.getLastPosition();if(n.parent===s.parent)return;if(!n.parent.is("element","listItem"))return;const o=s.parent.nextSibling;if(!o||!o.is("element","listItem"))return;const r=pC(n.parent,{sameIndent:!0,listIndent:o.getAttribute("listIndent")});r&&r.getAttribute("listType")===o.getAttribute("listType")&&(i=r)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(t.change((t=>{const n=pC(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!n)return void(i=null);const s=[n,...wC(t.createPositionAt(n,0),"forward")];for(const n of s)for(const s of e)if(s.appliesToListItem(n)){const e=s.attributeName,o=i.getAttribute(e);t.setAttribute(e,o,n)}})),i=null)}),{priority:"low"})}}function oA(e,t,i){if(!e)return!1;const n=e.getAttribute(i.attributeName);return!!n&&(n!=i.defaultValue&&e.getAttribute("listType")===t.getAttribute("listType"))}function rA(e,t,i){if(!e||!e.is("element","listItem"))return!1;if(t.getAttribute("listType")!==e.getAttribute("listType"))return!1;const n=e.getAttribute("listIndent");if(n<1||n!==t.getAttribute("listIndent"))return!1;const s=e.getAttribute(i);return!(!s||s===t.getAttribute(i))}function aA(e){return(t,i)=>{i=i.filter((e=>e.is("element","listItem"))),e.model.change((e=>{for(const t of i)e.removeAttribute("listStyle",t)}))}}function lA(e){const t=[];for(const i of e){const e=cA(i);e&&e.is("element","listItem")&&t.push(e)}return t}function cA(e){return"attribute"===e.type?e.range.start.nodeAfter:"insert"===e.type?e.position.nodeAfter:null}ws("Ctrl+Enter");ws("Ctrl+Enter");function dA(e,t){if(!e.childCount)return;const i=new pu(e.document),n=function(e,t){const i=t.createRangeIn(e),n=new br({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),s=[];for(const e of i)if("elementStart"===e.type&&n.match(e.item)){const t=mA(e.item);s.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return s}(e,i);if(!n.length)return;let s=null,o=1;n.forEach(((e,r)=>{const a=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const i=t.element.previousSibling;if(!i)return!0;return n=i,!(n.is("element","ol")||n.is("element","ul"));var n}(n[r-1],e),l=a?null:n[r-1],c=(h=e,(d=l)?h.indent-d.indent:h.indent-1);var d,h;if(a&&(s=null,o=1),!s||0!==c){const n=function(e,t){const i=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,s=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,o=i.exec(t);let r="decimal",a="ol",l=null;if(o&&o[1]){const t=n.exec(o[1]);if(t&&t[1]&&(r=t[1].trim(),a="bullet"!==r&&"image"!==r?"ol":"ul"),"bullet"===r){const t=function(e){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 i=t._data;if("o"===i)return"circle";if("·"===i)return"disc";if("§"===i)return"square";return null}(e.element);t&&(r=t)}else{const e=s.exec(o[1]);e&&e[1]&&(l=parseInt(e[1]))}}return{type:a,startIndex:l,style:hA(r)}}(e,t);if(s){if(e.indent>o){const e=s.getChild(s.childCount-1),t=e.getChild(e.childCount-1);s=uA(n,t,i),o+=1}else if(e.indent<o){const t=o-e.indent;s=function(e,t){const i=e.getAncestors({parentFirst:!0});let n=null,s=0;for(const e of i)if((e.is("element","ul")||e.is("element","ol"))&&s++,s===t){n=e;break}return n}(s,t),o=e.indent}}else s=uA(n,e.element,i);e.indent<=o&&(s.is("element",n.type)||(s=i.rename(n.type,s)))}const u=function(e,t){return function(e,t){const i=new br({name:"span",styles:{"mso-list":"Ignore"}}),n=t.createRangeIn(e);for(const e of n)"elementStart"===e.type&&i.match(e.item)&&t.remove(e.item)}(e,t),t.removeStyle("text-indent",e),t.rename("li",e)}(e.element,i);i.appendChild(u,s)}))}function hA(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 uA(e,t,i){const n=t.parent,s=i.createElement(e.type),o=n.getChildIndex(t)+1;return i.insertChild(o,s,n),e.style&&i.setStyle("list-style-type",e.style,s),e.startIndex&&e.startIndex>1&&i.setAttribute("start",e.startIndex,s),s}function mA(e){const t={},i=e.getStyle("mso-list");if(i){const e=i.match(/(^|\s{1,100})l(\d+)/i),n=i.match(/\s{0,100}lfo(\d+)/i),s=i.match(/\s{0,100}level(\d+)/i);e&&n&&s&&(t.id=e[2],t.order=n[1],t.indent=parseInt(s[1]))}return t}function gA(e,t){if(!e.childCount)return;const i=new pu(e.document),n=function(e,t){const i=t.createRangeIn(e),n=new br({name:/v:(.+)/}),s=[];for(const e of i){if("elementStart"!=e.type)continue;const t=e.item,i=t.previousSibling,o=i&&i.is("element")?i.name:null;n.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==o&&s.push(e.item.getAttribute("id"))}return s}(e,i);!function(e,t,i){const n=i.createRangeIn(t),s=new br({name:"img"}),o=[];for(const t of n)if(t.item.is("element")&&s.match(t.item)){const i=t.item,n=i.getAttribute("v:shapes")?i.getAttribute("v:shapes").split(" "):[];n.length&&n.every((t=>e.indexOf(t)>-1))?o.push(i):i.getAttribute("src")||o.push(i)}for(const e of o)i.remove(e)}(n,e,i),function(e,t,i){const n=i.createRangeIn(t),s=[];for(const t of n)if("elementStart"==t.type&&t.item.is("element","v:shape")){const i=t.item.getAttribute("id");if(e.includes(i))continue;o(t.item.parent.getChildren(),i)||s.push(t.item)}for(const e of s){const t={src:r(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const n=i.createElement("img",t);i.insertChild(e.index+1,n,e.parent)}function o(e,t){for(const i of e)if(i.is("element")){if("img"==i.name&&i.getAttribute("v:shapes")==t)return!0;if(o(i.getChildren(),t))return!0}return!1}function r(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(n,e,i),function(e,t){const i=t.createRangeIn(e),n=new br({name:/v:(.+)/}),s=[];for(const e of i)"elementStart"==e.type&&n.match(e.item)&&s.push(e.item);for(const e of s)t.remove(e)}(e,i);const s=function(e,t){const i=t.createRangeIn(e),n=new br({name:"img"}),s=[];for(const e of i)e.item.is("element")&&n.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&s.push(e.item);return s}(e,i);s.length&&function(e,t,i){if(e.length===t.length)for(let n=0;n<e.length;n++){const s=`data:${t[n].type};base64,${fA(t[n].hex)}`;i.setAttribute("src",s,e[n])}}(s,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,i=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),n=e.match(i),s=[];if(n)for(const e of n){let i=!1;e.includes("\\pngblip")?i="image/png":e.includes("\\jpegblip")&&(i="image/jpeg"),i&&s.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:i})}return s}(t),i)}function fA(e){return btoa(e.match(/\w{2}/g).map((e=>String.fromCharCode(parseInt(e,16)))).join(""))}const pA=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,bA=/xmlns:o="urn:schemas-microsoft-com/i;class wA{constructor(e){this.document=e}isActive(e){return pA.test(e)||bA.test(e)}execute(e){const{body:t,stylesString:i}=e._parsedData;dA(t,i),gA(t,e.dataTransfer.getData("text/rtf")),function(e){const t=[],i=new pu(e.document);for(const{item:n}of i.createRangeIn(e))if(n.is("element")){for(const e of n.getClassNames())/\bmso/gi.exec(e)&&i.removeClass(e,n);for(const e of n.getStyleNames())/\bmso/gi.exec(e)&&i.removeStyle(e,n);n.is("element","w:sdt")&&t.push(n)}for(const e of t){const t=e.parent,n=t.getChildIndex(e);i.insertChild(n,e.getChildren(),t),i.remove(e)}}(t),e.content=t}}function vA(e,t,i,{blockElements:n,inlineObjectElements:s}){let o=i.createPositionAt(e,"forward"==t?"after":"before");return o=o.getLastMatchingPosition((({item:e})=>e.is("element")&&!n.includes(e.name)&&!s.includes(e.name)),{direction:t}),"forward"==t?o.nodeAfter:o.nodeBefore}function _A(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const yA=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class kA{constructor(e){this.document=e}isActive(e){return yA.test(e)}execute(e){const t=new pu(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","b")&&"normal"===i.getStyle("font-weight")){const n=e.getChildIndex(i);t.remove(i),t.insertChild(n,i.getChildren(),e)}}(i,t),function(e,t){for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","li")){const i=e.getChild(0);i&&i.is("element","p")&&t.unwrapElement(i)}}}(i,t),function(e,t){const i=new Na(t.document.stylesProcessor),n=new xl(i,{renderingMode:"data"}),s=n.blockElements,o=n.inlineObjectElements,r=[];for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","br")){const i=vA(e,"forward",t,{blockElements:s,inlineObjectElements:o}),n=vA(e,"backward",t,{blockElements:s,inlineObjectElements:o}),a=_A(i,s);(_A(n,s)||a)&&r.push(e)}}for(const e of r)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(i,t),e.content=i}}const CA=/<google-sheets-html-origin/i;class AA{constructor(e){this.document=e}isActive(e){return CA.test(e)}execute(e){const t=new pu(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","google-sheets-html-origin")){const n=e.getChildIndex(i);t.remove(i),t.insertChild(n,i.getChildren(),e)}}(i,t),function(e,t){for(const i of e.getChildren())i.is("element","table")&&i.hasAttribute("xmlns")&&t.removeAttribute("xmlns",i)}(i,t),function(e,t){for(const i of e.getChildren())i.is("element","table")&&"0px"===i.getStyle("width")&&t.removeStyle("width",i)}(i,t),function(e,t){for(const i of Array.from(e.getChildren()))i.is("element","style")&&t.remove(i)}(i,t),e.content=i}}function xA(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 TA(e,t){const i=new DOMParser,n=function(e){return xA(xA(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(e){const t="</body>",i="</html>",n=e.indexOf(t);if(n<0)return e;const s=e.indexOf(i,n+t.length);return e.substring(0,n+t.length)+(s>=0?e.substring(s):"")}(e=(e=e.replace(/<!--\[if gte vml 1]>/g,"")).replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,""))),s=i.parseFromString(n,"text/html");!function(e){e.querySelectorAll("span[style*=spacerun]").forEach((e=>{const t=e,i=t.innerText.length||0;t.innerText=Array(i+1).join("  ").substr(0,i)}))}(s);const o=s.body.innerHTML,r=function(e,t){const i=new Na(t),n=new xl(i,{renderingMode:"data"}),s=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)s.appendChild(o[0]);return n.domToView(s,{skipComments:!0})}(s,t),a=function(e){const t=[],i=[],n=Array.from(e.getElementsByTagName("style"));for(const e of n)e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length&&(t.push(e.sheet),i.push(e.innerHTML));return{styles:t,stylesString:i.join(" ")}}(s);return{body:r,bodyString:o,styles:a.styles,stylesString:a.stylesString}}const EA="removeFormat";class SA extends Qo{static get pluginName(){return"RemoveFormatUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(EA,(i=>{const n=e.commands.get(EA),s=new lo(i);return s.set({label:t("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(EA),e.editing.view.focus()})),s}))}}class PA extends Xo{refresh(){const e=this.editor.model;this.isEnabled=!!Es(this._getFormattingItems(e.document.selection,e.schema))}execute(){const e=this.editor.model,t=e.schema;e.change((i=>{for(const n of this._getFormattingItems(e.document.selection,t))if(n.is("selection"))for(const e of this._getFormattingAttributes(n,t))i.removeSelectionAttribute(e);else{const e=i.createRangeOn(n);for(const s of this._getFormattingAttributes(n,t))i.removeAttribute(s,e)}}))}*_getFormattingItems(e,t){const i=e=>!!Es(this._getFormattingAttributes(e,t));for(const n of e.getRanges())for(const e of n.getItems())!t.isBlock(e)&&i(e)&&(yield e);for(const t of e.getSelectedBlocks())i(t)&&(yield t);i(e)&&(yield e)}*_getFormattingAttributes(e,t){for(const[i]of e.getAttributes()){const e=t.getAttributeProperties(i);e&&e.isFormatting&&(yield i)}}}class IA extends Qo{static get pluginName(){return"RemoveFormatEditing"}init(){const e=this.editor;e.commands.add("removeFormat",new PA(e))}}function VA(e,t){const{modelAttribute:i,styleName:n,viewElement:s,defaultValue:o,reduceBoxSides:r=!1,shouldUpcast:a=(()=>!0)}=t;e.for("upcast").attributeToAttribute({view:{name:s,styles:{[n]:/[\s\S]+/}},model:{key:i,value:e=>{if(!a(e))return;const t=e.getNormalizedStyle(n),i=r?MA(t):t;return o!==i?i:void 0}}})}function RA(e,t,i,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,s)=>{if(!t.modelRange)return;const o=["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(!o.length)return;const r={styles:o};if(!s.consumable.test(t.viewItem,r))return;const a=[...t.modelRange.getItems({shallow:!0})].pop();s.consumable.consume(t.viewItem,r);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:MA(l.style),color:MA(l.color),width:MA(l.width)};c.style!==n.style&&s.writer.setAttribute(i.style,c.style,a),c.color!==n.color&&s.writer.setAttribute(i.color,c.color,a),c.width!==n.width&&s.writer.setAttribute(i.width,c.width,a)}))))}function OA(e,t){const{modelElement:i,modelAttribute:n,styleName:s}=t;e.for("downcast").attributeToAttribute({model:{name:i,key:n},view:e=>({key:"style",value:{[s]:e}})})}function BA(e,t){const{modelAttribute:i,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${i}:table`,((e,t,i)=>{const{item:s,attributeNewValue:o}=t,{mapper:r,writer:a}=i;if(!i.consumable.consume(t.item,e.name))return;const l=[...r.toViewElement(s).getChildren()].find((e=>e.is("element","table")));o?a.setStyle(n,o,l):a.removeStyle(n,l)}))))}function MA(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const i=e.top;return t.every((t=>e[t]===i))?i:e}function NA(e,t,i,n,s=1){null!=t&&null!=s&&t>s?n.setAttribute(e,t,i):n.removeAttribute(e,i)}function FA(e,t,i={}){const n=e.createElement("tableCell",i);return e.insertElement("paragraph",n),e.insert(n,t),n}function DA(e,t){const i=t.parent.parent,n=parseInt(i.getAttribute("headingColumns")||"0"),{column:s}=e.getCellLocation(t);return!!n&&s<n}function LA(e,t,i){const{modelAttribute:n}=i;e.extend("tableCell",{allowAttributes:[n]}),VA(t,{viewElement:/^(td|th)$/,...i}),OA(t,{modelElement:"tableCell",...i})}function zA(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}function HA(){return e=>{e.on("element:table",((e,t,i)=>{const n=t.viewItem;if(!i.consumable.test(n,{name:!0}))return;const{rows:s,headingRows:o,headingColumns:r}=function(e){let t,i=0;const n=[],s=[];let o;for(const r of Array.from(e.getChildren())){if("tbody"!==r.name&&"thead"!==r.name&&"tfoot"!==r.name)continue;"thead"!==r.name||o||(o=r);const e=Array.from(r.getChildren()).filter((e=>e.is("element","tr")));for(const a of e)if(o&&r===o||"tbody"===r.name&&Array.from(a.getChildren()).length&&Array.from(a.getChildren()).every((e=>e.is("element","th"))))i++,n.push(a);else{s.push(a);const e=WA(a);(!t||e<t)&&(t=e)}}return{headingRows:i,headingColumns:t||0,rows:[...n,...s]}}(n),a={};r&&(a.headingColumns=r),o&&(a.headingRows=o);const l=i.writer.createElement("table",a);if(i.safeInsert(l,t.modelCursor)){if(i.consumable.consume(n,{name:!0}),s.forEach((e=>i.convertItem(e,i.writer.createPositionAt(l,"end")))),i.convertChildren(n,i.writer.createPositionAt(l,"end")),l.isEmpty){const e=i.writer.createElement("tableRow");i.writer.insert(e,i.writer.createPositionAt(l,"end")),FA(i.writer,i.writer.createPositionAt(e,"end"))}i.updateConversionResult(l,t)}}))}}function $A(e){return t=>{t.on(`element:${e}`,((e,t,{writer:i})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,s=i.createPositionAt(n,0);if(t.viewItem.isEmpty)return void i.insertElement("paragraph",s);const o=Array.from(n.getChildren());if(o.every((e=>e.is("element","$marker")))){const e=i.createElement("paragraph");i.insert(e,i.createPositionAt(n,0));for(const t of o)i.move(i.createRangeOn(t),i.createPositionAt(e,"end"))}}),{priority:"low"})}}function WA(e){let t=0,i=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;i<n.length&&"th"===n[i].name;){const e=n[i];t+=parseInt(e.getAttribute("colspan")||"1"),i++}return t}class jA{constructor(e,t={}){this._jumpedToStartRow=!1,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 i=this._getSpanned();if(i)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(i.cell,i.row,i.column));else{const i=e.getChild(this._cellIndex);if(!i)return this._advanceToNextRow();const n=parseInt(i.getAttribute("colspan")||"1"),s=parseInt(i.getAttribute("rowspan")||"1");(n>1||s>1)&&this._recordSpans(i,s,n),this._shouldSkipSlot()||(t=this._formatOutValue(i)),this._nextCellAtColumn=this._column+n}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,i=this._column){return{done:!1,value:new UA(this,e,t,i)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,i=this._column<this._startColumn,n=void 0!==this._endColumn&&this._column>this._endColumn;return e||t||i||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,i){const n={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+i;t++)e==this._row&&t==this._column||this._markSpannedCell(e,t,n)}_markSpannedCell(e,t,i){this._spannedCells.has(e)||this._spannedCells.set(e,new Map);this._spannedCells.get(e).set(t,i)}_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 UA{constructor(e,t,i,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=i,this.cellAnchorColumn=n,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 qA(e,t){return(i,{writer:n})=>{const s=i.getAttribute("headingRows")||0,o=n.createContainerElement("table",null,[]),r=n.createContainerElement("figure",{class:"table"},o);s>0&&n.insert(n.createPositionAt(o,"end"),n.createContainerElement("thead",null,n.createSlot((e=>e.is("element","tableRow")&&e.index<s)))),s<e.getRows(i)&&n.insert(n.createPositionAt(o,"end"),n.createContainerElement("tbody",null,n.createSlot((e=>e.is("element","tableRow")&&e.index>=s))));for(const{positionOffset:e,filter:i}of t.additionalSlots)n.insert(n.createPositionAt(o,e),n.createSlot(i));return n.insert(n.createPositionAt(o,"after"),n.createSlot((e=>!e.is("element","tableRow")&&!t.additionalSlots.some((({filter:t})=>t(e)))))),t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),pb(e,t,{hasSelectionHandle:!0})}(r,n):r}}function GA(e={}){return(t,{writer:i})=>{const n=t.parent,s=n.parent,o=s.getChildIndex(n),r=new jA(s,{row:o}),a=s.getAttribute("headingRows")||0,l=s.getAttribute("headingColumns")||0;let c=null;for(const n of r)if(n.cell==t){const t=n.row<a||n.column<l?"th":"td";c=e.asWidget?_b(i.createEditableElement(t),i):i.createContainerElement(t);break}return c}}function KA(e={}){return(t,{writer:i})=>{if(!t.parent.is("element","tableCell"))return null;if(!JA(t))return null;if(e.asWidget)return i.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=i.createContainerElement("p");return i.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function JA(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class ZA extends Xo{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema;this.isEnabled=function(e,t){const i=e.getFirstPosition().parent,n=i===i.root?i:i.parent;return t.checkChild(n,"table")}(t,i)}execute(e={}){const t=this.editor,i=t.model,n=t.plugins.get("TableUtils"),s=t.config.get("table.defaultHeadings.rows"),o=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&s&&(e.headingRows=s),void 0===e.headingColumns&&o&&(e.headingColumns=o),i.change((t=>{const s=n.createTable(t,e);i.insertObject(s,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(s.getNodeByPath([0,0,0]),0))}))}}class QA extends Xo{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,i=e.plugins.get("TableUtils"),n="above"===this.order,s=i.getSelectionAffectedTableCells(t),o=i.getRowIndexes(s),r=n?o.first:o.last,a=s[0].findAncestor("table");i.insertRows(a,{at:n?r:r+1,copyStructureFromAbove:!n})}}class YA extends Xo{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,i=e.plugins.get("TableUtils"),n="left"===this.order,s=i.getSelectionAffectedTableCells(t),o=i.getColumnIndexes(s),r=n?o.first:o.last,a=s[0].findAncestor("table");i.insertColumns(a,{columns:1,at:n?r:r+1})}}class XA extends Xo{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)}}function ex(e,t,i){const{startRow:n,startColumn:s,endRow:o,endColumn:r}=t,a=i.createElement("table"),l=o-n+1;for(let e=0;e<l;e++)i.insertElement("tableRow",a,"end");const c=[...new jA(e,{startRow:n,endRow:o,startColumn:s,endColumn:r,includeAllSlots:!0})];for(const{row:e,column:t,cell:l,isAnchor:d,cellAnchorRow:h,cellAnchorColumn:u}of c){const c=e-n,m=a.getChild(c);if(d){const n=i.cloneElement(l);i.append(n,m),ox(n,e,t,o,r,i)}else(h<n||u<s)&&FA(i,i.createPositionAt(m,"end"))}return function(e,t,i,n,s){const o=parseInt(t.getAttribute("headingRows")||"0");if(o>0){NA("headingRows",o-i,e,s,0)}const r=parseInt(t.getAttribute("headingColumns")||"0");if(r>0){NA("headingColumns",r-n,e,s,0)}}(a,e,n,s,i),a}function tx(e,t,i=0){const n=[],s=new jA(e,{startRow:i,endRow:t-1});for(const e of s){const{row:i,cellHeight:s}=e;i<t&&t<=i+s-1&&n.push(e)}return n}function ix(e,t,i){const n=e.parent,s=n.parent,o=n.index,r=t-o,a={},l=parseInt(e.getAttribute("rowspan"))-r;l>1&&(a.rowspan=l);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const d=o+r,h=[...new jA(s,{startRow:o,endRow:d,includeAllSlots:!0})];let u,m=null;for(const t of h){const{row:n,column:s,cell:o}=t;o===e&&void 0===u&&(u=s),void 0!==u&&u===s&&n===d&&(m=FA(i,t.getPositionBefore(),a))}return NA("rowspan",r,e,i),m}function nx(e,t){const i=[],n=new jA(e);for(const e of n){const{column:n,cellWidth:s}=e;n<t&&t<=n+s-1&&i.push(e)}return i}function sx(e,t,i,n){const s=i-t,o={},r=parseInt(e.getAttribute("colspan"))-s;r>1&&(o.colspan=r);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(o.rowspan=a);const l=FA(n,n.createPositionAfter(e),o);return NA("colspan",s,e,n),l}function ox(e,t,i,n,s,o){const r=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");if(i+r-1>s){NA("colspan",s-i+1,e,o,1)}if(t+a-1>n){NA("rowspan",n-t+1,e,o,1)}}function rx(e,t){const i=t.getColumns(e),n=new Array(i).fill(0);for(const{column:t}of new jA(e))n[t]++;const s=n.reduce(((e,t,i)=>t?e:[...e,i]),[]);if(s.length>0){const i=s[s.length-1];return t.removeColumns(e,{at:i}),!0}return!1}function ax(e,t){const i=[],n=t.getRows(e);for(let t=0;t<n;t++){e.getChild(t).isEmpty&&i.push(t)}if(i.length>0){const n=i[i.length-1];return t.removeRows(e,{at:n}),!0}return!1}function lx(e,t){rx(e,t)||ax(e,t)}function cx(e,t){const i=Array.from(new jA(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(i.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=i[0].cellHeight-1;return t.lastRow+n}function dx(e,t){const i=Array.from(new jA(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(i.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=i[0].cellWidth-1;return t.lastColumn+n}class hx extends Xo{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,i=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,s=this.direction;e.change((e=>{const t="right"==s||"down"==s,o=t?i:n,r=t?n:i,a=r.parent;!function(e,t,i){ux(e)||(ux(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end")));i.remove(e)}(r,o,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(i.getAttribute(l)||"1"),d=parseInt(n.getAttribute(l)||"1");e.setAttribute(l,c+d,o),e.setSelection(e.createRangeIn(o));const h=this.editor.plugins.get("TableUtils");lx(a.findAncestor("table"),h)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),i=t.getTableCellsContainingSelection(e.selection)[0];if(!i)return;const n=this.isHorizontal?function(e,t,i){const n=e.parent,s=n.parent,o="right"==t?e.nextSibling:e.previousSibling,r=(s.getAttribute("headingColumns")||0)>0;if(!o)return;const a="right"==t?e:o,l="right"==t?o:e,{column:c}=i.getCellLocation(a),{column:d}=i.getCellLocation(l),h=parseInt(a.getAttribute("colspan")||"1"),u=DA(i,a),m=DA(i,l);if(r&&u!=m)return;return c+h===d?o:void 0}(i,this.direction,t):function(e,t,i){const n=e.parent,s=n.parent,o=s.getChildIndex(n);if("down"==t&&o===i.getRows(s)-1||"up"==t&&0===o)return null;const r=parseInt(e.getAttribute("rowspan")||"1"),a=s.getAttribute("headingRows")||0,l="down"==t&&o+r===a,c="up"==t&&o===a;if(a&&(l||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),h="down"==t?o+d:o,u=[...new jA(s,{endRow:h})],m=u.find((t=>t.cell===e)),g=m.column,f=u.find((({row:e,cellHeight:i,column:n})=>n===g&&("down"==t?e===h:h===e+i)));return f&&f.cell?f.cell:null}(i,this.direction,t);if(!n)return;const s=this.isHorizontal?"rowspan":"colspan",o=parseInt(i.getAttribute(s)||"1");return parseInt(n.getAttribute(s)||"1")===o?n:void 0}}function ux(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class mx extends Xo{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=t[0];if(i){const n=i.findAncestor("table"),s=e.getRows(n)-1,o=e.getRowIndexes(t),r=0===o.first&&o.last===s;this.isEnabled=!r}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(i),s=i[0],o=s.findAncestor("table"),r=t.getCellLocation(s).column;e.change((e=>{const i=n.last-n.first+1;t.removeRows(o,{at:n.first,rows:i});const s=function(e,t,i,n){const s=e.getChild(Math.min(t,n-1));let o=s.getChild(0),r=0;for(const e of s.getChildren()){if(r>i)return o;o=e,r+=parseInt(e.getAttribute("colspan")||"1")}return o}(o,n.first,r,t.getRows(o));e.setSelection(e.createPositionAt(s,0))}))}}class gx extends Xo{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=t[0];if(i){const n=i.findAncestor("table"),s=e.getColumns(n),{first:o,last:r}=e.getColumnIndexes(t);this.isEnabled=r-o<s-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,i]=function(e,t){const i=t.getSelectionAffectedTableCells(e),n=i[0],s=i.pop(),o=[n,s];return n.isBefore(s)?o:o.reverse()}(this.editor.model.document.selection,e),n=t.parent.parent,s=[...new jA(n)],o={first:s.find((e=>e.cell===t)).column,last:s.find((e=>e.cell===i)).column},r=function(e,t,i,n){const s=parseInt(i.getAttribute("colspan")||"1");return s>1?i:t.previousSibling||i.nextSibling?i.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>e<n.first)).cell:e.reverse().find((({column:e})=>e>n.last)).cell}(s,t,i,o);this.editor.model.change((t=>{const i=o.last-o.first+1;e.removeColumns(n,{at:o.first,columns:i}),t.setSelection(t.createPositionAt(r,0))}))}}class fx extends Xo{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,i=e.getSelectionAffectedTableCells(t.document.selection),n=i.length>0;this.isEnabled=n,this.value=n&&i.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),i=this.editor.model,n=t.getSelectionAffectedTableCells(i.document.selection),s=n[0].findAncestor("table"),{first:o,last:r}=t.getRowIndexes(n),a=this.value?o:r+1,l=s.getAttribute("headingRows")||0;i.change((e=>{if(a){const t=tx(s,a,a>l?l:0);for(const{cell:i}of t)ix(i,a,e)}NA("headingRows",a,s,e,0)}))}_isInHeading(e,t){const i=parseInt(t.getAttribute("headingRows")||"0");return!!i&&e.parent.index<i}}class px extends Xo{refresh(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=i.length>0;this.isEnabled=n,this.value=n&&i.every((e=>DA(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),i=this.editor.model,n=t.getSelectionAffectedTableCells(i.document.selection),s=n[0].findAncestor("table"),{first:o,last:r}=t.getColumnIndexes(n),a=this.value?o:r+1;i.change((e=>{if(a){const t=nx(s,a);for(const{cell:i,column:n}of t)sx(i,n,a,e)}NA("headingColumns",a,s,e,0)}))}}const bx=5,wx=2;function vx(e,t){return 4e3/_x(e,t)}function _x(e,t){const i=yx(e,"tbody",t)||yx(e,"thead",t);return kx(t.editing.view.domConverter.mapViewToDom(i))}function yx(e,t,i){return[...[...i.editing.mapper.toViewElement(e).getChildren()].find((e=>e.is("element","table"))).getChildren()].find((e=>e.is("element",t)))}function kx(e){const t=Mn.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 Cx(e){const t=Math.pow(10,wx),i="number"==typeof e?e:parseFloat(e);return Math.round(i*t)/t}function Ax(e){return e.map((e=>"number"==typeof e?e:parseFloat(e))).filter((e=>!Number.isNaN(e))).reduce(((e,t)=>e+t),0)}function xx(e){let t=function(e){const t=e.filter((e=>"auto"===e)).length;if(0===t)return e.map((e=>Cx(e)));const i=Ax(e),n=Math.max((100-i)/t,bx);return e.map((e=>"auto"===e?n:e)).map((e=>Cx(e)))}(e.map((e=>"auto"===e?e:parseFloat(e.replace("%","")))));const i=Ax(t);return 100!==i&&(t=t.map((e=>Cx(100*e/i))).map(((e,t,i)=>{if(!(t===i.length-1))return e;return Cx(e+100-Ax(i))}))),t.map((e=>e+"%"))}function Tx(e){const t=Mn.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function Ex(e,t,i,n){for(let s=0;s<Math.max(i.length,e.length);s++){const o=e[s],r=i[s];r?o?n.setAttribute("columnWidth",r,o):n.appendElement("tableColumn",{columnWidth:r},t):n.remove(o)}}function Sx(e){if(e.is("element","tableColumnGroup"))return e;const t=e.getChildren();return Array.from(t).find((e=>e.is("element","tableColumnGroup")))}function Px(e){const t=Sx(e);return t?Array.from(t.getChildren()):[]}class Ix extends Qo{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,i=t.parent,n=i.getChildIndex(t),s=new jA(i,{row:n});for(const{cell:t,row:i,column:n}of s)if(t===e)return{row:i,column:n}}createTable(e,t){const i=e.createElement("table"),n=t.rows||2,s=t.columns||2;return Vx(e,i,0,n,s),t.headingRows&&NA("headingRows",Math.min(t.headingRows,n),i,e,0),t.headingColumns&&NA("headingColumns",Math.min(t.headingColumns,s),i,e,0),i}insertRows(e,t={}){const i=this.editor.model,n=t.at||0,s=t.rows||1,o=void 0!==t.copyStructureFromAbove,r=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),l=this.getColumns(e);if(n>a)throw new y("tableutils-insertrows-insert-out-of-range",this,{options:t});i.change((t=>{const i=e.getAttribute("headingRows")||0;if(i>n&&NA("headingRows",i+s,e,t,0),!o&&(0===n||n===a))return void Vx(t,e,n,s,l);const c=o?Math.max(n,r):n,d=new jA(e,{endRow:c}),h=new Array(l).fill(1);for(const{row:e,column:i,cellHeight:a,cellWidth:l,cell:c}of d){const d=e+a-1,u=e<=r&&r<=d;e<n&&n<=d?(t.setAttribute("rowspan",a+s,c),h[i]=-l):o&&u&&(h[i]=l)}for(let i=0;i<s;i++){const i=t.createElement("tableRow");t.insert(i,e,n);for(let e=0;e<h.length;e++){const n=h[e],s=t.createPositionAt(i,"end");n>0&&FA(t,s,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const i=this.editor.model,n=t.at||0,s=t.columns||1;i.change((t=>{const i=e.getAttribute("headingColumns");n<i&&t.setAttribute("headingColumns",i+s,e);const o=this.getColumns(e);if(0===n||o===n){for(const i of e.getChildren())i.is("element","tableRow")&&Rx(s,t,t.createPositionAt(i,n?"end":0));return}const r=new jA(e,{column:n,includeAllSlots:!0});for(const e of r){const{row:i,cell:o,cellAnchorColumn:a,cellAnchorRow:l,cellWidth:c,cellHeight:d}=e;if(a<n){t.setAttribute("colspan",c+s,o);const e=l+d-1;for(let t=i;t<=e;t++)r.skipRow(t)}else Rx(s,t,e.getPositionBefore())}}))}removeRows(e,t){const i=this.editor.model,n=t.rows||1,s=this.getRows(e),o=t.at,r=o+n-1;if(r>s-1)throw new y("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});i.change((t=>{const i={first:o,last:r},{cellsToMove:n,cellsToTrim:s}=function(e,{first:t,last:i}){const n=new Map,s=[];for(const{row:o,column:r,cellHeight:a,cell:l}of new jA(e,{endRow:i})){const e=o+a-1;if(o>=t&&o<=i&&e>i){const e=a-(i-o+1);n.set(r,{cell:l,rowspan:e})}if(o<t&&e>=t){let n;n=e>=i?i-t+1:e-t+1,s.push({cell:l,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:s}}(e,i);if(n.size){!function(e,t,i,n){const s=new jA(e,{includeAllSlots:!0,row:t}),o=[...s],r=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:s}of o)if(i.has(e)){const{cell:t,rowspan:s}=i.get(e),o=a?n.createPositionAfter(a):n.createPositionAt(r,0);n.move(n.createRangeOn(t),o),NA("rowspan",s,t,n),a=t}else s&&(a=t)}(e,r+1,n,t)}for(let i=r;i>=o;i--)t.remove(e.getChild(i));for(const{rowspan:e,cell:i}of s)NA("rowspan",e,i,t);!function(e,{first:t,last:i},n){const s=e.getAttribute("headingRows")||0;if(t<s){NA("headingRows",i<s?s-(i-t+1):t,e,n,0)}}(e,i,t),rx(e,this)||ax(e,this)}))}removeColumns(e,t){const i=this.editor.model,n=t.at,s=t.columns||1,o=t.at+s-1;i.change((t=>{!function(e,t,i){const n=e.getAttribute("headingColumns")||0;if(n&&t.first<n){const s=Math.min(n-1,t.last)-t.first+1;i.setAttribute("headingColumns",n-s,e)}}(e,{first:n,last:o},t);const i=Px(e);for(let s=o;s>=n;s--){for(const{cell:i,column:n,cellWidth:o}of[...new jA(e)])n<=s&&o>1&&n+o>s?NA("colspan",o-1,i,t):n===s&&t.remove(i);if(i[s]){const e=0===s?i[1]:i[s-1],n=parseFloat(i[s].getAttribute("columnWidth")),o=parseFloat(e.getAttribute("columnWidth"));t.remove(i[s]),t.setAttribute("columnWidth",n+o+"%",e)}}ax(e,this)||rx(e,this)}))}splitCellVertically(e,t=2){const i=this.editor.model,n=e.parent.parent,s=parseInt(e.getAttribute("rowspan")||"1"),o=parseInt(e.getAttribute("colspan")||"1");i.change((i=>{if(o>1){const{newCellsSpan:n,updatedSpan:r}=Ox(o,t);NA("colspan",r,e,i);const a={};n>1&&(a.colspan=n),s>1&&(a.rowspan=s);Rx(o>t?t-1:o-1,i,i.createPositionAfter(e),a)}if(o<t){const r=t-o,a=[...new jA(n)],{column:l}=a.find((({cell:t})=>t===e)),c=a.filter((({cell:t,cellWidth:i,column:n})=>t!==e&&n===l||n<l&&n+i>l));for(const{cell:e,cellWidth:t}of c)i.setAttribute("colspan",t+r,e);const d={};s>1&&(d.rowspan=s),Rx(r,i,i.createPositionAfter(e),d);const h=n.getAttribute("headingColumns")||0;h>l&&NA("headingColumns",h+r,n,i)}}))}splitCellHorizontally(e,t=2){const i=this.editor.model,n=e.parent,s=n.parent,o=s.getChildIndex(n),r=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");i.change((i=>{if(r>1){const n=[...new jA(s,{startRow:o,endRow:o+r-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=Ox(r,t);NA("rowspan",c,e,i);const{column:d}=n.find((({cell:t})=>t===e)),h={};l>1&&(h.rowspan=l),a>1&&(h.colspan=a);for(const e of n){const{column:t,row:n}=e;n>=o+c&&t===d&&(n+o+c)%l==0&&Rx(1,i,e.getPositionBefore(),h)}}if(r<t){const n=t-r,l=[...new jA(s,{startRow:0,endRow:o})];for(const{cell:t,cellHeight:s,row:r}of l)if(t!==e&&r+s>o){const e=s+n;i.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),Vx(i,s,o+1,n,1,c);const d=s.getAttribute("headingRows")||0;d>o&&NA("headingRows",d+n,s,i)}}))}getColumns(e){return[...e.getChild(0).getChildren()].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 jA(e,t)}getSelectedTableCells(e){const t=[];for(const i of this.sortRanges(e.getRanges())){const e=i.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const i of e.getRanges()){const e=i.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"),i=[...new jA(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(i)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,i=new Set;let n=0;for(const s of e){const{row:e,column:o}=this.getCellLocation(s),r=parseInt(s.getAttribute("rowspan"))||1,a=parseInt(s.getAttribute("colspan"))||1;t.add(e),i.add(o),r>1&&t.add(e+r-1),a>1&&i.add(o+a-1),n+=r*a}const s=function(e,t){const i=Array.from(e.values()),n=Array.from(t.values()),s=Math.max(...i),o=Math.min(...i),r=Math.max(...n),a=Math.min(...n);return(s-o+1)*(r-a+1)}(t,i);return s==n}sortRanges(e){return Array.from(e).sort(Bx)}_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"),i=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(i,n))return!1;const s=this.getColumnIndexes(e),o=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(s,o)}_areIndexesInSameSection({first:e,last:t},i){return e<i===t<i}}function Vx(e,t,i,n,s,o={}){for(let r=0;r<n;r++){const n=e.createElement("tableRow");e.insert(n,t,i),Rx(s,e,e.createPositionAt(n,"end"),o)}}function Rx(e,t,i,n={}){for(let s=0;s<e;s++)FA(t,i,n)}function Ox(e,t){if(e<t)return{newCellsSpan:1,updatedSpan:1};const i=Math.floor(e/t);return{newCellsSpan:i,updatedSpan:e-i*t+i}}function Bx(e,t){const i=e.start,n=t.start;return i.isBefore(n)?-1:1}class Mx extends Xo{refresh(){const e=this.editor.plugins.get(Ix),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t)}execute(){const e=this.editor.model,t=this.editor.plugins.get(Ix);e.change((i=>{const n=t.getSelectedTableCells(e.document.selection),s=n.shift(),{mergeWidth:o,mergeHeight:r}=function(e,t,i){let n=0,s=0;for(const e of t){const{row:t,column:o}=i.getCellLocation(e);n=Dx(e,o,n,"colspan"),s=Dx(e,t,s,"rowspan")}const{row:o,column:r}=i.getCellLocation(e),a=n-r,l=s-o;return{mergeWidth:a,mergeHeight:l}}(s,n,t);NA("colspan",o,s,i),NA("rowspan",r,s,i);for(const e of n)Nx(e,s,i);lx(s.findAncestor("table"),t),i.setSelection(s,"in")}))}}function Nx(e,t,i){Fx(e)||(Fx(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end"))),i.remove(e)}function Fx(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function Dx(e,t,i,n){const s=parseInt(e.getAttribute(n)||"1");return Math.max(i,t+s)}class Lx extends Xo{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"),i=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(i),s=i[0].findAncestor("table"),o=[];for(let t=n.first;t<=n.last;t++)for(const i of s.getChild(t).getChildren())o.push(e.createRangeOn(i));e.change((e=>{e.setSelection(o)}))}}class zx extends Xo{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,i=e.getSelectionAffectedTableCells(t.document.selection),n=i[0],s=i.pop(),o=n.findAncestor("table"),r=e.getCellLocation(n),a=e.getCellLocation(s),l=Math.min(r.column,a.column),c=Math.max(r.column,a.column),d=[];for(const e of new jA(o,{startColumn:l,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function Hx(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;const s=new Set;for(const t of i){let i=null;"insert"==t.type&&"table"==t.name&&(i=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(i=t.position.findAncestor("table")),jx(t)&&(i=t.range.start.findAncestor("table")),i&&!s.has(i)&&(n=$x(i,e)||n,n=Wx(i,e)||n,s.add(i))}return n}(t,e)))}function $x(e,t){let i=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),i=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:s,cell:o,cellHeight:r}of new jA(e)){if(r<2)continue;const e=s<t?t:i;if(s+r>e){const t=e-s;n.push({cell:o,rowspan:t})}}return n}(e);if(n.length){i=!0;for(const e of n)NA("rowspan",e.rowspan,e.cell,t,1)}return i}function Wx(e,t){let i=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:i}of new jA(e,{includeAllSlots:!0}))t[i]++;return t}(e),s=[];for(const[t,i]of n.entries())!i&&e.getChild(t).is("element","tableRow")&&s.push(t);if(s.length){i=!0;for(const i of s.reverse())t.remove(e.getChild(i)),n.splice(i,1)}const o=n.filter(((t,i)=>e.getChild(i).is("element","tableRow"))),r=o[0];if(!o.every((e=>e===r))){const n=o.reduce(((e,t)=>t>e?t:e),0);for(const[s,r]of o.entries()){const o=n-r;if(o){for(let i=0;i<o;i++)FA(t,t.createPositionAt(e.getChild(s),"end"));i=!0}}}return i}function jx(e){if("attribute"!==e.type)return!1;const t=e.attributeKey;return"headingRows"===t||"colspan"===t||"rowspan"===t}function Ux(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i)"insert"==t.type&&"table"==t.name&&(n=qx(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=Gx(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=Kx(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!Jx(t)||(n=Kx(t.position.parent,e)||n);return n}(t,e)))}function qx(e,t){let i=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(i=Gx(n,t)||i);return i}function Gx(e,t){let i=!1;for(const n of e.getChildren())i=Kx(n,t)||i;return i}function Kx(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const i=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of i)t.wrap(t.createRangeOn(e),"paragraph");return!!i.length}function Jx(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function Zx(e,t){if(!e.is("element","paragraph"))return!1;const i=t.toViewElement(e);return!!i&&JA(e)!==i.is("element","span")}class Qx extends Qo{static get pluginName(){return"TableEditing"}static get requires(){return[Ix]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,i=t.schema,n=e.conversion,s=e.plugins.get(Ix);i.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),i.register("tableRow",{allowIn:"table",isLimit:!0}),i.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,i)=>{if(!i.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!i.consumable.test(n,{name:!0}))return;i.consumable.consume(t.viewItem,{name:!0,classes:"table"});const s=Es(i.convertItem(n,t.modelCursor).modelRange.getItems());s?(i.convertChildren(t.viewItem,i.writer.createPositionAt(s,"end")),i.updateConversionResult(s,t)):i.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(HA()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:qA(s,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:qA(s,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add($A("td")),n.for("upcast").add($A("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:GA({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:GA()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:KA({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:KA(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:Yx("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:Yx("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new ZA(e)),e.commands.add("insertTableRowAbove",new QA(e,{order:"above"})),e.commands.add("insertTableRowBelow",new QA(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new YA(e,{order:"left"})),e.commands.add("insertTableColumnRight",new YA(e,{order:"right"})),e.commands.add("removeTableRow",new mx(e)),e.commands.add("removeTableColumn",new gx(e)),e.commands.add("splitTableCellVertically",new XA(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new XA(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new Mx(e)),e.commands.add("mergeTableCellRight",new hx(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new hx(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new hx(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new hx(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new px(e)),e.commands.add("setTableRowHeader",new fx(e)),e.commands.add("selectTableRow",new Lx(e)),e.commands.add("selectTableColumn",new zx(e)),Hx(t),Ux(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const i=e.document.differ;for(const e of i.getChanges()){let i,n=!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;i=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(i=e.position.findAncestor("table"),n="tableRow"==e.name);if(!i)continue;const s=i.getAttribute("headingRows")||0,o=i.getAttribute("headingColumns")||0,r=new jA(i);for(const e of r){const i=e.row<s||e.column<o?"th":"td",r=t.mapper.toViewElement(e.cell);r&&r.is("element")&&r.name!=i&&t.reconvertItem(n?e.cell.parent:e.cell)}}}(t,e.editing),function(e,t){const i=e.document.differ,n=new Set;for(const e of i.getChanges()){const t="attribute"==e.type?e.range.start.parent:e.position.parent;t.is("element","tableCell")&&n.add(t)}for(const e of n.values()){const i=Array.from(e.getChildren()).filter((e=>Zx(e,t.mapper)));for(const e of i)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function Yx(e){return t=>{const i=parseInt(t.getAttribute(e));return Number.isNaN(i)||i<=0?null:i}}class Xx extends Fs{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new Ps,this.focusTracker=new Ss,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:i,column:n}=t.target.dataset;this.items.get(10*(parseInt(i,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,i)=>{if(!i)return;const{row:n,column:s}=i.dataset;this.set({rows:parseInt(n),columns:parseInt(s)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),o({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)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((i,n)=>{const s=Math.floor(n/10)<e&&n%10<t;i.set("isOn",s)}))}_createGridButton(e,t,i,n){const s=new lo(e);return s.set({label:n,class:"ck-insert-table-dropdown-grid-box"}),s.extendTemplate({attributes:{"data-row":t,"data-column":i}}),s}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const i=Math.floor(t/10),n=t%10,s=`${i+1} × ${n+1}`;e.push(this._createGridButton(this.locale,i+1,n+1,s))}return this.createCollection(e)}}class eT extends Qo{static get pluginName(){return"TableUI"}init(){const e=this.editor,t=this.editor.t,i="ltr"===e.locale.contentLanguageDirection;e.ui.componentFactory.add("insertTable",(i=>{const n=e.commands.get("insertTable"),s=Am(i);let o;return s.bind("isEnabled").to(n),s.buttonView.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 6v3h4V6H3zm0 4v3h4v-3H3zm0 4v3h4v-3H3zm5 3h4v-3H8v3zm5 0h4v-3h-4v3zm4-4v-3h-4v3h4zm0-4V6h-4v3h4zm1.5 8a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 17V4c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13zM12 13v-3H8v3h4zm0-4V6H8v3h4z"/></svg>',label:t("Insert table"),tooltip:!0}),s.on("change:isOpen",(()=>{o||(o=new Xx(i),s.panelView.children.add(o),o.delegate("execute").to(s),s.on("execute",(()=>{e.execute("insertTable",{rows:o.rows,columns:o.columns}),e.editing.view.focus()})))})),s})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:i?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:i?"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"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const i=[{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"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',i,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:i?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:i?"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"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',n,e)}))}_prepareDropdown(e,t,i,n){const s=this.editor,o=Am(n),r=this._fillDropdownWithListOptions(o,i);return o.buttonView.set({label:e,icon:t,tooltip:!0}),o.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(o,"execute",(e=>{s.execute(e.source.commandName),e.source instanceof co||s.editing.view.focus()})),o}_prepareMergeSplitButtonDropdown(e,t,i,n){const s=this.editor,o=Am(n,Cm),r="mergeTableCells",a=s.commands.get(r),l=this._fillDropdownWithListOptions(o,i);return o.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),o.bind("isEnabled").toMany([a,...l],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(o.buttonView,"execute",(()=>{s.execute(r),s.editing.view.focus()})),this.listenTo(o,"execute",(e=>{s.execute(e.source.commandName),s.editing.view.focus()})),o}_fillDropdownWithListOptions(e,t){const i=this.editor,n=[],s=new Ts;for(const e of t)tT(e,i,n,s);return Em(e,s),n}}function tT(e,t,i,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new Zg(e.model),{commandName:s,bindIsOn:o}=e.model,r=t.commands.get(s);i.push(r),n.set({commandName:s}),n.bind("isEnabled").to(r),o&&n.bind("isOn").to(r,"value"),n.set({withText:!0})}n.add(e)}class iT extends Qo{static get pluginName(){return"TableSelection"}static get requires(){return[Ix,Ix]}init(){const e=this.editor,t=e.model,i=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(i.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(Ix),t=this.editor.model.document.selection,i=e.getSelectedTableCells(t);return 0==i.length?null:i}getSelectionAsFragment(){const e=this.editor.plugins.get(Ix),t=this.getSelectedTableCells();return t?this.editor.model.change((i=>{const n=i.createDocumentFragment(),{first:s,last:o}=e.getColumnIndexes(t),{first:r,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=a,d=o;if(e.isSelectionRectangular(t)){const e={firstColumn:s,lastColumn:o,firstRow:r,lastRow:a};c=cx(l,e),d=dx(l,e)}const h=ex(l,{startRow:r,startColumn:s,endRow:c,endColumn:d},i);return i.insert(h,n,0),n})):null}setCellSelection(e,t){const i=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(i.cells.map((t=>e.createRangeOn(t))),{backward:i.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=Es(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,i,n)=>{const s=n.writer;!function(e){for(const i of t)e.removeClass("ck-editor__editable_selected",i);t.clear()}(s);const o=this.getSelectedTableCells();if(!o)return;for(const e of o){const i=n.mapper.toViewElement(e);s.addClass("ck-editor__editable_selected",i),t.add(i)}const r=n.mapper.toViewElement(o[o.length-1]);s.setSelection(r,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((i=>{const n=i.createPositionAt(t[0],0),s=e.model.schema.getNearestSelectionRange(n);i.setSelection(s)}))}}))}_handleDeleteContent(e,t){const i=this.editor.plugins.get(Ix),n=t[0],s=t[1],o=this.editor.model,r=!s||"backward"==s.direction,a=i.getSelectedTableCells(n);a.length&&(e.stop(),o.change((e=>{const t=a[r?a.length-1:0];o.change((e=>{for(const t of a)o.deleteContent(e.createSelection(t,"in"))}));const i=o.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(i):n.setTo(i)})))}_handleInsertTextEvent(e,t){const i=this.editor,n=this.getSelectedTableCells();if(!n)return;const s=i.editing.view,o=i.editing.mapper,r=n.map((e=>s.createRangeOn(o.toViewElement(e))));t.selection=s.createSelection(r)}_getCellsToSelect(e,t){const i=this.editor.plugins.get("TableUtils"),n=i.getCellLocation(e),s=i.getCellLocation(t),o=Math.min(n.row,s.row),r=Math.max(n.row,s.row),a=Math.min(n.column,s.column),l=Math.max(n.column,s.column),c=new Array(r-o+1).fill(null).map((()=>[])),d={startRow:o,endRow:r,startColumn:a,endColumn:l};for(const{row:t,cell:i}of new jA(e.findAncestor("table"),d))c[t-o].push(i);const h=s.row<n.row,u=s.column<n.column;return h&&c.reverse(),u&&c.forEach((e=>e.reverse())),{cells:c.flat(),backward:h||u}}}class nT extends Qo{static get pluginName(){return"TableClipboard"}static get requires(){return[iT,Ix]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,i])=>this._onInsertContent(e,t,i)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const i=this.editor.plugins.get(iT);if(!i.getSelectedTableCells())return;if("cut"==e.name&&!this.editor.model.canEditAt(this.editor.model.document.selection))return;t.preventDefault(),e.stop();const n=this.editor.data,s=this.editor.editing.view.document,o=n.toView(i.getSelectionAsFragment());s.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:o,method:e.name})}_onInsertContent(e,t,i){if(i&&!i.is("documentSelection"))return;const n=this.editor.model,s=this.editor.plugins.get(Ix);let o=this.getTableIfOnlyTableInContent(t,n);if(!o)return;const r=s.getSelectionAffectedTableCells(n.document.selection);r.length?(e.stop(),n.change((e=>{const t={width:s.getColumns(o),height:s.getRows(o)},i=function(e,t,i,n){const s=e[0].findAncestor("table"),o=n.getColumnIndexes(e),r=n.getRowIndexes(e),a={firstColumn:o.first,lastColumn:o.last,firstRow:r.first,lastRow:r.last},l=1===e.length;l&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,i,n){const s=n.getColumns(e),o=n.getRows(e);i>s&&n.insertColumns(e,{at:s,columns:i-s});t>o&&n.insertRows(e,{at:o,rows:t-o})}(s,a.lastRow+1,a.lastColumn+1,n));l||!n.isSelectionRectangular(e)?function(e,t,i){const{firstRow:n,lastRow:s,firstColumn:o,lastColumn:r}=t,a={first:n,last:s},l={first:o,last:r};oT(e,o,a,i),oT(e,r+1,a,i),sT(e,n,l,i),sT(e,s+1,l,i,n)}(s,a,i):(a.lastRow=cx(s,a),a.lastColumn=dx(s,a));return a}(r,t,e,s),n=i.lastRow-i.firstRow+1,a=i.lastColumn-i.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(a,t.width)-1};o=ex(o,l,e);const c=r[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(o,t,c,i,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=s.sortRanges(d.map((t=>e.createRangeOn(t))));e.setSelection(t)}else e.setSelection(d[0],0)}))):lx(o,s)}_replaceSelectedCellsWithPasted(e,t,i,n,s){const{width:o,height:r}=t,a=function(e,t,i){const n=new Array(i).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:i,cell:s}of new jA(e))n[i][t]=s;return n}(e,o,r),l=[...new jA(i,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of l){const{row:t,column:i}=e;i===n.firstColumn&&(d=e.getPositionBefore());const l=t-n.firstRow,h=i-n.firstColumn,u=a[l%r][h%o],m=u?s.cloneElement(u):null,g=this._replaceTableSlotCell(e,m,d,s);g&&(ox(g,t,i,n.lastRow,n.lastColumn,s),c.push(g),d=s.createPositionAfter(g))}const h=parseInt(i.getAttribute("headingRows")||"0"),u=parseInt(i.getAttribute("headingColumns")||"0"),m=n.firstRow<h&&h<=n.lastRow,g=n.firstColumn<u&&u<=n.lastColumn;if(m){const e=sT(i,h,{first:n.firstColumn,last:n.lastColumn},s,n.firstRow);c.push(...e)}if(g){const e=oT(i,u,{first:n.firstRow,last:n.lastRow},s);c.push(...e)}return c}_replaceTableSlotCell(e,t,i,n){const{cell:s,isAnchor:o}=e;return o&&n.remove(s),t?(n.insert(t,i),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 i=t.createRangeIn(e);for(const e of i.getItems())if(e.is("element","table")){const n=t.createRange(i.start,t.createPositionBefore(e));if(t.hasContent(n,{ignoreWhitespaces:!0}))return null;const s=t.createRange(t.createPositionAfter(e),i.end);return t.hasContent(s,{ignoreWhitespaces:!0})?null:e}return null}}function sT(e,t,i,n,s=0){if(t<1)return;return tx(e,t,s).filter((({column:e,cellWidth:t})=>rT(e,t,i))).map((({cell:e})=>ix(e,t,n)))}function oT(e,t,i,n){if(t<1)return;return nx(e,t).filter((({row:e,cellHeight:t})=>rT(e,t,i))).map((({cell:e,column:i})=>sx(e,i,t,n)))}function rT(e,t,i){const n=e+t-1,{first:s,last:o}=i;return e>=s&&e<=o||e<s&&n>=s}class aT extends Qo{static get pluginName(){return"TableKeyboard"}static get requires(){return[iT,Ix]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(e,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(e,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const i=this.editor,n=i.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),i.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const i=this.editor,n=this.editor.plugins.get(Ix),s=this.editor.plugins.get("TableSelection"),o=i.model.document.selection,r=!t.shiftKey;let a=n.getTableCellsContainingSelection(o)[0];if(a||(a=s.getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();const l=a.parent,c=l.parent,d=c.getChildIndex(l),h=l.getChildIndex(a),u=0===h;if(!r&&u&&0===d)return void i.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const m=h===l.childCount-1,g=d===n.getRows(c)-1;if(r&&g&&m&&(i.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void i.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let f;if(r&&m){const e=c.getChild(d+1);f=e.getChild(0)}else if(!r&&u){const e=c.getChild(d-1);f=e.getChild(e.childCount-1)}else f=l.getChild(h+(r?1:-1));i.model.change((e=>{e.setSelection(e.createRangeIn(f))}))}_onArrowKey(e,t){const i=this.editor,n=_s(t.keyCode,i.locale.contentLanguageDirection);this._handleArrowKeys(n,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const i=this.editor.plugins.get(Ix),n=this.editor.plugins.get("TableSelection"),s=this.editor.model,o=s.document.selection,r=["right","down"].includes(e),a=i.getSelectedTableCells(o);if(a.length){let i;return i=t?n.getFocusCell():r?a[a.length-1]:a[0],this._navigateFromCellInDirection(i,e,t),!0}const l=o.focus.findAncestor("tableCell");if(!l)return!1;if(!o.isCollapsed)if(t){if(o.isBackward==r&&!o.containsEntireContent(l))return!1}else{const e=o.getSelectedElement();if(!e||!s.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(o,l,r)&&(this._navigateFromCellInDirection(l,e,t),!0)}_isSelectionAtCellEdge(e,t,i){const n=this.editor.model,s=this.editor.model.schema,o=i?e.getLastPosition():e.getFirstPosition();if(!s.getLimitElement(o).is("element","tableCell")){return n.createPositionAt(t,i?"end":0).isTouching(o)}const r=n.createSelection(o);return n.modifySelection(r,{direction:i?"forward":"backward"}),o.isEqual(r.focus)}_navigateFromCellInDirection(e,t,i=!1){const n=this.editor.model,s=e.findAncestor("table"),o=[...new jA(s,{includeAllSlots:!0})],{row:r,column:a}=o[o.length-1],l=o.find((({cell:t})=>t==e));let{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>r||d<0&&c<=0||d>a&&c>=r)return void n.change((e=>{e.setSelection(e.createRangeOn(s))}));d<0?(d=i?0:a,c--):d>a&&(d=i?a:0,c++);const h=o.find((e=>e.row==c&&e.column==d)).cell,u=["right","down"].includes(t),m=this.editor.plugins.get("TableSelection");if(i&&m.isEnabled){const t=m.getAnchorCell()||e;m.setCellSelection(t,h)}else{const e=n.createPositionAt(h,u?0:"end");n.change((t=>{t.setSelection(e)}))}}}class lT extends Ol{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class cT extends Qo{static get pluginName(){return"TableMouse"}static get requires(){return[iT,Ix]}init(){this.editor.editing.view.addObserver(lT),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(Ix);let i=!1;const n=e.plugins.get(iT);this.listenTo(e.editing.view.document,"mousedown",((s,o)=>{const r=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!o.domEvent.shiftKey)return;const a=n.getAnchorCell()||t.getTableCellsContainingSelection(r)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(o);l&&dT(a,l)&&(i=!0,n.setCellSelection(a,l),o.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{i=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,i,n=!1,s=!1;const o=e.plugins.get(iT);this.listenTo(e.editing.view.document,"mousedown",((e,i)=>{this.isEnabled&&o.isEnabled&&(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(i)))})),this.listenTo(e.editing.view.document,"mousemove",((e,r)=>{if(!r.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(r);a&&dT(t,a)&&(i=a,n||i==t||(n=!0)),n&&(s=!0,o.setCellSelection(t,i),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,s=!1,t=null,i=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{s&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,i=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(i).parent.findAncestor("tableCell",{includeSelf:!0})}}function dT(e,t){return e.parent.parent==t.parent.parent}function hT(e){const t=uT(e);return t||mT(e)}function uT(e){const t=e.getSelectedElement();return t&&gT(t)?t:null}function mT(e){const t=e.getFirstPosition();if(!t)return null;let i=t.parent;for(;i;){if(i.is("element")&&gT(i))return i;i=i.parent}return null}function gT(e){return!!e.getCustomProperty("table")&&fb(e)}class fT extends Fs{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 Ss,this._focusables=new Ns,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new Ps,this._stillTyping=!1,this.focusCycler=new qo({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,i)=>this._setInputValue(i)))}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,i=this.bindTemplate,n=this._createColorSelector(e),s=Am(e),o=new Fs;return o.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:i.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",i.if("value","ck-hidden",(e=>""!=e))]}}]}),s.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),s.buttonView.children.add(o),s.buttonView.label=t("Color picker"),s.buttonView.tooltip=!0,s.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",s.panelView.children.add(n),s.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),s.on("change:isOpen",((e,t,i)=>{i&&(n.updateSelectedColors(),n.showColorGridsFragment())})),s}_createInputTextView(){const e=this.locale,t=new zo(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,i=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=i&&i.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,i=this.options.defaultColorValue||"",n=t(i?"Restore default":"Remove color"),s=new wg(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:n,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});s.appendUI(),s.on("execute",((e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||i,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1}));let o=this.value;return s.on("colorPicker:cancel",(()=>{this.value=o,this.fire("input"),this.dropdownView.isOpen=!1})),s.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{o=this.value})),s.bind("selectedColor").to(this,"value"),s}_setInputValue(e){if(!this._stillTyping){const t=pT(e),i=this.options.colorDefinitions.find((e=>t===pT(e.color)));this.inputView.value=i?i.label:e||""}}}function pT(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const bT=e=>""===e;function wT(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 vT(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function _T(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function yT(e){return e=e.trim().toLowerCase(),bT(e)||Au(e)}function kT(e){return e=e.trim(),bT(e)||ST(e)||Su(e)||Iu(e)}function CT(e){return e=e.trim(),bT(e)||ST(e)||Su(e)}function AT(e,t){const i=new Ts,n=wT(e.t);for(const s in n){const o={type:"button",model:new Zg({_borderStyleValue:s,label:n[s],role:"menuitemradio",withText:!0})};"none"===s?o.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===s)):o.model.bind("isOn").to(e,"borderStyle",(e=>e===s)),i.add(o)}return i}function xT(e){const{view:t,icons:i,toolbar:n,labels:s,propertyName:o,nameToValue:r,defaultValue:a}=e;for(const e in s){const l=new lo(t.locale);l.set({label:s[e],icon:i[e],tooltip:s[e]});const c=r?r(e):e;l.bind("isOn").to(t,o,(e=>{let t=e;return""===e&&a&&(t=a),c===t})),l.on("execute",(()=>{t[o]=c})),n.items.add(l)}}const TT=[{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 ET(e){return(t,i,n)=>{const s=new fT(t.locale,{colorDefinitions:(o=e.colorConfig,o.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var o;return s.inputView.set({id:i,ariaDescribedById:n}),s.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),s.bind("hasError").to(t,"errorText",(e=>!!e)),s.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(s),s}}function ST(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}class PT extends Fs{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}const IT={left:um.alignLeft,center:um.alignCenter,right:um.alignRight,justify:um.alignJustify,top:um.alignTop,middle:um.alignMiddle,bottom:um.alignBottom};class VT extends Fs{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:s,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{horizontalAlignmentToolbar:u,verticalAlignmentToolbar:m,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Ss,this.keystrokes=new Ps,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=n,this.borderColorInput=s,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=u,this.verticalAlignmentToolbar=m;const{saveButtonView:f,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=f,this.cancelButtonView=p,this._focusables=new Ns,this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Kg(e,{label:this.t("Cell properties")})),this.children.add(new PT(e,{labelView:o,children:[o,i,s,n],class:"ck-table-form__border-row"})),this.children.add(new PT(e,{labelView:r,children:[r,a],class:"ck-table-form__background-row"})),this.children.add(new PT(e,{children:[new PT(e,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new PT(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new PT(e,{labelView:g,children:[g,u,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new PT(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(),s({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[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},i=ET({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,s=this.t,o=s("Style"),r=new No(n);r.text=s("Border");const a=wT(s),l=new Fo(n,Om);l.set({label:o,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),Em(l.fieldView,AT(this,t.style),{role:"menu",ariaLabel:o});const c=new Fo(n,Vm);c.set({label:s("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",RT),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new Fo(n,i);return d.set({label:s("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",RT),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,i,n,s)=>{RT(n)||(this.borderColor="",this.borderWidth=""),RT(s)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:r,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,i=new No(e);i.text=t("Background");const n=ET({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new Fo(e,n);return s.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",(()=>{this.backgroundColor=s.fieldView.value})),{backgroundRowLabel:i,backgroundInput:s}}_createDimensionFields(){const e=this.locale,t=this.t,i=new No(e);i.text=t("Dimensions");const n=new Fo(e,Vm);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const s=new Fs(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const o=new Fo(e,Vm);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",(()=>{this.height=o.fieldView.element.value})),{dimensionsLabel:i,widthInput:n,operatorLabel:s,heightInput:o}}_createPaddingField(){const e=this.locale,t=this.t,i=new Fo(e,Vm);return i.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),i.fieldView.bind("value").to(this,"padding"),i.fieldView.on("input",(()=>{this.padding=i.fieldView.element.value})),i}_createAlignmentFields(){const e=this.locale,t=this.t,i=new No(e);i.text=t("Table cell text alignment");const n=new fm(e),s="rtl"===e.contentLanguageDirection;n.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),xT({view:this,icons:IT,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(s){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const o=new fm(e);return o.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),xT({view:this,icons:IT,toolbar:o,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:o,alignmentLabel:i}}_createActionButtons(){const e=this.locale,t=this.t,i=new lo(e),n=new lo(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return i.set({label:t("Save"),icon:um.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(s,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:um.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:n}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,i=t("Align cell text to the left"),n=t("Align cell text to the center"),s=t("Align cell text to the right"),o=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:s,center:n,left:i,justify:o}:{left:i,center:n,right:s,justify:o}}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 RT(e){return"none"!==e}const OT=Ag.defaultPositions,BT=[OT.northArrowSouth,OT.northArrowSouthWest,OT.northArrowSouthEast,OT.southArrowNorth,OT.southArrowNorthWest,OT.southArrowNorthEast,OT.viewportStickyNorth];function MT(e,t){const i=e.plugins.get("ContextualBalloon"),n=e.editing.view.document.selection;let s;"cell"===t?mT(n)&&(s=FT(e)):hT(n)&&(s=NT(e)),s&&i.updatePosition(s)}function NT(e){const t=zA(e.model.document.selection),i=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(i),positions:BT}}function FT(e){const t=e.editing.mapper,i=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const i=t.editing.mapper,n=t.editing.view.domConverter,s=Array.from(e).map((e=>{const t=DT(e.start),s=i.toViewElement(t);return new Hn(n.mapViewToDom(s))}));return Hn.getBoundingRect(s)}(n.getRanges(),e),positions:BT};const s=DT(n.getFirstPosition()),o=t.toViewElement(s);return{target:i.mapViewToDom(o),positions:BT}}function DT(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function LT(e){if(!e||!L(e))return e;const{top:t,right:i,bottom:n,left:s}=e;return t==i&&i==n&&n==s?t:void 0}function zT(e,t){const i=parseFloat(e);return Number.isNaN(i)||String(i)!==String(e)?e:`${i}${t}`}function HT(e,t={}){const i={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!i.alignment&&(i.alignment="center"),t.includePaddingProperty&&!i.padding&&(i.padding=""),t.includeVerticalAlignmentProperty&&!i.verticalAlignment&&(i.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!i.horizontalAlignment&&(i.horizontalAlignment=t.isRightToLeftContent?"right":"left"),i}const $T={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class WT extends Qo{static get requires(){return[Yg]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:TT,backgroundColors:TT})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=HT(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(Yg),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(i=>{const n=new lo(i);n.set({label:t("Cell properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const s=Object.values($T).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const t=this.editor,i=t.config.get("table.tableCellProperties"),n=uo(i.borderColors),s=ho(t.locale,n),o=uo(i.backgroundColors),r=ho(t.locale,o),a=!1!==i.colorPicker,l=new VT(t.locale,{borderColors:s,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:!!a&&(i.colorPicker||{})}),c=t.t;l.render(),this.listenTo(l,"submit",(()=>{this._hideView()})),this.listenTo(l,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),l.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),e({emitter:l,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=vT(c),h=_T(c);return l.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),l.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:l.borderColorInput,commandName:"tableCellBorderColor",errorText:d,validator:yT})),l.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:l.borderWidthInput,commandName:"tableCellBorderWidth",errorText:h,validator:CT})),l.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:l.paddingInput,commandName:"tableCellPadding",errorText:h,validator:kT})),l.on("change:width",this._getValidatedPropertyChangeCallback({viewField:l.widthInput,commandName:"tableCellWidth",errorText:h,validator:kT})),l.on("change:height",this._getValidatedPropertyChangeCallback({viewField:l.heightInput,commandName:"tableCellHeight",errorText:h,validator:kT})),l.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:l.backgroundInput,commandName:"tableCellBackgroundColor",errorText:d,validator:yT})),l.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),l.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),l}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries($T).map((([t,i])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(i).value||n]})).forEach((([e,i])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,i)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:FT(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&&MT(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,i,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:i,validator:n,errorText:s}=e,o=Mo((()=>{i.errorText=s}),500);return(e,s,r)=>{o.cancel(),this._isReady&&(n(r)?(this.editor.execute(t,{value:r,batch:this._undoStepBatch}),i.errorText=null):o())}}}class jT extends Xo{constructor(e,t,i){super(e),this.attributeName=t,this._defaultValue=i}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:i}=e,n=this.editor.model,s=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),o=this._getValueToSet(t);n.enqueueChange(i,(e=>{o?s.forEach((t=>e.setAttribute(this.attributeName,o,t))):s.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_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 UT extends jT{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=zT(e,"px"))!==this._defaultValue)return e}}class qT extends Qo{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[Qx]}init(){const e=this.editor,t=HT(e.config.get("table.tableCellProperties.defaultProperties"));LA(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new UT(e,t.width))}}class GT extends jT{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=zT(e,"px");if(t!==this._defaultValue)return t}}class KT extends jT{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=zT(e,"px");if(t!==this._defaultValue)return t}}class JT extends jT{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class ZT extends jT{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class QT extends jT{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class YT extends jT{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class XT extends jT{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class eE extends jT{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=zT(e,"px");if(t!==this._defaultValue)return t}}const tE=/^(top|middle|bottom)$/,iE=/^(left|center|right|justify)$/;class nE extends Qo{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[Qx,qT]}init(){const e=this.editor,t=e.model.schema,i=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=HT(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Uu),function(e,t,i){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),RA(t,"td",n,i),RA(t,"th",n,i),OA(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),OA(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),OA(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,i,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new YT(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new XT(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new eE(e,n.borderWidth)),LA(t,i,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new KT(e,n.height)),e.data.addStyleProcessorRules(im),LA(t,i,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new GT(e,n.padding)),e.data.addStyleProcessorRules(ju),LA(t,i,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new JT(e,n.backgroundColor)),function(e,t,i){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),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":iE}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===i?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:iE}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===i?null:t}}})}(t,i,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new QT(e,n.horizontalAlignment)),function(e,t,i){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),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":tE}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===i?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:tE}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===i?null:t}}})}(t,i,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new ZT(e,n.verticalAlignment))}}class sE extends Xo{constructor(e,t,i){super(e),this.attributeName=t,this._defaultValue=i}refresh(){const e=zA(this.editor.model.document.selection);this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,i=t.document.selection,{value:n,batch:s}=e,o=zA(i),r=this._getValueToSet(n);t.enqueueChange(s,(e=>{r?e.setAttribute(this.attributeName,r,o):e.removeAttribute(this.attributeName,o)}))}_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 oE extends sE{constructor(e,t){super(e,"tableBackgroundColor",t)}}class rE extends sE{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class aE extends sE{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class lE extends sE{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=LT(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=zT(e,"px");if(t!==this._defaultValue)return t}}class cE extends sE{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=zT(e,"px"))!==this._defaultValue)return e}}class dE extends sE{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=zT(e,"px"))!==this._defaultValue)return e}}class hE extends sE{constructor(e,t){super(e,"tableAlignment",t)}}const uE=/^(left|center|right)$/,mE=/^(left|none|right)$/;class gE extends Qo{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[Qx]}init(){const e=this.editor,t=e.model.schema,i=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=HT(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Uu),function(e,t,i){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),RA(t,"table",n,i),BA(t,{modelAttribute:n.color,styleName:"border-color"}),BA(t,{modelAttribute:n.style,styleName:"border-style"}),BA(t,{modelAttribute:n.width,styleName:"border-width"})}(t,i,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new rE(e,n.borderColor)),e.commands.add("tableBorderStyle",new aE(e,n.borderStyle)),e.commands.add("tableBorderWidth",new lE(e,n.borderWidth)),function(e,t,i){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:mE}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===i?null:t}}}).attributeToAttribute({view:{attributes:{align:uE}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===i?null:t}}})}(t,i,n.alignment),e.commands.add("tableAlignment",new hE(e,n.alignment)),fE(t,i,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new cE(e,n.width)),fE(t,i,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new dE(e,n.height)),e.data.addStyleProcessorRules(ju),function(e,t,i){const{modelAttribute:n}=i;e.extend("table",{allowAttributes:[n]}),VA(t,{viewElement:"table",...i}),BA(t,i)}(t,i,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new oE(e,n.backgroundColor))}}function fE(e,t,i){const{modelAttribute:n}=i;e.extend("table",{allowAttributes:[n]}),VA(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...i}),OA(t,{modelElement:"table",...i})}const pE={left:um.objectLeft,center:um.objectCenter,right:um.objectRight};class bE extends Fs{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:s,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{alignmentToolbar:u,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new Ss,this.keystrokes=new Ps,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=n,this.borderColorInput=s,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=u;const{saveButtonView:g,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=f,this._focusables=new Ns,this._focusCycler=new qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Kg(e,{label:this.t("Table properties")})),this.children.add(new PT(e,{labelView:o,children:[o,i,s,n],class:"ck-table-form__border-row"})),this.children.add(new PT(e,{labelView:r,children:[r,a],class:"ck-table-form__background-row"})),this.children.add(new PT(e,{children:[new PT(e,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new PT(e,{labelView:m,children:[m,u],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new PT(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(),s({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[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},i=ET({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,s=this.t,o=s("Style"),r=new No(n);r.text=s("Border");const a=wT(s),l=new Fo(n,Om);l.set({label:o,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),Em(l.fieldView,AT(this,t.style),{role:"menu",ariaLabel:o});const c=new Fo(n,Vm);c.set({label:s("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",wE),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new Fo(n,i);return d.set({label:s("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",wE),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,i,n,s)=>{wE(n)||(this.borderColor="",this.borderWidth=""),wE(s)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:r,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,i=new No(e);i.text=t("Background");const n=ET({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new Fo(e,n);return s.set({label:t("Color"),class:"ck-table-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",(()=>{this.backgroundColor=s.fieldView.value})),{backgroundRowLabel:i,backgroundInput:s}}_createDimensionFields(){const e=this.locale,t=this.t,i=new No(e);i.text=t("Dimensions");const n=new Fo(e,Vm);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const s=new Fs(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const o=new Fo(e,Vm);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",(()=>{this.height=o.fieldView.element.value})),{dimensionsLabel:i,widthInput:n,operatorLabel:s,heightInput:o}}_createAlignmentFields(){const e=this.locale,t=this.t,i=new No(e);i.text=t("Alignment");const n=new fm(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),xT({view:this,icons:pE,toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:i,alignmentToolbar:n}}_createActionButtons(){const e=this.locale,t=this.t,i=new lo(e),n=new lo(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return i.set({label:t("Save"),icon:um.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(s,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:um.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:n}}get _alignmentLabels(){const e=this.locale,t=this.t,i=t("Align table to the left"),n=t("Center table"),s=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:s,center:n,left:i}:{left:i,center:n,right:s}}}function wE(e){return"none"!==e}const vE={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class _E extends Qo{static get requires(){return[Yg]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:TT,backgroundColors:TT})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=HT(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(Yg),e.ui.componentFactory.add("tableProperties",(i=>{const n=new lo(i);n.set({label:t("Table properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const s=Object.values(vE).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const t=this.editor,i=t.config.get("table.tableProperties"),n=uo(i.borderColors),s=ho(t.locale,n),o=uo(i.backgroundColors),r=ho(t.locale,o),a=!1!==i.colorPicker,l=new bE(t.locale,{borderColors:s,backgroundColors:r,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:!!a&&(i.colorPicker||{})}),c=t.t;l.render(),this.listenTo(l,"submit",(()=>{this._hideView()})),this.listenTo(l,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),l.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),e({emitter:l,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=vT(c),h=_T(c);return l.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),l.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:l.borderColorInput,commandName:"tableBorderColor",errorText:d,validator:yT})),l.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:l.borderWidthInput,commandName:"tableBorderWidth",errorText:h,validator:CT})),l.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:l.backgroundInput,commandName:"tableBackgroundColor",errorText:d,validator:yT})),l.on("change:width",this._getValidatedPropertyChangeCallback({viewField:l.widthInput,commandName:"tableWidth",errorText:h,validator:kT})),l.on("change:height",this._getValidatedPropertyChangeCallback({viewField:l.heightInput,commandName:"tableHeight",errorText:h,validator:kT})),l.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),l}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(vE).map((([t,i])=>{const n=t,s=this._defaultTableProperties[n]||"";return[n,e.get(i).value||s]})).forEach((([e,i])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,i)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:NT(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;hT(e.editing.view.document.selection)?this._isViewVisible&&MT(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,i,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:i,validator:n,errorText:s}=e,o=Mo((()=>{i.errorText=s}),500);return(e,s,r)=>{o.cancel(),this._isReady&&(n(r)?(this.editor.execute(t,{value:r,batch:this._undoStepBatch}),i.errorText=null):o())}}}function yE(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i){if("insert"!=t.type)continue;const i=t.position.parent;if(i.is("element","table")||"table"==t.name){const s="table"==t.name?t.position.nodeAfter:i,o=Array.from(s.getChildren()).filter((e=>e.is("element","caption"))),r=o.shift();if(!r)continue;for(const t of o)e.move(e.createRangeIn(t),r,"end"),e.remove(t);r.nextSibling&&(e.move(e.createRangeOn(r),s,"end"),n=!0),n=!!o.length||n}}return n}(t,e)))}function kE(e){return!!e&&e.is("element","table")}function CE(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function AE(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 xE extends Xo{refresh(){const e=zA(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!CE(e):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 i=this.editor.model,n=zA(i.document.selection),s=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");i.insertContent(s,n,"end"),t&&e.setSelection(s,"in")}_hideTableCaption(e){const t=this.editor.model,i=zA(t.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),s=CE(i);n._saveCaption(i,s),t.deleteContent(e.createSelection(s,"on"))}}class TE extends Qo{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema,i=e.editing.view,n=e.t;t.isRegistered("caption")?t.extend("caption",{allowIn:"table"}):t.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new xE(this.editor)),e.conversion.for("upcast").elementToElement({view:AE,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>kE(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if(!kE(e.parent))return null;const s=t.createEditableElement("figcaption");return t.setCustomProperty("tableCaption",!0,s),s.placeholder=n("Enter table caption"),ar({view:i,element:s,keepOnFocus:!0}),_b(s,t)}}),yE(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?_c.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class EE extends Qo{static get pluginName(){return"TableCaptionUI"}init(){const e=this.editor,t=e.editing.view,i=e.t;e.ui.componentFactory.add("toggleTableCaption",(n=>{const s=e.commands.get("toggleTableCaption"),o=new lo(n);return o.set({icon:um.caption,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(s,"value","isEnabled"),o.bind("label").to(s,"value",(e=>i(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(o,"execute",(()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),s.value){const i=function(e){const t=zA(e);return t?CE(t):null}(e.model.document.selection),n=e.editing.mapper.toViewElement(i);if(!n)return;t.scrollToTheSelection(),t.change((e=>{e.addClass("table__caption_highlighted",n)}))}e.editing.view.focus()})),o}))}}class SE extends Xo{refresh(){this.isEnabled=!0}execute(e={}){const{model:t,plugins:i}=this.editor;let{table:n=t.document.selection.getSelectedElement(),columnWidths:s,tableWidth:o}=e;s&&(s=Array.isArray(s)?s:s.split(",")),t.change((e=>{o?e.setAttribute("tableWidth",o,n):e.removeAttribute("tableWidth",n);const t=i.get("TableColumnResizeEditing").getColumnGroupElement(n);if(!s&&!t)return;if(!s)return e.remove(t);const r=xx(s);if(t)Array.from(t.getChildren()).forEach(((t,i)=>e.setAttribute("columnWidth",r[i],t)));else{const t=e.createElement("tableColumnGroup");r.forEach((i=>e.appendElement("tableColumn",{columnWidth:i},t))),e.append(t,n)}}))}}function PE(e){return t=>t.on("element:colgroup",((t,i,n)=>{const s=i.modelCursor.findAncestor("table"),o=Sx(s);if(!o)return;const r=Px(o),a=e.getColumns(s);let l=(c=o,d=n.writer,Px(c).reduce(((e,t)=>{const i=t.getAttribute("columnWidth"),n=t.getAttribute("colSpan");if(!n)return e.push(i),e;for(let t=0;t<n;t++)e.push(i);return d.removeAttribute("colSpan",t),e}),[]));var c,d;l=Array.from({length:a},((e,t)=>l[t]||"auto")),(l.length!=r.length||l.includes("auto"))&&Ex(r,o,xx(l),n.writer)}),{priority:"low"})}class IE extends Qo{static get requires(){return[Qx,Ix]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(Vn()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",((t,i,n)=>{const s=n?"removeClass":"addClass";e.editing.view.change((t=>{for(const i of e.editing.view.document.roots)t[s]("ck-column-resize_disabled",e.editing.view.document.getRoot(i.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 i=new SE(e);e.commands.add("resizeTableWidth",i),e.commands.add("resizeColumnWidths",i),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",i,"isEnabled",((e,t,i)=>!e&&t&&i))}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return Sx(e)}getTableColumnElements(e){return Px(e)}getTableColumnsWidths(e){return function(e){return Px(e).map((e=>e.getAttribute("columnWidth")))}(e)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth"]}),this.editor.model.schema.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),this.editor.model.schema.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0})}_registerPostFixer(){const e=this.editor.model;function t(e,t,i){const n=i._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return e;const s=e.map((e=>Number(e.replace("%","")))),o=function(e,t){const i=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))i.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&i.add(e)}return i}(i.editor.model.document.differ,t);for(const e of o){const o=n-s.length;if(0===o)continue;const a=o>0,l=i._tableUtilsPlugin.getCellLocation(e).column;if(a){const e=vx(t,i.editor),n=(r=e,Array(o).fill(r));s.splice(l,0,...n)}else{const e=s.splice(l,Math.abs(o));s[l]+=Ax(e)}}var r;return s.map((e=>e+"%"))}e.document.registerPostFixer((i=>{let n=!1;for(const s of function(e){const t=new Set;for(const i of e.document.differ.getChanges()){let n=null;switch(i.type){case"insert":n=["table","tableRow","tableCell"].includes(i.name)?i.position:null;break;case"remove":n=["tableRow","tableCell"].includes(i.name)?i.position:null;break;case"attribute":i.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(i.range.start.nodeAfter.name)?i.range.start:null)}if(!n)continue;const s=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAncestor("table");for(const i of e.createRangeOn(s).getItems())i.is("element","table")&&Sx(i)&&t.add(i)}return t}(e)){const e=this.getColumnGroupElement(s),o=this.getTableColumnElements(e),r=this.getTableColumnsWidths(e);let a=xx(r);a=t(a,s,this),ch(r,a)||(Ex(o,e,a,i),n=!0)}return n}))}_registerConverters(){const e=this.editor.conversion;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>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((e=>e.on("insert:table",((e,t,i)=>{const n=i.writer,s=t.item,o=i.mapper.toViewElement(s),r=o.is("element","table")?o:Array.from(o.getChildren()).find((e=>e.is("element","table")));Sx(s)?n.addClass("ck-table-resized",r):n.removeClass("ck-table-resized",r)}),{priority:"low"}))),e.for("upcast").add(PE(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(lT),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(Mn.window.document,"mousemove",Ig(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(Mn.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const i=t.target;if(!i.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;const n=this.editor,s=n.editing.mapper.toModelElement(i.findAncestor("figure"));if(!n.model.canEditAt(s))return;t.preventDefault(),e.stop();const o=function(e,t,i){const n=Array(t.getColumns(e)),s=new jA(e);for(const e of s){const t=i.editing.mapper.toViewElement(e.cell),s=Tx(i.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||s<n[e.column])&&(n[e.column]=Cx(s))}return n}(s,this._tableUtilsPlugin,n),r=i.findAncestor("table"),a=n.editing.view;Array.from(r.getChildren()).find((e=>e.is("element","colgroup")))||a.change((e=>{!function(e,t,i){const n=e.createContainerElement("colgroup");for(let i=0;i<t.length;i++){const s=e.createEmptyElement("col"),o=`${Cx(t[i]/Ax(t)*100)}%`;e.setStyle("width",o,s),e.insert(e.createPositionAt(n,"end"),s)}e.insert(e.createPositionAt(i,0),n)}(e,o,r)})),this._isResizingActive=!0,this._resizingData=this._getResizingData(t,o),a.change((e=>function(e,t,i){const n=i.widths.viewFigureWidth/i.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",i.elements.viewResizer),e.setStyle("width",`${Cx(100*n)}%`,t.findAncestor("figure"))}(e,r,this._resizingData)))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:i,flags:{isRightEdge:n,isTableCentered:s,isLtrContent:o},elements:{viewFigure:r,viewLeftColumn:a,viewRightColumn:l},widths:{viewFigureParentWidth:c,tableWidth:d,leftColumnWidth:h,rightColumnWidth:u}}=this._resizingData,m=40-h,g=n?c-d:u-40,f=(o?1:-1)*(n&&s?2:1),p=(b=(t.clientX-i)*f,w=Math.min(m,0),v=Math.max(g,0),Cx(b<=w?w:b>=v?v:b));var b,w,v;0!==p&&this.editor.editing.view.change((e=>{const t=Cx(100*(h+p)/d);if(e.setStyle("width",`${t}%`,a),n){const t=Cx(100*(d+p)/c);e.setStyle("width",`${t}%`,r)}else{const t=Cx(100*(u-p)/d);e.setStyle("width",`${t}%`,l)}}))}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:i,viewColgroup:n}=this._resizingData.elements,s=this.editor,o=s.editing.view,r=this.getColumnGroupElement(t),a=Array.from(n.getChildren()).filter((e=>e.is("view:element"))),l=r?this.getTableColumnsWidths(r):null,c=a.map((e=>e.getStyle("width"))),d=!ch(l,c),h=t.getAttribute("tableWidth"),u=i.getStyle("width"),m=h!==u;(d||m)&&(this._isResizingAllowed?s.execute("resizeTableWidth",{table:t,tableWidth:`${Cx(u)}%`,columnWidths:c}):o.change((e=>{if(l)for(const t of a)e.setStyle("width",l.shift(),t);else e.remove(n);m&&(h?e.setStyle("width",h,i):e.removeStyle("width",i)),l||h||e.removeClass("ck-table-resized",[...i.getChildren()].find((e=>"table"===e.name)))}))),o.change((t=>{t.removeClass("ck-table-column-resizer__active",e)})),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const i=this.editor,n=e.domEvent.clientX,s=e.target,o=s.findAncestor("td")||s.findAncestor("th"),r=i.editing.mapper.toModelElement(o),a=r.findAncestor("table"),l=function(e,t){const i=t.getCellLocation(e).column;return{leftEdge:i,rightEdge:i+(e.getAttribute("colspan")||1)-1}}(r,this._tableUtilsPlugin).rightEdge,c=l===this._tableUtilsPlugin.getColumns(a)-1,d=!a.hasAttribute("tableAlignment"),h="rtl"!==i.locale.contentLanguageDirection,u=o.findAncestor("table"),m=u.findAncestor("figure"),g=[...u.getChildren()].find((e=>e.is("element","colgroup"))),f=g.getChild(l),p=c?void 0:g.getChild(l+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:d,isLtrContent:h},elements:{viewResizer:s,modelTable:a,viewFigure:m,viewColgroup:g,viewLeftColumn:f,viewRightColumn:p},widths:{viewFigureParentWidth:kx(i.editing.view.domConverter.mapViewToDom(m.parent)),viewFigureWidth:kx(i.editing.view.domConverter.mapViewToDom(m)),tableWidth:_x(a,i),leftColumnWidth:t[l],rightColumnWidth:c?void 0:t[l+1]}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add((e=>{e.on("insert:tableCell",((e,t,i)=>{const n=t.item,s=i.mapper.toViewElement(n),o=i.writer;o.insert(o.createPositionAt(s,"end"),o.createUIElement("div",{class:"ck-table-column-resizer"}))}),{priority:"lowest"})}))}}class VE extends Qo{static get pluginName(){return"UploadVideoUI"}init(){const e=this.editor;e.ui.componentFactory.add("uploadVideo",(t=>{const i=new My(t),n=e.commands.get("insertVideo");return i.set({acceptedType:"video/mp4",allowMultipleFiles:!1}),i.buttonView.set({icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M18.68 3.03c.6 0 .59-.03.59.55v12.84c0 .59.01.56-.59.56H1.29c-.6 0-.59.03-.59-.56V3.58c0-.58-.01-.55.6-.55h17.38zM15.77 15V5H4.2v10h11.57zM2 4v1h1V4H2zm0 2v1h1V6H2zm0 2v1h1V8H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zM17 4v1h1V4h-1zm0 2v1h1V6h-1zm0 2v1h1V8h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zM7.5 7.177a.4.4 0 0 1 .593-.351l5.133 2.824a.4.4 0 0 1 0 .7l-5.133 2.824a.4.4 0 0 1-.593-.35V7.176v.001z"/></svg>',label:e.t("Insert video"),tooltip:!0}),i.buttonView.bind("isEnabled").to(n),i.on("done",((t,i)=>{window.AdminUploadAdapter?(new window.AdminUploadAdapter).upload(i,(function(t){e.execute("insertVideo",t)})):e.execute("insertVideo",URL.createObjectURL(i[0]))})),i}))}}class RE extends Xo{refresh(){const e=this.editor.model,t=e.document.selection,i=OE(t);this.value=i?i.getAttribute("url"):null,this.isEnabled=function(e){const t=e.getSelectedElement();return!!t&&"video"===t.name}(t)||function(e,t){const i=yb(e,t);let n=i.start.parent;n.isEmpty&&!t.schema.isLimit(n)&&(n=n.parent);return t.schema.checkChild(n,"videoBlock")}(t,e)}execute(e){const t=this.editor.model,i=OE(t.document.selection);i?t.change((t=>{t.setAttribute("url",e,i)})):this.insertVideo(e)}insertVideo(e){const t=this.editor.model;t.change((i=>{t.insertContent(i.createElement("videoBlock",{src:e,controls:"controls",style:"display:block;width:100%;height:100%",preload:"auto"}),t.document.selection)}))}}function OE(e){const t=e.getSelectedElement();return t&&t.is("element","video")?t:null}class BE extends Qo{static get requires(){return[Oy]}static get pluginName(){return"UploadVideoEditing"}init(){const e=this.editor;e.commands.add("insertVideo",new RE(e)),e.model.schema.register("videoBlock",{inheritAllFrom:"$blockObject",allowAttributes:["src","style","width","height","controls"]}),e.conversion.for("dataDowncast").elementToStructure({model:"videoBlock",view:(e,{writer:t})=>this._createBlockVideoViewElement(t)}),e.conversion.for("editingDowncast").elementToStructure({model:"videoBlock",view:(e,{writer:t})=>pb(this._createBlockVideoViewElement(t),t)}),e.conversion.for("downcast").add(this._downcastVideoAttribute("videoBlock","src")).add(this._downcastVideoAttribute("videoBlock","style")).add(this._downcastVideoAttribute("videoBlock","controls")).add(this._downcastVideoAttribute("videoBlock"))}_createBlockVideoViewElement(e){return e.createContainerElement("figure",{class:"video"},[e.createEmptyElement("video"),e.createSlot()])}_downcastVideoAttribute(e,t){const i=this.editor;return n=>{n.on(`attribute:${t}:${e}`,((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;let s=n.mapper.toViewElement(t.item);for(const{item:e}of i.editing.view.createRangeIn(s))if(e&&e.is("element","video")){s=e;break}n.writer.setAttribute(t.attributeKey,t.attributeNewValue||"",s)}))}}}class ME{constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{if(window.AdminUploadAdapter)this.loader.file.then((function(t){(new window.AdminUploadAdapter).upload([t],(function(t){e({urls:{default:t}})}))}));else{const i=this.reader=new window.FileReader;i.addEventListener("load",(()=>{e({default:i.result})})),i.addEventListener("error",(e=>{t(e)})),i.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{i.readAsDataURL(e)}))}}))}abort(){this.reader.abort()}}class NE extends Af{}NE.builtinPlugins=[class extends Qo{static get requires(){return[Rf,Bf]}static get pluginName(){return"Alignment"}},class extends Qo{static get requires(){return[Kf]}static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&fp(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&fp(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&fp(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&fp(this.editor,this,/^\[\s?x\s?\]\s$/,(()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")}))}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const e=wp(this.editor,"bold");pp(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),pp(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(e.get("italic")){const e=wp(this.editor,"italic");pp(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),pp(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(e.get("code")){const e=wp(this.editor,"code");pp(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(e.get("strikethrough")){const e=wp(this.editor,"strikethrough");pp(this.editor,this,/(~~)([^~]+)(~~)$/g,e)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter((e=>e.match(/^heading[1-6]$/))).forEach((t=>{const i=t[7],n=new RegExp(`^(#{${i}})\\s$`);fp(this.editor,this,n,(()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&fp(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&fp(e,this,/^```$/,(()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&fp(this.editor,this,/^---$/,"horizontalLine")}},class extends Qo{static get requires(){return[nw,ny,vw,Kf]}static get pluginName(){return"AutoImage"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",(()=>{const e=t.selection.getFirstRange(),i=Sh.fromPosition(e.start);i.stickiness="toPrevious";const n=Sh.fromPosition(e.end);n.stickiness="toNext",t.once("change:data",(()=>{this._embedImageBetweenPositions(i,n),i.detach(),n.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(Mn.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,n=new Wc(e,t),s=n.getWalker({ignoreElementEnd:!0}),o=Object.fromEntries(i.model.document.selection.getAttributes()),r=this.editor.plugins.get("ImageUtils");let a="";for(const e of s)e.item.is("$textProxy")&&(a+=e.item.data);a=a.trim(),a.match(oy)?(this._positionToInsert=Sh.fromPosition(e),this._timeoutId=setTimeout((()=>{if(!i.commands.get("insertImage").isEnabled)return void n.detach();i.model.change((e=>{let t;this._timeoutId=null,e.remove(n),n.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),r.insertImage({...o,src:a},t),this._positionToInsert.detach(),this._positionToInsert=null}));i.plugins.get("Delete").requestUndoOnBackspace()}),100)):n.detach()}},rC,class extends Qo{static get requires(){return[eb,tb]}static get pluginName(){return"BlockQuote"}},class extends Qo{static get requires(){return[yp,Cp]}static get pluginName(){return"Bold"}},class extends Qo{static get requires(){return[xp,Ep]}static get pluginName(){return"Code"}},class extends Qo{static get requires(){return[nw,Up,cw,Jp,Jf,vw]}static get pluginName(){return"Essentials"}},class extends Qo{static get requires(){return[qw,Gw]}static get pluginName(){return"FontBackgroundColor"}},class extends Qo{static get requires(){return[$w,jw]}static get pluginName(){return"FontColor"}},class extends Qo{static get requires(){return[Rw,Ow]}static get pluginName(){return"FontFamily"}},class extends Qo{static get requires(){return[Lw,zw]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return Mw(e)}},class extends Qo{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[V_,F_,D_,L_,H_,$_,W_,j_,U_,q_,J_]}init(){const e=this.editor,t=e.plugins.get(V_);t.loadAllowedEmptyElementsConfig(e.config.get("htmlSupport.allowEmpty")||[]),t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(e){const t=this.editor.plugins.get("DataSchema"),i=Array.from(t.getDefinitionsForView(e,!1)),n=i.find((e=>e.isInline&&!i[0].isObject));return n?n.model:d_(e)}addModelHtmlClass(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of Z_(n,i,s))c_(e,o,s,"classes",(e=>{for(const i of ys(t))e.add(i)}))}))}removeModelHtmlClass(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of Z_(n,i,s))c_(e,o,s,"classes",(e=>{for(const i of ys(t))e.delete(i)}))}))}setModelHtmlAttributes(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of Z_(n,i,s))c_(e,o,s,"attributes",(e=>{for(const[i,n]of Object.entries(t))e.set(i,n)}))}))}removeModelHtmlAttributes(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of Z_(n,i,s))c_(e,o,s,"attributes",(e=>{for(const i of ys(t))e.delete(i)}))}))}setModelHtmlStyles(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of Z_(n,i,s))c_(e,o,s,"styles",(e=>{for(const[i,n]of Object.entries(t))e.set(i,n)}))}))}removeModelHtmlStyles(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of Z_(n,i,s))c_(e,o,s,"styles",(e=>{for(const i of ys(t))e.delete(i)}))}))}},class extends Qo{static get requires(){return[tv,iv]}static get pluginName(){return"Heading"}},class extends Qo{static get requires(){return[sv,ov,Ob]}static get pluginName(){return"HorizontalLine"}},class extends Qo{static get requires(){return[xy,Ey]}static get pluginName(){return"Image"}},class extends Qo{static get requires(){return[Iy,Vy]}static get pluginName(){return"ImageCaption"}},class extends Qo{static get pluginName(){return"ImageInsert"}static get requires(){return[Zy,Xy,Ay]}},class extends Qo{static get requires(){return[tk,rk,nk]}static get pluginName(){return"ImageResize"}},class extends Qo{static get requires(){return[yk,kk]}static get pluginName(){return"ImageStyle"}},class extends Qo{static get requires(){return[Mb,ny]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(Mb),n=e.plugins.get("ImageUtils");var s;i.register("image",{ariaLabel:t("Image toolbar"),items:(s=e.config.get("image.toolbar")||[],s.map((e=>L(e)?e.name:e))),getRelatedElement:e=>n.getClosestSelectedImageWidget(e)})}},Zy,class extends Qo{static get pluginName(){return"Indent"}static get requires(){return[Tk,Pk]}},class extends Qo{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const e=this.editor,t=e.config.get("indentBlock");t.classes&&t.classes.length?(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new Ik(e,new Rk({direction:"forward",classes:t.classes}))),e.commands.add("outdentBlock",new Ik(e,new Rk({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(tm),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new Ik(e,new Vk({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new Ik(e,new Vk({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,i=e.commands.get("indent"),n=e.commands.get("outdent"),s=e.config.get("heading.options");(s&&s.map((e=>e.model))||Ok).forEach((e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})})),t.setAttributeProperties("blockIndent",{isFormatting:!0}),i.registerChildCommand(e.commands.get("indentBlock")),n.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,t="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[t]:/[\s\S]+/}},model:{key:"blockIndent",value:e=>{if(!e.is("element","li"))return e.getStyle(t)}}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:e=>({key:"style",value:{[t]:e}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const i of e)t.model.values.push(i),t.view[i]={key:"class",value:[i]};this.editor.conversion.attributeToAttribute(t)}},class extends Qo{static get requires(){return[Pp,Vp]}static get pluginName(){return"Italic"}},class extends Qo{static get requires(){return[Yk,nC,rC]}static get pluginName(){return"Link"}},class extends Qo{static get requires(){return[lC,hC]}static get pluginName(){return"LinkImage"}},class extends Qo{static get requires(){return[YC,TC]}static get pluginName(){return"List"}},class extends Qo{static get requires(){return[sA,RC]}static get pluginName(){return"ListProperties"}},class extends Qo{static get requires(){return[VE,BE,Ob]}static get pluginName(){return"UploadVideo"}},class extends Qo{static get requires(){return[Oy]}static get pluginName(){return"ThinkUploadImageAdapter"}init(){this.editor.plugins.get(Oy).createUploadAdapter=e=>new ME(e)}},Qw,class extends Qo{static get pluginName(){return"PasteFromOffice"}static get requires(){return[ab]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),i=e.editing.view.document,n=[];n.push(new wA(i)),n.push(new kA(i)),n.push(new AA(i)),t.on("inputTransformation",((t,s)=>{if(s._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const o=s.dataTransfer.getData("text/html"),r=n.find((e=>e.isActive(o)));r&&(s._parsedData||(s._parsedData=TA(o,i.stylesProcessor)),r.execute(s),s._isTransformedWithPasteFromOffice=!0)}),{priority:"high"})}},class extends Qo{static get requires(){return[IA,SA]}static get pluginName(){return"RemoveFormat"}},class extends Qo{static get requires(){return[Op,Mp]}static get pluginName(){return"Strikethrough"}},class extends Qo{static get requires(){return[Qx,eT,iT,cT,aT,nT,Ob]}static get pluginName(){return"Table"}},class extends Qo{static get pluginName(){return"TableCaption"}static get requires(){return[TE,EE]}},class extends Qo{static get pluginName(){return"TableCellProperties"}static get requires(){return[nE,WT]}},class extends Qo{static get requires(){return[IE,qT]}static get pluginName(){return"TableColumnResize"}},class extends Qo{static get pluginName(){return"TableProperties"}static get requires(){return[gE,_E]}},class extends Qo{static get requires(){return[Mb]}static get pluginName(){return"TableToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(Mb),n=e.config.get("table.contentToolbar"),s=e.config.get("table.tableToolbar");n&&i.register("tableContent",{ariaLabel:t("Table toolbar"),items:n,getRelatedElement:mT}),s&&i.register("table",{ariaLabel:t("Table toolbar"),items:s,getRelatedElement:uT})}},class extends Qo{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:ap}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,i=e.plugins.get("Delete"),n=function(e){const t=e.extra||[],i=e.remove||[],n=e=>!i.includes(e);return function(e){const t=new Set;for(const i of e)if("string"==typeof i&&rp[i])for(const e of rp[i])t.add(e);else t.add(i);return Array.from(t)}(e.include.concat(t).filter(n)).filter(n).map((e=>"string"==typeof e&&op[e]?op[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:lp(e.from),to:cp(e.to)})))}(e.config.get("typing.transformations")),s=new Qf(e.model,(e=>{for(const t of n){if(t.from.test(e))return{normalizedTransformation:t}}}));s.on("matched:data",((e,n)=>{if(!n.batch.isTyping)return;const{from:s,to:o}=n.normalizedTransformation,r=s.exec(n.text),a=o(r.slice(1)),l=n.range;let c=r.index;t.enqueueChange((e=>{for(let i=1;i<r.length;i++){const n=r[i],s=a[i-1];if(null==s){c+=n.length;continue}const o=l.start.getShiftedBy(c),d=t.createRange(o,o.getShiftedBy(n.length)),h=dp(o);t.insertContent(e.createText(s,h),d),c+=s.length}t.enqueueChange((()=>{i.requestUndoOnBackspace()}))}))})),s.bind("isEnabled").to(this)}},class extends Qo{static get requires(){return[Fp,Lp]}static get pluginName(){return"Underline"}}],NE.defaultConfig={indentBlock:{offset:1,unit:"em"},fontSize:{options:[9,11,12,"default",16,18,20,22,24,26,28,30,32,34,36,38,40]},toolbar:{items:["heading","|","fontFamily","fontSize","fontColor","fontBackgroundColor","bold","italic","strikethrough","underline","removeFormat","link","|","alignment","outdent","indent","numberedList","bulletedList","|","horizontalLine","code","blockQuote","insertTable","imageInsert","uploadVideo"]},language:"zh-cn",image:{toolbar:["imageTextAlternative","imageStyle:inline","imageStyle:block","imageStyle:side","toggleImageCaption","linkImage"]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableCellProperties","tableProperties"]},fontFamily:{options:["default","微软雅黑, Microsoft YaHei","新宋体, NSimSun","宋体, SimSun","仿宋, FangSong","楷体, KaiTi","黑体, SimHei","Arial, Helvetica, sans-serif","Tahoma, Geneva, sans-serif","Verdana, Geneva, sans-serif","Courier New, Courier, monospace"]},htmlSupport:{allow:[{name:/.*/,styles:!0,classes:!0,attributes:!0}],disallow:[{name:"script"}]}};const FE=NE;window.createEditor=function(e,t){"number"==typeof(t=t||{}).height&&(t.height+="px");let i=$(e);i.parents(".layui-card-html").removeClass("layui-card-html").addClass("layui-card-table");let n=i.parents(".layui-card-table").parent(".layui-card-body").offset();n&&n.top>0&&(t.ui=Object.assign({},t.ui||{},{viewportOffset:n})),document.querySelector(".ck-body-wrapper")||i.after('<div class="ck-body-wrapper"></div>'),NE.create(document.querySelector(e),t).then((function(e){let i=$(e.sourceElement).data("editor",e);i.triggerHandler("editor.init",e),e.model.document.on("change:data",(function(){i.val(e.getData())})),e.editing.view.change((i=>{let n=e.editing.view.document.getRoot();i.setStyle("min-height",t.height||"400px",n),i.setStyle("padding-bottom","2px",n)}))})).catch((function(e){console.error("Oops, something went wrong!"),console.warn("Build id: yw6zhbblcdbg-b5dhd7ee5sv3"),console.error(e)}))}})(),n=n.default})()));
\ No newline at end of file
+function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()}(self,(()=>(()=>{var e,t,i={659:(e,t,i)=>{const n=i(156),s={};for(const e of Object.keys(n))s[n[e]]=e;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const e of Object.keys(o)){if(!("channels"in o[e]))throw new Error("missing channels property: "+e);if(!("labels"in o[e]))throw new Error("missing channel labels property: "+e);if(o[e].labels.length!==o[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:i}=o[e];delete o[e].channels,delete o[e].labels,Object.defineProperty(o[e],"channels",{value:t}),Object.defineProperty(o[e],"labels",{value:i})}o.rgb.hsl=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.min(t,i,n),o=Math.max(t,i,n),r=o-s;let a,l;o===s?a=0:t===o?a=(i-n)/r:i===o?a=2+(n-t)/r:n===o&&(a=4+(t-i)/r),a=Math.min(60*a,360),a<0&&(a+=360);const c=(s+o)/2;return l=o===s?0:c<=.5?r/(o+s):r/(2-o-s),[a,100*l,100*c]},o.rgb.hsv=function(e){let t,i,n,s,o;const r=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(r,a,l),d=c-Math.min(r,a,l),h=function(e){return(c-e)/6/d+.5};return 0===d?(s=0,o=0):(o=d/c,t=h(r),i=h(a),n=h(l),r===c?s=n-i:a===c?s=1/3+t-n:l===c&&(s=2/3+i-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*o,100*c]},o.rgb.hwb=function(e){const t=e[0],i=e[1];let n=e[2];const s=o.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(i,n));return n=1-1/255*Math.max(t,Math.max(i,n)),[s,100*r,100*n]},o.rgb.cmyk=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-i,1-n);return[100*((1-t-s)/(1-s)||0),100*((1-i-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*s]},o.rgb.keyword=function(e){const t=s[e];if(t)return t;let i,o=1/0;for(const t of Object.keys(n)){const s=n[t],l=(a=s,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);l<o&&(o=l,i=t)}var r,a;return i},o.keyword.rgb=function(e){return n[e]},o.rgb.xyz=function(e){let t=e[0]/255,i=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*i+.1805*n),100*(.2126*t+.7152*i+.0722*n),100*(.0193*t+.1192*i+.9505*n)]},o.rgb.lab=function(e){const t=o.rgb.xyz(e);let i=t[0],n=t[1],s=t[2];i/=95.047,n/=100,s/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*n-16,500*(i-n),200*(n-s)]},o.hsl.rgb=function(e){const t=e[0]/360,i=e[1]/100,n=e[2]/100;let s,o,r;if(0===i)return r=255*n,[r,r,r];s=n<.5?n*(1+i):n+i-n*i;const a=2*n-s,l=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,r=6*o<1?a+6*(s-a)*o:2*o<1?s:3*o<2?a+(s-a)*(2/3-o)*6:a,l[e]=255*r;return l},o.hsl.hsv=function(e){const t=e[0];let i=e[1]/100,n=e[2]/100,s=i;const o=Math.max(n,.01);n*=2,i*=n<=1?n:2-n,s*=o<=1?o:2-o;return[t,100*(0===n?2*s/(o+s):2*i/(n+i)),100*((n+i)/2)]},o.hsv.rgb=function(e){const t=e[0]/60,i=e[1]/100;let n=e[2]/100;const s=Math.floor(t)%6,o=t-Math.floor(t),r=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o));switch(n*=255,s){case 0:return[n,l,r];case 1:return[a,n,r];case 2:return[r,n,l];case 3:return[r,a,n];case 4:return[l,r,n];case 5:return[n,r,a]}},o.hsv.hsl=function(e){const t=e[0],i=e[1]/100,n=e[2]/100,s=Math.max(n,.01);let o,r;r=(2-i)*n;const a=(2-i)*s;return o=i*s,o/=a<=1?a:2-a,o=o||0,r/=2,[t,100*o,100*r]},o.hwb.rgb=function(e){const t=e[0]/360;let i=e[1]/100,n=e[2]/100;const s=i+n;let o;s>1&&(i/=s,n/=s);const r=Math.floor(6*t),a=1-n;o=6*t-r,0!=(1&r)&&(o=1-o);const l=i+o*(a-i);let c,d,h;switch(r){default:case 6:case 0:c=a,d=l,h=i;break;case 1:c=l,d=a,h=i;break;case 2:c=i,d=a,h=l;break;case 3:c=i,d=l,h=a;break;case 4:c=l,d=i,h=a;break;case 5:c=a,d=i,h=l}return[255*c,255*d,255*h]},o.cmyk.rgb=function(e){const t=e[0]/100,i=e[1]/100,n=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,i*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s))]},o.xyz.rgb=function(e){const t=e[0]/100,i=e[1]/100,n=e[2]/100;let s,o,r;return s=3.2406*t+-1.5372*i+-.4986*n,o=-.9689*t+1.8758*i+.0415*n,r=.0557*t+-.204*i+1.057*n,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),r=Math.min(Math.max(0,r),1),[255*s,255*o,255*r]},o.xyz.lab=function(e){let t=e[0],i=e[1],n=e[2];t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*i-16,500*(t-i),200*(i-n)]},o.lab.xyz=function(e){let t,i,n;i=(e[0]+16)/116,t=e[1]/500+i,n=i-e[2]/200;const s=i**3,o=t**3,r=n**3;return i=s>.008856?s:(i-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,t*=95.047,i*=100,n*=108.883,[t,i,n]},o.lab.lch=function(e){const t=e[0],i=e[1],n=e[2];let s;s=360*Math.atan2(n,i)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(i*i+n*n),s]},o.lch.lab=function(e){const t=e[0],i=e[1],n=e[2]/360*2*Math.PI;return[t,i*Math.cos(n),i*Math.sin(n)]},o.rgb.ansi16=function(e,t=null){const[i,n,s]=e;let r=null===t?o.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===r&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){const t=e[0],i=e[1],n=e[2];if(t===i&&i===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},o.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const i=.5*(1+~~(e>50));return[(1&t)*i*255,(t>>1&1)*i*255,(t>>2&1)*i*255]},o.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},o.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let i=t[0];3===t[0].length&&(i=i.split("").map((e=>e+e)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},o.rgb.hcg=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,i),n),o=Math.min(Math.min(t,i),n),r=s-o;let a,l;return a=r<1?o/(1-r):0,l=r<=0?0:s===t?(i-n)/r%6:s===i?2+(n-t)/r:4+(t-i)/r,l/=6,l%=1,[360*l,100*r,100*a]},o.hsl.hcg=function(e){const t=e[1]/100,i=e[2]/100,n=i<.5?2*t*i:2*t*(1-i);let s=0;return n<1&&(s=(i-.5*n)/(1-n)),[e[0],100*n,100*s]},o.hsv.hcg=function(e){const t=e[1]/100,i=e[2]/100,n=t*i;let s=0;return n<1&&(s=(i-n)/(1-n)),[e[0],100*n,100*s]},o.hcg.rgb=function(e){const t=e[0]/360,i=e[1]/100,n=e[2]/100;if(0===i)return[255*n,255*n,255*n];const s=[0,0,0],o=t%1*6,r=o%1,a=1-r;let l=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=r,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=r;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=r,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return l=(1-i)*n,[255*(i*s[0]+l),255*(i*s[1]+l),255*(i*s[2]+l)]},o.hcg.hsv=function(e){const t=e[1]/100,i=t+e[2]/100*(1-t);let n=0;return i>0&&(n=t/i),[e[0],100*n,100*i]},o.hcg.hsl=function(e){const t=e[1]/100,i=e[2]/100*(1-t)+.5*t;let n=0;return i>0&&i<.5?n=t/(2*i):i>=.5&&i<1&&(n=t/(2*(1-i))),[e[0],100*n,100*i]},o.hcg.hwb=function(e){const t=e[1]/100,i=t+e[2]/100*(1-t);return[e[0],100*(i-t),100*(1-i)]},o.hwb.hcg=function(e){const t=e[1]/100,i=1-e[2]/100,n=i-t;let s=0;return n<1&&(s=(i-n)/(1-n)),[e[0],100*n,100*s]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=function(e){return[0,0,e[0]]},o.gray.hsv=o.gray.hsl,o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(i.length)+i},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},734:(e,t,i)=>{const n=i(659),s=i(507),o={};Object.keys(n).forEach((e=>{o[e]={},Object.defineProperty(o[e],"channels",{value:n[e].channels}),Object.defineProperty(o[e],"labels",{value:n[e].labels});const t=s(e);Object.keys(t).forEach((i=>{const n=t[i];o[e][i]=function(e){const t=function(...t){const i=t[0];if(null==i)return i;i.length>1&&(t=i);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),o[e][i].raw=function(e){const t=function(...t){const i=t[0];return null==i?i:(i.length>1&&(t=i),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=o},507:(e,t,i)=>{const n=i(659);function s(e){const t=function(){const e={},t=Object.keys(n);for(let i=t.length,n=0;n<i;n++)e[t[n]]={distance:-1,parent:null};return e}(),i=[e];for(t[e].distance=0;i.length;){const e=i.pop(),s=Object.keys(n[e]);for(let n=s.length,o=0;o<n;o++){const n=s[o],r=t[n];-1===r.distance&&(r.distance=t[e].distance+1,r.parent=e,i.unshift(n))}}return t}function o(e,t){return function(i){return t(e(i))}}function r(e,t){const i=[t[e].parent,e];let s=n[t[e].parent][e],r=t[e].parent;for(;t[r].parent;)i.unshift(t[r].parent),s=o(n[t[r].parent][r],s),r=t[r].parent;return s.conversion=i,s}e.exports=function(e){const t=s(e),i={},n=Object.keys(t);for(let e=n.length,s=0;s<e;s++){const e=n[s];null!==t[e].parent&&(i[e]=r(e,t))}return i}},156:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return i[e](o,o.exports,s),o.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(i,n){if(1&n&&(i=this(i)),8&n)return i;if("object"==typeof i&&i){if(4&n&&i.__esModule)return i;if(16&n&&"function"==typeof i.then)return i}var o=Object.create(null);s.r(o);var r={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&i;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>r[e]=()=>i[e]));return r.default=()=>i,s.d(o,r),o},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";function e({emitter:e,activator:t,callback:i,contextElements:n}){e.listenTo(document,"mousedown",((e,s)=>{if(!t())return;const o="function"==typeof s.composedPath?s.composedPath():[],r="function"==typeof n?n():n;for(const e of r)if(e.contains(s.target)||o.includes(e))return;i()}))}function t(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function i({view:e}){e.listenTo(e.element,"submit",((t,i)=>{i.preventDefault(),e.fire("submit")}),{useCapture:!0})}function n({keystrokeHandler:e,focusTracker:t,gridItems:i,numberOfColumns:n,uiLanguageDirection:s}){const o="number"==typeof n?()=>n:n;function r(e){return n=>{const s=i.find((e=>e.element===t.focusedElement)),o=i.getIndex(s),r=e(o,i);i.get(r).focus(),n.stopPropagation(),n.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function l(e,t){return 0===e?t-1:e-1}e.set("arrowright",r(((e,t)=>"rtl"===s?l(e,t.length):a(e,t.length)))),e.set("arrowleft",r(((e,t)=>"rtl"===s?a(e,t.length):l(e,t.length)))),e.set("arrowup",r(((e,t)=>{let i=e-o();return i<0&&(i=e+o()*Math.floor(t.length/o()),i>t.length-1&&(i-=o())),i}))),e.set("arrowdown",r(((e,t)=>{let i=e+o();return i>t.length-1&&(i=e%o()),i})))}s.d(o,{default:()=>gS});const r=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),a={isMac:c(r),isWindows:function(e){return e.indexOf("windows")>-1}(r),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(r),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(r),isiOS:function(e){return!!e.match(/iphone|ipad/i)||c(e)&&navigator.maxTouchPoints>0}(r),isAndroid:function(e){return e.indexOf("android")>-1}(r),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(r),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},l=a;function c(e){return e.indexOf("macintosh")>-1}function d(e,t,i,n){i=i||function(e,t){return e===t};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,i){const n=h(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=u(e,n),o=u(t,n),r=h(s,o,i),a=e.length-r,l=t.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}(s,o,i),a=n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:s}=e;if(-1===i)return Array(t).fill("equal");let o=[];i>0&&(o=o.concat(Array(i).fill("equal")));s-i>0&&(o=o.concat(Array(s-i).fill("insert")));n-i>0&&(o=o.concat(Array(n-i).fill("delete")));s<t&&(o=o.concat(Array(t-s).fill("equal")));return o}(r,o.length):function(e,t){const i=[],{firstIndex:n,lastIndexOld:s,lastIndexNew:o}=t;o-n>0&&i.push({index:n,type:"insert",values:e.slice(n,o)});s-n>0&&i.push({index:n+(o-n),type:"delete",howMany:s-n});return i}(o,r);return a}function h(e,t,i){for(let n=0;n<Math.max(e.length,t.length);n++)if(void 0===e[n]||void 0===t[n]||!i(e[n],t[n]))return n;return-1}function u(e,t){return e.slice(t).reverse()}function m(e,t,i){i=i||function(e,t){return e===t};const n=e.length,s=t.length;if(n>200||s>200||n+s>300)return m.fastDiff(e,t,i,!0);let o,r;if(s<n){const i=e;e=t,t=i,o="delete",r="insert"}else o="insert",r="delete";const a=e.length,l=t.length,c=l-a,d={},h={};function u(n){const s=(void 0!==h[n-1]?h[n-1]:-1)+1,c=void 0!==h[n+1]?h[n+1]:-1,u=s>c?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(s>c?o:r);let m=Math.max(s,c),g=m-n;for(;g<a&&m<l&&i(e[g],t[m]);)g++,m++,d[n].push("equal");return m}let g,f=0;do{for(g=-f;g<c;g++)h[g]=u(g);for(g=c+f;g>c;g--)h[g]=u(g);h[c]=u(c),f++}while(h[c]!==l);return d[c].slice(1)}m.fastDiff=d;const g=function(){return function e(){e.called=!0}};class f{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=g(),this.off=g()}}const p=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function b(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+p[e>>0&255]+p[e>>8&255]+p[e>>16&255]+p[e>>24&255]+p[t>>0&255]+p[t>>8&255]+p[t>>16&255]+p[t>>24&255]+p[i>>0&255]+p[i>>8&255]+p[i>>16&255]+p[i>>24&255]+p[n>>0&255]+p[n>>8&255]+p[n>>16&255]+p[n>>24&255]}const w={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function v(e,t){const i=w.get(t.priority);for(let n=0;n<e.length;n++)if(w.get(e[n].priority)<i)return void e.splice(n,0,t);e.push(t)}const _="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class y extends Error{constructor(e,t,i){super(function(e,t){const i=new WeakSet,n=(e,t)=>{if("object"==typeof t&&null!==t){if(i.has(t))return`[object ${t.constructor.name}]`;i.add(t)}return t},s=t?` ${JSON.stringify(t,n)}`:"",o=C(e);return e+s+o}(e,i)),this.name="CKEditorError",this.context=t,this.data=i}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const i=new y(e.message,t);throw i.stack=e.stack,i}}function k(e,t){console.warn(...A(e,t))}function C(e){return`\nRead more: ${_}#error-${e}`}function A(e,t){const i=C(e);return t?[e,t,i]:[e,i]}const x="41.1.0",T=new Date(2024,1,7);if(globalThis.CKEDITOR_VERSION)throw new y("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=x;const E=Symbol("listeningTo"),S=Symbol("emitterId"),P=Symbol("delegations"),I=V(Object);function V(e){if(!e)return I;return class extends e{on(e,t,i){this.listenTo(this,e,t,i)}once(e,t,i){let n=!1;this.listenTo(this,e,((e,...i)=>{n||(n=!0,e.off(),t.call(this,e,...i))}),i)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,i,n={}){let s,o;this[E]||(this[E]={});const r=this[E];O(e)||R(e);const a=O(e);(s=r[a])||(s=r[a]={emitter:e,callbacks:{}}),(o=s.callbacks[t])||(o=s.callbacks[t]=[]),o.push(i),function(e,t,i,n,s){t._addEventListener?t._addEventListener(i,n,s):e._addEventListener.call(t,i,n,s)}(this,e,t,i,n)}stopListening(e,t,i){const n=this[E];let s=e&&O(e);const o=n&&s?n[s]:void 0,r=o&&t?o.callbacks[t]:void 0;if(!(!n||e&&!o||t&&!r))if(i){D(this,e,t,i);-1!==r.indexOf(i)&&(1===r.length?delete o.callbacks[t]:D(this,e,t,i))}else if(r){for(;i=r.pop();)D(this,e,t,i);delete o.callbacks[t]}else if(o){for(t in o.callbacks)this.stopListening(e,t);delete n[s]}else{for(s in n)this.stopListening(n[s].emitter);delete this[E]}}fire(e,...t){try{const i=e instanceof f?e:new f(this,e),n=i.name;let s=N(this,n);if(i.path.push(this),s){const e=[i,...t];s=Array.from(s);for(let t=0;t<s.length&&(s[t].callback.apply(this,e),i.off.called&&(delete i.off.called,this._removeEventListener(n,s[t].callback)),!i.stop.called);t++);}const o=this[P];if(o){const e=o.get(n),s=o.get("*");e&&F(e,i,t),s&&F(s,i,t)}return i.return}catch(e){y.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,i)=>{this[P]||(this[P]=new Map),e.forEach((e=>{const n=this[P].get(e);n?n.set(t,i):this[P].set(e,new Map([[t,i]]))}))}}}stopDelegating(e,t){if(this[P])if(e)if(t){const i=this[P].get(e);i&&i.delete(t)}else this[P].delete(e);else this[P].clear()}_addEventListener(e,t,i){!function(e,t){const i=B(e);if(i[t])return;let n=t,s=null;const o=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},o.push(i[n]),s&&i[n].childEvents.push(s),s=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of o)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(s)}}(this,e);const n=M(this,e),s={callback:t,priority:w.get(i.priority)};for(const e of n)v(e,s)}_removeEventListener(e,t){const i=M(this,e);for(const e of i)for(let i=0;i<e.length;i++)e[i].callback==t&&(e.splice(i,1),i--)}}}function R(e,t){e[S]||(e[S]=t||b())}function O(e){return e[S]}function B(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function M(e,t){const i=B(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t<i.childEvents.length;t++){const s=M(e,i.childEvents[t]);n=n.concat(s)}return n}function N(e,t){let i;return e._events&&(i=e._events[t])&&i.callbacks.length?i.callbacks:t.indexOf(":")>-1?N(e,t.substr(0,t.lastIndexOf(":"))):null}function F(e,t,i){for(let[n,s]of e){s?"function"==typeof s&&(s=s(t.name)):s=t.name;const e=new f(t.source,s);e.path=[...t.path],n.fire(e,...i)}}function D(e,t,i,n){t._removeEventListener?t._removeEventListener(i,n):e._removeEventListener.call(t,i,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{V[e]=I.prototype[e]}));const L=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},z=Symbol("observableProperties"),H=Symbol("boundObservables"),W=Symbol("boundProperties"),j=Symbol("decoratedMethods"),U=Symbol("decoratedOriginal"),q=G(V());function G(e){if(!e)return q;return class extends e{set(e,t){if(L(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);Z(this);const i=this[z];if(e in this&&!i.has(e))throw new y("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let s=this.fire(`set:${e}`,e,t,n);void 0===s&&(s=t),n===s&&i.has(e)||(i.set(e,s),this.fire(`change:${e}`,e,s,n))}}),this[e]=t}bind(...e){if(!e.length||!Q(e))throw new y("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new y("observable-bind-duplicate-properties",this);Z(this);const t=this[W];e.forEach((e=>{if(t.has(e))throw new y("observable-bind-rebind",this)}));const i=new Map;return e.forEach((e=>{const n={property:e,to:[]};t.set(e,n),i.set(e,n)})),{to:K,toMany:J,_observable:this,_bindProperties:e,_to:[],_bindings:i}}unbind(...e){if(!this[z])return;const t=this[W],i=this[H];if(e.length){if(!Q(e))throw new y("observable-unbind-wrong-properties",this);e.forEach((e=>{const n=t.get(e);n&&(n.to.forEach((([e,t])=>{const s=i.get(e),o=s[t];o.delete(n),o.size||delete s[t],Object.keys(s).length||(i.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else i.forEach(((e,t)=>{this.stopListening(t,"change")})),i.clear(),t.clear()}decorate(e){Z(this);const t=this[e];if(!t)throw new y("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,i)=>{e.return=t.apply(this,i)})),this[e]=function(...t){return this.fire(e,t)},this[e][U]=t,this[j]||(this[j]=[]),this[j].push(e)}stopListening(e,t,i){if(!e&&this[j]){for(const e of this[j])this[e]=this[e][U];delete this[j]}super.stopListening(e,t,i)}}}function Z(e){e[z]||(Object.defineProperty(e,z,{value:new Map}),Object.defineProperty(e,H,{value:new Map}),Object.defineProperty(e,W,{value:new Map}))}function K(...e){const t=function(...e){if(!e.length)throw new y("observable-bind-to-parse-error",null);const t={to:[]};let i;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)i.properties.push(e);else{if("object"!=typeof e)throw new y("observable-bind-to-parse-error",null);i={observable:e,properties:[]},t.to.push(i)}})),t}(...e),i=Array.from(this._bindings.keys()),n=i.length;if(!t.callback&&t.to.length>1)throw new y("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new y("observable-bind-to-extra-callback",this);var s;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==n)throw new y("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(i[0]).callback=t.callback),s=this._observable,this._to.forEach((e=>{const t=s[H];let i;t.get(e.observable)||s.listenTo(e.observable,"change",((n,o)=>{i=t.get(e.observable)[o],i&&i.forEach((e=>{Y(s,e.property)}))}))})),function(e){let t;e._bindings.forEach(((i,n)=>{e._to.forEach((s=>{t=s.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([s.observable,t]),function(e,t,i,n){const s=e[H],o=s.get(i),r=o||{};r[n]||(r[n]=new Set);r[n].add(t),o||s.set(i,r)}(e._observable,i,s.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{Y(this._observable,e)}))}function J(e,t,i){if(this._bindings.size>1)throw new y("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const i=e.map((e=>[e,t]));return Array.prototype.concat.apply([],i)}(e,t),i)}function Q(e){return e.every((e=>"string"==typeof e))}function Y(e,t){const i=e[W].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map((e=>e[0][e[1]]))):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{G[e]=q.prototype[e]}));class X{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function ee(e){let t=0;for(const i of e)t++;return t}function te(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)if(e[n]!=t[n])return n;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function ie(e){return!(!e||!e[Symbol.iterator])}const ne="object"==typeof global&&global&&global.Object===Object&&global;var se="object"==typeof self&&self&&self.Object===Object&&self;const oe=ne||se||Function("return this")();const re=oe.Symbol;var ae=Object.prototype,le=ae.hasOwnProperty,ce=ae.toString,de=re?re.toStringTag:void 0;const he=function(e){var t=le.call(e,de),i=e[de];try{e[de]=void 0;var n=!0}catch(e){}var s=ce.call(e);return n&&(t?e[de]=i:delete e[de]),s};var ue=Object.prototype.toString;const me=function(e){return ue.call(e)};var ge=re?re.toStringTag:void 0;const fe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ge&&ge in Object(e)?he(e):me(e)};const pe=Array.isArray;const be=function(e){return null!=e&&"object"==typeof e};const we=function(e){return"string"==typeof e||!pe(e)&&be(e)&&"[object String]"==fe(e)};function ve(e,t,i={},n=[]){const s=i&&i.xmlns,o=s?e.createElementNS(s,t):e.createElement(t);for(const e in i)o.setAttribute(e,i[e]);!we(n)&&ie(n)||(n=[n]);for(let t of n)we(t)&&(t=e.createTextNode(t)),o.appendChild(t);return o}const _e=function(e,t){return function(i){return e(t(i))}};const ye=_e(Object.getPrototypeOf,Object);var ke=Function.prototype,Ce=Object.prototype,Ae=ke.toString,xe=Ce.hasOwnProperty,Te=Ae.call(Object);const Ee=function(e){if(!be(e)||"[object Object]"!=fe(e))return!1;var t=ye(e);if(null===t)return!0;var i=xe.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Ae.call(i)==Te};const Se=function(){this.__data__=[],this.size=0};const Pe=function(e,t){return e===t||e!=e&&t!=t};const Ie=function(e,t){for(var i=e.length;i--;)if(Pe(e[i][0],t))return i;return-1};var Ve=Array.prototype.splice;const Re=function(e){var t=this.__data__,i=Ie(t,e);return!(i<0)&&(i==t.length-1?t.pop():Ve.call(t,i,1),--this.size,!0)};const Oe=function(e){var t=this.__data__,i=Ie(t,e);return i<0?void 0:t[i][1]};const Be=function(e){return Ie(this.__data__,e)>-1};const Me=function(e,t){var i=this.__data__,n=Ie(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function Ne(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}Ne.prototype.clear=Se,Ne.prototype.delete=Re,Ne.prototype.get=Oe,Ne.prototype.has=Be,Ne.prototype.set=Me;const Fe=Ne;const De=function(){this.__data__=new Fe,this.size=0};const Le=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const ze=function(e){return this.__data__.get(e)};const He=function(e){return this.__data__.has(e)};const $e=function(e){if(!L(e))return!1;var t=fe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const We=oe["__core-js_shared__"];var je=function(){var e=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const Ue=function(e){return!!je&&je in e};var qe=Function.prototype.toString;const Ge=function(e){if(null!=e){try{return qe.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Ze=/^\[object .+?Constructor\]$/,Ke=Function.prototype,Je=Object.prototype,Qe=Ke.toString,Ye=Je.hasOwnProperty,Xe=RegExp("^"+Qe.call(Ye).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const et=function(e){return!(!L(e)||Ue(e))&&($e(e)?Xe:Ze).test(Ge(e))};const tt=function(e,t){return null==e?void 0:e[t]};const it=function(e,t){var i=tt(e,t);return et(i)?i:void 0};const nt=it(oe,"Map");const st=it(Object,"create");const ot=function(){this.__data__=st?st(null):{},this.size=0};const rt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var at=Object.prototype.hasOwnProperty;const lt=function(e){var t=this.__data__;if(st){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return at.call(t,e)?t[e]:void 0};var ct=Object.prototype.hasOwnProperty;const dt=function(e){var t=this.__data__;return st?void 0!==t[e]:ct.call(t,e)};const ht=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=st&&void 0===t?"__lodash_hash_undefined__":t,this};function ut(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ut.prototype.clear=ot,ut.prototype.delete=rt,ut.prototype.get=lt,ut.prototype.has=dt,ut.prototype.set=ht;const mt=ut;const gt=function(){this.size=0,this.__data__={hash:new mt,map:new(nt||Fe),string:new mt}};const ft=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const pt=function(e,t){var i=e.__data__;return ft(t)?i["string"==typeof t?"string":"hash"]:i.map};const bt=function(e){var t=pt(this,e).delete(e);return this.size-=t?1:0,t};const wt=function(e){return pt(this,e).get(e)};const vt=function(e){return pt(this,e).has(e)};const _t=function(e,t){var i=pt(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function yt(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}yt.prototype.clear=gt,yt.prototype.delete=bt,yt.prototype.get=wt,yt.prototype.has=vt,yt.prototype.set=_t;const kt=yt;const Ct=function(e,t){var i=this.__data__;if(i instanceof Fe){var n=i.__data__;if(!nt||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new kt(n)}return i.set(e,t),this.size=i.size,this};function At(e){var t=this.__data__=new Fe(e);this.size=t.size}At.prototype.clear=De,At.prototype.delete=Le,At.prototype.get=ze,At.prototype.has=He,At.prototype.set=Ct;const xt=At;const Tt=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e};const Et=function(){try{var e=it(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const St=function(e,t,i){"__proto__"==t&&Et?Et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};var Pt=Object.prototype.hasOwnProperty;const It=function(e,t,i){var n=e[t];Pt.call(e,t)&&Pe(n,i)&&(void 0!==i||t in e)||St(e,t,i)};const Vt=function(e,t,i,n){var s=!i;i||(i={});for(var o=-1,r=t.length;++o<r;){var a=t[o],l=n?n(i[a],e[a],a,i,e):void 0;void 0===l&&(l=e[a]),s?St(i,a,l):It(i,a,l)}return i};const Rt=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n};const Ot=function(e){return be(e)&&"[object Arguments]"==fe(e)};var Bt=Object.prototype,Mt=Bt.hasOwnProperty,Nt=Bt.propertyIsEnumerable;const Ft=Ot(function(){return arguments}())?Ot:function(e){return be(e)&&Mt.call(e,"callee")&&!Nt.call(e,"callee")};const Dt=function(){return!1};var Lt="object"==typeof exports&&exports&&!exports.nodeType&&exports,zt=Lt&&"object"==typeof module&&module&&!module.nodeType&&module,Ht=zt&&zt.exports===Lt?oe.Buffer:void 0;const $t=(Ht?Ht.isBuffer:void 0)||Dt;var Wt=/^(?:0|[1-9]\d*)$/;const jt=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&Wt.test(e))&&e>-1&&e%1==0&&e<t};const Ut=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var qt={};qt["[object Float32Array]"]=qt["[object Float64Array]"]=qt["[object Int8Array]"]=qt["[object Int16Array]"]=qt["[object Int32Array]"]=qt["[object Uint8Array]"]=qt["[object Uint8ClampedArray]"]=qt["[object Uint16Array]"]=qt["[object Uint32Array]"]=!0,qt["[object Arguments]"]=qt["[object Array]"]=qt["[object ArrayBuffer]"]=qt["[object Boolean]"]=qt["[object DataView]"]=qt["[object Date]"]=qt["[object Error]"]=qt["[object Function]"]=qt["[object Map]"]=qt["[object Number]"]=qt["[object Object]"]=qt["[object RegExp]"]=qt["[object Set]"]=qt["[object String]"]=qt["[object WeakMap]"]=!1;const Gt=function(e){return be(e)&&Ut(e.length)&&!!qt[fe(e)]};const Zt=function(e){return function(t){return e(t)}};var Kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jt=Kt&&"object"==typeof module&&module&&!module.nodeType&&module,Qt=Jt&&Jt.exports===Kt&&ne.process;const Yt=function(){try{var e=Jt&&Jt.require&&Jt.require("util").types;return e||Qt&&Qt.binding&&Qt.binding("util")}catch(e){}}();var Xt=Yt&&Yt.isTypedArray;const ei=Xt?Zt(Xt):Gt;var ti=Object.prototype.hasOwnProperty;const ii=function(e,t){var i=pe(e),n=!i&&Ft(e),s=!i&&!n&&$t(e),o=!i&&!n&&!s&&ei(e),r=i||n||s||o,a=r?Rt(e.length,String):[],l=a.length;for(var c in e)!t&&!ti.call(e,c)||r&&("length"==c||s&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||jt(c,l))||a.push(c);return a};var ni=Object.prototype;const si=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ni)};const oi=_e(Object.keys,Object);var ri=Object.prototype.hasOwnProperty;const ai=function(e){if(!si(e))return oi(e);var t=[];for(var i in Object(e))ri.call(e,i)&&"constructor"!=i&&t.push(i);return t};const li=function(e){return null!=e&&Ut(e.length)&&!$e(e)};const ci=function(e){return li(e)?ii(e):ai(e)};const di=function(e,t){return e&&Vt(t,ci(t),e)};const hi=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t};var ui=Object.prototype.hasOwnProperty;const mi=function(e){if(!L(e))return hi(e);var t=si(e),i=[];for(var n in e)("constructor"!=n||!t&&ui.call(e,n))&&i.push(n);return i};const gi=function(e){return li(e)?ii(e,!0):mi(e)};const fi=function(e,t){return e&&Vt(t,gi(t),e)};var pi="object"==typeof exports&&exports&&!exports.nodeType&&exports,bi=pi&&"object"==typeof module&&module&&!module.nodeType&&module,wi=bi&&bi.exports===pi?oe.Buffer:void 0,vi=wi?wi.allocUnsafe:void 0;const _i=function(e,t){if(t)return e.slice();var i=e.length,n=vi?vi(i):new e.constructor(i);return e.copy(n),n};const yi=function(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t};const ki=function(e,t){for(var i=-1,n=null==e?0:e.length,s=0,o=[];++i<n;){var r=e[i];t(r,i,e)&&(o[s++]=r)}return o};const Ci=function(){return[]};var Ai=Object.prototype.propertyIsEnumerable,xi=Object.getOwnPropertySymbols;const Ti=xi?function(e){return null==e?[]:(e=Object(e),ki(xi(e),(function(t){return Ai.call(e,t)})))}:Ci;const Ei=function(e,t){return Vt(e,Ti(e),t)};const Si=function(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e};const Pi=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Si(t,Ti(e)),e=ye(e);return t}:Ci;const Ii=function(e,t){return Vt(e,Pi(e),t)};const Vi=function(e,t,i){var n=t(e);return pe(e)?n:Si(n,i(e))};const Ri=function(e){return Vi(e,ci,Ti)};const Oi=function(e){return Vi(e,gi,Pi)};const Bi=it(oe,"DataView");const Mi=it(oe,"Promise");const Ni=it(oe,"Set");const Fi=it(oe,"WeakMap");var Di="[object Map]",Li="[object Promise]",zi="[object Set]",Hi="[object WeakMap]",$i="[object DataView]",Wi=Ge(Bi),ji=Ge(nt),Ui=Ge(Mi),qi=Ge(Ni),Gi=Ge(Fi),Zi=fe;(Bi&&Zi(new Bi(new ArrayBuffer(1)))!=$i||nt&&Zi(new nt)!=Di||Mi&&Zi(Mi.resolve())!=Li||Ni&&Zi(new Ni)!=zi||Fi&&Zi(new Fi)!=Hi)&&(Zi=function(e){var t=fe(e),i="[object Object]"==t?e.constructor:void 0,n=i?Ge(i):"";if(n)switch(n){case Wi:return $i;case ji:return Di;case Ui:return Li;case qi:return zi;case Gi:return Hi}return t});const Ki=Zi;var Ji=Object.prototype.hasOwnProperty;const Qi=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Ji.call(e,"index")&&(i.index=e.index,i.input=e.input),i};const Yi=oe.Uint8Array;const Xi=function(e){var t=new e.constructor(e.byteLength);return new Yi(t).set(new Yi(e)),t};const en=function(e,t){var i=t?Xi(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)};var tn=/\w*$/;const nn=function(e){var t=new e.constructor(e.source,tn.exec(e));return t.lastIndex=e.lastIndex,t};var sn=re?re.prototype:void 0,on=sn?sn.valueOf:void 0;const rn=function(e){return on?Object(on.call(e)):{}};const an=function(e,t){var i=t?Xi(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)};const ln=function(e,t,i){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Xi(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return en(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return an(e,i);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return nn(e);case"[object Symbol]":return rn(e)}};var cn=Object.create;const dn=function(){function e(){}return function(t){if(!L(t))return{};if(cn)return cn(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();const hn=function(e){return"function"!=typeof e.constructor||si(e)?{}:dn(ye(e))};const un=function(e){return be(e)&&"[object Map]"==Ki(e)};var mn=Yt&&Yt.isMap;const gn=mn?Zt(mn):un;const fn=function(e){return be(e)&&"[object Set]"==Ki(e)};var pn=Yt&&Yt.isSet;const bn=pn?Zt(pn):fn;var wn="[object Arguments]",vn="[object Function]",_n="[object Object]",yn={};yn[wn]=yn["[object Array]"]=yn["[object ArrayBuffer]"]=yn["[object DataView]"]=yn["[object Boolean]"]=yn["[object Date]"]=yn["[object Float32Array]"]=yn["[object Float64Array]"]=yn["[object Int8Array]"]=yn["[object Int16Array]"]=yn["[object Int32Array]"]=yn["[object Map]"]=yn["[object Number]"]=yn[_n]=yn["[object RegExp]"]=yn["[object Set]"]=yn["[object String]"]=yn["[object Symbol]"]=yn["[object Uint8Array]"]=yn["[object Uint8ClampedArray]"]=yn["[object Uint16Array]"]=yn["[object Uint32Array]"]=!0,yn["[object Error]"]=yn[vn]=yn["[object WeakMap]"]=!1;const kn=function e(t,i,n,s,o,r){var a,l=1&i,c=2&i,d=4&i;if(n&&(a=o?n(t,s,o,r):n(t)),void 0!==a)return a;if(!L(t))return t;var h=pe(t);if(h){if(a=Qi(t),!l)return yi(t,a)}else{var u=Ki(t),m=u==vn||"[object GeneratorFunction]"==u;if($t(t))return _i(t,l);if(u==_n||u==wn||m&&!o){if(a=c||m?{}:hn(t),!l)return c?Ii(t,fi(a,t)):Ei(t,di(a,t))}else{if(!yn[u])return o?t:{};a=ln(t,u,l)}}r||(r=new xt);var g=r.get(t);if(g)return g;r.set(t,a),bn(t)?t.forEach((function(s){a.add(e(s,i,n,s,t,r))})):gn(t)&&t.forEach((function(s,o){a.set(o,e(s,i,n,o,t,r))}));var f=h?void 0:(d?c?Oi:Ri:c?gi:ci)(t);return Tt(f||t,(function(s,o){f&&(s=t[o=s]),It(a,o,e(s,i,n,o,t,r))})),a};const Cn=function(e,t){return kn(e,5,t="function"==typeof t?t:void 0)};const An=function(e){return be(e)&&1===e.nodeType&&!Ee(e)};class xn{constructor(e,t){this._config={},t&&this.define(Tn(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,i,n=!1){if(Ee(t))return void this._setObjectToTarget(e,t,n);const s=t.split(".");t=s.pop();for(const t of s)Ee(e[t])||(e[t]={}),e=e[t];if(Ee(i))return Ee(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,i,n);n&&void 0!==e[t]||(e[t]=i)}_getFromSource(e,t){const i=t.split(".");t=i.pop();for(const t of i){if(!Ee(e[t])){e=null;break}e=e[t]}return e?Tn(e[t]):void 0}_setObjectToTarget(e,t,i){Object.keys(t).forEach((n=>{this._setToTarget(e,n,t[n],i)}))}}function Tn(e){return Cn(e,En)}function En(e){return An(e)||"function"==typeof e?e:void 0}function Sn(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Pn(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const In=Vn(V());function Vn(e){if(!e)return In;return class extends e{listenTo(e,t,i,n={}){if(Sn(e)||Pn(e)){const s={capture:!!n.useCapture,passive:!!n.usePassive},o=this._getProxyEmitter(e,s)||new Rn(e,s);this.listenTo(o,t,i,n)}else super.listenTo(e,t,i,n)}stopListening(e,t,i){if(Sn(e)||Pn(e)){const n=this._getAllProxyEmitters(e);for(const e of n)this.stopListening(e,t,i)}else super.stopListening(e,t,i)}_getProxyEmitter(e,t){return function(e,t){const i=e[E];return i&&i[t]?i[t].emitter:null}(this,On(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Vn[e]=In.prototype[e]}));class Rn extends(V()){constructor(e,t){super(),R(this,On(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,i){this.attach(e),V().prototype._addEventListener.call(this,e,t,i)}_removeEventListener(e,t){V().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function On(e,t){let i=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=b())}(e);for(const e of Object.keys(t).sort())t[e]&&(i+="-"+e);return i}let Bn;try{Bn={window,document}}catch(e){Bn={window:{},document:{}}}const Mn=Bn;function Nn(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Fn(e){return"[object Text]"==Object.prototype.toString.call(e)}function Dn(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Ln(e){return e&&e.parentNode?e.offsetParent===Mn.document.body?null:e.offsetParent:null}const zn=["top","right","bottom","left","width","height"];class Hn{constructor(e){const t=Dn(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),jn(e)||t)if(t){const t=Hn.getDomRangeRects(e);$n(this,Hn.getBoundingRect(t))}else $n(this,e.getBoundingClientRect());else if(Pn(e)){const{innerWidth:t,innerHeight:i}=e;$n(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else $n(this,e)}clone(){return new Hn(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new Hn(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(Wn(e))return t;let i,n=e,s=e.parentNode||e.commonAncestorContainer;for(;s&&!Wn(s);){const e="visible"===((o=s)instanceof HTMLElement?o.ownerDocument.defaultView.getComputedStyle(o).overflow:"visible");n instanceof HTMLElement&&"absolute"===Un(n)&&(i=n);const r=Un(s);if(e||i&&("relative"===r&&e||"relative"!==r)){n=s,s=s.parentNode;continue}const a=new Hn(s),l=t.getIntersection(a);if(!l)return null;l.getArea()<t.getArea()&&(t=l),n=s,s=s.parentNode}var o;return t}isEqual(e){for(const t of zn)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:t}=Mn.window,i=this.clone().moveBy(e,t);if(jn(i._source)){const e=Ln(i._source);e&&function(e,t){const i=new Hn(t),n=Nn(t);let s=0,o=0;s-=i.left,o-=i.top,s+=t.scrollLeft,o+=t.scrollTop,s-=n.left,o-=n.top,e.moveBy(s,o)}(i,e)}return i}excludeScrollbarsAndBorders(){const e=this._source;let t,i,n;if(Pn(e))t=e.innerWidth-e.document.documentElement.clientWidth,i=e.innerHeight-e.document.documentElement.clientHeight,n=e.getComputedStyle(e.document.documentElement).direction;else{const s=Nn(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,i=e.offsetHeight-e.clientHeight-s.top-s.bottom,n=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===n?this.right-=t:this.left+=t,this.height-=i,this.bottom-=i,this}static getDomRangeRects(e){const t=[],i=Array.from(e.getClientRects());if(i.length)for(const e of i)t.push(new Hn(e));else{let i=e.startContainer;Fn(i)&&(i=i.parentNode);const n=new Hn(i.getBoundingClientRect());n.right=n.left,n.width=0,t.push(n)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const n of e)i++,t.left=Math.min(t.left,n.left),t.top=Math.min(t.top,n.top),t.right=Math.max(t.right,n.right),t.bottom=Math.max(t.bottom,n.bottom);return 0==i?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new Hn(t))}}function $n(e,t){for(const i of zn)e[i]=t[i]}function Wn(e){return!!jn(e)&&e===e.ownerDocument.body}function jn(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}function Un(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}class qn{constructor(e,t){qn._observerInstance||qn._createObserver(),this._element=e,this._callback=t,qn._addElementCallback(e,t),qn._observerInstance.observe(e)}get element(){return this._element}destroy(){qn._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){qn._elementCallbacks||(qn._elementCallbacks=new Map);let i=qn._elementCallbacks.get(e);i||(i=new Set,qn._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=qn._getElementCallbacks(e);i&&(i.delete(t),i.size||(qn._elementCallbacks.delete(e),qn._observerInstance.unobserve(e))),qn._elementCallbacks&&!qn._elementCallbacks.size&&(qn._observerInstance=null,qn._elementCallbacks=null)}static _getElementCallbacks(e){return qn._elementCallbacks?qn._elementCallbacks.get(e):null}static _createObserver(){qn._observerInstance=new Mn.window.ResizeObserver((e=>{for(const t of e){const e=qn._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}}))}}qn._observerInstance=null,qn._elementCallbacks=null;const Gn=qn;function Zn(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Kn(e){return t=>t+e}function Jn(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Qn(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function Yn(e){return e&&e.nodeType===Node.COMMENT_NODE}function Xn(e){try{Mn.document.createAttribute(e)}catch(e){return!1}return!0}function es(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function ts({element:e,target:t,positions:i,limiter:n,fitInViewport:s,viewportOffsetConfig:o}){$e(t)&&(t=t()),$e(n)&&(n=n());const r=Ln(e),a=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Hn(Mn.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(o),l=new Hn(e),c=is(t,a);let d;if(!c||!a.getIntersection(c))return null;const h={targetRect:c,elementRect:l,positionedElementAncestor:r,viewportRect:a};if(n||s){if(n){const e=is(n,a);e&&(h.limiterRect=e)}d=function(e,t){const{elementRect:i}=t,n=i.getArea(),s=e.map((e=>new ns(e,t))).filter((e=>!!e.name));let o=0,r=null;for(const e of s){const{limiterIntersectionArea:t,viewportIntersectionArea:i}=e;if(t===n)return e;const s=i**2+t**2;s>o&&(o=s,r=e)}return r}(i,h)}else d=new ns(i[0],h);return d}function is(e,t){const i=new Hn(e).getVisible();return i?i.getIntersection(t):null}class ns{constructor(e,t){const i=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!i)return;const{left:n,top:s,name:o,config:r}=i;this.name=o,this.config=r,this._positioningFunctionCoordinates={left:n,top:s},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function ss(e){const t=e.parentNode;t&&t.removeChild(e)}function os({window:e,rect:t,alignToTop:i,forceScroll:n,viewportOffset:s}){const o=t.clone().moveBy(0,s.bottom),r=t.clone().moveBy(0,-s.top),a=new Hn(e).excludeScrollbarsAndBorders(),l=i&&n,c=[r,o].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,m=h;l?h-=a.top-t.top+s.top:c||(ls(r,a)?h-=a.top-t.top+s.top:as(o,a)&&(h+=i?t.top-a.top-s.top:t.bottom-a.bottom+s.bottom)),c||(cs(t,a)?d-=a.left-t.left+s.left:ds(t,a)&&(d+=t.right-a.right+s.right)),d==u&&h===m||e.scrollTo(d,h)}function rs({parent:e,getRect:t,alignToTop:i,forceScroll:n,ancestorOffset:s=0,limiterElement:o}){const r=hs(e),a=i&&n;let l,c,d;const h=o||r.document.body;for(;e!=h;)c=t(),l=new Hn(e).excludeScrollbarsAndBorders(),d=l.contains(c),a?e.scrollTop-=l.top-c.top+s:d||(ls(c,l)?e.scrollTop-=l.top-c.top+s:as(c,l)&&(e.scrollTop+=i?c.top-l.top-s:c.bottom-l.bottom+s)),d||(cs(c,l)?e.scrollLeft-=l.left-c.left+s:ds(c,l)&&(e.scrollLeft+=c.right-l.right+s)),e=e.parentNode}function as(e,t){return e.bottom>t.bottom}function ls(e,t){return e.top<t.top}function cs(e,t){return e.left<t.left}function ds(e,t){return e.right>t.right}function hs(e){return Dn(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function us(e){if(Dn(e)){let t=e.commonAncestorContainer;return Fn(t)&&(t=t.parentNode),t}return e.parentNode}function ms(e,t){const i=hs(e),n=new Hn(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new Hn(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}const gs={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},fs={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},ps=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),bs=Object.fromEntries(Object.entries(ps).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function ws(e){let t;if("string"==typeof e){if(t=ps[e.toLowerCase()],!t)throw new y("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?ps.alt:0)+(e.ctrlKey?ps.ctrl:0)+(e.shiftKey?ps.shift:0)+(e.metaKey?ps.cmd:0);return t}function vs(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return ws(e.slice(0,-1));const t=ws(e);return(l.isMac||l.isiOS)&&t==ps.ctrl?ps.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function _s(e){let t=vs(e);return Object.entries(l.isMac||l.isiOS?gs:fs).reduce(((e,[i,n])=>(0!=(t&ps[i])&&(t&=~ps[i],e+=n),e)),"")+(t?bs[t]:"")}function ys(e,t){const i="ltr"===t;switch(e){case ps.arrowleft:return i?"left":"right";case ps.arrowright:return i?"right":"left";case ps.arrowup:return"up";case ps.arrowdown:return"down"}}function ks(e){return Array.isArray(e)?e:[e]}function Cs(e,t,i=1){if("number"!=typeof i)throw new y("translation-service-quantity-not-a-number",null,{quantity:i});const n=Object.keys(Mn.window.CKEDITOR_TRANSLATIONS).length;1===n&&(e=Object.keys(Mn.window.CKEDITOR_TRANSLATIONS)[0]);const s=t.id||t.string;if(0===n||!function(e,t){return!!Mn.window.CKEDITOR_TRANSLATIONS[e]&&!!Mn.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,s))return 1!==i?t.plural:t.string;const o=Mn.window.CKEDITOR_TRANSLATIONS[e].dictionary,r=Mn.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),a=o[s];if("string"==typeof a)return a;return a[Number(r(i))]}Mn.window.CKEDITOR_TRANSLATIONS||(Mn.window.CKEDITOR_TRANSLATIONS={});const As=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function xs(e){return As.includes(e)?"rtl":"ltr"}class Ts{constructor({uiLanguage:e="en",contentLanguage:t}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=xs(this.uiLanguage),this.contentLanguageDirection=xs(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=ks(t),"string"==typeof e&&(e={string:e});const i=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,i)=>i<t.length?t[i]:e))}(Cs(this.uiLanguage,e,i),t)}}class Es extends(V()){constructor(e={},t={}){super();const i=ie(e);if(i||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new y("collection-add-item-invalid-index",this);let i=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),s=t+i;this._items.splice(s,0,n),this._itemMap.set(e,n),this.fire("add",n,s),i++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new y("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,i]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:i}),t}map(e,t){return this._items.map(e,t)}forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new y("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,i=(i,n,s)=>{const o=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(n);if(o&&r)this._bindToExternalToInternalMap.set(n,r),this._bindToInternalToExternalMap.set(r,n);else{const i=e(n);if(!i)return void this._skippedIndexesFromExternal.push(s);let o=s;for(const e of this._skippedIndexesFromExternal)s>e&&o--;for(const e of t._skippedIndexesFromExternal)o>=e&&o++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,o);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)o<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)i(0,e,t.getIndex(e));this.listenTo(t,"add",i),this.listenTo(t,"remove",((e,t,i)=>{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(i<t&&e.push(t-1),i>t&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let i;if(t in e){if(i=e[t],"string"!=typeof i)throw new y("collection-add-invalid-id",this);if(this.get(i))throw new y("collection-add-item-already-exists",this)}else e[t]=i=b();return i}_remove(e){let t,i,n,s=!1;const o=this._idProperty;if("string"==typeof e?(i=e,n=this._itemMap.get(i),s=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],s=!n,n&&(i=n[o])):(n=e,i=n[o],t=this._items.indexOf(n),s=-1==t||!this._itemMap.get(i)),s)throw new y("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(i);const r=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(r),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Ss(e){const t=e.next();return t.done?null:t.value}class Ps extends(Vn(G())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new y("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Is{constructor(){this._listener=new(Vn())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+ws(t),t)}))}set(e,t,i={}){const n=vs(e),s=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,((e,i)=>{t(i,(()=>{i.preventDefault(),i.stopPropagation(),e.stop()})),e.return=!0}),{priority:s})}press(e){return!!this._listener.fire("_keydown:"+ws(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function Vs(e){return ie(e)?new Map(e):function(e){const t=new Map;for(const i in e)t.set(i,e[i]);return t}(e)}function Rs(e,t){let i;function n(...s){n.cancel(),i=setTimeout((()=>e(...s)),t)}return n.cancel=()=>{clearTimeout(i)},n}function Os(e,t){return!!(i=e.charAt(t-1))&&1==i.length&&/[\ud800-\udbff]/.test(i)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var i}function Bs(e,t){return!!(i=e.charAt(t))&&1==i.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(i);var i}const Ms=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((e=>e.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function Ns(e,t){const i=String(e).matchAll(Ms);return Array.from(i).some((e=>e.index<t&&t<e.index+e[0].length))}class Fs extends Es{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,i)=>{this._renderViewIntoCollectionParent(t,i)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new y("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const i of this)for(const n of e)i.delegate(n).to(t);this.on("add",((i,n)=>{for(const i of e)n.delegate(i).to(t)})),this.on("remove",((i,n)=>{for(const i of e)n.stopDelegating(i,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}class Ds extends(Vn(G())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Es,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,i)=>{i.locale=e,i.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Ls.bind(this,this)}createCollection(e){const t=new Fs(e);return this._viewCollections.add(t),t}registerChild(e){ie(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){ie(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Ls(e)}extendTemplate(e){Ls.extend(this.template,e)}render(){if(this.isRendered)throw new y("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}class Ls extends(V()){constructor(e){super(),Object.assign(this,Ks(Zs(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new y("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const i of t.children)to(i)?yield i:io(i)&&(yield*e(i))}(this)}static bind(e,t){return{to:(i,n)=>new Hs({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n}),if:(i,n,s)=>new $s({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:s})}}static extend(e,t){if(e._isRendered)throw new y("template-extend-render",[this,e]);Xs(e,Ks(Zs(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new y("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),Ws(this.text)?this._bindToObservable({schema:this.text,updater:Us(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,i=e.revertData;for(const n in this.attributes){const s=t.getAttribute(n),o=this.attributes[n];i&&(i.attributes[n]=s);const r=so(o)?o[0].ns:null;if(Ws(o)){const a=so(o)?o[0].value:o;i&&oo(n)&&a.unshift(s),this._bindToObservable({schema:a,updater:qs(t,n,r),data:e})}else if("style"==n&&"string"!=typeof o[0])this._renderStyleAttribute(o[0],e);else{i&&s&&oo(n)&&o.unshift(s);const e=o.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(Qs,"");eo(e)||t.setAttributeNS(r,n,e)}}}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const s=e[n];Ws(s)?this._bindToObservable({schema:[s],updater:Gs(i,n),data:t}):i.style[n]=s}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let s=0;for(const o of this.children)if(no(o)){if(!n){o.setParent(t);for(const e of o)i.appendChild(e.element)}}else if(to(o))n||(o.isRendered||o.render(),i.appendChild(o.element));else if(Sn(o))i.appendChild(o);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),o._renderNode({intoFragment:!1,node:i.childNodes[s++],isApplying:!0,revertData:t})}else i.appendChild(o.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map((i=>{const[n,s]=t.split("@");return i.activateDomEventListener(n,s,e)}));e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const n=i.revertData;js(e,t,i);const s=e.filter((e=>!eo(e))).filter((e=>e.observable)).map((n=>n.activateAttributeListener(e,t,i)));n&&n.bindings.push(s)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const i=e;for(const e in t.attributes){const n=t.attributes[e];null===n?i.removeAttribute(e):i.setAttribute(e,n)}for(let e=0;e<t.children.length;++e)this._revertTemplateFromNode(i.childNodes[e],t.children[e])}}class zs{constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,i){const n=()=>js(e,t,i);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class Hs extends zs{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,i){const n=(e,i)=>{t&&!i.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class $s extends zs{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!eo(super.getValue(e))&&(this.valueIfTrue||!0)}}function Ws(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Ws):e instanceof zs)}function js(e,t,{node:i}){const n=function(e,t){return e.map((e=>e instanceof zs?e.getValue(t):e))}(e,i);let s;s=1==e.length&&e[0]instanceof $s?n[0]:n.reduce(Qs,""),eo(s)?t.remove():t.set(s)}function Us(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function qs(e,t,i){return{set(n){e.setAttributeNS(i,t,n)},remove(){e.removeAttributeNS(i,t)}}}function Gs(e,t){return{set(i){e.style[t]=i},remove(){e.style[t]=null}}}function Zs(e){return Cn(e,(e=>{if(e&&(e instanceof zs||io(e)||to(e)||no(e)))return e}))}function Ks(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=ks(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Js(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=ks(e[t].value)),Js(e,t)}(e.attributes);const t=[];if(e.children)if(no(e.children))t.push(e.children);else for(const i of e.children)io(i)||to(i)||Sn(i)?t.push(i):t.push(new Ls(i));e.children=t}return e}function Js(e,t){e[t]=ks(e[t])}function Qs(e,t){return eo(t)?e:eo(e)?t:`${e} ${t}`}function Ys(e,t){for(const i in t)e[i]?e[i].push(...t[i]):e[i]=t[i]}function Xs(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),Ys(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),Ys(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new y("ui-template-extend-children-mismatch",e);let i=0;for(const n of t.children)Xs(e.children[i++],n)}}function eo(e){return!e&&0!==e}function to(e){return e instanceof Ds}function io(e){return e instanceof Ls}function no(e){return e instanceof Fs}function so(e){return L(e[0])&&e[0].ns}function oo(e){return"class"==e||"style"==e}class ro extends Fs{constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new Ls({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=ve(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}class ao extends Ds{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",(e=>!e)),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:i}of Array.from(e.attributes))ao.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,i);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}ao.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];const lo=ao;class co extends Ds{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}class ho extends Ds{constructor(e,t=new co){super(e),this._focusDelayed=null;const i=this.bindTemplate,n=b();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${n}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new lo,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const s={tag:"button",attributes:{class:["ck","ck-button",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e)),i.if("isVisible","ck-hidden",(e=>!e)),i.to("isOn",(e=>e?"ck-on":"ck-off")),i.if("withText","ck-button_with-text"),i.if("withKeystroke","ck-button_with-keystroke")],role:i.to("role"),type:i.to("type",(e=>e||"button")),tabindex:i.to("tabindex"),"aria-label":i.to("ariaLabel"),"aria-labelledby":i.to("ariaLabelledBy"),"aria-disabled":i.if("isEnabled",!0,(e=>!e)),"aria-pressed":i.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":i.to("_tooltipString"),"data-cke-tooltip-position":i.to("tooltipPosition")},children:this.children,on:{click:i.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};l.isSafari&&(this._focusDelayed||(this._focusDelayed=Rs((()=>this.focus()),0)),s.on.mousedown=i.to((()=>{this._focusDelayed()})),s.on.mouseup=i.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(s)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new Ds;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>_s(e)))}]}),e}_getTooltipString(e,t,i){return e?"string"==typeof e?e:(i&&(i=_s(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}class uo extends ho{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Ds;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}const mo='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class go extends Ds{constructor(e,t){super(e);const i=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new ho(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:mo}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}function fo(e,t){const i=e.t,n={Black:i("Black"),"Dim grey":i("Dim grey"),Grey:i("Grey"),"Light grey":i("Light grey"),White:i("White"),Red:i("Red"),Orange:i("Orange"),Yellow:i("Yellow"),"Light green":i("Light green"),Green:i("Green"),Aquamarine:i("Aquamarine"),Turquoise:i("Turquoise"),"Light blue":i("Light blue"),Blue:i("Blue"),Purple:i("Purple")};return t.map((e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e}))}function po(e){return e.map(bo).filter((e=>!!e))}function bo(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class wo extends ho{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class vo extends Ds{constructor(e,t){super(e);const i=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new Ps,this.keystrokes=new Is,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),i.forEach((e=>{const t=new wo;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",((e,t,i)=>{for(const e of this.items)e.isOn=e.color===i}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),n({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var _o=s(156);const yo=function(e){var t,i,n=[],s=1;if("string"==typeof e)if(_o[e])n=_o[e].slice(),i="rgb";else if("transparent"===e)s=0,i="rgb",n=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1);s=1,(l=o.length)<=4?(n=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],4===l&&(s=parseInt(o[3]+o[3],16)/255)):(n=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],8===l&&(s=parseInt(o[6]+o[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var r=t[1],a="rgb"===r;i=o=r.replace(/a$/,"");var l="cmyk"===o?4:"gray"===o?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===l?parseFloat(e)/100:"rgb"===o?255*parseFloat(e)/100:parseFloat(e);if("h"===o[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==ko[e])return ko[e]}return parseFloat(e)})),r===o&&n.push(1),s=a||void 0===n[l]?1:n[l],n=n.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(n=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),i=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(n=[e[0],e[1],e[2]],i="rgb",s=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(i="rgb",n=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",n=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),s=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(s/=100)):(i="rgb",n=[e>>>16,(65280&e)>>>8,255&e]);return{space:i,values:n,alpha:s}};var ko={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var Co=s(734),Ao=s.t(Co,2);function xo(e,t){if(!e)return"";const i=To(e);if(!i)return"";if(i.space===t)return e;if(n=i,!Object.keys(Ao).includes(n.space))return"";var n;const s=Ao[i.space][t];if(!s)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(s("hex"===i.space?i.hexValue:i.values),t)}function To(e){if(e.startsWith("#")){const t=yo(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=yo(e);return t.space?t:null}const Eo=function(){return oe.Date.now()};var So=/\s/;const Po=function(e){for(var t=e.length;t--&&So.test(e.charAt(t)););return t};var Io=/^\s+/;const Vo=function(e){return e?e.slice(0,Po(e)+1).replace(Io,""):e};const Ro=function(e){return"symbol"==typeof e||be(e)&&"[object Symbol]"==fe(e)};var Oo=/^[-+]0x[0-9a-f]+$/i,Bo=/^0b[01]+$/i,Mo=/^0o[0-7]+$/i,No=parseInt;const Fo=function(e){if("number"==typeof e)return e;if(Ro(e))return NaN;if(L(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=L(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vo(e);var i=Bo.test(e);return i||Mo.test(e)?No(e.slice(2),i?2:8):Oo.test(e)?NaN:+e};var Do=Math.max,Lo=Math.min;const zo=function(e,t,i){var n,s,o,r,a,l,c=0,d=!1,h=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var i=n,o=s;return n=s=void 0,c=t,r=e.apply(o,i)}function g(e){var i=e-l;return void 0===l||i>=t||i<0||h&&e-c>=o}function f(){var e=Eo();if(g(e))return p(e);a=setTimeout(f,function(e){var i=t-(e-l);return h?Lo(i,o-(e-c)):i}(e))}function p(e){return a=void 0,u&&n?m(e):(n=s=void 0,r)}function b(){var e=Eo(),i=g(e);if(n=arguments,s=this,l=e,i){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),d?m(e):r}(l);if(h)return clearTimeout(a),a=setTimeout(f,t),m(l)}return void 0===a&&(a=setTimeout(f,t)),r}return t=Fo(t)||0,L(i)&&(d=!!i.leading,o=(h="maxWait"in i)?Do(Fo(i.maxWait)||0,t):o,u="trailing"in i?!!i.trailing:u),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=s=a=void 0},b.flush=function(){return void 0===a?r:p(Eo())},b};class Ho extends Ds{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${b()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class $o extends Ds{constructor(e,t){super(e);const i=`ck-labeled-field-view-${b()}`,n=`ck-labeled-field-view-status-${b()}`;this.fieldView=t(this,i,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",(e=>!e)),s.if("isEmpty","ck-labeled-field-view_empty"),s.if("isFocused","ck-labeled-field-view_focused"),s.if("placeholder","ck-labeled-field-view_placeholder"),s.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new Ho(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Ds(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",(e=>!e))],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Wo extends Ds{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new Ps,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,i)=>{this._setDomElementValue(i),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class jo extends Wo{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class Uo extends jo{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class qo extends jo{constructor(e,{min:t,max:i,step:n}={}){super(e);const s=this.bindTemplate;this.set("min",t),this.set("max",i),this.set("step",n),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:s.to("min"),max:s.to("max"),step:s.to("step")}})}}class Go extends Ds{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():k("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}class Zo extends Ds{constructor(e,t,i){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Is,this.focusTracker=new Ps,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e))],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.on("change:isOpen",((e,t,i)=>{if(i)if("auto"===this.panelPosition){const e=Zo._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:i,southWest:n,northEast:s,northWest:o,southMiddleEast:r,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Zo.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[i,n,r,a,e,s,o,l,c,t]:[n,i,a,r,e,o,s,c,l,t]}}Zo.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Zo._getOptimalPosition=ts;const Ko=Zo;class Jo extends ho{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new lo;return e.content=mo,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class Qo extends(V()){constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let i=e.actions[t];"string"==typeof i&&(i=[i]);for(const n of i)e.keystrokeHandler.set(n,((e,i)=>{this[t](),i()}))}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(Yo)||null}get last(){return this.focusables.filter(Yo).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n})),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const i=this.current;if(null===i)return this[1===e?"first":"last"];let n=this.focusables.get(i),s=(i+t+e)%t;do{const i=this.focusables.get(s);if(Yo(i)){n=i;break}s=(s+t+e)%t}while(s!==i);return n}}function Yo(e){return Xo(e)&&es(e.element)}function Xo(e){return!(!("focus"in e)||"function"!=typeof e.focus)}class er extends Ds{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class tr extends Ds{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function ir(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}class nr extends(G()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",sr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",sr),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function sr(e){e.return=!1,e.stop()}class or extends(G()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{if(!this.affectsData)return;const i=e.model.document.selection,n=!("$graveyard"==i.getFirstPosition().root.rootName)&&e.model.canEditAt(i);(e.isReadOnly||this._isEnabledBasedOnSelection&&!n)&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",rr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",rr),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function rr(e){e.return=!1,e.stop()}class ar extends or{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){v(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class lr extends(V()){constructor(e,t=[],i=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new y("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],i=[]){const n=this,s=this._context;!function e(t,i=new Set){t.forEach((t=>{a(t)&&(i.has(t)||(i.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,i)))}))}(e),h(e);const o=[...function e(t,i=new Set){return t.map((e=>a(e)?e:n._availablePlugins.get(e))).reduce(((t,n)=>i.has(n)?t:(i.add(n),n.requires&&(h(n.requires,n),e(n.requires,i).forEach((e=>t.add(e)))),t.add(n))),new Set)}(e.filter((e=>!c(e,t))))];!function(e,t){for(const i of t){if("function"!=typeof i)throw new y("plugincollection-replace-plugin-invalid-type",null,{pluginItem:i});const t=i.pluginName;if(!t)throw new y("plugincollection-replace-plugin-missing-name",null,{pluginItem:i});if(i.requires&&i.requires.length)throw new y("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const s=n._availablePlugins.get(t);if(!s)throw new y("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const o=e.indexOf(s);if(-1===o){if(n._contextPlugins.has(s))return;throw new y("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(s.requires&&s.requires.length)throw new y("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(o,1,i),n._availablePlugins.set(t,i)}}(o,i);const r=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(s),n._add(e,t),t}))}(o);return u(r,"init").then((()=>u(r,"afterInit"))).then((()=>r));function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function h(e,i=null){e.map((e=>a(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new y("plugincollection-soft-required",s,{missingPlugin:e,requiredBy:d(t)});throw new y("plugincollection-plugin-not-found",s,{plugin:e})}(e,i),function(e,t){if(!l(t))return;if(l(e))return;throw new y("plugincollection-context-required",s,{plugin:d(e),requiredBy:d(t)})}(e,i),function(e,i){if(!i)return;if(!c(e,t))return;throw new y("plugincollection-required",s,{plugin:d(e),requiredBy:d(i)})}(e,i)}))}function u(e,t){return e.reduce(((e,i)=>i[t]?n._contextPlugins.has(i)?e:e.then(i[t].bind(i)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new y("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}class cr{constructor(e){this._contextOwner=null,this.config=new xn(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new lr(this,t);const i=this.config.get("language")||{};this.locale=new Ts({uiLanguage:"string"==typeof i?i:i.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new Es}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const i of e.concat(t)){if("function"!=typeof i)throw new y("context-initplugins-constructor-only",null,{Plugin:i});if(!0!==i.isContextPlugin)throw new y("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new y("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const i=new this(e);t(i.initPlugins().then((()=>i)))}))}}class dr extends(G()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}const hr=new WeakMap;let ur=!1;function mr({view:e,element:t,text:i,isDirectHost:n=!0,keepOnFocus:s=!1}){const o=e.document;function r(i){hr.get(o).set(t,{text:i,isDirectHost:n,keepOnFocus:s,hostElement:n?t:null}),e.change((e=>br(o,e)))}hr.has(o)||(hr.set(o,new Map),o.registerPostFixer((e=>br(o,e))),o.on("change:isComposing",(()=>{e.change((e=>br(o,e)))}),{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",((e,t,i)=>{r(i)})),t.placeholder?r(t.placeholder):i&&r(i),i&&function(){ur||k("enableplaceholder-deprecated-text-option");ur=!0}()}function gr(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function fr(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function pr(e,t){if(!e.isAttached())return!1;const i=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(i)return!1;const n=e.document,s=n.selection.anchor;return(!n.isComposing||!s||s.parent!==e)&&(!!t||(!n.isFocused||!!s&&s.parent!==e))}function br(e,t){const i=hr.get(e),n=[];let s=!1;for(const[e,o]of i)o.isDirectHost&&(n.push(e),wr(t,e,o)&&(s=!0));for(const[e,o]of i){if(o.isDirectHost)continue;const i=vr(e);i&&(n.includes(i)||(o.hostElement=i,wr(t,e,o)&&(s=!0)))}return s}function wr(e,t,i){const{text:n,isDirectHost:s,hostElement:o}=i;let r=!1;o.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,o),r=!0);return(s||1==t.childCount)&&pr(o,i.keepOnFocus)?gr(e,o)&&(r=!0):fr(e,o)&&(r=!0),r}function vr(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class _r{is(){throw new Error("is() method is abstract")}}const yr=function(e){return kn(e,4)};class kr extends(V(_r)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new y("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),n=e.getAncestors(t);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=te(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]<i[n]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire(`change:${e}`,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=yr(this);return delete e.parent,e}}kr.prototype.is=function(e){return"node"===e||"view:node"===e};class Cr extends kr{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof Cr&&(this===e||this.data===e.data)}_clone(){return new Cr(this.document,this.data)}}Cr.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e};class Ar extends _r{constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.data.length)throw new y("view-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.data.length)throw new y("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}}Ar.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class xr{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const i=Tr(t,e);if(i)return{element:t,pattern:e,match:i}}return null}matchAll(...e){const t=[];for(const i of e)for(const e of this._patterns){const n=Tr(i,e);n&&t.push({element:i,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function Tr(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=new Set(t.getAttributeKeys());Ee(e)?(void 0!==e.style&&k("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&k("matcher-pattern-deprecated-attributes-class-key",e)):(i.delete("style"),i.delete("class"));return Er(e,i,(e=>t.getAttribute(e)))}(t.attributes,e),!i.attributes)||t.classes&&(i.classes=function(e,t){return Er(e,t.getClassNames(),(()=>{}))}(t.classes,e),!i.classes)||t.styles&&(i.styles=function(e,t){return Er(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!i.styles)?null:i}function Er(e,t,i){const n=function(e){if(Array.isArray(e))return e.map((e=>Ee(e)?(void 0!==e.key&&void 0!==e.value||k("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if(Ee(e))return Object.entries(e);return[[e,!0]]}(e),s=Array.from(t),o=[];if(n.forEach((([e,t])=>{s.forEach((n=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,n)&&function(e,t,i){if(!0===e)return!0;const n=i(t);return e===n||e instanceof RegExp&&!!String(n).match(e)}(t,n,i)&&o.push(n)}))})),n.length&&!(o.length<n.length))return o}var Sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pr=/^\w*$/;const Ir=function(e,t){if(pe(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!Ro(e))||(Pr.test(e)||!Sr.test(e)||null!=t&&e in Object(t))};function Vr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,s=t?t.apply(this,n):n[0],o=i.cache;if(o.has(s))return o.get(s);var r=e.apply(this,n);return i.cache=o.set(s,r)||o,r};return i.cache=new(Vr.Cache||kt),i}Vr.Cache=kt;const Rr=Vr;const Or=function(e){var t=Rr(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t};var Br=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/\\(\\)?/g,Nr=Or((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Br,(function(e,i,n,s){t.push(n?s.replace(Mr,"$1"):i||e)})),t}));const Fr=Nr;const Dr=function(e,t){for(var i=-1,n=null==e?0:e.length,s=Array(n);++i<n;)s[i]=t(e[i],i,e);return s};var Lr=re?re.prototype:void 0,zr=Lr?Lr.toString:void 0;const Hr=function e(t){if("string"==typeof t)return t;if(pe(t))return Dr(t,e)+"";if(Ro(t))return zr?zr.call(t):"";var i=t+"";return"0"==i&&1/t==-Infinity?"-0":i};const $r=function(e){return null==e?"":Hr(e)};const Wr=function(e,t){return pe(e)?e:Ir(e,t)?[e]:Fr($r(e))};const jr=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const Ur=function(e){if("string"==typeof e||Ro(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const qr=function(e,t){for(var i=0,n=(t=Wr(t,e)).length;null!=e&&i<n;)e=e[Ur(t[i++])];return i&&i==n?e:void 0};const Gr=function(e,t,i){var n=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(s);++n<s;)o[n]=e[n+t];return o};const Zr=function(e,t){return t.length<2?e:qr(e,Gr(t,0,-1))};const Kr=function(e,t){return t=Wr(t,e),null==(e=Zr(e,t))||delete e[Ur(jr(t))]};const Jr=function(e,t){return null==e||Kr(e,t)};const Qr=function(e,t,i){var n=null==e?void 0:qr(e,t);return void 0===n?i:n};const Yr=function(e,t,i){(void 0!==i&&!Pe(e[t],i)||void 0===i&&!(t in e))&&St(e,t,i)};const Xr=function(e){return function(t,i,n){for(var s=-1,o=Object(t),r=n(t),a=r.length;a--;){var l=r[e?a:++s];if(!1===i(o[l],l,o))break}return t}}();const ea=function(e){return be(e)&&li(e)};const ta=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};const ia=function(e){return Vt(e,gi(e))};const na=function(e,t,i,n,s,o,r){var a=ta(e,i),l=ta(t,i),c=r.get(l);if(c)Yr(e,i,c);else{var d=o?o(a,l,i+"",e,t,r):void 0,h=void 0===d;if(h){var u=pe(l),m=!u&&$t(l),g=!u&&!m&&ei(l);d=l,u||m||g?pe(a)?d=a:ea(a)?d=yi(a):m?(h=!1,d=_i(l,!0)):g?(h=!1,d=an(l,!0)):d=[]:Ee(l)||Ft(l)?(d=a,Ft(a)?d=ia(a):L(a)&&!$e(a)||(d=hn(l))):h=!1}h&&(r.set(l,d),s(d,l,n,o,r),r.delete(l)),Yr(e,i,d)}};const sa=function e(t,i,n,s,o){t!==i&&Xr(i,(function(r,a){if(o||(o=new xt),L(r))na(t,i,a,n,e,s,o);else{var l=s?s(ta(t,a),r,a+"",t,i,o):void 0;void 0===l&&(l=r),Yr(t,a,l)}}),gi)};const oa=function(e){return e};const ra=function(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)};var aa=Math.max;const la=function(e,t,i){return t=aa(void 0===t?e.length-1:t,0),function(){for(var n=arguments,s=-1,o=aa(n.length-t,0),r=Array(o);++s<o;)r[s]=n[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=n[s];return a[t]=i(r),ra(e,this,a)}};const ca=function(e){return function(){return e}};const da=Et?function(e,t){return Et(e,"toString",{configurable:!0,enumerable:!1,value:ca(t),writable:!0})}:oa;var ha=Date.now;const ua=function(e){var t=0,i=0;return function(){var n=ha(),s=16-(n-i);if(i=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}};const ma=ua(da);const ga=function(e,t){return ma(la(e,t,oa),e+"")};const fa=function(e,t,i){if(!L(i))return!1;var n=typeof t;return!!("number"==n?li(i)&&jt(t,i.length):"string"==n&&t in i)&&Pe(i[t],e)};const pa=function(e){return ga((function(t,i){var n=-1,s=i.length,o=s>1?i[s-1]:void 0,r=s>2?i[2]:void 0;for(o=e.length>3&&"function"==typeof o?(s--,o):void 0,r&&fa(i[0],i[1],r)&&(o=s<3?void 0:o,s=1),t=Object(t);++n<s;){var a=i[n];a&&e(t,a,n,o)}return t}))};const ba=pa((function(e,t,i){sa(e,t,i)}));const wa=function(e,t,i,n){if(!L(e))return e;for(var s=-1,o=(t=Wr(t,e)).length,r=o-1,a=e;null!=a&&++s<o;){var l=Ur(t[s]),c=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=r){var d=a[l];void 0===(c=n?n(d,l,a):void 0)&&(c=L(d)?d:jt(t[s+1])?[]:{})}It(a,l,c),a=a[l]}return e};const va=function(e,t,i){return null==e?e:wa(e,t,i)};class _a{constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=function(e){let t=null,i=0,n=0,s=null;const o=new Map;if(""===e)return o;";"!=e.charAt(e.length-1)&&(e+=";");for(let r=0;r<e.length;r++){const a=e.charAt(r);if(null===t)switch(a){case":":s||(s=e.substr(i,r-i),n=r+1);break;case'"':case"'":t=a;break;case";":{const t=e.substr(n,r-n);s&&o.set(s.trim(),t.trim()),s=null,i=r+1;break}}else a===t&&(t=null)}return o}(e);for(const[e,i]of t)this._styleProcessor.toNormalizedForm(e,i,this._styles)}has(e){if(this.isEmpty)return!1;const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)}set(e,t){if(L(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=ka(e);Jr(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!L(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this.getStylesEntries().map((([e])=>e))}clear(){this._styles={}}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),n=Qr(this._styles,i);if(!n)return;!Object.keys(n).length&&this.remove(i)}}class ya{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if(L(t))Ca(i,ka(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:s,value:o}=n(t);Ca(i,s,o)}else Ca(i,e,t)}getNormalized(e,t){if(!e)return ba({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return Qr(t,i);const n=i(e,t);if(n)return n}return Qr(t,ka(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);if(void 0===i)return[];if(this._reducers.has(e)){return this._reducers.get(e)(i)}return[[e,i]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const i=this.getNormalized(t,e);return i&&"object"==typeof i?Object.keys(i).length:i})),i=new Set([...t,...Object.keys(e)]);return Array.from(i)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function ka(e){return e.replace("-",".")}function Ca(e,t,i){let n=i;L(i)&&(n=ba({},Qr(e,t),i)),va(e,t,n)}class Aa extends kr{constructor(e,t,i,n){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=Vs(e);for(const[e,i]of t)null===i?t.delete(e):"string"!=typeof i&&t.set(e,String(i));return t}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");xa(this._classes,e),this._attrs.delete("class")}this._styles=new _a(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Aa))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new xr(...e);let i=this.parent;for(;i&&!i.is("documentFragment");){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Cr(e,t)];ie(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Cr(e,t):t instanceof Ar?new Cr(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i<e+t;i++)this._children[i].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){const i=String(t);this._fireChange("attributes",this),"class"==e?xa(this._classes,i):"style"==e?this._styles.setTo(i):this._attrs.set(e,i)}_removeAttribute(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of ks(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of ks(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of ks(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function xa(e,t){const i=t.split(/\s+/);e.clear(),i.forEach((t=>e.add(t)))}Aa.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ta extends Aa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Ea}}function Ea(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}Ta.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Sa extends(G(Ta)){constructor(e,t,i,n){super(e,t,i,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}Sa.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const Pa=Symbol("rootName");class Ia extends Sa{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(Pa)}set rootName(e){this._setCustomProperty(Pa,e)}set _name(e){this.name=e}}Ia.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Va{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new y("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new y("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Ra._createAt(e.startPosition):this._position=Ra._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i;do{i=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(i instanceof Cr){if(e.isAtEnd)return this._position=Ra._createAfter(i),this._next();n=i.data[e.offset]}else n=i.getChild(e.offset);if(n instanceof Aa){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new Ra(n,0);return this._position=e,this._formatReturnValue("elementStart",n,t,e,1)}if(n instanceof Cr){if(this.singleCharacters)return e=new Ra(n,0),this._position=e,this._next();let i,s=n.data.length;return n==this._boundaryEndParent?(s=this.boundaries.end.offset,i=new Ar(n,0,s),e=Ra._createAfter(i)):(i=new Ar(n,0,n.data.length),e.offset++),this._position=e,this._formatReturnValue("text",i,t,e,s)}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset}const s=new Ar(i,e.offset,n);return e.offset+=n,this._position=e,this._formatReturnValue("text",s,t,e,n)}return e=Ra._createAfter(i),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(i instanceof Cr){if(e.isAtStart)return this._position=Ra._createBefore(i),this._previous();n=i.data[e.offset-1]}else n=i.getChild(e.offset-1);if(n instanceof Aa)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new Ra(n,n.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof Cr){if(this.singleCharacters)return e=new Ra(n,n.data.length),this._position=e,this._previous();let i,s=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new Ar(n,t,n.data.length-t),s=i.data.length,e=Ra._createBefore(i)}else i=new Ar(n,0,n.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",i,t,e,s)}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const s=new Ar(i,e.offset,n);return this._position=e,this._formatReturnValue("text",s,t,e,n)}return e=Ra._createBefore(i),this._position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,n,s){return t instanceof Ar&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=Ra._createAfter(t.textNode):(n=Ra._createAfter(t.textNode),this._position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=Ra._createBefore(t.textNode):(n=Ra._createBefore(t.textNode),this._position=n))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:s}}}}class Ra extends _r{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Sa);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=Ra._createAt(this),i=t.offset+e;return t.offset=i<0?0:i,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new Va(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const n=te(t,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]<i[n]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new Va(e)}clone(){return new Ra(this.parent,this.offset)}static _createAt(e,t){if(e instanceof Ra)return new this(e.parent,e.offset);{const i=e;if("end"==t)t=i.is("$text")?i.data.length:i.childCount;else{if("before"==t)return this._createBefore(i);if("after"==t)return this._createAfter(i);if(0!==t&&!t)throw new y("view-createpositionat-offset-required",i)}return new Ra(i,t)}}static _createAfter(e){if(e.is("$textProxy"))return new Ra(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new y("view-position-after-root",e,{root:e});return new Ra(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new Ra(e.textNode,e.offsetInText);if(!e.parent)throw new y("view-position-before-root",e,{root:e});return new Ra(e.parent,e.index)}}Ra.prototype.is=function(e){return"position"===e||"view:position"===e};class Oa extends _r{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new Va({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(Ba,{direction:"backward"}),t=this.end.getLastMatchingPosition(Ba);return e.parent.is("$text")&&e.isAtStart&&(e=Ra._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=Ra._createAfter(t.parent)),new Oa(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(Ba);if(e.isAfter(this.end)||e.isEqual(this.end))return new Oa(e,e);let t=this.end.getLastMatchingPosition(Ba,{direction:"backward"});const i=e.nodeAfter,n=t.nodeBefore;return i&&i.is("$text")&&(e=new Ra(i,0)),n&&n.is("$text")&&(t=new Ra(n,n.data.length)),new Oa(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const i=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),n=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return i&&n}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Oa(this.start,e.start)),this.containsPosition(e.end)&&t.push(new Oa(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,i=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(i=e.end),new Oa(t,i)}return null}getWalker(e={}){return e.boundaries=this,new Va(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new Oa(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Va(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Va(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,i,n){return new this(new Ra(e,t),new Ra(i,n))}static _createFromPositionAndShift(e,t){const i=e,n=e.getShiftedBy(t);return t>0?new this(i,n):new this(n,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Ra._createBefore(e),t)}}function Ba(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}Oa.prototype.is=function(e){return"range"===e||"view:range"===e};class Ma extends(V(_r)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ee(this.getRanges());if(t!=ee(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,i,n]=e;if("object"==typeof i&&(n=i,i=void 0),null===t)this._setRanges([]),this._setFakeOptions(n);else if(t instanceof Ma||t instanceof Na)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Oa)this._setRanges([t],n&&n.backward),this._setFakeOptions(n);else if(t instanceof Ra)this._setRanges([new Oa(t)]),this._setFakeOptions(n);else if(t instanceof kr){const e=!!n&&!!n.backward;let s;if(void 0===i)throw new y("view-selection-setto-required-second-parameter",this);s="in"==i?Oa._createIn(t):"on"==i?Oa._createOn(t):new Oa(Ra._createAt(t,i)),this._setRanges([s],e),this._setFakeOptions(n)}else{if(!ie(t))throw new y("view-selection-setto-not-selectable",this);this._setRanges(t,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new y("view-selection-setfocus-no-ranges",this);const i=Ra._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==i.compareWith(n)?this._addRange(new Oa(i,n),!0):this._addRange(new Oa(n,i)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof Oa))throw new y("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new y("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Oa(e.start,e.end))}}Ma.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Na extends(V(_r)){constructor(...e){super(),this._selection=new Ma,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Na.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class Fa extends f{constructor(e,t,i){super(e,t),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Da=Symbol("bubbling contexts");function La(e){return class extends e{fire(e,...t){try{const i=e instanceof f?e:new f(this,e),n=Wa(this);if(!n.size)return;if(za(i,"capturing",this),Ha(n,"$capture",i,...t))return i.return;const s=i.startRange||this.selection.getFirstRange(),o=s?s.getContainedElement():null,r=!!o&&Boolean($a(n,o));let a=o||function(e){if(!e)return null;const t=e.start.parent,i=e.end.parent,n=t.getPath(),s=i.getPath();return n.length>s.length?t:i}(s);if(za(i,"atTarget",a),!r){if(Ha(n,"$text",i,...t))return i.return;za(i,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Ha(n,"$root",i,...t))return i.return}else if(a.is("element")&&Ha(n,a.name,i,...t))return i.return;if(Ha(n,a,i,...t))return i.return;a=a.parent,za(i,"bubbling",a)}return za(i,"bubbling",this),Ha(n,"$document",i,...t),i.return}catch(e){y.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,i){const n=ks(i.context||"$document"),s=Wa(this);for(const o of n){let n=s.get(o);n||(n=new(V()),s.set(o,n)),this.listenTo(n,e,t,i)}}_removeEventListener(e,t){const i=Wa(this);for(const n of i.values())this.stopListening(n,e,t)}}}{const e=La(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{La[t]=e.prototype[t]}))}function za(e,t,i){e instanceof Fa&&(e._eventPhase=t,e._currentTarget=i)}function Ha(e,t,i,...n){const s="string"==typeof t?e.get(t):$a(e,t);return!!s&&(s.fire(i,...n),i.stop.called)}function $a(e,t){for(const[i,n]of e)if("function"==typeof i&&i(t))return n;return null}function Wa(e){return e[Da]||(e[Da]=new Map),e[Da]}class ja extends(La(G())){constructor(e){super(),this._postFixers=new Set,this.selection=new Na,this.roots=new Es({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}}class Ua extends Aa{constructor(e,t,i,n){super(e,t,i,n),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Ga}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new y("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}Ua.DEFAULT_PRIORITY=10;const qa=Ua;function Ga(){if(Za(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Za(e)>1)return null;e=e.parent}return!e||Za(e)>1?null:this.childCount}function Za(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ua.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ka extends Aa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Ja}_insertChild(e,t){if(t&&(t instanceof kr||Array.from(t).length>0))throw new y("view-emptyelement-cannot-add",[this,t]);return 0}}function Ja(){return null}Ka.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Qa extends Aa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=Xa}_insertChild(e,t){if(t&&(t instanceof kr||Array.from(t).length>0))throw new y("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Ya(e){e.document.on("arrowKey",((t,i)=>function(e,t,i){if(t.keyCode==ps.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,s=e.focusOffset,o=i.domPositionToView(t,s);if(null===o)return;let r=!1;const a=o.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=i.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,e.domConverter)),{priority:"low"})}function Xa(){return null}Qa.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class el extends Aa{constructor(e,t,i,n){super(e,t,i,n),this.getFillerOffset=tl}_insertChild(e,t){if(t&&(t instanceof kr||Array.from(t).length>0))throw new y("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function tl(){return null}el.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class il extends(V(_r)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new Cr(e,t)];ie(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Cr(e,t):t instanceof Ar?new Cr(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i<e+t;i++)this._children[i].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire("change:"+e,t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}il.prototype.is=function(e){return"documentFragment"===e||"view:documentFragment"===e};class nl{constructor(e){this._cloneGroups=new Map,this._slotFactory=null,this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new il(this.document,e)}createText(e){return new Cr(this.document,e)}createAttributeElement(e,t,i={}){const n=new qa(this.document,e,t);return"number"==typeof i.priority&&(n._priority=i.priority),i.id&&(n._id=i.id),i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createContainerElement(e,t,i={},n={}){let s=null;Ee(i)?n=i:s=i;const o=new Ta(this.document,e,t,s);return n.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),o}createEditableElement(e,t,i={}){const n=new Sa(this.document,e,t);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createEmptyElement(e,t,i={}){const n=new Ka(this.document,e,t);return i.renderUnsafeAttributes&&n._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),n}createUIElement(e,t,i){const n=new Qa(this.document,e,t);return i&&(n.render=i),n}createRawElement(e,t,i,n={}){const s=new el(this.document,e,t);return i&&(s.render=i),n.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),s}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){Ee(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof Ra?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new y("view-writer-break-non-container-element",this.document);if(!t.parent)throw new y("view-writer-break-root",this.document);if(e.isAtStart)return Ra._createBefore(t);if(!e.isAtEnd){const i=t._clone(!1);this.insert(Ra._createAfter(t),i);const n=new Oa(e,Ra._createAt(t,"end")),s=new Ra(i,0);this.move(n,s)}return Ra._createAfter(t)}mergeAttributes(e){const t=e.offset,i=e.parent;if(i.is("$text"))return e;if(i.is("attributeElement")&&0===i.childCount){const e=i.parent,t=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Ra(e,t))}const n=i.getChild(t-1),s=i.getChild(t);if(!n||!s)return e;if(n.is("$text")&&s.is("$text"))return ll(n,s);if(n.is("attributeElement")&&s.is("attributeElement")&&n.isSimilar(s)){const e=n.childCount;return n._appendChild(s.getChildren()),s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new Ra(n,e))}return e}mergeContainers(e){const t=e.nodeBefore,i=e.nodeAfter;if(!(t&&i&&t.is("containerElement")&&i.is("containerElement")))throw new y("view-writer-merge-containers-invalid-position",this.document);const n=t.getChild(t.childCount-1),s=n instanceof Cr?Ra._createAt(n,"end"):Ra._createAt(t,"end");return this.move(Oa._createIn(i),Ra._createAt(t,"end")),this.remove(Oa._createOn(i)),s}insert(e,t){dl(t=ie(t)?[...t]:[t],this.document);const i=t.reduce(((e,t)=>{const i=e[e.length-1],n=!t.is("uiElement");return i&&i.breakAttributes==n?i.nodes.push(t):e.push({breakAttributes:n,nodes:[t]}),e}),[]);let n=null,s=e;for(const{nodes:e,breakAttributes:t}of i){const i=this._insertNodes(s,e,t);n||(n=i.start),s=i.end}return n?new Oa(n,s):new Oa(e)}remove(e){const t=e instanceof Oa?e:Oa._createOn(e);if(ul(t,this.document),t.isCollapsed)return new il(this.document);const{start:i,end:n}=this._breakAttributesRange(t,!0),s=i.parent,o=n.offset-i.offset,r=s._removeChildren(i.offset,o);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new il(this.document,r)}clear(e,t){ul(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of i){const i=n.item;let s;if(i.is("element")&&t.isSimilar(i))s=Oa._createOn(i);else if(!n.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(s=Oa._createIn(e))}s&&(s.end.isAfter(e.end)&&(s.end=e.end),s.start.isBefore(e.start)&&(s.start=e.start),this.remove(s))}}move(e,t){let i;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,s=n.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=n.childCount-s}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof qa))throw new y("view-writer-wrap-invalid-attribute",this.document);if(ul(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(i=n.parent,!Array.from(i.getChildren()).some((e=>!e.is("uiElement"))))&&(n=n.getLastMatchingPosition((e=>e.item.is("uiElement")))),n=this._wrapPosition(n,t);const s=this.document.selection;return s.isCollapsed&&s.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new Oa(n)}return this._wrapRange(e,t);var i}unwrap(e,t){if(!(t instanceof qa))throw new y("view-writer-unwrap-invalid-attribute",this.document);if(ul(e,this.document),e.isCollapsed)return e;const{start:i,end:n}=this._breakAttributesRange(e,!0),s=i.parent,o=this._unwrapChildren(s,i.offset,n.offset,t),r=this.mergeAttributes(o.start);r.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new Oa(r,a)}rename(e,t){const i=new Ta(this.document,e,t.getAttributes());return this.insert(Ra._createAfter(t),i),this.move(Oa._createIn(t),Ra._createAt(i,0)),this.remove(Oa._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Ra._createAt(e,t)}createPositionAfter(e){return Ra._createAfter(e)}createPositionBefore(e){return Ra._createBefore(e)}createRange(e,t){return new Oa(e,t)}createRangeOn(e){return Oa._createOn(e)}createRangeIn(e){return Oa._createIn(e)}createSelection(...e){return new Ma(...e)}createSlot(e="children"){if(!this._slotFactory)throw new y("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,i){let n,s;if(n=i?sl(e):e.parent.is("$text")?e.parent.parent:e.parent,!n)throw new y("view-writer-invalid-position-container",this.document);s=i?this._breakAttributes(e,!0):e.parent.is("$text")?al(e):e;const o=n._insertChild(s.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=s.getShiftedBy(o),a=this.mergeAttributes(s);a.isEqual(s)||r.offset--;const l=this.mergeAttributes(r);return new Oa(a,l)}_wrapChildren(e,t,i,n){let s=t;const o=[];for(;s<i;){const t=e.getChild(s),i=t.is("$text"),r=t.is("attributeElement");if(r&&this._wrapAttributeElement(n,t))o.push(new Ra(e,s));else if(i||!r||ol(n,t)){const i=n._clone();t._remove(),i._appendChild(t),e._insertChild(s,i),this._addToClonedElementsGroup(i),o.push(new Ra(e,s))}else this._wrapChildren(t,0,t.childCount,n);s++}let r=0;for(const e of o){if(e.offset-=r,e.offset==t)continue;this.mergeAttributes(e).isEqual(e)||(r++,i--)}return Oa._createFromParentsAndOffsets(e,t,e,i)}_unwrapChildren(e,t,i,n){let s=t;const o=[];for(;s<i;){const t=e.getChild(s);if(t.is("attributeElement"))if(t.isSimilar(n)){const n=t.getChildren(),r=t.childCount;t._remove(),e._insertChild(s,n),this._removeFromClonedElementsGroup(t),o.push(new Ra(e,s),new Ra(e,s+r)),s+=r,i+=r-1}else this._unwrapAttributeElement(n,t)?(o.push(new Ra(e,s),new Ra(e,s+1)),s++):(this._unwrapChildren(t,0,t.childCount,n),s++);else s++}let r=0;for(const e of o){if(e.offset-=r,e.offset==t||e.offset==i)continue;this.mergeAttributes(e).isEqual(e)||(r++,i--)}return Oa._createFromParentsAndOffsets(e,t,e,i)}_wrapRange(e,t){const{start:i,end:n}=this._breakAttributesRange(e,!0),s=i.parent,o=this._wrapChildren(s,i.offset,n.offset,t),r=this.mergeAttributes(o.start);r.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new Oa(r,a)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return rl(e.clone());e.parent.is("$text")&&(e=al(e));const i=this.createAttributeElement("_wrapPosition-fake-element");i._priority=Number.POSITIVE_INFINITY,i.isSimilar=()=>!1,e.parent._insertChild(e.offset,i);const n=new Oa(e,e.getShiftedBy(1));this.wrap(n,t);const s=new Ra(i.parent,i.index);i._remove();const o=s.nodeBefore,r=s.nodeAfter;return o instanceof Cr&&r instanceof Cr?ll(o,r):rl(s)}_wrapAttributeElement(e,t){if(!ml(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!ml(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const i=e.start,n=e.end;if(ul(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new Oa(i,i)}const s=this._breakAttributes(n,t),o=s.parent.childCount,r=this._breakAttributes(i,t);return s.offset+=s.parent.childCount-o,new Oa(r,s)}_breakAttributes(e,t=!1){const i=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new y("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new y("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new y("view-writer-cannot-break-raw-element",this.document);if(!t&&n.is("$text")&&hl(n.parent))return e.clone();if(hl(n))return e.clone();if(n.is("$text"))return this._breakAttributes(al(e),t);if(i==n.childCount){const e=new Ra(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new Ra(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,s=n._clone();n.parent._insertChild(e,s),this._addToClonedElementsGroup(s);const o=n.childCount-i,r=n._removeChildren(i,o);s._appendChild(r);const a=new Ra(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function sl(e){let t=e.parent;for(;!hl(t);){if(!t)return;t=t.parent}return t}function ol(e,t){return e.priority<t.priority||!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function rl(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new Ra(t,t.data.length);const i=e.nodeAfter;return i&&i.is("$text")?new Ra(i,0):e}function al(e){if(e.offset==e.parent.data.length)return new Ra(e.parent.parent,e.parent.index+1);if(0===e.offset)return new Ra(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new Cr(e.root.document,t)),new Ra(e.parent.parent,e.parent.index+1)}function ll(e,t){const i=e.data.length;return e._data+=t.data,t._remove(),new Ra(e,i)}const cl=[Cr,qa,Ta,Ka,el,Qa];function dl(e,t){for(const i of e){if(!cl.some((e=>i instanceof e)))throw new y("view-writer-insert-invalid-node-type",t);i.is("$text")||dl(i.getChildren(),t)}}function hl(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function ul(e,t){const i=sl(e.start),n=sl(e.end);if(!i||!n||i!==n)throw new y("view-writer-invalid-range-container",t)}function ml(e,t){return null===e.id&&null===t.id}const gl=e=>e.createTextNode(" "),fl=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},pl=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},bl=7,wl="⁠".repeat(bl);function vl(e){return"string"==typeof e?e.substr(0,bl)===wl:Fn(e)&&e.data.substr(0,bl)===wl}function _l(e){return e.data.length==bl&&vl(e)}function yl(e){const t="string"==typeof e?e:e.data;return vl(e)?t.slice(bl):t}function kl(e,t){if(t.keyCode==ps.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;vl(t)&&i<=bl&&e.collapse(t,0)}}}class Cl extends(G()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),l.isBlink&&!l.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new y("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!l.isAndroid)return;let e=null;const t=!(l.isBlink&&!l.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Ra._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;vl(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Al(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.childNodes),n=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),s=this._diffNodeLists(i,n),o=this._findUpdateActions(s,i,n,xl);if(-1!==o.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const s of o)if("update"===s){const s=t.equal+t.insert,o=t.equal+t.delete,r=e.getChild(s);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,i[o]),ss(n[s]),t.equal++}else t[s]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Ra._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Fn(t.parent)&&vl(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!vl(e))throw new y("view-renderer-filler-was-lost",this);_l(e)?e.remove():e.data=e.data.substr(bl),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(i===t.getFillerOffset())return!1;const n=e.nodeBefore,s=e.nodeAfter;return!(n instanceof Cr||s instanceof Cr)&&(!l.isAndroid||!n&&!s)}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e);let n=this.domConverter.viewToDom(e).data;const s=t.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(n=wl+n),Sl(i,n)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.attributes).map((e=>e.name)),n=e.getAttributeKeys();for(const i of n)this.domConverter.setDomElementAttribute(t,i,e.getAttribute(i),e);for(const n of i)e.hasAttribute(n)||this.domConverter.removeDomElementAttribute(t,n)}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;if(l.isAndroid){let e=null;for(const t of Array.from(i.childNodes)){if(e&&Fn(e)&&Fn(t)){i.normalize();break}e=t}}const n=t.inlineFillerPosition,s=i.childNodes,o=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));n&&n.parent===e&&Al(i.ownerDocument,o,n.offset);const r=this._diffNodeLists(s,o),a=this._findUpdateActions(r,s,o,Tl);let c=0;const d=new Set;for(const e of a)"delete"===e?(d.add(s[c]),ss(s[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of a)"insert"===e?(Qn(i,c,o[c]),c++):"update"===e?(Sl(s[c],o[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(o[c])),c++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;const n=i[i.length-1];n==t&&i.pop();return i}(e,this._fakeSelectionContainer),m(e,t,El.bind(null,this.domConverter))}_findUpdateActions(e,t,i,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let s=[],o=[],r=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?r.push(i[a.equal+a.insert]):"delete"===l?o.push(t[a.equal+a.delete]):(s=s.concat(m(o,r,n).map((e=>"equal"===e?"update":e))),s.push("equal"),o=[],r=[]),a[l]++;return s.concat(m(o,r,n).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(l.isBlink&&!l.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&l.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),s=t.createRange();n.removeAllRanges(),s.selectNodeContents(i),n.addRange(s)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(i.parent,i.offset,n.parent,n.offset),l.isGecko&&function(e,t){const i=e.parent;if(i.nodeType!=Node.ELEMENT_NODE||e.offset!=i.childNodes.length-1)return;const n=i.childNodes[e.offset];n&&"BR"==n.tagName&&t.addRange(t.getRangeAt(0))}(n,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const i=e.activeElement,n=this.domConverter.mapDomToView(i);i&&n&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function Al(e,t,i){const n=t instanceof Array?t:t.childNodes,s=n[i];if(Fn(s))return s.data=wl+s.data,s;{const s=e.createTextNode(wl);return Array.isArray(t)?n.splice(i,0,s):Qn(t,i,s),s}}function xl(e,t){return Sn(e)&&Sn(t)&&!Fn(e)&&!Fn(t)&&!Yn(e)&&!Yn(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Tl(e,t){return Sn(e)&&Sn(t)&&Fn(e)&&Fn(t)}function El(e,t,i){return t===i||(Fn(t)&&Fn(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}function Sl(e,t){const i=e.data;if(i==t)return;const n=d(i,t);for(const t of n)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Pl=pl(Mn.document),Il=gl(Mn.document),Vl=fl(Mn.document),Rl="data-ck-unsafe-attribute-",Ol="data-ck-unsafe-element";class Bl{constructor(e,{blockFillerMode:t,renderingMode:i="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new xr,this._inlineObjectElementMatcher=new xr,this._elementsWithTemporaryCustomProperties=new Set,this.document=e,this.renderingMode=i,this.blockFillerMode=t||("editing"===i?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?Mn.document:Mn.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Ma(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,i){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===i&&("src"===e||"srcset"===e)||("source"===i&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const i=(new DOMParser).parseFromString(t,"text/html"),n=i.createDocumentFragment(),s=i.body.childNodes;for(;s.length>0;)n.appendChild(s[0]);const o=i.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=o.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Dl(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(n)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const i=e;if(this.mapViewToDom(i)){if(!i.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(i);this._elementsWithTemporaryCustomProperties.add(i)}let n;if(i.is("documentFragment"))n=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(n,i);else{if(i.is("uiElement"))return n="$comment"===i.name?this._domDocument.createComment(i.getCustomProperty("$rawContent")):i.render(this._domDocument,this),t.bind&&this.bindElements(n,i),n;this._shouldRenameElement(i.name)?(Dl(i.name),n=this._createReplacementDomElement(i.name)):n=i.hasAttribute("xmlns")?this._domDocument.createElementNS(i.getAttribute("xmlns"),i.name):this._domDocument.createElement(i.name),i.is("rawElement")&&i.render(n,this),t.bind&&this.bindElements(n,i);for(const e of i.getAttributeKeys())this.setDomElementAttribute(n,e,i.getAttribute(e),i)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(i,t))n.appendChild(e);return n}}setDomElementAttribute(e,t,i,n){const s=this.shouldRenderAttribute(t,i,e.tagName.toLowerCase())||n&&n.shouldRenderUnsafeAttribute(t);s||k("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:i}),Xn(t)?(e.hasAttribute(t)&&!s?e.removeAttribute(t):e.hasAttribute(Rl+t)&&s&&e.removeAttribute(Rl+t),e.setAttribute(s?t:Rl+t,i)):k("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:i})}removeDomElementAttribute(e,t){t!=Ol&&(e.removeAttribute(t),e.removeAttribute(Rl+t))}*viewChildrenToDom(e,t={}){const i=e.getFillerOffset&&e.getFillerOffset();let n=0;for(const s of e.getChildren()){i===n&&(yield this._getBlockFiller());const e=s.is("element")&&!!s.getCustomProperty("dataPipeline:transparentRendering")&&!Ss(s.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(s,t):(e&&k("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:s}),yield this.viewToDom(s,t)),n++}i===n&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),n=this._domDocument.createRange();return n.setStart(t.parent,t.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let n=e.offset;return vl(i)&&(n+=bl),{parent:i,offset:n}}{let i,n,s;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;s=i.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!n)return null;i=n.parentNode,s=n.nextSibling}if(Fn(s)&&vl(s))return{parent:s,offset:bl};return{parent:i,offset:n?Jn(n)+1:0}}}domToView(e,t={}){const i=[],n=this._domToView(e,t,i),s=n.next().value;return s?(n.next(),this._processDomInlineNodes(null,i,t),s.is("$text")&&0==s.data.length?null:s):null}*domChildrenToView(e,t={},i=[]){for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n],o=this._domToView(s,t,i),r=o.next().value;null!==r&&(this._isBlockViewElement(r)&&this._processDomInlineNodes(e,i,t),yield r,o.next())}this._processDomInlineNodes(e,i,t)}domSelectionToView(e){if(function(e){if(!l.isGecko)return!1;if(!e.rangeCount)return!1;const t=e.getRangeAt(0).startContainer;try{Object.prototype.toString.call(t)}catch(e){return!0}return!1}(e))return new Ma([]);if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;Fn(t)&&(t=t.parentNode);const i=this.fakeSelectionToView(t);if(i)return i}const t=this.isDomSelectionBackward(e),i=[];for(let t=0;t<e.rangeCount;t++){const n=e.getRangeAt(t),s=this.domRangeToView(n);s&&i.push(s)}return new Ma(i,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),i=this.domPositionToView(e.endContainer,e.endOffset);return t&&i?new Oa(t,i):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,Jn(e));const i=this.mapDomToView(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return Ra._createBefore(i);if(Fn(e)){if(_l(e))return this.domPositionToView(e.parentNode,Jn(e));const i=this.findCorrespondingViewText(e);let n=t;return i?(vl(e)&&(n-=bl,n=n<0?0:n),new Ra(i,n)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new Ra(t,0)}else{const i=e.childNodes[t-1];if(Fn(i)&&_l(i)||i&&this.isBlockFiller(i))return this.domPositionToView(i.parentNode,Jn(i));const n=Fn(i)?this.findCorrespondingViewText(i):this.mapDomToView(i);if(n&&n.parent)return new Ra(n.parent,n.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(_l(e))return null;const t=this.getHostViewElement(e);if(t)return t;const i=e.previousSibling;if(i){if(!this.isElement(i))return null;const e=this.mapDomToView(i);if(e){const t=e.nextSibling;return t instanceof Cr?t:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof Cr?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:i}=Mn.window,n=[];Nl(t,(e=>{const{scrollLeft:t,scrollTop:i}=e;n.push([t,i])})),t.focus(),Nl(t,(e=>{const[t,i]=n.shift();e.scrollLeft=t,e.scrollTop=i})),Mn.window.scrollTo(e,i)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),i=this.domSelectionToView(t);i&&i.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Pl):!("BR"!==e.tagName||!Fl(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(Vl)||function(e,t){const i=e.isEqualNode(Il);return i&&Fl(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=function(e){const t=[];let i=e;for(;i&&i.nodeType!=Node.DOCUMENT_NODE;)t.unshift(i),i=i.parentNode;return t}(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return gl(this._domDocument);case"markedNbsp":return fl(this._domDocument);case"br":return pl(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Fn(e)&&vl(e)&&t<bl)return!1;if(this.isElement(e)&&vl(e.childNodes[t]))return!1;const i=this.mapDomToView(e);return!i||!i.is("uiElement")&&!i.is("rawElement")}*_domToView(e,t,i){if(this.isBlockFiller(e))return null;const n=this.getHostViewElement(e);if(n)return n;if(Yn(e)&&t.skipComments)return null;if(Fn(e)){if(_l(e))return null;{const t=e.data;if(""===t)return null;const n=new Cr(this.document,t);return i.push(n),n}}{let n=this.mapDomToView(e);if(n)return this._isInlineObjectElement(n)&&i.push(n),n;if(this.isDocumentFragment(e))n=new il(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);const s=e.attributes;if(s)for(let e=s.length,t=0;t<e;t++)n._setAttribute(s[t].name,s[t].value);if(this._isViewElementWithRawContent(n,t))return n._setCustomProperty("$rawContent",e.innerHTML),this._isBlockViewElement(n)||i.push(n),n;if(Yn(e))return n._setCustomProperty("$rawContent",e.data),n}yield n;const s=[];if(!1!==t.withChildren)for(const i of this.domChildrenToView(e,t,s))n._appendChild(i);if(this._isInlineObjectElement(n))i.push(n);else for(const e of s)i.push(e)}}_processDomInlineNodes(e,t,i){if(!t.length)return;if(e&&!this.isDocumentFragment(e)&&!this._isBlockDomElement(e))return;let n=!1;for(let e=0;e<t.length;e++){const s=t[e];if(!s.is("$text")){n=!1;continue}let o,r=!1;if(Ml(s,this.preElements))o=yl(s.data);else{o=s.data.replace(/[ \n\t\r]{1,}/g," "),r=/[^\S\u00A0]/.test(o.charAt(o.length-1));const a=e>0?t[e-1]:null,l=e+1<t.length?t[e+1]:null,c=!a||a.is("element")&&"br"==a.name||n,d=!l&&!vl(s.data);!1!==i.withChildren&&(c&&(o=o.replace(/^ /,"")),d&&(o=o.replace(/ $/,""))),o=yl(o),o=o.replace(/ \u00A0/g,"  ");const h=l&&l.is("element")&&"br"!=l.name,u=l&&l.is("$text")&&" "==l.data.charAt(0);(/[ \u00A0]\u00A0$/.test(o)||!l||h||u)&&(o=o.replace(/\u00A0$/," ")),(c||a&&a.is("element")&&"br"!=a.name)&&(o=o.replace(/^\u00A0/," "))}0==o.length&&s.parent?(s._remove(),t.splice(e,1),e--):(s._data=o,n=r)}t.length=0}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const i=this._getTouchingInlineViewNode(e,!1);!(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i))&&i||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingInlineViewNode(e,!0),n=i&&i.is("$textProxy")&&" "==i.data.charAt(0);" "!=t.charAt(t.length-2)&&i&&!n||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_getTouchingInlineViewNode(e,t){const i=new Va({startPosition:t?Ra._createAfter(e):Ra._createBefore(e),direction:t?"forward":"backward"});for(const e of i){if(e.item.is("element","br"))return null;if(this._isInlineObjectElement(e.item))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("$textProxy"))return e.item}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if(Yn(e))return new Qa(this.document,"$comment");const i=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Aa(this.document,i)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const i=this._domDocument.createElement("span");if(i.setAttribute(Ol,e),t){for(;t.firstChild;)i.appendChild(t.firstChild);for(const e of t.getAttributeNames())i.setAttribute(e,t.getAttribute(e))}return i}}function Ml(e,t){return e.getAncestors().some((e=>e.is("element")&&t.includes(e.name)))}function Nl(e,t){let i=e;for(;i;)t(i),i=i.parentElement}function Fl(e,t){const i=e.parentNode;return!!i&&!!i.tagName&&t.includes(i.tagName.toLowerCase())}function Dl(e){"script"===e&&k("domconverter-unsafe-script-element-detected"),"style"===e&&k("domconverter-unsafe-style-element-detected")}class Ll extends(Vn()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}const zl=pa((function(e,t){Vt(t,gi(t),e)}));class Hl{constructor(e,t,i){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,zl(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class $l extends Ll{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Hl(this.view,t,i))}}class Wl extends $l{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return ws(this)}};this.fire(e.type,e,t)}}class jl extends Ll{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=zo((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&i.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new Ma(t.getRanges(),{backward:t.isBackward,fake:!1});e!=ps.arrowleft&&e!=ps.arrowup||i.setTo(i.getFirstPosition()),e!=ps.arrowright&&e!=ps.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}const Ul=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const ql=function(e){return this.__data__.has(e)};function Gl(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new kt;++t<i;)this.add(e[t])}Gl.prototype.add=Gl.prototype.push=Ul,Gl.prototype.has=ql;const Zl=Gl;const Kl=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1};const Jl=function(e,t){return e.has(t)};const Ql=function(e,t,i,n,s,o){var r=1&i,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,m=2&i?new Zl:void 0;for(o.set(e,t),o.set(t,e);++h<a;){var g=e[h],f=t[h];if(n)var p=r?n(f,g,h,t,e,o):n(g,f,h,e,t,o);if(void 0!==p){if(p)continue;u=!1;break}if(m){if(!Kl(t,(function(e,t){if(!Jl(m,t)&&(g===e||s(g,e,i,n,o)))return m.push(t)}))){u=!1;break}}else if(g!==f&&!s(g,f,i,n,o)){u=!1;break}}return o.delete(e),o.delete(t),u};const Yl=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i};const Xl=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i};var ec=re?re.prototype:void 0,tc=ec?ec.valueOf:void 0;const ic=function(e,t,i,n,s,o,r){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Yi(e),new Yi(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Yl;case"[object Set]":var l=1&n;if(a||(a=Xl),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;n|=2,r.set(e,t);var d=Ql(a(e),a(t),n,s,o,r);return r.delete(e),d;case"[object Symbol]":if(tc)return tc.call(e)==tc.call(t)}return!1};var nc=Object.prototype.hasOwnProperty;const sc=function(e,t,i,n,s,o){var r=1&i,a=Ri(e),l=a.length;if(l!=Ri(t).length&&!r)return!1;for(var c=l;c--;){var d=a[c];if(!(r?d in t:nc.call(t,d)))return!1}var h=o.get(e),u=o.get(t);if(h&&u)return h==t&&u==e;var m=!0;o.set(e,t),o.set(t,e);for(var g=r;++c<l;){var f=e[d=a[c]],p=t[d];if(n)var b=r?n(p,f,d,t,e,o):n(f,p,d,e,t,o);if(!(void 0===b?f===p||s(f,p,i,n,o):b)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var w=e.constructor,v=t.constructor;w==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof v&&v instanceof v||(m=!1)}return o.delete(e),o.delete(t),m};var oc="[object Arguments]",rc="[object Array]",ac="[object Object]",lc=Object.prototype.hasOwnProperty;const cc=function(e,t,i,n,s,o){var r=pe(e),a=pe(t),l=r?rc:Ki(e),c=a?rc:Ki(t),d=(l=l==oc?ac:l)==ac,h=(c=c==oc?ac:c)==ac,u=l==c;if(u&&$t(e)){if(!$t(t))return!1;r=!0,d=!1}if(u&&!d)return o||(o=new xt),r||ei(e)?Ql(e,t,i,n,s,o):ic(e,t,l,i,n,s,o);if(!(1&i)){var m=d&&lc.call(e,"__wrapped__"),g=h&&lc.call(t,"__wrapped__");if(m||g){var f=m?e.value():e,p=g?t.value():t;return o||(o=new xt),s(f,p,i,n,o)}}return!!u&&(o||(o=new xt),sc(e,t,i,n,s,o))};const dc=function e(t,i,n,s,o){return t===i||(null==t||null==i||!be(t)&&!be(i)?t!=t&&i!=i:cc(t,i,n,s,e,o))};const hc=function(e,t,i){var n=(i="function"==typeof i?i:void 0)?i(e,t):void 0;return void 0===n?dc(e,t,void 0,i):!!n};class uc extends Ll{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,i=new Set,n=new Set;for(const i of e){const e=t.mapDomToView(i.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==i.type||this._isBogusBrMutation(i)||n.add(e))}for(const s of e){const e=t.mapDomToView(s.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===s.type){const e=t.findCorrespondingViewText(s.target);e&&!n.has(e.parent)?i.add(e):!e&&vl(s.target)&&n.add(t.mapDomToView(s.target.parentNode))}}let s=!1;for(const e of i)s=!0,this.renderer.markToSync("text",e);for(const e of n){const i=t.mapViewToDom(e),n=Array.from(e.getChildren()),o=Array.from(t.domChildrenToView(i,{withChildren:!1}));hc(n,o,mc)||(s=!0,this.renderer.markToSync("children",e))}s&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function mc(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class gc extends $l{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((i,n)=>{const s=t.selection.editableElement;null!==s&&s!==n.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class fc extends Ll{constructor(e){super(e),this.mutationObserver=e.getObserver(uc),this.focusObserver=e.getObserver(gc),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=zo((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=zo((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,i=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",i,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",i,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",i,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,i)=>{this.document.isComposing&&!l.isAndroid||(this._handleSelectionChange(i,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const i=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(i.anchorNode))return;this.mutationObserver.flush();const n=this.domConverter.domSelectionToView(i);if(0!=n.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(n)||!this.domConverter.isDomSelectionCorrect(i))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(n))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:n,domSelection:i};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class pc extends $l{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class bc{constructor(e,t={}){this._files=t.cacheFiles?wc(e):null,this._native=e}get files(){return this._files||(this._files=wc(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,i){this._native.setDragImage(e,t,i)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function wc(e){const t=Array.from(e.files||[]),i=Array.from(e.items||[]);return t.length?t:i.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class vc extends $l{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),i=this.view,n=i.document;let s=null,o=null,r=[];if(e.dataTransfer&&(s=new bc(e.dataTransfer)),null!==e.data?o=e.data:s&&(o=s.getData("text/plain")),n.selection.isFake)r=Array.from(n.selection.getRanges());else if(t.length)r=t.map((e=>{const t=i.domConverter.domPositionToView(e.startContainer,e.startOffset),n=i.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?i.createRange(t,n):n?i.createRange(n):void 0})).filter((e=>!!e));else if(l.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(i.domConverter.domSelectionToView(t).getRanges())}if(l.isAndroid&&"insertCompositionText"==e.inputType&&o&&o.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[i.createRange(r[0].end)]});else if("insertText"==e.inputType&&o&&o.includes("\n")){const t=o.split(/\n{1,2}/g);let i=r;for(let o=0;o<t.length;o++){const r=t[o];""!=r&&(this.fire(e.type,e,{data:r,dataTransfer:s,targetRanges:i,inputType:e.inputType,isComposing:e.isComposing}),i=[n.selection.getFirstRange()]),o+1<t.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:i}),i=[n.selection.getFirstRange()])}}else this.fire(e.type,e,{data:o,dataTransfer:s,targetRanges:r,inputType:e.inputType,isComposing:e.isComposing})}}class _c extends Ll{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&((i=t.keyCode)==ps.arrowright||i==ps.arrowleft||i==ps.arrowup||i==ps.arrowdown)){const i=new Fa(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(i,t),i.stop.called&&e.stop()}var i}))}observe(){}stopObserving(){}}class yc extends Ll{constructor(e){super(e);const t=this.document;t.on("keydown",((e,i)=>{if(!this.isEnabled||i.keyCode!=ps.tab||i.ctrlKey)return;const n=new Fa(t,"tab",t.selection.getFirstRange());t.fire(n,i),n.stop.called&&e.stop()}))}observe(){}stopObserving(){}}const kc=function(e){return kn(e,5)};class Cc extends(G()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new ja(e),this.domConverter=new Bl(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Cl(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new nl(this.document),this.addObserver(uc),this.addObserver(gc),this.addObserver(fc),this.addObserver(Wl),this.addObserver(jl),this.addObserver(pc),this.addObserver(_c),this.addObserver(vc),this.addObserver(yc),this.document.on("arrowKey",kl,{priority:"low"}),Ya(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),l.isiOS&&this.listenTo(this.document,"blur",((e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(e,t="main"){const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:s}of Array.from(e.attributes))n[t]=s,"class"===t?this._writer.addClass(s.split(" "),i):this._writer.setAttribute(t,s,i);this._initialDomRootAttributes.set(e,n);const s=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};s(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),i.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),i.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),i.on("change:isReadOnly",(()=>this.change(s))),i.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:i=20,ancestorOffset:n=20}={}){const s=this.document.selection.getFirstRange();if(!s)return;const o=kc({alignToTop:e,forceScroll:t,viewportOffset:i,ancestorOffset:n});"number"==typeof i&&(i={top:i,bottom:i,left:i,right:i});const r={target:this.domConverter.viewRangeToDom(s),viewportOffset:i,ancestorOffset:n,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",r,o),function({target:e,viewportOffset:t=0,ancestorOffset:i=0,alignToTop:n,forceScroll:s}){const o=hs(e);let r=o,a=null;for(t=function(e){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:e}(t);r;){let l;l=us(r==o?e:a),rs({parent:l,getRect:()=>ms(e,r),alignToTop:n,ancestorOffset:i,forceScroll:s});const c=ms(e,r);if(os({window:r,rect:c,viewportOffset:t,alignToTop:n,forceScroll:s}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}(r)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new y("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){y.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(gc).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Ra._createAt(e,t)}createPositionAfter(e){return Ra._createAfter(e)}createPositionBefore(e){return Ra._createBefore(e)}createRange(e,t){return new Oa(e,t)}createRangeOn(e){return Oa._createOn(e)}createRangeIn(e){return Oa._createIn(e)}createSelection(...e){return new Ma(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class Ac{is(){throw new Error("is() method is abstract")}}class xc extends Ac{constructor(e){super(),this.parent=null,this._attrs=Vs(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new y("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new y("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),n=e.getAncestors(t);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),n=te(t,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]<i[n]}}isAfter(e){return this!=e&&(this.root===e.root&&!this.isBefore(e))}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=Vs(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}xc.prototype.is=function(e){return"node"===e||"model:node"===e};class Tc{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new y("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const i of this._nodes){if(e>=t&&e<t+i.offsetSize)return this.getNodeIndex(i);t+=i.offsetSize}if(t!=e)throw new y("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.length}_insertNodes(e,t){for(const e of t)if(!(e instanceof xc))throw new y("model-nodelist-insertnodes-not-node",this);this._nodes=function(e,t,i,n){if(Math.max(t.length,e.length)>1e4)return e.slice(0,i).concat(t).concat(e.slice(i+n,e.length));{const s=Array.from(e);return s.splice(i,n,...t),s}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class Ec extends xc{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Ec(this.data,this.getAttributes())}static fromJSON(e){return new Ec(e.data,e.attributes)}}Ec.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class Sc extends Ac{constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new y("model-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.offsetSize)throw new y("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Sc.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class Pc extends xc{constructor(e,t,i){super(t),this._children=new Tc,this.name=e,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}findAncestor(e,t={}){let i=t.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new Pc(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Ec(e)];ie(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ec(e):e instanceof Sc?new Ec(e.data,e.getAttributes()):e))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}static fromJSON(e){let t;if(e.children){t=[];for(const i of e.children)i.name?t.push(Pc.fromJSON(i)):t.push(Ec.fromJSON(i))}return new Pc(e.name,e.attributes,t)}}Pc.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class Ic{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new y("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new y("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Rc._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i,n,s;do{n=this.position,s=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this._position=n,this._visitedParent=s)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=Oc(t,i),s=n||Bc(t,i,n);if(s instanceof Pc){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=s;return this._position=t,Vc("elementStart",s,e,t,1)}if(s instanceof Ec){let n;if(this.singleCharacters)n=1;else{let e=s.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),n=e-t.offset}const o=t.offset-s.startOffset,r=new Sc(s,o,n);return t.offset+=n,this._position=t,Vc("text",r,e,t,n)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=i.parent,this.ignoreElementEnd?this._next():Vc("elementEnd",i,e,t)}_previous(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&0===t.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const n=t.parent,s=Oc(t,n),o=s||Mc(t,n,s);if(o instanceof Pc)return t.offset--,this.shallow?(this._position=t,Vc("elementStart",o,e,t,1)):(t.path.push(o.maxOffset),this._position=t,this._visitedParent=o,this.ignoreElementEnd?this._previous():Vc("elementEnd",o,e,t));if(o instanceof Ec){let n;if(this.singleCharacters)n=1;else{let e=o.startOffset;this._boundaryStartParent==i&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),n=t.offset-e}const s=t.offset-o.startOffset,r=new Sc(o,s-n,n);return t.offset-=n,this._position=t,Vc("text",r,e,t,n)}return t.path.pop(),this._position=t,this._visitedParent=i.parent,Vc("elementStart",i,e,t,1)}}function Vc(e,t,i,n,s){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:n,length:s}}}class Rc extends Ac{constructor(e,t,i="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new y("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new y("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChild(e.offsetToIndex(this.path[t])),!e)throw new y("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new y("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Oc(this,this.parent)}get nodeAfter(){const e=this.parent;return Bc(this,e,Oc(this,e))}get nodeBefore(){const e=this.parent;return Mc(this,e,Oc(this,e))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=te(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new Ic(t);return i.skip(e),i.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=te(this.path,e.path),i="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,i)}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let n=0;for(;t[n]==i[n]&&t[n];)n++;return 0===n?null:t[n-1]}getShiftedBy(e){const t=this.clone(),i=t.offset+e;return t.offset=i<0?0:i,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let i=0;i<t;i++){const t=this.path[i]-e.path[i];if(t<-1||t>1)return!1;if(1===t)return Nc(e,this,i);if(-1===t)return Nc(this,e,i)}return this.path.length===e.path.length||(this.path.length>e.path.length?Fc(this.path,t):Fc(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==te(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Rc._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?Rc._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=Rc._createAt(this);if(this.root!=e.root)return i;if("same"==te(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;i.offset-=t}}else if("prefix"==te(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;i.path[n]-=t}}return i}_getTransformedByInsertion(e,t){const i=Rc._createAt(this);if(this.root!=e.root)return i;if("same"==te(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&"toPrevious"!=this.stickiness)&&(i.offset+=t);else if("prefix"==te(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;e.offset<=this.path[n]&&(i.path[n]+=t)}return i}_getTransformedByMove(e,t,i){if(t=t._getTransformedByDeletion(e,i),e.isEqual(t))return Rc._createAt(this);const n=this._getTransformedByDeletion(e,i);return null===n||e.isEqual(this)&&"toNext"==this.stickiness||e.getShiftedBy(i).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(e,t):n._getTransformedByInsertion(t,i)}_getCombined(e,t){const i=e.path.length-1,n=Rc._createAt(t);return n.stickiness=this.stickiness,n.offset=n.offset+this.path[i]-e.offset,n.path=[...n.path,...this.path.slice(i+1)],n}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,i="toNone"){if(e instanceof Rc)return new Rc(e.root,e.path,e.stickiness);{const n=e;if("end"==t)t=n.maxOffset;else{if("before"==t)return this._createBefore(n,i);if("after"==t)return this._createAfter(n,i);if(0!==t&&!t)throw new y("model-createpositionat-offset-required",[this,e])}if(!n.is("element")&&!n.is("documentFragment"))throw new y("model-position-parent-incorrect",[this,e]);const s=n.getPath();return s.push(t),new this(n.root,s,i)}}static _createAfter(e,t){if(!e.parent)throw new y("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new y("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){const i=new Rc(t.graveyard,e.path);return i.stickiness=e.stickiness,i}if(!t.getRoot(e.root))throw new y("model-position-fromjson-no-root",t,{rootName:e.root});return new Rc(t.getRoot(e.root),e.path,e.stickiness)}}function Oc(e,t){const i=t.getChild(t.offsetToIndex(e.offset));return i&&i.is("$text")&&i.startOffset<e.offset?i:null}function Bc(e,t,i){return null!==i?null:t.getChild(t.offsetToIndex(e.offset))}function Mc(e,t,i){return null!==i?null:t.getChild(t.offsetToIndex(e.offset)-1)}function Nc(e,t,i){return i+1!==e.path.length&&(!!Fc(t.path,i+1)&&!!function(e,t){let i=e.parent,n=e.path.length-1,s=0;for(;n>=t;){if(e.path[n]+s!==i.maxOffset)return!1;s=1,n--,i=i.parent}return!0}(e,i+1))}function Fc(e,t){for(;t<e.length;){if(0!==e[t])return!1;t++}return!0}Rc.prototype.is=function(e){return"position"===e||"model:position"===e};class Dc extends Ac{constructor(e,t){super(),this.start=Rc._createAt(e),this.end=t?Rc._createAt(t):Rc._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new Ic({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==te(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const i=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),n=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return i&&n}containsItem(e){const t=Rc._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Dc(this.start,e.start)),this.containsPosition(e.end)&&t.push(new Dc(e.end,this.end))):t.push(new Dc(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,i=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(i=e.end),new Dc(t,i)}return null}getJoined(e,t=!1){let i=this.isIntersecting(e);if(i||(i=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!i)return null;let n=this.start,s=this.end;return e.start.isBefore(n)&&(n=e.start),e.end.isAfter(s)&&(s=e.end),new Dc(n,s)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,i=Rc._createAt(this.start);let n=i.parent;for(;i.path.length>t+1;){const t=n.maxOffset-i.offset;0!==t&&e.push(new Dc(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],n=t-i.offset;0!==n&&e.push(new Dc(i,i.getShiftedBy(n))),i.offset=t,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Ic(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Ic(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Ic(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Dc(this.start,this.end)]}getTransformedByOperations(e){const t=[new Dc(this.start,this.end)];for(const i of e)for(let e=0;e<t.length;e++){const n=t[e].getTransformedByOperation(i);t.splice(e,1,...n),e+=n.length-1}for(let e=0;e<t.length;e++){const i=t[e];for(let n=e+1;n<t.length;n++){const e=t[n];(i.containsRange(e)||e.containsRange(i)||i.isEqual(e))&&t.splice(n,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const i=e.sourcePosition,n=e.howMany,s=e.targetPosition;return this._getTransformedByMove(i,s,n,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let i=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(i=this.end.getShiftedBy(1)),t.root!=i.root&&(i=this.end.getShiftedBy(-1)),new Dc(t,i)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new Dc(this.start);let t=this.start._getTransformedByMergeOperation(e),i=this.end._getTransformedByMergeOperation(e);return t.root!=i.root&&(i=this.end.getShiftedBy(-1)),t.isAfter(i)?(e.sourcePosition.isBefore(e.targetPosition)?(t=Rc._createAt(i),t.offset=0):(e.deletionPosition.isEqual(t)||(i=e.deletionPosition),t=e.targetPosition),new Dc(t,i)):new Dc(t,i)}_getTransformedByInsertion(e,t,i=!1){if(i&&this.containsPosition(e))return[new Dc(this.start,e),new Dc(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const i=new Dc(this.start,this.end);return i.start=i.start._getTransformedByInsertion(e,t),i.end=i.end._getTransformedByInsertion(e,t),[i]}}_getTransformedByMove(e,t,i,n=!1){if(this.isCollapsed){const n=this.start._getTransformedByMove(e,t,i);return[new Dc(n)]}const s=Dc._createFromPositionAndShift(e,i),o=t._getTransformedByDeletion(e,i);if(this.containsPosition(t)&&!n&&(s.containsPosition(this.start)||s.containsPosition(this.end))){const n=this.start._getTransformedByMove(e,t,i),s=this.end._getTransformedByMove(e,t,i);return[new Dc(n,s)]}let r;const a=this.getDifference(s);let l=null;const c=this.getIntersection(s);if(1==a.length?l=new Dc(a[0].start._getTransformedByDeletion(e,i),a[0].end._getTransformedByDeletion(e,i)):2==a.length&&(l=new Dc(this.start,this.end._getTransformedByDeletion(e,i))),r=l?l._getTransformedByInsertion(o,i,null!==c||n):[],c){const e=new Dc(c.start._getCombined(s.start,o),c.end._getCombined(s.start,o));2==r.length?r.splice(1,0,e):r.push(e)}return r}_getTransformedByDeletion(e,t){let i=this.start._getTransformedByDeletion(e,t),n=this.end._getTransformedByDeletion(e,t);return null==i&&null==n?null:(null==i&&(i=e),null==n&&(n=e),new Dc(i,n))}static _createFromPositionAndShift(e,t){const i=e,n=e.getShiftedBy(t);return t>0?new this(i,n):new this(n,i)}static _createIn(e){return new this(Rc._createAt(e,0),Rc._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Rc._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new y("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const i=e.indexOf(t),n=new this(t.start,t.end);if(i>0)for(let t=i-1;e[t].end.isEqual(n.start);t++)n.start=Rc._createAt(e[t].start);for(let t=i+1;t<e.length&&e[t].start.isEqual(n.end);t++)n.end=Rc._createAt(e[t].end);return n}static fromJSON(e,t){return new this(Rc.fromJSON(e.start,t),Rc.fromJSON(e.end,t))}}Dc.prototype.is=function(e){return"range"===e||"model:range"===e};class Lc extends(V()){constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);if(!i)throw new y("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(i),s=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=Rc._createAt(n,s)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const i=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(i)==e&&this._modelToViewMapping.delete(i))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Dc(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Oa(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const i={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e){return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let i=0;i<t;i++)n+=this.getModelLength(e.getChild(i));return n}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name)){return this._viewToModelLengthCallbacks.get(e.name)(e)}if(this._viewToModelMapping.has(e))return 1;if(e.is("$text"))return e.data.length;if(e.is("uiElement"))return 0;{let t=0;for(const i of e.getChildren())t+=this.getModelLength(i);return t}}findPositionIn(e,t){let i,n=0,s=0,o=0;if(e.is("$text"))return new Ra(e,t);for(;s<t;)i=e.getChild(o),n=this.getModelLength(i),s+=n,o++;return s==t?this._moveViewPositionToTextNode(new Ra(e,o)):this.findPositionIn(i,t-(s-n))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,i=e.nodeAfter;return t instanceof Cr?new Ra(t,t.data.length):i instanceof Cr?new Ra(i,0):e}}class zc{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=Hc(t),e instanceof Sc&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Hc(t),e instanceof Sc&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=Hc(t),e instanceof Sc&&(e=this._getSymbolForTextProxy(e));const i=this._consumable.get(e);if(void 0===i)return null;const n=i.get(t);return void 0===n?null:n}revert(e,t){t=Hc(t),e instanceof Sc&&(e=this._getSymbolForTextProxy(e));const i=this.test(e,t);return!1===i?(this._consumable.get(e).set(t,!0),!0):!0!==i&&null}verifyAllConsumed(e){const t=[];for(const[i,n]of this._consumable)for(const[s,o]of n){const n=s.split(":")[0];o&&e==n&&t.push({event:s,item:i.name||i.description})}if(t.length)throw new y("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const i=this._textProxyRegistry.get(e.startOffset);if(i){const n=i.get(e.endOffset);n&&(t=n.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,i=e.endOffset,n=e.parent,s=Symbol("$textProxy:"+e.data);let o,r;return o=this._textProxyRegistry.get(t),o||(o=new Map,this._textProxyRegistry.set(t,o)),r=o.get(i),r||(r=new Map,o.set(i,r)),r.set(n,s),s}}function Hc(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}class $c extends(V()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,i){const n=this._createConversionApi(i,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,n);const s=this._reduceChanges(e.getChanges());for(const e of s)"insert"===e.type?this._convertInsert(Dc._createFromPositionAndShift(e.position,e.length),n):"reinsert"===e.type?this._convertReinsert(Dc._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,n):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);n.mapper.flushDeferredBindings();for(const e of n.mapper.flushUnboundMarkerNames()){const i=t.get(e).getRange();this._convertMarkerRemove(e,i,n),this._convertMarkerAdd(e,i,n)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,n);n.consumable.verifyAllConsumed("insert")}convert(e,t,i,n={}){const s=this._createConversionApi(i,void 0,n);this._convertInsert(e,s);for(const[e,i]of t)this._convertMarkerAdd(e,i,s);s.consumable.verifyAllConsumed("insert")}convertSelection(e,t,i){const n=this._createConversionApi(i);this.fire("cleanSelection",{selection:e},n);const s=e.getFirstPosition().root;if(!n.mapper.toViewElement(s))return;const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(n.consumable,e,o),this.fire("selection",{selection:e},n),e.isCollapsed){for(const t of o)if(n.consumable.test(e,"addMarker:"+t.name)){const i=t.getRange();if(!Wc(e.getFirstPosition(),t,n.mapper))continue;const s={item:e,markerName:t.name,markerRange:i};this.fire(`addMarker:${t.name}`,s,n)}for(const t of e.getAttributeKeys())if(n.consumable.test(e,"attribute:"+t)){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,i,n)}}}_convertInsert(e,t,i={}){i.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const i of Array.from(e.getWalker({shallow:!0})).map(jc))this._testAndFire("insert",i,t)}_convertRemove(e,t,i,n){this.fire(`remove:${i}`,{position:e,length:t},n)}_convertAttribute(e,t,i,n,s){this._addConsumablesForRange(s.consumable,e,`attribute:${t}`);for(const o of e){const e={item:o.item,range:Dc._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${t}`,e,s)}}_convertReinsert(e,t){const i=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,i);for(const e of i.map(jc))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,i){if("$graveyard"==t.root.rootName)return;const n=`addMarker:${e}`;if(i.consumable.add(t,n),this.fire(n,{markerName:e,markerRange:t},i),i.consumable.consume(t,n)){this._addConsumablesForRange(i.consumable,t,n);for(const s of t.getItems()){if(!i.consumable.test(s,n))continue;const o={item:s,range:Dc._createOn(s),markerName:e,markerRange:t};this.fire(n,o,i)}}}_convertMarkerRemove(e,t,i){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},i)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const i of t){const t=i.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i)}}return e}_addConsumablesForRange(e,t,i){for(const n of t.getItems())e.add(n,i);return e}_addConsumablesForSelection(e,t,i){e.add(t,"selection");for(const n of i)e.add(t,"addMarker:"+n.name);for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i);return e}_testAndFire(e,t,i){const n=function(e,t){const i=t.item.is("element")?t.item.name:"$text";return`${e}:${i}`}(e,t),s=t.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(t.item):t.item,o=this._firedEventsMap.get(i),r=o.get(s);if(r){if(r.has(n))return;r.add(n)}else o.set(s,new Set([n]));this.fire(n,t,i)}_testAndFireAddAttributes(e,t){const i={item:e,range:Dc._createOn(e)};for(const e of i.item.getAttributeKeys())i.attributeKey=e,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(e),this._testAndFire(`attribute:${e}`,i,t)}_createConversionApi(e,t=new Set,i={}){const n={...this._conversionApi,consumable:new zc,writer:e,options:i,convertItem:e=>this._convertInsert(Dc._createOn(e),n),convertChildren:e=>this._convertInsert(Dc._createIn(e),n,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,n),canReuseView:e=>!t.has(n.mapper.toModelElement(e))};return this._firedEventsMap.set(n,new Map),n}}function Wc(e,t,i){const n=t.getRange(),s=Array.from(e.getAncestors());s.shift(),s.reverse();return!s.some((e=>{if(n.containsItem(e)){return!!i.toViewElement(e).getCustomProperty("addHighlight")}}))}function jc(e){return{item:e.item,range:Dc._createFromPositionAndShift(e.previousPosition,e.length)}}class Uc extends(V(Ac)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const n of e._ranges)if(t.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Dc(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new Dc(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new Dc(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,i,n]=e;if("object"==typeof i&&(n=i,i=void 0),null===t)this._setRanges([]);else if(t instanceof Uc)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Dc)this._setRanges([t],!!n&&!!n.backward);else if(t instanceof Rc)this._setRanges([new Dc(t)]);else if(t instanceof xc){const e=!!n&&!!n.backward;let s;if("in"==i)s=Dc._createIn(t);else if("on"==i)s=Dc._createOn(t);else{if(void 0===i)throw new y("model-selection-setto-required-second-parameter",[this,t]);s=new Dc(Rc._createAt(t,i))}this._setRanges([s],e)}else{if(!ie(t))throw new y("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,n&&!!n.backward)}}_setRanges(e,t=!1){const i=Array.from(e),n=i.some((t=>{if(!(t instanceof Dc))throw new y("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(i.length!==this._ranges.length||n)&&(this._replaceAllRanges(i),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new y("model-selection-setfocus-no-ranges",[this,e]);const i=Rc._createAt(e,t);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(n)?(this._pushRange(new Dc(i,n)),this._lastRangeBackward=!0):(this._pushRange(new Dc(n,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Zc(t.start,e);Jc(i,t)&&(yield i);for(const i of t.getWalker()){const n=i.item;"elementEnd"==i.type&&Gc(n,e,t)&&(yield n)}const n=Zc(t.end,e);Qc(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=Rc._createAt(e,0),i=Rc._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Dc(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new y("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function qc(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Gc(e,t,i){return qc(e,t)&&Kc(e,i)}function Zc(e,t){const i=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let s=!1;const o=n.find((e=>!s&&(s=i.isLimit(e),!s&&qc(e,t))));return n.forEach((e=>t.add(e))),o}function Kc(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);if(!i)return!0;return!t.containsRange(Dc._createOn(i),!0)}function Jc(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(Rc._createAt(e,e.maxOffset))&&Kc(e,t))}function Qc(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(Rc._createAt(e,0))&&Kc(e,t))}Uc.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Yc extends(V(Dc)){constructor(e,t){super(e,t),Xc.call(this)}detach(){this.stopListening()}toRange(){return new Dc(this.start,this.end)}static fromRange(e){return new Yc(e.start,e.end)}}function Xc(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&ed.call(this,i)}),{priority:"low"})}function ed(e){const t=this.getTransformedByOperation(e),i=Dc._createFromRanges(t),n=!i.isEqual(this),s=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let o=null;if(n){"$graveyard"==i.root.rootName&&(o="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:o})}else s&&this.fire("change:content",this.toRange(),{deletionPosition:o})}Yc.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const td="selection:";class id extends(V(Ac)){constructor(e){super(),this._selection=new nd(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return td+e}static _isStoreAttributeKey(e){return e.startsWith(td)}}id.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class nd extends Uc{constructor(e){super(),this.markers=new Es({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,i,n)=>{this._updateMarker(t,n)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const i=e.document.differ;for(const n of i.getChanges()){if("insert"!=n.type)continue;const i=n.position.parent;n.length===i.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(i.getAttributeKeys()).filter((e=>e.startsWith(td)));for(const n of t)e.removeAttribute(n,i)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=b();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new y("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new y("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=Yc.fromRange(e);return t.on("change:range",((e,i,n)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const i=t.name.split(":",1)[0];if(!this._observedMarkers.has(i))continue;const n=t.getRange();for(const i of this.getRanges())n.containsRange(i,!i.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(e,t){const i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let n=!1;const s=Array.from(this.markers),o=this.markers.has(e);if(t){let i=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){i=!0;break}i&&!o?(this.markers.add(e),n=!0):!i&&o&&(this.markers.remove(e),n=!0)}else o&&(this.markers.remove(e),n=!0);n&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateAttributes(e){const t=Vs(this._getSurroundingAttributes()),i=Vs(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||n.push(e);for(const[e]of i)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,i=!0){const n=i?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const i=t?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,i),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,n]of e){this._setAttribute(i,n,!1)&&t.add(i)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(td)){const i=t.substr(10);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let i=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,s=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=sd(n,t)),i||(i=sd(s,t)),!this.isGravityOverridden&&!i){let e=n;for(;e&&!i;)e=e.previousSibling,i=sd(e,t)}if(!i){let e=s;for(;e&&!i;)e=e.nextSibling,i=sd(e,t)}i||(i=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item)){i=sd(n.item,t);break}if("text"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function sd(e,t){if(!e)return null;if(e instanceof Sc||e instanceof Ec)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const i=[];for(const[n,s]of e.getAttributes())t.checkAttribute("$text",n)&&!1!==t.getAttributeProperties(n).copyFromObject&&i.push([n,s]);return i}class od{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class rd extends od{elementToElement(e){return this.add(function(e){const t=cd(e.model),i=dd(e.view,"container");t.attributes.length&&(t.children=!0);return n=>{n.on(`insert:${t.name}`,function(e,t=wd){return(i,n,s)=>{if(!t(n.item,s.consumable,{preflight:!0}))return;const o=e(n.item,s,n);if(!o)return;t(n.item,s.consumable);const r=s.mapper.toViewPosition(n.range.start);s.mapper.bindElements(n.item,o),s.writer.insert(r,o),s.convertAttributes(n.item),pd(o,n.item.getChildren(),s,{reconversion:n.reconversion})}}(i,fd(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&n.on("reduceChanges",gd(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=cd(e.model),i=dd(e.view,"container");return t.children=!0,n=>{if(n._conversionApi.schema.checkChild(t.name,"$text"))throw new y("conversion-element-to-structure-disallowed-text",n,{elementName:t.name});var s,o;n.on(`insert:${t.name}`,(s=i,o=fd(t),(e,t,i)=>{if(!o(t.item,i.consumable,{preflight:!0}))return;const n=new Map;i.writer._registerSlotFactory(function(e,t,i){return(n,s)=>{const o=n.createContainerElement("$slot");let r=null;if("children"===s)r=Array.from(e.getChildren());else{if("function"!=typeof s)throw new y("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:s});r=Array.from(e.getChildren()).filter((e=>s(e)))}return t.set(o,r),o}}(t.item,n,i));const r=s(t.item,i,t);if(i.writer._clearSlotFactory(),!r)return;!function(e,t,i){const n=Array.from(t.values()).flat(),s=new Set(n);if(s.size!=n.length)throw new y("conversion-slot-filter-overlap",i.dispatcher,{element:e});if(s.size!=e.childCount)throw new y("conversion-slot-filter-incomplete",i.dispatcher,{element:e})}(t.item,n,i),o(t.item,i.consumable);const a=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,r),i.writer.insert(a,r),i.convertAttributes(t.item),function(e,t,i,n){i.mapper.on("modelToViewPosition",r,{priority:"highest"});let s=null,o=null;for([s,o]of t)pd(e,o,i,n),i.writer.move(i.writer.createRangeIn(s),i.writer.createPositionBefore(s)),i.writer.remove(s);function r(e,t){const i=t.modelPosition.nodeAfter,n=o.indexOf(i);n<0||(t.viewPosition=t.mapper.findPositionIn(s,n))}i.mapper.off("modelToViewPosition",r)}(r,n,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),n.on("reduceChanges",gd(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=kc(e);let t=e.model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;t.name&&(i+=":"+t.name);if(t.values)for(const i of t.values)e.view[i]=dd(e.view[i],"attribute");else e.view=dd(e.view,"attribute");const n=hd(e);return t=>{t.on(i,function(e){return(t,i,n)=>{if(!n.consumable.test(i.item,t.name))return;const s=e(i.attributeOldValue,n,i),o=e(i.attributeNewValue,n,i);if(!s&&!o)return;n.consumable.consume(i.item,t.name);const r=n.writer,a=r.document.selection;if(i.item instanceof Uc||i.item instanceof id)r.wrap(a.getFirstRange(),o);else{let e=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&s&&(e=r.unwrap(e,s)),null!==i.attributeNewValue&&o&&r.wrap(e,o)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=kc(e);let t=e.model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;t.name&&(i+=":"+t.name);if(t.values)for(const i of t.values)e.view[i]=ud(e.view[i]);else e.view=ud(e.view);const n=hd(e);return t=>{var s;t.on(i,(s=n,(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const n=s(t.attributeOldValue,i,t),o=s(t.attributeNewValue,i,t);if(!n&&!o)return;i.consumable.consume(t.item,e.name);const r=i.mapper.toViewElement(t.item),a=i.writer;if(!r)throw new y("conversion-attribute-to-attribute-on-text",i.dispatcher,t);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e="string"==typeof n.value?n.value.split(/\s+/):n.value;for(const t of e)a.removeClass(t,r)}else if("style"==n.key)if("string"==typeof n.value){const e=new _a(a.document.stylesProcessor);e.setTo(n.value);for(const[t]of e.getStylesEntries())a.removeStyle(t,r)}else{const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,r)}else a.removeAttribute(n.key,r);if(null!==t.attributeNewValue&&o)if("class"==o.key){const e="string"==typeof o.value?o.value.split(/\s+/):o.value;for(const t of e)a.addClass(t,r)}else if("style"==o.key)if("string"==typeof o.value){const e=new _a(a.document.stylesProcessor);e.setTo(o.value);for(const[t,i]of e.getStylesEntries())a.setStyle(t,i,r)}else{const e=Object.keys(o.value);for(const t of e)a.setStyle(t,o.value[t],r)}else a.setAttribute(o.key,o.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=dd(e.view,"ui");return i=>{var n;i.on(`addMarker:${e.model}`,(n=t,(e,t,i)=>{t.isOpening=!0;const s=n(t,i);t.isOpening=!1;const o=n(t,i);if(!s||!o)return;const r=t.markerRange;if(r.isCollapsed&&!i.consumable.consume(r,e.name))return;for(const t of r)if(!i.consumable.consume(t.item,e.name))return;const a=i.mapper,l=i.writer;l.insert(a.toViewPosition(r.start),s),i.mapper.bindElementToMarker(s,t.markerName),r.isCollapsed||(l.insert(a.toViewPosition(r.end),o),i.mapper.bindElementToMarker(o,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${e.model}`,((e,t,i)=>{const n=i.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on(`addMarker:${e.model}`,(i=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof Uc||t.item instanceof id||t.item.is("$textProxy")))return;const s=md(i,t,n);if(!s)return;if(!n.consumable.consume(t.item,e.name))return;const o=n.writer,r=ad(o,s),a=o.document.selection;if(t.item instanceof Uc||t.item instanceof id)o.wrap(a.getFirstRange(),r);else{const e=n.mapper.toViewRange(t.range),i=o.wrap(e,r);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,i,n)=>{if(!i.item)return;if(!(i.item instanceof Pc))return;const s=md(e,i,n);if(!s)return;if(!n.consumable.test(i.item,t.name))return;const o=n.mapper.toViewElement(i.item);if(o&&o.getCustomProperty("addHighlight")){n.consumable.consume(i.item,t.name);for(const e of Dc._createIn(i.item))n.consumable.consume(e.item,t.name);o.getCustomProperty("addHighlight")(o,s,n.writer),n.mapper.bindElementToMarker(o,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,i,n)=>{if(i.markerRange.isCollapsed)return;const s=md(e,i,n);if(!s)return;const o=ad(n.writer,s),r=n.mapper.markerNameToElements(i.markerName);if(r){for(const e of r)if(n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement"))n.writer.unwrap(n.writer.createRangeOn(e),o);else{e.getCustomProperty("removeHighlight")(e,s.id,n.writer)}n.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=kc(e);const t=e.model;let i=e.view;i||(i=i=>({group:t,name:i.substr(e.model.length+1)}));return n=>{var s;n.on(`addMarker:${t}`,(s=i,(e,t,i)=>{const n=s(t.markerName,i);if(!n)return;const o=t.markerRange;i.consumable.consume(o,e.name)&&(ld(o,!1,i,t,n),ld(o,!0,i,t,n),e.stop())}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${t}`,function(e){return(t,i,n)=>{const s=e(i.markerName,n);if(!s)return;const o=n.mapper.markerNameToElements(i.markerName);if(o){for(const e of o)n.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(r(`data-${s.group}-start-before`,e),r(`data-${s.group}-start-after`,e),r(`data-${s.group}-end-before`,e),r(`data-${s.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(i.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(s.name),0==i.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(i),{priority:e.converterPriority||"normal"})}}(e))}}function ad(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),"number"==typeof t.priority&&(i._priority=t.priority),i._id=t.id,i}function ld(e,t,i,n,s){const o=t?e.start:e.end,r=o.nodeAfter&&o.nodeAfter.is("element")?o.nodeAfter:null,a=o.nodeBefore&&o.nodeBefore.is("element")?o.nodeBefore:null;if(r||a){let e,o;t&&r||!t&&!a?(e=r,o=!0):(e=a,o=!1);const l=i.mapper.toViewElement(e);if(l)return void function(e,t,i,n,s,o){const r=`data-${o.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(o.name),n.writer.setAttribute(r,a.join(","),e),n.mapper.bindElementToMarker(e,s.markerName)}(l,t,o,i,n,s)}!function(e,t,i,n,s){const o=`${s.group}-${t?"start":"end"}`,r=s.name?{name:s.name}:null,a=i.writer.createUIElement(o,r);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,n.markerName)}(i.mapper.toViewPosition(o),t,i,n,s)}function cd(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?ks(e.attributes):[],children:!!e.children}}function dd(e,t){return"function"==typeof e?e:(i,n)=>function(e,t,i){"string"==typeof e&&(e={name:e});let n;const s=t.writer,o=Object.assign({},e.attributes);if("container"==i)n=s.createContainerElement(e.name,o);else if("attribute"==i){const t={priority:e.priority||qa.DEFAULT_PRIORITY};n=s.createAttributeElement(e.name,o,t)}else n=s.createUIElement(e.name,o);if(e.styles){const t=Object.keys(e.styles);for(const i of t)s.setStyle(i,e.styles[i],n)}if(e.classes){const t=e.classes;if("string"==typeof t)s.addClass(t,n);else for(const e of t)s.addClass(e,n)}return n}(e,n,t)}function hd(e){return e.model.values?(t,i,n)=>{const s=e.view[t];return s?s(t,i,n):null}:e.view}function ud(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function md(e,t,i){const n="function"==typeof e?e(t,i):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function gd(e){const t=function(e){return(t,i)=>{if(!t.is("element",e.name))return!1;if("attribute"==i.type){if(e.attributes.includes(i.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,i)=>{const n=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const e of i.changes){const s="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(s&&t(s,e)){if(!i.reconvertedElements.has(s)){i.reconvertedElements.add(s);const e=Rc._createBefore(s);let t=n.length;for(let i=n.length-1;i>=0;i--){const s=n[i],o=("attribute"==s.type?s.range.start:s.position).compareWith(e);if("before"==o||"remove"==s.type&&"same"==o)break;t=i}n.splice(t,0,{type:"remove",name:s.name,position:e,length:1},{type:"reinsert",name:s.name,position:e,length:1})}}else n.push(e)}i.changes=n}}function fd(e){return(t,i,n={})=>{const s=["insert"];for(const i of e.attributes)t.hasAttribute(i)&&s.push(`attribute:${i}`);return!!s.every((e=>i.test(t,e)))&&(n.preflight||s.forEach((e=>i.consume(t,e))),!0)}}function pd(e,t,i,n){for(const s of t)bd(e.root,s,i,n)||i.convertItem(s)}function bd(e,t,i,n){const{writer:s,mapper:o}=i;if(!n.reconversion)return!1;const r=o.toViewElement(t);return!(!r||r.root==e)&&(!!i.canReuseView(r)&&(s.move(s.createRangeOn(r),o.toViewPosition(Rc._createBefore(t))),!0))}function wd(e,t,{preflight:i}={}){return i?t.test(e,"insert"):t.consume(e,"insert")}function vd(e){const{schema:t,document:i}=e.model;for(const n of i.getRoots())if(n.isEmpty&&!t.checkChild(n,"$text")&&t.checkChild(n,"paragraph"))return e.insertElement("paragraph",n),!0;return!1}function _d(e,t,i){const n=i.createContext(e);return!!i.checkChild(n,"paragraph")&&!!i.checkChild(n.push("paragraph"),t)}function yd(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class kd extends od{elementToElement(e){return this.add(Cd(e))}elementToAttribute(e){return this.add(function(e){e=kc(e),Td(e);const t=Ed(e,!1),i=Ad(e.view),n=i?`element:${i}`:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=kc(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key,i=void 0===e.view.value?/[\s\S]*/:e.view.value;let n;if("class"==t||"style"==t){n={["class"==t?"classes":"styles"]:i}}else n={attributes:{[t]:i}};e.view.name&&(n.name=e.view.name);return e.view=n,t}(e));Td(e,t);const i=Ed(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,i)=>{const n="string"==typeof e?e:e(t,i);return i.writer.createElement("$marker",{"data-name":n})}}(e.model);return Cd({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=kc(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},i=xd(Sd(t,"start")),n=xd(Sd(t,"end"));return s=>{s.on(`element:${e.view}-start`,i,{priority:e.converterPriority||"normal"}),s.on(`element:${e.view}-end`,n,{priority:e.converterPriority||"normal"});const o=w.low,r=w.highest,a=w.get(e.converterPriority)/r;s.on("element",function(e){return(t,i,n)=>{const s=`data-${e.view}`;function o(t,s){for(const o of s){const s=e.model(o,n),r=n.writer.createElement("$marker",{"data-name":s});n.writer.insert(r,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}(n.consumable.test(i.viewItem,{attributes:s+"-end-after"})||n.consumable.test(i.viewItem,{attributes:s+"-start-after"})||n.consumable.test(i.viewItem,{attributes:s+"-end-before"})||n.consumable.test(i.viewItem,{attributes:s+"-start-before"}))&&(i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor)),n.consumable.consume(i.viewItem,{attributes:s+"-end-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(s+"-end-after").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-start-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(s+"-start-after").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-end-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(s+"-end-before").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-start-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(s+"-start-before").split(",")))}}(t),{priority:o+a})}}(e))}}function Cd(e){const t=xd(e=kc(e)),i=Ad(e.view),n=i?`element:${i}`:"element";return i=>{i.on(n,t,{priority:e.converterPriority||"normal"})}}function Ad(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function xd(e){const t=new xr(e.view);return(i,n,s)=>{const o=t.match(n.viewItem);if(!o)return;const r=o.match;if(r.name=!0,!s.consumable.test(n.viewItem,r))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,n.viewItem,s);a&&s.safeInsert(a,n.modelCursor)&&(s.consumable.consume(n.viewItem,r),s.convertChildren(n.viewItem,a),s.updateConversionResult(a,n))}}function Td(e,t=null){const i=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,s="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:n,value:s}}function Ed(e,t){const i=new xr(e.view);return(n,s,o)=>{if(!s.modelRange&&t)return;const r=i.match(s.viewItem);if(!r)return;if(!function(e,t){const i="function"==typeof e?e(t):e;if("object"==typeof i&&!Ad(i))return!1;return!i.classes&&!i.attributes&&!i.styles}(e.view,s.viewItem)?delete r.match.name:r.match.name=!0,!o.consumable.test(s.viewItem,r.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(s.viewItem,o):e.model.value;if(null===l)return;s.modelRange||Object.assign(s,o.convertChildren(s.viewItem,s.modelCursor));const c=function(e,t,i,n){let s=!1;for(const o of Array.from(e.getItems({shallow:i})))n.schema.checkAttribute(o,t.key)&&(s=!0,o.hasAttribute(t.key)||n.writer.setAttribute(t.key,t.value,o));return s}(s.modelRange,{key:a,value:l},t,o);c&&(o.consumable.test(s.viewItem,{name:!0})&&(r.match.name=!0),o.consumable.consume(s.viewItem,r.match))}}function Sd(e,t){return{view:`${e.view}-${t}`,model:(t,i)=>{const n=t.getAttribute("name"),s=e.model(n,i);return i.writer.createElement("$marker",{"data-name":s})}}}function Pd(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.selection,n=t.schema,s=[];let o=!1;for(const e of i.getRanges()){const t=Id(e,n);t&&!t.isEqual(e)?(s.push(t),o=!0):s.push(e)}o&&e.setSelection(function(e){const t=[...e],i=new Set;let n=1;for(;n<t.length;){const e=t[n],s=t.slice(0,n);for(const[o,r]of s.entries())if(!i.has(o))if(e.isEqual(r))i.add(o);else if(e.isIntersecting(r)){i.add(o),i.add(n);const s=e.getJoined(r);t.push(s)}n++}return t.filter(((e,t)=>!i.has(t)))}(s),{backward:i.isBackward});return!1}(t,e)))}function Id(e,t){return e.isCollapsed?function(e,t){const i=e.start,n=t.getNearestSelectionRange(i);if(!n){const e=i.getAncestors().reverse().find((e=>t.isObject(e)));return e?Dc._createOn(e):null}if(!n.isCollapsed)return n;const s=n.start;if(i.isEqual(s))return null;return new Dc(s)}(e,t):function(e,t){const{start:i,end:n}=e,s=t.checkChild(i,"$text"),o=t.checkChild(n,"$text"),r=t.getLimitElement(i),a=t.getLimitElement(n);if(r===a){if(s&&o)return null;if(function(e,t,i){const n=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),s=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return n||s}(i,n,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),s=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),o=e?e.start:i,r=s?s.end:n;return new Dc(o,r)}}const l=r&&!r.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,s=l&&(!e||!Rd(i.nodeAfter,t)),o=c&&(!e||!Rd(n.nodeBefore,t));let d=i,h=n;return s&&(d=Rc._createBefore(Vd(r,t))),o&&(h=Rc._createAfter(Vd(a,t))),new Dc(d,h)}return null}(e,t)}function Vd(e,t){let i=e,n=i;for(;t.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function Rd(e,t){return e&&t.isSelectable(e)}class Od extends(G()){constructor(e,t){super(),this.model=e,this.view=new Cc(t),this.mapper=new Lc,this.downcastDispatcher=new $c({mapper:this.mapper,schema:e.schema});const i=this.model.document,n=i.selection,s=this.model.markers;var o,r,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(i,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(i.differ,s,e),this.downcastDispatcher.convertSelection(n,s,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,n)=>{const s=n.newSelection,o=[];for(const e of s.getRanges())o.push(t.toModelRange(e));const r=e.createSelection(o,{backward:s.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(o=this.mapper,r=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||l.isAndroid)for(let e=0;e<t.targetRanges.length;e++){const i=t.targetRanges[e],n=o.toModelRange(i),s=Id(n,r);s&&!s.isEqual(n)&&(t.targetRanges[e]=o.toViewRange(s))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,s=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(s,o)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,i)=>{const n=i.mapper.toViewPosition(t.position),s=t.position.getShiftedBy(t.length),o=i.mapper.toViewPosition(s,{isPhantom:!0}),r=i.writer.createRange(n,o),a=i.writer.remove(r.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((e,t,i)=>{const n=i.writer,s=n.document.selection;for(const e of s.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);n.setSelection(null)})),this.downcastDispatcher.on("selection",((e,t,i)=>{const n=t.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const s=[];for(const e of n.getRanges())s.push(i.mapper.toViewRange(e));i.writer.setSelection(s,{backward:n.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const n=t.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const s=i.writer,o=n.getFirstPosition(),r=i.mapper.toViewPosition(o),a=s.breakAttributes(r);s.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Ia(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,i=this.model.markers.get(t);if(!i)throw new y("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(i)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class Bd{constructor(){this._consumables=new Map}add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new Nd(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const s=e.getStyleNames();for(const e of s)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Bd),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Bd.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=Bd.createFrom(i,t);return t}}const Md=["attributes","classes","styles"];class Nd{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Md)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Md)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Md)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Md)t in e&&this._revert(t,e[t])}_add(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new y("viewconsumable-invalid-attribute",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=pe(t)?t:[t],n=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Fd extends(G()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Dd(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Dd(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new y("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new y("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const i=this.getDefinition(e.last);return!!i&&i.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Rc){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof Pc))throw new y("schema-check-merge-no-element-before",this);if(!(i instanceof Pc))throw new y("schema-check-merge-no-element-after",this);return this.checkMerge(t,i)}for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[i,n])=>{if(!n)return;const s=e(i,n);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[i,n])=>{const s=e(i,n);"boolean"==typeof s&&(t.stop(),t.return=s)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof Rc)t=e.parent;else{t=(e instanceof Dc?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new Ec("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e,t="both"){if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new Dc(e);let i,n;const s=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(i=new Ic({boundaries:Dc._createIn(s),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new Ic({boundaries:Dc._createIn(s),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(i,n)){const t=e.walker==i?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return Dc._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new Dc(n.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(e,t,i){const n=i.model;for(const[s,o]of Object.entries(t))n.schema.checkAttribute(e,s)&&i.setAttribute(s,o,e)}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))Qd(this,i,t);else{const e=Dc._createIn(i).getPositions();for(const i of e){Qd(this,i.nodeBefore||i.parent,t)}}}getAttributesWithProperty(e,t,i){const n={};for(const[s,o]of e.getAttributes()){const e=this.getAttributeProperties(s);void 0!==e[t]&&(void 0!==i&&i!==e[t]||(n[s]=o))}return n}createContext(e){return new Dd(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const n of i)e[n]=Ld(t[n],n);for(const t of i)zd(e,t);for(const t of i)Hd(e,t);for(const t of i)$d(e,t);for(const t of i)Wd(e,t),jd(e,t);for(const t of i)Ud(e,t),qd(e,t),Gd(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,i=t.length-1){const n=t.getItem(i);if(e.allowIn.includes(n.name)){if(0==i)return!0;{const e=this.getDefinition(n);return this._checkContextMatch(e,t,i-1)}}return!1}*_getValidRangesForRange(e,t){let i=e.start,n=e.start;for(const s of e.getItems({shallow:!0}))s.is("element")&&(yield*this._getValidRangesForRange(Dc._createIn(s),t)),this.checkAttribute(s,t)||(i.isEqual(n)||(yield new Dc(i,n)),i=Rc._createAfter(s)),n=Rc._createAfter(s);i.isEqual(n)||(yield new Dc(i,n))}findOptimalInsertionRange(e,t){const i=e.getSelectedElement();if(i&&this.isObject(i)&&!this.isInline(i))return"before"==t||"after"==t?new Dc(Rc._createAt(i,t)):Dc._createOn(i);const n=Ss(e.getSelectedBlocks());if(!n)return new Dc(e.focus);if(n.isEmpty)return new Dc(Rc._createAt(n,0));const s=Rc._createAfter(n);return e.focus.isTouching(s)?new Dc(s):new Dc(Rc._createBefore(n))}}class Dd{constructor(e){if(e instanceof Dd)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Jd)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Dd([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Ld(e,t){const i={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const i of e){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const n of e)t[n]=!!i[n]}}(e,i),Zd(e,i,"allowIn"),Zd(e,i,"allowContentOf"),Zd(e,i,"allowWhere"),Zd(e,i,"allowAttributes"),Zd(e,i,"allowAttributesOf"),Zd(e,i,"allowChildren"),Zd(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,i),i}function zd(e,t){const i=e[t];for(const n of i.allowChildren){const i=e[n];i&&i.allowIn.push(t)}i.allowChildren.length=0}function Hd(e,t){for(const i of e[t].allowContentOf)if(e[i]){Kd(e,i).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function $d(e,t){for(const i of e[t].allowWhere){const n=e[i];if(n){const i=n.allowIn;e[t].allowIn.push(...i)}}delete e[t].allowWhere}function Wd(e,t){for(const i of e[t].allowAttributesOf){const n=e[i];if(n){const i=n.allowAttributes;e[t].allowAttributes.push(...i)}}delete e[t].allowAttributesOf}function jd(e,t){const i=e[t];for(const t of i.inheritTypesFrom){const n=e[t];if(n){const e=Object.keys(n).filter((e=>e.startsWith("is")));for(const t of e)t in i||(i[t]=n[t])}}delete i.inheritTypesFrom}function Ud(e,t){const i=e[t],n=i.allowIn.filter((t=>e[t]));i.allowIn=Array.from(new Set(n))}function qd(e,t){const i=e[t];for(const n of i.allowIn){e[n].allowChildren.push(t)}}function Gd(e,t){const i=e[t];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function Zd(e,t,i){for(const n of e){const e=n[i];"string"==typeof e?t[i].push(e):Array.isArray(e)&&t[i].push(...e)}}function Kd(e,t){const i=e[t];return(n=e,Object.keys(n).map((e=>n[e]))).filter((e=>e.allowIn.includes(i.name)));var n}function Jd(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Qd(e,t,i){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||i.removeAttribute(n,t)}class Yd extends(V()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const n of new Dd(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const s=t.createElement(n.name,e);i&&t.insert(s,i),i=Rc._createAt(s,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=Bd.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),s=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,s);s.markers=function(e,t){const i=new Set,n=new Map,s=Dc._createIn(e).getItems();for(const e of s)e.is("element","$marker")&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),s=t.createPositionBefore(e);n.has(i)?n.get(i).end=s.clone():n.set(i,new Dc(s.clone())),t.remove(e)}return n}(s,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,s}_convertItem(e,t){const i={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof Dc))throw new y("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:Rc._createAt(t,0);const n=new Dc(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof Dc&&(n.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:n,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(i[i.length-1])));const s=this._cursorParents.get(e);t.modelCursor=s?n.createPositionAt(s,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:n}=this.conversionApi;let s=i.findAllowedParent(t,e);if(s){if(s===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(s)&&(s=null)}if(!s)return _d(t,e,i)?{position:yd(t,n)}:null;const o=this.conversionApi.writer.split(t,s),r=[];for(const e of o.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),i=e.item;this._registerSplitPair(t,i)}const a=o.range.end.parent;return this._cursorParents.set(e,a),{position:o.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class Xd{getHtml(e){const t=Mn.document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class eh{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new Bl(e,{renderingMode:"data"}),this.htmlWriter=new Xd}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}class th extends(V()){constructor(e,t){super(),this.model=e,this.mapper=new Lc,this.downcastDispatcher=new $c({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,s=i.mapper.toViewPosition(t.range.start),o=n.createText(t.item.data);n.insert(s,o)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Yd({schema:e.schema}),this.viewDocument=new ja(t),this.stylesProcessor=t,this.htmlProcessor=new eh(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new nl(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:i,consumable:n,writer:s})=>{let o=t.modelCursor;if(!n.test(t.viewItem))return;if(!i.checkChild(o,"$text")){if(!_d(o,"$text",i))return;if(0==t.viewItem.data.trim().length)return;const e=o.nodeBefore;o=yd(o,s),e&&e.is("element","$marker")&&(s.move(s.createRangeOn(e),o),o=s.createPositionAfter(e))}n.consume(t.viewItem);const r=s.createText(t.viewItem.data);s.insert(r,o),t.modelRange=s.createRange(o,o.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),G().prototype.decorate.call(this,"init"),G().prototype.decorate.call(this,"set"),G().prototype.decorate.call(this,"get"),G().prototype.decorate.call(this,"toView"),G().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},vd)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new y("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(t);return n.isAttached()||k("datacontroller-get-detached-root",this),"empty"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t={}){const i=this.toView(e,t);return this.processor.toData(i)}toView(e,t={}){const i=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const s=Dc._createIn(e),o=new il(i);this.mapper.bindElements(e,o);const r=e.is("documentFragment")?e.markers:function(e){const t=[],i=e.root.document;if(!i)return new Map;const n=Dc._createIn(e);for(const e of i.model.markers){const i=e.getRange(),s=i.isCollapsed,o=i.start.isEqual(n.start)||i.end.isEqual(n.end);if(s&&o)t.push([e.name,i]);else{const s=n.getIntersection(i);s&&t.push([e.name,s])}}return t.sort((([e,t],[i,n])=>{if("after"!==t.end.compareWith(n.start))return 1;if("before"!==t.start.compareWith(n.end))return-1;switch(t.start.compareWith(n.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(n.end)){case"before":return 1;case"after":return-1;default:return i.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(s,r,n,t),o}init(e){if(this.model.document.version)throw new y("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new y("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const i of Object.keys(t)){const n=this.model.document.getRoot(i);e.insert(this.parse(t[i],n),n,0)}})),Promise.resolve()}set(e,t={}){let i={};if("string"==typeof e?i.main=e:i=e,!this._checkIfRootsExists(Object.keys(i)))throw new y("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(i)){const n=this.model.document.getRoot(t);e.remove(e.createRangeIn(n)),e.insert(this.parse(i[t],n),n,0)}}))}parse(e,t="$root"){const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e,t="$root"){return this.model.change((i=>this.upcastDispatcher.convert(e,i,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class ih{constructor(e,t){this._helpers=new Map,this._downcast=ks(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=ks(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new y("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new y("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of nh(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of nh(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of nh(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:i}){if(this._helpers.has(e))throw new y("conversion-group-exists",this);const n=i?new rd(t):new kd(t);this._helpers.set(e,n)}}function*nh(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},n=e.view[t],s=e.upcastAlso?e.upcastAlso[t]:void 0;yield*sh(i,n,s)}else yield*sh(e.model,e.view,e.upcastAlso)}function*sh(e,t,i){if(yield{model:e,view:t},i)for(const t of ks(i))yield{model:e,view:t}}class oh{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function rh(e,t){const i=ch(t),n=i.reduce(((e,t)=>e+t.offsetSize),0),s=e.parent;hh(e);const o=e.index;return s._insertChild(o,i),dh(s,o+i.length),dh(s,o),new Dc(e,e.getShiftedBy(n))}function ah(e){if(!e.isFlat)throw new y("operation-utils-remove-range-not-flat",this);const t=e.start.parent;hh(e.start),hh(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return dh(t,e.start.index),i}function lh(e,t){if(!e.isFlat)throw new y("operation-utils-move-range-not-flat",this);const i=ah(e);return rh(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function ch(e){const t=[];!function e(i){if("string"==typeof i)t.push(new Ec(i));else if(i instanceof Sc)t.push(new Ec(i.data,i.getAttributes()));else if(i instanceof xc)t.push(i);else if(ie(i))for(const t of i)e(t);else{}}(e);for(let e=1;e<t.length;e++){const i=t[e],n=t[e-1];i instanceof Ec&&n instanceof Ec&&uh(i,n)&&(t.splice(e-1,2,new Ec(n.data+i.data,n.getAttributes())),e--)}return t}function dh(e,t){const i=e.getChild(t-1),n=e.getChild(t);if(i&&n&&i.is("$text")&&n.is("$text")&&uh(i,n)){const s=new Ec(i.data+n.data,i.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,s)}}function hh(e){const t=e.textNode,i=e.parent;if(t){const n=e.offset-t.startOffset,s=t.index;i._removeChildren(s,1);const o=new Ec(t.data.substr(0,n),t.getAttributes()),r=new Ec(t.data.substr(n),t.getAttributes());i._insertChild(s,[o,r])}}function uh(e,t){const i=e.getAttributes(),n=t.getAttributes();for(const e of i){if(e[1]!==t.getAttribute(e[0]))return!1;n.next()}return n.next().done}class mh extends oh{constructor(e,t,i,n){super(n),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}get affectedSelectable(){return[Dc._createFromPositionAndShift(this.sourcePosition,this.howMany),Dc._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new mh(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new mh(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,i=this.sourcePosition.offset,n=this.targetPosition.offset;if(i+this.howMany>e.maxOffset)throw new y("move-operation-nodes-do-not-exist",this);if(e===t&&i<n&&n<i+this.howMany)throw new y("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==te(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=i&&this.targetPosition.path[e]<i+this.howMany)throw new y("move-operation-node-into-itself",this)}}_execute(){lh(Dc._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const i=Rc.fromJSON(e.sourcePosition,t),n=Rc.fromJSON(e.targetPosition,t);return new this(i,e.howMany,n,e.baseVersion)}}class gh extends oh{constructor(e,t,i){super(i),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new Tc(ch(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new Tc([...this.nodes].map((e=>e._clone(!0)))),t=new gh(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Rc(e,[0]);return new mh(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new y("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new Tc([...e].map((e=>e._clone(!0)))),rh(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(Pc.fromJSON(t)):i.push(Ec.fromJSON(t));const n=new gh(Rc.fromJSON(e.position,t),i,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class fh extends oh{constructor(e,t,i,n,s){super(s),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=i,this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Rc(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Dc(this.splitPosition,e)}get affectedSelectable(){const e=[Dc._createFromPositionAndShift(this.splitPosition,0),Dc._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Dc._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new fh(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Rc(e,[0]);return new ph(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new y("split-operation-position-invalid",this);if(!e.parent)throw new y("split-operation-split-in-root",this);if(this.howMany!=e.maxOffset-this.splitPosition.offset)throw new y("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new y("split-operation-graveyard-position-invalid",this)}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)lh(Dc._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const t=e._clone();rh(this.insertionPosition,t)}lh(new Dc(Rc._createAt(e,this.splitPosition.offset),Rc._createAt(e,e.maxOffset)),this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new Rc(e.root,t,"toPrevious")}static fromJSON(e,t){const i=Rc.fromJSON(e.splitPosition,t),n=Rc.fromJSON(e.insertionPosition,t),s=e.graveyardPosition?Rc.fromJSON(e.graveyardPosition,t):null;return new this(i,e.howMany,n,s,e.baseVersion)}}class ph extends oh{constructor(e,t,i,n,s){super(s),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new Rc(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Dc(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[Dc._createOn(e),Dc._createFromPositionAndShift(this.targetPosition,0),Dc._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new ph(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),i=new Rc(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new fh(e,this.howMany,i,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new y("merge-operation-source-position-invalid",this);if(!t.parent)throw new y("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new y("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;lh(Dc._createIn(e),this.targetPosition),lh(Dc._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const i=Rc.fromJSON(e.sourcePosition,t),n=Rc.fromJSON(e.targetPosition,t),s=Rc.fromJSON(e.graveyardPosition,t);return new this(i,e.howMany,n,s,e.baseVersion)}}class bh extends oh{constructor(e,t,i,n,s,o){super(o),this.name=e,this.oldRange=t?t.clone():null,this.newRange=i?i.clone():null,this.affectsData=s,this._markers=n}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new bh(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new bh(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new bh(e.name,e.oldRange?Dc.fromJSON(e.oldRange,t):null,e.newRange?Dc.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}const wh=function(e,t){return dc(e,t)};class vh extends oh{constructor(e,t,i,n,s){super(s),this.range=e.clone(),this.key=t,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new vh(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new vh(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new y("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!wh(e.getAttribute(this.key),this.oldValue))throw new y("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new y("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){wh(this.oldValue,this.newValue)||function(e,t,i){hh(e.start),hh(e.end);for(const n of e.getItems({shallow:!0})){const e=n.is("$textProxy")?n.textNode:n;null!==i?e._setAttribute(t,i):e._removeAttribute(t),dh(e.parent,e.index)}dh(e.end.parent,e.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new vh(Dc.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class _h extends oh{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new _h(this.baseVersion)}getReversed(){return new _h(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class yh extends oh{constructor(e,t,i,n){super(n),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=i}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new yh(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new yh(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Pc))throw new y("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new y("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new yh(Rc.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class kh extends oh{constructor(e,t,i,n,s){super(s),this.root=e,this.key=t,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new kh(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new kh(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new y("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new y("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new y("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new y("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new kh(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Ch extends oh{constructor(e,t,i,n,s){if(super(s),this.rootName=e,this.elementName=t,this.isAdd=i,this._document=n,!this._document.getRoot(this.rootName)){this._document.createRoot(this.elementName,this.rootName)._isAttached=!1}}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new Ch(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new Ch(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new Ch(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}const Ah={};Ah[vh.className]=vh,Ah[gh.className]=gh,Ah[bh.className]=bh,Ah[mh.className]=mh,Ah[_h.className]=_h,Ah[oh.className]=oh,Ah[yh.className]=yh,Ah[kh.className]=kh,Ah[Ch.className]=Ch,Ah[fh.className]=fh,Ah[ph.className]=ph;class xh{static fromJSON(e,t){return Ah[e.__className].fromJSON(e,t)}}const Th=new Map;function Eh(e,t,i){let n=Th.get(e);n||(n=new Map,Th.set(e,n)),n.set(t,i)}function Sh(e){return[e]}function Ph(e,t,i={}){const n=function(e,t){const i=Th.get(e);return i&&i.has(t)?i.get(t):Sh}(e.constructor,t.constructor);try{return n(e=e.clone(),t,i)}catch(e){throw e}}function Ih(e,t,i){e=e.slice(),t=t.slice();const n=new Vh(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(e),n.setOriginalOperations(t);const s=n.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:s};const o=new WeakMap;for(const t of e)o.set(t,0);const r={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a<e.length;){const i=e[a],s=o.get(i);if(s==t.length){a++;continue}const r=t[s],l=Ph(i,r,n.getContext(i,r,!0)),c=Ph(r,i,n.getContext(r,i,!1));n.updateRelation(i,r),n.setOriginalOperations(l,i),n.setOriginalOperations(c,r);for(const e of l)o.set(e,s+c.length);e.splice(a,1,...l),t.splice(s,1,...c)}if(i.padWithNoOps){const i=e.length-r.originalOperationsACount,n=t.length-r.originalOperationsBCount;Oh(e,n-i),Oh(t,i-n)}return Rh(e,r.nextBaseVersionB),Rh(t,r.nextBaseVersionA),{operationsA:e,operationsB:t,originalOperations:s}}class Vh{constructor(e,t,i=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!i,this._relations=new Map}setOriginalOperations(e,t=null){const i=t?this.originalOperations.get(t):null;for(const t of e)this.originalOperations.set(t,i||t)}updateRelation(e,t){if(e instanceof mh)t instanceof ph?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof mh&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof fh){if(t instanceof ph)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof mh)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const i=Dc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const n=i.end.offset-e.splitPosition.offset,s=e.splitPosition.offset-i.start.offset;this._setRelation(e,t,{howMany:n,offset:s})}}}else if(e instanceof ph)t instanceof ph?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof fh&&e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource");else if(e instanceof bh){const i=e.newRange;if(!i)return;if(t instanceof mh){const n=Dc._createFromPositionAndShift(t.sourcePosition,t.howMany),s=n.containsPosition(i.start)||n.start.isEqual(i.start),o=n.containsPosition(i.end)||n.end.isEqual(i.end);!s&&!o||n.containsRange(i)||this._setRelation(e,t,{side:s?"left":"right",path:s?i.start.path.slice():i.end.path.slice()})}else if(t instanceof ph){const n=i.start.isEqual(t.targetPosition),s=i.start.isEqual(t.deletionPosition),o=i.end.isEqual(t.deletionPosition),r=i.end.isEqual(t.sourcePosition);(n||s||o||r)&&this._setRelation(e,t,{wasInLeftElement:n,wasStartBeforeMergedElement:s,wasEndBeforeMergedElement:o,wasInRightElement:r})}}}getContext(e,t,i){return{aIsStrong:i,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const i=this.originalOperations.get(t),n=this._history.getUndoneOperation(i);if(!n)return null;const s=this.originalOperations.get(e),o=this._relations.get(s);return o&&o.get(n)||null}_setRelation(e,t,i){const n=this.originalOperations.get(e),s=this.originalOperations.get(t);let o=this._relations.get(n);o||(o=new Map,this._relations.set(n,o)),o.set(s,i)}}function Rh(e,t){for(const i of e)i.baseVersion=t++}function Oh(e,t){for(let i=0;i<t;i++)e.push(new _h(0))}function Bh(e,t,i){const n=e.nodes.getNode(0).getAttribute(t);if(n==i)return null;const s=new Dc(e.position,e.position.getShiftedBy(e.howMany));return new vh(s,t,n,i,0)}function Mh(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function Nh(e,t){const i=[];for(let n=0;n<e.length;n++){const s=e[n],o=new mh(s.start,s.end.offset-s.start.offset,t,0);i.push(o);for(let t=n+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)[0];t=t._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)}return i}Eh(vh,vh,((e,t,i)=>{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map((t=>new vh(t,e.key,e.oldValue,e.newValue,0))),s=e.range.getIntersection(t.range);return s&&i.aIsStrong&&n.push(new vh(s,t.key,t.newValue,e.newValue,0)),0==n.length?[new _h(0)]:n}return[e]})),Eh(vh,gh,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new vh(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const n=Bh(t,e.key,e.oldValue);n&&i.unshift(n)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),Eh(vh,ph,((e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(Dc._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||i.push(n),i.map((t=>new vh(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),Eh(vh,mh,((e,t)=>{const i=function(e,t){const i=Dc._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,s=[];i.containsRange(e,!0)?n=e:e.start.hasSameParentAs(i.start)?(s=e.getDifference(i),n=e.getIntersection(i)):s=[e];const o=[];for(let e of s){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),n=e.start.hasSameParentAs(i),s=e._getTransformedByInsertion(i,t.howMany,n);o.push(...s)}n&&o.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return o}(e.range,t);return i.map((t=>new vh(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),Eh(vh,fh,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new Dc(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),Eh(gh,vh,((e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=Bh(e,t.key,t.newValue);n&&i.push(n)}return i})),Eh(gh,gh,((e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),Eh(gh,mh,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Eh(gh,fh,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),Eh(gh,ph,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Eh(bh,gh,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),Eh(bh,bh,((e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new _h(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),Eh(bh,ph,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),Eh(bh,mh,((e,t,i)=>{if(e.oldRange&&(e.oldRange=Dc._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(i.abRelation){const n=Dc._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=n.end,e.newRange.start.path=i.abRelation.path,[e];if("right"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=i.abRelation.path,[e]}e.newRange=Dc._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),Eh(bh,fh,((e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=Rc._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement&&(e.newRange.start=Rc._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=Rc._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=Rc._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),Eh(ph,gh,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),Eh(ph,ph,((e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new Rc(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new _h(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,s="$graveyard"==t.targetPosition.root.rootName;if(s&&!n||!(n&&!s)&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new mh(i,e.howMany,n,0)]}return[new _h(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Eh(ph,mh,((e,t,i)=>{const n=Dc._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&!i.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new _h(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),Eh(ph,fh,((e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,s=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||s||"mergeTargetNotMoved"==i.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),Eh(mh,gh,((e,t)=>{const i=Dc._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),Eh(mh,mh,((e,t,i)=>{const n=Dc._createFromPositionAndShift(e.sourcePosition,e.howMany),s=Dc._createFromPositionAndShift(t.sourcePosition,t.howMany);let o,r=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),o=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Mh(e,t)&&Mh(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(s,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Nh([n],o);if(s.containsPosition(e.targetPosition)&&s.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Nh([n],o);const l=te(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Nh([n],o);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(r=!1):r=!0;const c=[],d=n.getDifference(s);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==te(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);c.push(...n)}const h=n.getIntersection(s);return null!==h&&r&&(h.start=h.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),h.end=h.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(h):1==c.length?s.start.isBefore(n.start)||s.start.isEqual(n.start)?c.unshift(h):c.push(h):c.splice(1,0,h)),0===c.length?[new _h(e.baseVersion)]:Nh(c,o)})),Eh(mh,fh,((e,t,i)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const s=Dc._createFromPositionAndShift(e.sourcePosition,e.howMany);if(s.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(s.start.hasSameParentAs(t.splitPosition)&&s.containsPosition(t.splitPosition)){let e=new Dc(t.splitPosition,s.end);e=e._getTransformedBySplitOperation(t);return Nh([new Dc(s.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(n=e.targetPosition);const o=[s._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=s.start.isEqual(t.graveyardPosition)||s.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!i.aWasUndone&&o.push(Dc._createFromPositionAndShift(t.insertionPosition,1))}return Nh(o,n)})),Eh(mh,ph,((e,t,i)=>{const n=Dc._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new _h(0)]}else if(!i.aWasUndone){const i=[];let n=t.graveyardPosition.clone(),s=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(i.push(new mh(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),s=s._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const o=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new mh(n,1,o,0),a=r.getMovedRangeStart().path.slice();a.push(0);const l=new Rc(r.targetPosition.root,a);s=s._getTransformedByMove(n,o,1);const c=new mh(s,t.howMany,l,0);return i.push(r),i.push(c),i}const s=Dc._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=s.start,e.howMany=s.end.offset-s.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),Eh(yh,gh,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),Eh(yh,ph,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Eh(yh,mh,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Eh(yh,yh,((e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new _h(0)];e.oldName=t.newName}return[e]})),Eh(yh,fh,((e,t)=>{if("same"==te(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new yh(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),Eh(kh,kh,((e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new _h(0)];e.oldValue=t.newValue}return[e]})),Eh(Ch,Ch,((e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new _h(0)]:[e])),Eh(fh,gh,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset<t.position.offset&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByInsertOperation(t),e.insertionPosition=e.insertionPosition._getTransformedByInsertOperation(t),[e]))),Eh(fh,ph,((e,t,i)=>{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const n=new Rc(t.graveyardPosition.root,i),s=fh.getInsertionPosition(new Rc(t.graveyardPosition.root,i)),o=new fh(n,0,s,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=fh.getInsertionPosition(e.splitPosition),e.graveyardPosition=o.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[o,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=fh.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Eh(fh,mh,((e,t,i)=>{const n=Dc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const s=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&s){const i=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),s=n.path.slice();s.push(0);const o=new Rc(n.root,s);return[new mh(i,e.howMany,o,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const s=e.splitPosition.isEqual(t.targetPosition);if(s&&("insertAtSource"==i.baRelation||"splitBefore"==i.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=fh.getInsertionPosition(e.splitPosition),[e];if(s&&i.abRelation&&i.abRelation.howMany){const{howMany:t,offset:n}=i.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(n),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany),e.splitPosition=t.sourcePosition.clone(),e.insertionPosition=fh.getInsertionPosition(e.splitPosition),[e]}return t.sourcePosition.isEqual(t.targetPosition)||(e.splitPosition.hasSameParentAs(t.sourcePosition)&&e.splitPosition.offset<=t.sourcePosition.offset&&(e.howMany-=t.howMany),e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset<t.targetPosition.offset&&(e.howMany+=t.howMany)),e.splitPosition.stickiness="toNone",e.splitPosition=e.splitPosition._getTransformedByMoveOperation(t),e.splitPosition.stickiness="toNext",e.graveyardPosition?e.insertionPosition=e.insertionPosition._getTransformedByMoveOperation(t):e.insertionPosition=fh.getInsertionPosition(e.splitPosition),[e]})),Eh(fh,fh,((e,t,i)=>{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new _h(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new _h(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,s="$graveyard"==t.splitPosition.root.rootName;if(s&&!n||!(n&&!s)&&i.aIsStrong){const i=[];return t.howMany&&i.push(new mh(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new mh(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new _h(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const n=new Rc(t.insertionPosition.root,i);return[e,new mh(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset<t.splitPosition.offset&&(e.howMany-=t.howMany),e.splitPosition=e.splitPosition._getTransformedBySplitOperation(t),e.insertionPosition=fh.getInsertionPosition(e.splitPosition),[e]}));class Fh extends(V(Rc)){constructor(e,t,i="toNone"){if(super(e,t,i),!this.root.is("rootElement"))throw new y("model-liveposition-root-not-rootelement",e);Dh.call(this)}detach(){this.stopListening()}toPosition(){return new Rc(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function Dh(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&Lh.call(this,i)}),{priority:"low"})}function Lh(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Fh.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class zh{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},k("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:i=!0,isUndo:n=!1,isTyping:s=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=i,this.isUndo=n,this.isTyping=s}get type(){return k("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Hh{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),i=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),i||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Dc._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),i.range&&i.range.root.is("rootElement")&&!i.range.root._isLoaded&&(i.range=null);let n=this._changedMarkers.get(e);n?n.newMarkerData=i:(n={newMarkerData:i,oldMarkerData:t},this._changedMarkers.set(e,n)),null==n.oldMarkerData.range&&null==i.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldMarkerData.range&&e.push({name:t,range:i.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newMarkerData.range&&e.push({name:t,range:i.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const i=e.range&&!t.range,n=!e.range&&t.range,s=e.range&&t.range&&!e.range.isEqual(t.range);if(i||n||s)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offset<t.offset?-1:1)),n=this._elementSnapshots.get(e),s=$h(e.getChildren()),o=Wh(n.length,i);let r=0,a=0;for(const i of o)if("i"===i)t.push(this._getInsertDiff(e,r,s[r])),r++;else if("r"===i)t.push(this._getRemoveDiff(e,r,n[a])),a++;else if("a"===i){const i=s[r].attributes,o=n[a].attributes;let l;if("$text"==s[r].name)l=new Dc(Rc._createAt(e,r),Rc._createAt(e,r+1));else{const t=e.offsetToIndex(r);l=new Dc(Rc._createAt(e,r),Rc._createAt(e.getChild(t),0))}t.push(...this._getAttributesDiff(l,o,i)),r++,a++}else r++,a++}t.sort(((e,t)=>e.position.root!=t.position.root?e.position.root.rootName<t.position.root.rootName?-1:1:e.position.isEqual(t.position)?e.changeCount-t.changeCount:e.position.isBefore(t.position)?-1:1));for(let e=1,i=0;e<t.length;e++){const n=t[i],s=t[e],o="remove"==n.type&&"remove"==s.type&&"$text"==n.name&&"$text"==s.name&&n.position.isEqual(s.position),r="insert"==n.type&&"insert"==s.type&&"$text"==n.name&&"$text"==s.name&&n.position.parent==s.position.parent&&n.position.offset+n.length==s.position.offset,a="attribute"==n.type&&"attribute"==s.type&&n.position.parent==s.position.parent&&n.range.isFlat&&s.range.isFlat&&n.position.offset+n.length==s.position.offset&&n.attributeKey==s.attributeKey&&n.attributeOldValue==s.attributeOldValue&&n.attributeNewValue==s.attributeNewValue;o||r||a?(n.length++,a&&(n.range.end=n.range.end.getShiftedBy(1)),t[e]=null):i=e}t=t.filter((e=>e));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(jh),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const i=this._changedRoots.get(e);void 0!==i.state?(delete i.state,void 0===i.attributes&&this._changedRoots.delete(e)):i.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,i,n){const s=this._changedRoots.get(e)||{name:e},o=s.attributes||{};if(o[t]){const e=o[t];n===e.oldValue?delete o[t]:e.newValue=n}else o[t]={oldValue:i,newValue:n};0===Object.entries(o).length?(delete s.attributes,void 0===s.state&&this._changedRoots.delete(e)):(s.attributes=o,this._changedRoots.set(e,s))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=Dc._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_markInsert(e,t,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"insert",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,n)}_markRemove(e,t,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"remove",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,n),this._removeAllNestedChanges(e,t,i)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const i=this._getChangesForElement(e);this._handleChange(t,i),i.push(t);for(let e=0;e<i.length;e++)i[e].howMany<1&&(i.splice(e,1),e--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,$h(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const i of t){const n=e.offset+e.howMany,s=i.offset+i.howMany;if("insert"==e.type&&("insert"==i.type&&(e.offset<=i.offset?i.offset+=e.howMany:e.offset<s&&(i.howMany+=e.nodesToHandle,e.nodesToHandle=0)),"remove"==i.type&&e.offset<i.offset&&(i.offset+=e.howMany),"attribute"==i.type))if(e.offset<=i.offset)i.offset+=e.howMany;else if(e.offset<s){const s=i.howMany;i.howMany=e.offset-i.offset,t.unshift({type:"attribute",offset:n,howMany:s-i.howMany,count:this._changeCount++})}if("remove"==e.type){if("insert"==i.type)if(n<=i.offset)i.offset-=e.howMany;else if(n<=s)if(e.offset<i.offset){const t=n-i.offset;i.offset=e.offset,i.howMany-=t,e.nodesToHandle-=t}else i.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=i.offset)e.nodesToHandle-=i.howMany,i.howMany=0;else if(e.offset<s){const t=s-e.offset;i.howMany-=t,e.nodesToHandle-=t}if("remove"==i.type&&(n<=i.offset?i.offset-=e.howMany:e.offset<i.offset&&(e.nodesToHandle+=i.howMany,i.howMany=0)),"attribute"==i.type)if(n<=i.offset)i.offset-=e.howMany;else if(e.offset<i.offset){const t=n-i.offset;i.offset=e.offset,i.howMany-=t}else if(e.offset<s)if(n<=s){const n=i.howMany;i.howMany=e.offset-i.offset;const s=n-i.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:s,count:this._changeCount++})}else i.howMany-=s-e.offset}if("attribute"==e.type){if("insert"==i.type)if(e.offset<i.offset&&n>i.offset){if(n>s){const e={type:"attribute",offset:s,howMany:n-s,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offset<s&&(n>s?(e.nodesToHandle=n-s,e.offset=s):e.nodesToHandle=0);if("remove"==i.type&&e.offset<i.offset&&n>i.offset){const s={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(s,t),t.push(s),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&n<=s?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&n>=s&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i){return{type:"insert",position:Rc._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++,_element:i.element}}_getRemoveDiff(e,t,i){return{type:"remove",position:Rc._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++,_element:i.element}}_getAttributesDiff(e,t,i){const n=[];i=new Map(i);for(const[s,o]of t){const t=i.has(s)?i.get(s):null;t!==o&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:o,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(s)}for(const[t,s]of i)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:s,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),n=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&n>=e.offset&&n<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,i){const n=new Dc(Rc._createAt(e,t),Rc._createAt(e,t+i));for(const e of n.getItems({shallow:!0}))e.is("element")&&(this._elementSnapshots.delete(e),this._changesInElement.delete(e),this._removeAllNestedChanges(e,0,e.maxOffset))}}function $h(e){const t=[];for(const i of e)if(i.is("$text"))for(let e=0;e<i.data.length;e++)t.push({name:"$text",attributes:new Map(i.getAttributes())});else t.push({name:i.name,attributes:new Map(i.getAttributes()),element:i});return t}function Wh(e,t){const i=[];let n=0,s=0;for(const e of t){if(e.offset>n){for(let t=0;t<e.offset-n;t++)i.push("e");s+=e.offset-n}if("insert"==e.type){for(let t=0;t<e.howMany;t++)i.push("i");n=e.offset+e.howMany}else if("remove"==e.type){for(let t=0;t<e.howMany;t++)i.push("r");n=e.offset,s+=e.howMany}else i.push(..."a".repeat(e.howMany).split("")),n=e.offset+e.howMany,s+=e.howMany}if(s<e)for(let t=0;t<e-s-n;t++)i.push("e");return i}function jh(e){const t="position"in e&&"$graveyard"==e.position.root.rootName,i="range"in e&&"$graveyard"==e.range.root.rootName;return!t&&!i}class Uh{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new y("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const i=this._operations[0];void 0===e&&(e=i.baseVersion);let n=t-1;for(const[t,i]of this._gaps)e>t&&e<i&&(e=i),n>t&&n<i&&(n=t-1);if(n<i.baseVersion||e>this.lastOperation.baseVersion)return[];let s=this._baseVersionToOperationIndex.get(e);void 0===s&&(s=0);let o=this._baseVersionToOperationIndex.get(n);return void 0===o&&(o=this._operations.length-1),this._operations.slice(s,o+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class qh extends Pc{constructor(e,t,i="main"){super(t),this._isAttached=!0,this._isLoaded=!0,this._document=e,this.rootName=i}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}qh.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const Gh="$graveyard";class Zh extends(V()){constructor(e){super(),this.model=e,this.history=new Uh,this.selection=new id(this),this.roots=new Es({idProperty:"rootName"}),this.differ=new Hh(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Gh),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.history.addOperation(i)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,i,n,s)=>{const o={...t.getData(),range:n};this.differ.bufferMarkerChange(t.name,s,o),null===i&&t.on("change",((e,i)=>{const n=t.getData();this.differ.bufferMarkerChange(t.name,{...n,range:i},n)}))})),this.registerPostFixer((e=>{let t=!1;for(const i of this.roots)i.isAttached()||i.isEmpty||(e.remove(e.createRangeIn(i)),t=!0);for(const i of this.model.markers)i.getRange().root.isAttached()||(e.removeMarker(i),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Gh)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new y("model-document-createroot-name-exists",this,{name:t});const i=new qh(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map((e=>e.rootName))}getRoots(e=!1){return this.roots.filter((t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=yr(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,n=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return Kh(e.start)&&Kh(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function Kh(e){const t=e.textNode;if(t){const i=t.data,n=e.offset-t.startOffset;return!Os(i,n)&&!Bs(i,n)}return!0}class Jh extends(V()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Qh?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,i=!1,n=!1){const s=e instanceof Qh?e.name:e;if(s.includes(","))throw new y("markercollection-incorrect-marker-name",this);const o=this._markers.get(s);if(o){const e=o.getData(),r=o.getRange();let a=!1;return r.isEqual(t)||(o._attachLiveRange(Yc.fromRange(t)),a=!0),i!=o.managedUsingOperations&&(o._managedUsingOperations=i,a=!0),"boolean"==typeof n&&n!=o.affectsData&&(o._affectsData=n,a=!0),a&&this.fire(`update:${s}`,o,r,t,e),o}const r=Yc.fromRange(t),a=new Qh(s,r,i,n);return this._markers.set(s,a),this.fire(`update:${s}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof Qh?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire(`update:${t}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof Qh?e.name:e,i=this._markers.get(t);if(!i)throw new y("markercollection-refresh-marker-not-exists",this);const n=i.getRange();this.fire(`update:${t}`,i,n,n,i.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Qh extends(V(Ac)){constructor(e,t,i,n){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new y("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Qh.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Yh extends oh{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new y("detach-operation-on-document-node",this)}_execute(){ah(Dc._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Xh extends Ac{constructor(e){super(),this.markers=new Map,this._children=new Tc,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(Pc.fromJSON(i)):t.push(Ec.fromJSON(i));return new Xh(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){if("string"==typeof e)return[new Ec(e)];ie(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ec(e):e instanceof Sc?new Ec(e.data,e.getAttributes()):e))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}}Xh.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class eu{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Ec(e,t)}createElement(e,t){return new Pc(e,t)}createDocumentFragment(){return new Xh}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,i=0){if(this._assertWriterUsedCorrectly(),e instanceof Ec&&""==e.data)return;const n=Rc._createAt(t,i);if(e.parent){if(ou(e.root,n.root))return void this.move(Dc._createOn(e),n);if(e.root.document)throw new y("model-writer-insert-forbidden-move",this);this.remove(e)}const s=n.root.document?n.root.document.version:null,o=new gh(n,e,s);if(e instanceof Ec&&(o.shouldReceiveAttributes=!0),this.batch.addOperation(o),this.model.applyOperation(o),e instanceof Xh)for(const[t,i]of e.markers){const e=Rc._createAt(i.root,0),s={range:new Dc(i.start._getCombined(e,n),i.end._getCombined(e,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,s):this.addMarker(t,s)}}insertText(e,t,i,n){t instanceof Xh||t instanceof Pc||t instanceof Rc?this.insert(this.createText(e),t,i):this.insert(this.createText(e,t),i,n)}insertElement(e,t,i,n){t instanceof Xh||t instanceof Pc||t instanceof Rc?this.insert(this.createElement(e),t,i):this.insert(this.createElement(e,t),i,n)}append(e,t){this.insert(e,t,"end")}appendText(e,t,i){t instanceof Xh||t instanceof Pc?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),i,"end")}appendElement(e,t,i){t instanceof Xh||t instanceof Pc?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),i,"end")}setAttribute(e,t,i){if(this._assertWriterUsedCorrectly(),i instanceof Dc){const n=i.getMinimalFlatRanges();for(const i of n)tu(this,e,t,i)}else iu(this,e,t,i)}setAttributes(e,t){for(const[i,n]of Vs(e))this.setAttribute(i,n,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof Dc){const i=t.getMinimalFlatRanges();for(const t of i)tu(this,e,null,t)}else iu(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof Dc)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof Dc))throw new y("writer-move-invalid-range",this);if(!e.isFlat)throw new y("writer-move-range-not-flat",this);const n=Rc._createAt(t,i);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!ou(e.root,n.root))throw new y("writer-move-different-document",this);const s=e.root.document?e.root.document.version:null,o=new mh(e.start,e.end.offset-e.start.offset,n,s);this.batch.addOperation(o),this.model.applyOperation(o)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof Dc?e:Dc._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),su(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Pc))throw new y("writer-merge-no-element-before",this);if(!(i instanceof Pc))throw new y("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(Dc._createIn(i),Rc._createAt(t,"end")),this.remove(i)}_merge(e){const t=Rc._createAt(e.nodeBefore,"end"),i=Rc._createAt(e.nodeAfter,0),n=e.root.document.graveyard,s=new Rc(n,[0]),o=e.root.document.version,r=new ph(i,e.nodeAfter.maxOffset,t,s,o);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Pc))throw new y("writer-rename-not-element-instance",this);const i=e.root.document?e.root.document.version:null,n=new yh(Rc._createBefore(e),e.name,t,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let i,n,s=e.parent;if(!s.parent)throw new y("writer-split-element-no-parent",this);if(t||(t=s.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new y("writer-split-invalid-limit-element",this);do{const t=s.root.document?s.root.document.version:null,o=s.maxOffset-e.offset,r=fh.getInsertionPosition(e),a=new fh(e,o,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),i||n||(i=s,n=e.parent.nextSibling),s=(e=this.createPositionAfter(e.parent)).parent}while(s!==t);return{position:e,range:new Dc(Rc._createAt(i,"end"),Rc._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new y("writer-wrap-range-not-flat",this);const i=t instanceof Pc?t:new Pc(t);if(i.childCount>0)throw new y("writer-wrap-element-not-empty",this);if(null!==i.parent)throw new y("writer-wrap-element-attached",this);this.insert(i,e.start);const n=new Dc(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,Rc._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new y("writer-unwrap-element-no-parent",this);this.move(Dc._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new y("writer-addmarker-no-usingoperation",this);const i=t.usingOperation,n=t.range,s=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new y("writer-addmarker-marker-exists",this);if(!n)throw new y("writer-addmarker-no-range",this);return i?(nu(this,e,null,n,s),this.model.markers.get(e)):this.model.markers._set(e,n,i,s)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,n=this.model.markers.get(i);if(!n)throw new y("writer-updatemarker-marker-not-exists",this);if(!t)return k("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),void this.model.markers._refresh(n);const s="boolean"==typeof t.usingOperation,o="boolean"==typeof t.affectsData,r=o?t.affectsData:n.affectsData;if(!s&&!t.range&&!o)throw new y("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=t.range?t.range:a;s&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?nu(this,i,null,l,r):(nu(this,i,a,null,r),this.model.markers._set(i,l,void 0,r)):n.managedUsingOperations?nu(this,i,a,l,r):this.model.markers._set(i,l,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new y("writer-removemarker-no-marker",this);const i=this.model.markers.get(t);if(!i.managedUsingOperations)return void this.model.markers._remove(t);nu(this,t,i.getRange(),null,i.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const i=this.model.document.getRoot(e);if(i&&i.isAttached())throw new y("writer-addroot-root-exists",this);const n=this.model.document,s=new Ch(e,t,!0,n,n.version);return this.batch.addOperation(s),this.model.applyOperation(s),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new y("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const i=this.model.document,n=new Ch(t.rootName,t.name,!1,i,i.version);this.batch.addOperation(n),this.model.applyOperation(n)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of Vs(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=id._getStoreAttributeKey(e);this.setAttribute(n,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=id._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new y("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let s=!1;if("move"===e){const e=t;s=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const e=t,i=e.nodeBefore,o=e.nodeAfter,r=n.start.parent==i&&n.start.isAtEnd,a=n.end.parent==o&&0==n.end.offset,l=n.end.nodeAfter==o,c=n.start.nodeAfter==o;s=r||a||l||c}s&&this.updateMarker(i.name,{range:n})}}}function tu(e,t,i,n){const s=e.model,o=s.document;let r,a,l,c=n.start;for(const e of n.getWalker({shallow:!0}))l=e.item.getAttribute(t),r&&a!=l&&(a!=i&&d(),c=r),r=e.nextPosition,a=l;function d(){const n=new Dc(c,r),l=n.root.document?o.version:null,d=new vh(n,t,a,i,l);e.batch.addOperation(d),s.applyOperation(d)}r instanceof Rc&&r!=c&&a!=i&&d()}function iu(e,t,i,n){const s=e.model,o=s.document,r=n.getAttribute(t);let a,l;if(r!=i){if(n.root===n){const e=n.document?o.version:null;l=new kh(n,t,r,i,e)}else{a=new Dc(Rc._createBefore(n),e.createPositionAfter(n));const s=a.root.document?o.version:null;l=new vh(a,t,r,i,s)}e.batch.addOperation(l),s.applyOperation(l)}}function nu(e,t,i,n,s){const o=e.model,r=o.document,a=new bh(t,i,n,o.markers,!!s,r.version);e.batch.addOperation(a),o.applyOperation(a)}function su(e,t,i,n){let s;if(e.root.document){const i=n.document,o=new Rc(i.graveyard,[0]);s=new mh(e,t,o,i.version)}else s=new Yh(e,t);i.addOperation(s),n.applyOperation(s)}function ou(e,t){return e===t||e instanceof qh&&t instanceof qh}function ru(e,t,i={}){if(t.isCollapsed)return;const n=t.getFirstRange();if("$graveyard"==n.root.rootName)return;const s=e.schema;e.change((e=>{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(i,"paragraph")}(s,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),du(e,e.createPositionAt(i,0),t)}(e,t);const o={};if(!i.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(o,s.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,i=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(n);if(i&&n.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"});const s=i.getLastPosition(),o=t.createRange(s,n);t.hasContent(o,{ignoreMarkers:!0})||(n=s)}}return[Fh.fromPosition(i,"toPrevious"),Fh.fromPosition(n,"toNext")]}(n);r.isTouching(a)||e.remove(e.createRange(r,a)),i.leaveUnmerged||(!function(e,t,i){const n=e.model;if(!cu(e.model.schema,t,i))return;const[s,o]=function(e,t){const i=e.getAncestors(),n=t.getAncestors();let s=0;for(;i[s]&&i[s]==n[s];)s++;return[i[s],n[s]]}(t,i);if(!s||!o)return;!n.hasContent(s,{ignoreMarkers:!0})&&n.hasContent(o,{ignoreMarkers:!0})?lu(e,t,i,s.parent):au(e,t,i,s.parent)}(e,r,a),s.removeDisallowedAttributes(r.parent.getChildren(),e)),hu(e,t,r),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!i&&n}(s,r)&&du(e,r,t,o),r.detach(),a.detach()}))}function au(e,t,i,n){const s=t.parent,o=i.parent;if(s!=n&&o!=n){for(t=e.createPositionAfter(s),(i=e.createPositionBefore(o)).isEqual(t)||e.insert(o,t),e.merge(t);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}cu(e.model.schema,t,i)&&au(e,t,i,n)}}function lu(e,t,i,n){const s=t.parent,o=i.parent;if(s!=n&&o!=n){for(t=e.createPositionAfter(s),(i=e.createPositionBefore(o)).isEqual(t)||e.insert(s,i);t.parent.isEmpty;){const i=t.parent;t=e.createPositionBefore(i),e.remove(i)}i=e.createPositionBefore(o),function(e,t){const i=t.nodeBefore,n=t.nodeAfter;i.name!=n.name&&e.rename(i,n.name);e.clearAttributes(i),e.setAttributes(Object.fromEntries(n.getAttributes()),i),e.merge(t)}(e,i),cu(e.model.schema,t,i)&&lu(e,t,i,n)}}function cu(e,t,i){const n=t.parent,s=i.parent;return n!=s&&(!e.isLimit(n)&&!e.isLimit(s)&&function(e,t,i){const n=new Dc(e,t);for(const e of n.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e))}function du(e,t,i,n={}){const s=e.createElement("paragraph");e.model.schema.setAllowedAttributes(s,n,e),e.insert(s,t),hu(e,i,e.createPositionAt(s,0))}function hu(e,t,i){t instanceof id?e.setSelection(i):t.setTo(i)}function uu(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{i.push(e.start.parent),t.remove(e)})),i.forEach((e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}}))}class mu{constructor(e,t,i){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),i=this.writer.createPositionAfter(e);if(i.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new y("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Dc._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Dc(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Fh.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new y("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Fh.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Fh.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Pc))return;if(!this._canMergeLeft(e))return;const t=Fh._createBefore(e);t.stickiness="toNext";const i=Fh.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Fh._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Fh._createAt(t.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Pc))return;if(!this._canMergeRight(e))return;const t=Fh._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new y("insertcontent-invalid-insertion-position",this);this.position=Rc._createAt(t.nodeBefore,"end");const i=Fh.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Fh._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Fh._createAt(t.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Pc&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Pc&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function gu(e,t,i,n={}){if(!e.schema.isObject(t))throw new y("insertobject-element-not-an-object",e,{object:t});const s=i||e.document.selection;let o=s;n.findOptimalPosition&&e.schema.isBlock(t)&&(o=e.createSelection(e.schema.findOptimalInsertionRange(s,n.findOptimalPosition)));const r=Ss(s.getSelectedBlocks()),a={};return r&&Object.assign(a,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((i=>{o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});let s=t;const r=o.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(s=i.createElement("paragraph"),i.insert(t,s)),e.schema.setAllowedAttributes(s,a,i);const l=e.insertContent(s,o);return l.isCollapsed||n.setSelection&&function(e,t,i,n){const s=e.model;if("on"==i)return void e.setSelection(t,"on");if("after"!=i)throw new y("insertobject-invalid-place-parameter-value",s);let o=t.nextSibling;if(s.schema.isInline(t))return void e.setSelection(t,"after");const r=o&&s.schema.checkChild(o,"$text");!r&&s.schema.checkChild(t.parent,"paragraph")&&(o=e.createElement("paragraph"),s.schema.setAllowedAttributes(o,n,e),s.insertContent(o,e.createPositionAfter(t)));o&&e.setSelection(o,0)}(i,t,n.setSelection,a),l}))}const fu=' ,.?!:;"-()';function pu(e,t){const{isForward:i,walker:n,unit:s,schema:o,treatEmojiAsSingleUnit:r}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let i=e.position.textNode;i||(i=t?e.position.nodeAfter:e.position.nodeBefore);for(;i&&i.is("$text");){const n=e.position.offset-i.startOffset;if(vu(i,n,t))i=t?e.position.nodeAfter:e.position.nodeBefore;else{if(wu(i.data,n,t))break;e.next()}}return e.position}(n,i):function(e,t,i){const n=e.position.textNode;if(n){const s=n.data;let o=e.position.offset-n.startOffset;for(;Os(s,o)||"character"==t&&Bs(s,o)||i&&Ns(s,o);)e.next(),o=e.position.offset-n.startOffset}return e.position}(n,s,r);if(a==(i?"elementStart":"elementEnd")){if(o.isSelectable(l))return Rc._createAt(l,i?"after":"before");if(o.checkChild(c,"$text"))return c}else{if(o.isLimit(l))return void n.skip((()=>!0));if(o.checkChild(c,"$text"))return c}}function bu(e,t){const i=e.root,n=Rc._createAt(i,t?"end":0);return t?new Dc(e,n):new Dc(n,e)}function wu(e,t,i){const n=t+(i?0:-1);return fu.includes(e.charAt(n))}function vu(e,t,i){return t===(i?e.offsetSize:0)}class _u extends(G()){constructor(){super(),this.markers=new Jh,this.document=new Zh(this),this.schema=new Fd,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Pd(this),this.document.registerPostFixer(vd),this.on("insertContent",((e,[t,i])=>{e.return=function(e,t,i){return e.change((n=>{const s=i||e.document.selection;s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});const o=new mu(e,n,s.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[i,n]of t.markers){const{start:t,end:s}=n,o=t.isEqual(s);e.push({position:t,name:i,isCollapsed:o},{position:s,name:i,isCollapsed:o})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:i,name:s,isCollapsed:o}of e){let e=null,a=null;const l=i.parent===t&&i.isAtStart,c=i.parent===t&&i.isAtEnd;l||c?o&&(a=l?"start":"end"):(e=n.createElement("$marker"),n.insert(e,i)),r.push({name:s,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];o.handleNodes(a);let l=o.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=l?Yc.fromRange(l):null,t={};for(let e=r.length-1;e>=0;e--){const{name:i,element:s,collapsed:a}=r[e],l=!t[i];if(l&&(t[i]=[]),s){const e=n.createPositionAt(s,"before");t[i].push(e),n.remove(s)}else{const e=o.getAffectedRange();if(!e){a&&t[i].push(o.position);continue}a?t[i].push(e[a]):t[i].push(l?e.start:e.end)}}for(const[e,[i,s]]of Object.entries(t))i&&s&&i.root===s.root&&n.addMarker(e,{usingOperation:!0,affectsData:!0,range:new Dc(i,s)});e&&(l=e.toRange(),e.detach())}l&&(s instanceof id?n.setSelection(l):s.setTo(l));const c=o.getAffectedRange()||e.createRange(s.anchor);return o.destroy(),c}))}(this,t,i)})),this.on("insertObject",((e,[t,i,n])=>{e.return=gu(this,t,i,n)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new zh,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){y.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new zh):e instanceof zh||(e=new zh(e)):e=new zh,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){y.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i,...n){const s=yu(t,i);return this.fire("insertContent",[e,s,i,...n])}insertObject(e,t,i,n,...s){const o=yu(t,i);return this.fire("insertObject",[e,o,n,n,...s])}deleteContent(e,t){ru(this,e,t)}modifySelection(e,t){!function(e,t,i={}){const n=e.schema,s="backward"!=i.direction,o=i.unit?i.unit:"character",r=!!i.treatEmojiAsSingleUnit,a=t.focus,l=new Ic({boundaries:bu(a,s),singleCharacters:!0,direction:s?"forward":"backward"}),c={walker:l,schema:n,isForward:s,unit:o,treatEmojiAsSingleUnit:r};let d;for(;d=l.next();){if(d.done)return;const i=pu(c,d.value);if(i)return void(t instanceof id?e.change((e=>{e.setSelectionFocus(i)})):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const i=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return i;const s=n.start.root,o=n.start.getCommonPath(n.end),r=s.getNodeByPath(o);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(r,n.start.path[o.length]),e.createPositionAt(r,n.end.path[o.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(i,0),l)[0],s=e.createRange(e.createPositionAt(i,0),t.start);uu(e.createRange(t.end,e.createPositionAt(i,"end")),e),uu(s,e)}return i}))}(this,e)}hasContent(e,t={}){const i=e instanceof Dc?e:Dc._createIn(e);if(i.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:s=!1}=t;if(!s)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=yu(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,i){return new Rc(e,t,i)}createPositionAt(e,t){return Rc._createAt(e,t)}createPositionAfter(e){return Rc._createAfter(e)}createPositionBefore(e){return Rc._createBefore(e)}createRange(e,t){return new Dc(e,t)}createRangeIn(e){return Dc._createIn(e)}createRangeOn(e){return Dc._createOn(e)}createSelection(...e){return new Uc(...e)}createBatch(e){return new zh(e)}createOperationFromJSON(e){return xh.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new eu(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function yu(e,t){if(e)return e instanceof Uc||e instanceof id?e:e instanceof xc?t||0===t?new Uc(e,t):e.is("rootElement")?new Uc(e,"in"):new Uc(e,"on"):new Uc(e)}class ku extends $l{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class Cu extends $l{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class Au{constructor(e){this.document=e}createDocumentFragment(e){return new il(this.document,e)}createElement(e,t,i){return new Aa(this.document,e,t,i)}createText(e){return new Cr(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const n=i.getChildIndex(e);return this.removeChildren(n,1,i),this.insertChild(n,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new Aa(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){Ee(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return Ra._createAt(e,t)}createPositionAfter(e){return Ra._createAfter(e)}createPositionBefore(e){return Ra._createBefore(e)}createRange(e,t){return new Oa(e,t)}createRangeOn(e){return Oa._createOn(e)}createRangeIn(e){return Oa._createIn(e)}createSelection(...e){return new Ma(...e)}}const xu=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Tu=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Eu=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Su=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Pu=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Iu=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,Vu=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Ru(e){return e.startsWith("#")?xu.test(e):e.startsWith("rgb")?Tu.test(e)||Eu.test(e):e.startsWith("hsl")?Su.test(e)||Pu.test(e):Vu.has(e.toLowerCase())}const Ou=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Bu(e){return Ou.includes(e)}const Mu=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Nu(e){return Mu.test(e)}const Fu=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Du(e){return Fu.test(e)}const Lu=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function zu(e){return Lu.includes(e)}const Hu=["center","top","bottom","left","right"];function $u(e){return Hu.includes(e)}const Wu=["fixed","scroll","local"];function ju(e){return Wu.includes(e)}const Uu=/^url\(/;function qu(e){return Uu.test(e)}function Gu(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Qu(e),i=t[0],n=t[2]||i,s=t[1]||i;return{top:i,bottom:n,right:s,left:t[3]||s}}function Zu(e){return t=>{const{top:i,right:n,bottom:s,left:o}=t,r=[];return[i,n,o,s].every((e=>!!e))?r.push([e,Ku(t)]):(i&&r.push([e+"-top",i]),n&&r.push([e+"-right",n]),s&&r.push([e+"-bottom",s]),o&&r.push([e+"-left",o])),r}}function Ku({top:e,right:t,bottom:i,left:n}){const s=[];return n!==t?s.push(e,t,i,n):i!==e?s.push(e,t,i):t!==e?s.push(e,t):s.push(e),s.join(" ")}function Ju(e){return t=>({path:e,value:Gu(t)})}function Qu(e){const t=e.matchAll(Iu);return Array.from(t).map((e=>e[0]))}function Yu(e){e.setNormalizer("background",(e=>{const t={},i=Qu(e);for(const e of i)zu(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):$u(e)?(t.position=t.position||[],t.position.push(e)):ju(e)?t.attachment=e:Ru(e)?t.color=e:qu(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Xu(e){e.setNormalizer("border",(e=>{const{color:t,style:i,width:n}=rm(e);return{path:"border",value:{color:Gu(t),style:Gu(i),width:Gu(n)}}})),e.setNormalizer("border-top",em("top")),e.setNormalizer("border-right",em("right")),e.setNormalizer("border-bottom",em("bottom")),e.setNormalizer("border-left",em("left")),e.setNormalizer("border-color",tm("color")),e.setNormalizer("border-width",tm("width")),e.setNormalizer("border-style",tm("style")),e.setNormalizer("border-top-color",nm("color","top")),e.setNormalizer("border-top-style",nm("style","top")),e.setNormalizer("border-top-width",nm("width","top")),e.setNormalizer("border-right-color",nm("color","right")),e.setNormalizer("border-right-style",nm("style","right")),e.setNormalizer("border-right-width",nm("width","right")),e.setNormalizer("border-bottom-color",nm("color","bottom")),e.setNormalizer("border-bottom-style",nm("style","bottom")),e.setNormalizer("border-bottom-width",nm("width","bottom")),e.setNormalizer("border-left-color",nm("color","left")),e.setNormalizer("border-left-style",nm("style","left")),e.setNormalizer("border-left-width",nm("width","left")),e.setExtractor("border-top",sm("top")),e.setExtractor("border-right",sm("right")),e.setExtractor("border-bottom",sm("bottom")),e.setExtractor("border-left",sm("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Zu("border-color")),e.setReducer("border-style",Zu("border-style")),e.setReducer("border-width",Zu("border-width")),e.setReducer("border-top",am("top")),e.setReducer("border-right",am("right")),e.setReducer("border-bottom",am("bottom")),e.setReducer("border-left",am("left")),e.setReducer("border",function(){return t=>{const i=om(t,"top"),n=om(t,"right"),s=om(t,"bottom"),o=om(t,"left"),r=[i,n,s,o],a={width:e(r,"width"),style:e(r,"style"),color:e(r,"color")},l=lm(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,i])=>(i&&(e.push([`border-${t}`,i]),r.forEach((e=>delete e[t]))),e)),[]);return[...c,...lm(i,"top"),...lm(n,"right"),...lm(s,"bottom"),...lm(o,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function em(e){return t=>{const{color:i,style:n,width:s}=rm(t),o={};return void 0!==i&&(o.color={[e]:i}),void 0!==n&&(o.style={[e]:n}),void 0!==s&&(o.width={[e]:s}),{path:"border",value:o}}}function tm(e){return t=>({path:"border",value:im(t,e)})}function im(e,t){return{[t]:Gu(e)}}function nm(e,t){return i=>({path:"border",value:{[e]:{[t]:i}}})}function sm(e){return(t,i)=>{if(i.border)return om(i.border,e)}}function om(e,t){const i={};return e.width&&e.width[t]&&(i.width=e.width[t]),e.style&&e.style[t]&&(i.style=e.style[t]),e.color&&e.color[t]&&(i.color=e.color[t]),i}function rm(e){const t={},i=Qu(e);for(const e of i)Nu(e)||/thin|medium|thick/.test(e)?t.width=e:Bu(e)?t.style=e:t.color=e;return t}function am(e){return t=>lm(t,e)}function lm(e,t){const i=[];if(e&&e.width&&i.push("width"),e&&e.style&&i.push("style"),e&&e.color&&i.push("color"),3==i.length){const n=i.map((t=>e[t])).join(" ");return["all"==t?["border",n]:[`border-${t}`,n]]}return"all"==t?[]:i.map((i=>[`border-${t}-${i}`,e[i]]))}function cm(e){e.setNormalizer("margin",Ju("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Zu("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function dm(e){e.setNormalizer("padding",Ju("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Zu("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class hm{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new y("commandcollection-command-not-found",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class um extends Is{constructor(e){super(),this.editor=e}set(e,t,i={}){if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}class mm extends(G()){constructor(e={}){super();const t=this.constructor,i=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new cr({language:i}),this._context._addEditor(this,!e.context);const n=Array.from(t.builtinPlugins||[]);this.config=new xn(e,t.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new lr(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new hm,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new _u,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const s=new ya;this.data=new th(this.model,s),this.editing=new Od(this.model,s),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new ih([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new um(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new y("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new y("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new y("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],n=e.get("extraPlugins")||[],s=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(n),i,s)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){y.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}function gm(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=gm(Object);gm.setData=e.prototype.setData,gm.getData=e.prototype.getData}function fm(e){return class extends e{updateSourceElement(e){if(!this.sourceElement)throw new y("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),i=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!i)return void Zn(this.sourceElement,"");const n="string"==typeof e?e:this.data.get();Zn(this.sourceElement,n)}}}fm.updateSourceElement=fm(Object).prototype.updateSourceElement;class pm extends dr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Es({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new y("pendingactions-add-invalid-message",this);const t=new(G());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const bm={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',colorPalette:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',history:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1z"/><path d="M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052z"/><path d="M11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1l4.16-4.482ZM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1h15.6Zm-5.655 6a2.128 2.128 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7Z"/></svg>',imageUpload:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a2.97 2.97 0 0 1-.414-.287 2.998 2.998 0 0 1-1.055-2.03 3.003 3.003 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.134 2.134 0 0 0-1.875-.978Z"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z"/></svg>',imageAssetManager:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.094 2.094 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.133 2.133 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z"/><path clip-rule="evenodd" d="M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.843.843 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.844.844 0 0 1 .247.597Zm-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z"/></svg>',imageUrl:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h7.029a5.401 5.401 0 0 1 .615-4.338l.762-1.232-2.975-2.78a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v6.023c.449.131.887.32 1.307.573l.058.033c.046.028.09.057.135.086V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.15 2.15 0 0 0-1.611.834 2.118 2.118 0 0 0-.438 1.158 2.14 2.14 0 0 0 1.277 2.096 2.132 2.132 0 0 0 2.645-3.11 2.13 2.13 0 0 0-1.873-.978Z"/><path d="M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.647.647 0 0 0-.096.492.664.664 0 0 0 .278.418.7.7 0 0 0 .944-.234 1.741 1.741 0 0 1 2.478-.463 1.869 1.869 0 0 1 .476 2.55.637.637 0 0 0-.071.5.646.646 0 0 0 .309.396.627.627 0 0 0 .869-.19l.027-.041a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.78-.044.066a3.228 3.228 0 0 0 .82 4.403 3.005 3.005 0 0 0 4.275-.798l.13-.197a.626.626 0 0 0 .092-.475.638.638 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.029a1.741 1.741 0 0 1-2.477.461 1.87 1.87 0 0 1-.475-2.55l.029-.047a.647.647 0 0 0 .086-.485.66.66 0 0 0-.275-.408l-.04-.027a.609.609 0 0 0-.845.17Z"/><path d="M15.312 13.925c.24-.36.154-.838-.19-1.067-.346-.23-.82-.124-1.059.236l-1.268 1.907c-.239.36-.153.838.192 1.067.345.23.818.123 1.057-.236l1.268-1.907Z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',textAlternative:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1H3.035Zm10.453 2.61a1.885 1.885 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.903 1.903 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598ZM7.463 8.163a.611.611 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.628.628 0 0 0-.417-.185Zm6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.618.618 0 0 0-.42-.165ZM.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.908.908 0 0 0-.912-.912H.91ZM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516L3.668 13Zm4.947 0h1.801v4.3h2.7v1.4h-4.5V13h-.001Zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9V13h-.001Zm-8.517 1.457-.614 2.059h1.262l-.648-2.059Z"/></svg>',loupe:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.68 13.74h-.001l4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474ZM13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>',previousArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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>',nextArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.382l-4.043 4.042z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2ZM13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7h11Z"/></svg>',objectSizeSmall:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M7 9.5H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2ZM7 11a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4A.5.5 0 0 1 2 11h5Z"/></svg>',objectSizeMedium:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z"/><path d="M10 7.5H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2ZM10 9a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6A.5.5 0 0 1 2 9h8Z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',dragIndicator:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>',redo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>',undo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',bulletedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>',numberedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',todoList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',codeBlock:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z"/></svg>',browseFiles:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',heading1:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z"/></svg>',heading2:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z"/></svg>',heading3:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z"/></svg>',heading4:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z"/></svg>',heading5:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z"/></svg>',heading6:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z"/></svg>',horizontalLine:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 9h16v2H2z"/></svg>',html:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2h14zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5l-.001-1.001zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965l-.014-.014zM2 10H1v5h1v-2h2v2h1v-5H4v2H2v-2zm7 0H6v1h1v4h1v-4h1v-1zm8 0h-1v5h3v-1h-2v-4zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5zM10 7v1H4V7h6zm3-2v1H4V5h9zm-3-2v1H4V3h6z"/></svg>',indent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',outdent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>',table:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5.5v3h4v-3H3Zm0 4v3h4v-3H3Zm0 4v3h4v-3H3Zm5 3h4v-3H8v3Zm5 0h4v-3h-4v3Zm4-4v-3h-4v3h4Zm0-4v-3h-4v3h4Zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13.5Zm-6.5-4v-3H8v3h4Zm0-4v-3H8v3h4Z"/></svg>'},{threeVerticalDots:wm}=bm,vm={alignLeft:bm.alignLeft,bold:bm.bold,importExport:bm.importExport,paragraph:bm.paragraph,plus:bm.plus,text:bm.text,threeVerticalDots:bm.threeVerticalDots,pilcrow:bm.pilcrow,dragIndicator:bm.dragIndicator};class _m extends Ds{constructor(e,t){super(e);const i=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ps,this.keystrokes=new Is,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new ym(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const s="rtl"===e.uiLanguageDirection;this._focusCycler=new Qo({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[s?"arrowright":"arrowleft","arrowup"],focusNext:[s?"arrowleft":"arrowright","arrowdown"]}});const o=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")];var r;this.options.shouldGroupWhenFull&&this.options.isFloating&&o.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:o,role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(r=this,r.bindTemplate.to((e=>{e.target===r.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Cm(this):new km(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,i){this.items.addMany(this._buildItemsFromConfig(e,t,i))}_buildItemsFromConfig(e,t,i){const n=ir(e),s=i||n.removeItems;return this._cleanItemsConfiguration(n.items,t,s).map((e=>L(e)?this._createNestedToolbarDropdown(e,t,s):"|"===e?new er:"-"===e?new tr:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,i){const n=e.filter(((e,n,s)=>"|"===e||-1===i.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(k("toolbarview-line-break-ignored-when-grouping-items",s),!1):!(!L(e)&&!t.has(e))||(k("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,i=e.length,n=e.findIndex(t);if(-1===n)return[];const s=i-e.slice().reverse().findIndex(t);return e.slice(n,s).filter(((e,i,n)=>{if(t(e))return!0;return!(i>0&&n[i-1]===e)}))}_createNestedToolbarDropdown(e,t,i){let{label:n,icon:s,items:o,tooltip:r=!0,withText:a=!1}=e;if(o=this._cleanItemsConfiguration(o,t,i),!o.length)return null;const l=Pm(this.locale);return n||k("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:r,withText:!!a}),!1!==s?l.buttonView.icon=vm[s]||s||wm:l.buttonView.withText=!0,Im(l,(()=>l.toolbarView._buildItemsFromConfig(o,t,i))),l}}class ym extends Ds{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class km{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>Xo(e)?e:null)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Cm{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",((e,t)=>{const i=t.index,n=Array.from(t.added);for(const e of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=i;e<i+n.length;e++){const t=n[e-i];e>this.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!es(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,i=new Hn(e.lastChild),n=new Hn(e);if(!this.cachedPadding){const i=Mn.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}return"ltr"===t?i.right>n.right-this.cachedPadding:i.left<n.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new Gn(this.viewElement,(t=>{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new er),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,i=Pm(e);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",Im(i,this.groupedItems),i.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:wm}),i}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{Xo(e)&&this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class Am extends Ds{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class xm extends Ds{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class Tm extends Ds{constructor(e,t=new Ho){super(e);const i=this.bindTemplate,n=new Em(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,n]),n.set({role:"group",ariaLabelledBy:t.id}),n.focusTracker.destroy(),n.keystrokes.destroy(),this.items=n.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",i.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){if(this.items){const e=this.items.find((e=>!(e instanceof xm)));e&&e.focus()}}}class Em extends Ds{constructor(e){super(e),this._listItemGroupToChangeListeners=new WeakMap;const t=this.bindTemplate;this.focusables=new Fs,this.items=this.createCollection(),this.focusTracker=new Ps,this.keystrokes=new Is,this._focusCycler=new Qo({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof Tm?this._registerFocusableItemsGroup(e):e instanceof Am&&this._registerFocusableListItem(e);this.items.on("change",((e,t)=>{for(const e of t.removed)e instanceof Tm?this._deregisterFocusableItemsGroup(e):e instanceof Am&&this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof Tm?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,t.index)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,i)=>{for(const e of i.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(i.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+i.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach(((e,i)=>{const n=void 0!==t?t+i:void 0;this._registerFocusableListItem(e,n)}));const i=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,i),e.items.on("change",i)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}class Sm extends Ds{constructor(e,t){super(e);const i=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new Is,this.focusTracker=new Ps,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",i.to("class"),i.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new ho;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new ho,t=e.bindTemplate;return e.icon=mo,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function Pm(t,i=Jo){const n="function"==typeof i?new i(t):i,s=new Go(t),o=new Ko(t,n,s);return n.bind("isEnabled").to(o),n instanceof Sm?n.arrowView.bind("isOn").to(o,"isOpen"):n.bind("isOn").to(o,"isOpen"),function(t){(function(t){t.on("render",(()=>{e({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:()=>[t.element,...t.focusTracker._elements]})}))})(t),function(e){e.on("execute",(t=>{t.source instanceof uo||(e.isOpen=!1)}))}(t),function(e){e.focusTracker.on("change:isFocused",((t,i,n)=>{e.isOpen&&!n&&(e.isOpen=!1)}))}(t),function(e){e.keystrokes.set("arrowdown",((t,i)=>{e.isOpen&&(e.panelView.focus(),i())})),e.keystrokes.set("arrowup",((t,i)=>{e.isOpen&&(e.panelView.focusLast(),i())}))}(t),function(e){e.on("change:isOpen",((t,i,n)=>{if(n)return;const s=e.panelView.element;s&&s.contains(Mn.document.activeElement)&&e.buttonView.focus()}))}(t),function(e){e.on("change:isOpen",((t,i,n)=>{n&&e.panelView.focus()}),{priority:"low"})}(t)}(o),o}function Im(e,t,i={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?Vm(e,t,i):e.once("change:isOpen",(()=>Vm(e,t,i)),{priority:"highest"}),i.enableActiveItemFocusOnDropdownOpen&&Bm(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function Vm(e,t,i){const n=e.locale,s=n.t,o=e.toolbarView=new _m(n),r="function"==typeof t?t():t;o.ariaLabel=i.ariaLabel||s("Dropdown toolbar"),i.maxWidth&&(o.maxWidth=i.maxWidth),i.class&&(o.class=i.class),i.isCompact&&(o.isCompact=i.isCompact),i.isVertical&&(o.isVertical=!0),r instanceof Fs?o.items.bindTo(r).using((e=>e)):o.items.addMany(r),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function Rm(e,t,i={}){e.isOpen?Om(e,t,i):e.once("change:isOpen",(()=>Om(e,t,i)),{priority:"highest"}),Bm(e,(()=>e.listView.items.find((e=>e instanceof Am&&e.children.first.isOn))))}function Om(e,t,i){const n=e.locale,s=e.listView=new Em(n),o="function"==typeof t?t():t;s.ariaLabel=i.ariaLabel,s.role=i.role,Mm(e,s.items,o,n),e.panelView.children.add(s),s.items.delegate("execute").to(e)}function Bm(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const i=t();i&&("function"==typeof i.focus?i.focus():k("ui-dropdown-focus-child-on-open-child-missing-focus",{view:i}))}),{priority:w.low-10})}function Mm(e,t,i,n){t.bindTo(i).using((t=>{if("separator"===t.type)return new xm(n);if("group"===t.type){const i=new Tm(n);return i.set({label:t.label}),Mm(e,i.items,t.items,n),i.items.delegate("execute").to(e),i}if("button"===t.type||"switchbutton"===t.type){const e=new Am(n);let i;return"button"===t.type?(i=new ho(n),i.extendTemplate({attributes:{"aria-checked":i.bindTemplate.to("isOn")}})):i=new uo(n),i.bind(...Object.keys(t.model)).to(t.model),i.delegate("execute").to(e),e.children.add(i),e}return null}))}const Nm=(e,t,i)=>{const n=new Uo(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n},Fm=(e,t,i)=>{const n=new qo(e.locale);return n.set({id:t,ariaDescribedById:i,inputMode:"numeric"}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n},Dm=(e,t,i)=>{const n=Pm(e.locale);return n.set({id:t,ariaDescribedById:i}),n.bind("isEnabled").to(e),n},Lm=(e,t=0,i=1)=>e>i?i:e<t?t:e,zm=(e,t=0,i=Math.pow(10,t))=>Math.round(i*e)/i,Hm=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?zm(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?zm(parseInt(e.substring(6,8),16)/255,2):1})),$m=({h:e,s:t,v:i,a:n})=>{const s=(200-t)*i/100;return{h:zm(e),s:zm(s>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0),l:zm(s/2),a:zm(n,2)}},Wm=e=>{const{h:t,s:i,l:n}=$m(e);return`hsl(${t}, ${i}%, ${n}%)`},jm=({h:e,s:t,v:i,a:n})=>{e=e/360*6,t/=100,i/=100;const s=Math.floor(e),o=i*(1-t),r=i*(1-(e-s)*t),a=i*(1-(1-e+s)*t),l=s%6;return{r:zm(255*[i,r,o,o,a,i][l]),g:zm(255*[a,i,i,r,o,o][l]),b:zm(255*[o,o,a,i,i,r][l]),a:zm(n,2)}},Um=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},qm=({r:e,g:t,b:i,a:n})=>{const s=n<1?Um(zm(255*n)):"";return"#"+Um(e)+Um(t)+Um(i)+s},Gm=({r:e,g:t,b:i,a:n})=>{const s=Math.max(e,t,i),o=s-Math.min(e,t,i),r=o?s===e?(t-i)/o:s===t?2+(i-e)/o:4+(e-t)/o:0;return{h:zm(60*(r<0?r+6:r)),s:zm(s?o/s*100:0),v:zm(s/255*100),a:n}},Zm=(e,t)=>{if(e===t)return!0;for(const i in e)if(e[i]!==t[i])return!1;return!0},Km={},Jm=e=>{let t=Km[e];return t||(t=document.createElement("template"),t.innerHTML=e,Km[e]=t),t},Qm=(e,t,i)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))};let Ym=!1;const Xm=e=>"touches"in e,eg=(e,t)=>{const i=Xm(t)?t.touches[0]:t,n=e.el.getBoundingClientRect();Qm(e.el,"move",e.getMove({x:Lm((i.pageX-(n.left+window.pageXOffset))/n.width),y:Lm((i.pageY-(n.top+window.pageYOffset))/n.height)}))};class tg{constructor(e,t,i,n){const s=Jm(`<div role="slider" tabindex="0" part="${t}" ${i}><div part="${t}-pointer"></div></div>`);e.appendChild(s.content.cloneNode(!0));const o=e.querySelector(`[part=${t}]`);o.addEventListener("mousedown",this),o.addEventListener("touchstart",this),o.addEventListener("keydown",this),this.el=o,this.xy=n,this.nodes=[o.firstChild,o]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(Ym?"touchmove":"mousemove",this),t(Ym?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(Ym&&!Xm(e)||(Ym||(Ym=Xm(e)),0)))(e)||!Ym&&0!=e.button)return;this.el.focus(),eg(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),eg(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const i=t.keyCode;i>40||e.xy&&i<37||i<33||(t.preventDefault(),Qm(e.el,"move",e.getMove({x:39===i?.01:37===i?-.01:34===i?.05:33===i?-.05:35===i?1:36===i?-1:0,y:40===i?.01:38===i?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const i in e)this.nodes[t].style.setProperty(i,e[i])}))}}class ig extends tg{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:Wm({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${zm(e)}`)}getMove(e,t){return{h:t?Lm(this.h+360*e.x,0,360):360*e.x}}}class ng extends tg{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:Wm(e)},{"background-color":Wm({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${zm(e.s)}%, Brightness ${zm(e.v)}%`)}getMove(e,t){return{s:t?Lm(this.hsva.s+100*e.x,0,100):100*e.x,v:t?Lm(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const sg=Symbol("same"),og=Symbol("color"),rg=Symbol("hsva"),ag=Symbol("update"),lg=Symbol("parts"),cg=Symbol("css"),dg=Symbol("sliders");class hg extends HTMLElement{static get observedAttributes(){return["color"]}get[cg](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[dg](){return[ng,ig]}get color(){return this[og]}set color(e){if(!this[sg](e)){const t=this.colorModel.toHsva(e);this[ag](t),this[og]=e}}constructor(){super();const e=Jm(`<style>${this[cg].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[lg]=this[dg].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,i){const n=this.colorModel.fromAttr(i);this[sg](n)||(this.color=n)}handleEvent(e){const t=this[rg],i={...t,...e.detail};let n;this[ag](i),Zm(i,t)||this[sg](n=this.colorModel.fromHsva(i))||(this[og]=n,Qm(this,"color-changed",{value:n}))}[sg](e){return this.color&&this.colorModel.equal(e,this.color)}[ag](e){this[rg]=e,this[lg].forEach((t=>t.update(e)))}}const ug={defaultColor:"#000",toHsva:e=>Gm(Hm(e)),fromHsva:({h:e,s:t,v:i})=>qm(jm({h:e,s:t,v:i,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||Zm(Hm(e),Hm(t)),fromAttr:e=>e};class mg extends hg{get colorModel(){return ug}}class gg extends Ds{constructor(e,t={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const i=this.createCollection();t.hideInput||i.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:i}),this._config=t,this._debounceColorPickerEvent=zo((e=>{this.set("color",e),this.fire("colorSelected",{color:this.color})}),150,{leading:!0}),this.on("set:color",((e,t,i)=>{e.return=xo(i,this._config.format||"hsl")})),this.on("change:color",(()=>{this._hexColor=fg(this.color)})),this.on("change:_hexColor",(()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),fg(this.color)!=fg(this._hexColor)&&(this.color=this._hexColor)}))}render(){var e,t;if(super.render(),e="hex-color-picker",t=mg,void 0===customElements.get(e)&&customElements.define(e,t),this.picker=Mn.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",(e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)}))}focus(){if(!this._config.hideInput&&(l.isGecko||l.isiOS||l.isSafari)){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new pg(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=new bg,t=this._createColorInput();return new wg(this.locale,[e,t])}_createColorInput(){const e=new $o(this.locale,Nm),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=t.trim(),i=e.startsWith("#")?e.substring(1):e;[3,4,6,8].includes(i.length)&&/(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})/.test(i)&&this._debounceColorPickerEvent("#"+i)}})),e}}function fg(e){let t=function(e){if(!e)return"";const t=To(e);return t?"hex"===t.space?t.hexValue:xo(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class pg extends Ds{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class bg extends Ds{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class wg extends Ds{constructor(e,t){super(e),this.children=this.createCollection(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}}class vg extends(G(Es)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}const{eraser:_g,colorPalette:yg}=bm;class kg extends Ds{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:r,focusTracker:a,focusables:l}){super(e);const c=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=a,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=i,this.documentColors=new vg,this.documentColorsCount=o,this._focusables=l,this._removeButtonLabel=n,this._colorPickerLabel=r,this._documentColorsLabel=s,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",c.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const s of i.getRoots()){const i=e.createRangeIn(s);for(const e of i.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=Ls.bind(this.documentColors,this.documentColors),t=new Ho(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new ho,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:yg,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("colorPicker:show")}))}_createRemoveColorButton(){const e=new ho;return e.set({withText:!0,icon:_g,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",(()=>{this.fire("execute",{value:null,source:"removeColorButton"})})),e.render(),e}_createStaticColorsGrid(){const e=new vo(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=Ls.bind(this.documentColors,this.documentColors),t=new vo(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new wo;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,i,n)=>{n&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class Cg extends Ds{constructor(e,{focusTracker:t,focusables:i,keystrokes:n,colorPickerViewConfig:s}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=n,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=i,this._colorPickerViewConfig=s;const o=this.bindTemplate,{saveButtonView:r,cancelButtonView:a}=this._createActionButtons();this.saveButtonView=r,this.cancelButtonView=a,this.actionBarView=this._createActionBarView({saveButtonView:r,cancelButtonView:a}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",o.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new gg(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,i,n)=>{e.color=n})),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}_executeOnEnterPress(){this.keystrokes.set("enter",(e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())}))}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const i=new Ds,n=this.createCollection();return n.add(e),n.add(t),i.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:n}),i}_createActionButtons(){const e=this.locale,t=e.t,i=new ho(e),n=new ho(e);return i.set({icon:bm.check,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),n.set({icon:bm.cancel,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),i.on("execute",(()=>{this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})})),n.on("execute",(()=>{this.fire("colorPicker:cancel")})),{saveButtonView:i,cancelButtonView:n}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",((e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)}))}}class Ag extends Ds{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:r,colorPickerViewConfig:a}){super(e),this.items=this.createCollection(),this.focusTracker=new Ps,this.keystrokes=new Is,this._focusables=new Fs,this._colorPickerViewConfig=a,this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new kg(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:r,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new Cg(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:a}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",((e,t,i)=>{this.colorGridsFragmentView.set("selectedColor",i),this.colorPickerFragmentView.set("selectedColor",i)})),this.colorGridsFragmentView.on("change:selectedColor",((e,t,i)=>{this.set("selectedColor",i)})),this.colorPickerFragmentView.on("change:selectedColor",((e,t,i)=>{this.set("selectedColor",i)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){this.colorPickerFragmentView.colorPickerView&&!this._isColorPickerFragmentVisible&&(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){2!==this.items.length&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{this.showColorPickerFragment()})),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class xg{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Tg(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new y("componentfactory-item-missing",this,{name:e});return this._components.get(Tg(e)).callback(this.editor.locale)}has(e){return this._components.has(Tg(e))}}function Tg(e){return String(e).toLowerCase()}class Eg extends Ds{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",i.to("class")]},children:this.children}),t.icon&&(this.iconView=new lo,this.iconView.content=t.icon,this.children.add(this.iconView));const n=new Ds(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"]},children:[{text:i.to("label")}]}),this.children.add(n)}}class Sg extends Ds{constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new Is,this._focusTracker=new Ps,this._focusables=new Fs,this.focusCycler=new Qo({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const e=new ho(this.locale);let i;for(i in e.on("execute",(()=>t.onExecute())),t.onCreate&&t.onCreate(e),t)"onExecute"!=i&&"onCreate"!=i&&e.set(i,t[i]);this.children.add(e)}this._updateFocusCyclableItems()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}}class Pg extends Ds{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}const Ig="screen-center",Vg="editor-center",Rg="editor-top-side",Og="editor-top-center",Bg="editor-bottom-center",Mg="editor-above-center",Ng="editor-below-center",Fg=Kn("px");class Dg extends(function(e){return class extends e{constructor(...e){super(...e),this._onDragBound=this._onDrag.bind(this),this._onDragEndBound=this._onDragEnd.bind(this),this._lastDraggingCoordinates={x:0,y:0},this.on("render",(()=>{this._attachListeners()})),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(Mn.document,"mouseup",this._onDragEndBound),this.listenTo(Mn.document,"touchend",this._onDragEndBound),this.listenTo(Mn.document,"mousemove",this._onDragBound),this.listenTo(Mn.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(Mn.document,"mouseup",this._onDragEndBound),this.stopListening(Mn.document,"touchend",this._onDragEndBound),this.stopListening(Mn.document,"mousemove",this._onDragBound),this.stopListening(Mn.document,"touchmove",this._onDragBound)}_onDragStart(e,t){if(!this._isHandleElementPressed(t))return;this._attachDragListeners();let i=0,n=0;t instanceof MouseEvent?(i=t.clientX,n=t.clientY):(i=t.touches[0].clientX,n=t.touches[0].clientY),this._lastDraggingCoordinates={x:i,y:n},this.isDragging=!0}_onDrag(e,t){if(!this.isDragging)return void this._detachDragListeners();let i=0,n=0;t instanceof MouseEvent?(i=t.clientX,n=t.clientY):(i=t.touches[0].clientX,n=t.touches[0].clientY),t.preventDefault(),this.fire("drag",{deltaX:Math.round(i-this._lastDraggingCoordinates.x),deltaY:Math.round(n-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:i,y:n}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(e){return!!this.dragHandleElement&&(this.dragHandleElement===e.target||e.target instanceof HTMLElement&&this.dragHandleElement.contains(e.target))}}}(Ds)){constructor(e,{getCurrentDomRoot:t,getViewportOffset:i}){super(e),this.wasMoved=!1;const n=this.bindTemplate,s=e.t;this.set("className",""),this.set("ariaLabel",s("Editor dialog")),this.set("isModal",!1),this.set("position",Ig),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=i,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new Is,this.focusTracker=new Ps,this._focusables=new Fs,this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",n.if("isModal","ck-dialog-overlay__transparent",(e=>!e)),n.if("_isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",n.to("className")],role:"dialog","aria-label":n.to("ariaLabel"),style:{top:n.to("_top",(e=>Fg(e))),left:n.to("_left",(e=>Fg(e))),visibility:n.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",((e,t)=>{this.fire("close",{source:"escKeyPress"}),t()})),this.on("drag",((e,{deltaX:t,deltaY:i})=>{this.wasMoved=!0,this.moveBy(t,i)})),this.listenTo(Mn.window,"resize",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.listenTo(Mn.document,"scroll",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.on("change:_isVisible",((e,t,i)=>{i&&(this._isTransparent=!0,setTimeout((()=>{this.updatePosition(),this._isTransparent=!1,this.focus()}),10))})),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:i=!0,content:n,actionButtons:s}){t&&(this.headerView=new Eg(this.locale,{icon:e}),i&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),n&&(n instanceof Ds&&(n=[n]),this.contentView=new Pg(this.locale),this.contentView.children.addMany(n),this.parts.add(this.contentView)),s&&(this.actionsView=new Sg(this.locale),this.actionsView.setButtons(s),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const i=this._getViewportRect(),n=this._getDialogRect();e+n.width>i.right&&(e=i.right-n.width),e<i.left&&(e=i.left),t<i.top&&(t=i.top),this._moveTo(e,t)}_moveTo(e,t){this._left=e,this._top=t}moveBy(e,t){this.moveTo(this._left+e,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let t,i=this.position;this._getCurrentDomRoot()?t=this._getVisibleDomRootRect(e):i=Ig;const n=Dg.defaultOffset,s=this._getDialogRect();switch(i){case Rg:if(t){const e="ltr"===this.locale.contentLanguageDirection?t.right-s.width-n:t.left+n;this.moveTo(e,t.top+n)}else this._moveOffScreen();break;case Vg:t?this.moveTo(Math.round(t.left+t.width/2-s.width/2),Math.round(t.top+t.height/2-s.height/2)):this._moveOffScreen();break;case Ig:this.moveTo(Math.round((e.width-s.width)/2),Math.round((e.height-s.height)/2));break;case Og:t?this.moveTo(Math.round(t.left+t.width/2-s.width/2),t.top+n):this._moveOffScreen();break;case Bg:t?this.moveTo(Math.round(t.left+t.width/2-s.width/2),t.bottom-s.height-n):this._moveOffScreen();break;case Mg:t?this.moveTo(Math.round(t.left+t.width/2-s.width/2),t.top-s.height-n):this._moveOffScreen();break;case Ng:t?this.moveTo(Math.round(t.left+t.width/2-s.width/2),t.bottom+n):this._moveOffScreen()}}_getVisibleDomRootRect(e){let t=new Hn(this._getCurrentDomRoot()).getVisible();return t?(t=e.getIntersection(t),t||null):null}_getDialogRect(){return new Hn(this.element.firstElementChild)}_getViewportRect(){return function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Hn(Mn.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t.left+=e.left,t.right-=e.right,t.width-=e.left+e.right,t}(this._getViewportOffset())}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const t of this.contentView.children)Xo(t)&&e.push(t);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach((e=>{var t;this._focusables.add(e),this.focusTracker.add(e.element),Xo(t=e)&&"focusCycler"in t&&t.focusCycler instanceof Qo&&(this.listenTo(e.focusCycler,"forwardCycle",(e=>{this._focusCycler.focusNext(),this._focusCycler.next!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})),this.listenTo(e.focusCycler,"backwardCycle",(e=>{this._focusCycler.focusPrevious(),this._focusCycler.previous!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})))}))}_createCloseButton(){const e=new ho(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:bm.cancel}),e.on("execute",(()=>this.fire("close",{source:"closeButton"}))),e}}Dg.defaultOffset=15;const Lg=Dg;const zg=Kn("px"),Hg=Mn.document.body,$g={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class Wg extends Ds{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",zg),left:t.to("left",zg)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Wg.defaultPositions,i=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:Hg,fitInViewport:!0},e),n=Wg._getOptimalPosition(i)||$g,s=parseInt(n.left),o=parseInt(n.top),r=n.name,a=n.config||{},{withArrow:l=!0}=a;this.top=o,this.left=s,this.position=r,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=Ug(e.target),i=e.limiter?Ug(e.limiter):Hg;this.listenTo(Mn.document,"scroll",((n,s)=>{const o=s.target,r=t&&o.contains(t),a=i&&o.contains(i);!r&&!a&&t&&i||this.attachTo(e)}),{useCapture:!0}),this.listenTo(Mn.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(Mn.document,"scroll"),this.stopListening(Mn.window,"resize")}}Wg.arrowSideOffset=25,Wg.arrowHeightOffset=10,Wg.stickyVerticalOffset=20,Wg._getOptimalPosition=ts,Wg.defaultPositions=qg();const jg=Wg;function Ug(e){return An(e)?e:Dn(e)?e.commonAncestorContainer:"function"==typeof e?Ug(e()):null}function qg(e={}){const{sideOffset:t=Wg.arrowSideOffset,heightOffset:i=Wg.arrowHeightOffset,stickyVerticalOffset:n=Wg.stickyVerticalOffset,config:s}=e;return{northWestArrowSouthWest:(e,i)=>({top:o(e,i),left:e.left-t,name:"arrow_sw",...s&&{config:s}}),northWestArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.left-.25*i.width-t,name:"arrow_smw",...s&&{config:s}}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:"arrow_s",...s&&{config:s}}),northWestArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.left-.75*i.width+t,name:"arrow_sme",...s&&{config:s}}),northWestArrowSouthEast:(e,i)=>({top:o(e,i),left:e.left-i.width+t,name:"arrow_se",...s&&{config:s}}),northArrowSouthWest:(e,i)=>({top:o(e,i),left:e.left+e.width/2-t,name:"arrow_sw",...s&&{config:s}}),northArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.left+e.width/2-.25*i.width-t,name:"arrow_smw",...s&&{config:s}}),northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...s&&{config:s}}),northArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.left+e.width/2-.75*i.width+t,name:"arrow_sme",...s&&{config:s}}),northArrowSouthEast:(e,i)=>({top:o(e,i),left:e.left+e.width/2-i.width+t,name:"arrow_se",...s&&{config:s}}),northEastArrowSouthWest:(e,i)=>({top:o(e,i),left:e.right-t,name:"arrow_sw",...s&&{config:s}}),northEastArrowSouthMiddleWest:(e,i)=>({top:o(e,i),left:e.right-.25*i.width-t,name:"arrow_smw",...s&&{config:s}}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:"arrow_s",...s&&{config:s}}),northEastArrowSouthMiddleEast:(e,i)=>({top:o(e,i),left:e.right-.75*i.width+t,name:"arrow_sme",...s&&{config:s}}),northEastArrowSouthEast:(e,i)=>({top:o(e,i),left:e.right-i.width+t,name:"arrow_se",...s&&{config:s}}),southWestArrowNorthWest:e=>({top:r(e),left:e.left-t,name:"arrow_nw",...s&&{config:s}}),southWestArrowNorthMiddleWest:(e,i)=>({top:r(e),left:e.left-.25*i.width-t,name:"arrow_nmw",...s&&{config:s}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...s&&{config:s}}),southWestArrowNorthMiddleEast:(e,i)=>({top:r(e),left:e.left-.75*i.width+t,name:"arrow_nme",...s&&{config:s}}),southWestArrowNorthEast:(e,i)=>({top:r(e),left:e.left-i.width+t,name:"arrow_ne",...s&&{config:s}}),southArrowNorthWest:e=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...s&&{config:s}}),southArrowNorthMiddleWest:(e,i)=>({top:r(e),left:e.left+e.width/2-.25*i.width-t,name:"arrow_nmw",...s&&{config:s}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...s&&{config:s}}),southArrowNorthMiddleEast:(e,i)=>({top:r(e),left:e.left+e.width/2-.75*i.width+t,name:"arrow_nme",...s&&{config:s}}),southArrowNorthEast:(e,i)=>({top:r(e),left:e.left+e.width/2-i.width+t,name:"arrow_ne",...s&&{config:s}}),southEastArrowNorthWest:e=>({top:r(e),left:e.right-t,name:"arrow_nw",...s&&{config:s}}),southEastArrowNorthMiddleWest:(e,i)=>({top:r(e),left:e.right-.25*i.width-t,name:"arrow_nmw",...s&&{config:s}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...s&&{config:s}}),southEastArrowNorthMiddleEast:(e,i)=>({top:r(e),left:e.right-.75*i.width+t,name:"arrow_nme",...s&&{config:s}}),southEastArrowNorthEast:(e,i)=>({top:r(e),left:e.right-i.width+t,name:"arrow_ne",...s&&{config:s}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-i,name:"arrow_e",...s&&{config:s}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+i,name:"arrow_w",...s&&{config:s}}),viewportStickyNorth:(e,t,i,o)=>{const r=o||i;return e.getIntersection(r)?r.height-e.height>n?null:{top:r.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...s}}:null}};function o(e,t){return e.top-t.height-i}function r(e){return e.bottom+i}}const Gg="ck-tooltip";class Zg extends(Vn()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,Zg._editors.add(e),Zg._instance)return Zg._instance;Zg._instance=this,this.tooltipTextView=new Ds(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new jg(e.locale),this.balloonPanelView.class=Gg,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=zo(this._pinTooltip,600),this.listenTo(Mn.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Mn.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Zg._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Zg._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Zg._instance=null)}static getPositioningFunctions(e){const t=Zg.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const i=Jg(t);var n;i&&(i!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(i,{text:(n=i).dataset.ckeTooltipText,position:n.dataset.ckeTooltipPosition||"s",cssClass:n.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:i}){if("mouseleave"===e.name){if(!An(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=Jg(t),n=Jg(i);e&&e!==n&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:i,cssClass:n}){const s=Ss(Zg._editors.values()).ui.view.body;s.has(this.balloonPanelView)||s.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:Zg.getPositioningFunctions(i)}),this._resizeObserver=new Gn(e,(()=>{es(e)||this._unpinTooltip()})),this.balloonPanelView.class=[Gg,n].filter((e=>e)).join(" ");for(const e of Zg._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=i}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Zg._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){es(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Zg.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}}Zg.defaultBalloonPositions=qg({heightOffset:5,sideOffset:13}),Zg._editors=new Set,Zg._instance=null;const Kg=Zg;function Jg(e){return An(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}const Qg=function(e,t,i){var n=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return L(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),zo(e,t,{leading:n,maxWait:t,trailing:s})},Yg=50,Xg=350,ef="Powered by";class tf extends(Vn()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=Qg(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;(!!e.config.get("ui.poweredBy.forceVisible")||"VALID"!==function(e){function t(e){return e.length>=40&&e.length<=255?"VALID":"INVALID"}if(!e)return"INVALID";let i="";try{i=atob(e)}catch(e){return"INVALID"}const n=i.split("-"),s=n[0],o=n[1];if(!o)return t(e);try{atob(o)}catch(i){try{if(atob(s),!atob(s).length)return t(e)}catch(i){return t(e)}}if(s.length<40||s.length>255)return"INVALID";let r="";try{atob(s),r=atob(o)}catch(e){return"INVALID"}if(8!==r.length)return"INVALID";const a=Number(r.substring(0,4)),l=Number(r.substring(4,6))-1,c=Number(r.substring(6,8)),d=new Date(a,l,c);return d<T||isNaN(Number(d))?"INVALID":"VALID"}(e.config.get("licenseKey")))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,i)=>{this._updateLastFocusedEditableElement(),i?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,i)=>{this._updateLastFocusedEditableElement(),i&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new jg,i=of(e),n=new nf(e.locale,i.label);t.content.add(n),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const i=of(e),n="right"===i.side?function(e,t){return sf(e,t,((e,i)=>e.left+e.width-i.width-t.horizontalOffset))}(t,i):function(e,t){return sf(e,t,(e=>e.left+t.horizontalOffset))}(t,i);return{target:t,positions:[n]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,i=e.ui.focusTracker.focusedElement;if(!t||!i)return void(this._lastFocusedEditableElement=null);const n=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));n.includes(i)?this._lastFocusedEditableElement=i:this._lastFocusedEditableElement=n[0]}}class nf extends Ds{constructor(e,t){super(e);const i=new lo,n=this.bindTemplate;i.set({content:'<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>\n',isColorInherited:!1}),i.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],i],on:{dragstart:n.to((e=>e.preventDefault()))}}]})}}function sf(e,t,i){return(n,s)=>{const o=new Hn(e);if(o.width<Xg||o.height<Yg)return null;let r;r="inside"===t.position?o.bottom-s.height:o.bottom-s.height/2,r-=t.verticalOffset;const a=i(o,s),l=n.clone().moveTo(a,r).getIntersection(s.clone().moveTo(a,r)).getVisible();return!l||l.getArea()<s.getArea()?null:{top:r,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function of(e){const t=e.config.get("ui.poweredBy"),i=t&&t.position||"border";return{position:i,label:ef,verticalOffset:"inside"===i?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left",...t}}const rf="polite";class af{constructor(e){this.editor=e}announce(e,t,i=rf){const n=this.editor;this.view||(this.view=new lf(n.locale),n.ui.view.body.add(this.view));let s=this.view.regionViews.find((t=>t.regionName===e));s||(s=new cf(this.view.locale),this.view.regionViews.add(s)),s.set({regionName:e,text:t,politeness:i})}}class lf extends Ds{constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class cf extends Ds{constructor(e){super(e);const t=this.bindTemplate;this.set("regionName",""),this.set("text",""),this.set("politeness",rf),this.setTemplate({tag:"div",attributes:{role:"region","data-region":t.to("regionName"),"aria-live":t.to("politeness")},children:[{text:t.to("text")}]})}}class df extends(G()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[];const t=e.editing.view;this.editor=e,this.componentFactory=new xg(e),this.focusTracker=new Ps,this.tooltipManager=new Kg(e),this.poweredBy=new tf(e),this.ariaLiveAnnouncer=new af(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const i=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?i():this.once("ready",i)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const i=e.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let i,n;e.keystrokes.set("Alt+F10",((e,s)=>{const o=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(o)&&!Array.from(t.domRoots.values()).includes(o)&&(i=o);const r=this._getCurrentFocusedToolbarDefinition();r&&n||(n=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e<n.length;e++){const e=n.shift();if(n.push(e),e!==r&&this._focusFocusableCandidateToolbar(e)){r&&r.options.afterBlur&&r.options.afterBlur();break}}s()})),e.keystrokes.set("Esc",((t,n)=>{const s=this._getCurrentFocusedToolbarDefinition();s&&(i?(i.focus(),i=null):e.editing.view.focus(),s.options.afterBlur&&s.options.afterBlur(),n())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:i,options:n}=t;(es(i.element)||n.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>hf(e)-hf(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:i}}=e;return i&&i(),!!es(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const i={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=i.top,t.viewportOffset.bottom+=i.bottom,t.viewportOffset.left+=i.left,t.viewportOffset.right+=i.right}}function hf(e){const{toolbarView:t,options:i}=e;let n=10;return es(t.element)&&n--,i.isContextual&&n--,n}class uf extends Ds{constructor(e){super(e),this.body=new ro(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class mf extends uf{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new Ho;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class gf extends Ds{constructor(e,t,i){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((i=>{const n=e.document.getRoot(t.name);i.addClass(t.isFocused?"ck-focused":"ck-blurred",n),i.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)}))}e.isRenderingInProgress?function i(n){e.once("change:isRenderingInProgress",((e,s,o)=>{o?i(n):t(n)}))}(this):t(this)}}class ff extends gf{constructor(e,t,i,n={}){super(e,t,i);const s=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=n.label||(()=>s("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const i=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),i)}))}}class pf extends dr{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class bf extends(G()){constructor(e,t){super(),t&&zl(this,t),e&&this.set(e)}}const wf=Kn("px");class vf extends nr{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new y("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new y("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new y("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new jg(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new _f(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,i)=>{if(i<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,i])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new yf(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class _f extends Ds{constructor(e){super(e);const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ps,this.buttonPrevView=this._createButtonView(t("Previous"),bm.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),bm.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new ho(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class yf extends Ds{constructor(e,t){super(e);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:i.to("top",wf),left:i.to("left",wf),width:i.to("width",wf),height:i.to("height",wf)}},children:this.content}),this.on("change:numberOfPanels",((e,t,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new Ds;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new Hn(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}const kf=Kn("px");class Cf extends Ds{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new Ls({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?kf(this._contentPanelRect.height):null))}}}).render(),this.contentPanelElement=new Ls({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?kf(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_stickyTopOffset",(e=>e?kf(e):e)),bottom:t.to("_stickyBottomOffset",(e=>e?kf(e):e)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(Mn.document,"scroll",(()=>{this.checkIfShouldBeSticky()}),{useCapture:!0}),this.listenTo(this,"change:isActive",(()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const e=new Hn(this.limiterElement);let t=e.getVisible();if(t){const e=new Hn(Mn.window);e.top+=this.viewportTopOffset,e.height-=this.viewportTopOffset,t=t.getIntersection(e)}if(t&&e.top<t.top){const i=t.top;if(i+this._contentPanelRect.height+this.limiterBottomOffset>t.bottom){const i=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-i>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(i):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(i):this._unstick()}else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=kf(-Mn.window.scrollX)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=kf(-Mn.window.scrollX)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new Hn(this.contentPanelElement)}}class Af extends $o{constructor(e,t){const i=e.t,n=Object.assign({},{showResetButton:!0,showIcon:!0,creator:Nm},t);super(e,n.creator),this.label=t.label,this._viewConfig=n,this._viewConfig.showIcon&&(this.iconView=new lo,this.iconView.content=bm.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new ho(e),this.resetButtonView.set({label:i("Clear"),icon:bm.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",(()=>{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(e=>!e)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class xf extends Ds{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",(e=>!e))],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class Tf extends Ds{constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new Ps,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new Qo({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var Ef=/[\\^$.*+?()[\]{}|]/g,Sf=RegExp(Ef.source);const Pf=function(e){return(e=$r(e))&&Sf.test(e)?e.replace(Ef,"\\$&"):e};class If extends Ds{constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new Ps,this.keystrokes=new Is,this.resultsView=new Tf(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new xf,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new Qo({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((e,{resultsCount:t,totalItemsCount:i})=>{this.resultsCount=t,this.totalItemsCount=i})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(e){const t=e?new RegExp(Pf(e),"ig"):null,i=this.filteredView.filter(t);this.fire("search",{query:e,...i})}_createSearchTextQueryView(){const e=new Af(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",(()=>{this.search(e.fieldView.element.value)})),e.on("reset",(()=>this.reset())),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function i(e,{query:t,resultsCount:i,totalItemsCount:n}){return"function"==typeof e?e(t,i,n):e}this.on("search",((n,s)=>{if(s.resultsCount)t.set({isVisible:!1});else{const n=this._config.infoView&&this._config.infoView.text;let o,r;s.totalItemsCount?n&&n.notFound?(o=n.notFound.primary,r=n.notFound.secondary):(o=e("No results found"),r=""):n&&n.noSearchableItems?(o=n.noSearchableItems.primary,r=n.noSearchableItems.secondary):(o=e("No searchable items"),r=""),t.set({primaryText:i(o,s),secondaryText:i(r,s),isVisible:!0})}}))}}class Vf extends If{constructor(e,t){super(e,t),this._config=t;const i=Kn("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const n=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[n.if("isVisible","ck-hidden",(e=>!e)),n.to("_position",(e=>`ck-search__results_${e}`))],style:{width:n.to("_width",i)}}}),this.focusTracker.on("change:isFocused",((e,i,n)=>{this._updateResultsVisibility(),n?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())})),this.listenTo(Mn.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((e,{value:t})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=t,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new Hn(this.queryView.fieldView.element).width;const e=Vf._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:Vf.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}}Vf.defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})],Vf._getOptimalPosition=ts;const Rf=function(e){return function(t){return null==e?void 0:e[t]}};Rf({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});var Of=/[&<>"']/g;RegExp(Of.source);Kn("px");Kn("px");Kn("px");class Bf extends df{constructor(e,t){super(e),this.view=t,this._toolbarConfig=ir(e.config.get("toolbar")),this._elementReplacer=new X,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,n=t.editing.view,s=i.editable,o=n.document.getRoot();s.name=o.rootName,i.render();const r=s.element;this.setEditableElement(s.name,r),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this._initDialogPluginIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),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",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),n=e.sourceElement;let s;const o=e.config.get("placeholder");o&&(s="string"==typeof o?o:o[this.view.editable.name]),!s&&n&&"textarea"===n.tagName.toLowerCase()&&(s=n.getAttribute("placeholder")),s&&(i.placeholder=s),mr({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(e,t,i){const n=this.view.stickyPanel;if(n.isSticky){const e=new Hn(n.element).height;t.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(n,"change:isSticky",e),setTimeout((()=>{this.stopListening(n,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,t=this.editor.plugins.get("Dialog");t.on("show",(()=>{const i=t.view;i.on("moveTo",((t,n)=>{if(!e.isSticky||i.wasMoved)return;const s=new Hn(e.contentPanelElement);n[1]<s.bottom+Lg.defaultOffset&&(n[1]=s.bottom+Lg.defaultOffset)}),{priority:"high"})}),{priority:"low"})}}class Mf extends mf{constructor(e,t,i={}){super(e),this.stickyPanel=new Cf(e),this.toolbar=new _m(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new ff(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class Nf{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const i=this._listeners[e]||[];for(const e of i)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const i=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:i}),i?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function Ff(e,t=new Set){const i=[e],n=new Set;let s=0;for(;i.length>s;){const e=i[s++];if(!n.has(e)&&Df(e)&&!t.has(e))if(n.add(e),Symbol.iterator in e)try{for(const t of e)i.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&i.push(e[t])}return n}function Df(e){const t=Object.prototype.toString.call(e),i=typeof e;return!("number"===i||"boolean"===i||"string"===i||"symbol"===i||"function"===i||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function Lf(e,t,i=new Set){if(e===t&&("object"==typeof(n=e)&&null!==n))return!0;var n;const s=Ff(e,i),o=Ff(t,i);for(const e of s)if(o.has(e))return!0;return!1}class zf extends Nf{constructor(e,t={}){super(t),this._editor=null,this._initUsingData=!0,this._editables={},this._throttledSave=Qg(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,i)=>e.create(t,i)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{const e={},t=[],i=this._config.rootsAttributes||{},n={};for(const[s,o]of Object.entries(this._data.roots))o.isLoaded?(e[s]="",n[s]=i[s]||{}):t.push(s);const s={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:n,_watchdogInitialData:this._data};return delete s.initialData,s.extraPlugins.push(Hf),this._initUsingData?this.create(e,s,s.context):An(this._elementOrData)?this.create(this._elementOrData,s,s.context):this.create(this._editables,s,s.context)})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,i){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=i,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter((e=>e.isAttached()&&"$graveyard"!=e.rootName)),{plugins:i}=e,n=i.has("CommentsRepository")&&i.get("CommentsRepository"),s=i.has("TrackChanges")&&i.get("TrackChanges"),o={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach((e=>{o.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}}));for(const t of e.model.markers)t._affectsData&&(o.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return n&&(o.commentThreads=JSON.stringify(n.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),s&&(o.suggestions=JSON.stringify(s.getSuggestions({toJSON:!0,skipNotAttached:!0}))),o}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const i=this.editor.ui.getEditableElement(t);i&&(e[t]=i)}return e}_isErrorComingFromThisItem(e){return Lf(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return Cn(e,((e,t)=>An(e)||"context"===t?e:void 0))}}class Hf{constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},(e=>{this._restoreCollaborationData(),this._restoreEditorData(e)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(e,t){if("name"in t){const i=e.createElement(t.name,t.attributes);if(t.children)for(const n of t.children)i._appendChild(this._createNode(e,n));return i}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach((([i,{content:n,attributes:s}])=>{const o=JSON.parse(n),r=JSON.parse(s),a=t.model.document.getRoot(i);for(const[t,i]of r)e.setAttribute(t,i,a);for(const t of o){const i=this._createNode(e,t);e.insert(i,a,"end")}})),Object.entries(this._data.markers).forEach((([i,n])=>{const{document:s}=t.model,{rangeJSON:{start:o,end:r},...a}=n,l=s.getRoot(o.root),c=e.createPositionFromPath(l,o.path,o.stickiness),d=e.createPositionFromPath(l,r.path,r.stickiness),h=e.createRange(c,d);e.addMarker(i,{range:h,...a})}))}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach((e=>{const t=this.editor.config.get("collaboration.channelId"),i=this.editor.plugins.get("CommentsRepository");if(i.hasCommentThread(e.threadId)){i.getCommentThread(e.threadId).remove()}i.addCommentThread({channelId:t,...e})})),t.forEach((e=>{const t=this.editor.plugins.get("TrackChangesEditing");if(t.hasSuggestion(e.id)){t.getSuggestion(e.id).attributes=e.attributes}else t.addSuggestionData(e)}))}}const $f=Symbol("MainQueueId");class Wf{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const i=e===$f;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const n=(i?Promise.all(this._queues.values()):Promise.all([this._queues.get($f),this._queues.get(e)])).then(t),s=n.catch((()=>{}));return this._queues.set(e,s),n.finally((()=>{this._activeActions--,this._queues.get(e)===s&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function jf(e){return Array.isArray(e)?e:[e]}class Uf extends(gm(fm(mm))){constructor(e,t={}){if(!Gf(e)&&void 0!==t.initialData)throw new y("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return Gf(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e)),Gf(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new Mf(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new Bf(this,n),function(e){if(!$e(e.updateSourceElement))throw new y("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let i;const n=t.form,s=()=>e.updateSourceElement();$e(n.submit)&&(i=n.submit,n.submit=()=>{s(),i.apply(n)}),n.addEventListener("submit",s),e.on("destroy",(()=>{n.removeEventListener("submit",s),i&&(n.submit=i)}))}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((i=>{const n=new this(e,t);i(n.initPlugins().then((()=>n.ui.init(Gf(e)?e:null))).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}Uf.Context=cr,Uf.EditorWatchdog=zf,Uf.ContextWatchdog=class extends Nf{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new Wf,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue($f,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=jf(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new zf(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((i,{error:n,causesRestart:s})=>{this._fire("itemError",{itemId:e.id,error:n}),s&&this._actionQueues.enqueue(e.id,(()=>new Promise((i=>{const n=()=>{t.off("restart",n),this._fire("itemRestart",{itemId:e.id}),i()};t.on("restart",n)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=jf(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue($f,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue($f,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=Ff(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return Lf(this._context,e.context)}};const qf=Uf;function Gf(e){return An(e)}const Zf=["left","right","center","justify"];function Kf(e){return Zf.includes(e)}function Jf(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function Qf(e){const t=e.map((e=>{let t;return t="string"==typeof e?{name:e}:e,t})).filter((e=>{const t=Zf.includes(e.name);return t||k("alignment-config-name-not-recognized",{option:e}),t})),i=t.filter((e=>Boolean(e.className))).length;if(i&&i<t.length)throw new y("alignment-config-classnames-are-missing",{configuredOptions:e});return t.forEach(((t,i,n)=>{const s=n.slice(i+1);if(s.some((e=>e.name==t.name)))throw new y("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className){if(s.some((e=>e.className==t.className)))throw new y("alignment-config-classname-already-defined",{option:t,configuredOptions:e})}})),t}const Yf="alignment";class Xf extends or{refresh(){const e=this.editor.locale,t=Ss(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(t)&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,i=t.locale,n=t.model,s=n.document,o=e.value;n.change((e=>{const t=Array.from(s.selection.getSelectedBlocks()).filter((e=>this._canBeAligned(e))),n=t[0].getAttribute("alignment");Jf(o,i)||n===o||!o?function(e,t){for(const i of e)t.removeAttribute(Yf,i)}(t,e):function(e,t,i){for(const n of e)t.setAttribute(Yf,i,n)}(t,e,o)}))}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,Yf)}}class ep extends nr{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:Zf.map((e=>({name:e})))})}init(){const e=this.editor,t=e.locale,i=e.model.schema,n=Qf(e.config.get("alignment.options")).filter((e=>Kf(e.name)&&!Jf(e.name,t))),s=n.some((e=>!!e.className));i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),s?e.conversion.attributeToAttribute(function(e){const t={};for(const i of e)t[i.name]={key:"class",value:i.className};const i={model:{key:"alignment",values:e.map((e=>e.name))},view:t};return i}(n)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:i}of e)t[i]={key:"style",value:{"text-align":i}};const i={model:{key:"alignment",values:e.map((e=>e.name))},view:t};return i}(n));const o=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"style",value:{"text-align":i}},model:{key:"alignment",value:i}});return t}(n);for(const t of o)e.conversion.for("upcast").attributeToAttribute(t);const r=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"align",value:i},model:{key:"alignment",value:i}});return t}(n);for(const t of r)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new Xf(e))}}const tp=new Map([["left",bm.alignLeft],["right",bm.alignRight],["center",bm.alignCenter],["justify",bm.alignJustify]]);class ip extends nr{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"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t,n=Qf(e.config.get("alignment.options"));n.map((e=>e.name)).filter(Kf).forEach((e=>this._addButton(e))),t.add("alignment",(s=>{const o=Pm(s);Im(o,(()=>n.map((e=>t.create(`alignment:${e.name}`)))),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:i("Text alignment toolbar")}),o.buttonView.set({label:i("Text alignment"),tooltip:!0}),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const r="rtl"===s.contentLanguageDirection?tp.get("right"):tp.get("left"),a=e.commands.get("alignment");return o.buttonView.bind("icon").to(a,"value",(e=>tp.get(e)||r)),o.bind("isEnabled").to(a,"isEnabled"),this.listenTo(o,"execute",(()=>{e.editing.view.focus()})),o}))}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,(i=>{const n=t.commands.get("alignment"),s=new ho(i);return s.set({label:this.localizedOptionTitles[e],icon:tp.get(e),tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(n),s.bind("isOn").to(n,"value",(t=>t===e)),this.listenTo(s,"execute",(()=>{t.execute("alignment",{value:e}),t.editing.view.focus()})),s}))}}class np{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class sp extends or{constructor(e,t){super(e),this._buffer=new np(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,i=t.document,n=e.text||"",s=n.length;let o=i.selection;if(e.selection?o=e.selection:e.range&&(o=t.createSelection(e.range)),!t.canEditAt(o))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock();const a=Array.from(i.selection.getAttributes());t.deleteContent(o),n&&t.insertContent(e.createText(n,a),o),r?e.setSelection(r):o.is("documentSelection")||e.setSelection(o),this._buffer.unlock(),this._buffer.input(s)}))}}const op=["insertText","insertReplacementText"];class rp extends Ll{constructor(e){super(e),this.focusObserver=e.getObserver(gc),l.isAndroid&&op.push("insertCompositionText");const t=e.document;t.on("beforeinput",((i,n)=>{if(!this.isEnabled)return;const{data:s,targetRanges:o,inputType:r,domEvent:a}=n;if(!op.includes(r))return;this.focusObserver.flush();const l=new f(t,"insertText");t.fire(l,new Hl(e,a,{text:s,selection:e.createSelection(o)})),l.stop.called&&i.stop()})),t.on("compositionend",((i,{data:n,domEvent:s})=>{this.isEnabled&&!l.isAndroid&&n&&t.fire("insertText",new Hl(e,s,{text:n,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class ap extends nr{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,i=e.editing.view,n=t.document.selection;i.addObserver(rp);const s=new sp(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",s),e.commands.add("input",s),this.listenTo(i.document,"insertText",((n,s)=>{i.document.isComposing||s.preventDefault();const{text:o,selection:r,resultRange:a}=s,c=Array.from(r.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=o;if(l.isAndroid){const e=Array.from(c[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),c[0].start=c[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(c[0].start=c[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:t.createSelection(c)};a&&(h.resultRange=e.editing.mapper.toModelRange(a)),e.execute("insertText",h),i.scrollToTheSelection()})),l.isAndroid?this.listenTo(i.document,"keydown",((e,o)=>{!n.isCollapsed&&229==o.keyCode&&i.document.isComposing&&lp(t,s)})):this.listenTo(i.document,"compositionstart",(()=>{n.isCollapsed||lp(t,s)}))}}function lp(e,t){if(!t.isEnabled)return;const i=t.buffer;i.lock(),e.enqueueChange(i.batch,(()=>{e.deleteContent(e.document.selection)})),i.unlock()}class cp extends or{constructor(e,t){super(e),this.direction=t,this._buffer=new np(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,i=t.document;t.enqueueChange(this._buffer.batch,(n=>{this._buffer.lock();const s=n.createSelection(e.selection||i.selection);if(!t.canEditAt(s))return;const o=e.sequence||1,r=s.isCollapsed;if(s.isCollapsed&&t.modifySelection(s,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(o))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(s,o))return void this.editor.execute("paragraph",{selection:s});if(s.isCollapsed)return;let a=0;s.getFirstRange().getMinimalFlatRanges().forEach((e=>{a+=ee(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(s,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(a),n.setSelection(s),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const s=n.getChild(0);return!s||!s.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,i=t.document.selection,n=t.schema.getLimitElement(i),s=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(s,n),e.setSelection(s,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const i=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const n=e.getFirstPosition(),s=i.schema.getLimitElement(n),o=s.getChild(0);return n.parent==o&&(!!e.containsEntireContent(o)&&(!!i.schema.checkChild(s,"paragraph")&&"paragraph"!=o.name))}}const dp="word",hp="selection",up="backward",mp="forward",gp={deleteContent:{unit:hp,direction:up},deleteContentBackward:{unit:"codePoint",direction:up},deleteWordBackward:{unit:dp,direction:up},deleteHardLineBackward:{unit:hp,direction:up},deleteSoftLineBackward:{unit:hp,direction:up},deleteContentForward:{unit:"character",direction:mp},deleteWordForward:{unit:dp,direction:mp},deleteHardLineForward:{unit:hp,direction:mp},deleteSoftLineForward:{unit:hp,direction:mp}};class fp extends Ll{constructor(e){super(e);const t=e.document;let i=0;t.on("keydown",(()=>{i++})),t.on("keyup",(()=>{i=0})),t.on("beforeinput",((n,s)=>{if(!this.isEnabled)return;const{targetRanges:o,domEvent:r,inputType:a}=s,c=gp[a];if(!c)return;const d={direction:c.direction,unit:c.unit,sequence:i};d.unit==hp&&(d.selectionToRemove=e.createSelection(o[0])),"deleteContentBackward"===a&&(l.isAndroid&&(d.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let i=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,n=e.offset;if(Os(t,n)||Bs(t,n)||Ns(t,n))continue;i++}else i++;if(i>1)return!0}return!1}(o)&&(d.unit=hp,d.selectionToRemove=e.createSelection(o)));const h=new Fa(t,"delete",o[0]);t.fire(h,new Hl(e,r,d)),h.stop.called&&n.stop()})),l.isBlink&&function(e){const t=e.view,i=t.document;let n=null,s=!1;function o(e){return e==ps.backspace||e==ps.delete}function r(e){return e==ps.backspace?up:mp}i.on("keydown",((e,{keyCode:t})=>{n=t,s=!1})),i.on("keyup",((a,{keyCode:l,domEvent:c})=>{const d=i.selection,h=e.isEnabled&&l==n&&o(l)&&!d.isCollapsed&&!s;if(n=null,h){const e=d.getFirstRange(),n=new Fa(i,"delete",e),s={unit:hp,direction:r(l),selectionToRemove:d};i.fire(n,new Hl(t,c,s))}})),i.on("beforeinput",((e,{inputType:t})=>{const i=gp[t];o(n)&&i&&i.direction==r(n)&&(s=!0)}),{priority:"high"}),i.on("beforeinput",((e,{inputType:t,data:i})=>{n==ps.delete&&"insertText"==t&&""==i&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class pp extends nr{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,i=t.document,n=e.model.document;t.addObserver(fp),this._undoOnBackspace=!1;const s=new cp(e,"forward");e.commands.add("deleteForward",s),e.commands.add("forwardDelete",s),e.commands.add("delete",new cp(e,"backward")),this.listenTo(i,"delete",((n,s)=>{i.isComposing||s.preventDefault();const{direction:o,sequence:r,selectionToRemove:a,unit:l}=s,c="forward"===o?"deleteForward":"delete",d={sequence:r};if("selection"==l){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=l;e.execute(c,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(i,"delete",((t,i)=>{this._undoOnBackspace&&"backward"==i.direction&&1==i.sequence&&"codePoint"==i.unit&&(this._undoOnBackspace=!1,e.execute("undo"),i.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(n,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class bp extends nr{static get requires(){return[ap,pp]}static get pluginName(){return"Typing"}}function wp(e,t){let i=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce(((e,{item:n})=>n.is("$text")||n.is("$textProxy")?e+n.data:(i=t.createPositionAfter(n),"")),""),range:t.createRange(i,e.end)}}class vp extends(G()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:i})=>{i&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const i=this.model,n=i.document.selection,s=i.createRange(i.createPositionAt(n.focus.parent,0),n.focus),{text:o,range:r}=wp(s,i),a=this.testCallback(o);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const i=Object.assign(t,{text:o,range:r});"object"==typeof a&&Object.assign(i,a),this.fire(`matched:${e}`,i)}}}class _p extends nr{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,i=e.editing.view,n=e.locale,s=t.document.selection;this.listenTo(i.document,"arrowKey",((e,t)=>{if(!s.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const i=t.keyCode==ps.arrowright,o=t.keyCode==ps.arrowleft;if(!i&&!o)return;const r=n.contentLanguageDirection;let a=!1;a="ltr"===r&&i||"rtl"===r&&o?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this.listenTo(s,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Tp(s.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,s=n.getFirstPosition();return!this._isGravityOverridden&&((!s.isAtStart||!yp(n,t))&&(!!Tp(s,t)&&(Ap(e),yp(n,t)&&Tp(s,t,!0)?Cp(i,t):this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,i=this.editor.model,n=i.document.selection,s=n.getFirstPosition();return this._isGravityOverridden?(Ap(e),this._restoreGravity(),Tp(s,t,!0)?Cp(i,t):kp(i,t,s),!0):s.isAtStart?!!yp(n,t)&&(Ap(e),kp(i,t,s),!0):!yp(n,t)&&Tp(s,t,!0)?(Ap(e),kp(i,t,s),!0):!!xp(s,t)&&(s.isAtEnd&&!yp(n,t)&&Tp(s,t)?(Ap(e),kp(i,t,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view.document;e.editing.view.addObserver(Cu);let s=!1;this.listenTo(n,"mousedown",(()=>{s=!0})),this.listenTo(n,"selectionChange",(()=>{const e=this.attributes;if(!s)return;if(s=!1,!i.isCollapsed)return;if(!yp(i,e))return;const n=i.getFirstPosition();Tp(n,e)&&(n.isAtStart||Tp(n,e,!0)?Cp(t,e):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,i=this.attributes;this.listenTo(e,"insertContent",(()=>{const n=t.getFirstPosition();yp(t,i)&&Tp(n,i)&&Cp(e,i)}),{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view;let s=!1,o=!1;this.listenTo(n.document,"delete",((e,t)=>{s="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{if(!s)return;const e=i.getFirstPosition();o=yp(i,this.attributes)&&!xp(e,this.attributes)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{s&&(s=!1,o||e.model.enqueueChange((()=>{const e=i.getFirstPosition();yp(i,this.attributes)&&Tp(e,this.attributes)&&(e.isAtStart||Tp(e,this.attributes,!0)?Cp(t,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function yp(e,t){for(const i of t)if(e.hasAttribute(i))return!0;return!1}function kp(e,t,i){const n=i.nodeBefore;e.change((i=>{if(n){const t=[],s=e.schema.isObject(n)&&e.schema.isInline(n);for(const[i,o]of n.getAttributes())!e.schema.checkAttribute("$text",i)||s&&!1===e.schema.getAttributeProperties(i).copyFromObject||t.push([i,o]);i.setSelectionAttribute(t)}else i.removeSelectionAttribute(t)}))}function Cp(e,t){e.change((e=>{e.removeSelectionAttribute(t)}))}function Ap(e){e.preventDefault()}function xp(e,t){return Tp(e.getShiftedBy(-1),t)}function Tp(e,t,i=!1){const{nodeBefore:n,nodeAfter:s}=e;for(const e of t){const t=n?n.getAttribute(e):void 0,o=s?s.getAttribute(e):void 0;if((!i||void 0!==t&&void 0!==o)&&o!==t)return!0}return!1}const Ep={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:Op('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:Op("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:Op("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:Op('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:Op('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:Op("'"),to:[null,"‚",null,"’"]}},Sp={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Pp=["symbols","mathematical","typography","quotes"];function Ip(e){return"string"==typeof e?new RegExp(`(${Pf(e)})$`):e}function Vp(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function Rp(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function Op(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Bp(e,t,i,n){return n.createRange(Mp(e,t,i,!0,n),Mp(e,t,i,!1,n))}function Mp(e,t,i,n,s){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),r=null;for(;o&&o.getAttribute(t)==i;)r=o,o=n?o.previousSibling:o.nextSibling;return r?s.createPositionAt(r,n?"before":"after"):e}function Np(e,t,i,n){const s=e.editing.view,o=new Set;s.document.registerPostFixer((s=>{const r=e.model.document.selection;let a=!1;if(r.hasAttribute(t)){const l=Bp(r.getFirstPosition(),t,r.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",i)&&!e.hasClass(n)&&(s.addClass(n,e),o.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){s.change((e=>{for(const t of o.values())e.removeClass(n,t),o.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}function Fp(e,t,i,n){let s,o=null;"function"==typeof n?s=n:(o=e.commands.get(n),s=()=>{e.execute(n)}),e.model.document.on("change:data",((r,a)=>{if(o&&!o.isEnabled||!t.isEnabled)return;const l=Ss(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const h=d.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(o&&!0===o.value)return;const u=h.getChild(0),m=e.model.createRangeOn(u);if(!m.containsRange(l)&&!l.end.isEqual(m.end))return;const g=i.exec(u.data.substr(0,l.end.offset));g&&e.model.enqueueChange((t=>{const i=t.createPositionAt(h,0),n=t.createPositionAt(h,g[0].length),o=new Yc(i,n);if(!1!==s({match:g})){t.remove(o);const i=e.model.document.selection.getFirstRange(),n=t.createRangeIn(h);!h.isEmpty||n.isEqual(i)||n.containsRange(i,!0)||t.remove(h)}o.detach(),e.model.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Dp(e,t,i,n){let s,o;i instanceof RegExp?s=i:o=i,o=o||(e=>{let t;const i=[],n=[];for(;null!==(t=s.exec(e))&&!(t&&t.length<4);){let{index:e,1:s,2:o,3:r}=t;const a=s+o+r;e+=t[0].length-a.length;const l=[e,e+s.length],c=[e+s.length+o.length,e+s.length+o.length+r.length];i.push(l),i.push(c),n.push([e+s.length,e+s.length+o.length])}return{remove:i,format:n}}),e.model.document.on("change:data",((i,s)=>{if(s.isUndo||!s.isLocal||!t.isEnabled)return;const r=e.model,a=r.document.selection;if(!a.isCollapsed)return;const l=Array.from(r.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,h=d.parent,{text:u,range:m}=function(e,t){let i=e.start;const n=Array.from(e.getItems()).reduce(((e,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(i=t.createPositionAfter(n),""):e+n.data),"");return{text:n,range:t.createRange(i,e.end)}}(r.createRange(r.createPositionAt(h,0),d),r),g=o(u),f=Lp(m.start,g.format,r),p=Lp(m.start,g.remove,r);f.length&&p.length&&r.enqueueChange((t=>{if(!1!==n(t,f)){for(const e of p.reverse())t.remove(e);r.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function Lp(e,t,i){return t.filter((e=>void 0!==e[0]&&void 0!==e[1])).map((t=>i.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1]))))}function zp(e,t){return(i,n)=>{if(!e.commands.get(t).isEnabled)return!1;const s=e.model.schema.getValidRanges(n,t);for(const e of s)i.setAttribute(t,!0,e);i.removeSelectionAttribute(t)}}class Hp extends or{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const s=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of s)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const $p="bold";class Wp extends nr{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:$p}),e.model.schema.setAttributeProperties($p,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:$p,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add($p,new Hp(e,$p)),e.keystrokes.set("CTRL+B",$p)}}const jp="bold";class Up extends nr{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(jp,(i=>{const n=e.commands.get(jp),s=new ho(i);return s.set({label:t("Bold"),icon:bm.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(jp),e.editing.view.focus()})),s}))}}const qp="code";class Gp extends nr{static get pluginName(){return"CodeEditing"}static get requires(){return[_p]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:qp}),e.model.schema.setAttributeProperties(qp,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:qp,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(qp,new Hp(e,qp)),e.plugins.get(_p).registerAttribute(qp),Np(e,qp,"code","ck-code_selected")}}const Zp="code";class Kp extends nr{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Zp,(i=>{const n=e.commands.get(Zp),s=new ho(i);return s.set({label:t("Code"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>',tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(Zp),e.editing.view.focus()})),s}))}}const Jp="italic";class Qp extends nr{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Jp}),e.model.schema.setAttributeProperties(Jp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Jp,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Jp,new Hp(e,Jp)),e.keystrokes.set("CTRL+I",Jp)}}const Yp="italic";class Xp extends nr{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Yp,(i=>{const n=e.commands.get(Yp),s=new ho(i);return s.set({label:t("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(Yp),e.editing.view.focus()})),s}))}}const eb="strikethrough";class tb extends nr{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:eb}),e.model.schema.setAttributeProperties(eb,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:eb,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(eb,new Hp(e,eb)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const ib="strikethrough";class nb extends nr{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(ib,(i=>{const n=e.commands.get(ib),s=new ho(i);return s.set({label:t("Strikethrough"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(ib),e.editing.view.focus()})),s}))}}const sb="underline";class ob extends nr{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:sb}),e.model.schema.setAttributeProperties(sb,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:sb,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(sb,new Hp(e,sb)),e.keystrokes.set("CTRL+U","underline")}}const rb="underline";class ab extends nr{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(rb,(i=>{const n=e.commands.get(rb),s=new ho(i);return s.set({label:t("Underline"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(rb),e.editing.view.focus()})),s}))}}function*lb(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class cb extends or{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,i=t.document.selection,n=t.schema,s=i.isCollapsed,o=i.getFirstRange(),r=o.start.parent,a=o.end.parent;if(n.isLimit(r)||n.isLimit(a))return s||r!=a||t.deleteContent(i),!1;if(s){const t=lb(e.model.schema,i.getAttributes());return db(e,o.start),e.setSelectionAttribute(t),!0}{const n=!(o.start.isAtStart&&o.end.isAtEnd),s=r==a;if(t.deleteContent(i,{leaveUnmerged:n}),n){if(s)return db(e,i.focus),!0;e.setSelection(a,0)}}return!1}}function db(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const hb={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class ub extends Ll{constructor(e){super(e);const t=this.document;let i=!1;t.on("keydown",((e,t)=>{i=t.shiftKey})),t.on("beforeinput",((n,s)=>{if(!this.isEnabled)return;let o=s.inputType;l.isSafari&&i&&"insertParagraph"==o&&(o="insertLineBreak");const r=s.domEvent,a=hb[o];if(!a)return;const c=new Fa(t,"enter",s.targetRanges[0]);t.fire(c,new Hl(e,r,{isSoft:a.isSoft})),c.stop.called&&n.stop()}))}observe(){}stopObserving(){}}class mb extends nr{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,i=t.document;t.addObserver(ub),e.commands.add("enter",new cb(e)),this.listenTo(i,"enter",((n,s)=>{i.isComposing||s.preventDefault(),s.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class gb extends or{execute(){const e=this.editor.model,t=e.document;e.change((i=>{!function(e,t,i){const n=i.isCollapsed,s=i.getFirstRange(),o=s.start.parent,r=s.end.parent,a=o==r;if(n){const n=lb(e.schema,i.getAttributes());fb(e,t,s.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(s.start.isAtStart&&s.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:n}),a?fb(e,t,i.focus):n&&t.setSelection(r,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const n=t.getFirstRange(),s=n.start.parent,o=n.end.parent;if((pb(s,e)||pb(o,e))&&s!==o)return!1;return!0}(e.schema,t.selection)}}function fb(e,t,i){const n=t.createElement("softBreak");e.insertContent(n,i),t.setSelection(n,"after")}function pb(e,t){return!e.is("rootElement")&&(t.isLimit(e)||pb(e.parent,t))}class bb extends nr{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,i=e.conversion,n=e.editing.view,s=n.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(ub),e.commands.add("shiftEnter",new gb(e)),this.listenTo(s,"enter",((t,i)=>{s.isComposing||i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())}),{priority:"low"})}}class wb extends or{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.schema,n=t.document.selection,s=Array.from(n.getSelectedBlocks()),o=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(o){const t=s.filter((e=>vb(e)||yb(i,e)));this._applyQuote(e,t)}else this._removeQuote(e,s.filter(vb))}))}_getValue(){const e=Ss(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!vb(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=Ss(e.getSelectedBlocks());return!!i&&yb(t,i)}_removeQuote(e,t){_b(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const i=e.createPositionBefore(t.start.parent);return void e.move(t,i)}t.end.isAtEnd||e.split(t.end);const i=e.createPositionAfter(t.end.parent);e.move(t,i)}))}_applyQuote(e,t){const i=[];_b(e,t).reverse().forEach((t=>{let n=vb(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),i.push(n)})),i.reverse().reduce(((t,i)=>t.nextSibling==i?(e.merge(e.createPositionAfter(t)),t):i))}}function vb(e){return"blockQuote"==e.parent.name?e.parent:null}function _b(e,t){let i,n=0;const s=[];for(;n<t.length;){const o=t[n],r=t[n+1];i||(i=e.createPositionBefore(o)),r&&o.nextSibling==r||(s.push(e.createRange(i,e.createPositionAfter(o))),i=null),n++}return s}function yb(e,t){const i=e.checkChild(t.parent,"blockQuote"),n=e.checkChild(["$root","blockQuote"],t);return i&&n}class kb extends nr{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[mb,pp]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new wb(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer((i=>{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 i.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return i.unwrap(n),!0;if(n.is("element")){const e=i.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(i.createPositionBefore(n),n))return i.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return i.remove(t),!0}return!1}));const i=this.editor.editing.view.document,n=e.model.document.selection,s=e.commands.get("blockQuote");this.listenTo(i,"enter",((t,i)=>{if(!n.isCollapsed||!s.value)return;n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(i,"delete",((t,i)=>{if("backward"!=i.direction||!n.isCollapsed||!s.value)return;const o=n.getLastPosition().parent;o.isEmpty&&!o.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"})}}class Cb extends nr{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",(i=>{const n=e.commands.get("blockQuote"),s=new ho(i);return s.set({label:t("Block quote"),icon:bm.quote,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),s}))}}class Ab extends $l{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function i(e){return(i,n)=>{n.preventDefault();const s=n.dropRange?[n.dropRange]:null,o=new f(t,e);t.fire(o,{dataTransfer:n.dataTransfer,method:i.name,targetRanges:s,target:n.target,domEvent:n.domEvent}),o.stop.called&&n.stopPropagation()}}this.listenTo(t,"paste",i("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",i("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",i("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,i="drop"==e.type||"paste"==e.type,n={dataTransfer:new bc(t,{cacheFiles:i})};"drop"!=e.type&&"dragover"!=e.type||(n.dropRange=function(e,t){const i=t.target.ownerDocument,n=t.clientX,s=t.clientY;let o;i.caretRangeFromPoint&&i.caretRangeFromPoint(n,s)?o=i.caretRangeFromPoint(n,s):t.rangeParent&&(o=i.createRange(),o.setStart(t.rangeParent,t.rangeOffset),o.collapse(!0));if(o)return e.domConverter.domRangeToView(o);return null}(this.view,e)),this.fire(e.type,e,n)}}const xb=["figcaption","li"],Tb=["ol","ul"];function Eb(e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return"\n";let t="",i=null;for(const n of e.getChildren())t+=Sb(n,i)+Eb(n),i=n;return t}function Sb(e,t){return t?e.is("element","li")&&!e.isEmpty&&e.getChild(0).is("containerElement")||Tb.includes(e.name)&&Tb.includes(t.name)?"\n\n":e.is("containerElement")||t.is("containerElement")?xb.includes(e.name)||xb.includes(t.name)?"\n":"\n\n":"":""}class Pb extends nr{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(Ab),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,i){const n=this.editor.model.getSelectedContent(t);this.fire("outputTransformation",{dataTransfer:e,content:n,method:i})}_setupPasteDrop(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document;this.listenTo(n,"clipboardInput",((t,i)=>{"paste"!=i.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(n,"clipboardInput",((e,t)=>{const n=t.dataTransfer;let s;if(t.content)s=t.content;else{let e="";n.getData("text/html")?e=function(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(/<!--[\s\S]*?-->/g,"")}(n.getData("text/html")):n.getData("text/plain")&&(((o=(o=n.getData("text/plain")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).includes("</p><p>")||o.includes("<br>"))&&(o=`<p>${o}</p>`),e=o),s=this.editor.data.htmlProcessor.toView(e)}var o;const r=new f(this,"inputTransformation");this.fire(r,{content:s,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),r.stop.called&&e.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,i)=>{if(i.content.isEmpty)return;const n=this.editor.data.toModel(i.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:n,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,i)=>{i.resultRange=t.insertContent(i.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,i=e.editing.view.document,n=(e,i)=>{const n=i.dataTransfer;i.preventDefault(),this._fireOutputTransformationEvent(n,t.selection,e.name)};this.listenTo(i,"copy",n,{priority:"low"}),this.listenTo(i,"cut",((t,i)=>{e.model.canEditAt(e.model.document.selection)?n(t,i):i.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,n)=>{const s=e.data.toView(n.content);i.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:s,method:n.method})}),{priority:"low"}),this.listenTo(i,"clipboardOutput",((i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",Eb(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}class Ib extends(V()){constructor(){super(...arguments),this._stack=[]}add(e,t){const i=this._stack,n=i[0];this._insertDescriptor(e);const s=i[0];n===s||Vb(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:t})}remove(e,t){const i=this._stack,n=i[0];this._removeDescriptor(e);const s=i[0];n===s||Vb(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex((t=>t.id===e.id));if(Vb(e,t[i]))return;i>-1&&t.splice(i,1);let n=0;for(;t[n]&&Rb(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex((t=>t.id===e));i>-1&&t.splice(i,1)}}function Vb(e,t){return e&&t&&e.priority==t.priority&&Ob(e.classes)==Ob(t.classes)}function Rb(e,t){return e.priority>t.priority||!(e.priority<t.priority)&&Ob(e.classes)>Ob(t.classes)}function Ob(e){return Array.isArray(e)?e.sort().join(","):e}const Bb='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',Mb="ck-widget",Nb="ck-widget_selected";function Fb(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Db(e,t,i={}){if(!e.is("containerElement"))throw new y("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(Mb,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=jb,t.setCustomProperty("widgetLabel",[],e),i.label&&function(e,t){const i=e.getCustomProperty("widgetLabel");i.push(t)}(e,i.label),i.hasSelectionHandle&&function(e,t){const i=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),i=new lo;return i.set("content",Bb),i.render(),t.appendChild(i.element),t}));t.insert(t.createPositionAt(e,0),i),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),Hb(e,t),e}function Lb(e,t,i){if(t.classes&&i.addClass(ks(t.classes),e),t.attributes)for(const n in t.attributes)i.setAttribute(n,t.attributes[n],e)}function zb(e,t,i){if(t.classes&&i.removeClass(ks(t.classes),e),t.attributes)for(const n in t.attributes)i.removeAttribute(n,e)}function Hb(e,t,i=Lb,n=zb){const s=new Ib;s.on("change:top",((t,s)=>{s.oldDescriptor&&n(e,s.oldDescriptor,s.writer),s.newDescriptor&&i(e,s.newDescriptor,s.writer)}));t.setCustomProperty("addHighlight",((e,t,i)=>s.add(t,i)),e),t.setCustomProperty("removeHighlight",((e,t,i)=>s.remove(t,i)),e)}function $b(e,t,i={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),i.label&&t.setAttribute("aria-label",i.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((i,n,s)=>{t.setAttribute("contenteditable",s?"false":"true",e)})),e.on("change:isFocused",((i,n,s)=>{s?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),Hb(e,t),e}function Wb(e,t){const i=e.getSelectedElement();if(i){const n=Gb(e);if(n)return t.createRange(t.createPositionAt(i,n))}return t.schema.findOptimalInsertionRange(e)}function jb(){return null}const Ub="widget-type-around";function qb(e,t,i){return!!e&&Fb(e)&&!i.isInline(t)}function Gb(e){return e.getAttribute(Ub)}const Zb=["before","after"],Kb=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild,Jb="ck-widget__type-around_disabled";class Qb extends nr{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[mb,pp]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((i,n,s)=>{t.change((e=>{for(const i of t.document.roots)s?e.removeClass(Jb,i):e.addClass(Jb,i)})),s||e.model.change((e=>{e.removeSelectionAttribute(Ub)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,n=i.editing.view,s=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:s}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,i,n){this.listenTo(e,t,((...e)=>{this.isEnabled&&i(...e)}),n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=Gb(e);if(!t)return!1;const i=e.getSelectedElement();return this._insertParagraph(i,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,n={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,s,o)=>{const r=o.mapper.toViewElement(s.item);if(r&&qb(r,s.item,t)){!function(e,t,i){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const i=this.toDomElement(e);return function(e,t){for(const i of Zb){const n=new Ls({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${i}`],title:t[i],"aria-hidden":"true"},children:[e.ownerDocument.importNode(Kb,!0)]});e.appendChild(n.render())}}(i,t),function(e){const t=new Ls({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(i),i}));e.insert(e.createPositionAt(i,"end"),n)}(o.writer,n,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,n=t.schema,s=e.editing.view;function o(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(s.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[Fb,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",((t,i)=>{i.directChange&&e.model.change((e=>{e.removeSelectionAttribute(Ub)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=i.getSelectedElement();if(t){if(qb(e.editing.mapper.toViewElement(t),t,n))return}e.model.change((e=>{e.removeSelectionAttribute(Ub)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,i)=>{const s=i.writer;if(this._currentFakeCaretModelElement){const e=i.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(s.removeClass(Zb.map(o),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=i.mapper.toViewElement(r);if(!qb(a,r,n))return;const l=Gb(t.selection);l&&(s.addClass(o(l),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,i,n)=>{n||e.model.change((e=>{e.removeSelectionAttribute(Ub)}))}))}_handleArrowKeyPress(e,t){const i=this.editor,n=i.model,s=n.document.selection,o=n.schema,r=i.editing.view,a=function(e,t){const i=ys(e,t);return"down"===i||"right"===i}(t.keyCode,i.locale.contentLanguageDirection),l=r.document.selection.getSelectedElement();let c;qb(l,i.editing.mapper.toModelElement(l),o)?c=this._handleArrowKeyPressOnSelectedWidget(a):s.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,i=Gb(t.document.selection);return t.change((t=>{if(!i)return t.setSelectionAttribute(Ub,e?"after":"before"),!0;if(!(i===(e?"after":"before")))return t.removeSelectionAttribute(Ub),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,n=i.schema,s=t.plugins.get("Widget"),o=s._getObjectElementNextToSelection(e);return!!qb(t.editing.mapper.toViewElement(o),o,n)&&(i.change((t=>{s._setSelectionOverElement(o),t.setSelectionAttribute(Ub,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,n=i.schema,s=t.editing.mapper,o=i.document.selection,r=e?o.getLastPosition().nodeBefore:o.getFirstPosition().nodeAfter;return!!qb(s.toViewElement(r),r,n)&&(i.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(Ub,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((i,n)=>{const s=n.domTarget.closest(".ck-widget__type-around__button");if(!s)return;const o=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(s),r=function(e,t){const i=e.closest(".ck-widget");return t.mapDomToView(i)}(s,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,o),n.preventDefault(),i.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",((i,n)=>{if("atTarget"!=i.eventPhase)return;const s=t.getSelectedElement(),o=e.editing.mapper.toViewElement(s),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:qb(o,s,r)&&(this._insertParagraph(s,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),i.stop())}),{context:Fb})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,i)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(i.selection=e.selection)}),{priority:"high"}),l.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,n=i.schema;this._listenToIfEnabled(t.document,"delete",((t,s)=>{if("atTarget"!=t.eventPhase)return;const o=Gb(i.document.selection);if(!o)return;const r=s.direction,a=i.document.selection.getSelectedElement(),l="forward"==r;if("before"===o===l)e.execute("delete",{selection:i.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(i.createPositionAt(a,o),r);if(t)if(t.isCollapsed){const s=i.createSelection(t.start);if(i.modifySelection(s,{direction:r}),s.focus.isEqual(t.start)){const e=function(e,t){let i=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;i=n}return i}(n,t.start.parent);i.deleteContent(i.createSelection(e,"on"),{doNotAutoparagraph:!0})}else i.change((i=>{i.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else i.change((i=>{i.setSelection(t),e.execute(l?"deleteForward":"delete")}))}s.preventDefault(),t.stop()}),{context:Fb})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[n,s])=>{if(s&&!s.is("documentSelection"))return;const o=Gb(i);return o?(e.stop(),t.change((e=>{const s=i.getSelectedElement(),r=t.createPositionAt(s,o),a=e.createSelection(r),l=t.insertContent(n,a);return e.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,i)=>{const[,n,s={}]=i;if(n&&!n.is("documentSelection"))return;const o=Gb(t);o&&(s.findOptimalPosition=o,i[3]=s)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[i])=>{if(i&&!i.is("documentSelection"))return;Gb(t)&&e.stop()}),{priority:"high"})}}function Yb(e){const t=e.model;return(i,n)=>{const s=n.keyCode==ps.arrowup,o=n.keyCode==ps.arrowdown,r=n.shiftKey,a=t.document.selection;if(!s&&!o)return;const l=o;if(r&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,i){const n=e.model;if(i){const e=t.isCollapsed?t.focus:t.getLastPosition(),i=Xb(n,e,"forward");if(!i)return null;const s=n.createRange(e,i),o=ew(n.schema,s,"backward");return o?n.createRange(e,o):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),i=Xb(n,e,"backward");if(!i)return null;const s=n.createRange(i,e),o=ew(n.schema,s,"forward");return o?n.createRange(o,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(r)return}(c.isCollapsed||function(e,t,i){const n=e.model,s=e.view.domConverter;if(i){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const o=e.mapper.toViewRange(t),r=s.viewRangeToDom(o),a=Hn.getDomRangeRects(r);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change((e=>{const i=l?c.end:c.start;if(r){const n=t.createSelection(a.anchor);n.setFocus(i),e.setSelection(n)}else e.setSelection(i)})),i.stop(),n.preventDefault(),n.stopPropagation())}}}function Xb(e,t,i){const n=e.schema,s=e.createRangeIn(t.root),o="forward"==i?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of s.getWalker({startPosition:t,direction:i})){if(n.isLimit(r)&&!n.isInline(r))return e;if(a==o&&n.isBlock(r))return null}return null}function ew(e,t,i){const n="backward"==i?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:i}))if(e.checkChild(n,"$text"))return n;return null}class tw extends nr{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Qb,pp]}init(){const e=this.editor,t=e.editing.view,i=t.document;this.editor.editing.downcastDispatcher.on("selection",((t,i,n)=>{const s=n.writer,o=i.selection;if(o.isCollapsed)return;const r=o.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);var l;Fb(a)&&(n.consumable.consume(o,"selection")&&s.setSelection(s.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((e,t,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,s=n.document.selection;let o=null;for(const e of s.getRanges())for(const t of e){const e=t.item;Fb(e)&&!iw(e,o)&&(n.addClass(Nb,e),this._previouslySelected.add(e),o=e)}}),{priority:"low"}),t.addObserver(Cu),this.listenTo(i,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(i,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[Fb,"$text"]}),this.listenTo(i,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(i,"arrowKey",Yb(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const i=this.editor,n=i.editing.view,s=n.document;let o=t.target;if(t.domEvent.detail>=3)return void(this._selectBlockContent(o)&&t.preventDefault());if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Fb(t))return!1;t=t.parent}return!1}(o))return;if(!Fb(o)&&(o=o.findAncestor(Fb),!o))return;l.isAndroid&&t.preventDefault(),s.isFocused||n.focus();const r=i.editing.mapper.toModelElement(o);this._setSelectionOverElement(r)}_selectBlockContent(e){const t=this.editor,i=t.model,n=t.editing.mapper,s=i.schema,o=n.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),r=function(e,t){for(const i of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(i,"$text"))return i;if(t.isLimit(i)&&!t.isObject(i))break}return null}(n.toModelElement(o),i.schema);return!!r&&(i.change((e=>{const t=s.isLimit(r)?null:function(e,t){const i=new Ic({startPosition:e});for(const{item:e}of i){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(r),s),i=e.createPositionAt(r,0),n=t?e.createPositionAt(t,0):e.createPositionAt(r,"end");e.setSelection(e.createRange(i,n))})),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,n=this.editor.model,s=n.schema,o=n.document.selection,r=o.getSelectedElement(),a=ys(i,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(r&&s.isObject(r)){const i=l?o.getLastPosition():o.getFirstPosition(),r=s.getNearestSelectionRange(i,l?"forward":"backward");return void(r&&(n.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!o.isCollapsed&&!t.shiftKey){const i=o.getFirstPosition(),r=o.getLastPosition(),a=i.nodeAfter,c=r.nodeBefore;return void((a&&s.isObject(a)||c&&s.isObject(c))&&(n.change((e=>{e.setSelection(l?r:i)})),t.preventDefault(),e.stop()))}if(!o.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&s.isObject(d)){if(s.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,n=i.schema,s=i.document.selection.getSelectedElement();s&&n.isObject(s)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);return i?(this.editor.model.change((e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(i)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,n=t.document.selection,s=t.createSelection(n);if(t.modifySelection(s,{direction:e?"forward":"backward"}),s.isEqual(n))return null;const o=e?s.focus.nodeBefore:s.focus.nodeAfter;return o&&i.isObject(o)?o:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Nb,t);this._previouslySelected.clear()}}function iw(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class nw extends nr{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[vf]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!Fb(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:n,balloonClassName:s="ck-toolbar-container"}){if(!i.length)return void k("widget-toolbar-no-items",{toolbarId:e});const o=this.editor,r=o.t,a=new _m(o.locale);if(a.ariaLabel=t||r("Widget toolbar"),this._toolbarDefinitions.has(e))throw new y("widget-toolbar-duplicated",this,{toolbarId:e});const l={view:a,getRelatedElement:n,balloonClassName:s,itemsConfig:i,initialized:!1};o.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const e=n(o.editing.view.document.selection);e&&this._showToolbar(l,e)},afterBlur:()=>{this._hideToolbar(l)}}),this._toolbarDefinitions.set(e,l)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const n of this._toolbarDefinitions.values()){const s=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&s)if(this.editor.ui.focusTracker.isFocused){const o=s.getAncestors().length;o>e&&(e=o,t=s,i=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?sw(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:ow(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);sw(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function sw(e,t){const i=e.plugins.get("ContextualBalloon"),n=ow(e,t);i.updatePosition(n)}function ow(e,t){const i=e.editing.view,n=jg.defaultPositions;return{target:i.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class rw extends(G()){constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const n=new Hn(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)if(e.classList.contains(aw(i)))return i}(e),this._referenceCoordinates=function(e,t){const i=new Hn(e),n=t.split("-"),s={x:"right"==n[1]?i.right:i.left,y:"bottom"==n[0]?i.bottom:i.top};return s.x+=e.ownerDocument.defaultView.scrollX,s.y+=e.ownerDocument.defaultView.scrollY,s}(t,function(e){const t=e.split("-"),i={top:"bottom",bottom:"top",left:"right",right:"left"};return`${i[t[0]]}-${i[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const s=i.style.width;s&&s.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(s):this._originalWidthPercents=function(e,t){const i=e.parentElement;let n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);const s=5;let o=0,r=i;for(;isNaN(n);){if(r=r.parentElement,++o>s)return 0;n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(r).width)}return t.width/n*100}(i,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function aw(e){return`ck-widget__resizer__handle-${e}`}class lw extends Ds{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,i,n)=>"px"===e.unit?`${t}×${i}`:`${n}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,i)=>t<50||i<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class cw extends(G()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((i=>{const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const i=this.toDomElement(t);return e._appendHandles(i),e._appendSizeUI(i),i}));i.insert(i.createPositionAt(t,"end"),n),i.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new rw(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const i=this._options.unit||"%",n=("%"===i?t.widthPercents:t.width)+i;e.setStyle("width",n,this._options.viewElement)}));const i=this._getHandleHost(),n=new Hn(i),s=Math.round(n.width),o=Math.round(n.height),r=new Hn(i);t.width=Math.round(r.width),t.height=Math.round(r.height),this.redraw(n),this.state.update({...t,handleHostWidth:s,handleHostHeight:o})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((i=t)&&i.ownerDocument&&i.ownerDocument.contains(i)))return;var i;const n=t.parentElement,s=this._getHandleHost(),o=this._viewResizerWrapper,r=[o.getStyle("width"),o.getStyle("height"),o.getStyle("left"),o.getStyle("top")];let a;if(n.isSameNode(s)){const t=e||new Hn(s);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[s.offsetWidth+"px",s.offsetHeight+"px",s.offsetLeft+"px",s.offsetTop+"px"];"same"!==te(r,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},o)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,i={x:(n=e).pageX,y:n.pageY};var n;const s=!this._options.isCentered||this._options.isCentered(this),o={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};s&&t.activeHandlePosition.endsWith("-right")&&(o.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),s&&(o.x*=2);let r=Math.abs(t.originalWidth+o.x),a=Math.abs(t.originalHeight+o.y);return"width"==(r/t.aspectRatio>a?"width":"height")?a=r/t.aspectRatio:r=a*t.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new Ls({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(i=n,`ck-widget__resizer__handle-${i}`)}}).render());var i}_appendSizeUI(e){this._sizeView=new lw,this._sizeView.render(),e.appendChild(this._sizeView.element)}}class dw extends nr{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=Mn.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(Cu),this._observer=new(Vn()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=Qg((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(Mn.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",(()=>{const e=i.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new cw(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const e=i.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;cw.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}const hw=Kn("px");class uw extends Ds{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",(e=>!e))],style:{left:e.to("left",(e=>hw(e))),top:e.to("top",(e=>hw(e))),width:e.to("width",(e=>hw(e)))}}})}}class mw extends nr{constructor(){super(...arguments),this.removeDropMarkerDelayed=Rs((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=Qg((e=>this._updateDropMarker(e)),40),this._reconvertMarkerThrottled=Qg((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new uw,this._domEmitter=new(Vn()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,i,n,s,o){this.removeDropMarkerDelayed.cancel();const r=gw(this.editor,e,t,i,n,s,o);if(r)return o&&o.containsRange(r)?this.removeDropMarker():void this._updateDropMarkerThrottled(r)}getFinalDropRange(e,t,i,n,s,o){const r=gw(this.editor,e,t,i,n,s,o);return this.removeDropMarker(),r}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:i})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(i);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,i=t.model.markers;t.model.change((t=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}_updateDropTargetLine(e){const t=this.editor.editing,i=e.start.nodeBefore,n=e.start.nodeAfter,s=e.start.parent,o=i?t.mapper.toViewElement(i):null,r=o?t.view.domConverter.mapViewToDom(o):null,a=n?t.mapper.toViewElement(n):null,l=a?t.view.domConverter.mapViewToDom(a):null,c=t.mapper.toViewElement(s);if(!c)return;const d=t.view.domConverter.mapViewToDom(c),h=this._getScrollableRect(c),{scrollX:u,scrollY:m}=Mn.window,g=r?new Hn(r):null,f=l?new Hn(l):null,p=new Hn(d).excludeScrollbarsAndBorders(),b=g?g.bottom:p.top,w=f?f.top:p.bottom,v=Mn.window.getComputedStyle(d),_=b<=w?(b+w)/2:w;if(h.top<_&&_<h.bottom){const e=p.left+parseFloat(v.paddingLeft),t=p.right-parseFloat(v.paddingRight),i=Math.max(e+u,h.left),n=Math.min(t+u,h.right);this._dropTargetLineView.set({isVisible:!0,left:i,top:_+m,width:n-i})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let i;if(this._scrollables.has(t))i=this._scrollables.get(t).domElement;else{i=function(e){let t=e;do{t=t.parentElement;const e=Mn.window.getComputedStyle(t).overflowY;if("auto"==e||"scroll"==e)break}while("BODY"!=t.tagName);return t}(this.editor.editing.view.domConverter.mapViewToDom(e)),this._domEmitter.listenTo(i,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const n=new Gn(i,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:i,resizeObserver:n})}return new Hn(i).excludeScrollbarsAndBorders()}}function gw(e,t,i,n,s,o,r){const a=e.model,l=e.editing.mapper;let c=ww(e,t);for(;c;){if(!o)if(a.schema.checkChild(c,"$text")){if(i){const t=i[0].start,o=l.toModelPosition(t);if(!r||Array.from(r.getItems()).every((e=>a.schema.checkChild(o,e)))){if(a.schema.checkChild(o,"$text"))return a.createRange(o);if(t)return pw(e,ww(e,t.parent),n,s)}}}else if(a.schema.isInline(c))return pw(e,c,n,s);if(a.schema.isBlock(c))return pw(e,c,n,s);if(a.schema.checkChild(c,"$block")){const t=Array.from(c.getChildren()).filter((t=>t.is("element")&&!fw(e,t)));let i=0,o=t.length;if(0==o)return a.createRange(a.createPositionAt(c,"end"));for(;i<o-1;){const r=Math.floor((i+o)/2);"before"==bw(e,t[r],n,s)?o=r:i=r}return pw(e,t[i],n,s)}c=c.parent}return null}function fw(e,t){const i=e.editing.mapper,n=e.editing.view.domConverter,s=i.toViewElement(t);if(!s)return!0;const o=n.mapViewToDom(s);return"none"!=Mn.window.getComputedStyle(o).float}function pw(e,t,i,n){const s=e.model;return s.createRange(s.createPositionAt(t,bw(e,t,i,n)))}function bw(e,t,i,n){const s=e.editing.mapper,o=e.editing.view.domConverter,r=s.toViewElement(t),a=o.mapViewToDom(r),l=new Hn(a);return e.model.schema.isInline(t)?i<(l.left+l.right)/2?"before":"after":n<(l.top+l.bottom)/2?"before":"after"}function ww(e,t){const i=e.editing.mapper,n=e.editing.view,s=i.toModelElement(t);if(s)return s;const o=n.createPositionBefore(t),r=i.findMappedViewAncestor(o);return i.toModelElement(r)}class vw extends nr{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new(Vn())}static get pluginName(){return"DragDropBlockToolbar"}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),l.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(Mn.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(Mn.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(Mn.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&t.setAttribute("draggable","true"),this.on("change:isEnabled",((e,i,n)=>{t.setAttribute("draggable",n?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,i=t.document.selection,n=this.editor.editing.view,s=Array.from(i.getSelectedBlocks()),o=t.createRange(t.createPositionBefore(s[0]),t.createPositionAfter(s[s.length-1]));t.change((e=>e.setSelection(o))),this._isBlockDragging=!0,n.focus(),n.getObserver(Ab).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),i=e.clientY,n=document.elementFromPoint(t,i),s=this.editor.editing.view;n&&n.closest(".ck-editor__editable")&&s.getObserver(Ab).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:n,clientX:t,clientY:i,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}class _w extends nr{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=Rs((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new(Vn())}static get pluginName(){return"DragDrop"}static get requires(){return[Pb,tw,mw,vw]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(Ab),t.addObserver(Cu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,i)=>{i||this._finalizeDragging(!1)})),l.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document,s=e.plugins.get(mw);this.listenTo(n,"dragstart",((e,i)=>{if(i.target&&i.target.is("editableElement"))return void i.preventDefault();if(this._prepareDraggedRange(i.target),!this._draggedRange)return void i.preventDefault();this._draggingUid=b(),i.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",i.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const n=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(i.dataTransfer,n,"dragstart");const{dataTransfer:s,domTarget:o,domEvent:r}=i,{clientX:a}=r;this._updatePreview({dataTransfer:s,domTarget:o,clientX:a}),i.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(n,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(Mn.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(n,"dragenter",(()=>{this.isEnabled&&i.focus()})),this.listenTo(n,"dragleave",(()=>{s.removeDropMarkerDelayed()})),this.listenTo(n,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:i,clientY:n}=t.domEvent;s.updateDropMarker(t.target,t.targetRanges,i,n,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),l.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get(mw);this.listenTo(t,"clipboardInput",((t,n)=>{if("drop"!=n.method)return;const{clientX:s,clientY:o}=n.domEvent,r=i.getFinalDropRange(n.target,n.targetRanges,s,o,this._blockMode,this._draggedRange);if(!r)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==yw(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0))return this._finalizeDragging(!1),void t.stop();n.targetRanges=[e.editing.mapper.toViewRange(r)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Pb);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(i)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i="move"==yw(t.dataTransfer),n=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(n&&i)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,i=t.document;this.listenTo(i,"mousedown",((n,s)=>{if(l.isAndroid||!s)return;this._clearDraggableAttributesDelayed.cancel();let o=kw(s.target);if(l.isBlink&&!e.isReadOnly&&!o&&!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&Fb(e)||(o=i.selection.editableElement)}o&&(t.change((e=>{e.setAttribute("draggable","true",o)})),this._draggableElement=e.editing.mapper.toModelElement(o))})),this.listenTo(i,"mouseup",(()=>{l.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,i=t.model;if(t.plugins.get(mw).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&i.change((e=>{const t=i.createSelection(this._draggedRange);i.deleteContent(t,{doNotAutoparagraph:!0});const n=t.getFirstPosition().parent;n.isEmpty&&!i.schema.checkChild(n,"$text")&&i.schema.checkChild(n,"paragraph")&&e.insertElement("paragraph",n,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,i=t.model,n=i.document.selection,s=e?kw(e):null;if(s){const e=t.editing.mapper.toModelElement(s);if(this._draggedRange=Yc.fromRange(i.createRangeOn(e)),this._blockMode=i.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(n.isCollapsed&&!n.getFirstPosition().parent.isEmpty)return;const o=Array.from(n.getSelectedBlocks()),r=n.getFirstRange();if(0==o.length)return void(this._draggedRange=Yc.fromRange(r));const a=Cw(i,o);if(o.length>1)this._draggedRange=Yc.fromRange(a),this._blockMode=!0;else if(1==o.length){const e=r.start.isTouching(a.start)&&r.end.isTouching(a.end);this._draggedRange=Yc.fromRange(e?a:r),this._blockMode=e}i.change((e=>e.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:e,domTarget:t,clientX:i}){const n=this.editor.editing.view,s=n.document.selection.editableElement,o=n.domConverter.mapViewToDom(s),r=Mn.window.getComputedStyle(o);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=ve(Mn.document,"div",{style:"position: fixed; left: -999999px;"}),Mn.document.body.appendChild(this._previewContainer));const a=new Hn(o);if(o.contains(t))return;const c=parseFloat(r.paddingLeft),d=ve(Mn.document,"div");d.className="ck ck-content",d.style.width=r.width,d.style.paddingLeft=`${a.left-i+c}px`,l.isiOS&&(d.style.backgroundColor="white"),d.innerHTML=e.getData("text/html"),e.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function yw(e){return l.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function kw(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(Fb);if(Fb(e))return e;const t=e.findAncestor((e=>Fb(e)||e.is("editableElement")));return Fb(t)?t:null}function Cw(e,t){const i=t[0],n=t[t.length-1],s=i.getCommonAncestor(n),o=e.createPositionBefore(i),r=e.createPositionAfter(n);if(s&&s.is("element")&&!e.schema.isLimit(s)){const t=e.createRangeOn(s),i=o.isTouching(t.start),n=r.isTouching(t.end);if(i&&n)return Cw(e,[s])}return e.createRange(o,r)}class Aw extends nr{static get pluginName(){return"PastePlainText"}static get requires(){return[Pb]}init(){const e=this.editor,t=e.model,i=e.editing.view,n=i.document,s=t.document.selection;let o=!1;i.addObserver(Ab),this.listenTo(n,"keydown",((e,t)=>{o=t.shiftKey})),e.plugins.get(Pb).on("contentInsertion",((e,i)=>{(o||function(e,t){if(e.childCount>1)return!1;const i=e.getChild(0);if(t.isObject(i))return!1;return 0==Array.from(i.getAttributeKeys()).length}(i.content,t.schema))&&t.change((e=>{const n=Array.from(s.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));s.isCollapsed||t.deleteContent(s,{doNotAutoparagraph:!0}),n.push(...s.getAttributes());const o=e.createRangeIn(i.content);for(const t of o.getItems())t.is("$textProxy")&&e.setAttributes(n,t)}))}))}}class xw extends nr{static get pluginName(){return"Clipboard"}static get requires(){return[Pb,_w,Aw]}}class Tw extends or{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!Ew(e.schema,i))do{if(i=i.parent,!i)return}while(!Ew(e.schema,i));e.change((e=>{e.setSelection(i,"in")}))}}function Ew(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const Sw=vs("Ctrl+A");class Pw extends nr{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new Tw(e)),this.listenTo(t,"keydown",((t,i)=>{ws(i)===Sw&&(e.execute("selectAll"),i.preventDefault())}))}}class Iw extends nr{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const i=e.commands.get("selectAll"),n=new ho(t),s=t.t;return n.set({label:s("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isEnabled").to(i,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),n}))}}class Vw extends nr{static get requires(){return[Pw,Iw]}static get pluginName(){return"SelectAll"}}class Rw extends or{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const i=t[1];i.batchType||(i.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,i={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,i){const n=this.editor.model,s=n.document,o=[],r=e.map((e=>e.getTransformedByOperations(i))),a=r.flat();for(const e of r){const t=e.filter((e=>e.root!=s.graveyard)).filter((e=>!Bw(e,a)));t.length&&(Ow(t),o.push(t[0]))}o.length&&n.change((e=>{e.setSelection(o,{backward:t})}))}_undo(e,t){const i=this.editor.model,n=i.document;this._createdBatches.add(t);const s=e.operations.slice().filter((e=>e.isDocumentOperation));s.reverse();for(const e of s){const s=e.baseVersion+1,o=Array.from(n.history.getOperations(s)),r=Ih([e.getReversed()],o,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let s of r){const o=s.affectedSelectable;o&&!i.canEditAt(o)&&(s=new _h(s.baseVersion)),t.addOperation(s),i.applyOperation(s),n.history.setOperationAsUndone(e,s)}}}}function Ow(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;t<e.length;t++){const i=e[t-1].getJoined(e[t],!0);i&&(t--,e.splice(t,2,i))}}function Bw(e,t){return t.some((t=>t!==e&&t.containsRange(e,!0)))}class Mw extends Rw{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,i=this._stack.splice(t,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,(()=>{this._undo(i.batch,n);const e=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,e)})),this.fire("revert",i.batch,n),this.refresh()}}class Nw extends Rw{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const i=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)})),this.refresh()}}class Fw extends nr{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new Mw(e),this._redoCommand=new Nw(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const i=t[0];if(!i.isDocumentOperation)return;const n=i.batch,s=this._redoCommand.createdBatches.has(n),o=this._undoCommand.createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(s?this._undoCommand.addBatch(n):o||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,i)=>{this._redoCommand.addBatch(i)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}class Dw extends nr{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?bm.undo:bm.redo,s="ltr"==t.uiLanguageDirection?bm.redo:bm.undo;this._addButton("undo",i("Undo"),"CTRL+Z",n),this._addButton("redo",i("Redo"),"CTRL+Y",s)}_addButton(e,t,i,n){const s=this.editor;s.ui.componentFactory.add(e,(o=>{const r=s.commands.get(e),a=new ho(o);return a.set({label:t,icon:n,keystroke:i,tooltip:!0}),a.bind("isEnabled").to(r,"isEnabled"),this.listenTo(a,"execute",(()=>{s.execute(e),s.editing.view.focus()})),a}))}}class Lw extends nr{static get requires(){return[Fw,Dw]}static get pluginName(){return"Undo"}}class zw extends or{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 t=this.editor.model,i=t.document.selection,n=e.value,s=e.batch,o=e=>{if(i.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,n):e.removeSelectionAttribute(this.attributeKey);else{const s=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of s)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}};s?t.enqueueChange(s,(e=>{o(e)})):t.change((e=>{o(e)}))}}const Hw="fontSize",$w="fontFamily",Ww="fontColor",jw="fontBackgroundColor";function Uw(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}function qw(e){return t=>t.getStyle(e).replace(/\s/g,"")}function Gw(e){return(t,{writer:i})=>i.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class Zw extends zw{constructor(e){super(e,$w)}}function Kw(e){return e.map(Jw).filter((e=>void 0!==e))}function Jw(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),i=t[0],n=t.map(Qw).join(", ");return{title:i,model:n,view:{name:"span",styles:{"font-family":n},priority:7}}}(e):void 0}function Qw(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class Yw extends nr{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define($w,{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:$w}),e.model.schema.setAttributeProperties($w,{isFormatting:!0,copyOnEnter:!0});const t=Kw(e.config.get("fontFamily.options")).filter((e=>e.model)),i=Uw($w,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(i),e.commands.add($w,new Zw(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:$w,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:$w,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:$w,value:e=>e.getAttribute("face")}})}}class Xw extends nr{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get($w),s=t("Font Family");e.ui.componentFactory.add($w,(t=>{const o=Pm(t);return Rm(o,(()=>function(e,t){const i=new Es;for(const n of e){const e={type:"button",model:new bf({commandName:$w,commandParam:n.model,label:n.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",(e=>e===n.model||!(!e||!n.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===n.model.toLowerCase())),n.view&&"string"!=typeof n.view&&n.view.styles&&e.model.set("labelStyle",`font-family: ${n.view.styles["font-family"]}`),i.add(e)}return i}(i,n)),{role:"menu",ariaLabel:s}),o.buttonView.set({label:s,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',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}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return Kw(e.config.get($w).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class ev extends zw{constructor(e){super(e,Hw)}}function tv(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 nv(e);var t;const i=function(e){return"string"==typeof e?iv[e]:iv[e.model]}(e);if(i)return nv(i);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new y("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}},nv(e)}(e)}(e))).filter((e=>void 0!==e))}const iv={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 nv(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const sv=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class ov extends nr{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(Hw,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Hw}),e.model.schema.setAttributeProperties(Hw,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=tv(this.editor.config.get("fontSize.options")).filter((e=>e.model)),n=Uw(Hw,i);t?(this._prepareAnyValueConverters(n),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add(Hw,new ev(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter((e=>!Nu(String(e))&&!Du(String(e))));if(i.length)throw new y("font-size-invalid-use-of-named-presets",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:Hw,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:Hw,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:Hw,value:e=>{const t=e.getAttribute("size"),i="-"===t[0]||"+"===t[0];let n=parseInt(t,10);i&&(n=3+n);const s=sv.length-1,o=Math.min(Math.max(n,0),s);return sv[o]}}})}}class rv extends nr{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),n=e.commands.get(Hw),s=t("Font Size");e.ui.componentFactory.add(Hw,(t=>{const o=Pm(t);return Rm(o,(()=>function(e,t){const i=new Es;for(const n of e){const e={type:"button",model:new bf({commandName:Hw,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)),i.add(e)}return i}(i,n)),{role:"menu",ariaLabel:s}),o.buttonView.set({label:s,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',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}))}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return tv(e.config.get(Hw).options).map((e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class av extends zw{constructor(e){super(e,Ww)}}class lv extends nr{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(Ww,{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:Ww,value:qw("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Ww,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:Ww,view:Gw("color")}),e.commands.add(Ww,new av(e)),e.model.schema.extend("$text",{allowAttributes:Ww}),e.model.schema.setAttributeProperties(Ww,{isFormatting:!0,copyOnEnter:!0})}}class cv extends nr{constructor(e,{commandName:t,componentName:i,icon:n,dropdownLabel:s}){super(e),this.commandName=t,this.componentName=i,this.icon=n,this.dropdownLabel=s,this.columns=e.config.get(`${this.componentName}.columns`)}init(){const e=this.editor,t=e.locale,i=t.t,n=e.commands.get(this.commandName),s=e.config.get(this.componentName),o=fo(t,po(s.colors)),r=s.documentColors,a=!1!==s.colorPicker;e.ui.componentFactory.add(this.componentName,(t=>{const l=Pm(t);let c=!1;const d=function({dropdownView:e,colors:t,columns:i,removeButtonLabel:n,colorPickerLabel:s,documentColorsLabel:o,documentColorsCount:r,colorPickerViewConfig:a}){const l=e.locale,c=new Ag(l,{colors:t,columns:i,removeButtonLabel:n,colorPickerLabel:s,documentColorsLabel:o,documentColorsCount:r,colorPickerViewConfig:a});return e.colorSelectorView=c,e.panelView.children.add(c),c}({dropdownView:l,colors:o.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:i("Remove color"),colorPickerLabel:i("Color picker"),documentColorsLabel:0!==r?i("Document colors"):"",documentColorsCount:void 0===r?this.columns:r,colorPickerViewConfig:!!a&&(s.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,i)=>{l.isOpen&&e.execute(this.commandName,{value:i.value,batch:this._undoStepBatch}),"colorPicker"!==i.source&&e.editing.view.focus(),"colorPickerSaveButton"===i.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,i,n)=>{c||(c=!0,l.colorSelectorView.appendUI()),n&&(0!==r&&d.updateDocumentColors(e.model,this.componentName),d.updateSelectedColors(),d.showColorGridsFragment())})),Bm(l,(()=>l.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find((e=>e.isOn)))),l}))}}class dv extends cv{constructor(e){const t=e.locale.t;super(e,{commandName:Ww,componentName:Ww,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class hv extends zw{constructor(e){super(e,jw)}}class uv extends nr{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(jw,{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(Yu),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:jw,value:qw("background-color")}}),e.conversion.for("downcast").attributeToElement({model:jw,view:Gw("background-color")}),e.commands.add(jw,new hv(e)),e.model.schema.extend("$text",{allowAttributes:jw}),e.model.schema.setAttributeProperties(jw,{isFormatting:!0,copyOnEnter:!0})}}class mv extends cv{constructor(e){const t=e.locale.t;super(e,{commandName:jw,componentName:jw,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class gv extends or{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=Ss(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&fv(t,e.schema)}execute(e={}){const t=this.editor.model,i=t.document,n=e.selection||i.selection;t.canEditAt(n)&&t.change((e=>{const i=n.getSelectedBlocks();for(const n of i)!n.is("element","paragraph")&&fv(n,t.schema)&&e.rename(n,"paragraph")}))}}function fv(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class pv extends or{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,i=e.attributes;let n=e.position;t.canEditAt(n)&&t.change((e=>{if(n=this._findPositionToInsertParagraph(n,e),!n)return;const s=e.createElement("paragraph");i&&t.schema.setAllowedAttributes(s,i,e),t.insertContent(s,n),e.setSelection(s,"in")}))}_findPositionToInsertParagraph(e,t){const i=this.editor.model;if(i.schema.checkChild(e,"paragraph"))return e;const n=i.schema.findAllowedParent(e,"paragraph");if(!n)return null;const s=e.parent,o=i.schema.checkChild(s,"$text");return s.isEmpty||o&&e.isAtEnd?i.createPositionAfter(s):!s.isEmpty&&o&&e.isAtStart?i.createPositionBefore(s):t.split(e,n).position}}class bv extends nr{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new gv(e)),e.commands.add("insertParagraph",new pv(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>bv.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}bv.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);const wv=bv;class vv extends or{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Ss(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>_v(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,i=t.document,n=e.value;t.change((e=>{const s=Array.from(i.selection.getSelectedBlocks()).filter((e=>_v(e,n,t.schema)));for(const t of s)t.is("element",n)||e.rename(t,n)}))}}function _v(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const yv="paragraph";class kv extends nr{static get pluginName(){return"HeadingEditing"}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[wv]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const n of t)"paragraph"!==n.model&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new vv(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,n)=>{const s=e.model.document.selection.getFirstPosition().parent;i.some((e=>s.is("element",e.model)))&&!s.is("element",yv)&&0===s.childCount&&n.writer.rename(s,yv)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:w.low+1})}}class Cv extends nr{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,i=function(e){const t=e.t,i={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=i[e.title];return t&&t!=e.title&&(e.title=t),e}))}(e),n=t("Choose heading"),s=t("Heading");e.ui.componentFactory.add("heading",(t=>{const o={},r=new Es,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of i){const t={type:"button",model:new bf({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"),c.push(l)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),r.add(t),o[e.model]=e.title}const d=Pm(t);return Rm(d,r,{ariaLabel:s,role:"menu"}),d.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),d.buttonView.bind("label").to(a,"value",l,"value",((e,t)=>{const i=e||t&&"paragraph";return"boolean"==typeof i?n:o[i]?o[i]:n})),this.listenTo(d,"execute",(t=>{const{commandName:i,commandValue:n}=t.source;e.execute(i,n?{value:n}:void 0),e.editing.view.focus()})),d}))}}new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class Av extends or{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=function(e,t,i){const n=function(e,t){const i=Wb(e,t),n=i.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(e,i);return t.checkChild(n,"horizontalLine")}(i,t,e)}execute(){const e=this.editor.model;e.change((t=>{const i=t.createElement("horizontalLine");e.insertObject(i,null,null,{setSelection:"after"})}))}}class xv extends nr{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,n=e.conversion;t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),n.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),n.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:t})=>{const n=i("Horizontal line"),s=t.createContainerElement("div",null,t.createEmptyElement("hr"));return t.addClass("ck-horizontal-line",s),t.setCustomProperty("hr",!0,s),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),Db(e,t,{label:i})}(s,t,n)}}),n.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new Av(e))}}class Tv extends nr{static get pluginName(){return"HorizontalLineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("horizontalLine",(i=>{const n=e.commands.get("horizontalLine"),s=new ho(i);return s.set({label:t("Horizontal line"),icon:bm.horizontalLine,tooltip:!0}),s.bind("isEnabled").to(n,"isEnabled"),this.listenTo(s,"execute",(()=>{e.execute("horizontalLine"),e.editing.view.focus()})),s}))}}const Ev=function(e,t,i,n){var s=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++s]);++s<o;)i=t(i,e[s],s,e);return i};const Sv=Rf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});var Pv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Iv=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");const Vv=function(e){return(e=$r(e))&&e.replace(Pv,Sv).replace(Iv,"")};var Rv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;const Ov=function(e){return e.match(Rv)||[]};var Bv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;const Mv=function(e){return Bv.test(e)};var Nv="\\ud800-\\udfff",Fv="\\u2700-\\u27bf",Dv="a-z\\xdf-\\xf6\\xf8-\\xff",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",zv="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hv="["+zv+"]",$v="\\d+",Wv="["+Fv+"]",jv="["+Dv+"]",Uv="[^"+Nv+zv+$v+Fv+Dv+Lv+"]",qv="(?:\\ud83c[\\udde6-\\uddff]){2}",Gv="[\\ud800-\\udbff][\\udc00-\\udfff]",Zv="["+Lv+"]",Kv="(?:"+jv+"|"+Uv+")",Jv="(?:"+Zv+"|"+Uv+")",Qv="(?:['’](?:d|ll|m|re|s|t|ve))?",Yv="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xv="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",e_="[\\ufe0e\\ufe0f]?",t_=e_+Xv+("(?:\\u200d(?:"+["[^"+Nv+"]",qv,Gv].join("|")+")"+e_+Xv+")*"),i_="(?:"+[Wv,qv,Gv].join("|")+")"+t_,n_=RegExp([Zv+"?"+jv+"+"+Qv+"(?="+[Hv,Zv,"$"].join("|")+")",Jv+"+"+Yv+"(?="+[Hv,Zv+Kv,"$"].join("|")+")",Zv+"?"+Kv+"+"+Qv,Zv+"+"+Yv,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$v,i_].join("|"),"g");const s_=function(e){return e.match(n_)||[]};const o_=function(e,t,i){return e=$r(e),void 0===(t=i?void 0:t)?Mv(e)?s_(e):Ov(e):e.match(t)||[]};var r_=RegExp("['’]","g");const a_=function(e){return function(t){return Ev(o_(Vv(t).replace(r_,"")),e,"")}};const l_=function(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:Gr(e,t,i)};var c_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const d_=function(e){return c_.test(e)};const h_=function(e){return e.split("")};var u_="\\ud800-\\udfff",m_="["+u_+"]",g_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",f_="\\ud83c[\\udffb-\\udfff]",p_="[^"+u_+"]",b_="(?:\\ud83c[\\udde6-\\uddff]){2}",w_="[\\ud800-\\udbff][\\udc00-\\udfff]",v_="(?:"+g_+"|"+f_+")"+"?",__="[\\ufe0e\\ufe0f]?",y_=__+v_+("(?:\\u200d(?:"+[p_,b_,w_].join("|")+")"+__+v_+")*"),k_="(?:"+[p_+g_+"?",g_,b_,w_,m_].join("|")+")",C_=RegExp(f_+"(?="+f_+")|"+k_+y_,"g");const A_=function(e){return e.match(C_)||[]};const x_=function(e){return d_(e)?A_(e):h_(e)};const T_=function(e){return function(t){t=$r(t);var i=d_(t)?x_(t):void 0,n=i?i[0]:t.charAt(0),s=i?l_(i,1).join(""):t.slice(1);return n[e]()+s}}("toUpperCase");const E_=a_((function(e,t,i){return e+(i?" ":"")+T_(t)}));function S_(e,t,i,n){t&&function(e,t,i){if(t.attributes)for(const[n]of Object.entries(t.attributes))e.removeAttribute(n,i);if(t.styles)for(const n of Object.keys(t.styles))e.removeStyle(n,i);t.classes&&e.removeClass(t.classes,i)}(e,t,n),i&&P_(e,i,n)}function P_(e,t,i){if(t.attributes)for(const[n,s]of Object.entries(t.attributes))e.setAttribute(n,s,i);t.styles&&e.setStyle(t.styles,i),t.classes&&e.addClass(t.classes,i)}function I_(e,t,i,n,s){const o=t.getAttribute(i),r={};for(const e of["attributes","styles","classes"]){if(e!=n){o&&o[e]&&(r[e]=o[e]);continue}if("classes"==n){const t=new Set(o&&o.classes||[]);s(t),t.size&&(r[e]=Array.from(t));continue}const t=new Map(Object.entries(o&&o[e]||{}));s(t),t.size&&(r[e]=Object.fromEntries(t))}Object.keys(r).length?t.is("documentSelection")?e.setSelectionAttribute(i,r):e.setAttribute(i,r,t):o&&(t.is("documentSelection")?e.removeSelectionAttribute(i):e.removeAttribute(i,t))}function V_(e){return`html${t=e,E_(t).replace(/ /g,"")}Attributes`;var t}function R_({model:e}){return(t,i)=>i.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function O_(e,{view:t,isInline:i}){const n=e.t;return(e,{writer:s})=>{const o=n("HTML object"),r=B_(t,e,s),a=e.getAttribute(V_(t));s.addClass("html-object-embed__content",r),a&&P_(s,a,r);return Db(s.createContainerElement(i?"span":"div",{class:"html-object-embed","data-html-object-embed-label":o},r),s,{label:o})}}function B_(e,t,i){return i.createRawElement(e,null,((e,i)=>{i.setContentOf(e,t.getAttribute("htmlContent"))}))}function M_({view:e,model:t,allowEmpty:i},n){return t=>{t.on(`element:${e}`,((e,t,o)=>{let r=n.processViewAttributes(t.viewItem,o);if(r||o.consumable.test(t.viewItem,{name:!0})){if(r=r||{},o.consumable.consume(t.viewItem,{name:!0}),t.modelRange||(t=Object.assign(t,o.convertChildren(t.viewItem,t.modelCursor))),i&&t.modelRange.isCollapsed&&Object.keys(r).length){const e=o.writer.createElement("htmlEmptyElement");if(!o.safeInsert(e,t.modelCursor))return;const i=o.getSplitParts(e);return t.modelRange=o.writer.createRange(t.modelRange.start,o.writer.createPositionAfter(i[i.length-1])),o.updateConversionResult(e,t),void s(e,r,o)}for(const e of t.modelRange.getItems())s(e,r,o)}}),{priority:"low"})};function s(e,i,n){if(n.schema.checkAttribute(e,t)){const s=function(e,t){const i=kc(e);let n="attributes";for(n in t)i[n]="classes"==n?Array.from(new Set([...e[n]||[],...t[n]])):{...e[n],...t[n]};return i}(i,e.getAttribute(t)||{});n.writer.setAttribute(t,s,e)}}}function N_({model:e,view:t},i){return(n,{writer:s,consumable:o})=>{if(!n.hasAttribute(e))return null;const r=s.createContainerElement(t),a=n.getAttribute(e);return o.consume(n,`attribute:${e}`),P_(s,a,r),r.getFillerOffset=()=>null,i?Db(r,s):r}}function F_({priority:e,view:t}){return(i,n)=>{if(!i)return;const{writer:s}=n,o=s.createAttributeElement(t,null,{priority:e});return P_(s,i,o),o}}function D_({view:e},t){return i=>{i.on(`element:${e}`,((e,i,n)=>{if(!i.modelRange||i.modelRange.isCollapsed)return;const s=t.processViewAttributes(i.viewItem,n);s&&n.writer.setAttribute(V_(i.viewItem.name),s,i.modelRange)}),{priority:"low"})}}function L_({view:e,model:t}){return i=>{i.on(`attribute:${V_(e)}:${t}`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t;S_(i.writer,n,s,i.mapper.toViewElement(t.item))}))}}const z_=[{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:"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:"$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:{allowChildren:["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:"htmlDivDl",view:"div",modelSchema:{allowChildren:["htmlDt","htmlDd"],allowIn:"htmlDl"}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDivDl"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}}],H_=[{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"},{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}}];const $_=pa((function(e,t,i,n){sa(e,t,i,n)}));class W_ extends nr{constructor(){super(...arguments),this._definitions=[]}static get pluginName(){return"DataSchema"}init(){for(const e of z_)this.registerBlockElement(e);for(const e of H_)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t=!1){const i=new Set;for(const n of this._getMatchingViewDefinitions(e)){if(t)for(const e of this._getReferences(n.model))i.add(e);i.add(n)}return i}getDefinitionsForModel(e){return this._definitions.filter((t=>t.model==e))}_getMatchingViewDefinitions(e){return this._definitions.filter((t=>t.view&&function(e,t){if("string"==typeof e)return e===t;if(e instanceof RegExp)return e.test(t);return!1}(e,t.view)))}*_getReferences(e){const t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter((t=>t.model==e));for(const{modelSchema:n}of i)if(n)for(const i of t)for(const t of ks(n[i]||[])){const i=this._definitions.filter((e=>e.model==t));for(const n of i)t!==e&&(yield*this._getReferences(n.model),yield n)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter((([,t])=>t.model==e.model));if(0!=t.length)for(const[i,n]of t)this._definitions[i]=$_({},n,e,((e,t)=>Array.isArray(e)?e.concat(t):void 0));else this._definitions.push(e)}}const j_=function(e,t,i,n){for(var s=e.length,o=i+(n?1:-1);n?o--:++o<s;)if(t(e[o],o,e))return o;return-1};const U_=function(e){return e!=e};const q_=function(e,t,i){for(var n=i-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1};const G_=function(e,t,i){return t==t?q_(e,t,i):j_(e,U_,i)};const Z_=function(e,t,i,n){for(var s=i-1,o=e.length;++s<o;)if(n(e[s],t))return s;return-1};var K_=Array.prototype.splice;const J_=function(e,t,i,n){var s=n?Z_:G_,o=-1,r=t.length,a=e;for(e===t&&(t=yi(t)),i&&(a=Dr(e,Zt(i)));++o<r;)for(var l=0,c=t[o],d=i?i(c):c;(l=s(a,d,l,n))>-1;)a!==e&&K_.call(a,l,1),K_.call(e,l,1);return e};const Q_=ga((function(e,t){return e&&e.length&&t&&t.length?J_(e,t):e}));class Y_ extends nr{constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new xr,this._disallowedAttributes=new xr,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 requires(){return[W_,tw]}loadAllowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,i=ny(t);this.allowElement(e),i.forEach((e=>this.allowAttributes(e)))}}loadDisallowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,i=ny(t);0==i.length?this.disallowElement(e):i.forEach((e=>this.disallowAttributes(e)))}}loadAllowedEmptyElementsConfig(e){for(const t of e)this.allowEmptyElement(t)}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){return X_(e,t,this._disallowedAttributes),X_(e,t,this._allowedAttributes)}_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&"string"==typeof e.appliesToBlock)for(const t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",(()=>{this._fireRegisterEvent(e)}),{priority:w.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",(()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)}),{priority:w.highest+1})}_registerElementHandlers(){this.on("register",((e,t)=>{const i=this.editor.model.schema;if(t.isObject&&!i.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else{if(!t.isInline)throw new y("data-filter-invalid-definition",null,t);this._registerInlineElement(t)}e.stop()}),{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer((t=>{const i=e.document.differ.getChanges();let n=!1;const s=this._getCoupledAttributesMap();for(const e of i){if("attribute"!=e.type||null!==e.attributeNewValue)continue;const i=s.get(e.attributeKey);if(i)for(const{item:s}of e.range.getWalker())for(const e of i)s.hasAttribute(e)&&(t.removeAttribute(e,s),n=!0)}return n})),this.listenTo(t,"change:attribute",((i,{attributeKeys:n})=>{const s=new Set,o=this._getCoupledAttributesMap();for(const e of n){if(t.hasAttribute(e))continue;const i=o.get(e);if(i)for(const e of i)t.hasAttribute(e)&&s.add(e)}0!=s.size&&e.change((e=>{for(const t of s)e.removeSelectionAttribute(t)}))}))}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer((t=>{const i=e.document.differ.getChanges();let n=!1;for(const s of i)if("insert"===s.type&&"$text"!==s.name)for(const i of s.attributes.keys())i.startsWith("html")&&i.endsWith("Attributes")&&(e.schema.checkAttribute(s.name,i)||(t.removeAttribute(i,s.position.nodeAfter),n=!0));return n}))}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,{view:s,model:o}=e;i.register(o,e.modelSchema),s&&(i.extend(e.model,{allowAttributes:[V_(s),"htmlContent"]}),t.data.registerRawContentMatcher({name:s}),n.for("upcast").elementToElement({view:s,model:R_(e),converterPriority:w.low+2}),n.for("upcast").add(D_(e,this)),n.for("editingDowncast").elementToStructure({model:{name:o,attributes:[V_(s)]},view:O_(t,e)}),n.for("dataDowncast").elementToElement({model:o,view:(e,{writer:t})=>B_(s,e,t)}),n.for("dataDowncast").add(L_(e)))}_registerBlockElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,{view:s,model:o}=e;if(!i.isRegistered(e.model)){if(i.register(e.model,e.modelSchema),!s)return;n.for("upcast").elementToElement({model:o,view:s,converterPriority:w.low+2}),n.for("downcast").elementToElement({model:o,view:s})}s&&(i.extend(e.model,{allowAttributes:V_(s)}),n.for("upcast").add(D_(e,this)),n.for("downcast").add(L_(e)))}_registerInlineElement(e){const t=this.editor,i=t.model.schema,n=t.conversion,s=e.model;e.appliesToBlock||(i.extend("$text",{allowAttributes:s}),e.attributeProperties&&i.setAttributeProperties(s,e.attributeProperties),n.for("upcast").add(M_(e,this)),n.for("downcast").attributeToElement({model:s,view:F_(e)}),e.allowEmpty&&(i.setAttributeProperties(s,{copyFromObject:!1}),i.isRegistered("htmlEmptyElement")||i.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"}),t.data.htmlProcessor.domConverter.registerInlineObjectMatcher((t=>t.name==e.view&&t.isEmpty&&Array.from(t.getAttributeKeys()).length?{name:!0}:null)),n.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:N_(e,!0)}),n.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:N_(e)})))}}function X_(e,t,i){const n=function(e,{consumable:t},i){const n=i.matchAll(e)||[],s=[];for(const i of n)ey(t,e,i),delete i.match.name,t.consume(e,i.match),s.push(i);return s}(e,t,i),{attributes:s,styles:o,classes:r}=function(e){const t={attributes:new Set,classes:new Set,styles:new Set};for(const i of e)for(const e in t){(i.match[e]||[]).forEach((i=>t[e].add(i)))}return t}(n),a={};if(s.size)for(const e of s)Xn(e)||s.delete(e);return s.size&&(a.attributes=ty(s,(t=>e.getAttribute(t)))),o.size&&(a.styles=ty(o,(t=>e.getStyle(t)))),r.size&&(a.classes=Array.from(r)),Object.keys(a).length?a:null}function ey(e,t,i){for(const n of["attributes","classes","styles"]){const s=i.match[n];if(s)for(const i of Array.from(s))e.test(t,{[n]:[i]})||Q_(s,i)}}function ty(e,t){const i={};for(const n of e){void 0!==t(n)&&(i[n]=t(n))}return i}function iy(e,t){const{name:i}=e,n=e[t];return Ee(n)?Object.entries(n).map((([e,n])=>({name:i,[t]:{[e]:n}}))):Array.isArray(n)?n.map((e=>({name:i,[t]:[e]}))):[e]}function ny(e){const{name:t,attributes:i,classes:n,styles:s}=e,o=[];return i&&o.push(...iy({name:t,attributes:i},"attributes")),n&&o.push(...iy({name:t,classes:n},"classes")),s&&o.push(...iy({name:t,styles:s},"styles")),o}class sy extends nr{static get requires(){return[Y_]}static get pluginName(){return"CodeBlockElementSupport"}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(Y_);e.on("register:pre",((t,i)=>{if("codeBlock"!==i.model)return;const n=this.editor,s=n.model.schema,o=n.conversion;s.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),o.for("upcast").add(function(e){return t=>{t.on("element:code",((t,i,n)=>{const s=i.viewItem,o=s.parent;function r(t,s){const o=e.processViewAttributes(t,n);o&&n.writer.setAttribute(s,o,i.modelRange)}o&&o.is("element","pre")&&(r(o,"htmlPreAttributes"),r(s,"htmlContentAttributes"))}),{priority:"low"})}}(e)),o.for("downcast").add((e=>{e.on("attribute:htmlPreAttributes:codeBlock",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t,o=i.mapper.toViewElement(t.item).parent;S_(i.writer,n,s,o)})),e.on("attribute:htmlContentAttributes:codeBlock",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t,o=i.mapper.toViewElement(t.item);S_(i.writer,n,s,o)}))})),t.stop()}))}}class oy extends nr{static get requires(){return[Y_]}static get pluginName(){return"DualContentModelElementSupport"}init(){this.editor.plugins.get(Y_).on("register",((e,t)=>{const i=t,n=this.editor,s=n.model.schema,o=n.conversion;if(!i.paragraphLikeModel)return;if(s.isRegistered(i.model)||s.isRegistered(i.paragraphLikeModel))return;const r={model:i.paragraphLikeModel,view:i.view};s.register(i.model,i.modelSchema),s.register(r.model,{inheritAllFrom:"$block"}),o.for("upcast").elementToElement({view:i.view,model:(e,{writer:t})=>this._hasBlockContent(e)?t.createElement(i.model):t.createElement(r.model),converterPriority:w.low+.5}),o.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),o.for("downcast").elementToElement({view:r.view,model:r.model}),this._addAttributeConversion(r),e.stop()}))}_hasBlockContent(e){const t=this.editor.editing.view,i=t.domConverter.blockElements;for(const n of t.createRangeIn(e).getItems())if(n.is("element")&&i.includes(n.name))return!0;return!1}_addAttributeConversion(e){const t=this.editor,i=t.conversion,n=t.plugins.get(Y_);t.model.schema.extend(e.model,{allowAttributes:V_(e.view)}),i.for("upcast").add(D_(e,n)),i.for("downcast").add(L_(e))}}class ry extends nr{static get requires(){return[W_,mb]}static get pluginName(){return"HeadingElementSupport"}init(){const e=this.editor;if(!e.plugins.has("HeadingEditing"))return;const t=e.config.get("heading.options");this.registerHeadingElements(e,t)}registerHeadingElements(e,t){const i=e.plugins.get(W_),n=[];for(const e of t)"model"in e&&"view"in e&&(i.registerBlockElement({view:e.view,model:e.model}),n.push(e.model));i.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:n}})}}function ay(e,t,i){const n=e.createRangeOn(t);for(const{item:e}of n.getWalker())if(e.is("element",i))return e}class ly extends nr{static get requires(){return[Y_]}static get pluginName(){return"ImageElementSupport"}init(){const e=this.editor;if(!e.plugins.has("ImageInlineEditing")&&!e.plugins.has("ImageBlockEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(Y_);n.on("register:figure",(()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,i,n)=>{const s=i.viewItem;if(!i.modelRange||!s.hasClass("image"))return;const o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)}),{priority:"low"})}}(n))})),n.on("register:img",((s,o)=>{"imageBlock"!==o.model&&"imageInline"!==o.model||(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),i.for("upcast").add(function(e){return t=>{t.on("element:img",((t,i,n)=>{if(!i.modelRange)return;const s=i.viewItem,o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlImgAttributes",o,i.modelRange)}),{priority:"low"})}}(n)),i.for("downcast").add((e=>{function t(t){e.on(`attribute:${t}:imageInline`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const{attributeOldValue:n,attributeNewValue:s}=t,o=i.mapper.toViewElement(t.item);S_(i.writer,n,s,o)}),{priority:"low"})}function i(t,i){e.on(`attribute:${i}:imageBlock`,((e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const{attributeOldValue:s,attributeNewValue:o}=i,r=n.mapper.toViewElement(i.item),a=ay(n.writer,r,t);a&&(S_(n.writer,s,o,a),n.consumable.consume(i.item,e.name))}),{priority:"low"}),"a"===t&&e.on("attribute:linkHref:imageBlock",((e,t,i)=>{if(!i.consumable.consume(t.item,"attribute:htmlLinkAttributes:imageBlock"))return;const n=i.mapper.toViewElement(t.item),s=ay(i.writer,n,"a");P_(i.writer,t.item.getAttribute("htmlLinkAttributes"),s)}),{priority:"low"})}t("htmlImgAttributes"),i("img","htmlImgAttributes"),i("figure","htmlFigureAttributes"),i("a","htmlLinkAttributes")})),e.plugins.has("LinkImage")&&i.for("upcast").add(function(e,t){const i=t.plugins.get("ImageUtils");return t=>{t.on("element:a",((t,n,s)=>{const o=n.viewItem;if(!i.findViewImgElement(o))return;const r=n.modelCursor.parent;if(!r.is("element","imageBlock"))return;const a=e.processViewAttributes(o,s);a&&s.writer.setAttribute("htmlLinkAttributes",a,r)}),{priority:"low"})}}(n,e)),s.stop())}))}}class cy extends nr{static get requires(){return[Y_]}static get pluginName(){return"MediaEmbedElementSupport"}init(){const e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;const t=e.model.schema,i=e.conversion,n=this.editor.plugins.get(Y_),s=this.editor.plugins.get(W_),o=e.config.get("mediaEmbed.elementName");s.registerBlockElement({model:"media",view:o}),n.on("register:figure",(()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,i,n)=>{const s=i.viewItem;if(!i.modelRange||!s.hasClass("media"))return;const o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)}),{priority:"low"})}}(n))})),n.on(`register:${o}`,((e,s)=>{"media"===s.model&&(t.extend("media",{allowAttributes:[V_(o),"htmlFigureAttributes"]}),i.for("upcast").add(function(e,t){const i=(i,n,s)=>{function o(t,i){const o=e.processViewAttributes(t,s);o&&s.writer.setAttribute(i,o,n.modelRange)}o(n.viewItem,V_(t))};return e=>{e.on(`element:${t}`,i,{priority:"low"})}}(n,o)),i.for("dataDowncast").add(function(e){return t=>{function i(e,i){t.on(`attribute:${i}:media`,((t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const{attributeOldValue:s,attributeNewValue:o}=i,r=n.mapper.toViewElement(i.item),a=ay(n.writer,r,e);S_(n.writer,s,o,a)}))}i(e,V_(e)),i("figure","htmlFigureAttributes")}}(o)),e.stop())}))}}class dy extends nr{static get requires(){return[Y_]}static get pluginName(){return"ScriptElementSupport"}init(){const e=this.editor.plugins.get(Y_);e.on("register:script",((t,i)=>{const n=this.editor,s=n.model.schema,o=n.conversion;s.register("htmlScript",i.modelSchema),s.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),n.data.registerRawContentMatcher({name:"script"}),o.for("upcast").elementToElement({view:"script",model:R_(i)}),o.for("upcast").add(D_(i,e)),o.for("downcast").elementToElement({model:"htmlScript",view:(e,{writer:t})=>B_("script",e,t)}),o.for("downcast").add(L_(i)),t.stop()}))}}class hy extends nr{static get requires(){return[Y_]}static get pluginName(){return"TableElementSupport"}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(Y_),s=e.plugins.get("TableUtils");n.on("register:figure",(()=>{i.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,i,n)=>{const s=i.viewItem;if(!i.modelRange||!s.hasClass("table"))return;const o=e.processViewAttributes(s,n);o&&n.writer.setAttribute("htmlFigureAttributes",o,i.modelRange)}),{priority:"low"})}}(n))})),n.on("register:table",((o,r)=>{"table"===r.model&&(t.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),i.for("upcast").add(function(e){return t=>{t.on("element:table",((t,i,n)=>{if(!i.modelRange)return;const s=i.viewItem;o(s,"htmlTableAttributes");for(const e of s.getChildren())e.is("element","thead")&&o(e,"htmlTheadAttributes"),e.is("element","tbody")&&o(e,"htmlTbodyAttributes");function o(t,s){const o=e.processViewAttributes(t,n);o&&n.writer.setAttribute(s,o,i.modelRange)}}),{priority:"low"})}}(n)),i.for("downcast").add((e=>{function t(t,i){e.on(`attribute:${i}:table`,((e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const s=n.mapper.toViewElement(i.item),o=ay(n.writer,s,t);o&&(n.consumable.consume(i.item,e.name),S_(n.writer,i.attributeOldValue,i.attributeNewValue,o))}))}t("table","htmlTableAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")})),e.model.document.registerPostFixer(function(e,t){return i=>{const n=e.document.differ.getChanges();let s=!1;for(const e of n){if("attribute"!=e.type||"headingRows"!=e.attributeKey)continue;const n=e.range.start.nodeAfter,o=n.getAttribute("htmlTheadAttributes"),r=n.getAttribute("htmlTbodyAttributes");o&&!e.attributeNewValue?(i.removeAttribute("htmlTheadAttributes",n),s=!0):r&&e.attributeNewValue==t.getRows(n)&&(i.removeAttribute("htmlTbodyAttributes",n),s=!0)}return s}}(e.model,s)),o.stop())}))}}class uy extends nr{static get requires(){return[Y_]}static get pluginName(){return"StyleElementSupport"}init(){const e=this.editor.plugins.get(Y_);e.on("register:style",((t,i)=>{const n=this.editor,s=n.model.schema,o=n.conversion;s.register("htmlStyle",i.modelSchema),s.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),n.data.registerRawContentMatcher({name:"style"}),o.for("upcast").elementToElement({view:"style",model:R_(i)}),o.for("upcast").add(D_(i,e)),o.for("downcast").elementToElement({model:"htmlStyle",view:(e,{writer:t})=>B_("style",e,t)}),o.for("downcast").add(L_(i)),t.stop()}))}}class my extends nr{static get requires(){return[Y_]}static get pluginName(){return"ListElementSupport"}init(){const e=this.editor;if(!e.plugins.has("ListEditing"))return;const t=e.model.schema,i=e.conversion,n=e.plugins.get(Y_),s=e.plugins.get("ListEditing"),o=["ul","ol","li"];s.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:P_}),s.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:P_}),s.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:P_}),n.on("register",((e,s)=>{if(!o.includes(s.view))return;if(e.stop(),t.checkAttribute("$block","htmlLiAttributes"))return;const r=o.map((e=>V_(e)));t.extend("$listItem",{allowAttributes:r}),i.for("upcast").add((e=>{e.on("element:ul",gy("htmlUlAttributes",n),{priority:"low"}),e.on("element:ol",gy("htmlOlAttributes",n),{priority:"low"}),e.on("element:li",gy("htmlLiAttributes",n),{priority:"low"})}))})),s.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:n,previousNodeInList:s}of t)if(s){if(s.getAttribute("listType")==n.getAttribute("listType")){const t=fy(s.getAttribute("listType")),o=s.getAttribute(t);!wh(n.getAttribute(t),o)&&i.model.schema.checkAttribute(n,t)&&(i.setAttribute(t,o,n),e.return=!0)}if(s.getAttribute("listItemId")==n.getAttribute("listItemId")){const t=s.getAttribute("htmlLiAttributes");!wh(n.getAttribute("htmlLiAttributes"),t)&&i.model.schema.checkAttribute(n,"htmlLiAttributes")&&(i.setAttribute("htmlLiAttributes",t,n),e.return=!0)}}})),s.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:n}of t){const t=n.getAttribute("listType");"numbered"!==t&&n.getAttribute("htmlOlAttributes")&&(i.removeAttribute("htmlOlAttributes",n),e.return=!0),"numbered"===t&&n.getAttribute("htmlUlAttributes")&&(i.removeAttribute("htmlUlAttributes",n),e.return=!0)}}))}afterInit(){const e=this.editor;if(!e.commands.get("indentList"))return;const t=e.commands.get("indentList");this.listenTo(t,"afterExecute",((t,i)=>{e.model.change((t=>{for(const n of i){const i=fy(n.getAttribute("listType"));e.model.schema.checkAttribute(n,i)&&t.setAttribute(i,{},n)}}))}))}}function gy(e,t){return(i,n,s)=>{const o=n.viewItem;n.modelRange||Object.assign(n,s.convertChildren(n.viewItem,n.modelCursor));const r=t.processViewAttributes(o,s);for(const t of n.modelRange.getItems({shallow:!0}))t.hasAttribute("listItemId")&&(t.hasAttribute(e)||s.writer.model.schema.checkAttribute(t,e)&&s.writer.setAttribute(e,r||{},t))}}function fy(e){return"numbered"===e?"htmlOlAttributes":"htmlUlAttributes"}class py extends nr{static get requires(){return[Y_,W_]}static get pluginName(){return"CustomElementSupport"}init(){const e=this.editor.plugins.get(Y_),t=this.editor.plugins.get(W_);e.on("register:$customElement",((i,n)=>{i.stop();const s=this.editor,o=s.model.schema,r=s.conversion,a=s.editing.view.domConverter.unsafeElements,l=s.data.htmlProcessor.domConverter.preElements;o.register(n.model,n.modelSchema),o.extend(n.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),s.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),r.for("upcast").elementToElement({view:/.*/,model:(i,o)=>{if("$comment"==i.name)return null;if(!function(e){try{document.createElement(e)}catch(e){return!1}return!0}(i.name))return null;if(t.getDefinitionsForView(i.name).size)return null;a.includes(i.name)||a.push(i.name),l.includes(i.name)||l.push(i.name);const r=o.writer.createElement(n.model,{htmlElementName:i.name}),c=e.processViewAttributes(i,o);let d;if(c&&o.writer.setAttribute("htmlCustomElementAttributes",c,r),i.is("element","template")&&i.getCustomProperty("$rawContent"))d=i.getCustomProperty("$rawContent");else{const e=new Au(i.document).createDocumentFragment(i),t=s.data.htmlProcessor.domConverter.viewToDom(e),n=t.firstChild;for(;n.firstChild;)t.appendChild(n.firstChild);n.remove(),d=s.data.htmlProcessor.htmlWriter.getHtml(t)}o.writer.setAttribute("htmlContent",d,r);for(const{item:e}of s.editing.view.createRangeIn(i))o.consumable.consume(e,{name:!0});return r},converterPriority:"low"}),r.for("editingDowncast").elementToElement({model:{name:n.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{const i=e.getAttribute("htmlElementName"),n=t.createRawElement(i);return e.hasAttribute("htmlCustomElementAttributes")&&P_(t,e.getAttribute("htmlCustomElementAttributes"),n),n}}),r.for("dataDowncast").elementToElement({model:{name:n.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{const i=e.getAttribute("htmlElementName"),n=e.getAttribute("htmlContent"),s=t.createRawElement(i,null,((e,t)=>{t.setContentOf(e,n)}));return e.hasAttribute("htmlCustomElementAttributes")&&P_(t,e.getAttribute("htmlCustomElementAttributes"),s),s}})}))}}function*by(e,t,i){if(t)if(!(Symbol.iterator in t)&&t.is("documentSelection")&&t.isCollapsed)e.schema.checkAttributeInSelection(t,i)&&(yield t);else for(const n of function(e,t,i){return!(Symbol.iterator in t)&&(t.is("node")||t.is("$text")||t.is("$textProxy"))?e.schema.checkAttribute(t,i)?[e.createRangeOn(t)]:[]:e.schema.getValidRanges(e.createSelection(t).getRanges(),i)}(e,t,i))yield*n.getItems({shallow:!0})}function wy(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function vy(e,t){const i=e.plugins.get("ImageUtils"),n=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>{if(!i.isInlineImageView(e))return null;if(!n)return s(e);return("block"==e.getStyle("display")||e.findAncestor(i.isBlockImageView)?"imageBlock":"imageInline")!==t?null:s(e)};function s(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function _y(e,t){const i=Ss(t.getSelectedBlocks());return!i||e.isObject(i)||i.isEmpty&&"listItem"!=i.name?"imageBlock":"imageInline"}function yy(e){return e&&e.endsWith("px")?parseInt(e):null}function ky(e){const t=yy(e.getStyle("width")),i=yy(e.getStyle("height"));return!(!t||!i)}const Cy=/^(image|image-inline)$/;class Ay extends nr{constructor(){super(...arguments),this._domEmitter=new(Vn())}static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,i=null,n={}){const s=this.editor,o=s.model,r=o.document.selection,a=xy(s,t||r,i);e={...Object.fromEntries(r.getAttributes()),...e};for(const t in e)o.schema.checkAttribute(a,t)||delete e[t];return o.change((i=>{const{setImageSizes:s=!0}=n,r=i.createElement(a,e);return o.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==a?void 0:"auto"}),r.parent?(s&&this.setImageNaturalSizeAttributes(r),r):null}))}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change((i=>{const n=new Mn.window.Image;this._domEmitter.listenTo(n,"load",(()=>{e.getAttribute("width")||e.getAttribute("height")||this.editor.model.enqueueChange(i.batch,(t=>{t.setAttribute("width",n.naturalWidth,e),t.setAttribute("height",n.naturalHeight,e)})),this._domEmitter.stopListening(n,"load")})),n.src=t})))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:Cy})}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){const i=xy(e,t,null);if("imageBlock"==i){const i=function(e,t){const i=Wb(e,t),n=i.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,e.model);if(e.model.schema.checkChild(i,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,i){t.setCustomProperty("image",!0,e);return Db(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&Fb(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function xy(e,t,i){const n=e.model.schema,s=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?i||("inline"===s?"imageInline":"auto"!==s?"imageBlock":t.is("selection")?_y(n,t):n.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const Ty=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class Ey extends or{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=t.model,s=i.getClosestSelectedImageElement(n.document.selection);n.change((t=>{t.setAttribute("alt",e.newValue,s)}))}}class Sy extends nr{static get requires(){return[Ay]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Ey(this.editor))}}class Py extends Ds{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Ps,this.keystrokes=new Is,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),bm.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),bm.cancel,"ck-button-cancel","cancel"),this._focusables=new Fs,this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),i({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,i,n){const s=new ho(this.locale);return s.set({label:e,icon:t,tooltip:!0}),s.extendTemplate({attributes:{class:i}}),n&&s.delegate("execute").to(this,n),s}_createLabeledInputView(){const e=this.locale.t,t=new $o(this.locale,Nm);return t.label=e("Text alternative"),t}}function Iy(e){const t=e.editing.view,i=jg.defaultPositions,n=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(t.document.selection)),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class Vy extends nr{static get requires(){return[vf]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(i=>{const n=e.commands.get("imageTextAlternative"),s=new ho(i);return s.set({label:t("Change image text alternative"),icon:bm.textAlternative,tooltip:!0}),s.bind("isEnabled").to(n,"isEnabled"),s.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(s,"execute",(()=>{this._showForm()})),s}))}_createForm(){const i=this.editor,n=i.editing.view.document,s=i.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(t(Py))(i.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{i.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(i.ui,"update",(()=>{s.getClosestSelectedImageWidget(n.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const i=Iy(e);t.updatePosition(i)}}(i):this._hideForm(!0)})),e({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:Iy(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class Ry extends nr{static get requires(){return[Sy,Vy]}static get pluginName(){return"ImageTextAlternative"}}function Oy(e,t){const i=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const s=n.writer,o=n.mapper.toViewElement(i.item),r=e.findViewImgElement(o);null===i.attributeNewValue?(s.removeAttribute("srcset",r),s.removeAttribute("sizes",r)):i.attributeNewValue&&(s.setAttribute("srcset",i.attributeNewValue,r),s.setAttribute("sizes","100vw",r))};return e=>{e.on(`attribute:srcset:${t}`,i)}}function By(e,t,i){const n=(t,i,n)=>{if(!n.consumable.consume(i.item,t.name))return;const s=n.writer,o=n.mapper.toViewElement(i.item),r=e.findViewImgElement(o);s.setAttribute(i.attributeKey,i.attributeNewValue||"",r)};return e=>{e.on(`attribute:${i}:${t}`,n)}}class My extends Ll{observe(e){this.listenTo(e,"load",((e,t)=>{const i=t.target;this.checkShouldIgnoreEventFromTarget(i)||"IMG"==i.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Ny extends or{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&k("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&k("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=ks(e.source),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),s=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const o=i.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&o&&n.isImage(o)){const t=this.editor.model.createPositionAfter(o);n.insertImage({...e,...s},t)}else n.insertImage({...e,...s})}))}}class Fy extends or{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),i=this.editor.plugins.get("ImageUtils");this.editor.model.change((n=>{n.setAttribute("src",e.source,t),this.cleanupImage(n,t),i.setImageNaturalSizeAttributes(t)}))}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class Dy extends nr{static get requires(){return[Ay]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(My),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const i=new Ny(e),n=new Fy(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",i)}}class Ly extends nr{static get requires(){return[Ay]}static get pluginName(){return"ImageSizeAttributes"}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n="imageBlock"===e?"figure":"img";function s(t,n,s,o){t.on(`attribute:${n}:${e}`,((t,n,r)=>{if(!r.consumable.consume(n.item,t.name))return;const a=r.writer,l=r.mapper.toViewElement(n.item),c=i.findViewImgElement(l);if(null!==n.attributeNewValue?a.setAttribute(s,n.attributeNewValue,c):a.removeAttribute(s,c),n.item.hasAttribute("sources"))return;const d=n.item.hasAttribute("resizedWidth");if("imageInline"===e&&!d&&!o)return;const h=n.item.getAttribute("width"),u=n.item.getAttribute("height");h&&u&&a.setStyle("aspect-ratio",`${h}/${u}`,c)}))}t.conversion.for("upcast").attributeToAttribute({view:{name:n,styles:{width:/.+/}},model:{key:"width",value:e=>ky(e)?yy(e.getStyle("width")):null}}).attributeToAttribute({view:{name:n,key:"width"},model:"width"}).attributeToAttribute({view:{name:n,styles:{height:/.+/}},model:{key:"height",value:e=>ky(e)?yy(e.getStyle("height")):null}}).attributeToAttribute({view:{name:n,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add((e=>{s(e,"width","width",!0),s(e,"height","height",!0)})),t.conversion.for("dataDowncast").add((e=>{s(e,"width","width",!1),s(e,"height","height",!1)}))}}class zy extends or{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(e={}){const t=this.editor,i=this.editor.model,n=t.plugins.get("ImageUtils"),s=n.getClosestSelectedImageElement(i.document.selection),o=Object.fromEntries(s.getAttributes());return o.src||o.uploadId?i.change((t=>{const{setImageSizes:r=!0}=e,a=Array.from(i.markers).filter((e=>e.getRange().containsItem(s))),l=n.insertImage(o,i.createSelection(s,"on"),this._modelElementName,{setImageSizes:r});if(!l)return null;const c=t.createRangeOn(l);for(const e of a){const i=e.getRange(),n="$graveyard"!=i.root.rootName?i.getJoined(c,!0):c;t.updateMarker(e,{range:n})}return{oldElement:s,newElement:l}})):null}}class Hy extends nr{static get requires(){return[Ay]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("editingDowncast").add((e=>{e.on("attribute:placeholder",((e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;if(!t.item.is("element","imageBlock")&&!t.item.is("element","imageInline"))return;n.consumable.consume(t.item,e.name);const s=n.writer,o=n.mapper.toViewElement(t.item),r=i.findViewImgElement(o);t.attributeNewValue?(s.addClass("image_placeholder",r),s.setStyle("background-image",`url(${t.attributeNewValue})`,r),s.setCustomProperty("editingPipeline:doNotReuseOnce",!0,r)):(s.removeClass("image_placeholder",r),s.removeStyle("background-image",r))}))}))}_setupLoadListener(){const e=this.editor,t=e.model,i=e.editing,n=i.view,s=e.plugins.get("ImageUtils");n.addObserver(My),this.listenTo(n.document,"imageLoaded",((e,o)=>{const r=n.domConverter.mapDomToView(o.target);if(!r)return;const a=s.getImageWidgetFromImageView(r);if(!a)return;const l=i.mapper.toModelElement(a);l&&l.hasAttribute("placeholder")&&t.enqueueChange({isUndoable:!1},(e=>{e.removeAttribute("placeholder",l)}))}))}}class $y extends nr{static get requires(){return[Dy,Ly,Ay,Hy,Pb]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new zy(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>wy(t)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:i})=>n.toImageWidget(wy(i),i,t("image widget"))}),i.for("downcast").add(By(n,"imageBlock","src")).add(By(n,"imageBlock","alt")).add(Oy(n,"imageBlock")),i.for("upcast").elementToElement({view:vy(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,i,n)=>{if(!n.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const s=e.findViewImgElement(i.viewItem);if(!s||!n.consumable.test(s,{name:!0}))return;n.consumable.consume(i.viewItem,{name:!0,classes:"image"});const o=Ss(n.convertItem(s,i.modelCursor).modelRange.getItems());o?(n.convertChildren(i.viewItem,o),n.updateConversionResult(o,i)):n.consumable.revert(i.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline");this.listenTo(s,"inputTransformation",((s,o)=>{const r=Array.from(o.content.getChildren());let a;if(!r.every(n.isInlineImageView))return;a=o.targetRanges?e.editing.mapper.toModelRange(o.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageBlock"===_y(t.schema,l)){const e=new Au(i.document),t=r.map((t=>e.createElement("figure",{class:"image"},t)));o.content=e.createDocumentFragment(t)}})),this.listenTo(s,"contentInsertion",((e,i)=>{"paste"===i.method&&t.change((e=>{const t=e.createRangeIn(i.content);for(const e of t.getItems())e.is("element","imageBlock")&&n.setImageNaturalSizeAttributes(e)}))}))}}class Wy extends Ds{constructor(e,t=[]){super(e),this.focusTracker=new Ps,this.keystrokes=new Is,this._focusables=new Fs,this.children=this.createCollection(),this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const e of t)this.children.add(e),this._focusables.add(e),e instanceof go&&this._focusables.addMany(e.children);if(this._focusables.length>1)for(const e of this._focusables)jy(e)&&(e.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()})));this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),i({view:this});for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}function jy(e){return"focusCycler"in e}class Uy extends nr{static get pluginName(){return"ImageInsertUI"}static get requires(){return[Ay]}constructor(e){super(e),this._integrations=new Map,e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",(()=>{this.isImageSelected=i.isImage(t.getSelectedElement())}));const n=e=>this._createToolbarComponent(e);e.ui.componentFactory.add("insertImage",n),e.ui.componentFactory.add("imageInsert",n)}registerIntegration({name:e,observable:t,buttonViewCreator:i,formViewCreator:n,requiresForm:s}){this._integrations.has(e)&&k("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:i,formViewCreator:n,requiresForm:!!s})}_createToolbarComponent(e){const t=this.editor,i=e.t,n=this._prepareIntegrations();if(!n.length)return null;let s;const o=n[0];if(1==n.length){if(!o.requiresForm)return o.buttonViewCreator(!0);s=o.buttonViewCreator(!0)}else{const t=o.buttonViewCreator(!1);s=new Sm(e,t),s.tooltip=!0,s.bind("label").to(this,"isImageSelected",(e=>i(e?"Replace image":"Insert image")))}const r=this.dropdownView=Pm(e,s),a=n.map((({observable:e})=>e));return r.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some((e=>e)))),r.once("change:isOpen",(()=>{const e=n.map((({formViewCreator:e})=>e(1==n.length))),i=new Wy(t.locale,e);r.panelView.children.add(i)})),r}_prepareIntegrations(){const e=this.editor.config.get("image.insert.integrations"),t=[];if(!e.length)return k("image-insert-integrations-not-specified"),t;for(const i of e)this._integrations.has(i)?t.push(this._integrations.get(i)):["upload","assetManager","url"].includes(i)||k("image-insert-unknown-integration",{item:i});return t.length||k("image-insert-integrations-not-registered"),t}}class qy extends nr{static get requires(){return[$y,tw,Ry,Uy]}static get pluginName(){return"ImageBlock"}}class Gy extends nr{static get requires(){return[Dy,Ly,Ay,Hy,Pb]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new zy(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:i})=>n.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(i),i,t("image widget"))}),i.for("downcast").add(By(n,"imageInline","src")).add(By(n,"imageInline","alt")).add(Oy(n,"imageInline")),i.for("upcast").elementToElement({view:vy(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline");this.listenTo(s,"inputTransformation",((s,o)=>{const r=Array.from(o.content.getChildren());let a;if(!r.every(n.isBlockImageView))return;a=o.targetRanges?e.editing.mapper.toModelRange(o.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===_y(t.schema,l)){const e=new Au(i.document),t=r.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((i=>e.setAttribute(...i,n.findViewImgElement(t)))),t.getChild(0)):t));o.content=e.createDocumentFragment(t)}})),this.listenTo(s,"contentInsertion",((e,i)=>{"paste"===i.method&&t.change((e=>{const t=e.createRangeIn(i.content);for(const e of t.getItems())e.is("element","imageInline")&&n.setImageNaturalSizeAttributes(e)}))}))}}class Zy extends nr{static get requires(){return[Gy,tw,Ry,Uy]}static get pluginName(){return"ImageInline"}}class Ky extends nr{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[Ay]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Jy extends or{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has($y))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,s=n.getSelectedElement();if(!s){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=i.isImage(s),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(s):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageCaptionEditing"),s=this.editor.plugins.get("ImageUtils");let o=i.getSelectedElement();const r=n._getSavedCaption(o);s.isInlineImage(o)&&(this.editor.execute("imageTypeBlock"),o=i.getSelectedElement());const a=r||e.createElement("caption");e.append(a,o),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),s=t.plugins.get("ImageCaptionUtils");let o,r=i.getSelectedElement();r?o=s.getCaptionFromImageModelElement(r):(o=s.getCaptionFromModelSelection(i),r=o.parent),n._saveCaption(r,o),e.setSelection(r,"on"),e.remove(o)}}class Qy extends nr{static get requires(){return[Ay,Ky]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Jy(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),s=e.t;e.conversion.for("upcast").elementToElement({view:e=>n.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>i.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:n})=>{if(!i.isBlockImage(e.parent))return null;const o=n.createEditableElement("figcaption");n.setCustomProperty("imageCaption",!0,o),o.placeholder=s("Enter image caption"),mr({view:t,element:o,keepOnFocus:!0});const r=e.parent.getAttribute("alt");return $b(o,n,{label:r?s("Caption for image: %0",[r]):s("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),s=e.commands.get("imageTypeBlock"),o=e=>{if(!e.return)return;const{oldElement:n,newElement:s}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=i.getCaptionFromImageModelElement(n);if(e)return void this._saveCaption(s,e)}const o=this._getSavedCaption(n);o&&this._saveCaption(s,o)};n&&this.listenTo(n,"execute",o,{priority:"low"}),s&&this.listenTo(s,"execute",o,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Pc.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const s=t.document.differ.getChanges();for(const t of s){if("alt"!==t.attributeKey)continue;const s=t.range.start.nodeAfter;if(i.isBlockImage(s)){const t=n.getCaptionFromImageModelElement(s);if(!t)return;e.editing.reconvertItem(t)}}}))}}class Yy extends nr{static get requires(){return[Ky]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(s=>{const o=e.commands.get("toggleImageCaption"),r=new ho(s);return r.set({icon:bm.caption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),r.bind("label").to(o,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(r,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const n=i.getCaptionFromModelSelection(e.model.document.selection);if(n){const i=e.editing.mapper.toViewElement(n);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",i)}))}e.editing.view.focus()})),r}))}}class Xy extends(G()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((i,n)=>{t.onload=()=>{const e=t.result;this._data=e,i(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class ek extends nr{constructor(){super(...arguments),this.loaders=new Es,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[pm]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return k("filerepository-no-upload-adapter"),null;const t=new tk(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof tk?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,i)=>{e===t&&this._loadersMap.delete(i)}))}_updatePendingAction(){const e=this.editor.plugins.get(pm);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,i=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(i(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else e.remove(this._pendingAction),this._pendingAction=null}}class tk extends(G()){constructor(e,t){super(),this.id=b(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Xy,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new y("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new y("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((i,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,i(e)})).catch((e=>{t.isFulfilled=!0,n(e)}))})),t}}class ik extends ho{constructor(e){super(e),this.buttonView=this,this._fileInputView=new nk(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",(()=>{this._fileInputView.open()})),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}class nk extends Ds{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}function sk(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function ok(e){return new Promise(((t,i)=>{const n=e.getAttribute("src");fetch(n).then((e=>e.blob())).then((e=>{const i=rk(e,n),s=i.replace("image/",""),o=new File([e],`image.${s}`,{type:i});t(o)})).catch((e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise(((t,i)=>{const n=Mn.document.createElement("img");n.addEventListener("load",(()=>{const e=Mn.document.createElement("canvas");e.width=n.width,e.height=n.height;e.getContext("2d").drawImage(n,0,0),e.toBlob((e=>e?t(e):i()))})),n.addEventListener("error",(()=>i())),n.src=e}))}(e).then((t=>{const i=rk(t,e),n=i.replace("image/","");return new File([t],`image.${n}`,{type:i})}))}(n).then(t).catch(i):i(e)))}))}function rk(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class ak extends nr{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,i=i=>{const n=new ik(i),s=e.commands.get("uploadImage"),o=e.config.get("image.upload.types"),r=sk(o);return n.set({acceptedType:o.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0,label:t("Upload image from computer"),icon:bm.imageUpload,tooltip:!0}),n.bind("isEnabled").to(s),n.on("done",((t,i)=>{const n=Array.from(i).filter((e=>r.test(e.type)));n.length&&(e.execute("uploadImage",{file:n}),e.editing.view.focus())})),n};if(e.ui.componentFactory.add("uploadImage",i),e.ui.componentFactory.add("imageUpload",i),e.plugins.has("ImageInsertUI")){const i=e.plugins.get("ImageInsertUI"),n=e.commands.get("uploadImage");i.registerIntegration({name:"upload",observable:n,buttonViewCreator:()=>{const n=e.ui.componentFactory.create("uploadImage");return n.bind("label").to(i,"isImageSelected",(e=>t(e?"Replace image from computer":"Upload image from computer"))),n},formViewCreator:()=>{const n=e.ui.componentFactory.create("uploadImage");return n.withText=!0,n.bind("label").to(i,"isImageSelected",(e=>t(e?"Replace from computer":"Upload from computer"))),n.on("execute",(()=>{i.dropdownView.isOpen=!1})),n}})}}}class lk extends nr{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,i)=>{const n=this.editor,s=t.item,o=s.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const r=n.plugins.get("ImageUtils"),a=n.plugins.get(ek),l=o?t.attributeNewValue:null,c=this.placeholder,d=n.editing.mapper.toViewElement(s),h=i.writer;if("reading"==l)return ck(d,h),void dk(r,c,d,h);if("uploading"==l){const e=a.loaders.get(o);return ck(d,h),void(e?(hk(d,h),function(e,t,i,n){const s=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),s),i.on("change:uploadedPercent",((e,t,i)=>{n.change((e=>{e.setStyle("width",i+"%",s)}))}))}(d,h,e,n.editing.view),function(e,t,i,n){if(n.data){const s=e.findViewImgElement(t);i.setAttribute("src",n.data,s)}}(r,d,h,e)):dk(r,c,d,h))}"complete"==l&&a.loaders.get(o)&&function(e,t,i){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout((()=>{i.change((e=>e.remove(e.createRangeOn(n))))}),3e3)}(d,h,n.editing.view),function(e,t){mk(e,t,"progressBar")}(d,h),hk(d,h),function(e,t){t.removeClass("ck-appear",e)}(d,h)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function ck(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function dk(e,t,i,n){i.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",i);const s=e.findViewImgElement(i);s.getAttribute("src")!==t&&n.setAttribute("src",t,s),uk(i,"placeholder")||n.insert(n.createPositionAfter(s),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function hk(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),mk(e,t,"placeholder")}function uk(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function mk(e,t,i){const n=uk(e,i);n&&t.remove(t.createRangeOn(n))}class gk extends or{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=ks(e.file),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),s=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const o=i.getSelectedElement();if(t&&o&&n.isImage(o)){const t=this.editor.model.createPositionAfter(o);this._uploadImage(e,s,t)}else this._uploadImage(e,s)}))}_uploadImage(e,t,i){const n=this.editor,s=n.plugins.get(ek).createLoader(e),o=n.plugins.get("ImageUtils");s&&o.insertImage({...t,uploadId:s.id},i)}}class fk extends nr{static get requires(){return[ek,pf,Pb,Ay]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,n=e.plugins.get(ek),s=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline"),r=sk(e.config.get("image.upload.types")),a=new gk(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,i)=>{if(n=i.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const s=Array.from(i.dataTransfer.files).filter((e=>!!e&&r.test(e.type)));s.length&&(t.stop(),e.model.change((t=>{i.targetRanges&&t.setSelection(i.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.execute("uploadImage",{file:s})})))})),this.listenTo(o,"inputTransformation",((t,i)=>{const o=Array.from(e.editing.view.createRangeIn(i.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(s,e)&&!e.getAttribute("uploadProcessed"))).map((e=>({promise:ok(e),imageElement:e})));if(!o.length)return;const r=new Au(e.editing.view.document);for(const e of o){r.setAttribute("uploadProcessed",!0,e.imageElement);const t=n.createLoader(e.promise);t&&(r.setAttribute("src","",e.imageElement),r.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),s=new Set;for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,o="$graveyard"==t.position.root.rootName;for(const t of pk(e,i)){const e=t.getAttribute("uploadId");if(!e)continue;const i=n.loaders.get(e);i&&(o?s.has(e)||i.abort():(s.add(e),this._uploadImageElements.set(e,t),"idle"==i.status&&this._readAndUpload(i)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:i})=>{const n=i.urls?i.urls:i;this.editor.model.change((e=>{e.setAttribute("src",n.default,t),this._parseAndSetSrcsetAttributeOnImage(n,t,e),s.setImageNaturalSizeAttributes(t)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,i=t.model,n=t.locale.t,s=t.plugins.get(ek),o=t.plugins.get(pf),r=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))})),e.read().then((()=>{const n=e.upload(),s=a.get(e.id);if(l.isSafari){const e=t.editing.mapper.toViewElement(s),i=r.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!i.parent)return;const e=t.editing.view.domConverter.mapViewToDom(i.parent);if(!e)return;const n=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=n}))}return i.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",s)})),n})).then((t=>{i.enqueueChange({isUndoable:!1},(i=>{const n=a.get(e.id);i.setAttribute("uploadStatus","complete",n),this.fire("uploadComplete",{data:t,imageElement:n})})),c()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&o.showWarning(t,{title:n("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},(t=>{t.remove(a.get(e.id))})),c()}));function c(){i.enqueueChange({isUndoable:!1},(t=>{const i=a.get(e.id);t.removeAttribute("uploadId",i),t.removeAttribute("uploadStatus",i),a.delete(e.id)})),s.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const s=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");if(""!=s){const e={srcset:s};t.hasAttribute("width")||t.hasAttribute("height")||(e.width=n),i.setAttributes(e,t)}}}function pk(e,t){const i=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>i.isImage(e.item))).map((e=>e.item))}class bk extends nr{static get pluginName(){return"ImageUpload"}static get requires(){return[fk,ak,lk]}}class wk extends Ds{constructor(e){super(e),this.set("imageURLInputValue",""),this.set("isImageSelected",!1),this.set("isEnabled",!0),this.focusTracker=new Ps,this.keystrokes=new Is,this._focusables=new Fs,this.focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.urlInputView=this._createUrlInputView(),this.insertButtonView=this._createInsertButton(),this.cancelButtonView=this._createCancelButton(),this._focusables.addMany([this.urlInputView,this.insertButtonView,this.cancelButtonView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-image-insert-url"]},children:[this.urlInputView,{tag:"div",attributes:{class:["ck","ck-image-insert-url__action-row"]},children:[this.insertButtonView,this.cancelButtonView]}]})}render(){super.render();for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createUrlInputView(){const e=this.locale,t=e.t,i=new $o(e,Nm);return i.bind("label").to(this,"isImageSelected",(e=>t(e?"Update image URL":"Insert image via URL"))),i.bind("isEnabled").to(this),i.fieldView.placeholder="https://example.com/image.png",i.fieldView.bind("value").to(this,"imageURLInputValue",(e=>e||"")),i.fieldView.on("input",(()=>{this.imageURLInputValue=i.fieldView.element.value.trim()})),i}_createInsertButton(){const e=this.locale,t=e.t,i=new ho(e);return i.set({icon:bm.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("label").to(this,"isImageSelected",(e=>t(e?"Update":"Insert"))),i.bind("isEnabled").to(this,"imageURLInputValue",this,"isEnabled",((...e)=>e.every((e=>e)))),i.delegate("execute").to(this,"submit"),i}_createCancelButton(){const e=this.locale,t=e.t,i=new ho(e);return i.set({label:t("Cancel"),icon:bm.cancel,class:"ck-button-cancel",withText:!0}),i.bind("isEnabled").to(this),i.delegate("execute").to(this,"cancel"),i}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}}class vk extends nr{static get pluginName(){return"ImageInsertViaUrlUI"}static get requires(){return[Uy]}init(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI");const e=this.editor.commands.get("insertImage");this._imageInsertUI.registerIntegration({name:"url",observable:e,requiresForm:!0,buttonViewCreator:e=>this._createInsertUrlButton(e),formViewCreator:e=>this._createInsertUrlView(e)})}_createInsertUrlView(e){const t=this.editor,i=t.locale,n=i.t,s=t.commands.get("replaceImageSource"),o=t.commands.get("insertImage"),r=new wk(i),a=e?null:new go(i,[r]);return r.bind("isImageSelected").to(this._imageInsertUI),r.bind("isEnabled").toMany([o,s],"isEnabled",((...e)=>e.some((e=>e)))),r.imageURLInputValue=s.value||"",this._imageInsertUI.dropdownView.on("change:isOpen",(()=>{this._imageInsertUI.dropdownView.isOpen&&(r.imageURLInputValue=s.value||"",a&&(a.isCollapsed=!0))}),{priority:"low"}),r.on("submit",(()=>{s.isEnabled?t.execute("replaceImageSource",{source:r.imageURLInputValue}):t.execute("insertImage",{source:r.imageURLInputValue}),this._closePanel()})),r.on("cancel",(()=>this._closePanel())),a?(a.set({isCollapsed:!0}),a.bind("label").to(this._imageInsertUI,"isImageSelected",(e=>n(e?"Update image URL":"Insert image via URL"))),a):r}_createInsertUrlButton(e){const t=e?Jo:ho,i=this.editor,n=new t(i.locale),s=i.locale.t;return n.set({icon:bm.imageUrl,tooltip:!0}),n.bind("label").to(this._imageInsertUI,"isImageSelected",(e=>s(e?"Update image URL":"Insert image via URL"))),n}_closePanel(){this.editor.editing.view.focus(),this._imageInsertUI.dropdownView.isOpen=!1}}class _k extends nr{static get pluginName(){return"ImageInsertViaUrl"}static get requires(){return[vk,Uy]}}class yk extends or{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("resizedWidth")?this.value={width:t.getAttribute("resizedWidth"),height:null}:this.value=null}execute(e){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils"),s=n.getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},s&&i.change((t=>{t.setAttribute("resizedWidth",e.width,s),t.removeAttribute("resizedHeight",s),n.setImageNaturalSizeAttributes(s)}))}}class kk extends nr{static get requires(){return[Ay]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new yk(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils");t.conversion.for("downcast").add((t=>t.on(`attribute:resizedWidth:${e}`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=i.writer,s=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,s),n.addClass("image_resized",s)):(n.removeStyle("width",s),n.removeClass("image_resized",s))})))),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:e=>({key:"style",value:{height:e}})}),t.conversion.for("editingDowncast").add((t=>t.on(`attribute:resizedHeight:${e}`,((t,n,s)=>{if(!s.consumable.consume(n.item,t.name))return;const o=s.writer,r=s.mapper.toViewElement(n.item),a="imageInline"===e?i.findViewImgElement(r):r;null!==n.attributeNewValue?o.setStyle("height",n.attributeNewValue,a):o.removeStyle("height",a)})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:e=>ky(e)?null:e.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:e=>ky(e)?null:e.getStyle("height")}})}}const Ck={small:bm.objectSizeSmall,medium:bm.objectSizeMedium,large:bm.objectSizeLarge,original:bm.objectSizeFull};class Ak extends nr{static get requires(){return[kk]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:s}=e,o=n?n+this._resizeUnit:null;t.ui.componentFactory.add(i,(i=>{const n=new ho(i),r=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!Ck[s])throw new y("imageresizebuttons-missing-icon",t,e);return n.set({label:a,icon:Ck[s],tooltip:a,isToggleable:!0}),n.bind("isEnabled").to(this),n.bind("isOn").to(r,"value",xk(o)),this.listenTo(n,"execute",(()=>{t.execute("resizeImage",{width:o})})),n}))}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find((e=>!e.value)),s=s=>{const o=t.commands.get("resizeImage"),r=Pm(s,Jo),a=r.buttonView,l=i("Resize image");return a.set({tooltip:l,commandValue:n.value,icon:Ck.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:l,ariaLabelledBy:void 0}),a.bind("label").to(o,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(n))),r.bind("isEnabled").to(this),Rm(r,(()=>this._getResizeDropdownListItemDefinitions(e,o)),{ariaLabel:i("Image resize list"),role:"menu"}),this.listenTo(r,"execute",(e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()})),r};t.ui.componentFactory.add("resizeImage",s),t.ui.componentFactory.add("imageResize",s)}_getOptionLabelValue(e,t=!1){const i=this.editor.t;return e.label?e.label:t?e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const i=new Es;return e.map((e=>{const n=e.value?e.value+this._resizeUnit:null,s={type:"button",model:new bf({commandName:"resizeImage",commandValue:n,label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null})};s.model.bind("isOn").to(t,"value",xk(n)),i.add(s)})),i}}function xk(e){return t=>null===e&&t===e||null!==t&&t.width===e}const Tk="image_resized";class Ek extends nr{static get requires(){return[dw,Ay]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils");t.addObserver(My),this.listenTo(t.document,"imageLoaded",((n,s)=>{if(!s.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const o=e.editing.view.domConverter,r=o.domToView(s.target),a=i.getImageWidgetFromImageView(r);let l=this.editor.plugins.get(dw).getResizerByViewElement(a);if(l)return void l.redraw();const c=e.editing.mapper,d=c.toModelElement(a);l=e.plugins.get(dw).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:d,viewElement:a,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>o.mapViewToDom(c.toViewElement(d.parent)),isCentered(){const e=d.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(i){t.change((e=>{e.removeClass(Tk,a)})),e.execute("resizeImage",{width:i})}}),l.on("updateSize",(()=>{a.hasClass(Tk)||t.change((e=>{e.addClass(Tk,a)}));const e="imageInline"===d.name?r:a;e.getStyle("height")&&t.change((t=>{t.removeStyle("height",e)}))})),l.bind("isEnabled").to(this)}))}}class Sk extends or{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils");i.change((t=>{const s=e.value,{setImageSizes:o=!0}=e;let r=n.getClosestSelectedImageElement(i.document.selection);s&&this.shouldConvertImageType(s,r)&&(this.editor.execute(n.isBlockImage(r)?"imageTypeInline":"imageTypeBlock",{setImageSizes:o}),r=n.getClosestSelectedImageElement(i.document.selection)),!s||this._styles.get(s).isDefault?t.removeAttribute("imageStyle",r):t.setAttribute("imageStyle",s,r),o&&n.setImageNaturalSizeAttributes(r)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:Pk,objectInline:Ik,objectLeft:Vk,objectRight:Rk,objectCenter:Ok,objectBlockLeft:Bk,objectBlockRight:Mk}=bm,Nk={get inline(){return{name:"inline",title:"In line",icon:Ik,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:Vk,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Bk,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Ok,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Rk,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Mk,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Ok,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Rk,modelElements:["imageBlock"],className:"image-style-side"}}},Fk={full:Pk,left:Bk,right:Mk,center:Ok,inlineLeft:Vk,inlineRight:Rk,inline:Ik},Dk=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function Lk(e){k("image-style-configuration-definition-invalid",e)}const zk={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map((e=>function(e){e="string"==typeof e?Nk[e]?{...Nk[e]}:{name:e}:function(e,t){const i={...t};for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(i[n]=e[n]);return i}(Nk[e.name],e);"string"==typeof e.icon&&(e.icon=Fk[e.icon]||e.icon);return e}(e))).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:i}){const{modelElements:n,name:s}=e;if(!(n&&n.length&&s))return Lk({style:e}),!1;{const s=[t?"imageBlock":null,i?"imageInline":null];if(!n.some((e=>s.includes(e))))return k("image-style-missing-dependency",{style:e,missingPlugins:n.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...Dk]:[]},warnInvalidStyle:Lk,DEFAULT_OPTIONS:Nk,DEFAULT_ICONS:Fk,DEFAULT_DROPDOWN_DEFINITIONS:Dk};function Hk(e,t){for(const i of t)if(i.name===e)return i}class $k extends nr{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[Ay]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=zk,i=this.editor,n=i.plugins.has("ImageBlockEditing"),s=i.plugins.has("ImageInlineEditing");i.config.define("image.styles",t(n,s)),this.normalizedStyles=e({configuredStyles:i.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:s}),this._setupConversion(n,s),this._setupPostFixer(),i.commands.add("imageStyle",new Sk(i,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,n=i.model.schema,s=(o=this.normalizedStyles,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=Hk(t.attributeNewValue,o),s=Hk(t.attributeOldValue,o),r=i.mapper.toViewElement(t.item),a=i.writer;s&&a.removeClass(s.className,r),n&&a.addClass(n.className,r)});var o;const r=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,i,n)=>{if(!i.modelRange)return;const s=i.viewItem,o=Ss(i.modelRange.getItems());if(o&&n.schema.checkAttribute(o,"imageStyle"))for(const e of t[o.name])n.consumable.consume(s,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,o)}}(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",s),i.data.downcastDispatcher.on("attribute:imageStyle",s),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:figure",r,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:img",r,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(Ay),n=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let s=!1;for(const o of t.differ.getChanges())if("insert"==o.type||"attribute"==o.type&&"imageStyle"==o.attributeKey){let t="insert"==o.type?o.position.nodeAfter:o.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!i.isImage(t))continue;const r=t.getAttribute("imageStyle");if(!r)continue;const a=n.get(r);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),s=!0)}return s}))}}class Wk extends nr{static get requires(){return[$k]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=jk(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of i)this._createButton(e);const n=jk([...t.filter(L),...zk.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of n)this._createDropdown(e,i)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,(n=>{let s;const{defaultItem:o,items:r,title:a}=e,l=r.filter((e=>t.find((({name:t})=>Uk(t)===e)))).map((e=>{const t=i.create(e);return e===o&&(s=t),t}));r.length!==l.length&&zk.warnInvalidStyle({dropdown:e});const c=Pm(n,Sm),d=c.buttonView,h=d.arrowView;return Im(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:qk(a,s.label),class:null,tooltip:!0}),h.unbind("label"),h.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(oa);return t<0?s.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(oa);return qk(a,t<0?s.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(oa))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(oa)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:s.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(oa))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(Uk(t),(i=>{const n=this.editor.commands.get("imageStyle"),s=new ho(i);return s.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(n,"isEnabled"),s.bind("isOn").to(n,"value",(e=>e===t)),s.on("execute",this._executeCommand.bind(this,t)),s}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function jk(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}function Uk(e){return`imageStyle:${e}`}function qk(e,t){return(e?e+": ":"")+t}class Gk extends nr{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new ar(e)),e.commands.add("outdent",new ar(e))}}class Zk extends nr{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,i=e.t,n="ltr"==t.uiLanguageDirection?bm.indent:bm.outdent,s="ltr"==t.uiLanguageDirection?bm.outdent:bm.indent;this._defineButton("indent",i("Increase indent"),n),this._defineButton("outdent",i("Decrease indent"),s)}_defineButton(e,t,i){const n=this.editor;n.ui.componentFactory.add(e,(s=>{const o=n.commands.get(e),r=new ho(s);return r.set({label:t,icon:i,tooltip:!0}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{n.execute(e),n.editing.view.focus()})),r}))}}class Kk extends or{constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=Ss(this.editor.model.document.selection.getSelectedBlocks());e&&this._isIndentationChangeAllowed(e)?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=this._getBlocksToChange();e.change((e=>{for(const i of t){const t=i.getAttribute("blockIndent"),n=this._indentBehavior.getNextIndent(t);n?e.setAttribute("blockIndent",n,i):e.removeAttribute("blockIndent",i)}}))}_getBlocksToChange(){const e=this.editor.model.document.selection;return Array.from(e.getSelectedBlocks()).filter((e=>this._isIndentationChangeAllowed(e)))}_isIndentationChangeAllowed(e){const t=this.editor;if(!t.model.schema.checkAttribute(e,"blockIndent"))return!1;if(!t.plugins.has("ListUtils"))return!0;if(!this._indentBehavior.isForward)return!0;return!t.plugins.get("ListUtils").isListItemBlock(e)}}class Jk{constructor(e){this.isForward="forward"===e.direction,this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||"0");return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||"0");if(!(!e||e.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const i=t+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class Qk{constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t<this.classes.length-1:t>=0}getNextIndent(e){const t=this.classes.indexOf(e),i=this.isForward?1:-1;return this.classes[t+i]}}const Yk=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class Xk{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const n=i.writer,s=n.document.selection;for(const e of this._definitions){const o=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,o);for(const t in e.styles)n.setStyle(t,e.styles[t],o);n.setCustomProperty("link",!0,o),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(s.getFirstRange(),o):n.wrap(i.mapper.toViewRange(t.range),o):n.unwrap(i.mapper.toViewRange(t.range),o)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:i,mapper:n})=>{const s=n.toViewElement(t.item),o=Array.from(s.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const n=Vs(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?i.addClass(t,o):i.setAttribute(e,t,o);e.classes&&i.addClass(e.classes,o);for(const t in e.styles)i.setStyle(t,e.styles[t],o)}else{for(const[e,t]of n)"class"===e?i.removeClass(t,o):i.removeAttribute(e,o);e.classes&&i.removeClass(e.classes,o);for(const t in e.styles)i.removeStyle(t,o)}}}))}}}const eC=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,tC=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,iC=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,nC=/^((\w+:(\/{2,})?)|(\W))/i,sC="Ctrl+K";function oC(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function rC(e){const t=String(e);return function(e){const t=e.replace(eC,"");return!!t.match(tC)}(t)?t:"#"}function aC(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function lC(e,t){const i=(n=e,iC.test(n)?"mailto:":t);var n;const s=!!i&&!cC(e);return e&&s?i+e:e}function cC(e){return nC.test(e)}function dC(e){window.open(e,"_blank","noopener")}class hC extends or{constructor(){super(...arguments),this.manualDecorators=new Es,this.automaticDecorators=new Xk}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()||Ss(t.getSelectedBlocks());aC(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,t={}){const i=this.editor.model,n=i.document.selection,s=[],o=[];for(const e in t)t[e]?s.push(e):o.push(e);i.change((t=>{if(n.isCollapsed){const r=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=uC(n);let l=Bp(r,"linkHref",n.getAttribute("linkHref"),i);n.getAttribute("linkHref")===a&&(l=this._updateLinkContent(i,t,l,e)),t.setAttribute("linkHref",e,l),s.forEach((e=>{t.setAttribute(e,!0,l)})),o.forEach((e=>{t.removeAttribute(e,l)})),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const o=Vs(n.getAttributes());o.set("linkHref",e),s.forEach((e=>{o.set(e,!0)}));const{end:a}=i.insertContent(t.createText(e,o),r);t.setSelection(a)}["linkHref",...s,...o].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const r=i.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of r)this._isRangeToUpdate(e,a)&&l.push(e);for(const r of l){let a=r;if(1===l.length){const s=uC(n);n.getAttribute("linkHref")===s&&(a=this._updateLinkContent(i,t,r,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),s.forEach((e=>{t.setAttribute(e,!0,a)})),o.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,n=i.getSelectedElement();return aC(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}_updateLinkContent(e,t,i,n){const s=t.createText(n,{linkHref:n});return e.insertContent(s,i)}}function uC(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const i=t[0];return i.is("$text")||i.is("$textProxy")?i.data:null}}class mC extends or{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();aC(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change((e=>{const s=i.isCollapsed?[Bp(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of s)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)}))}}class gC extends(G()){constructor({id:e,label:t,attributes:i,classes:n,styles:s,defaultValue:o}){super(),this.id=e,this.set("value",void 0),this.defaultValue=o,this.label=t,this.attributes=i,this.classes=n,this.styles=s}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}const fC="automatic",pC=/^(https?:)?\/\//;class bC extends nr{static get pluginName(){return"LinkEditing"}static get requires(){return[_p,ap,Pb]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:oC}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>oC(rC(e),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 hC(e)),e.commands.add("unlink",new mC(e));const t=function(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}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${T_(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===fC))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode)));e.plugins.get(_p).registerAttribute("linkHref"),Np(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:fC,callback:e=>!!e&&pC.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.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 gC(e);i.add(n),t.conversion.for("downcast").attributeToElement({model:n.id,view:(e,{writer:t,schema:i},{item:s})=>{if((s.is("selection")||i.isInline(s))&&e){const e=t.createAttributeElement("a",n.attributes,{priority:5});n.classes&&t.addClass(n.classes,e);for(const i in n.styles)t.setStyle(i,n.styles[i],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(l.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const n=i.getAttribute("href");n&&(e.stop(),t.preventDefault(),dC(n))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,i)=>{const n=e.commands.get("link").value;!!n&&i.keyCode===ps.enter&&i.altKey&&(t.stop(),dC(n))}))}_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=lC(n.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,n)}}))}))}}class wC extends Ds{constructor(e,t){super(e),this.focusTracker=new Ps,this.keystrokes=new Is,this._focusables=new Fs;const i=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),bm.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),bm.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),i({view:this});[this.urlInputView,...this._manualDecoratorSwitches,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()}_createUrlInput(){const e=this.locale.t,t=new $o(this.locale,Nm);return t.label=e("Link URL"),t}_createButton(e,t,i,n){const s=new ho(this.locale);return s.set({label:e,icon:t,tooltip:!0}),s.extendTemplate({attributes:{class:i}}),n&&s.delegate("execute").to(this,n),s}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new uo(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",((e,t)=>void 0===t&&void 0===e?!!i.defaultValue:!!e)),n.on("execute",(()=>{i.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Ds;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}class vC extends Ds{constructor(e){super(e),this.focusTracker=new Ps,this.keystrokes=new Is,this._focusables=new Fs;const t=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(t("Edit link"),bm.pencil,"edit"),this.set("href",void 0),this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].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()}_createButton(e,t,i){const n=new ho(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new ho(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&rC(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||i("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const _C='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',yC="link-ui";class kC extends nr{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[vf]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(ku),this._balloon=e.plugins.get(vf),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:yC,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:yC,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new vC(e.locale),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(sC,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,i=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),s=e.config.get("link.allowCreatingEmptyLinks"),o=new(t(wC))(e.locale,i);return o.urlInputView.fieldView.bind("value").to(i,"value"),o.urlInputView.bind("isEnabled").to(i,"isEnabled"),o.saveButtonView.bind("isEnabled").to(i,"isEnabled",o.urlInputView,"isEmpty",((e,t)=>e&&(s||!t))),this.listenTo(o,"submit",(()=>{const{value:t}=o.urlInputView.fieldView.element,i=lC(t,n);e.execute("link",i,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),o}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.ui.componentFactory.add("link",(e=>{const n=new ho(e);return n.isEnabled=!0,n.label=i("Link"),n.icon=_C,n.keystroke=sC,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(sC,((t,i)=>{i(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),e({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=o();const s=()=>{const e=this._getSelectedLinkElement(),t=o();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function o(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",s),this.listenTo(this._balloon,"change:visibleView",s)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let n;if(t.markers.has(yC)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(yC)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(i)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&Fb(i))return CC(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=CC(i.start),s=CC(i.end);return n&&n==s&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(yC))t.updateMarker(yC,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(yC,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(yC,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(yC)&&e.change((e=>{e.removeMarker(yC)}))}}function CC(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const AC=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})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class xC extends nr{static get requires(){return[pp,bC]}static get pluginName(){return"AutoLink"}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,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?Bp(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const i=this.editor.model,n=i.document.selection,s=n.getFirstPosition(),o=n.getLastPosition();let r=t.getJoined(this._expandLinkRange(i,s)||t);r&&(r=r.getJoined(this._expandLinkRange(i,o)||t)),r&&(r.start.isBefore(s)||r.end.isAfter(o))&&e.setSelection(r)}_enablePasteLinking(){const e=this.editor,t=e.model,i=t.document.selection,n=e.plugins.get("ClipboardPipeline"),s=e.commands.get("link");n.on("inputTransformation",((e,n)=>{if(!this.isEnabled||!s.isEnabled||i.isCollapsed||"paste"!==n.method)return;if(i.rangeCount>1)return;const o=i.getFirstRange(),r=n.dataTransfer.getData("text/plain");if(!r)return;const a=r.match(AC);a&&a[2]===r&&(t.change((e=>{this._selectEntireLinks(e,o),s.execute(r)})),e.stop())}),{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new vp(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=TC(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,i)=>{const{batch:n,range:s,url:o}=i;if(!n.isTyping)return;const r=s.end.getShiftedBy(-1),a=r.getShiftedBy(-o.length),l=e.model.createRange(a,r);this._applyAutoLink(o,l)})),t.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();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);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 t=this.editor.model,{text:i,range:n}=wp(e,t),s=TC(i);if(s){const e=t.createRange(n.end.getShiftedBy(-s.length),n.end);this._applyAutoLink(s,e)}}_applyAutoLink(e,t){const i=this.editor.model,n=lC(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&cC(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((s=>{s.setAttribute("linkHref",e,t),i.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function TC(e){const t=AC.exec(e);return t?t[2]:null}class EC extends nr{static get requires(){return["ImageEditing","ImageUtils",bC]}static get pluginName(){return"LinkImageEditing"}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,s)=>{const o=n.viewItem,r=i.findViewImgElement(o);if(!r)return;const a=r.findAncestor((e=>i.isBlockImageView(e)));if(t&&!a)return;const l={attributes:["href"]};if(!s.consumable.consume(o,l))return;const c=o.getAttribute("href");if(!c)return;let d=n.modelCursor.parent;if(!d.is("element","imageBlock")){const e=s.convertItem(r,n.modelCursor);n.modelRange=e.modelRange,n.modelCursor=e.modelCursor,d=n.modelCursor.nodeBefore}d&&d.is("element","imageBlock")&&s.writer.setAttribute("linkHref",c,d)}),{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 s=n.mapper.toViewElement(i.item),o=n.writer,r=Array.from(s.getChildren()).find((e=>e.is("element","a"))),a=t.findViewImgElement(s),l=a.parent.is("element","picture")?a.parent:a;if(r)i.attributeNewValue?o.setAttribute("href",i.attributeNewValue,r):(o.move(o.createRangeOn(l),o.createPositionAt(s,0)),o.remove(r));else{const e=o.createContainerElement("a",{href:i.attributeNewValue});o.insert(o.createPositionAt(s,0),e),o.move(o.createRangeOn(l),o.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(SC(i)),e.conversion.for("upcast").add(PC(e,i))}}function SC(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,((t,i,n)=>{const s=n.mapper.toViewElement(i.item),o=Array.from(s.getChildren()).find((e=>e.is("element","a")));if(o){for(const[t,i]of Vs(e.attributes))n.writer.setAttribute(t,i,o);e.classes&&n.writer.addClass(e.classes,o);for(const t in e.styles)n.writer.setStyle(t,e.styles[t],o)}}))}}function PC(e,t){const i=e.plugins.has("ImageInlineEditing"),n=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,s,o)=>{const r=s.viewItem,a=n.findViewImgElement(r);if(!a)return;const l=a.findAncestor((e=>n.isBlockImageView(e)));if(i&&!l)return;const c=new xr(t._createPattern()).match(r);if(!c)return;if(!o.consumable.consume(r,c.match))return;const d=s.modelCursor.nodeBefore||s.modelCursor.parent;o.writer.setAttribute(t.id,!0,d)}),{priority:"high"})}}class IC extends nr{static get requires(){return[bC,kC,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}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 ho(i),s=e.plugins.get("LinkUI"),o=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:_C,keystroke:sC,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o,"isEnabled"),n.bind("isOn").to(o,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?s._addActionsView():s._showUI(!0)})),n}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}class VC{constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==t.direction,this._includeSelf=!!t.includeSelf,this._sameAttributes=ks(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){return Ss(new this(e,t)[Symbol.iterator]())}*[Symbol.iterator](){const e=[];for(const{node:t}of RC(this._getStartNode(),this._isForward?"forward":"backward")){const i=t.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){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some((e=>t.getAttribute(e)!==this._startElement.getAttribute(e))))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*RC(e,t="forward"){const i="forward"==t,n=[];let s=null;for(;MC(e);){let t=null;if(s){const i=e.getAttribute("listIndent"),o=s.getAttribute("listIndent");i>o?n[o]=s:i<o?(t=n[i],n.length=i):t=s}yield{node:e,previous:s,previousNodeInList:t},s=e,e=i?e.nextSibling:e.previousSibling}}class OC{constructor(e){this._listHead=e}[Symbol.iterator](){return RC(this._listHead,"forward")}}class BC{static next(){return b()}}function MC(e){return!!e&&e.is("element")&&e.hasAttribute("listItemId")}function NC(e,t={}){return[...FC(e,{...t,direction:"backward"}),...FC(e,{...t,direction:"forward"})]}function FC(e,t={}){const i="forward"==t.direction,n=Array.from(new VC(e,{...t,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?n:n.reverse()}function DC(e){const t=new VC(e,{sameIndent:!0,sameAttributes:"listType"}),i=new VC(e,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"});return[...Array.from(t).reverse(),...i]}function LC(e){return!VC.first(e,{sameIndent:!0,sameAttributes:"listItemId"})}function zC(e){return!VC.first(e,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function HC(e,t={}){e=ks(e);const i=!1!==t.withNested,n=new Set;for(const t of e)for(const e of NC(t,{higherIndent:i}))n.add(e);return ZC(n)}function $C(e){e=ks(e);const t=new Set;for(const i of e)for(const e of DC(i))t.add(e);return ZC(t)}function WC(e,t){const i=FC(e,{direction:"forward"}),n=BC.next();for(const e of i)t.setAttribute("listItemId",n,e);return i}function jC(e,t,i){const n={};for(const[e,i]of t.getAttributes())e.startsWith("list")&&(n[e]=i);const s=FC(e,{direction:"forward"});for(const e of s)i.setAttributes(n,e);return s}function UC(e,t,{expand:i,indentBy:n=1}={}){e=ks(e);const s=i?HC(e):e;for(const e of s){const i=e.getAttribute("listIndent")+n;i<0?qC(e,t):t.setAttribute("listIndent",i,e)}return s}function qC(e,t){e=ks(e);for(const i of e)i.is("element","listItem")&&t.rename(i,"paragraph");for(const i of e)for(const e of i.getAttributeKeys())e.startsWith("list")&&t.removeAttribute(e,i);return e}function GC(e){if(!e.length)return!1;const t=e[0].getAttribute("listItemId");return!!t&&!e.some((e=>e.getAttribute("listItemId")!=t))}function ZC(e){return Array.from(e).filter((e=>"$graveyard"!==e.root.rootName)).sort(((e,t)=>e.index-t.index))}function KC(e){const t=e.document.selection.getSelectedElement();return t&&e.schema.isObject(t)&&e.schema.isBlock(t)?t:null}function JC(e,t){return t.checkChild(e.parent,"listItem")&&t.checkChild(e,"$text")&&!t.isObject(e)}function QC(e,t,i){return FC(t,{direction:"forward"}).pop().index>e.index?jC(e,t,i):[]}class YC extends or{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=XC(e.document.selection);e.change((e=>{const i=[];GC(t)&&!LC(t[0])?("forward"==this._direction&&i.push(...UC(t,e)),i.push(...WC(t[0],e))):"forward"==this._direction?i.push(...UC(t,e,{expand:!0})):i.push(...function(e,t){const i=HC(e=ks(e)),n=new Set,s=Math.min(...i.map((e=>e.getAttribute("listIndent")))),o=new Map;for(const e of i)o.set(e,VC.first(e,{lowerIndent:!0}));for(const e of i){if(n.has(e))continue;n.add(e);const i=e.getAttribute("listIndent")-1;if(i<0)qC(e,t);else{if(e.getAttribute("listIndent")==s){const i=QC(e,o.get(e),t);for(const e of i)n.add(e);if(i.length)continue}t.setAttribute("listIndent",i,e)}}return ZC(n)}(t,e));for(const t of i){if(!t.hasAttribute("listType"))continue;const i=VC.first(t,{sameIndent:!0});i&&e.setAttribute("listType",i.getAttribute("listType"),t)}this._fireAfterExecute(i)}))}_fireAfterExecute(e){this.fire("afterExecute",ZC(new Set(e)))}_checkEnabled(){let e=XC(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if(GC(e)&&!LC(e[0]))return!0;e=HC(e),t=e[0];const i=VC.first(t,{sameIndent:!0});return!!i&&i.getAttribute("listType")==t.getAttribute("listType")}}function XC(e){const t=Array.from(e.getSelectedBlocks()),i=t.findIndex((e=>!MC(e)));return-1!=i&&(t.length=i),t}class eA extends or{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document,n=KC(t),s=Array.from(i.selection.getSelectedBlocks()).filter((e=>t.schema.checkAttribute(e,"listType")||JC(e,t.schema))),o=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(o){const t=s[s.length-1],i=FC(t,{direction:"forward"}),n=[];i.length>1&&n.push(...WC(i[1],e)),n.push(...qC(s,e)),n.push(...function(e,t){const i=[];let n=Number.POSITIVE_INFINITY;for(const{node:s}of RC(e.nextSibling,"forward")){const e=s.getAttribute("listIndent");if(0==e)break;e<n&&(n=e);const o=e-n;t.setAttribute("listIndent",o,s),i.push(s)}return i}(t,e)),this._fireAfterExecute(n)}else if((n||i.selection.isCollapsed)&&MC(s[0])){const t=DC(n||s[0]);for(const i of t)e.setAttribute("listType",this.type,i);this._fireAfterExecute(t)}else{const i=[];for(const n of s)if(n.hasAttribute("listType"))for(const t of HC(n,{withNested:!1}))t.getAttribute("listType")!=this.type&&(e.setAttribute("listType",this.type,t),i.push(t));else!n.is("element","listItem")&&JC(n,t.schema)&&e.rename(n,"listItem"),e.setAttributes({listIndent:0,listItemId:BC.next(),listType:this.type},n),i.push(n);this._fireAfterExecute(i)}}))}_fireAfterExecute(e){this.fire("afterExecute",ZC(new Set(e)))}_getValue(){const e=this.editor.model.document.selection,t=Array.from(e.getSelectedBlocks());if(!t.length)return!1;for(const e of t)if(e.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const e=this.editor.model,t=e.schema,i=e.document.selection,n=Array.from(i.getSelectedBlocks());if(!n.length)return!1;if(this.value)return!0;for(const e of n)if(t.checkAttribute(e,"listType")||JC(e,t))return!0;return!1}}class tA extends or{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:e=!1}={}){const t=this.editor.model,i=t.document.selection,n=[];t.change((s=>{const{firstElement:o,lastElement:r}=this._getMergeSubjectElements(i,e),a=o.getAttribute("listIndent")||0,l=r.getAttribute("listIndent"),c=r.getAttribute("listItemId");if(a!=l){const e=(d=r,Array.from(new VC(d,{direction:"forward",higherIndent:!0})));n.push(...UC([r,...e],s,{indentBy:a-l,expand:a<l}))}var d;if(e){let e=i;i.isCollapsed&&(e=s.createSelection(s.createRange(s.createPositionAt(o,"end"),s.createPositionAt(r,0)))),t.deleteContent(e,{doNotResetEntireContent:i.isCollapsed});const a=e.getLastPosition().parent,l=a.nextSibling;n.push(a),l&&l!==r&&l.getAttribute("listItemId")==c&&n.push(...jC(l,a,s))}else n.push(...jC(r,o,s));this._fireAfterExecute(n)}))}_fireAfterExecute(e){this.fire("afterExecute",ZC(new Set(e)))}_checkEnabled(){const e=this.editor.model,t=e.document.selection,i=KC(e);if(t.isCollapsed||i){const e=i||t.getFirstPosition().parent;if(!MC(e))return!1;const n="backward"==this._direction?e.previousSibling:e.nextSibling;if(!n)return!1;if(GC([e,n]))return!1}else{const e=t.getLastPosition(),i=t.getFirstPosition();if(e.parent===i.parent)return!1;if(!MC(e.parent))return!1}return!0}_getMergeSubjectElements(e,t){const i=KC(this.editor.model);let n,s;if(e.isCollapsed||i){const o=i||e.getFirstPosition().parent,r=LC(o);"backward"==this._direction?(s=o,n=r&&!t?VC.first(o,{sameIndent:!0,lowerIndent:!0}):o.previousSibling):(n=o,s=o.nextSibling)}else n=e.getFirstPosition().parent,s=e.getLastPosition().parent;return{firstElement:n,lastElement:s}}}class iA extends or{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change((e=>{const t=WC(this._getStartBlock(),e);this._fireAfterExecute(t)}))}_fireAfterExecute(e){this.fire("afterExecute",ZC(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&MC(t)&&!LC(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class nA extends nr{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(e){return $C(e)}isFirstBlockOfListItem(e){return LC(e)}isListItemBlock(e){return MC(e)}expandListBlocksToCompleteItems(e,t={}){return HC(e,t)}}function sA(e){return e.is("element","ol")||e.is("element","ul")}function oA(e){return e.is("element","li")}function rA(e,t,i,n=cA(i,t)){return e.createAttributeElement(lA(i),null,{priority:2*t/100-100,id:n})}function aA(e,t,i){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:i})}function lA(e){return"numbered"==e?"ol":"ul"}function cA(e,t){return`list-${e}-${t}`}function dA(e,t){const i=e.nodeBefore;if(MC(i)){let e=i;for(const{node:i}of RC(e,"backward"))if(e=i,t.has(e))return;t.set(i,e)}else{const i=e.nodeAfter;MC(i)&&t.set(i,i)}}function hA(){return(e,t,i)=>{const{writer:n,schema:s}=i;if(!t.modelRange)return;const o=Array.from(t.modelRange.getItems({shallow:!0})).filter((e=>s.checkAttribute(e,"listItemId")));if(!o.length)return;const r=BC.next(),a=function(e){let t=0,i=e.parent;for(;i;){if(oA(i))t++;else{const e=i.previousSibling;e&&oA(e)&&t++}i=i.parent}return t}(t.viewItem);let l=t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted";const c=o[0].getAttribute("listType");c&&(l=c);const d={listItemId:r,listIndent:a,listType:l};for(const e of o)e.hasAttribute("listItemId")||n.setAttributes(d,e);o.length>1&&o[1].getAttribute("listItemId")!=d.listItemId&&i.keepEmptyElement(o[0])}}function uA(){return(e,t,i)=>{if(!i.consumable.test(t.viewItem,{name:!0}))return;const n=new Au(t.viewItem.document);for(const e of Array.from(t.viewItem.getChildren()))oA(e)||sA(e)||n.remove(e)}}function mA(e,t,i,{dataPipeline:n}={}){const s=function(e){return(t,i)=>{const n=[];for(const i of e)t.hasAttribute(i)&&n.push(`attribute:${i}`);return!!n.every((e=>!1!==i.test(t,e)))&&(n.forEach((e=>i.consume(t,e))),!0)}}(e);return(o,r,a)=>{const{writer:l,mapper:c,consumable:d}=a,h=r.item;if(!e.includes(r.attributeKey))return;if(!s(h,d))return;const u=function(e,t,i){const n=i.createRangeOn(e),s=t.toViewRange(n).getTrimmed();return s.end.nodeBefore}(h,c,i);!function(e,t,i){for(;e.parent.is("attributeElement")&&e.parent.getCustomProperty("listItemWrapper");)t.unwrap(t.createRangeIn(e.parent),e.parent);const n=t.createPositionBefore(e).getWalker({direction:"backward"}),s=[];for(const{item:e}of n){if(e.is("element")&&i.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&s.push(e)}for(const e of s)t.remove(e)}(u,l,c),function(e,t){let i=e.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const n=i.parent;t.unwrap(t.createRangeOn(e),i),i=n}}(u,l);const m=function(e,t,i,n,{dataPipeline:s}){let o=n.createRangeOn(t);if(!LC(e))return o;for(const r of i){if("itemMarker"!=r.scope)continue;const i=r.createElement(n,e,{dataPipeline:s});if(!i)continue;if(n.setCustomProperty("listItemMarker",!0,i),n.insert(o.start,i),o=n.createRange(n.createPositionBefore(i),n.createPositionAfter(t)),!r.createWrapperElement||!r.canWrapElement)continue;const a=r.createWrapperElement(n,e,{dataPipeline:s});n.setCustomProperty("listItemWrapper",!0,a),r.canWrapElement(e)?o=n.wrap(o,a):(o=n.wrap(n.createRangeOn(i),a),o=n.createRange(o.start,n.createPositionAfter(t)))}return o}(h,u,t,l,{dataPipeline:n});!function(e,t,i,n){if(!e.hasAttribute("listIndent"))return;const s=e.getAttribute("listIndent");let o=e;for(let e=s;e>=0;e--){const s=aA(n,e,o.getAttribute("listItemId")),r=rA(n,e,o.getAttribute("listType"));for(const e of i)"list"!=e.scope&&"item"!=e.scope||!o.hasAttribute(e.attributeName)||e.setAttributeOnDowncast(n,o.getAttribute(e.attributeName),"list"==e.scope?r:s);if(t=n.wrap(t,s),t=n.wrap(t,r),0==e)break;if(o=VC.first(o,{lowerIndent:!0}),!o)break}}(h,m,t,l)}}function gA(e,{dataPipeline:t}={}){return(i,{writer:n})=>{if(!fA(i,e))return null;if(!t)return n.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const s=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,s),s}}function fA(e,t,i=NC(e)){if(!MC(e))return!1;for(const i of e.getAttributeKeys())if(!i.startsWith("selection:")&&!t.includes(i))return!1;return i.length<2}const pA=["listType","listIndent","listItemId"];class bA extends nr{static get pluginName(){return"ListEditing"}static get requires(){return[mb,pp,nA,Pb]}constructor(e){super(e),this._downcastStrategies=[],e.config.define("list.multiBlock",!0)}init(){const e=this.editor,t=e.model,i=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new y("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});t.schema.register("$listItem",{allowAttributes:pA}),i?(t.schema.extend("$container",{allowAttributesOf:"$listItem"}),t.schema.extend("$block",{allowAttributesOf:"$listItem"}),t.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):t.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const e of pA)t.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new eA(e,"numbered")),e.commands.add("bulletedList",new eA(e,"bulleted")),e.commands.add("indentList",new YC(e,"forward")),e.commands.add("outdentList",new YC(e,"backward")),e.commands.add("splitListItemBefore",new iA(e,"before")),e.commands.add("splitListItemAfter",new iA(e,"after")),i&&(e.commands.add("mergeListItemBackward",new tA(e,"backward")),e.commands.add("mergeListItemForward",new tA(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...pA,...this._downcastStrategies.map((e=>e.attributeName))]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),i=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",((n,s)=>{const o=e.model.document.selection;KC(e.model)||e.model.change((()=>{const r=o.getFirstPosition();if(o.isCollapsed&&"backward"==s.direction){if(!r.isAtStart)return;const i=r.parent;if(!MC(i))return;if(VC.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!t||!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:wA(e.model,"backward")})}else zC(i)||e.execute("splitListItemAfter"),e.execute("outdentList");s.preventDefault(),n.stop()}else{if(o.isCollapsed&&!o.getLastPosition().isAtEnd)return;if(!i||!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:wA(e.model,"forward")}),s.preventDefault(),n.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,i=e.commands,n=i.get("enter");this.listenTo(e.editing.view.document,"enter",((i,n)=>{const s=t.document,o=s.selection.getFirstPosition().parent;if(s.selection.isCollapsed&&MC(o)&&o.isEmpty&&!n.isSoft){const t=LC(o),s=zC(o);t&&s?(e.execute("outdentList"),n.preventDefault(),i.stop()):t&&!s?(e.execute("splitListItemAfter"),n.preventDefault(),i.stop()):s&&(e.execute("splitListItemBefore"),n.preventDefault(),i.stop())}}),{context:"li"}),this.listenTo(n,"afterExecute",(()=>{const t=i.get("splitListItemBefore");if(t.refresh(),!t.isEnabled)return;2===NC(e.model.document.selection.getLastPosition().parent).length&&t.execute()}))}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",((t,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,i=this.getListAttributeNames(),n=e.config.get("list.multiBlock"),s=n?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(e,{writer:t})=>t.createElement(s,{listType:""})}).elementToElement({view:"p",model:(e,{writer:t})=>e.parent&&e.parent.is("element","li")?t.createElement(s,{listType:""}):null,converterPriority:"high"}).add((e=>{e.on("element:li",hA()),e.on("element:ul",uA(),{priority:"high"}),e.on("element:ol",uA(),{priority:"high"})})),n||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:s,view:gA(i),converterPriority:"high"}).add((e=>{e.on("attribute",mA(i,this._downcastStrategies,t))})),e.conversion.for("dataDowncast").elementToElement({model:s,view:gA(i,{dataPipeline:!0}),converterPriority:"high"}).add((e=>{e.on("attribute",mA(i,this._downcastStrategies,t,{dataPipeline:!0}))})),this.listenTo(t.document,"change:data",function(e,t,i,n){return()=>{const n=e.document.differ.getChanges(),r=[],a=new Map,l=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name)dA(e.position,a),e.attributes.has("listItemId")?l.add(e.position.nodeAfter):dA(e.position.getShiftedBy(e.length),a);else if("remove"==e.type&&e.attributes.has("listItemId"))dA(e.position,a);else if("attribute"==e.type){const t=e.range.start.nodeAfter;i.includes(e.attributeKey)?(dA(e.range.start,a),null===e.attributeNewValue?(dA(e.range.start.getShiftedBy(1),a),o(t)&&r.push(t)):l.add(t)):MC(t)&&o(t)&&r.push(t)}for(const e of a.values())r.push(...s(e,l));for(const e of new Set(r))t.reconvertItem(e)};function s(e,t){const n=[],s=new Set,a=[];for(const{node:l,previous:c}of RC(e,"forward")){if(s.has(l))continue;const e=l.getAttribute("listIndent");c&&e<c.getAttribute("listIndent")&&(a.length=e+1),a[e]=Object.fromEntries(Array.from(l.getAttributes()).filter((([e])=>i.includes(e))));const d=FC(l,{direction:"forward"});for(const e of d)s.add(e),(o(e,d)||r(e,a,t))&&n.push(e)}return n}function o(e,s){const o=t.mapper.toViewElement(e);if(!o)return!1;if(n.fire("checkElement",{modelElement:e,viewElement:o}))return!0;if(!e.is("element","paragraph")&&!e.is("element","listItem"))return!1;const r=fA(e,i,s);return!(!r||!o.is("element","p"))||!(r||!o.is("element","span"))}function r(e,i,s){if(s.has(e))return!1;const o=t.mapper.toViewElement(e);let r=i.length-1;for(let e=o.parent;!e.is("editableElement");e=e.parent){const t=oA(e),s=sA(e);if(!s&&!t)continue;const o="checkAttributes:"+(t?"item":"list");if(n.fire(o,{viewElement:e,modelAttributes:i[r]}))break;if(s&&(r--,r<0))return!1}return!0}}(t,e.editing,i,this),{priority:"high"}),this.on("checkAttributes:item",((e,{viewElement:t,modelAttributes:i})=>{t.id!=i.listItemId&&(e.return=!0,e.stop())})),this.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:i})=>{t.name==lA(i.listType)&&t.id==cA(i.listType,i.listIndent)||(e.return=!0,e.stop())}))}_setupModelPostFixing(){const e=this.editor.model,t=this.getListAttributeNames();e.document.registerPostFixer((i=>function(e,t,i,n){const s=e.document.differ.getChanges(),o=new Map,r=n.editor.config.get("list.multiBlock");let a=!1;for(const n of s){if("insert"==n.type&&"$text"!=n.name){const s=n.position.nodeAfter;if(!e.schema.checkAttribute(s,"listItemId"))for(const e of Array.from(s.getAttributeKeys()))i.includes(e)&&(t.removeAttribute(e,s),a=!0);dA(n.position,o),n.attributes.has("listItemId")||dA(n.position.getShiftedBy(n.length),o);for(const{item:t,previousPosition:i}of e.createRangeIn(s))MC(t)&&dA(i,o)}else"remove"==n.type?dA(n.position,o):"attribute"==n.type&&i.includes(n.attributeKey)&&(dA(n.range.start,o),null===n.attributeNewValue&&dA(n.range.start.getShiftedBy(1),o));if(!r&&"attribute"==n.type&&pA.includes(n.attributeKey)){const e=n.range.start.nodeAfter;null===n.attributeNewValue&&e&&e.is("element","listItem")?(t.rename(e,"paragraph"),a=!0):null===n.attributeOldValue&&e&&e.is("element")&&"listItem"!=e.name&&(t.rename(e,"listItem"),a=!0)}}const l=new Set;for(const e of o.values())a=n.fire("postFixer",{listNodes:new OC(e),listHead:e,writer:t,seenIds:l})||a;return a}(e,i,t,this))),this.on("postFixer",((e,{listNodes:t,writer:i})=>{e.return=function(e,t){let i=0,n=-1,s=null,o=!1;for(const{node:r}of e){const e=r.getAttribute("listIndent");if(e>i){let a;null===s?(s=e-i,a=i):(s>e&&(s=e),a=e-s),a>n+1&&(a=n+1),t.setAttribute("listIndent",a,r),o=!0,n=a}else s=null,i=e+1,n=e}return o}(t,i)||e.return}),{priority:"high"}),this.on("postFixer",((e,{listNodes:t,writer:i,seenIds:n})=>{e.return=function(e,t,i){const n=new Set;let s=!1;for(const{node:o}of e){if(n.has(o))continue;let e=o.getAttribute("listType"),r=o.getAttribute("listItemId");if(t.has(r)&&(r=BC.next()),t.add(r),o.is("element","listItem"))o.getAttribute("listItemId")!=r&&(i.setAttribute("listItemId",r,o),s=!0);else for(const t of FC(o,{direction:"forward"}))n.add(t),t.getAttribute("listType")!=e&&(r=BC.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=r&&(i.setAttribute("listItemId",r,t),s=!0)}return s}(t,n,i)||e.return}),{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",function(e){return(t,[i,n])=>{const s=i.is("documentFragment")?Array.from(i.getChildren()):[i];if(!s.length)return;const o=(n?e.createSelection(n):e.document.selection).getFirstPosition();let r;if(MC(o.parent))r=o.parent;else{if(!MC(o.nodeBefore))return;r=o.nodeBefore}e.change((e=>{const t=r.getAttribute("listType"),i=r.getAttribute("listIndent"),n=s[0].getAttribute("listIndent")||0,o=Math.max(i-n,0);for(const i of s){const n=MC(i);r.is("element","listItem")&&i.is("element","paragraph")&&e.rename(i,"listItem"),e.setAttributes({listIndent:(n?i.getAttribute("listIndent"):0)+o,listItemId:n?i.getAttribute("listItemId"):BC.next(),listType:t},i)}}))}}(e),{priority:"high"}),this.listenTo(t,"outputTransformation",((t,i)=>{e.change((e=>{const t=Array.from(i.content.getChildren()),n=t[t.length-1];if(t.length>1&&n.is("element")&&n.isEmpty){t.slice(0,-1).every(MC)&&e.remove(n)}if("copy"==i.method||"cut"==i.method){const t=Array.from(i.content.getChildren());GC(t)&&qC(t,e)}}))}))}}function wA(e,t){const i=e.document.selection;if(!i.isCollapsed)return!KC(e);if("forward"===t)return!0;const n=i.getFirstPosition().parent,s=n.previousSibling;return!e.schema.isObject(s)&&(!!s.isEmpty||GC([n,s]))}function vA(e,t,i,n){e.ui.componentFactory.add(t,(s=>{const o=e.commands.get(t),r=new ho(s);return r.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),r.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),r}))}class _A extends nr{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;vA(this.editor,"numberedList",e("Numbered List"),bm.numberedList),vA(this.editor,"bulletedList",e("Bulleted List"),bm.bulletedList)}}class yA extends nr{static get requires(){return[bA,_A]}static get pluginName(){return"List"}}class kA extends or{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,i=t.document;let n=Array.from(i.selection.getSelectedBlocks()).filter((e=>MC(e)&&"numbered"==e.getAttribute("listType")));n=$C(n),t.change((t=>{for(const i of n)t.setAttribute("listStart",e>=0?e:1,i)}))}_getValue(){const e=Ss(this.editor.model.document.selection.getSelectedBlocks());return e&&MC(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const CA={},AA={},xA={},TA=[{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"}];for(const{listStyle:e,typeAttribute:t,listType:i}of TA)CA[e]=i,AA[e]=t,t&&(xA[t]=e);function EA(){return TA.map((e=>e.listStyle))}function SA(e){return CA[e]||null}function PA(e){return xA[e]||null}function IA(e){return AA[e]||null}class VA extends or{constructor(e,t,i){super(e),this.defaultType=t,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document;t.change((t=>{this._tryToConvertItemsToList(e);let n=Array.from(i.selection.getSelectedBlocks()).filter((e=>e.hasAttribute("listType")));if(n.length){n=$C(n);for(const i of n)t.setAttribute("listStyle",e.type||this.defaultType,i)}}))}isStyleTypeSupported(e){return!this._supportedTypes||this._supportedTypes.includes(e)}_getValue(){const e=Ss(this.editor.model.document.selection.getSelectedBlocks());return MC(e)?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=SA(e.type);if(!t)return;const i=this.editor,n=`${t}List`;i.commands.get(n).value||i.execute(n)}}class RA extends or{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,i=t.document;let n=Array.from(i.selection.getSelectedBlocks()).filter((e=>MC(e)&&"numbered"==e.getAttribute("listType")));n=$C(n),t.change((t=>{for(const i of n)t.setAttribute("listReversed",!!e.reversed,i)}))}_getValue(){const e=Ss(this.editor.model.document.selection.getSelectedBlocks());return MC(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}function OA(e){return(t,i,n)=>{const{writer:s,schema:o,consumable:r}=n;if(!1===r.test(i.viewItem,e.viewConsumables))return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));let a=!1;for(const t of i.modelRange.getItems({shallow:!0}))o.checkAttribute(t,e.attributeName)&&e.appliesToListItem(t)&&(t.hasAttribute(e.attributeName)||(s.setAttribute(e.attributeName,e.getAttributeOnUpcast(i.viewItem),t),a=!0));a&&r.consume(i.viewItem,e.viewConsumables)}}class BA extends nr{static get pluginName(){return"ListPropertiesUtils"}getAllSupportedStyleTypes(){return EA()}getListTypeFromListStyleType(e){return SA(e)}getListStyleTypeFromTypeAttribute(e){return PA(e)}getTypeAttributeFromListStyleType(e){return IA(e)}}const MA="default";class NA extends nr{static get requires(){return[bA,BA]}static get pluginName(){return"ListPropertiesEditing"}constructor(e){super(e),e.config.define("list.properties",{styles:!0,startIndex:!1,reversed:!1})}init(){const e=this.editor,t=e.model,i=e.plugins.get(bA),n=function(e){const t=[];if(e.styles){const i="object"==typeof e.styles&&e.styles.useAttribute;t.push({attributeName:"listStyle",defaultValue:MA,viewConsumables:{styles:"list-style-type"},addCommand(e){let t=EA();i&&(t=t.filter((e=>!!IA(e)))),e.commands.add("listStyle",new VA(e,MA,t))},appliesToListItem:e=>"numbered"==e.getAttribute("listType")||"bulleted"==e.getAttribute("listType"),hasValidAttribute(e){if(!this.appliesToListItem(e))return!e.hasAttribute("listStyle");if(!e.hasAttribute("listStyle"))return!1;const t=e.getAttribute("listStyle");return t==MA||SA(t)==e.getAttribute("listType")},setAttributeOnDowncast(e,t,n){if(t&&t!==MA){if(!i)return void e.setStyle("list-style-type",t,n);{const i=IA(t);if(i)return void e.setAttribute("type",i,n)}}e.removeStyle("list-style-type",n),e.removeAttribute("type",n)},getAttributeOnUpcast(e){const t=e.getStyle("list-style-type");if(t)return t;const i=e.getAttribute("type");return i?PA(i):MA}})}e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(e){e.commands.add("listReversed",new RA(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listReversed")},setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")});e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(e){e.commands.add("listStart",new kA(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listStart")},setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}});return t}(e.config.get("list.properties"));for(const s of n)s.addCommand(e),t.schema.extend("$listItem",{allowAttributes:s.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:s.attributeName,setAttributeOnDowncast(e,t,i){s.setAttributeOnDowncast(e,t,i)}});e.conversion.for("upcast").add((e=>{for(const t of n)e.on("element:ol",OA(t)),e.on("element:ul",OA(t))})),i.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:i})=>{for(const s of n)s.getAttributeOnUpcast(t)!=i[s.attributeName]&&(e.return=!0,e.stop())})),this.listenTo(e.commands.get("indentList"),"afterExecute",((e,i)=>{t.change((e=>{for(const t of i)for(const i of n)i.appliesToListItem(t)&&e.setAttribute(i.attributeName,i.defaultValue,t)}))})),i.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:s}of t)for(const t of n)t.hasValidAttribute(s)||(t.appliesToListItem(s)?i.setAttribute(t.attributeName,t.defaultValue,s):i.removeAttribute(t.attributeName,s),e.return=!0)})),i.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:s,previousNodeInList:o}of t)if(o&&o.getAttribute("listType")==s.getAttribute("listType"))for(const t of n){const{attributeName:n}=t;if(!t.appliesToListItem(s))continue;const r=o.getAttribute(n);s.getAttribute(n)!=r&&(i.setAttribute(n,r,s),e.return=!0)}}))}}class FA extends Ds{constructor(e,{enabledProperties:t,styleButtonViews:i,styleGridAriaLabel:n}){super(e),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new Ps,this.keystrokes=new Is,this.focusables=new Fs;const s=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new Qo({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),t.styles?(this.stylesView=this._createStylesView(i,n),this.children.add(this.stylesView)):s.push("ck-list-properties_without-styles"),(t.startIndex||t.reversed)&&(this._addNumberedListPropertyViews(t),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 e of this.stylesView.children)this.stylesView.focusTracker.add(e.element);n({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>Mn.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 e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}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(e,t){const i=new Ds(this.locale);return i.children=i.createCollection(),i.children.addMany(e),i.setTemplate({tag:"div",attributes:{"aria-label":t,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new Ps,i.keystrokes=new Is,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(e){const t=this.locale.t,i=[];e.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),e.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),e.styles?(this.additionalPropertiesCollapsibleView=new go(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:t("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((e,t,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const e=this.locale.t,t=new $o(this.locale,Fm);return t.set({label:e("Start at"),class:"ck-numbered-list-properties__start-index"}),t.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),t.fieldView.on("input",(()=>{const i=t.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)||(i.checkValidity()?this.fire("listStart",{startIndex:n}):t.errorText=e("Start index must be greater than 0."))})),t}_createReversedSwitchButton(){const e=this.locale.t,t=new uo(this.locale);return t.set({withText:!0,label:e("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),t.delegate("execute").to(this,"listReversed"),t}}class DA extends nr{static get pluginName(){return"ListPropertiesUI"}init(){const e=this.editor,t=e.locale.t,i=e.config.get("list.properties");i.styles&&e.ui.componentFactory.add("bulletedList",LA({editor:e,parentCommandName:"bulletedList",buttonLabel:t("Bulleted List"),buttonIcon:bm.bulletedList,styleGridAriaLabel:t("Bulleted list styles toolbar"),styleDefinitions:[{label:t("Toggle the disc list style"),tooltip:t("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:t("Toggle the circle list style"),tooltip:t("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:t("Toggle the square list style"),tooltip:t("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}]})),(i.styles||i.startIndex||i.reversed)&&e.ui.componentFactory.add("numberedList",LA({editor:e,parentCommandName:"numberedList",buttonLabel:t("Numbered List"),buttonIcon:bm.numberedList,styleGridAriaLabel:t("Numbered list styles toolbar"),styleDefinitions:[{label:t("Toggle the decimal list style"),tooltip:t("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:t("Toggle the decimal with leading zero list style"),tooltip:t("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the lower–roman list style"),tooltip:t("Lower–roman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the upper–roman list style"),tooltip:t("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the lower–latin list style"),tooltip:t("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:t("Toggle the upper–latin list style"),tooltip:t("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}]}))}}function LA({editor:e,parentCommandName:t,buttonLabel:i,buttonIcon:n,styleGridAriaLabel:s,styleDefinitions:o}){const r=e.commands.get(t);return a=>{const l=Pm(a,Sm),c=l.buttonView;return l.bind("isEnabled").to(r),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),c.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(r,"value",(e=>!!e)),l.once("change:isOpen",(()=>{const i=function({editor:e,dropdownView:t,parentCommandName:i,styleDefinitions:n,styleGridAriaLabel:s}){const o=e.locale,r=e.config.get("list.properties");let a=null;"numberedList"!=i&&(r.startIndex=!1,r.reversed=!1);if(r.styles){const t=e.commands.get("listStyle"),s=function({editor:e,listStyleCommand:t,parentCommandName:i}){const n=e.locale,s=e.commands.get(i);return({label:i,type:o,icon:r,tooltip:a})=>{const l=new ho(n);return l.set({label:i,icon:r,tooltip:a}),t.on("change:value",(()=>{l.isOn=t.value===o})),l.on("execute",(()=>{s.value?t.value!==o?e.execute("listStyle",{type:o}):e.execute("listStyle",{type:t.defaultType}):e.model.change((()=>{e.execute("listStyle",{type:o})}))})),l}}({editor:e,parentCommandName:i,listStyleCommand:t}),o="function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0;a=n.filter(o).map(s)}const l=new FA(o,{styleGridAriaLabel:s,enabledProperties:r,styleButtonViews:a});r.styles&&Bm(t,(()=>l.stylesView.children.find((e=>e.isOn))));if(r.startIndex){const t=e.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(t),l.startIndexFieldView.fieldView.bind("value").to(t),l.on("listStart",((t,i)=>e.execute("listStart",i)))}if(r.reversed){const t=e.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(t),l.reversedSwitchButtonView.bind("isOn").to(t,"value",(e=>!!e)),l.on("listReversed",(()=>{const i=t.value;e.execute("listReversed",{reversed:!i})}))}return l.delegate("execute").to(t),l}({editor:e,dropdownView:l,parentCommandName:t,styleGridAriaLabel:s,styleDefinitions:o});l.panelView.children.add(i)})),l.on("execute",(()=>{e.editing.view.focus()})),l}}class zA extends nr{static get requires(){return[NA,DA]}static get pluginName(){return"ListProperties"}}vs("Ctrl+Enter");vs("Ctrl+Enter");function HA(e,t){if(!e.childCount)return;const i=new Au(e.document),n=function(e,t){const i=t.createRangeIn(e),n=new xr({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),s=[];for(const e of i)if("elementStart"===e.type&&n.match(e.item)){const t=jA(e.item);s.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return s}(e,i);if(!n.length)return;let s=null,o=1;n.forEach(((e,r)=>{const a=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const i=t.element.previousSibling;if(!i)return!0;return n=i,!(n.is("element","ol")||n.is("element","ul"));var n}(n[r-1],e),l=a?null:n[r-1],c=(h=e,(d=l)?h.indent-d.indent:h.indent-1);var d,h;if(a&&(s=null,o=1),!s||0!==c){const n=function(e,t){const i=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,s=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,o=i.exec(t);let r="decimal",a="ol",l=null;if(o&&o[1]){const t=n.exec(o[1]);if(t&&t[1]&&(r=t[1].trim(),a="bullet"!==r&&"image"!==r?"ol":"ul"),"bullet"===r){const t=function(e){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 i=t._data;if("o"===i)return"circle";if("·"===i)return"disc";if("§"===i)return"square";return null}(e.element);t&&(r=t)}else{const e=s.exec(o[1]);e&&e[1]&&(l=parseInt(e[1]))}}return{type:a,startIndex:l,style:$A(r)}}(e,t);if(s){if(e.indent>o){const e=s.getChild(s.childCount-1),t=e.getChild(e.childCount-1);s=WA(n,t,i),o+=1}else if(e.indent<o){const t=o-e.indent;s=function(e,t){const i=e.getAncestors({parentFirst:!0});let n=null,s=0;for(const e of i)if((e.is("element","ul")||e.is("element","ol"))&&s++,s===t){n=e;break}return n}(s,t),o=e.indent}}else s=WA(n,e.element,i);e.indent<=o&&(s.is("element",n.type)||(s=i.rename(n.type,s)))}const u=function(e,t){return function(e,t){const i=new xr({name:"span",styles:{"mso-list":"Ignore"}}),n=t.createRangeIn(e);for(const e of n)"elementStart"===e.type&&i.match(e.item)&&t.remove(e.item)}(e,t),t.removeStyle("text-indent",e),t.rename("li",e)}(e.element,i);i.appendChild(u,s)}))}function $A(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 WA(e,t,i){const n=t.parent,s=i.createElement(e.type),o=n.getChildIndex(t)+1;return i.insertChild(o,s,n),e.style&&i.setStyle("list-style-type",e.style,s),e.startIndex&&e.startIndex>1&&i.setAttribute("start",e.startIndex,s),s}function jA(e){const t={},i=e.getStyle("mso-list");if(i){const e=i.match(/(^|\s{1,100})l(\d+)/i),n=i.match(/\s{0,100}lfo(\d+)/i),s=i.match(/\s{0,100}level(\d+)/i);e&&n&&s&&(t.id=e[2],t.order=n[1],t.indent=parseInt(s[1]))}return t}function UA(e,t){if(!e.childCount)return;const i=new Au(e.document),n=function(e,t){const i=t.createRangeIn(e),n=new xr({name:/v:(.+)/}),s=[];for(const e of i){if("elementStart"!=e.type)continue;const t=e.item,i=t.previousSibling,o=i&&i.is("element")?i.name:null;n.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==o&&s.push(e.item.getAttribute("id"))}return s}(e,i);!function(e,t,i){const n=i.createRangeIn(t),s=new xr({name:"img"}),o=[];for(const t of n)if(t.item.is("element")&&s.match(t.item)){const i=t.item,n=i.getAttribute("v:shapes")?i.getAttribute("v:shapes").split(" "):[];n.length&&n.every((t=>e.indexOf(t)>-1))?o.push(i):i.getAttribute("src")||o.push(i)}for(const e of o)i.remove(e)}(n,e,i),function(e,t,i){const n=i.createRangeIn(t),s=[];for(const t of n)if("elementStart"==t.type&&t.item.is("element","v:shape")){const i=t.item.getAttribute("id");if(e.includes(i))continue;o(t.item.parent.getChildren(),i)||s.push(t.item)}for(const e of s){const t={src:r(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const n=i.createElement("img",t);i.insertChild(e.index+1,n,e.parent)}function o(e,t){for(const i of e)if(i.is("element")){if("img"==i.name&&i.getAttribute("v:shapes")==t)return!0;if(o(i.getChildren(),t))return!0}return!1}function r(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(n,e,i),function(e,t){const i=t.createRangeIn(e),n=new xr({name:/v:(.+)/}),s=[];for(const e of i)"elementStart"==e.type&&n.match(e.item)&&s.push(e.item);for(const e of s)t.remove(e)}(e,i);const s=function(e,t){const i=t.createRangeIn(e),n=new xr({name:"img"}),s=[];for(const e of i)e.item.is("element")&&n.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&s.push(e.item);return s}(e,i);s.length&&function(e,t,i){if(e.length===t.length)for(let n=0;n<e.length;n++){const s=`data:${t[n].type};base64,${qA(t[n].hex)}`;i.setAttribute("src",s,e[n])}}(s,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,i=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),n=e.match(i),s=[];if(n)for(const e of n){let i=!1;e.includes("\\pngblip")?i="image/png":e.includes("\\jpegblip")&&(i="image/jpeg"),i&&s.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:i})}return s}(t),i)}function qA(e){return btoa(e.match(/\w{2}/g).map((e=>String.fromCharCode(parseInt(e,16)))).join(""))}const GA=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,ZA=/xmlns:o="urn:schemas-microsoft-com/i;class KA{constructor(e){this.document=e}isActive(e){return GA.test(e)||ZA.test(e)}execute(e){const{body:t,stylesString:i}=e._parsedData;HA(t,i),UA(t,e.dataTransfer.getData("text/rtf")),function(e){const t=[],i=new Au(e.document);for(const{item:n}of i.createRangeIn(e))if(n.is("element")){for(const e of n.getClassNames())/\bmso/gi.exec(e)&&i.removeClass(e,n);for(const e of n.getStyleNames())/\bmso/gi.exec(e)&&i.removeStyle(e,n);n.is("element","w:sdt")&&t.push(n)}for(const e of t){const t=e.parent,n=t.getChildIndex(e);i.insertChild(n,e.getChildren(),t),i.remove(e)}}(t),e.content=t}}function JA(e,t,i,{blockElements:n,inlineObjectElements:s}){let o=i.createPositionAt(e,"forward"==t?"after":"before");return o=o.getLastMatchingPosition((({item:e})=>e.is("element")&&!n.includes(e.name)&&!s.includes(e.name)),{direction:t}),"forward"==t?o.nodeAfter:o.nodeBefore}function QA(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const YA=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class XA{constructor(e){this.document=e}isActive(e){return YA.test(e)}execute(e){const t=new Au(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","b")&&"normal"===i.getStyle("font-weight")){const n=e.getChildIndex(i);t.remove(i),t.insertChild(n,i.getChildren(),e)}}(i,t),function(e,t){for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","li")){const i=e.getChild(0);i&&i.is("element","p")&&t.unwrapElement(i)}}}(i,t),function(e,t){const i=new ja(t.document.stylesProcessor),n=new Bl(i,{renderingMode:"data"}),s=n.blockElements,o=n.inlineObjectElements,r=[];for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","br")){const i=JA(e,"forward",t,{blockElements:s,inlineObjectElements:o}),n=JA(e,"backward",t,{blockElements:s,inlineObjectElements:o}),a=QA(i,s);(QA(n,s)||a)&&r.push(e)}}for(const e of r)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(i,t),e.content=i}}const ex=/<google-sheets-html-origin/i;class tx{constructor(e){this.document=e}isActive(e){return ex.test(e)}execute(e){const t=new Au(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","google-sheets-html-origin")){const n=e.getChildIndex(i);t.remove(i),t.insertChild(n,i.getChildren(),e)}}(i,t),function(e,t){for(const i of e.getChildren())i.is("element","table")&&i.hasAttribute("xmlns")&&t.removeAttribute("xmlns",i)}(i,t),function(e,t){for(const i of e.getChildren())i.is("element","table")&&"0px"===i.getStyle("width")&&t.removeStyle("width",i)}(i,t),function(e,t){for(const i of Array.from(e.getChildren()))i.is("element","style")&&t.remove(i)}(i,t),e.content=i}}function ix(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 nx(e,t){const i=new DOMParser,n=function(e){return ix(ix(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(e){const t="</body>",i="</html>",n=e.indexOf(t);if(n<0)return e;const s=e.indexOf(i,n+t.length);return e.substring(0,n+t.length)+(s>=0?e.substring(s):"")}(e=(e=e.replace(/<!--\[if gte vml 1]>/g,"")).replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,""))),s=i.parseFromString(n,"text/html");!function(e){e.querySelectorAll("span[style*=spacerun]").forEach((e=>{const t=e,i=t.innerText.length||0;t.innerText=Array(i+1).join("  ").substr(0,i)}))}(s);const o=s.body.innerHTML,r=function(e,t){const i=new ja(t),n=new Bl(i,{renderingMode:"data"}),s=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)s.appendChild(o[0]);return n.domToView(s,{skipComments:!0})}(s,t),a=function(e){const t=[],i=[],n=Array.from(e.getElementsByTagName("style"));for(const e of n)e.sheet&&e.sheet.cssRules&&e.sheet.cssRules.length&&(t.push(e.sheet),i.push(e.innerHTML));return{styles:t,stylesString:i.join(" ")}}(s);return{body:r,bodyString:o,styles:a.styles,stylesString:a.stylesString}}const sx="removeFormat";class ox extends nr{static get pluginName(){return"RemoveFormatUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(sx,(i=>{const n=e.commands.get(sx),s=new ho(i);return s.set({label:t("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{e.execute(sx),e.editing.view.focus()})),s}))}}class rx extends or{refresh(){const e=this.editor.model;this.isEnabled=!!Ss(this._getFormattingItems(e.document.selection,e.schema))}execute(){const e=this.editor.model,t=e.schema;e.change((i=>{for(const n of this._getFormattingItems(e.document.selection,t))if(n.is("selection"))for(const e of this._getFormattingAttributes(n,t))i.removeSelectionAttribute(e);else{const e=i.createRangeOn(n);for(const s of this._getFormattingAttributes(n,t))i.removeAttribute(s,e)}}))}*_getFormattingItems(e,t){const i=e=>!!Ss(this._getFormattingAttributes(e,t));for(const n of e.getRanges())for(const e of n.getItems())!t.isBlock(e)&&i(e)&&(yield e);for(const t of e.getSelectedBlocks())i(t)&&(yield t);i(e)&&(yield e)}*_getFormattingAttributes(e,t){for(const[i]of e.getAttributes()){const e=t.getAttributeProperties(i);e&&e.isFormatting&&(yield i)}}}class ax extends nr{static get pluginName(){return"RemoveFormatEditing"}init(){const e=this.editor;e.commands.add("removeFormat",new rx(e))}}function lx(e,t){const{modelAttribute:i,styleName:n,viewElement:s,defaultValue:o,reduceBoxSides:r=!1,shouldUpcast:a=(()=>!0)}=t;e.for("upcast").attributeToAttribute({view:{name:s,styles:{[n]:/[\s\S]+/}},model:{key:i,value:e=>{if(!a(e))return;const t=e.getNormalizedStyle(n),i=r?ux(t):t;return o!==i?i:void 0}}})}function cx(e,t,i,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,s)=>{if(!t.modelRange)return;const o=["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(!o.length)return;const r={styles:o};if(!s.consumable.test(t.viewItem,r))return;const a=[...t.modelRange.getItems({shallow:!0})].pop();s.consumable.consume(t.viewItem,r);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:ux(l.style),color:ux(l.color),width:ux(l.width)};c.style!==n.style&&s.writer.setAttribute(i.style,c.style,a),c.color!==n.color&&s.writer.setAttribute(i.color,c.color,a),c.width!==n.width&&s.writer.setAttribute(i.width,c.width,a)}))))}function dx(e,t){const{modelElement:i,modelAttribute:n,styleName:s}=t;e.for("downcast").attributeToAttribute({model:{name:i,key:n},view:e=>({key:"style",value:{[s]:e}})})}function hx(e,t){const{modelAttribute:i,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${i}:table`,((e,t,i)=>{const{item:s,attributeNewValue:o}=t,{mapper:r,writer:a}=i;if(!i.consumable.consume(t.item,e.name))return;const l=[...r.toViewElement(s).getChildren()].find((e=>e.is("element","table")));o?a.setStyle(n,o,l):a.removeStyle(n,l)}))))}function ux(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const i=e.top;return t.every((t=>e[t]===i))?i:e}function mx(e,t,i,n,s=1){null!=t&&null!=s&&t>s?n.setAttribute(e,t,i):n.removeAttribute(e,i)}function gx(e,t,i={}){const n=e.createElement("tableCell",i);return e.insertElement("paragraph",n),e.insert(n,t),n}function fx(e,t){const i=t.parent.parent,n=parseInt(i.getAttribute("headingColumns")||"0"),{column:s}=e.getCellLocation(t);return!!n&&s<n}function px(e,t,i){const{modelAttribute:n}=i;e.extend("tableCell",{allowAttributes:[n]}),lx(t,{viewElement:/^(td|th)$/,...i}),dx(t,{modelElement:"tableCell",...i})}function bx(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}function wx(){return e=>{e.on("element:table",((e,t,i)=>{const n=t.viewItem;if(!i.consumable.test(n,{name:!0}))return;const{rows:s,headingRows:o,headingColumns:r}=function(e){let t,i=0;const n=[],s=[];let o;for(const r of Array.from(e.getChildren())){if("tbody"!==r.name&&"thead"!==r.name&&"tfoot"!==r.name)continue;"thead"!==r.name||o||(o=r);const e=Array.from(r.getChildren()).filter((e=>e.is("element","tr")));for(const a of e)if(o&&r===o||"tbody"===r.name&&Array.from(a.getChildren()).length&&Array.from(a.getChildren()).every((e=>e.is("element","th"))))i++,n.push(a);else{s.push(a);const e=_x(a);(!t||e<t)&&(t=e)}}return{headingRows:i,headingColumns:t||0,rows:[...n,...s]}}(n),a={};r&&(a.headingColumns=r),o&&(a.headingRows=o);const l=i.writer.createElement("table",a);if(i.safeInsert(l,t.modelCursor)){if(i.consumable.consume(n,{name:!0}),s.forEach((e=>i.convertItem(e,i.writer.createPositionAt(l,"end")))),i.convertChildren(n,i.writer.createPositionAt(l,"end")),l.isEmpty){const e=i.writer.createElement("tableRow");i.writer.insert(e,i.writer.createPositionAt(l,"end")),gx(i.writer,i.writer.createPositionAt(e,"end"))}i.updateConversionResult(l,t)}}))}}function vx(e){return t=>{t.on(`element:${e}`,((e,t,{writer:i})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,s=i.createPositionAt(n,0);if(t.viewItem.isEmpty)return void i.insertElement("paragraph",s);const o=Array.from(n.getChildren());if(o.every((e=>e.is("element","$marker")))){const e=i.createElement("paragraph");i.insert(e,i.createPositionAt(n,0));for(const t of o)i.move(i.createRangeOn(t),i.createPositionAt(e,"end"))}}),{priority:"low"})}}function _x(e){let t=0,i=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;i<n.length&&"th"===n[i].name;){const e=n[i];t+=parseInt(e.getAttribute("colspan")||"1"),i++}return t}class yx{constructor(e,t={}){this._jumpedToStartRow=!1,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 i=this._getSpanned();if(i)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(i.cell,i.row,i.column));else{const i=e.getChild(this._cellIndex);if(!i)return this._advanceToNextRow();const n=parseInt(i.getAttribute("colspan")||"1"),s=parseInt(i.getAttribute("rowspan")||"1");(n>1||s>1)&&this._recordSpans(i,s,n),this._shouldSkipSlot()||(t=this._formatOutValue(i)),this._nextCellAtColumn=this._column+n}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,i=this._column){return{done:!1,value:new kx(this,e,t,i)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,i=this._column<this._startColumn,n=void 0!==this._endColumn&&this._column>this._endColumn;return e||t||i||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,i){const n={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+i;t++)e==this._row&&t==this._column||this._markSpannedCell(e,t,n)}_markSpannedCell(e,t,i){this._spannedCells.has(e)||this._spannedCells.set(e,new Map);this._spannedCells.get(e).set(t,i)}_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 kx{constructor(e,t,i,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=i,this.cellAnchorColumn=n,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 Cx(e,t){return(i,{writer:n})=>{const s=i.getAttribute("headingRows")||0,o=n.createContainerElement("table",null,[]),r=n.createContainerElement("figure",{class:"table"},o);s>0&&n.insert(n.createPositionAt(o,"end"),n.createContainerElement("thead",null,n.createSlot((e=>e.is("element","tableRow")&&e.index<s)))),s<e.getRows(i)&&n.insert(n.createPositionAt(o,"end"),n.createContainerElement("tbody",null,n.createSlot((e=>e.is("element","tableRow")&&e.index>=s))));for(const{positionOffset:e,filter:i}of t.additionalSlots)n.insert(n.createPositionAt(o,e),n.createSlot(i));return n.insert(n.createPositionAt(o,"after"),n.createSlot((e=>!e.is("element","tableRow")&&!t.additionalSlots.some((({filter:t})=>t(e)))))),t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),Db(e,t,{hasSelectionHandle:!0})}(r,n):r}}function Ax(e={}){return(t,{writer:i})=>{const n=t.parent,s=n.parent,o=s.getChildIndex(n),r=new yx(s,{row:o}),a=s.getAttribute("headingRows")||0,l=s.getAttribute("headingColumns")||0;let c=null;for(const n of r)if(n.cell==t){const t=n.row<a||n.column<l?"th":"td";c=e.asWidget?$b(i.createEditableElement(t),i):i.createContainerElement(t);break}return c}}function xx(e={}){return(t,{writer:i})=>{if(!t.parent.is("element","tableCell"))return null;if(!Tx(t))return null;if(e.asWidget)return i.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=i.createContainerElement("p");return i.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function Tx(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class Ex extends or{refresh(){const e=this.editor.model,t=e.document.selection,i=e.schema;this.isEnabled=function(e,t){const i=e.getFirstPosition().parent,n=i===i.root?i:i.parent;return t.checkChild(n,"table")}(t,i)}execute(e={}){const t=this.editor,i=t.model,n=t.plugins.get("TableUtils"),s=t.config.get("table.defaultHeadings.rows"),o=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&s&&(e.headingRows=s),void 0===e.headingColumns&&o&&(e.headingColumns=o),i.change((t=>{const s=n.createTable(t,e);i.insertObject(s,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(s.getNodeByPath([0,0,0]),0))}))}}class Sx extends or{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,i=e.plugins.get("TableUtils"),n="above"===this.order,s=i.getSelectionAffectedTableCells(t),o=i.getRowIndexes(s),r=n?o.first:o.last,a=s[0].findAncestor("table");i.insertRows(a,{at:n?r:r+1,copyStructureFromAbove:!n})}}class Px extends or{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,i=e.plugins.get("TableUtils"),n="left"===this.order,s=i.getSelectionAffectedTableCells(t),o=i.getColumnIndexes(s),r=n?o.first:o.last,a=s[0].findAncestor("table");i.insertColumns(a,{columns:1,at:n?r:r+1})}}class Ix extends or{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)}}function Vx(e,t,i){const{startRow:n,startColumn:s,endRow:o,endColumn:r}=t,a=i.createElement("table"),l=o-n+1;for(let e=0;e<l;e++)i.insertElement("tableRow",a,"end");const c=[...new yx(e,{startRow:n,endRow:o,startColumn:s,endColumn:r,includeAllSlots:!0})];for(const{row:e,column:t,cell:l,isAnchor:d,cellAnchorRow:h,cellAnchorColumn:u}of c){const c=e-n,m=a.getChild(c);if(d){const n=i.cloneElement(l);i.append(n,m),Nx(n,e,t,o,r,i)}else(h<n||u<s)&&gx(i,i.createPositionAt(m,"end"))}return function(e,t,i,n,s){const o=parseInt(t.getAttribute("headingRows")||"0");if(o>0){mx("headingRows",o-i,e,s,0)}const r=parseInt(t.getAttribute("headingColumns")||"0");if(r>0){mx("headingColumns",r-n,e,s,0)}}(a,e,n,s,i),a}function Rx(e,t,i=0){const n=[],s=new yx(e,{startRow:i,endRow:t-1});for(const e of s){const{row:i,cellHeight:s}=e;i<t&&t<=i+s-1&&n.push(e)}return n}function Ox(e,t,i){const n=e.parent,s=n.parent,o=n.index,r=t-o,a={},l=parseInt(e.getAttribute("rowspan"))-r;l>1&&(a.rowspan=l);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const d=o+r,h=[...new yx(s,{startRow:o,endRow:d,includeAllSlots:!0})];let u,m=null;for(const t of h){const{row:n,column:s,cell:o}=t;o===e&&void 0===u&&(u=s),void 0!==u&&u===s&&n===d&&(m=gx(i,t.getPositionBefore(),a))}return mx("rowspan",r,e,i),m}function Bx(e,t){const i=[],n=new yx(e);for(const e of n){const{column:n,cellWidth:s}=e;n<t&&t<=n+s-1&&i.push(e)}return i}function Mx(e,t,i,n){const s=i-t,o={},r=parseInt(e.getAttribute("colspan"))-s;r>1&&(o.colspan=r);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(o.rowspan=a);const l=gx(n,n.createPositionAfter(e),o);return mx("colspan",s,e,n),l}function Nx(e,t,i,n,s,o){const r=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");if(i+r-1>s){mx("colspan",s-i+1,e,o,1)}if(t+a-1>n){mx("rowspan",n-t+1,e,o,1)}}function Fx(e,t){const i=t.getColumns(e),n=new Array(i).fill(0);for(const{column:t}of new yx(e))n[t]++;const s=n.reduce(((e,t,i)=>t?e:[...e,i]),[]);if(s.length>0){const i=s[s.length-1];return t.removeColumns(e,{at:i}),!0}return!1}function Dx(e,t){const i=[],n=t.getRows(e);for(let t=0;t<n;t++){e.getChild(t).isEmpty&&i.push(t)}if(i.length>0){const n=i[i.length-1];return t.removeRows(e,{at:n}),!0}return!1}function Lx(e,t){Fx(e,t)||Dx(e,t)}function zx(e,t){const i=Array.from(new yx(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(i.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=i[0].cellHeight-1;return t.lastRow+n}function Hx(e,t){const i=Array.from(new yx(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(i.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=i[0].cellWidth-1;return t.lastColumn+n}class $x extends or{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,i=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,s=this.direction;e.change((e=>{const t="right"==s||"down"==s,o=t?i:n,r=t?n:i,a=r.parent;!function(e,t,i){Wx(e)||(Wx(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end")));i.remove(e)}(r,o,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(i.getAttribute(l)||"1"),d=parseInt(n.getAttribute(l)||"1");e.setAttribute(l,c+d,o),e.setSelection(e.createRangeIn(o));const h=this.editor.plugins.get("TableUtils");Lx(a.findAncestor("table"),h)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),i=t.getTableCellsContainingSelection(e.selection)[0];if(!i)return;const n=this.isHorizontal?function(e,t,i){const n=e.parent,s=n.parent,o="right"==t?e.nextSibling:e.previousSibling,r=(s.getAttribute("headingColumns")||0)>0;if(!o)return;const a="right"==t?e:o,l="right"==t?o:e,{column:c}=i.getCellLocation(a),{column:d}=i.getCellLocation(l),h=parseInt(a.getAttribute("colspan")||"1"),u=fx(i,a),m=fx(i,l);if(r&&u!=m)return;return c+h===d?o:void 0}(i,this.direction,t):function(e,t,i){const n=e.parent,s=n.parent,o=s.getChildIndex(n);if("down"==t&&o===i.getRows(s)-1||"up"==t&&0===o)return null;const r=parseInt(e.getAttribute("rowspan")||"1"),a=s.getAttribute("headingRows")||0,l="down"==t&&o+r===a,c="up"==t&&o===a;if(a&&(l||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),h="down"==t?o+d:o,u=[...new yx(s,{endRow:h})],m=u.find((t=>t.cell===e)),g=m.column,f=u.find((({row:e,cellHeight:i,column:n})=>n===g&&("down"==t?e===h:h===e+i)));return f&&f.cell?f.cell:null}(i,this.direction,t);if(!n)return;const s=this.isHorizontal?"rowspan":"colspan",o=parseInt(i.getAttribute(s)||"1");return parseInt(n.getAttribute(s)||"1")===o?n:void 0}}function Wx(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class jx extends or{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=t[0];if(i){const n=i.findAncestor("table"),s=e.getRows(n)-1,o=e.getRowIndexes(t),r=0===o.first&&o.last===s;this.isEnabled=!r}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(i),s=i[0],o=s.findAncestor("table"),r=t.getCellLocation(s).column;e.change((e=>{const i=n.last-n.first+1;t.removeRows(o,{at:n.first,rows:i});const s=function(e,t,i,n){const s=e.getChild(Math.min(t,n-1));let o=s.getChild(0),r=0;for(const e of s.getChildren()){if(r>i)return o;o=e,r+=parseInt(e.getAttribute("colspan")||"1")}return o}(o,n.first,r,t.getRows(o));e.setSelection(e.createPositionAt(s,0))}))}}class Ux extends or{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=t[0];if(i){const n=i.findAncestor("table"),s=e.getColumns(n),{first:o,last:r}=e.getColumnIndexes(t);this.isEnabled=r-o<s-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,i]=function(e,t){const i=t.getSelectionAffectedTableCells(e),n=i[0],s=i.pop(),o=[n,s];return n.isBefore(s)?o:o.reverse()}(this.editor.model.document.selection,e),n=t.parent.parent,s=[...new yx(n)],o={first:s.find((e=>e.cell===t)).column,last:s.find((e=>e.cell===i)).column},r=function(e,t,i,n){const s=parseInt(i.getAttribute("colspan")||"1");return s>1?i:t.previousSibling||i.nextSibling?i.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>e<n.first)).cell:e.reverse().find((({column:e})=>e>n.last)).cell}(s,t,i,o);this.editor.model.change((t=>{const i=o.last-o.first+1;e.removeColumns(n,{at:o.first,columns:i}),t.setSelection(t.createPositionAt(r,0))}))}}class qx extends or{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,i=e.getSelectionAffectedTableCells(t.document.selection),n=i.length>0;this.isEnabled=n,this.value=n&&i.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),i=this.editor.model,n=t.getSelectionAffectedTableCells(i.document.selection),s=n[0].findAncestor("table"),{first:o,last:r}=t.getRowIndexes(n),a=this.value?o:r+1,l=s.getAttribute("headingRows")||0;i.change((e=>{if(a){const t=Rx(s,a,a>l?l:0);for(const{cell:i}of t)Ox(i,a,e)}mx("headingRows",a,s,e,0)}))}_isInHeading(e,t){const i=parseInt(t.getAttribute("headingRows")||"0");return!!i&&e.parent.index<i}}class Gx extends or{refresh(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),i=t.getSelectionAffectedTableCells(e.document.selection),n=i.length>0;this.isEnabled=n,this.value=n&&i.every((e=>fx(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),i=this.editor.model,n=t.getSelectionAffectedTableCells(i.document.selection),s=n[0].findAncestor("table"),{first:o,last:r}=t.getColumnIndexes(n),a=this.value?o:r+1;i.change((e=>{if(a){const t=Bx(s,a);for(const{cell:i,column:n}of t)Mx(i,n,a,e)}mx("headingColumns",a,s,e,0)}))}}const Zx=5,Kx=2;function Jx(e,t){return 4e3/Qx(e,t)}function Qx(e,t){const i=Yx(e,"tbody",t)||Yx(e,"thead",t);return Xx(t.editing.view.domConverter.mapViewToDom(i))}function Yx(e,t,i){return[...[...i.editing.mapper.toViewElement(e).getChildren()].find((e=>e.is("element","table"))).getChildren()].find((e=>e.is("element",t)))}function Xx(e){const t=Mn.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 eT(e){const t=Math.pow(10,Kx),i="number"==typeof e?e:parseFloat(e);return Math.round(i*t)/t}function tT(e){return e.map((e=>"number"==typeof e?e:parseFloat(e))).filter((e=>!Number.isNaN(e))).reduce(((e,t)=>e+t),0)}function iT(e){let t=function(e){const t=e.filter((e=>"auto"===e)).length;if(0===t)return e.map((e=>eT(e)));const i=tT(e),n=Math.max((100-i)/t,Zx);return e.map((e=>"auto"===e?n:e)).map((e=>eT(e)))}(e.map((e=>"auto"===e?e:parseFloat(e.replace("%","")))));const i=tT(t);return 100!==i&&(t=t.map((e=>eT(100*e/i))).map(((e,t,i)=>{if(!(t===i.length-1))return e;return eT(e+100-tT(i))}))),t.map((e=>e+"%"))}function nT(e){const t=Mn.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function sT(e,t,i,n){for(let s=0;s<Math.max(i.length,e.length);s++){const o=e[s],r=i[s];r?o?n.setAttribute("columnWidth",r,o):n.appendElement("tableColumn",{columnWidth:r},t):n.remove(o)}}function oT(e){if(e.is("element","tableColumnGroup"))return e;const t=e.getChildren();return Array.from(t).find((e=>e.is("element","tableColumnGroup")))}function rT(e){const t=oT(e);return t?Array.from(t.getChildren()):[]}class aT extends nr{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,i=t.parent,n=i.getChildIndex(t),s=new yx(i,{row:n});for(const{cell:t,row:i,column:n}of s)if(t===e)return{row:i,column:n}}createTable(e,t){const i=e.createElement("table"),n=t.rows||2,s=t.columns||2;return lT(e,i,0,n,s),t.headingRows&&mx("headingRows",Math.min(t.headingRows,n),i,e,0),t.headingColumns&&mx("headingColumns",Math.min(t.headingColumns,s),i,e,0),i}insertRows(e,t={}){const i=this.editor.model,n=t.at||0,s=t.rows||1,o=void 0!==t.copyStructureFromAbove,r=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),l=this.getColumns(e);if(n>a)throw new y("tableutils-insertrows-insert-out-of-range",this,{options:t});i.change((t=>{const i=e.getAttribute("headingRows")||0;if(i>n&&mx("headingRows",i+s,e,t,0),!o&&(0===n||n===a))return void lT(t,e,n,s,l);const c=o?Math.max(n,r):n,d=new yx(e,{endRow:c}),h=new Array(l).fill(1);for(const{row:e,column:i,cellHeight:a,cellWidth:l,cell:c}of d){const d=e+a-1,u=e<=r&&r<=d;e<n&&n<=d?(t.setAttribute("rowspan",a+s,c),h[i]=-l):o&&u&&(h[i]=l)}for(let i=0;i<s;i++){const i=t.createElement("tableRow");t.insert(i,e,n);for(let e=0;e<h.length;e++){const n=h[e],s=t.createPositionAt(i,"end");n>0&&gx(t,s,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const i=this.editor.model,n=t.at||0,s=t.columns||1;i.change((t=>{const i=e.getAttribute("headingColumns");n<i&&t.setAttribute("headingColumns",i+s,e);const o=this.getColumns(e);if(0===n||o===n){for(const i of e.getChildren())i.is("element","tableRow")&&cT(s,t,t.createPositionAt(i,n?"end":0));return}const r=new yx(e,{column:n,includeAllSlots:!0});for(const e of r){const{row:i,cell:o,cellAnchorColumn:a,cellAnchorRow:l,cellWidth:c,cellHeight:d}=e;if(a<n){t.setAttribute("colspan",c+s,o);const e=l+d-1;for(let t=i;t<=e;t++)r.skipRow(t)}else cT(s,t,e.getPositionBefore())}}))}removeRows(e,t){const i=this.editor.model,n=t.rows||1,s=this.getRows(e),o=t.at,r=o+n-1;if(r>s-1)throw new y("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});i.change((t=>{const i={first:o,last:r},{cellsToMove:n,cellsToTrim:s}=function(e,{first:t,last:i}){const n=new Map,s=[];for(const{row:o,column:r,cellHeight:a,cell:l}of new yx(e,{endRow:i})){const e=o+a-1;if(o>=t&&o<=i&&e>i){const e=a-(i-o+1);n.set(r,{cell:l,rowspan:e})}if(o<t&&e>=t){let n;n=e>=i?i-t+1:e-t+1,s.push({cell:l,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:s}}(e,i);if(n.size){!function(e,t,i,n){const s=new yx(e,{includeAllSlots:!0,row:t}),o=[...s],r=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:s}of o)if(i.has(e)){const{cell:t,rowspan:s}=i.get(e),o=a?n.createPositionAfter(a):n.createPositionAt(r,0);n.move(n.createRangeOn(t),o),mx("rowspan",s,t,n),a=t}else s&&(a=t)}(e,r+1,n,t)}for(let i=r;i>=o;i--)t.remove(e.getChild(i));for(const{rowspan:e,cell:i}of s)mx("rowspan",e,i,t);!function(e,{first:t,last:i},n){const s=e.getAttribute("headingRows")||0;if(t<s){mx("headingRows",i<s?s-(i-t+1):t,e,n,0)}}(e,i,t),Fx(e,this)||Dx(e,this)}))}removeColumns(e,t){const i=this.editor.model,n=t.at,s=t.columns||1,o=t.at+s-1;i.change((t=>{!function(e,t,i){const n=e.getAttribute("headingColumns")||0;if(n&&t.first<n){const s=Math.min(n-1,t.last)-t.first+1;i.setAttribute("headingColumns",n-s,e)}}(e,{first:n,last:o},t);const i=rT(e);for(let s=o;s>=n;s--){for(const{cell:i,column:n,cellWidth:o}of[...new yx(e)])n<=s&&o>1&&n+o>s?mx("colspan",o-1,i,t):n===s&&t.remove(i);if(i[s]){const e=0===s?i[1]:i[s-1],n=parseFloat(i[s].getAttribute("columnWidth")),o=parseFloat(e.getAttribute("columnWidth"));t.remove(i[s]),t.setAttribute("columnWidth",n+o+"%",e)}}Dx(e,this)||Fx(e,this)}))}splitCellVertically(e,t=2){const i=this.editor.model,n=e.parent.parent,s=parseInt(e.getAttribute("rowspan")||"1"),o=parseInt(e.getAttribute("colspan")||"1");i.change((i=>{if(o>1){const{newCellsSpan:n,updatedSpan:r}=dT(o,t);mx("colspan",r,e,i);const a={};n>1&&(a.colspan=n),s>1&&(a.rowspan=s);cT(o>t?t-1:o-1,i,i.createPositionAfter(e),a)}if(o<t){const r=t-o,a=[...new yx(n)],{column:l}=a.find((({cell:t})=>t===e)),c=a.filter((({cell:t,cellWidth:i,column:n})=>t!==e&&n===l||n<l&&n+i>l));for(const{cell:e,cellWidth:t}of c)i.setAttribute("colspan",t+r,e);const d={};s>1&&(d.rowspan=s),cT(r,i,i.createPositionAfter(e),d);const h=n.getAttribute("headingColumns")||0;h>l&&mx("headingColumns",h+r,n,i)}}))}splitCellHorizontally(e,t=2){const i=this.editor.model,n=e.parent,s=n.parent,o=s.getChildIndex(n),r=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");i.change((i=>{if(r>1){const n=[...new yx(s,{startRow:o,endRow:o+r-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=dT(r,t);mx("rowspan",c,e,i);const{column:d}=n.find((({cell:t})=>t===e)),h={};l>1&&(h.rowspan=l),a>1&&(h.colspan=a);for(const e of n){const{column:t,row:n}=e;n>=o+c&&t===d&&(n+o+c)%l==0&&cT(1,i,e.getPositionBefore(),h)}}if(r<t){const n=t-r,l=[...new yx(s,{startRow:0,endRow:o})];for(const{cell:t,cellHeight:s,row:r}of l)if(t!==e&&r+s>o){const e=s+n;i.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),lT(i,s,o+1,n,1,c);const d=s.getAttribute("headingRows")||0;d>o&&mx("headingRows",d+n,s,i)}}))}getColumns(e){return[...e.getChild(0).getChildren()].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 yx(e,t)}getSelectedTableCells(e){const t=[];for(const i of this.sortRanges(e.getRanges())){const e=i.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const i of e.getRanges()){const e=i.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"),i=[...new yx(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(i)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,i=new Set;let n=0;for(const s of e){const{row:e,column:o}=this.getCellLocation(s),r=parseInt(s.getAttribute("rowspan"))||1,a=parseInt(s.getAttribute("colspan"))||1;t.add(e),i.add(o),r>1&&t.add(e+r-1),a>1&&i.add(o+a-1),n+=r*a}const s=function(e,t){const i=Array.from(e.values()),n=Array.from(t.values()),s=Math.max(...i),o=Math.min(...i),r=Math.max(...n),a=Math.min(...n);return(s-o+1)*(r-a+1)}(t,i);return s==n}sortRanges(e){return Array.from(e).sort(hT)}_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"),i=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(i,n))return!1;const s=this.getColumnIndexes(e),o=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(s,o)}_areIndexesInSameSection({first:e,last:t},i){return e<i===t<i}}function lT(e,t,i,n,s,o={}){for(let r=0;r<n;r++){const n=e.createElement("tableRow");e.insert(n,t,i),cT(s,e,e.createPositionAt(n,"end"),o)}}function cT(e,t,i,n={}){for(let s=0;s<e;s++)gx(t,i,n)}function dT(e,t){if(e<t)return{newCellsSpan:1,updatedSpan:1};const i=Math.floor(e/t);return{newCellsSpan:i,updatedSpan:e-i*t+i}}function hT(e,t){const i=e.start,n=t.start;return i.isBefore(n)?-1:1}class uT extends or{refresh(){const e=this.editor.plugins.get(aT),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t)}execute(){const e=this.editor.model,t=this.editor.plugins.get(aT);e.change((i=>{const n=t.getSelectedTableCells(e.document.selection),s=n.shift(),{mergeWidth:o,mergeHeight:r}=function(e,t,i){let n=0,s=0;for(const e of t){const{row:t,column:o}=i.getCellLocation(e);n=fT(e,o,n,"colspan"),s=fT(e,t,s,"rowspan")}const{row:o,column:r}=i.getCellLocation(e),a=n-r,l=s-o;return{mergeWidth:a,mergeHeight:l}}(s,n,t);mx("colspan",o,s,i),mx("rowspan",r,s,i);for(const e of n)mT(e,s,i);Lx(s.findAncestor("table"),t),i.setSelection(s,"in")}))}}function mT(e,t,i){gT(e)||(gT(t)&&i.remove(i.createRangeIn(t)),i.move(i.createRangeIn(e),i.createPositionAt(t,"end"))),i.remove(e)}function gT(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function fT(e,t,i,n){const s=parseInt(e.getAttribute(n)||"1");return Math.max(i,t+s)}class pT extends or{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"),i=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(i),s=i[0].findAncestor("table"),o=[];for(let t=n.first;t<=n.last;t++)for(const i of s.getChild(t).getChildren())o.push(e.createRangeOn(i));e.change((e=>{e.setSelection(o)}))}}class bT extends or{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,i=e.getSelectionAffectedTableCells(t.document.selection),n=i[0],s=i.pop(),o=n.findAncestor("table"),r=e.getCellLocation(n),a=e.getCellLocation(s),l=Math.min(r.column,a.column),c=Math.max(r.column,a.column),d=[];for(const e of new yx(o,{startColumn:l,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function wT(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;const s=new Set;for(const t of i){let i=null;"insert"==t.type&&"table"==t.name&&(i=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(i=t.position.findAncestor("table")),yT(t)&&(i=t.range.start.findAncestor("table")),i&&!s.has(i)&&(n=vT(i,e)||n,n=_T(i,e)||n,s.add(i))}return n}(t,e)))}function vT(e,t){let i=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),i=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:s,cell:o,cellHeight:r}of new yx(e)){if(r<2)continue;const e=s<t?t:i;if(s+r>e){const t=e-s;n.push({cell:o,rowspan:t})}}return n}(e);if(n.length){i=!0;for(const e of n)mx("rowspan",e.rowspan,e.cell,t,1)}return i}function _T(e,t){let i=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:i}of new yx(e,{includeAllSlots:!0}))t[i]++;return t}(e),s=[];for(const[t,i]of n.entries())!i&&e.getChild(t).is("element","tableRow")&&s.push(t);if(s.length){i=!0;for(const i of s.reverse())t.remove(e.getChild(i)),n.splice(i,1)}const o=n.filter(((t,i)=>e.getChild(i).is("element","tableRow"))),r=o[0];if(!o.every((e=>e===r))){const n=o.reduce(((e,t)=>t>e?t:e),0);for(const[s,r]of o.entries()){const o=n-r;if(o){for(let i=0;i<o;i++)gx(t,t.createPositionAt(e.getChild(s),"end"));i=!0}}}return i}function yT(e){if("attribute"!==e.type)return!1;const t=e.attributeKey;return"headingRows"===t||"colspan"===t||"rowspan"===t}function kT(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i)"insert"==t.type&&"table"==t.name&&(n=CT(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=AT(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=xT(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!TT(t)||(n=xT(t.position.parent,e)||n);return n}(t,e)))}function CT(e,t){let i=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(i=AT(n,t)||i);return i}function AT(e,t){let i=!1;for(const n of e.getChildren())i=xT(n,t)||i;return i}function xT(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const i=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of i)t.wrap(t.createRangeOn(e),"paragraph");return!!i.length}function TT(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function ET(e,t){if(!e.is("element","paragraph"))return!1;const i=t.toViewElement(e);return!!i&&Tx(e)!==i.is("element","span")}class ST extends nr{static get pluginName(){return"TableEditing"}static get requires(){return[aT]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,i=t.schema,n=e.conversion,s=e.plugins.get(aT);i.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),i.register("tableRow",{allowIn:"table",isLimit:!0}),i.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,i)=>{if(!i.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!i.consumable.test(n,{name:!0}))return;i.consumable.consume(t.viewItem,{name:!0,classes:"table"});const s=Ss(i.convertItem(n,t.modelCursor).modelRange.getItems());s?(i.convertChildren(t.viewItem,i.writer.createPositionAt(s,"end")),i.updateConversionResult(s,t)):i.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(wx()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:Cx(s,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:Cx(s,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(vx("td")),n.for("upcast").add(vx("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:Ax({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:Ax()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:xx({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:xx(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:PT("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:PT("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new Ex(e)),e.commands.add("insertTableRowAbove",new Sx(e,{order:"above"})),e.commands.add("insertTableRowBelow",new Sx(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new Px(e,{order:"left"})),e.commands.add("insertTableColumnRight",new Px(e,{order:"right"})),e.commands.add("removeTableRow",new jx(e)),e.commands.add("removeTableColumn",new Ux(e)),e.commands.add("splitTableCellVertically",new Ix(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new Ix(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new uT(e)),e.commands.add("mergeTableCellRight",new $x(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new $x(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new $x(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new $x(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new Gx(e)),e.commands.add("setTableRowHeader",new qx(e)),e.commands.add("selectTableRow",new pT(e)),e.commands.add("selectTableColumn",new bT(e)),wT(t),kT(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const i=e.document.differ;for(const e of i.getChanges()){let i,n=!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;i=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(i=e.position.findAncestor("table"),n="tableRow"==e.name);if(!i)continue;const s=i.getAttribute("headingRows")||0,o=i.getAttribute("headingColumns")||0,r=new yx(i);for(const e of r){const i=e.row<s||e.column<o?"th":"td",r=t.mapper.toViewElement(e.cell);r&&r.is("element")&&r.name!=i&&t.reconvertItem(n?e.cell.parent:e.cell)}}}(t,e.editing),function(e,t){const i=e.document.differ,n=new Set;for(const e of i.getChanges()){const t="attribute"==e.type?e.range.start.parent:e.position.parent;t.is("element","tableCell")&&n.add(t)}for(const e of n.values()){const i=Array.from(e.getChildren()).filter((e=>ET(e,t.mapper)));for(const e of i)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function PT(e){return t=>{const i=parseInt(t.getAttribute(e));return Number.isNaN(i)||i<=0?null:i}}class IT extends Ds{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new Is,this.focusTracker=new Ps,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:i,column:n}=t.target.dataset;this.items.get(10*(parseInt(i,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,i)=>{if(!i)return;const{row:n,column:s}=i.dataset;this.set({rows:parseInt(n),columns:parseInt(s)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),n({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)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((i,n)=>{const s=Math.floor(n/10)<e&&n%10<t;i.set("isOn",s)}))}_createGridButton(e,t,i,n){const s=new ho(e);return s.set({label:n,class:"ck-insert-table-dropdown-grid-box"}),s.extendTemplate({attributes:{"data-row":t,"data-column":i}}),s}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const i=Math.floor(t/10),n=t%10,s=`${i+1} × ${n+1}`;e.push(this._createGridButton(this.locale,i+1,n+1,s))}return this.createCollection(e)}}class VT extends nr{static get pluginName(){return"TableUI"}init(){const e=this.editor,t=this.editor.t,i="ltr"===e.locale.contentLanguageDirection;e.ui.componentFactory.add("insertTable",(i=>{const n=e.commands.get("insertTable"),s=Pm(i);let o;return s.bind("isEnabled").to(n),s.buttonView.set({icon:bm.table,label:t("Insert table"),tooltip:!0}),s.on("change:isOpen",(()=>{o||(o=new IT(i),s.panelView.children.add(o),o.delegate("execute").to(s),s.on("execute",(()=>{e.execute("insertTable",{rows:o.rows,columns:o.columns}),e.editing.view.focus()})))})),s})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:i?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:i?"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"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const i=[{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"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',i,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:i?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:i?"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"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>',n,e)}))}_prepareDropdown(e,t,i,n){const s=this.editor,o=Pm(n),r=this._fillDropdownWithListOptions(o,i);return o.buttonView.set({label:e,icon:t,tooltip:!0}),o.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(o,"execute",(e=>{s.execute(e.source.commandName),e.source instanceof uo||s.editing.view.focus()})),o}_prepareMergeSplitButtonDropdown(e,t,i,n){const s=this.editor,o=Pm(n,Sm),r="mergeTableCells",a=s.commands.get(r),l=this._fillDropdownWithListOptions(o,i);return o.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),o.bind("isEnabled").toMany([a,...l],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(o.buttonView,"execute",(()=>{s.execute(r),s.editing.view.focus()})),this.listenTo(o,"execute",(e=>{s.execute(e.source.commandName),s.editing.view.focus()})),o}_fillDropdownWithListOptions(e,t){const i=this.editor,n=[],s=new Es;for(const e of t)RT(e,i,n,s);return Rm(e,s),n}}function RT(e,t,i,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new bf(e.model),{commandName:s,bindIsOn:o}=e.model,r=t.commands.get(s);i.push(r),n.set({commandName:s}),n.bind("isEnabled").to(r),o&&n.bind("isOn").to(r,"value"),n.set({withText:!0})}n.add(e)}class OT extends nr{static get pluginName(){return"TableSelection"}static get requires(){return[aT,aT]}init(){const e=this.editor,t=e.model,i=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(i.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(aT),t=this.editor.model.document.selection,i=e.getSelectedTableCells(t);return 0==i.length?null:i}getSelectionAsFragment(){const e=this.editor.plugins.get(aT),t=this.getSelectedTableCells();return t?this.editor.model.change((i=>{const n=i.createDocumentFragment(),{first:s,last:o}=e.getColumnIndexes(t),{first:r,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=a,d=o;if(e.isSelectionRectangular(t)){const e={firstColumn:s,lastColumn:o,firstRow:r,lastRow:a};c=zx(l,e),d=Hx(l,e)}const h=Vx(l,{startRow:r,startColumn:s,endRow:c,endColumn:d},i);return i.insert(h,n,0),n})):null}setCellSelection(e,t){const i=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(i.cells.map((t=>e.createRangeOn(t))),{backward:i.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=Ss(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,i,n)=>{const s=n.writer;!function(e){for(const i of t)e.removeClass("ck-editor__editable_selected",i);t.clear()}(s);const o=this.getSelectedTableCells();if(!o)return;for(const e of o){const i=n.mapper.toViewElement(e);s.addClass("ck-editor__editable_selected",i),t.add(i)}const r=n.mapper.toViewElement(o[o.length-1]);s.setSelection(r,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((i=>{const n=i.createPositionAt(t[0],0),s=e.model.schema.getNearestSelectionRange(n);i.setSelection(s)}))}}))}_handleDeleteContent(e,t){const i=this.editor.plugins.get(aT),n=t[0],s=t[1],o=this.editor.model,r=!s||"backward"==s.direction,a=i.getSelectedTableCells(n);a.length&&(e.stop(),o.change((e=>{const t=a[r?a.length-1:0];o.change((e=>{for(const t of a)o.deleteContent(e.createSelection(t,"in"))}));const i=o.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(i):n.setTo(i)})))}_handleInsertTextEvent(e,t){const i=this.editor,n=this.getSelectedTableCells();if(!n)return;const s=i.editing.view,o=i.editing.mapper,r=n.map((e=>s.createRangeOn(o.toViewElement(e))));t.selection=s.createSelection(r)}_getCellsToSelect(e,t){const i=this.editor.plugins.get("TableUtils"),n=i.getCellLocation(e),s=i.getCellLocation(t),o=Math.min(n.row,s.row),r=Math.max(n.row,s.row),a=Math.min(n.column,s.column),l=Math.max(n.column,s.column),c=new Array(r-o+1).fill(null).map((()=>[])),d={startRow:o,endRow:r,startColumn:a,endColumn:l};for(const{row:t,cell:i}of new yx(e.findAncestor("table"),d))c[t-o].push(i);const h=s.row<n.row,u=s.column<n.column;return h&&c.reverse(),u&&c.forEach((e=>e.reverse())),{cells:c.flat(),backward:h||u}}}class BT extends nr{static get pluginName(){return"TableClipboard"}static get requires(){return[OT,aT]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,i])=>this._onInsertContent(e,t,i)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const i=this.editor.plugins.get(OT);if(!i.getSelectedTableCells())return;if("cut"==e.name&&!this.editor.model.canEditAt(this.editor.model.document.selection))return;t.preventDefault(),e.stop();const n=this.editor.data,s=this.editor.editing.view.document,o=n.toView(i.getSelectionAsFragment());s.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:o,method:e.name})}_onInsertContent(e,t,i){if(i&&!i.is("documentSelection"))return;const n=this.editor.model,s=this.editor.plugins.get(aT);let o=this.getTableIfOnlyTableInContent(t,n);if(!o)return;const r=s.getSelectionAffectedTableCells(n.document.selection);r.length?(e.stop(),n.change((e=>{const t={width:s.getColumns(o),height:s.getRows(o)},i=function(e,t,i,n){const s=e[0].findAncestor("table"),o=n.getColumnIndexes(e),r=n.getRowIndexes(e),a={firstColumn:o.first,lastColumn:o.last,firstRow:r.first,lastRow:r.last},l=1===e.length;l&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,i,n){const s=n.getColumns(e),o=n.getRows(e);i>s&&n.insertColumns(e,{at:s,columns:i-s});t>o&&n.insertRows(e,{at:o,rows:t-o})}(s,a.lastRow+1,a.lastColumn+1,n));l||!n.isSelectionRectangular(e)?function(e,t,i){const{firstRow:n,lastRow:s,firstColumn:o,lastColumn:r}=t,a={first:n,last:s},l={first:o,last:r};NT(e,o,a,i),NT(e,r+1,a,i),MT(e,n,l,i),MT(e,s+1,l,i,n)}(s,a,i):(a.lastRow=zx(s,a),a.lastColumn=Hx(s,a));return a}(r,t,e,s),n=i.lastRow-i.firstRow+1,a=i.lastColumn-i.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(a,t.width)-1};o=Vx(o,l,e);const c=r[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(o,t,c,i,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=s.sortRanges(d.map((t=>e.createRangeOn(t))));e.setSelection(t)}else e.setSelection(d[0],0)}))):Lx(o,s)}_replaceSelectedCellsWithPasted(e,t,i,n,s){const{width:o,height:r}=t,a=function(e,t,i){const n=new Array(i).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:i,cell:s}of new yx(e))n[i][t]=s;return n}(e,o,r),l=[...new yx(i,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of l){const{row:t,column:i}=e;i===n.firstColumn&&(d=e.getPositionBefore());const l=t-n.firstRow,h=i-n.firstColumn,u=a[l%r][h%o],m=u?s.cloneElement(u):null,g=this._replaceTableSlotCell(e,m,d,s);g&&(Nx(g,t,i,n.lastRow,n.lastColumn,s),c.push(g),d=s.createPositionAfter(g))}const h=parseInt(i.getAttribute("headingRows")||"0"),u=parseInt(i.getAttribute("headingColumns")||"0"),m=n.firstRow<h&&h<=n.lastRow,g=n.firstColumn<u&&u<=n.lastColumn;if(m){const e=MT(i,h,{first:n.firstColumn,last:n.lastColumn},s,n.firstRow);c.push(...e)}if(g){const e=NT(i,u,{first:n.firstRow,last:n.lastRow},s);c.push(...e)}return c}_replaceTableSlotCell(e,t,i,n){const{cell:s,isAnchor:o}=e;return o&&n.remove(s),t?(n.insert(t,i),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 i=t.createRangeIn(e);for(const e of i.getItems())if(e.is("element","table")){const n=t.createRange(i.start,t.createPositionBefore(e));if(t.hasContent(n,{ignoreWhitespaces:!0}))return null;const s=t.createRange(t.createPositionAfter(e),i.end);return t.hasContent(s,{ignoreWhitespaces:!0})?null:e}return null}}function MT(e,t,i,n,s=0){if(t<1)return;return Rx(e,t,s).filter((({column:e,cellWidth:t})=>FT(e,t,i))).map((({cell:e})=>Ox(e,t,n)))}function NT(e,t,i,n){if(t<1)return;return Bx(e,t).filter((({row:e,cellHeight:t})=>FT(e,t,i))).map((({cell:e,column:i})=>Mx(e,i,t,n)))}function FT(e,t,i){const n=e+t-1,{first:s,last:o}=i;return e>=s&&e<=o||e<s&&n>=s}class DT extends nr{static get pluginName(){return"TableKeyboard"}static get requires(){return[OT,aT]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(e,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(e,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const i=this.editor,n=i.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),i.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const i=this.editor,n=this.editor.plugins.get(aT),s=this.editor.plugins.get("TableSelection"),o=i.model.document.selection,r=!t.shiftKey;let a=n.getTableCellsContainingSelection(o)[0];if(a||(a=s.getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();const l=a.parent,c=l.parent,d=c.getChildIndex(l),h=l.getChildIndex(a),u=0===h;if(!r&&u&&0===d)return void i.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const m=h===l.childCount-1,g=d===n.getRows(c)-1;if(r&&g&&m&&(i.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void i.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let f;if(r&&m){const e=c.getChild(d+1);f=e.getChild(0)}else if(!r&&u){const e=c.getChild(d-1);f=e.getChild(e.childCount-1)}else f=l.getChild(h+(r?1:-1));i.model.change((e=>{e.setSelection(e.createRangeIn(f))}))}_onArrowKey(e,t){const i=this.editor,n=ys(t.keyCode,i.locale.contentLanguageDirection);this._handleArrowKeys(n,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const i=this.editor.plugins.get(aT),n=this.editor.plugins.get("TableSelection"),s=this.editor.model,o=s.document.selection,r=["right","down"].includes(e),a=i.getSelectedTableCells(o);if(a.length){let i;return i=t?n.getFocusCell():r?a[a.length-1]:a[0],this._navigateFromCellInDirection(i,e,t),!0}const l=o.focus.findAncestor("tableCell");if(!l)return!1;if(!o.isCollapsed)if(t){if(o.isBackward==r&&!o.containsEntireContent(l))return!1}else{const e=o.getSelectedElement();if(!e||!s.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(o,l,r)&&(this._navigateFromCellInDirection(l,e,t),!0)}_isSelectionAtCellEdge(e,t,i){const n=this.editor.model,s=this.editor.model.schema,o=i?e.getLastPosition():e.getFirstPosition();if(!s.getLimitElement(o).is("element","tableCell")){return n.createPositionAt(t,i?"end":0).isTouching(o)}const r=n.createSelection(o);return n.modifySelection(r,{direction:i?"forward":"backward"}),o.isEqual(r.focus)}_navigateFromCellInDirection(e,t,i=!1){const n=this.editor.model,s=e.findAncestor("table"),o=[...new yx(s,{includeAllSlots:!0})],{row:r,column:a}=o[o.length-1],l=o.find((({cell:t})=>t==e));let{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>r||d<0&&c<=0||d>a&&c>=r)return void n.change((e=>{e.setSelection(e.createRangeOn(s))}));d<0?(d=i?0:a,c--):d>a&&(d=i?a:0,c++);const h=o.find((e=>e.row==c&&e.column==d)).cell,u=["right","down"].includes(t),m=this.editor.plugins.get("TableSelection");if(i&&m.isEnabled){const t=m.getAnchorCell()||e;m.setCellSelection(t,h)}else{const e=n.createPositionAt(h,u?0:"end");n.change((t=>{t.setSelection(e)}))}}}class LT extends $l{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class zT extends nr{static get pluginName(){return"TableMouse"}static get requires(){return[OT,aT]}init(){this.editor.editing.view.addObserver(LT),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(aT);let i=!1;const n=e.plugins.get(OT);this.listenTo(e.editing.view.document,"mousedown",((s,o)=>{const r=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!o.domEvent.shiftKey)return;const a=n.getAnchorCell()||t.getTableCellsContainingSelection(r)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(o);l&&HT(a,l)&&(i=!0,n.setCellSelection(a,l),o.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{i=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,i,n=!1,s=!1;const o=e.plugins.get(OT);this.listenTo(e.editing.view.document,"mousedown",((e,i)=>{this.isEnabled&&o.isEnabled&&(i.domEvent.shiftKey||i.domEvent.ctrlKey||i.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(i)))})),this.listenTo(e.editing.view.document,"mousemove",((e,r)=>{if(!r.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(r);a&&HT(t,a)&&(i=a,n||i==t||(n=!0)),n&&(s=!0,o.setCellSelection(t,i),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,s=!1,t=null,i=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{s&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,i=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(i).parent.findAncestor("tableCell",{includeSelf:!0})}}function HT(e,t){return e.parent.parent==t.parent.parent}function $T(e){const t=WT(e);return t||jT(e)}function WT(e){const t=e.getSelectedElement();return t&&UT(t)?t:null}function jT(e){const t=e.getFirstPosition();if(!t)return null;let i=t.parent;for(;i;){if(i.is("element")&&UT(i))return i;i=i.parent}return null}function UT(e){return!!e.getCustomProperty("table")&&Fb(e)}class qT extends Ds{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 Ps,this._focusables=new Fs,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new Is,this._stillTyping=!1,this.focusCycler=new Qo({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,i)=>this._setInputValue(i)))}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,i=this.bindTemplate,n=this._createColorSelector(e),s=Pm(e),o=new Ds;return o.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:i.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",i.if("value","ck-hidden",(e=>""!=e))]}}]}),s.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),s.buttonView.children.add(o),s.buttonView.label=t("Color picker"),s.buttonView.tooltip=!0,s.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",s.panelView.children.add(n),s.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),s.on("change:isOpen",((e,t,i)=>{i&&(n.updateSelectedColors(),n.showColorGridsFragment())})),s}_createInputTextView(){const e=this.locale,t=new Uo(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,i=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=i&&i.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,i=this.options.defaultColorValue||"",n=t(i?"Restore default":"Remove color"),s=new Ag(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:n,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});s.appendUI(),s.on("execute",((e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||i,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1}));let o=this.value;return s.on("colorPicker:cancel",(()=>{this.value=o,this.fire("input"),this.dropdownView.isOpen=!1})),s.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{o=this.value})),s.bind("selectedColor").to(this,"value"),s}_setInputValue(e){if(!this._stillTyping){const t=GT(e),i=this.options.colorDefinitions.find((e=>t===GT(e.color)));this.inputView.value=i?i.label:e||""}}}function GT(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const ZT=e=>""===e;function KT(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 JT(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 YT(e){return e=e.trim().toLowerCase(),ZT(e)||Ru(e)}function XT(e){return e=e.trim(),ZT(e)||oE(e)||Nu(e)||Du(e)}function eE(e){return e=e.trim(),ZT(e)||oE(e)||Nu(e)}function tE(e,t){const i=new Es,n=KT(e.t);for(const s in n){const o={type:"button",model:new bf({_borderStyleValue:s,label:n[s],role:"menuitemradio",withText:!0})};"none"===s?o.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===s)):o.model.bind("isOn").to(e,"borderStyle",(e=>e===s)),i.add(o)}return i}function iE(e){const{view:t,icons:i,toolbar:n,labels:s,propertyName:o,nameToValue:r,defaultValue:a}=e;for(const e in s){const l=new ho(t.locale);l.set({label:s[e],icon:i[e],tooltip:s[e]});const c=r?r(e):e;l.bind("isOn").to(t,o,(e=>{let t=e;return""===e&&a&&(t=a),c===t})),l.on("execute",(()=>{t[o]=c})),n.items.add(l)}}const nE=[{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 sE(e){return(t,i,n)=>{const s=new qT(t.locale,{colorDefinitions:(o=e.colorConfig,o.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var o;return s.inputView.set({id:i,ariaDescribedById:n}),s.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),s.bind("hasError").to(t,"errorText",(e=>!!e)),s.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(s),s}}function oE(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}class rE extends Ds{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}const aE={left:bm.alignLeft,center:bm.alignCenter,right:bm.alignRight,justify:bm.alignJustify,top:bm.alignTop,middle:bm.alignMiddle,bottom:bm.alignBottom};class lE extends Ds{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:s,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{horizontalAlignmentToolbar:u,verticalAlignmentToolbar:m,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Ps,this.keystrokes=new Is,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=n,this.borderColorInput=s,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=u,this.verticalAlignmentToolbar=m;const{saveButtonView:f,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=f,this.cancelButtonView=p,this._focusables=new Fs,this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Eg(e,{label:this.t("Cell properties")})),this.children.add(new rE(e,{labelView:o,children:[o,i,s,n],class:"ck-table-form__border-row"})),this.children.add(new rE(e,{labelView:r,children:[r,a],class:"ck-table-form__background-row"})),this.children.add(new rE(e,{children:[new rE(e,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new rE(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new rE(e,{labelView:g,children:[g,u,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new rE(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(),i({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[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},i=sE({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,s=this.t,o=s("Style"),r=new Ho(n);r.text=s("Border");const a=KT(s),l=new $o(n,Dm);l.set({label:o,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),Rm(l.fieldView,tE(this,t.style),{role:"menu",ariaLabel:o});const c=new $o(n,Nm);c.set({label:s("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",cE),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new $o(n,i);return d.set({label:s("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",cE),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,i,n,s)=>{cE(n)||(this.borderColor="",this.borderWidth=""),cE(s)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:r,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,i=new Ho(e);i.text=t("Background");const n=sE({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new $o(e,n);return s.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",(()=>{this.backgroundColor=s.fieldView.value})),{backgroundRowLabel:i,backgroundInput:s}}_createDimensionFields(){const e=this.locale,t=this.t,i=new Ho(e);i.text=t("Dimensions");const n=new $o(e,Nm);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const s=new Ds(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const o=new $o(e,Nm);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",(()=>{this.height=o.fieldView.element.value})),{dimensionsLabel:i,widthInput:n,operatorLabel:s,heightInput:o}}_createPaddingField(){const e=this.locale,t=this.t,i=new $o(e,Nm);return i.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),i.fieldView.bind("value").to(this,"padding"),i.fieldView.on("input",(()=>{this.padding=i.fieldView.element.value})),i}_createAlignmentFields(){const e=this.locale,t=this.t,i=new Ho(e);i.text=t("Table cell text alignment");const n=new _m(e),s="rtl"===e.contentLanguageDirection;n.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),iE({view:this,icons:aE,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(s){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const o=new _m(e);return o.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),iE({view:this,icons:aE,toolbar:o,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:o,alignmentLabel:i}}_createActionButtons(){const e=this.locale,t=this.t,i=new ho(e),n=new ho(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return i.set({label:t("Save"),icon:bm.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(s,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:bm.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:n}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,i=t("Align cell text to the left"),n=t("Align cell text to the center"),s=t("Align cell text to the right"),o=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:s,center:n,left:i,justify:o}:{left:i,center:n,right:s,justify:o}}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 cE(e){return"none"!==e}const dE=jg.defaultPositions,hE=[dE.northArrowSouth,dE.northArrowSouthWest,dE.northArrowSouthEast,dE.southArrowNorth,dE.southArrowNorthWest,dE.southArrowNorthEast,dE.viewportStickyNorth];function uE(e,t){const i=e.plugins.get("ContextualBalloon"),n=e.editing.view.document.selection;let s;"cell"===t?jT(n)&&(s=gE(e)):$T(n)&&(s=mE(e)),s&&i.updatePosition(s)}function mE(e){const t=bx(e.model.document.selection),i=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(i),positions:hE}}function gE(e){const t=e.editing.mapper,i=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const i=t.editing.mapper,n=t.editing.view.domConverter,s=Array.from(e).map((e=>{const t=fE(e.start),s=i.toViewElement(t);return new Hn(n.mapViewToDom(s))}));return Hn.getBoundingRect(s)}(n.getRanges(),e),positions:hE};const s=fE(n.getFirstPosition()),o=t.toViewElement(s);return{target:i.mapViewToDom(o),positions:hE}}function fE(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function pE(e){if(!e||!L(e))return e;const{top:t,right:i,bottom:n,left:s}=e;return t==i&&i==n&&n==s?t:void 0}function bE(e,t){const i=parseFloat(e);return Number.isNaN(i)||String(i)!==String(e)?e:`${i}${t}`}function wE(e,t={}){const i={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!i.alignment&&(i.alignment="center"),t.includePaddingProperty&&!i.padding&&(i.padding=""),t.includeVerticalAlignmentProperty&&!i.verticalAlignment&&(i.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!i.horizontalAlignment&&(i.horizontalAlignment=t.isRightToLeftContent?"right":"left"),i}const vE={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class _E extends nr{static get requires(){return[vf]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:nE,backgroundColors:nE})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=wE(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(vf),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(i=>{const n=new ho(i);n.set({label:t("Cell properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const s=Object.values(vE).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const t=this.editor,i=t.config.get("table.tableCellProperties"),n=po(i.borderColors),s=fo(t.locale,n),o=po(i.backgroundColors),r=fo(t.locale,o),a=!1!==i.colorPicker,l=new lE(t.locale,{borderColors:s,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:!!a&&(i.colorPicker||{})}),c=t.t;l.render(),this.listenTo(l,"submit",(()=>{this._hideView()})),this.listenTo(l,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),l.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),e({emitter:l,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=JT(c),h=QT(c);return l.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),l.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:l.borderColorInput,commandName:"tableCellBorderColor",errorText:d,validator:YT})),l.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:l.borderWidthInput,commandName:"tableCellBorderWidth",errorText:h,validator:eE})),l.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:l.paddingInput,commandName:"tableCellPadding",errorText:h,validator:XT})),l.on("change:width",this._getValidatedPropertyChangeCallback({viewField:l.widthInput,commandName:"tableCellWidth",errorText:h,validator:XT})),l.on("change:height",this._getValidatedPropertyChangeCallback({viewField:l.heightInput,commandName:"tableCellHeight",errorText:h,validator:XT})),l.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:l.backgroundInput,commandName:"tableCellBackgroundColor",errorText:d,validator:YT})),l.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),l.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),l}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(vE).map((([t,i])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(i).value||n]})).forEach((([e,i])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,i)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:gE(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&&uE(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,i,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:i,validator:n,errorText:s}=e,o=zo((()=>{i.errorText=s}),500);return(e,s,r)=>{o.cancel(),this._isReady&&(n(r)?(this.editor.execute(t,{value:r,batch:this._undoStepBatch}),i.errorText=null):o())}}}class yE extends or{constructor(e,t,i){super(e),this.attributeName=t,this._defaultValue=i}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:i}=e,n=this.editor.model,s=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),o=this._getValueToSet(t);n.enqueueChange(i,(e=>{o?s.forEach((t=>e.setAttribute(this.attributeName,o,t))):s.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_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 kE extends yE{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=bE(e,"px"))!==this._defaultValue)return e}}class CE extends nr{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[ST]}init(){const e=this.editor,t=wE(e.config.get("table.tableCellProperties.defaultProperties"));px(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new kE(e,t.width))}}class AE extends yE{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=bE(e,"px");if(t!==this._defaultValue)return t}}class xE extends yE{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=bE(e,"px");if(t!==this._defaultValue)return t}}class TE extends yE{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class EE extends yE{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class SE extends yE{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class PE extends yE{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class IE extends yE{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class VE extends yE{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=bE(e,"px");if(t!==this._defaultValue)return t}}const RE=/^(top|middle|bottom)$/,OE=/^(left|center|right|justify)$/;class BE extends nr{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[ST,CE]}init(){const e=this.editor,t=e.model.schema,i=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=wE(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Xu),function(e,t,i){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),cx(t,"td",n,i),cx(t,"th",n,i),dx(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),dx(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),dx(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,i,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new PE(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new IE(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new VE(e,n.borderWidth)),px(t,i,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new xE(e,n.height)),e.data.addStyleProcessorRules(dm),px(t,i,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new AE(e,n.padding)),e.data.addStyleProcessorRules(Yu),px(t,i,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new TE(e,n.backgroundColor)),function(e,t,i){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),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":OE}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===i?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:OE}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===i?null:t}}})}(t,i,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new SE(e,n.horizontalAlignment)),function(e,t,i){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),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":RE}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===i?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:RE}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===i?null:t}}})}(t,i,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new EE(e,n.verticalAlignment))}}class ME extends or{constructor(e,t,i){super(e),this.attributeName=t,this._defaultValue=i}refresh(){const e=bx(this.editor.model.document.selection);this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,i=t.document.selection,{value:n,batch:s}=e,o=bx(i),r=this._getValueToSet(n);t.enqueueChange(s,(e=>{r?e.setAttribute(this.attributeName,r,o):e.removeAttribute(this.attributeName,o)}))}_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 NE extends ME{constructor(e,t){super(e,"tableBackgroundColor",t)}}class FE extends ME{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class DE extends ME{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class LE extends ME{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=pE(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=bE(e,"px");if(t!==this._defaultValue)return t}}class zE extends ME{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=bE(e,"px"))!==this._defaultValue)return e}}class HE extends ME{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=bE(e,"px"))!==this._defaultValue)return e}}class $E extends ME{constructor(e,t){super(e,"tableAlignment",t)}}const WE=/^(left|center|right)$/,jE=/^(left|none|right)$/;class UE extends nr{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[ST]}init(){const e=this.editor,t=e.model.schema,i=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=wE(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Xu),function(e,t,i){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),cx(t,"table",n,i),hx(t,{modelAttribute:n.color,styleName:"border-color"}),hx(t,{modelAttribute:n.style,styleName:"border-style"}),hx(t,{modelAttribute:n.width,styleName:"border-width"})}(t,i,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new FE(e,n.borderColor)),e.commands.add("tableBorderStyle",new DE(e,n.borderStyle)),e.commands.add("tableBorderWidth",new LE(e,n.borderWidth)),function(e,t,i){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:jE}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===i?null:t}}}).attributeToAttribute({view:{attributes:{align:WE}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===i?null:t}}})}(t,i,n.alignment),e.commands.add("tableAlignment",new $E(e,n.alignment)),qE(t,i,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new zE(e,n.width)),qE(t,i,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new HE(e,n.height)),e.data.addStyleProcessorRules(Yu),function(e,t,i){const{modelAttribute:n}=i;e.extend("table",{allowAttributes:[n]}),lx(t,{viewElement:"table",...i}),hx(t,i)}(t,i,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new NE(e,n.backgroundColor))}}function qE(e,t,i){const{modelAttribute:n}=i;e.extend("table",{allowAttributes:[n]}),lx(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...i}),dx(t,{modelElement:"table",...i})}const GE={left:bm.objectLeft,center:bm.objectCenter,right:bm.objectRight};class ZE extends Ds{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:i,borderWidthInput:n,borderColorInput:s,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:h}=this._createDimensionFields(),{alignmentToolbar:u,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new Ps,this.keystrokes=new Is,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=n,this.borderColorInput=s,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=u;const{saveButtonView:g,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=f,this._focusables=new Fs,this._focusCycler=new Qo({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Eg(e,{label:this.t("Table properties")})),this.children.add(new rE(e,{labelView:o,children:[o,i,s,n],class:"ck-table-form__border-row"})),this.children.add(new rE(e,{labelView:r,children:[r,a],class:"ck-table-form__background-row"})),this.children.add(new rE(e,{children:[new rE(e,{labelView:h,children:[h,l,c,d],class:"ck-table-form__dimensions-row"}),new rE(e,{labelView:m,children:[m,u],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new rE(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(),i({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[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},i=sE({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,s=this.t,o=s("Style"),r=new Ho(n);r.text=s("Border");const a=KT(s),l=new $o(n,Dm);l.set({label:o,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),Rm(l.fieldView,tE(this,t.style),{role:"menu",ariaLabel:o});const c=new $o(n,Nm);c.set({label:s("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",KE),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new $o(n,i);return d.set({label:s("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",KE),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,i,n,s)=>{KE(n)||(this.borderColor="",this.borderWidth=""),KE(s)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:r,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,i=new Ho(e);i.text=t("Background");const n=sE({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new $o(e,n);return s.set({label:t("Color"),class:"ck-table-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",(()=>{this.backgroundColor=s.fieldView.value})),{backgroundRowLabel:i,backgroundInput:s}}_createDimensionFields(){const e=this.locale,t=this.t,i=new Ho(e);i.text=t("Dimensions");const n=new $o(e,Nm);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const s=new Ds(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const o=new $o(e,Nm);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",(()=>{this.height=o.fieldView.element.value})),{dimensionsLabel:i,widthInput:n,operatorLabel:s,heightInput:o}}_createAlignmentFields(){const e=this.locale,t=this.t,i=new Ho(e);i.text=t("Alignment");const n=new _m(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),iE({view:this,icons:GE,toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:i,alignmentToolbar:n}}_createActionButtons(){const e=this.locale,t=this.t,i=new ho(e),n=new ho(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return i.set({label:t("Save"),icon:bm.check,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(s,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:bm.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:n}}get _alignmentLabels(){const e=this.locale,t=this.t,i=t("Align table to the left"),n=t("Center table"),s=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:s,center:n,left:i}:{left:i,center:n,right:s}}}function KE(e){return"none"!==e}const JE={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class QE extends nr{static get requires(){return[vf]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:nE,backgroundColors:nE})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=wE(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(vf),e.ui.componentFactory.add("tableProperties",(i=>{const n=new ho(i);n.set({label:t("Table properties"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const s=Object.values(JE).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const t=this.editor,i=t.config.get("table.tableProperties"),n=po(i.borderColors),s=fo(t.locale,n),o=po(i.backgroundColors),r=fo(t.locale,o),a=!1!==i.colorPicker,l=new ZE(t.locale,{borderColors:s,backgroundColors:r,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:!!a&&(i.colorPicker||{})}),c=t.t;l.render(),this.listenTo(l,"submit",(()=>{this._hideView()})),this.listenTo(l,"cancel",(()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()})),l.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),e({emitter:l,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=JT(c),h=QT(c);return l.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),l.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:l.borderColorInput,commandName:"tableBorderColor",errorText:d,validator:YT})),l.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:l.borderWidthInput,commandName:"tableBorderWidth",errorText:h,validator:eE})),l.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:l.backgroundInput,commandName:"tableBackgroundColor",errorText:d,validator:YT})),l.on("change:width",this._getValidatedPropertyChangeCallback({viewField:l.widthInput,commandName:"tableWidth",errorText:h,validator:XT})),l.on("change:height",this._getValidatedPropertyChangeCallback({viewField:l.heightInput,commandName:"tableHeight",errorText:h,validator:XT})),l.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),l}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(JE).map((([t,i])=>{const n=t,s=this._defaultTableProperties[n]||"";return[n,e.get(i).value||s]})).forEach((([e,i])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,i)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:mE(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;$T(e.editing.view.document.selection)?this._isViewVisible&&uE(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,i,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:i,validator:n,errorText:s}=e,o=zo((()=>{i.errorText=s}),500);return(e,s,r)=>{o.cancel(),this._isReady&&(n(r)?(this.editor.execute(t,{value:r,batch:this._undoStepBatch}),i.errorText=null):o())}}}function YE(e){e.document.registerPostFixer((t=>function(e,t){const i=t.document.differ.getChanges();let n=!1;for(const t of i){if("insert"!=t.type)continue;const i=t.position.parent;if(i.is("element","table")||"table"==t.name){const s="table"==t.name?t.position.nodeAfter:i,o=Array.from(s.getChildren()).filter((e=>e.is("element","caption"))),r=o.shift();if(!r)continue;for(const t of o)e.move(e.createRangeIn(t),r,"end"),e.remove(t);r.nextSibling&&(e.move(e.createRangeOn(r),s,"end"),n=!0),n=!!o.length||n}}return n}(t,e)))}function XE(e){return!!e&&e.is("element","table")}function eS(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function tS(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 iS extends or{refresh(){const e=bx(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!eS(e):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 i=this.editor.model,n=bx(i.document.selection),s=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");i.insertContent(s,n,"end"),t&&e.setSelection(s,"in")}_hideTableCaption(e){const t=this.editor.model,i=bx(t.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),s=eS(i);n._saveCaption(i,s),t.deleteContent(e.createSelection(s,"on"))}}class nS extends nr{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema,i=e.editing.view,n=e.t;t.isRegistered("caption")?t.extend("caption",{allowIn:"table"}):t.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new iS(this.editor)),e.conversion.for("upcast").elementToElement({view:tS,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>XE(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if(!XE(e.parent))return null;const s=t.createEditableElement("figcaption");return t.setCustomProperty("tableCaption",!0,s),s.placeholder=n("Enter table caption"),mr({view:i,element:s,keepOnFocus:!0}),$b(s,t)}}),YE(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Pc.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class sS extends nr{static get pluginName(){return"TableCaptionUI"}init(){const e=this.editor,t=e.editing.view,i=e.t;e.ui.componentFactory.add("toggleTableCaption",(n=>{const s=e.commands.get("toggleTableCaption"),o=new ho(n);return o.set({icon:bm.caption,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(s,"value","isEnabled"),o.bind("label").to(s,"value",(e=>i(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(o,"execute",(()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),s.value){const i=function(e){const t=bx(e);return t?eS(t):null}(e.model.document.selection),n=e.editing.mapper.toViewElement(i);if(!n)return;t.scrollToTheSelection(),t.change((e=>{e.addClass("table__caption_highlighted",n)}))}e.editing.view.focus()})),o}))}}class oS extends or{refresh(){this.isEnabled=!0}execute(e={}){const{model:t,plugins:i}=this.editor;let{table:n=t.document.selection.getSelectedElement(),columnWidths:s,tableWidth:o}=e;s&&(s=Array.isArray(s)?s:s.split(",")),t.change((e=>{o?e.setAttribute("tableWidth",o,n):e.removeAttribute("tableWidth",n);const t=i.get("TableColumnResizeEditing").getColumnGroupElement(n);if(!s&&!t)return;if(!s)return e.remove(t);const r=iT(s);if(t)Array.from(t.getChildren()).forEach(((t,i)=>e.setAttribute("columnWidth",r[i],t)));else{const t=e.createElement("tableColumnGroup");r.forEach((i=>e.appendElement("tableColumn",{columnWidth:i},t))),e.append(t,n)}}))}}function rS(e){return t=>t.on("element:colgroup",((t,i,n)=>{const s=i.modelCursor.findAncestor("table"),o=oT(s);if(!o)return;const r=rT(o),a=e.getColumns(s);let l=(c=o,d=n.writer,rT(c).reduce(((e,t)=>{const i=t.getAttribute("columnWidth"),n=t.getAttribute("colSpan");if(!n)return e.push(i),e;for(let t=0;t<n;t++)e.push(i);return d.removeAttribute("colSpan",t),e}),[]));var c,d;l=Array.from({length:a},((e,t)=>l[t]||"auto")),(l.length!=r.length||l.includes("auto"))&&sT(r,o,iT(l),n.writer)}),{priority:"low"})}class aS extends nr{static get requires(){return[ST,aT]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(Vn()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",((t,i,n)=>{const s=n?"removeClass":"addClass";e.editing.view.change((t=>{for(const i of e.editing.view.document.roots)t[s]("ck-column-resize_disabled",e.editing.view.document.getRoot(i.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 i=new oS(e);e.commands.add("resizeTableWidth",i),e.commands.add("resizeColumnWidths",i),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",i,"isEnabled",((e,t,i)=>!e&&t&&i))}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return oT(e)}getTableColumnElements(e){return rT(e)}getTableColumnsWidths(e){return function(e){return rT(e).map((e=>e.getAttribute("columnWidth")))}(e)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth"]}),this.editor.model.schema.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),this.editor.model.schema.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0})}_registerPostFixer(){const e=this.editor.model;function t(e,t,i){const n=i._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return e;const s=e.map((e=>Number(e.replace("%","")))),o=function(e,t){const i=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))i.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&i.add(e)}return i}(i.editor.model.document.differ,t);for(const e of o){const o=n-s.length;if(0===o)continue;const a=o>0,l=i._tableUtilsPlugin.getCellLocation(e).column;if(a){const e=Jx(t,i.editor),n=(r=e,Array(o).fill(r));s.splice(l,0,...n)}else{const e=s.splice(l,Math.abs(o));s[l]+=tT(e)}}var r;return s.map((e=>e+"%"))}e.document.registerPostFixer((i=>{let n=!1;for(const s of function(e){const t=new Set;for(const i of e.document.differ.getChanges()){let n=null;switch(i.type){case"insert":n=["table","tableRow","tableCell"].includes(i.name)?i.position:null;break;case"remove":n=["tableRow","tableCell"].includes(i.name)?i.position:null;break;case"attribute":i.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(i.range.start.nodeAfter.name)?i.range.start:null)}if(!n)continue;const s=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAncestor("table");for(const i of e.createRangeOn(s).getItems())i.is("element","table")&&oT(i)&&t.add(i)}return t}(e)){const e=this.getColumnGroupElement(s),o=this.getTableColumnElements(e),r=this.getTableColumnsWidths(e);let a=iT(r);a=t(a,s,this),wh(r,a)||(sT(o,e,a,i),n=!0)}return n}))}_registerConverters(){const e=this.editor.conversion;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>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((e=>e.on("insert:table",((e,t,i)=>{const n=i.writer,s=t.item,o=i.mapper.toViewElement(s),r=o.is("element","table")?o:Array.from(o.getChildren()).find((e=>e.is("element","table")));oT(s)?n.addClass("ck-table-resized",r):n.removeClass("ck-table-resized",r)}),{priority:"low"}))),e.for("upcast").add(rS(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(LT),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(Mn.window.document,"mousemove",Qg(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(Mn.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const i=t.target;if(!i.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;const n=this.editor,s=n.editing.mapper.toModelElement(i.findAncestor("figure"));if(!n.model.canEditAt(s))return;t.preventDefault(),e.stop();const o=function(e,t,i){const n=Array(t.getColumns(e)),s=new yx(e);for(const e of s){const t=i.editing.mapper.toViewElement(e.cell),s=nT(i.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||s<n[e.column])&&(n[e.column]=eT(s))}return n}(s,this._tableUtilsPlugin,n),r=i.findAncestor("table"),a=n.editing.view;Array.from(r.getChildren()).find((e=>e.is("element","colgroup")))||a.change((e=>{!function(e,t,i){const n=e.createContainerElement("colgroup");for(let i=0;i<t.length;i++){const s=e.createEmptyElement("col"),o=`${eT(t[i]/tT(t)*100)}%`;e.setStyle("width",o,s),e.insert(e.createPositionAt(n,"end"),s)}e.insert(e.createPositionAt(i,0),n)}(e,o,r)})),this._isResizingActive=!0,this._resizingData=this._getResizingData(t,o),a.change((e=>function(e,t,i){const n=i.widths.viewFigureWidth/i.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",i.elements.viewResizer),e.setStyle("width",`${eT(100*n)}%`,t.findAncestor("figure"))}(e,r,this._resizingData)))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:i,flags:{isRightEdge:n,isTableCentered:s,isLtrContent:o},elements:{viewFigure:r,viewLeftColumn:a,viewRightColumn:l},widths:{viewFigureParentWidth:c,tableWidth:d,leftColumnWidth:h,rightColumnWidth:u}}=this._resizingData,m=40-h,g=n?c-d:u-40,f=(o?1:-1)*(n&&s?2:1),p=(b=(t.clientX-i)*f,w=Math.min(m,0),v=Math.max(g,0),eT(b<=w?w:b>=v?v:b));var b,w,v;0!==p&&this.editor.editing.view.change((e=>{const t=eT(100*(h+p)/d);if(e.setStyle("width",`${t}%`,a),n){const t=eT(100*(d+p)/c);e.setStyle("width",`${t}%`,r)}else{const t=eT(100*(u-p)/d);e.setStyle("width",`${t}%`,l)}}))}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:i,viewColgroup:n}=this._resizingData.elements,s=this.editor,o=s.editing.view,r=this.getColumnGroupElement(t),a=Array.from(n.getChildren()).filter((e=>e.is("view:element"))),l=r?this.getTableColumnsWidths(r):null,c=a.map((e=>e.getStyle("width"))),d=!wh(l,c),h=t.getAttribute("tableWidth"),u=i.getStyle("width"),m=h!==u;(d||m)&&(this._isResizingAllowed?s.execute("resizeTableWidth",{table:t,tableWidth:`${eT(u)}%`,columnWidths:c}):o.change((e=>{if(l)for(const t of a)e.setStyle("width",l.shift(),t);else e.remove(n);m&&(h?e.setStyle("width",h,i):e.removeStyle("width",i)),l||h||e.removeClass("ck-table-resized",[...i.getChildren()].find((e=>"table"===e.name)))}))),o.change((t=>{t.removeClass("ck-table-column-resizer__active",e)})),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const i=this.editor,n=e.domEvent.clientX,s=e.target,o=s.findAncestor("td")||s.findAncestor("th"),r=i.editing.mapper.toModelElement(o),a=r.findAncestor("table"),l=function(e,t){const i=t.getCellLocation(e).column;return{leftEdge:i,rightEdge:i+(e.getAttribute("colspan")||1)-1}}(r,this._tableUtilsPlugin).rightEdge,c=l===this._tableUtilsPlugin.getColumns(a)-1,d=!a.hasAttribute("tableAlignment"),h="rtl"!==i.locale.contentLanguageDirection,u=o.findAncestor("table"),m=u.findAncestor("figure"),g=[...u.getChildren()].find((e=>e.is("element","colgroup"))),f=g.getChild(l),p=c?void 0:g.getChild(l+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:d,isLtrContent:h},elements:{viewResizer:s,modelTable:a,viewFigure:m,viewColgroup:g,viewLeftColumn:f,viewRightColumn:p},widths:{viewFigureParentWidth:Xx(i.editing.view.domConverter.mapViewToDom(m.parent)),viewFigureWidth:Xx(i.editing.view.domConverter.mapViewToDom(m)),tableWidth:Qx(a,i),leftColumnWidth:t[l],rightColumnWidth:c?void 0:t[l+1]}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add((e=>{e.on("insert:tableCell",((e,t,i)=>{const n=t.item,s=i.mapper.toViewElement(n),o=i.writer;o.insert(o.createPositionAt(s,"end"),o.createUIElement("div",{class:"ck-table-column-resizer"}))}),{priority:"lowest"})}))}}class lS extends nr{static get pluginName(){return"UploadVideoUI"}init(){const e=this.editor;e.ui.componentFactory.add("uploadVideo",(t=>{const i=new ik(t),n=e.commands.get("insertVideo");return i.set({acceptedType:"video/mp4",allowMultipleFiles:!1}),i.buttonView.set({icon:'<svg viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-14.24 1h13.008v12H4.467l.029-12Zm-2.208 1h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003l-.029 1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h.974v1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Z"/><path d="M8.374 6.648a.399.399 0 0 1 .395-.4.402.402 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35V6.648Z"/></svg>',label:e.t("Insert video"),tooltip:!0}),i.buttonView.bind("isEnabled").to(n),i.on("done",((t,i)=>{window.AdminUploadAdapter?(new window.AdminUploadAdapter).upload(i,(function(t){e.execute("insertVideo",t)})):e.execute("insertVideo",URL.createObjectURL(i[0]))})),i}))}}class cS extends or{refresh(){const e=this.editor.model,t=e.document.selection,i=dS(t);this.value=i?i.getAttribute("url"):null,this.isEnabled=function(e){const t=e.getSelectedElement();return!!t&&"video"===t.name}(t)||function(e,t){const i=Wb(e,t);let n=i.start.parent;n.isEmpty&&!t.schema.isLimit(n)&&(n=n.parent);return t.schema.checkChild(n,"videoBlock")}(t,e)}execute(e){const t=this.editor.model,i=dS(t.document.selection);i?t.change((t=>{t.setAttribute("url",e,i)})):this.insertVideo(e)}insertVideo(e){const t=this.editor.model;t.change((i=>{t.insertContent(i.createElement("videoBlock",{src:e,controls:"controls",style:"display:block;width:100%;height:100%",preload:"auto"}),t.document.selection)}))}}function dS(e){const t=e.getSelectedElement();return t&&t.is("element","video")?t:null}class hS extends nr{static get requires(){return[ek]}static get pluginName(){return"UploadVideoEditing"}init(){const e=this.editor;e.commands.add("insertVideo",new cS(e)),e.model.schema.register("videoBlock",{inheritAllFrom:"$blockObject",allowAttributes:["src","style","width","height","controls"]}),e.conversion.for("dataDowncast").elementToStructure({model:"videoBlock",view:(e,{writer:t})=>this._createBlockVideoViewElement(t)}),e.conversion.for("editingDowncast").elementToStructure({model:"videoBlock",view:(e,{writer:t})=>Db(this._createBlockVideoViewElement(t),t)}),e.conversion.for("downcast").add(this._downcastVideoAttribute("videoBlock","src")).add(this._downcastVideoAttribute("videoBlock","style")).add(this._downcastVideoAttribute("videoBlock","controls")).add(this._downcastVideoAttribute("videoBlock"))}_createBlockVideoViewElement(e){return e.createContainerElement("figure",{class:"video"},[e.createEmptyElement("video"),e.createSlot()])}_downcastVideoAttribute(e,t){const i=this.editor;return n=>{n.on(`attribute:${t}:${e}`,((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;let s=n.mapper.toViewElement(t.item);for(const{item:e}of i.editing.view.createRangeIn(s))if(e&&e.is("element","video")){s=e;break}n.writer.setAttribute(t.attributeKey,t.attributeNewValue||"",s)}))}}}class uS{constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{window.AdminUploadAdapter?this.loader.file.then((t=>(new window.AdminUploadAdapter).upload([t],(t=>e({default:t}))))):(this.reader=new window.FileReader,this.reader.addEventListener("load",(()=>e({default:this.reader.result}))),this.reader.addEventListener("error",(e=>t(e))),this.reader.addEventListener("abort",(()=>t())),this.loader.file.then((e=>this.reader.readAsDataURL(e))))}))}abort(){this.reader.abort()}}class mS extends qf{}mS.builtinPlugins=[class extends nr{static get requires(){return[ep,ip]}static get pluginName(){return"Alignment"}},class extends nr{static get requires(){return[pp]}static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&Fp(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&Fp(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&Fp(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&Fp(this.editor,this,/^\[\s?x\s?\]\s$/,(()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")}))}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const e=zp(this.editor,"bold");Dp(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),Dp(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(e.get("italic")){const e=zp(this.editor,"italic");Dp(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),Dp(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(e.get("code")){const e=zp(this.editor,"code");Dp(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(e.get("strikethrough")){const e=zp(this.editor,"strikethrough");Dp(this.editor,this,/(~~)([^~]+)(~~)$/g,e)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter((e=>e.match(/^heading[1-6]$/))).forEach((t=>{const i=t[7],n=new RegExp(`^(#{${i}})\\s$`);Fp(this.editor,this,n,(()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&Fp(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&Fp(e,this,/^```$/,(()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&Fp(this.editor,this,/^---$/,"horizontalLine")}},class extends nr{static get requires(){return[xw,Ay,Lw,pp]}static get pluginName(){return"AutoImage"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",(()=>{const e=t.selection.getFirstRange(),i=Fh.fromPosition(e.start);i.stickiness="toPrevious";const n=Fh.fromPosition(e.end);n.stickiness="toNext",t.once("change:data",(()=>{this._embedImageBetweenPositions(i,n),i.detach(),n.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(Mn.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,n=new Yc(e,t),s=n.getWalker({ignoreElementEnd:!0}),o=Object.fromEntries(i.model.document.selection.getAttributes()),r=this.editor.plugins.get("ImageUtils");let a="";for(const e of s)e.item.is("$textProxy")&&(a+=e.item.data);a=a.trim(),a.match(Ty)?(this._positionToInsert=Fh.fromPosition(e),this._timeoutId=setTimeout((()=>{if(!i.commands.get("insertImage").isEnabled)return void n.detach();i.model.change((e=>{let t;this._timeoutId=null,e.remove(n),n.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),r.insertImage({...o,src:a},t),this._positionToInsert.detach(),this._positionToInsert=null}));i.plugins.get("Delete").requestUndoOnBackspace()}),100)):n.detach()}},xC,class extends nr{static get requires(){return[kb,Cb]}static get pluginName(){return"BlockQuote"}},class extends nr{static get requires(){return[Wp,Up]}static get pluginName(){return"Bold"}},class extends nr{static get requires(){return[Gp,Kp]}static get pluginName(){return"Code"}},class extends nr{static get requires(){return[xw,mb,Vw,bb,bp,Lw]}static get pluginName(){return"Essentials"}},class extends nr{static get requires(){return[uv,mv]}static get pluginName(){return"FontBackgroundColor"}},class extends nr{static get requires(){return[lv,dv]}static get pluginName(){return"FontColor"}},class extends nr{static get requires(){return[Yw,Xw]}static get pluginName(){return"FontFamily"}},class extends nr{static get requires(){return[ov,rv]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return tv(e)}},class extends nr{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[Y_,sy,oy,ry,ly,cy,dy,hy,uy,my,py]}init(){const e=this.editor,t=e.plugins.get(Y_);t.loadAllowedEmptyElementsConfig(e.config.get("htmlSupport.allowEmpty")||[]),t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(e){const t=this.editor.plugins.get("DataSchema"),i=Array.from(t.getDefinitionsForView(e,!1)),n=i.find((e=>e.isInline&&!i[0].isObject));return n?n.model:V_(e)}addModelHtmlClass(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of by(n,i,s))I_(e,o,s,"classes",(e=>{for(const i of ks(t))e.add(i)}))}))}removeModelHtmlClass(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of by(n,i,s))I_(e,o,s,"classes",(e=>{for(const i of ks(t))e.delete(i)}))}))}setModelHtmlAttributes(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of by(n,i,s))I_(e,o,s,"attributes",(e=>{for(const[i,n]of Object.entries(t))e.set(i,n)}))}))}removeModelHtmlAttributes(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of by(n,i,s))I_(e,o,s,"attributes",(e=>{for(const i of ks(t))e.delete(i)}))}))}setModelHtmlStyles(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of by(n,i,s))I_(e,o,s,"styles",(e=>{for(const[i,n]of Object.entries(t))e.set(i,n)}))}))}removeModelHtmlStyles(e,t,i){const n=this.editor.model,s=this.getGhsAttributeNameForElement(e);n.change((e=>{for(const o of by(n,i,s))I_(e,o,s,"styles",(e=>{for(const i of ks(t))e.delete(i)}))}))}},class extends nr{static get requires(){return[kv,Cv]}static get pluginName(){return"Heading"}},class extends nr{static get requires(){return[xv,Tv,tw]}static get pluginName(){return"HorizontalLine"}},class extends nr{static get requires(){return[qy,Zy]}static get pluginName(){return"Image"}},class extends nr{static get requires(){return[Qy,Yy]}static get pluginName(){return"ImageCaption"}},class extends nr{static get pluginName(){return"ImageInsert"}static get requires(){return[bk,_k,Uy]}},class extends nr{static get requires(){return[kk,Ek,Ak]}static get pluginName(){return"ImageResize"}},class extends nr{static get requires(){return[$k,Wk]}static get pluginName(){return"ImageStyle"}},class extends nr{static get requires(){return[nw,Ay]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(nw),n=e.plugins.get("ImageUtils");var s;i.register("image",{ariaLabel:t("Image toolbar"),items:(s=e.config.get("image.toolbar")||[],s.map((e=>L(e)?e.name:e))),getRelatedElement:e=>n.getClosestSelectedImageWidget(e)})}},bk,class extends nr{static get pluginName(){return"Indent"}static get requires(){return[Gk,Zk]}},class extends nr{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const e=this.editor,t=e.config.get("indentBlock");t.classes&&t.classes.length?(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new Kk(e,new Qk({direction:"forward",classes:t.classes}))),e.commands.add("outdentBlock",new Kk(e,new Qk({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(cm),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new Kk(e,new Jk({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new Kk(e,new Jk({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,i=e.commands.get("indent"),n=e.commands.get("outdent"),s=e.config.get("heading.options");(s&&s.map((e=>e.model))||Yk).forEach((e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})})),t.setAttributeProperties("blockIndent",{isFormatting:!0}),i.registerChildCommand(e.commands.get("indentBlock")),n.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,t="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[t]:/[\s\S]+/}},model:{key:"blockIndent",value:e=>{if(!e.is("element","li"))return e.getStyle(t)}}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:e=>({key:"style",value:{[t]:e}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const i of e)t.model.values.push(i),t.view[i]={key:"class",value:[i]};this.editor.conversion.attributeToAttribute(t)}},class extends nr{static get requires(){return[Qp,Xp]}static get pluginName(){return"Italic"}},class extends nr{static get requires(){return[bC,kC,xC]}static get pluginName(){return"Link"}},class extends nr{static get requires(){return[EC,IC]}static get pluginName(){return"LinkImage"}},yA,zA,class extends nr{static get requires(){return[lS,hS,tw]}static get pluginName(){return"UploadVideo"}},class extends nr{static get requires(){return[ek]}static get pluginName(){return"ThinkUploadImageAdapter"}init(){this.editor.plugins.get(ek).createUploadAdapter=e=>new uS(e)}},wv,class extends nr{static get pluginName(){return"PasteFromOffice"}static get requires(){return[Pb]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),i=e.editing.view.document,n=[];n.push(new KA(i)),n.push(new XA(i)),n.push(new tx(i)),t.on("inputTransformation",((t,s)=>{if(s._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const o=s.dataTransfer.getData("text/html"),r=n.find((e=>e.isActive(o)));r&&(s._parsedData||(s._parsedData=nx(o,i.stylesProcessor)),r.execute(s),s._isTransformedWithPasteFromOffice=!0)}),{priority:"high"})}},class extends nr{static get requires(){return[ax,ox]}static get pluginName(){return"RemoveFormat"}},class extends nr{static get requires(){return[tb,nb]}static get pluginName(){return"Strikethrough"}},class extends nr{static get requires(){return[ST,VT,OT,zT,DT,BT,tw]}static get pluginName(){return"Table"}},class extends nr{static get pluginName(){return"TableCaption"}static get requires(){return[nS,sS]}},class extends nr{static get pluginName(){return"TableCellProperties"}static get requires(){return[BE,_E]}},class extends nr{static get requires(){return[aS,CE]}static get pluginName(){return"TableColumnResize"}},class extends nr{static get pluginName(){return"TableProperties"}static get requires(){return[UE,QE]}},class extends nr{static get requires(){return[nw]}static get pluginName(){return"TableToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(nw),n=e.config.get("table.contentToolbar"),s=e.config.get("table.tableToolbar");n&&i.register("tableContent",{ariaLabel:t("Table toolbar"),items:n,getRelatedElement:jT}),s&&i.register("table",{ariaLabel:t("Table toolbar"),items:s,getRelatedElement:WT})}},class extends nr{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:Pp}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,i=e.plugins.get("Delete"),n=function(e){const t=e.extra||[],i=e.remove||[],n=e=>!i.includes(e);return function(e){const t=new Set;for(const i of e)if("string"==typeof i&&Sp[i])for(const e of Sp[i])t.add(e);else t.add(i);return Array.from(t)}(e.include.concat(t).filter(n)).filter(n).map((e=>"string"==typeof e&&Ep[e]?Ep[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:Ip(e.from),to:Vp(e.to)})))}(e.config.get("typing.transformations")),s=new vp(e.model,(e=>{for(const t of n){if(t.from.test(e))return{normalizedTransformation:t}}}));s.on("matched:data",((e,n)=>{if(!n.batch.isTyping)return;const{from:s,to:o}=n.normalizedTransformation,r=s.exec(n.text),a=o(r.slice(1)),l=n.range;let c=r.index;t.enqueueChange((e=>{for(let i=1;i<r.length;i++){const n=r[i],s=a[i-1];if(null==s){c+=n.length;continue}const o=l.start.getShiftedBy(c),d=t.createRange(o,o.getShiftedBy(n.length)),h=Rp(o);t.insertContent(e.createText(s,h),d),c+=s.length}t.enqueueChange((()=>{i.requestUndoOnBackspace()}))}))})),s.bind("isEnabled").to(this)}},class extends nr{static get requires(){return[ob,ab]}static get pluginName(){return"Underline"}}],mS.defaultConfig={indentBlock:{offset:1,unit:"em"},fontSize:{options:[9,11,12,"default",16,18,20,22,24,26,28,30,32,34,36,38,40]},toolbar:{items:["heading","|","fontFamily","fontSize","fontColor","fontBackgroundColor","bold","italic","strikethrough","underline","removeFormat","link","|","alignment","outdent","indent","numberedList","bulletedList","|","horizontalLine","code","blockQuote","insertTable","imageInsert","uploadVideo"]},language:"zh-cn",image:{toolbar:["imageTextAlternative","imageStyle:inline","imageStyle:block","imageStyle:side","toggleImageCaption","linkImage"]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableCellProperties","tableProperties"]},fontFamily:{options:["default","微软雅黑, Microsoft YaHei","新宋体, NSimSun","宋体, SimSun","仿宋, FangSong","楷体, KaiTi","黑体, SimHei","Arial, Helvetica, sans-serif","Tahoma, Geneva, sans-serif","Verdana, Geneva, sans-serif","Courier New, Courier, monospace"]},htmlSupport:{allow:[{name:/.*/,styles:!0,classes:!0,attributes:!0}],disallow:[{name:"script"}]}};const gS=mS;window.createEditor=function(e,t){"number"==typeof(t=t||{}).height&&(t.height+="px");let i=$(e);i.parents(".layui-card-html").removeClass("layui-card-html").addClass("layui-card-table");let n=i.parents(".layui-card-table").parent(".layui-card-body").offset();n&&n.top>0&&(t.ui=Object.assign({},t.ui||{},{viewportOffset:n})),document.querySelector(".ck-body-wrapper")||i.after('<div class="ck-body-wrapper"></div>'),mS.create(document.querySelector(e),t).then((function(e){let i=$(e.sourceElement).data("editor",e);i.triggerHandler("editor.init",e),e.model.document.on("change:data",(function(){i.val(e.getData())})),e.editing.view.change((i=>{let n=e.editing.view.document.getRoot();i.setStyle("min-height",t.height||"400px",n),i.setStyle("padding-bottom","2px",n)}))})).catch((function(e){console.error("Oops, something went wrong!"),console.warn("Build id: yw6zhbblcdbg-b5dhd7ee5sv3"),console.error(e)}))}})(),o=o.default})()));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ar.js b/public/static/plugs/ckeditor5/translations/ar.js
index b24c71d4e..c0bdbc227 100644
--- a/public/static/plugs/ckeditor5/translations/ar.js
+++ b/public/static/plugs/ckeditor5/translations/ar.js
@@ -1 +1 @@
-!function(e){const t=e.ar=e.ar||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 من %1",Accept:"قبول","Align cell text to the bottom":"قم بمحاذاة نص الخلية للاسفل","Align cell text to the center":"قم بمحاذاة نص الخلية إلى المركز","Align cell text to the left":"قم بمحاذاة نص الخلية إلى اليسار","Align cell text to the middle":"قم بمحاذاة نص الخلية إلى المنتصف","Align cell text to the right":"قم بمحاذاة نص الخلية إلى اليمين","Align cell text to the top":"قم بمحاذاة نص الخلية إلى الأعلى","Align center":"محاذاة في المنتصف","Align left":"محاذاة لليسار","Align right":"محاذاة لليمين","Align table to the left":"قم بمحاذاة الجدول إلى اليسار","Align table to the right":"قم بمحاذاة الجدول إلى اليمين",Alignment:"المحاذاة",Aquamarine:"أخضر زبرجد",Background:"الخلفية",Big:"كبير",Black:"أسود","Block quote":"اقتباس",Blue:"أزرق",Bold:"عريض",Border:"الحدود","Break text":"اعتراض النص","Bulleted List":"قائمة نقطية","Bulleted list styles toolbar":"شريط أدوات أنماط قوائم التعداد النقطي",Cancel:"إلغاء","Caption for image: %0":"التسمية التوضيحية للصورة: %0","Caption for the image":"التسمية التوضيحية للصورة","Cell properties":"خصائص الخلية","Center table":"قم بمحاذاة الجدول إلى المنتصف","Centered image":"صورة بالوسط","Change image text alternative":"غير النص البديل للصورة","Choose heading":"اختر عنوان",Circle:"دائرة",Clear:"مسح","Click to edit block":"انقر لتحرير الوحدة التجميعية",Code:"شفرة برمجية",Color:"اللون","Color picker":"أداة انتقاء الألوان",Column:"عمود",Dashed:"متقطع",Decimal:"رقم عشري","Decimal with leading zero":"رقم عشري مع البدء بصفر ","Decrease indent":"تقليص المسافة البادئة",Default:"افتراضي","Delete column":"حذف العمود","Delete row":"حذف الصف","Dim grey":"رمادي خافت",Dimensions:"الابعاد",Disc:"قرص","Document colors":"ألوان المستند",Dotted:"منقط",Double:"مزدوج",Downloadable:"يمكن تنزيله","Drag to move":"اسحب للنقل","Dropdown toolbar":"شريط أدوات القائمة المنسدلة","Edit block":"كتلة التحرير","Edit link":"تحرير الرابط","Editor block content toolbar":"شريط المحرر لأدوات كتلة المحتوى","Editor contextual toolbar":"شريط المحرر للأدوات السياقية","Editor editing area: %0":"منطقة تحرير المحرر: %0","Editor toolbar":"شريط أدوات المحرر","Enter image caption":"ادخل عنوان الصورة","Enter table caption":"أدخل التسمية التوضيحية للجدول","Font Background Color":"لون خلفية الخط","Font Color":"لون الخط","Font Family":"نوع الخط","Font Size":"حجم الخط","Full size image":"صورة بحجم كامل",Green:"أخضر",Grey:"رمادي",Groove:"إطار محفور","Header column":"عمود عنوان","Header row":"صف عنوان",Heading:"عنوان","Heading 1":"عنوان 1","Heading 2":"عنوان 2","Heading 3":"عنوان 3","Heading 4":"عنوان 4","Heading 5":"عنوان 5","Heading 6":"عنوان 6",Height:"الارتفاع",HEX:"لون سداسي عشري","Horizontal line":"خط أفقي","Horizontal text alignment toolbar":"شريط أدوات محاذاة النص الأفقي","HTML object":"عنصر HTML",Huge:"ضخم","Image resize list":"قائمة تغيير حجم الصورة","Image toolbar":"شريط أدوات الصور","image widget":"عنصر الصورة","In line":"سطري مع النص","Increase indent":"زيادة المسافة البادئة",Insert:"إدراج","Insert column left":"أدخل العمود إلى اليسار","Insert column right":"أدخل العمود إلى اليمين","Insert image":"ادراج صورة","Insert image via URL":"إدراج صورة عبر عنوان URL","Insert paragraph after block":"إدراج فقرة بعد الكتلة","Insert paragraph before block":"إدراج فقرة قبل الكتلة","Insert row above":"ادراج صف قبل","Insert row below":"ادراج صف بعد","Insert table":"إدراج جدول",Inset:"منخفض",Italic:"مائل",Justify:"ضبط","Justify cell text":"ضبط نص الخلية","Left aligned image":"صورة بمحاذاة لليسار","Light blue":"أزرق فاتح","Light green":"أخضر فاتح","Light grey":"رمادي فاتح",Link:"رابط","Link image":"ربط الصورة","Link URL":"رابط عنوان","List properties":"خصائص القائمة","Lower-latin":"حرف لاتيني صغير","Lower–roman":"رقم روماني صغير","Merge cell down":"دمج الخلايا للأسفل","Merge cell left":"دمج الخلايا لليسار","Merge cell right":"دمج الخلايا لليمين","Merge cell up":"دمج الخلايا للأعلى","Merge cells":"دمج الخلايا",Next:"التالي","No results found":"لم يتم العثور على نتائج","No searchable items":"لا توجد عناصر قابلة للبحث متاحة",None:"لا شيء","Numbered List":"قائمة رقمية","Numbered list styles toolbar":"شريط أدوات أنماط القوائم المرقمة","Open in a new tab":"فتح في تبويب جديد","Open link in new tab":"فتح الرابط في تبويب جديد",Orange:"برتقالي",Original:"الحجم الأصلي",Outset:"بارز",Padding:"الحاشية",Paragraph:"فقرة","Press Enter to type after or press Shift + Enter to type before the widget":"اضغط على Enter للكتابة بعد ذلك أو اضغط على Shift + Enter للكتابة قبل الأداة",Previous:"السابق",Purple:"أرجواني",Red:"أحمر",Redo:"إعادة","Remove color":"إزالة اللون","Remove Format":"إزالة التنسيق","Replace from computer":"استبدال من الحاسوب","Replace image":"استبدال الصورة","Replace image from computer":"استبدال الصورة من الحاسوب","Resize image":"تغيير حجم الصورة","Resize image to %0":"تغيير حجم الصورة إلى %0","Resize image to the original size":"تغيير حجم الصورة إلى الحجم الأصلي","Restore default":"استعادة الافتراضي","Reversed order":"عكس اتجاه الترتيب","Rich Text Editor":"معالج نصوص",Ridge:"إطار ناتئ","Right aligned image":"صورة بمحاذاة لليمين",Row:"صف",Save:"حفظ","Select all":"تحديد الكل","Select column":"حدد العمود","Select row":"حدد صفًا","Show more items":"عرض المزيد من العناصر","Side image":"صورة جانبية",Small:"صغير",Solid:"صلب","Split cell horizontally":"فصل الخلايا بشكل افقي","Split cell vertically":"فصل الخلايا بشكل عمودي",Square:"مربع","Start at":"البدء من","Start index must be greater than 0.":"يجب أن تكون قيمة البداية في الفهرس أكبر من 0.",Strikethrough:"يتوسطه خط",Style:"أسلوب",Subscript:"حرف منخفض",Superscript:"حرف مرتفع","Table alignment toolbar":"شريط أدوات محاذاة الجدول","Table cell text alignment":"محاذاة نص خلية الجدول","Table properties":"خصائص الجدول","Table toolbar":"شريط أدوات الجدول","Text alignment":"محاذاة النص","Text alignment toolbar":"شريط أدوات محاذاة النص","Text alternative":"النص البديل",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'هذا اللون غير صالح. جرِّب "#FF0000" أو "rgb(255,0,0)" أو "أحمر".','The value is invalid. Try "10px" or "2em" or simply "2".':'هذه القيمة غير صالحة. جرِّب "10px" أو "2em" أو "2" وحسب.',"This link has no URL":"لا يحتوي هذا الرابط على عنوان",Tiny:"ضئيل","To-do List":"قائمة المهام","Toggle caption off":"إخفاء التسمية التوضيحية","Toggle caption on":"عرض التسمية التوضيحية","Toggle the circle list style":"تبديل نمط قائمة الدوائر","Toggle the decimal list style":"تبديل نمط قائمة الأرقام العشرية","Toggle the decimal with leading zero list style":"تبديل الأرقام العشرية بنمط قائمة الأصفار البادئة","Toggle the disc list style":"تبديل نمط قائمة الأقراص","Toggle the lower–latin list style":"تبديل نمط قائمة الأحرف اللاتينية الصغيرة","Toggle the lower–roman list style":"تبديل نمط قائمة الأرقام الرومانية الصغيرة","Toggle the square list style":"تبديل نمط قائمة المربعات","Toggle the upper–latin list style":"تبديل نمط قائمة الأحرف اللاتينية الكبيرة","Toggle the upper–roman list style":"تبديل نمط قائمة الأرقام الرومانية الكبيرة",Turquoise:"فيروزي","Type or paste your content here.":"أكتب المحتوى أو ألصقه هنا.","Type your title":"أدخل العنوان",Underline:"تحته خط",Undo:"تراجع",Unlink:"إلغاء الرابط",Update:"تحديث","Update image URL":"عنوان URL الخاص بتحديث الصورة","Upload failed":"فشل الرفع","Upload from computer":"رفع الملف من الحاسوب","Upload image from computer":"تحميل الصورة من الحاسوب","Upload in progress":"جاري الرفع","Upper-latin":"حرف لاتيني كبير","Upper-roman":"رقم روماني كبير","Vertical text alignment toolbar":"شريط أدوات محاذاة النص العمودي",White:"أبيض","Widget toolbar":"شريط أدوات الواجهة",Width:"العرض","Wrap text":"التفاف النص",Yellow:"أصفر"}),t.getPluralForm=function(e){return 0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ar=e.ar||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 من %1",Accept:"قبول","Align cell text to the bottom":"قم بمحاذاة نص الخلية للاسفل","Align cell text to the center":"قم بمحاذاة نص الخلية إلى المركز","Align cell text to the left":"قم بمحاذاة نص الخلية إلى اليسار","Align cell text to the middle":"قم بمحاذاة نص الخلية إلى المنتصف","Align cell text to the right":"قم بمحاذاة نص الخلية إلى اليمين","Align cell text to the top":"قم بمحاذاة نص الخلية إلى الأعلى","Align center":"محاذاة في المنتصف","Align left":"محاذاة لليسار","Align right":"محاذاة لليمين","Align table to the left":"قم بمحاذاة الجدول إلى اليسار","Align table to the right":"قم بمحاذاة الجدول إلى اليمين",Alignment:"المحاذاة",Aquamarine:"أخضر زبرجد",Background:"الخلفية",Big:"كبير",Black:"أسود","Block quote":"اقتباس",Blue:"أزرق",Bold:"عريض",Border:"الحدود","Break text":"اعتراض النص","Bulleted List":"قائمة نقطية","Bulleted list styles toolbar":"شريط أدوات أنماط قوائم التعداد النقطي",Cancel:"إلغاء","Caption for image: %0":"التسمية التوضيحية للصورة: %0","Caption for the image":"التسمية التوضيحية للصورة","Cell properties":"خصائص الخلية","Center table":"قم بمحاذاة الجدول إلى المنتصف","Centered image":"صورة بالوسط","Change image text alternative":"غير النص البديل للصورة","Choose heading":"اختر عنوان",Circle:"دائرة",Clear:"مسح","Click to edit block":"انقر لتحرير الوحدة التجميعية",Close:"إغلاق",Code:"شفرة برمجية",Color:"اللون","Color picker":"أداة انتقاء الألوان",Column:"عمود",Dashed:"متقطع",Decimal:"رقم عشري","Decimal with leading zero":"رقم عشري مع البدء بصفر ","Decrease indent":"تقليص المسافة البادئة",Default:"افتراضي","Delete column":"حذف العمود","Delete row":"حذف الصف","Dim grey":"رمادي خافت",Dimensions:"الابعاد",Disc:"قرص","Document colors":"ألوان المستند",Dotted:"منقط",Double:"مزدوج",Downloadable:"يمكن تنزيله","Drag to move":"اسحب للنقل","Dropdown toolbar":"شريط أدوات القائمة المنسدلة","Edit block":"كتلة التحرير","Edit link":"تحرير الرابط","Editor block content toolbar":"شريط المحرر لأدوات كتلة المحتوى","Editor contextual toolbar":"شريط المحرر للأدوات السياقية","Editor dialog":"حوار المحرر","Editor editing area: %0":"منطقة تحرير المحرر: %0","Editor toolbar":"شريط أدوات المحرر","Enter image caption":"ادخل عنوان الصورة","Enter table caption":"أدخل التسمية التوضيحية للجدول","Font Background Color":"لون خلفية الخط","Font Color":"لون الخط","Font Family":"نوع الخط","Font Size":"حجم الخط","Full size image":"صورة بحجم كامل",Green:"أخضر",Grey:"رمادي",Groove:"إطار محفور","Header column":"عمود عنوان","Header row":"صف عنوان",Heading:"عنوان","Heading 1":"عنوان 1","Heading 2":"عنوان 2","Heading 3":"عنوان 3","Heading 4":"عنوان 4","Heading 5":"عنوان 5","Heading 6":"عنوان 6",Height:"الارتفاع",HEX:"لون سداسي عشري","Horizontal line":"خط أفقي","Horizontal text alignment toolbar":"شريط أدوات محاذاة النص الأفقي","HTML object":"عنصر HTML",Huge:"ضخم","Image resize list":"قائمة تغيير حجم الصورة","Image toolbar":"شريط أدوات الصور","image widget":"عنصر الصورة","In line":"سطري مع النص","Increase indent":"زيادة المسافة البادئة",Insert:"إدراج","Insert column left":"أدخل العمود إلى اليسار","Insert column right":"أدخل العمود إلى اليمين","Insert image":"ادراج صورة","Insert image via URL":"إدراج صورة عبر عنوان URL","Insert paragraph after block":"إدراج فقرة بعد الكتلة","Insert paragraph before block":"إدراج فقرة قبل الكتلة","Insert row above":"ادراج صف قبل","Insert row below":"ادراج صف بعد","Insert table":"إدراج جدول",Inset:"منخفض",Italic:"مائل",Justify:"ضبط","Justify cell text":"ضبط نص الخلية","Left aligned image":"صورة بمحاذاة لليسار","Light blue":"أزرق فاتح","Light green":"أخضر فاتح","Light grey":"رمادي فاتح",Link:"رابط","Link image":"ربط الصورة","Link URL":"رابط عنوان","List properties":"خصائص القائمة","Lower-latin":"حرف لاتيني صغير","Lower–roman":"رقم روماني صغير","Merge cell down":"دمج الخلايا للأسفل","Merge cell left":"دمج الخلايا لليسار","Merge cell right":"دمج الخلايا لليمين","Merge cell up":"دمج الخلايا للأعلى","Merge cells":"دمج الخلايا",Next:"التالي","No results found":"لم يتم العثور على نتائج","No searchable items":"لا توجد عناصر قابلة للبحث متاحة",None:"لا شيء","Numbered List":"قائمة رقمية","Numbered list styles toolbar":"شريط أدوات أنماط القوائم المرقمة","Open in a new tab":"فتح في تبويب جديد","Open link in new tab":"فتح الرابط في تبويب جديد",Orange:"برتقالي",Original:"الحجم الأصلي",Outset:"بارز",Padding:"الحاشية",Paragraph:"فقرة","Press Enter to type after or press Shift + Enter to type before the widget":"اضغط على Enter للكتابة بعد ذلك أو اضغط على Shift + Enter للكتابة قبل الأداة",Previous:"السابق",Purple:"أرجواني",Red:"أحمر",Redo:"إعادة","Remove color":"إزالة اللون","Remove Format":"إزالة التنسيق","Replace from computer":"استبدال من الحاسوب","Replace image":"استبدال الصورة","Replace image from computer":"استبدال الصورة من الحاسوب","Resize image":"تغيير حجم الصورة","Resize image to %0":"تغيير حجم الصورة إلى %0","Resize image to the original size":"تغيير حجم الصورة إلى الحجم الأصلي","Restore default":"استعادة الافتراضي","Reversed order":"عكس اتجاه الترتيب","Rich Text Editor":"معالج نصوص",Ridge:"إطار ناتئ","Right aligned image":"صورة بمحاذاة لليمين",Row:"صف",Save:"حفظ","Select all":"تحديد الكل","Select column":"حدد العمود","Select row":"حدد صفًا","Show more items":"عرض المزيد من العناصر","Side image":"صورة جانبية",Small:"صغير",Solid:"صلب","Split cell horizontally":"فصل الخلايا بشكل افقي","Split cell vertically":"فصل الخلايا بشكل عمودي",Square:"مربع","Start at":"البدء من","Start index must be greater than 0.":"يجب أن تكون قيمة البداية في الفهرس أكبر من 0.",Strikethrough:"يتوسطه خط",Style:"أسلوب",Subscript:"حرف منخفض",Superscript:"حرف مرتفع","Table alignment toolbar":"شريط أدوات محاذاة الجدول","Table cell text alignment":"محاذاة نص خلية الجدول","Table properties":"خصائص الجدول","Table toolbar":"شريط أدوات الجدول","Text alignment":"محاذاة النص","Text alignment toolbar":"شريط أدوات محاذاة النص","Text alternative":"النص البديل",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'هذا اللون غير صالح. جرِّب "#FF0000" أو "rgb(255,0,0)" أو "أحمر".','The value is invalid. Try "10px" or "2em" or simply "2".':'هذه القيمة غير صالحة. جرِّب "10px" أو "2em" أو "2" وحسب.',"This link has no URL":"لا يحتوي هذا الرابط على عنوان",Tiny:"ضئيل","To-do List":"قائمة المهام","Toggle caption off":"إخفاء التسمية التوضيحية","Toggle caption on":"عرض التسمية التوضيحية","Toggle the circle list style":"تبديل نمط قائمة الدوائر","Toggle the decimal list style":"تبديل نمط قائمة الأرقام العشرية","Toggle the decimal with leading zero list style":"تبديل الأرقام العشرية بنمط قائمة الأصفار البادئة","Toggle the disc list style":"تبديل نمط قائمة الأقراص","Toggle the lower–latin list style":"تبديل نمط قائمة الأحرف اللاتينية الصغيرة","Toggle the lower–roman list style":"تبديل نمط قائمة الأرقام الرومانية الصغيرة","Toggle the square list style":"تبديل نمط قائمة المربعات","Toggle the upper–latin list style":"تبديل نمط قائمة الأحرف اللاتينية الكبيرة","Toggle the upper–roman list style":"تبديل نمط قائمة الأرقام الرومانية الكبيرة",Turquoise:"فيروزي","Type or paste your content here.":"أكتب المحتوى أو ألصقه هنا.","Type your title":"أدخل العنوان",Underline:"تحته خط",Undo:"تراجع",Unlink:"إلغاء الرابط",Update:"تحديث","Update image URL":"عنوان URL الخاص بتحديث الصورة","Upload failed":"فشل الرفع","Upload from computer":"رفع الملف من الحاسوب","Upload image from computer":"تحميل الصورة من الحاسوب","Upload in progress":"جاري الرفع","Upper-latin":"حرف لاتيني كبير","Upper-roman":"رقم روماني كبير","Vertical text alignment toolbar":"شريط أدوات محاذاة النص العمودي",White:"أبيض","Widget toolbar":"شريط أدوات الواجهة",Width:"العرض","Wrap text":"التفاف النص",Yellow:"أصفر"}),t.getPluralForm=function(e){return 0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ast.js b/public/static/plugs/ckeditor5/translations/ast.js
index f8f870e19..5f235367f 100644
--- a/public/static/plugs/ckeditor5/translations/ast.js
+++ b/public/static/plugs/ckeditor5/translations/ast.js
@@ -1 +1 @@
-!function(e){const t=e.ast=e.ast||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"",Blue:"",Bold:"Negrina","Break text":"","Bulleted List":"Llista con viñetes","Bulleted list styles toolbar":"",Cancel:"Encaboxar","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"",Circle:"",Clear:"","Click to edit block":"",Code:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"","Full size image":"Imaxen a tamañu completu",Green:"",Grey:"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"complementu d'imaxen","In line":"",Insert:"","Insert image":"","Insert image via URL":"",Italic:"Cursiva","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"Enllazar","Link image":"","Link URL":"URL del enllaz","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"Llista numberada","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Previous:"",Purple:"",Red:"",Redo:"Refacer","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Editor de testu arriquecíu","Right aligned image":"",Save:"Guardar","Show more items":"","Side image":"Imaxen llateral",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"",Underline:"",Undo:"Desfacer",Unlink:"Desenllazar",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ast=e.ast||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"",Blue:"",Bold:"Negrina","Break text":"","Bulleted List":"Llista con viñetes","Bulleted list styles toolbar":"",Cancel:"Encaboxar","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"","Full size image":"Imaxen a tamañu completu",Green:"",Grey:"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"complementu d'imaxen","In line":"",Insert:"","Insert image":"","Insert image via URL":"",Italic:"Cursiva","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"Enllazar","Link image":"","Link URL":"URL del enllaz","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"Llista numberada","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Previous:"",Purple:"",Red:"",Redo:"Refacer","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Editor de testu arriquecíu","Right aligned image":"",Save:"Guardar","Show more items":"","Side image":"Imaxen llateral",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"",Underline:"",Undo:"Desfacer",Unlink:"Desenllazar",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/az.js b/public/static/plugs/ckeditor5/translations/az.js
index b3ec7b051..a853bfac0 100644
--- a/public/static/plugs/ckeditor5/translations/az.js
+++ b/public/static/plugs/ckeditor5/translations/az.js
@@ -1 +1 @@
-!function(e){const t=e.az=e.az||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%1-dən %0",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Mərkəzə düzləndir","Align left":"Soldan düzləndir","Align right":"Sağdan düzləndir","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Akvamarin",Background:"Fon",Big:"Böyük",Black:"Qara","Block quote":"Sitat bloku",Blue:"Mavi",Bold:"Yarıqalın",Border:"Sərhəd","Break text":"","Bulleted List":"Markerlənmiş siyahı","Bulleted list styles toolbar":"",Cancel:"İmtina et","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"Mərkəzə düzləndir","Change image text alternative":"Alternativ mətni redaktə et","Choose heading":"Başlıqı seç",Circle:"",Clear:"","Click to edit block":"",Code:"Kod",Color:"Rəng","Color picker":"",Column:"Sütun",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"Boş yeri kiçilt",Default:"Default","Delete column":"Sütunları sil","Delete row":"Sətirləri sil","Dim grey":"Tünd boz",Dimensions:"Ölçülər",Disc:"","Document colors":"Rənglər",Dotted:"",Double:"",Downloadable:"Yüklənə bilər","Drag to move":"","Dropdown toolbar":"Açılan paneli","Edit block":"Redaktə etmək bloku","Edit link":"Linki redaktə et","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"Redaktorun paneli","Enter image caption":"Şəkil başlığı daxil edin","Enter table caption":"","Font Background Color":"Şrift Fonunun Rəngi","Font Color":"Şrift Rəngi","Font Family":"Şrift ailəsi","Font Size":"Şrift ölçüsü","Full size image":"Tam ölçülü şəkili",Green:"Yaşıl",Grey:"Boz",Groove:"","Header column":"Başlıqlı sütun","Header row":"Başlıqlı sətir",Heading:"Başlıq","Heading 1":"Başlıq 1","Heading 2":"Başlıq 2","Heading 3":"Başlıq 3","Heading 4":"Başlıq 4","Heading 5":"Başlıq 5","Heading 6":"Başlıq 6",Height:"Hündürlük",HEX:"","Horizontal line":"Üfüqi xətt","Horizontal text alignment toolbar":"",Huge:"Nəhəng","Image resize list":"","Image toolbar":"Şəkil paneli","image widget":"Şəkil vidgetı","In line":"","Increase indent":"Boş yeri böyüt",Insert:"","Insert column left":"Sola sütun əlavə et","Insert column right":"Sağa sütun əlavə et","Insert image":"Şəkili əlavə et","Insert image via URL":"","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"Aşağıya sətir əlavə et","Insert row below":"Yuxarıya sətir əlavə et","Insert table":"Cədvəli əlavə et",Inset:"",Italic:"Maili",Justify:"Eninə görə","Justify cell text":"","Left aligned image":"Soldan düzləndir","Light blue":"Açıq mavi","Light green":"Açıq yaşıl","Light grey":"Açıq boz",Link:"Əlaqələndir","Link image":"","Link URL":"Linkin URL","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Xanaları aşağı birləşdir","Merge cell left":"Xanaları sola birləşdir","Merge cell right":"Xanaları sağa birləşdir","Merge cell up":"Xanaları yuxarı birləşdir","Merge cells":"Xanaları birləşdir",Next:"Növbəti","No results found":"","No searchable items":"",None:"","Numbered List":"Nömrələnmiş siyahı","Numbered list styles toolbar":"","Open in a new tab":"Yeni pəncərədə aç","Open link in new tab":"Linki yeni pəncərədə aç",Orange:"Narıncı",Original:"",Outset:"",Padding:"",Paragraph:"Abzas","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Əvvəlki",Purple:"Bənövşəyi",Red:"Qırmızı",Redo:"Təkrar et","Remove color":"Rəngi ləğv et","Remove Format":"Formatı Ləğv Et","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Rich Text Redaktoru",Ridge:"","Right aligned image":"Sağdan düzləndir",Row:"Sətir",Save:"Yadda saxla","Select column":"","Select row":"","Show more items":"Daha çox əşyanı göstərin","Side image":"Yan şəkil",Small:"Kiçik",Solid:"","Split cell horizontally":"Xanaları üfüqi böl","Split cell vertically":"Xanaları şaquli böl",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Qaralanmış",Style:"",Subscript:"Alt yazı",Superscript:"Üst yazı","Table alignment toolbar":"","Table cell text alignment":"Cədvəl hüceyrəsi mətninin uyğunlaşdırılması","Table properties":"Cədvəl xüsusiyyətləri","Table toolbar":"Cədvəl paneli","Text alignment":"Mətn düzləndirməsi","Text alignment toolbar":"Mətnin düzləndirmə paneli","Text alternative":"Alternativ mətn",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Bu linkdə URL yoxdur",Tiny:"Miniatür","To-do List":"To-do siyahı","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Firuzəyi","Type or paste your content here.":"","Type your title":"Başlığınızı yazın",Underline:"Altdan xətt",Undo:"İmtina et",Unlink:"Linki sil",Update:"","Update image URL":"","Upload failed":"Şəkili serverə yüklə","Upload from computer":"","Upload image from computer":"","Upload in progress":"Yüklənir","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"Ağ","Widget toolbar":"Vidgetin paneli",Width:"Eni","Wrap text":"",Yellow:"Sarı"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.az=e.az||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%1-dən %0",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Mərkəzə düzləndir","Align left":"Soldan düzləndir","Align right":"Sağdan düzləndir","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Akvamarin",Background:"Fon",Big:"Böyük",Black:"Qara","Block quote":"Sitat bloku",Blue:"Mavi",Bold:"Yarıqalın",Border:"Sərhəd","Break text":"","Bulleted List":"Markerlənmiş siyahı","Bulleted list styles toolbar":"",Cancel:"İmtina et","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"Mərkəzə düzləndir","Change image text alternative":"Alternativ mətni redaktə et","Choose heading":"Başlıqı seç",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"Kod",Color:"Rəng","Color picker":"",Column:"Sütun",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"Boş yeri kiçilt",Default:"Default","Delete column":"Sütunları sil","Delete row":"Sətirləri sil","Dim grey":"Tünd boz",Dimensions:"Ölçülər",Disc:"","Document colors":"Rənglər",Dotted:"",Double:"",Downloadable:"Yüklənə bilər","Drag to move":"","Dropdown toolbar":"Açılan paneli","Edit block":"Redaktə etmək bloku","Edit link":"Linki redaktə et","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"Redaktorun paneli","Enter image caption":"Şəkil başlığı daxil edin","Enter table caption":"","Font Background Color":"Şrift Fonunun Rəngi","Font Color":"Şrift Rəngi","Font Family":"Şrift ailəsi","Font Size":"Şrift ölçüsü","Full size image":"Tam ölçülü şəkili",Green:"Yaşıl",Grey:"Boz",Groove:"","Header column":"Başlıqlı sütun","Header row":"Başlıqlı sətir",Heading:"Başlıq","Heading 1":"Başlıq 1","Heading 2":"Başlıq 2","Heading 3":"Başlıq 3","Heading 4":"Başlıq 4","Heading 5":"Başlıq 5","Heading 6":"Başlıq 6",Height:"Hündürlük",HEX:"","Horizontal line":"Üfüqi xətt","Horizontal text alignment toolbar":"",Huge:"Nəhəng","Image resize list":"","Image toolbar":"Şəkil paneli","image widget":"Şəkil vidgetı","In line":"","Increase indent":"Boş yeri böyüt",Insert:"","Insert column left":"Sola sütun əlavə et","Insert column right":"Sağa sütun əlavə et","Insert image":"Şəkili əlavə et","Insert image via URL":"","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"Aşağıya sətir əlavə et","Insert row below":"Yuxarıya sətir əlavə et","Insert table":"Cədvəli əlavə et",Inset:"",Italic:"Maili",Justify:"Eninə görə","Justify cell text":"","Left aligned image":"Soldan düzləndir","Light blue":"Açıq mavi","Light green":"Açıq yaşıl","Light grey":"Açıq boz",Link:"Əlaqələndir","Link image":"","Link URL":"Linkin URL","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Xanaları aşağı birləşdir","Merge cell left":"Xanaları sola birləşdir","Merge cell right":"Xanaları sağa birləşdir","Merge cell up":"Xanaları yuxarı birləşdir","Merge cells":"Xanaları birləşdir",Next:"Növbəti","No results found":"","No searchable items":"",None:"","Numbered List":"Nömrələnmiş siyahı","Numbered list styles toolbar":"","Open in a new tab":"Yeni pəncərədə aç","Open link in new tab":"Linki yeni pəncərədə aç",Orange:"Narıncı",Original:"",Outset:"",Padding:"",Paragraph:"Abzas","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Əvvəlki",Purple:"Bənövşəyi",Red:"Qırmızı",Redo:"Təkrar et","Remove color":"Rəngi ləğv et","Remove Format":"Formatı Ləğv Et","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Rich Text Redaktoru",Ridge:"","Right aligned image":"Sağdan düzləndir",Row:"Sətir",Save:"Yadda saxla","Select column":"","Select row":"","Show more items":"Daha çox əşyanı göstərin","Side image":"Yan şəkil",Small:"Kiçik",Solid:"","Split cell horizontally":"Xanaları üfüqi böl","Split cell vertically":"Xanaları şaquli böl",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Qaralanmış",Style:"",Subscript:"Alt yazı",Superscript:"Üst yazı","Table alignment toolbar":"","Table cell text alignment":"Cədvəl hüceyrəsi mətninin uyğunlaşdırılması","Table properties":"Cədvəl xüsusiyyətləri","Table toolbar":"Cədvəl paneli","Text alignment":"Mətn düzləndirməsi","Text alignment toolbar":"Mətnin düzləndirmə paneli","Text alternative":"Alternativ mətn",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Bu linkdə URL yoxdur",Tiny:"Miniatür","To-do List":"To-do siyahı","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Firuzəyi","Type or paste your content here.":"","Type your title":"Başlığınızı yazın",Underline:"Altdan xətt",Undo:"İmtina et",Unlink:"Linki sil",Update:"","Update image URL":"","Upload failed":"Şəkili serverə yüklə","Upload from computer":"","Upload image from computer":"","Upload in progress":"Yüklənir","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"Ağ","Widget toolbar":"Vidgetin paneli",Width:"Eni","Wrap text":"",Yellow:"Sarı"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/bg.js b/public/static/plugs/ckeditor5/translations/bg.js
index bc8a3f806..e3badbf4b 100644
--- a/public/static/plugs/ckeditor5/translations/bg.js
+++ b/public/static/plugs/ckeditor5/translations/bg.js
@@ -1 +1 @@
-!function(e){const t=e.bg=e.bg||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 от %1",Accept:"Приемане","Align cell text to the bottom":"Подравни текста в клетката към дъното","Align cell text to the center":"Подравни текста в клетката централно","Align cell text to the left":"Подравни текста в клетката наляво","Align cell text to the middle":"Подравни текста в клетката към средата","Align cell text to the right":"Подравни текста в клетката надясно","Align cell text to the top":"Подравни текста в клетката нагоре","Align center":"Централно подравняване","Align left":"Ляво подравняване","Align right":"Дясно подравняване","Align table to the left":"Подравни таблицата наляво","Align table to the right":"Подравни таблицата надясно",Alignment:"Подравняване",Aquamarine:"Аквамарин",Background:"Фон",Big:"Едър",Black:"Черен","Block quote":"Цитат",Blue:"Син",Bold:"Удебелен",Border:"Граница","Break text":"Раздели текст","Bulleted List":"Водещи символи","Bulleted list styles toolbar":"Лента със стилове за подточки",Cancel:"Отказ","Caption for image: %0":"Заглавие на изображението: %0","Caption for the image":"Заглавие на изображението","Cell properties":"Свойства на клетки","Center table":"Центрирай таблицата","Centered image":"Центрирано изображение","Change image text alternative":"Промени изображението на текстовата алтернатива","Choose heading":"Избери заглавие",Circle:"Кръг",Clear:"Изчисти","Click to edit block":"Кликнете, за да редактирате блок",Code:"Код",Color:"Цвят","Color picker":"Избор на цвят",Column:"Колона",Dashed:"На черти",Decimal:"Десетичен","Decimal with leading zero":"Десетичен с водеща нула","Decrease indent":"Намали отстъпа",Default:"По подразбиране","Delete column":"Изтриване на колона","Delete row":"Изтриване на ред","Dim grey":"Тъмно сив",Dimensions:"Размери",Disc:"Диск","Document colors":"Цвят на документа",Dotted:"На точки",Double:"Двоен",Downloadable:"Изтегляне","Drag to move":"Плъзнете за преместване","Dropdown toolbar":"Лента с падащо меню","Edit block":"Редактирай блок","Edit link":"Редакция на линк","Editor block content toolbar":"Лента с инструменти за блокиране на съдържанието на редактора","Editor contextual toolbar":"Контекстна лента с инструменти на редактора","Editor editing area: %0":"Зона за редактиране на редактора: %0","Editor toolbar":"Лента за редакция","Enter image caption":"Въведи описание на изображението","Enter table caption":"Въведи надпис на таблица","Font Background Color":"Цвят на шрифтовия фон","Font Color":"Цвят на шрифта","Font Family":"Семейство шрифтове","Font Size":"Размер на шрифта","Full size image":"Изображение в пълен размер",Green:"Зелен",Grey:"Сив",Groove:"На зиг-заг","Header column":"Заглавна колона","Header row":"Заглавен ред",Heading:"Заглавие","Heading 1":"Заглавие 1","Heading 2":"Заглавие 2","Heading 3":"Заглавие 3","Heading 4":"Заглавие 4","Heading 5":"Заглавие 5","Heading 6":"Заглавие 6",Height:"Височина",HEX:"НЕХ","Horizontal line":"Хоризонтална черта","Horizontal text alignment toolbar":"Лента за хоризонтално подравняване на текст","HTML object":"HTML обект",Huge:"Много едър","Image resize list":"Списък с промените на размера на изображението","Image toolbar":"Лента с изображения","image widget":"Компонент за изображение","In line":"В линия","Increase indent":"Увеличи отстъпа",Insert:"Вмъкни","Insert column left":"Вмъкни колона отляво","Insert column right":"Вмъкни колона отдясно","Insert image":"Вмъкни изображение","Insert image via URL":"Въведи изображение чрез URL","Insert paragraph after block":"Въведи параграф след блока","Insert paragraph before block":"Въведи параграф преди блока","Insert row above":"Вмъкни ред отгоре","Insert row below":"Вмъкни ред отдолу","Insert table":"Вмъкни таблица",Inset:"Вмъкни",Italic:"Курсив",Justify:"Разпредели по равно","Justify cell text":"Разпредели равномерно текста в клетката","Left aligned image":"Изображение подравнено вляво","Light blue":"Светло син","Light green":"Светло зелен","Light grey":"Светло сив",Link:"Линк","Link image":"Свържи изображение","Link URL":"Уеб адрес на линка","List properties":"Свойства на списъка","Lower-latin":"Долен-латински","Lower–roman":"Долен-римски","Merge cell down":"Обединяване на клетка надолу","Merge cell left":"Обединяване на клетка отляво","Merge cell right":"Обединяване на клетка отдясно","Merge cell up":"Обединяване на клетка отгоре","Merge cells":"Обединяване на клетки",Next:"Следващ","No results found":"Няма намерени резултати","No searchable items":"Няма елементи за търсене",None:"Нищо","Numbered List":"Номериране","Numbered list styles toolbar":"Лента със стилове за номерация","Open in a new tab":"Отваряне в нов раздел","Open link in new tab":"Отваряне на линк в нов раздел",Orange:"Оранжев",Original:"Оригинал",Outset:"Изпъкнала",Padding:"Пълнеж",Paragraph:"Параграф","Press Enter to type after or press Shift + Enter to type before the widget":"Натиснете Enter за въвеждане или натиснете Shift + Enter за въвеждане преди изпълнимия модул",Previous:"Предишен",Purple:"Лилав",Red:"Червен",Redo:"Повтори","Remove color":"Премахни цвят","Remove Format":"Премахни форматиране","Replace from computer":"Заменете от компютър","Replace image":"Замяна на изображението","Replace image from computer":"Замяна на изображение от компютър","Resize image":"Промени размера на изображението","Resize image to %0":"Промени размера на изображението на %0","Resize image to the original size":"Възстанови оригиналния размер на изображението","Restore default":"Възстанови първоначалните настройки","Reversed order":"Обърнат ред","Rich Text Editor":"Богат текстов редактор",Ridge:"Назъбен","Right aligned image":"Изображение подравнено вдясно",Row:"Ред",Save:"Запазване","Select all":"Избери всички","Select column":"Избери колона","Select row":"Избери ред","Show more items":"Покажи повече единици","Side image":"Странично изображение",Small:"Малък",Solid:"Твърд","Split cell horizontally":"Разделяне на клетки хоризонтално","Split cell vertically":"Разделяне на клетки вертикално",Square:"Квадрат","Start at":"Започни с","Start index must be greater than 0.":"Стартовия индекс трябва да е по-голям от 0.",Strikethrough:"Зачертаване",Style:"Стил",Subscript:"Долен индекс",Superscript:"Горен индекс","Table alignment toolbar":"Лента за подравняване на таблици","Table cell text alignment":"Подравняване на текст в клетка","Table properties":"Свойства на таблици","Table toolbar":"Лента за таблици","Text alignment":"Подравняване на текста","Text alignment toolbar":"Лента за подравняване на текст","Text alternative":"Текстова алтернатива",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Цветът е невалиден. Опитайте "#FF0000" или "rgb(255,0,0)", или "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Стойността е невалидна. Опитайте "10px" или "2em", или просто "2".',"This link has no URL":"Този линк няма уеб адрес",Tiny:"Много малък","To-do List":"Списък със задачи","Toggle caption off":"Превключи изключване на надписи","Toggle caption on":"Превключи включване на надписи","Toggle the circle list style":"Превключи между стиловете на кръговия списък","Toggle the decimal list style":"Превключи между стиловете на десетичния списък","Toggle the decimal with leading zero list style":"Превключи между стиловете на десетичния списък с начало нула","Toggle the disc list style":"Превключи между стиловете на дисковия списък ","Toggle the lower–latin list style":"Превключи между стиловете на долен-латиснки списък","Toggle the lower–roman list style":"Превключи между стиловете на долен-римски списък","Toggle the square list style":"Превключи между стиловете на квадратния списък","Toggle the upper–latin list style":"Превключи между стиловете на горен-латински списък","Toggle the upper–roman list style":"Превключи между стиловете на горен-римски списък",Turquoise:"Тюркоазен","Type or paste your content here.":"Напишете или поставете съдържанието си тук.","Type your title":"Напишете заглавието си",Underline:"Подчертаване",Undo:"Отмени",Unlink:"Премахване на линка",Update:"Обнови","Update image URL":"Обнови URL на изображението","Upload failed":"Качването е неуспешно","Upload from computer":"Качете от компютър","Upload image from computer":"Качване на изображение от компютър","Upload in progress":"Качването е в процес","Upper-latin":"Горен-латински","Upper-roman":"Горен-римски","Vertical text alignment toolbar":"Лента за вертикално подравняване на текст",White:"Бял","Widget toolbar":"Лента с помощни средства",Width:"Ширина","Wrap text":"Събери текст",Yellow:"Жълт"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.bg=e.bg||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 от %1",Accept:"Приемане","Align cell text to the bottom":"Подравни текста в клетката към дъното","Align cell text to the center":"Подравни текста в клетката централно","Align cell text to the left":"Подравни текста в клетката наляво","Align cell text to the middle":"Подравни текста в клетката към средата","Align cell text to the right":"Подравни текста в клетката надясно","Align cell text to the top":"Подравни текста в клетката нагоре","Align center":"Централно подравняване","Align left":"Ляво подравняване","Align right":"Дясно подравняване","Align table to the left":"Подравни таблицата наляво","Align table to the right":"Подравни таблицата надясно",Alignment:"Подравняване",Aquamarine:"Аквамарин",Background:"Фон",Big:"Едър",Black:"Черен","Block quote":"Цитат",Blue:"Син",Bold:"Удебелен",Border:"Граница","Break text":"Раздели текст","Bulleted List":"Водещи символи","Bulleted list styles toolbar":"Лента със стилове за подточки",Cancel:"Отказ","Caption for image: %0":"Заглавие на изображението: %0","Caption for the image":"Заглавие на изображението","Cell properties":"Свойства на клетки","Center table":"Центрирай таблицата","Centered image":"Центрирано изображение","Change image text alternative":"Промени изображението на текстовата алтернатива","Choose heading":"Избери заглавие",Circle:"Кръг",Clear:"Изчисти","Click to edit block":"Кликнете, за да редактирате блок",Close:"Затвори",Code:"Код",Color:"Цвят","Color picker":"Избор на цвят",Column:"Колона",Dashed:"На черти",Decimal:"Десетичен","Decimal with leading zero":"Десетичен с водеща нула","Decrease indent":"Намали отстъпа",Default:"По подразбиране","Delete column":"Изтриване на колона","Delete row":"Изтриване на ред","Dim grey":"Тъмно сив",Dimensions:"Размери",Disc:"Диск","Document colors":"Цвят на документа",Dotted:"На точки",Double:"Двоен",Downloadable:"Изтегляне","Drag to move":"Плъзнете за преместване","Dropdown toolbar":"Лента с падащо меню","Edit block":"Редактирай блок","Edit link":"Редакция на линк","Editor block content toolbar":"Лента с инструменти за блокиране на съдържанието на редактора","Editor contextual toolbar":"Контекстна лента с инструменти на редактора","Editor dialog":"Диалогов прозорец на редактора","Editor editing area: %0":"Зона за редактиране на редактора: %0","Editor toolbar":"Лента за редакция","Enter image caption":"Въведи описание на изображението","Enter table caption":"Въведи надпис на таблица","Font Background Color":"Цвят на шрифтовия фон","Font Color":"Цвят на шрифта","Font Family":"Семейство шрифтове","Font Size":"Размер на шрифта","Full size image":"Изображение в пълен размер",Green:"Зелен",Grey:"Сив",Groove:"На зиг-заг","Header column":"Заглавна колона","Header row":"Заглавен ред",Heading:"Заглавие","Heading 1":"Заглавие 1","Heading 2":"Заглавие 2","Heading 3":"Заглавие 3","Heading 4":"Заглавие 4","Heading 5":"Заглавие 5","Heading 6":"Заглавие 6",Height:"Височина",HEX:"НЕХ","Horizontal line":"Хоризонтална черта","Horizontal text alignment toolbar":"Лента за хоризонтално подравняване на текст","HTML object":"HTML обект",Huge:"Много едър","Image resize list":"Списък с промените на размера на изображението","Image toolbar":"Лента с изображения","image widget":"Компонент за изображение","In line":"В линия","Increase indent":"Увеличи отстъпа",Insert:"Вмъкни","Insert column left":"Вмъкни колона отляво","Insert column right":"Вмъкни колона отдясно","Insert image":"Вмъкни изображение","Insert image via URL":"Въведи изображение чрез URL","Insert paragraph after block":"Въведи параграф след блока","Insert paragraph before block":"Въведи параграф преди блока","Insert row above":"Вмъкни ред отгоре","Insert row below":"Вмъкни ред отдолу","Insert table":"Вмъкни таблица",Inset:"Вмъкни",Italic:"Курсив",Justify:"Разпредели по равно","Justify cell text":"Разпредели равномерно текста в клетката","Left aligned image":"Изображение подравнено вляво","Light blue":"Светло син","Light green":"Светло зелен","Light grey":"Светло сив",Link:"Линк","Link image":"Свържи изображение","Link URL":"Уеб адрес на линка","List properties":"Свойства на списъка","Lower-latin":"Долен-латински","Lower–roman":"Долен-римски","Merge cell down":"Обединяване на клетка надолу","Merge cell left":"Обединяване на клетка отляво","Merge cell right":"Обединяване на клетка отдясно","Merge cell up":"Обединяване на клетка отгоре","Merge cells":"Обединяване на клетки",Next:"Следващ","No results found":"Няма намерени резултати","No searchable items":"Няма елементи за търсене",None:"Нищо","Numbered List":"Номериране","Numbered list styles toolbar":"Лента със стилове за номерация","Open in a new tab":"Отваряне в нов раздел","Open link in new tab":"Отваряне на линк в нов раздел",Orange:"Оранжев",Original:"Оригинал",Outset:"Изпъкнала",Padding:"Пълнеж",Paragraph:"Параграф","Press Enter to type after or press Shift + Enter to type before the widget":"Натиснете Enter за въвеждане или натиснете Shift + Enter за въвеждане преди изпълнимия модул",Previous:"Предишен",Purple:"Лилав",Red:"Червен",Redo:"Повтори","Remove color":"Премахни цвят","Remove Format":"Премахни форматиране","Replace from computer":"Заменете от компютър","Replace image":"Замяна на изображението","Replace image from computer":"Замяна на изображение от компютър","Resize image":"Промени размера на изображението","Resize image to %0":"Промени размера на изображението на %0","Resize image to the original size":"Възстанови оригиналния размер на изображението","Restore default":"Възстанови първоначалните настройки","Reversed order":"Обърнат ред","Rich Text Editor":"Богат текстов редактор",Ridge:"Назъбен","Right aligned image":"Изображение подравнено вдясно",Row:"Ред",Save:"Запазване","Select all":"Избери всички","Select column":"Избери колона","Select row":"Избери ред","Show more items":"Покажи повече единици","Side image":"Странично изображение",Small:"Малък",Solid:"Твърд","Split cell horizontally":"Разделяне на клетки хоризонтално","Split cell vertically":"Разделяне на клетки вертикално",Square:"Квадрат","Start at":"Започни с","Start index must be greater than 0.":"Стартовия индекс трябва да е по-голям от 0.",Strikethrough:"Зачертаване",Style:"Стил",Subscript:"Долен индекс",Superscript:"Горен индекс","Table alignment toolbar":"Лента за подравняване на таблици","Table cell text alignment":"Подравняване на текст в клетка","Table properties":"Свойства на таблици","Table toolbar":"Лента за таблици","Text alignment":"Подравняване на текста","Text alignment toolbar":"Лента за подравняване на текст","Text alternative":"Текстова алтернатива",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Цветът е невалиден. Опитайте "#FF0000" или "rgb(255,0,0)", или "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Стойността е невалидна. Опитайте "10px" или "2em", или просто "2".',"This link has no URL":"Този линк няма уеб адрес",Tiny:"Много малък","To-do List":"Списък със задачи","Toggle caption off":"Превключи изключване на надписи","Toggle caption on":"Превключи включване на надписи","Toggle the circle list style":"Превключи между стиловете на кръговия списък","Toggle the decimal list style":"Превключи между стиловете на десетичния списък","Toggle the decimal with leading zero list style":"Превключи между стиловете на десетичния списък с начало нула","Toggle the disc list style":"Превключи между стиловете на дисковия списък ","Toggle the lower–latin list style":"Превключи между стиловете на долен-латиснки списък","Toggle the lower–roman list style":"Превключи между стиловете на долен-римски списък","Toggle the square list style":"Превключи между стиловете на квадратния списък","Toggle the upper–latin list style":"Превключи между стиловете на горен-латински списък","Toggle the upper–roman list style":"Превключи между стиловете на горен-римски списък",Turquoise:"Тюркоазен","Type or paste your content here.":"Напишете или поставете съдържанието си тук.","Type your title":"Напишете заглавието си",Underline:"Подчертаване",Undo:"Отмени",Unlink:"Премахване на линка",Update:"Обнови","Update image URL":"Обнови URL на изображението","Upload failed":"Качването е неуспешно","Upload from computer":"Качете от компютър","Upload image from computer":"Качване на изображение от компютър","Upload in progress":"Качването е в процес","Upper-latin":"Горен-латински","Upper-roman":"Горен-римски","Vertical text alignment toolbar":"Лента за вертикално подравняване на текст",White:"Бял","Widget toolbar":"Лента с помощни средства",Width:"Ширина","Wrap text":"Събери текст",Yellow:"Жълт"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/bn.js b/public/static/plugs/ckeditor5/translations/bn.js
index f7b775c62..c3cef442f 100644
--- a/public/static/plugs/ckeditor5/translations/bn.js
+++ b/public/static/plugs/ckeditor5/translations/bn.js
@@ -1 +1 @@
-!function(e){const t=e.bn=e.bn||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 এর %1",Accept:"গ্রহণ করুন","Align cell text to the bottom":"নীচে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the center":"কেন্দ্রে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the left":"বাম দিকে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the middle":"মাঝখানে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the right":"ডানদিকে সেল টেক্সট সারিবদ্ধ করুন ","Align cell text to the top":"শীর্ষে সেল টেক্সট সারিবদ্ধ করুন","Align center":"কেন্দ্র সারিবদ্ধ করুন","Align left":"বামে সারিবদ্ধ করুন","Align right":"ডানদিকে সারিবদ্ধ করুন","Align table to the left":"বাম দিকে টেবিল সারিবদ্ধ করুন","Align table to the right":"ডানদিকে টেবিলটি সারিবদ্ধ করুন",Alignment:"সারিবদ্ধকরণ",Aquamarine:"ফেকাশে সবুজবর্ণ",Background:"ব্যাকগ্রাউন্ড",Big:"বড়",Black:"কালো","Block quote":"ব্লক কোট",Blue:"নীল ",Bold:"বোল্ড",Border:"বর্ডার ","Break text":"টেক্সট ভেঙ্গে ফেলুন","Bulleted List":"বুলেটযুক্ত তালিকা","Bulleted list styles toolbar":"বুলেটেড তালিকা স্টাইল টুলবার",Cancel:"বাতিল করুন","Caption for image: %0":"ছবির জন্য ক্যাপশন: %0","Caption for the image":"ছবির জন্য ক্যাপশন","Cell properties":"সেল বৈশিষ্ট্য","Center table":"কেন্দ্রের টেবিল","Centered image":"কেন্দ্রীভূত ছবি","Change image text alternative":"ছবির টেক্সট বিকল্প পরিবর্তন","Choose heading":"শিরোনাম নির্বাচন করুন",Circle:"বৃত্ত",Clear:"পরিষ্কার করুন","Click to edit block":"ব্লক এডিট করতে ক্লিক করুন",Code:"কোড",Color:"  রং","Color picker":"রং বাছাইকারী",Column:"কলাম",Dashed:"ড্যাশড",Decimal:"দশমিক","Decimal with leading zero":"অগ্রণী 0 সহ দশমিক ","Decrease indent":"ইন্ডেন্ট হ্রাস করুন",Default:"ডিফল্ট","Delete column":"কলাম মুছে ফেলুন","Delete row":"সারি মুছুন","Dim grey":"আবছা ধূসর",Dimensions:"মাত্রাগুলো",Disc:"ডিস্ক","Document colors":"নথির রং",Dotted:"ডটেড",Double:"দ্বিগুণ",Downloadable:"ডাউনলোডযোগ্য","Drag to move":"সরানোর জন্য টেনে আনুন","Dropdown toolbar":"ড্রপডাউন টুলবার","Edit block":"এডিট ব্লক","Edit link":"\t\nলিঙ্ক  এডিট করুন","Editor block content toolbar":"সম্পাদক ব্লক কন্টেন্ট টুলবার","Editor contextual toolbar":"সম্পাদক প্রাসঙ্গিক টুলবার","Editor editing area: %0":"সম্পাদক সম্পাদনার ক্ষেত্র: %0","Editor toolbar":"সম্পাদক টুলবার","Enter image caption":"ছবির ক্যাপশন লিখুন","Enter table caption":"টেবিল ক্যাপশন লিখুন","Font Background Color":"ফন্ট ব্যাকগ্রাউন্ডের রং","Font Color":"ফন্টের রং","Font Family":"ফন্ট পরিবার","Font Size":"অক্ষরের আকার","Full size image":"সম্পূর্ণ আকারের ছবি",Green:"সবুজ",Grey:"ধূসর",Groove:"খাঁজকাটা","Header column":"হেডার কলাম","Header row":"হেডার সারি",Heading:"শিরোনাম","Heading 1":"শিরোনাম 1","Heading 2":"শিরোনাম 2","Heading 3":"শিরোনাম 3","Heading 4":"শিরোনাম 4","Heading 5":"শিরোনাম 5","Heading 6":"শিরোনাম 6",Height:"উচ্চতা",HEX:"HEX","Horizontal line":"অনুভূমিক রেখা","Horizontal text alignment toolbar":"অনুভূমিক টেক্সট সারিবদ্ধকরণ টুলবার","HTML object":"HTML অবজেক্ট",Huge:"অনেক বড়","Image resize list":"ছবির আকার পরিবর্তনের তালিকা","Image toolbar":"ছবির টুলবার","image widget":"ছবির উইজেট","In line":"সঙ্গতিপূর্ণভাবে","Increase indent":"ইন্ডেন্ট বৃদ্ধি করুন",Insert:"ঢোকান","Insert column left":"বাম দিকে কলাম ঢোকান","Insert column right":"ডানদিকে কলাম ঢোকান","Insert image":"ছবি ঢোকান","Insert image via URL":"URL এর মাধ্যমে ছবি ঢোকান","Insert paragraph after block":"ব্লকের পর অনুচ্ছেদ ঢোকান","Insert paragraph before block":"ব্লক করার আগে অনুচ্ছেদ ঢোকান","Insert row above":"উপরে সারি ঢোকান","Insert row below":"নীচে সারি ঢোকান","Insert table":"টেবিল ঢোকান",Inset:"ইনসেট",Italic:"ইটালিক",Justify:"জাস্টিফাই","Justify cell text":"সেল টেক্সট জাস্টিফাই করুন","Left aligned image":"বাম সারিবদ্ধ ছবি","Light blue":"হালকা নীল","Light green":"হালকা সবুজ","Light grey":"হালকা ধূসর",Link:"লিঙ্ক","Link image":"লিঙ্ক চিত্র","Link URL":"লিঙ্ক URL","List properties":"বৈশিষ্ট্য তালিকাভুক্ত করুন","Lower-latin":"নিম্ন-ল্যাটিন","Lower–roman":"নিম্ন-রোমান","Merge cell down":"নিচে সেল মার্জ করুন","Merge cell left":"বামদিকে সেল মার্জ করুন","Merge cell right":" ডানদিকে সেল মার্জ করুন","Merge cell up":"সেল আপ মার্জ","Merge cells":"সেল একত্রিত করুন",Next:"পরবর্তী","No results found":"কোন ফলাফল পাওয়া যায়নি","No searchable items":"কোনো অনুসন্ধানযোগ্য আইটেম নেই",None:"কোনোটিই নয়","Numbered List":"সংখ্যাযুক্ত তালিকা","Numbered list styles toolbar":"সংখ্যাযুক্ত তালিকা স্টাইল টুলবার","Open in a new tab":"একটি নতুন ট্যাবে খুলুন","Open link in new tab":"লিঙ্কটি নতুন ট্যাবে খুলুন",Orange:"কমলা",Original:"মূল",Outset:"শুরু",Padding:"প্যাডিং",Paragraph:"অনুচ্ছেদ","Press Enter to type after or press Shift + Enter to type before the widget":"পরে টাইপ করতে এন্টার চাপুন বা উইজেটের আগে টাইপ করতে Shift + এন্টার চাপুন",Previous:"পূর্ববর্তী",Purple:"বেগুনি",Red:"লাল",Redo:"রেডো","Remove color":"রং মুছে ফেলুন","Remove Format":"ফরম্যাট মুছে ফেলুন","Replace from computer":"কম্পিউটার থেকে প্রতিস্থাপন করুন","Replace image":"ছবি প্রতিস্থাপন করুন","Replace image from computer":"কম্পিউটার থেকে ছবি প্রতিস্থাপন করুন","Resize image":"ছবির আকার পরিবর্তন করুন","Resize image to %0":"ছবি %0 আকার পরিবর্তন করুন","Resize image to the original size":"মূল আকারে ছবির আকার পরিবর্তন করুন","Restore default":"পূর্বাবস্থায় ফিরিয়ে আনুন","Reversed order":"উল্টো ক্রম","Rich Text Editor":"রিচ টেক্সট এডিটর",Ridge:"রিজ","Right aligned image":"ডানে সারিবদ্ধ ছবি",Row:"সারি ",Save:"সংরক্ষণ করুন","Select all":"সব নির্বাচন করুন","Select column":"কলাম নির্বাচন করুন","Select row":"সারি নির্বাচন করুন","Show more items":"আরও আইটেম দেখান","Side image":"পার্শ্ব ছবি",Small:"ছোট",Solid:"সলিড","Split cell horizontally":"অনুভূমিকভাবে সেল বিভক্ত করুন","Split cell vertically":"সেল উল্লম্বভাবে বিভক্ত করুন",Square:"বর্গক্ষেত্র","Start at":"শুরু হবে","Start index must be greater than 0.":"স্টার্ট ইনডেক্স অবশ্যই 0-এর বেশি হতে হবে।",Strikethrough:"স্ট্রাইকথ্রু",Style:"স্টাইল ",Subscript:"সাবস্ক্রিপ্ট",Superscript:"সুপারস্ক্রিপ্ট","Table alignment toolbar":"টেবিল সারিবদ্ধকরণ টুলবার","Table cell text alignment":"সক্ষম সেল টেক্সট সারিবদ্ধকরণ","Table properties":"টেবিল বৈশিষ্ট্য","Table toolbar":"টেবিল টুলবার","Text alignment":"টেক্সট সারিবদ্ধকরণ","Text alignment toolbar":"টেক্সট শ্রেণীবিন্যাস টুলবার","Text alternative":"টেক্সট বিকল্প",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'রংটি সঠিক নয়। "#FF0000" অথবা "rgb(255,0,0)" অথবা "লাল" ব্যাবহার করুন।\n','The value is invalid. Try "10px" or "2em" or simply "2".':'মানটি সঠিক নয়। "10px" বা "2em" বা সহজভাবে "2" ব্যবহার করে দেখুন।',"This link has no URL":"এই লিঙ্কের কোন URL নেই",Tiny:"ক্ষুদ্র","To-do List":"তালিকা তৈরি","Toggle caption off":"টগল ক্যাপশন বন্ধ করুন","Toggle caption on":"টগল ক্যাপশন চালু করুন","Toggle the circle list style":"বৃত্ত তালিকা স্টাইল টগল করুন","Toggle the decimal list style":"দশমিক তালিকা স্টাইল টগল করুন","Toggle the decimal with leading zero list style":"অগ্রণী 0 তালিকা স্টাইল সহ দশমিক টগল করুন","Toggle the disc list style":"ডিস্ক তালিকা স্টাইল টগল করুন","Toggle the lower–latin list style":"নিম্ন-ল্যাটিন তালিকা স্টাইল টগল করুন","Toggle the lower–roman list style":"নিম্ন-রোমান তালিকা স্টাইল টগল করুন","Toggle the square list style":"বর্গাকার তালিকা স্টাইল টগল করুন","Toggle the upper–latin list style":"উপরের-ল্যাটিন তালিকা স্টাইল টগল করুন","Toggle the upper–roman list style":"উপরের-রোমান তালিকা স্টাইল টগল করুন",Turquoise:"ফিরোজা","Type or paste your content here.":"আপনার বিষয়বস্তু এখানে টাইপ অথবা পেস্ট করুন।","Type your title":"আপনার শিরোনাম টাইপ করুন",Underline:"আন্ডারলাইন",Undo:"পূর্বাবস্থায় ফেরান",Unlink:"লিঙ্কমুক্ত করুন",Update:"আপডেট করুন","Update image URL":"ছবির URL আপডেট করুন","Upload failed":"আপলোড ব্যর্থ হয়েছে","Upload from computer":"কম্পিউটার থেকে আপলোড করুন","Upload image from computer":"কম্পিউটার থেকে ছবি আপলোড করুন","Upload in progress":"আপলোড চলছে","Upper-latin":"উচ্চ-ল্যাটিন","Upper-roman":"উচ্চ-রোমান","Vertical text alignment toolbar":"উল্লম্ব টেক্সট সারিবদ্ধকরণ টুলবার",White:"সাদা","Widget toolbar":"উইজেট টুলবার",Width:"প্রস্থ","Wrap text":"টেক্সট মোড়ানো",Yellow:"হলুদ "}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.bn=e.bn||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 এর %1",Accept:"গ্রহণ করুন","Align cell text to the bottom":"নীচে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the center":"কেন্দ্রে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the left":"বাম দিকে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the middle":"মাঝখানে সেল টেক্সট সারিবদ্ধ করুন","Align cell text to the right":"ডানদিকে সেল টেক্সট সারিবদ্ধ করুন ","Align cell text to the top":"শীর্ষে সেল টেক্সট সারিবদ্ধ করুন","Align center":"কেন্দ্র সারিবদ্ধ করুন","Align left":"বামে সারিবদ্ধ করুন","Align right":"ডানদিকে সারিবদ্ধ করুন","Align table to the left":"বাম দিকে টেবিল সারিবদ্ধ করুন","Align table to the right":"ডানদিকে টেবিলটি সারিবদ্ধ করুন",Alignment:"সারিবদ্ধকরণ",Aquamarine:"ফেকাশে সবুজবর্ণ",Background:"ব্যাকগ্রাউন্ড",Big:"বড়",Black:"কালো","Block quote":"ব্লক কোট",Blue:"নীল ",Bold:"বোল্ড",Border:"বর্ডার ","Break text":"টেক্সট ভেঙ্গে ফেলুন","Bulleted List":"বুলেটযুক্ত তালিকা","Bulleted list styles toolbar":"বুলেটেড তালিকা স্টাইল টুলবার",Cancel:"বাতিল করুন","Caption for image: %0":"ছবির জন্য ক্যাপশন: %0","Caption for the image":"ছবির জন্য ক্যাপশন","Cell properties":"সেল বৈশিষ্ট্য","Center table":"কেন্দ্রের টেবিল","Centered image":"কেন্দ্রীভূত ছবি","Change image text alternative":"ছবির টেক্সট বিকল্প পরিবর্তন","Choose heading":"শিরোনাম নির্বাচন করুন",Circle:"বৃত্ত",Clear:"পরিষ্কার করুন","Click to edit block":"ব্লক এডিট করতে ক্লিক করুন",Close:"বন্ধ করুন",Code:"কোড",Color:"  রং","Color picker":"রং বাছাইকারী",Column:"কলাম",Dashed:"ড্যাশড",Decimal:"দশমিক","Decimal with leading zero":"অগ্রণী 0 সহ দশমিক ","Decrease indent":"ইন্ডেন্ট হ্রাস করুন",Default:"ডিফল্ট","Delete column":"কলাম মুছে ফেলুন","Delete row":"সারি মুছুন","Dim grey":"আবছা ধূসর",Dimensions:"মাত্রাগুলো",Disc:"ডিস্ক","Document colors":"নথির রং",Dotted:"ডটেড",Double:"দ্বিগুণ",Downloadable:"ডাউনলোডযোগ্য","Drag to move":"সরানোর জন্য টেনে আনুন","Dropdown toolbar":"ড্রপডাউন টুলবার","Edit block":"এডিট ব্লক","Edit link":"\t\nলিঙ্ক  এডিট করুন","Editor block content toolbar":"সম্পাদক ব্লক কন্টেন্ট টুলবার","Editor contextual toolbar":"সম্পাদক প্রাসঙ্গিক টুলবার","Editor dialog":"ইডিটর ডায়ালগ","Editor editing area: %0":"সম্পাদক সম্পাদনার ক্ষেত্র: %0","Editor toolbar":"সম্পাদক টুলবার","Enter image caption":"ছবির ক্যাপশন লিখুন","Enter table caption":"টেবিল ক্যাপশন লিখুন","Font Background Color":"ফন্ট ব্যাকগ্রাউন্ডের রং","Font Color":"ফন্টের রং","Font Family":"ফন্ট পরিবার","Font Size":"অক্ষরের আকার","Full size image":"সম্পূর্ণ আকারের ছবি",Green:"সবুজ",Grey:"ধূসর",Groove:"খাঁজকাটা","Header column":"হেডার কলাম","Header row":"হেডার সারি",Heading:"শিরোনাম","Heading 1":"শিরোনাম 1","Heading 2":"শিরোনাম 2","Heading 3":"শিরোনাম 3","Heading 4":"শিরোনাম 4","Heading 5":"শিরোনাম 5","Heading 6":"শিরোনাম 6",Height:"উচ্চতা",HEX:"HEX","Horizontal line":"অনুভূমিক রেখা","Horizontal text alignment toolbar":"অনুভূমিক টেক্সট সারিবদ্ধকরণ টুলবার","HTML object":"HTML অবজেক্ট",Huge:"অনেক বড়","Image resize list":"ছবির আকার পরিবর্তনের তালিকা","Image toolbar":"ছবির টুলবার","image widget":"ছবির উইজেট","In line":"সঙ্গতিপূর্ণভাবে","Increase indent":"ইন্ডেন্ট বৃদ্ধি করুন",Insert:"ঢোকান","Insert column left":"বাম দিকে কলাম ঢোকান","Insert column right":"ডানদিকে কলাম ঢোকান","Insert image":"ছবি ঢোকান","Insert image via URL":"URL এর মাধ্যমে ছবি ঢোকান","Insert paragraph after block":"ব্লকের পর অনুচ্ছেদ ঢোকান","Insert paragraph before block":"ব্লক করার আগে অনুচ্ছেদ ঢোকান","Insert row above":"উপরে সারি ঢোকান","Insert row below":"নীচে সারি ঢোকান","Insert table":"টেবিল ঢোকান",Inset:"ইনসেট",Italic:"ইটালিক",Justify:"জাস্টিফাই","Justify cell text":"সেল টেক্সট জাস্টিফাই করুন","Left aligned image":"বাম সারিবদ্ধ ছবি","Light blue":"হালকা নীল","Light green":"হালকা সবুজ","Light grey":"হালকা ধূসর",Link:"লিঙ্ক","Link image":"লিঙ্ক চিত্র","Link URL":"লিঙ্ক URL","List properties":"বৈশিষ্ট্য তালিকাভুক্ত করুন","Lower-latin":"নিম্ন-ল্যাটিন","Lower–roman":"নিম্ন-রোমান","Merge cell down":"নিচে সেল মার্জ করুন","Merge cell left":"বামদিকে সেল মার্জ করুন","Merge cell right":" ডানদিকে সেল মার্জ করুন","Merge cell up":"সেল আপ মার্জ","Merge cells":"সেল একত্রিত করুন",Next:"পরবর্তী","No results found":"কোন ফলাফল পাওয়া যায়নি","No searchable items":"কোনো অনুসন্ধানযোগ্য আইটেম নেই",None:"কোনোটিই নয়","Numbered List":"সংখ্যাযুক্ত তালিকা","Numbered list styles toolbar":"সংখ্যাযুক্ত তালিকা স্টাইল টুলবার","Open in a new tab":"একটি নতুন ট্যাবে খুলুন","Open link in new tab":"লিঙ্কটি নতুন ট্যাবে খুলুন",Orange:"কমলা",Original:"মূল",Outset:"শুরু",Padding:"প্যাডিং",Paragraph:"অনুচ্ছেদ","Press Enter to type after or press Shift + Enter to type before the widget":"পরে টাইপ করতে এন্টার চাপুন বা উইজেটের আগে টাইপ করতে Shift + এন্টার চাপুন",Previous:"পূর্ববর্তী",Purple:"বেগুনি",Red:"লাল",Redo:"রেডো","Remove color":"রং মুছে ফেলুন","Remove Format":"ফরম্যাট মুছে ফেলুন","Replace from computer":"কম্পিউটার থেকে প্রতিস্থাপন করুন","Replace image":"ছবি প্রতিস্থাপন করুন","Replace image from computer":"কম্পিউটার থেকে ছবি প্রতিস্থাপন করুন","Resize image":"ছবির আকার পরিবর্তন করুন","Resize image to %0":"ছবি %0 আকার পরিবর্তন করুন","Resize image to the original size":"মূল আকারে ছবির আকার পরিবর্তন করুন","Restore default":"পূর্বাবস্থায় ফিরিয়ে আনুন","Reversed order":"উল্টো ক্রম","Rich Text Editor":"রিচ টেক্সট এডিটর",Ridge:"রিজ","Right aligned image":"ডানে সারিবদ্ধ ছবি",Row:"সারি ",Save:"সংরক্ষণ করুন","Select all":"সব নির্বাচন করুন","Select column":"কলাম নির্বাচন করুন","Select row":"সারি নির্বাচন করুন","Show more items":"আরও আইটেম দেখান","Side image":"পার্শ্ব ছবি",Small:"ছোট",Solid:"সলিড","Split cell horizontally":"অনুভূমিকভাবে সেল বিভক্ত করুন","Split cell vertically":"সেল উল্লম্বভাবে বিভক্ত করুন",Square:"বর্গক্ষেত্র","Start at":"শুরু হবে","Start index must be greater than 0.":"স্টার্ট ইনডেক্স অবশ্যই 0-এর বেশি হতে হবে।",Strikethrough:"স্ট্রাইকথ্রু",Style:"স্টাইল ",Subscript:"সাবস্ক্রিপ্ট",Superscript:"সুপারস্ক্রিপ্ট","Table alignment toolbar":"টেবিল সারিবদ্ধকরণ টুলবার","Table cell text alignment":"সক্ষম সেল টেক্সট সারিবদ্ধকরণ","Table properties":"টেবিল বৈশিষ্ট্য","Table toolbar":"টেবিল টুলবার","Text alignment":"টেক্সট সারিবদ্ধকরণ","Text alignment toolbar":"টেক্সট শ্রেণীবিন্যাস টুলবার","Text alternative":"টেক্সট বিকল্প",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'রংটি সঠিক নয়। "#FF0000" অথবা "rgb(255,0,0)" অথবা "লাল" ব্যাবহার করুন।\n','The value is invalid. Try "10px" or "2em" or simply "2".':'মানটি সঠিক নয়। "10px" বা "2em" বা সহজভাবে "2" ব্যবহার করে দেখুন।',"This link has no URL":"এই লিঙ্কের কোন URL নেই",Tiny:"ক্ষুদ্র","To-do List":"তালিকা তৈরি","Toggle caption off":"টগল ক্যাপশন বন্ধ করুন","Toggle caption on":"টগল ক্যাপশন চালু করুন","Toggle the circle list style":"বৃত্ত তালিকা স্টাইল টগল করুন","Toggle the decimal list style":"দশমিক তালিকা স্টাইল টগল করুন","Toggle the decimal with leading zero list style":"অগ্রণী 0 তালিকা স্টাইল সহ দশমিক টগল করুন","Toggle the disc list style":"ডিস্ক তালিকা স্টাইল টগল করুন","Toggle the lower–latin list style":"নিম্ন-ল্যাটিন তালিকা স্টাইল টগল করুন","Toggle the lower–roman list style":"নিম্ন-রোমান তালিকা স্টাইল টগল করুন","Toggle the square list style":"বর্গাকার তালিকা স্টাইল টগল করুন","Toggle the upper–latin list style":"উপরের-ল্যাটিন তালিকা স্টাইল টগল করুন","Toggle the upper–roman list style":"উপরের-রোমান তালিকা স্টাইল টগল করুন",Turquoise:"ফিরোজা","Type or paste your content here.":"আপনার বিষয়বস্তু এখানে টাইপ অথবা পেস্ট করুন।","Type your title":"আপনার শিরোনাম টাইপ করুন",Underline:"আন্ডারলাইন",Undo:"পূর্বাবস্থায় ফেরান",Unlink:"লিঙ্কমুক্ত করুন",Update:"আপডেট করুন","Update image URL":"ছবির URL আপডেট করুন","Upload failed":"আপলোড ব্যর্থ হয়েছে","Upload from computer":"কম্পিউটার থেকে আপলোড করুন","Upload image from computer":"কম্পিউটার থেকে ছবি আপলোড করুন","Upload in progress":"আপলোড চলছে","Upper-latin":"উচ্চ-ল্যাটিন","Upper-roman":"উচ্চ-রোমান","Vertical text alignment toolbar":"উল্লম্ব টেক্সট সারিবদ্ধকরণ টুলবার",White:"সাদা","Widget toolbar":"উইজেট টুলবার",Width:"প্রস্থ","Wrap text":"টেক্সট মোড়ানো",Yellow:"হলুদ "}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ca.js b/public/static/plugs/ckeditor5/translations/ca.js
index ec3f55c44..7f9ea2df0 100644
--- a/public/static/plugs/ckeditor5/translations/ca.js
+++ b/public/static/plugs/ckeditor5/translations/ca.js
@@ -1 +1 @@
-!function(e){const a=e.ca=e.ca||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Accepta","Align cell text to the bottom":"Alinear el text de la cel·la a la part inferior","Align cell text to the center":"Alinear el text de la cel·la al centre","Align cell text to the left":"Alinear el text de la cel·la a l'esquerra","Align cell text to the middle":"Alinear el text de la cel·la al centre","Align cell text to the right":"Alinear el text de la cel·la a la dreta","Align cell text to the top":"Alinear el text de la cel·la a la part superior","Align center":"Alineació centre","Align left":"Alineació esquerra","Align right":"Alineació dreta","Align table to the left":"Alinear la taula a l'esquerra","Align table to the right":"Alinear la taula a la dreta",Alignment:"Alineació",Aquamarine:"Aiguamarina",Background:"Fons",Big:"Gran",Black:"Negre","Block quote":"Cita de bloc",Blue:"Blau",Bold:"Negreta",Border:"Vora","Break text":"Partir el text","Bulleted List":"Llista amb vinyetes","Bulleted list styles toolbar":"Barra d'eines d'estils de llista amb vinyetes",Cancel:"Cancel·lar","Caption for image: %0":"Peu de foto: %0","Caption for the image":"Peu de foto","Cell properties":"Propietats de la cel·la","Center table":"Centrar la taula","Centered image":"Imatge centrada","Change image text alternative":"Canviar l'alternativa del text de la imatge","Choose heading":"Escull capçalera",Circle:"Cercle",Clear:"Esborra","Click to edit block":"Fes clic per editar el bloc",Code:"Codi",Color:"Color","Color picker":"Selector de colors",Column:"Columna",Dashed:"De guions",Decimal:"Decimal","Decimal with leading zero":"Decimal amb un zero al davant","Decrease indent":"Reduir el sagnat",Default:"Predeterminada","Delete column":"Suprimir la columna","Delete row":"Suprimir fila","Dim grey":"Gris fosc",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Colors del document",Dotted:"De punts",Double:"Doble",Downloadable:"Es pot descarregar","Drag to move":"Arrossega per moure","Dropdown toolbar":"Barra d'eines desplegable","Edit block":"Editar bloc","Edit link":"Editar enllaç","Editor block content toolbar":"Barra d'eines de contingut del bloc de l'editor","Editor contextual toolbar":"Barra d'eines contextual de l'editor","Editor editing area: %0":"Àrea d'edició d'editor: %0","Editor toolbar":"Barra d'eines de l'editor","Enter image caption":"Introduir el peu de foto de la imatge","Enter table caption":"Introduir el peu de foto de la taula","Font Background Color":"Color de fons del tipus de lletra","Font Color":"Color del tipus de lletra","Font Family":"Font","Font Size":"Mida de la font","Full size image":"Imatge a mida completa",Green:"Verd",Grey:"Gris",Groove:"De solc","Header column":"Columna d'encapçalament","Header row":"Fila d'encapçalament",Heading:"Capçalera","Heading 1":"Capçalera 1","Heading 2":"Capçalera 2","Heading 3":"Capçalera 3","Heading 4":"Encapçalament 4","Heading 5":"Encapçalament 5","Heading 6":"Encapçalament 6",Height:"Alçada",HEX:"HEX","Horizontal line":"Línia horitzontal","Horizontal text alignment toolbar":"Barra d'eines d'alineació de text horitzontal","HTML object":"Objecte HTML",Huge:"Molt gran","Image resize list":"Llista de redimensionament de la imatge","Image toolbar":"Barra d'eines d'imatge","image widget":"giny d'imatge","In line":"A la línia","Increase indent":"Augmentar el sagnat",Insert:"Introduir","Insert column left":"Inserir columna a l'esquerra","Insert column right":"Inserir la columna a la dreta","Insert image":"Introduir la imatge","Insert image via URL":"Introduir la imatge mitjançant l'URL","Insert paragraph after block":"Inserir un paràgraf després del bloc","Insert paragraph before block":"Inserir un paràgraf abans del bloc","Insert row above":"Inserir fila a sobre","Insert row below":"Inserir la fila a continuació","Insert table":"Introduir taula",Inset:"Entrant",Italic:"Cursiva",Justify:"Justificar","Justify cell text":"Justificar el text de la cel·la","Left aligned image":"Imatge alineada a l'esquerra","Light blue":"Blau clar","Light green":"Verd clar","Light grey":"Gris clar",Link:"Enllaç","Link image":"Enllaçar imatge","Link URL":"Enllaçar URL","List properties":"Llista de propietats","Lower-latin":"Lletres llatines en minúscules","Lower–roman":"Numerals romans en minúscules","Merge cell down":"Combinar la cel·la cap avall","Merge cell left":"Combinar la cel·la a l'esquerra","Merge cell right":"Combinar la cel·la a la dreta","Merge cell up":"Combinar la cel·la cap amunt","Merge cells":"Combinar cel·les",Next:"Següent","No results found":"Sense resultats","No searchable items":"No hi ha elements de cerca",None:"Cap","Numbered List":"Llista numerada","Numbered list styles toolbar":"Barra d'eines d'estils de llista numerada","Open in a new tab":"Obrir en una pestanya nova","Open link in new tab":"Obrir l'enllaç en una pestanya nova",Orange:"Taronja",Original:"Original",Outset:"Sortint",Padding:"Padding",Paragraph:"Pàrraf","Press Enter to type after or press Shift + Enter to type before the widget":"Premeu Retorn per escriure després o premeu Maj + Retorn per escriure abans del giny",Previous:"Anterior",Purple:"Lila",Red:"Vermell",Redo:"Refer","Remove color":"Eliminar el color","Remove Format":"Esborrar el format","Replace from computer":"Substitueix-ho des de l'ordinador","Replace image":"Substitueix la imatge","Replace image from computer":"Substitueix la imatge des de l'ordinador","Resize image":"Redimensionar la imatge","Resize image to %0":"Redimensiona la imatge a %0","Resize image to the original size":"Redimensiona la imatge a la mida original","Restore default":"Restaurar el valor predeterminat","Reversed order":"Ordre invertit","Rich Text Editor":"Editor de text enriquit",Ridge:"De cresta","Right aligned image":"Imatge alineada a la dreta",Row:"Fila",Save:"Desar","Select all":"Seleccionar-ho tot","Select column":"Seleccionar columna","Select row":"Seleccionar fila","Show more items":"Mostrar més elements","Side image":"Imatge lateral",Small:"Peita",Solid:"Sòlid","Split cell horizontally":"Dividir la cel·la horitzontalment","Split cell vertically":"Dividir la cel·la verticalment",Square:"Quadrat","Start at":"Començar a","Start index must be greater than 0.":"L'índex inicial ha de ser superior a 0.",Strikethrough:"Marcat",Style:"Estil",Subscript:"Subíndex",Superscript:"Superíndex","Table alignment toolbar":"Barra d'eines d'alineació de taules","Table cell text alignment":"Alineació del text de la cel·la de la taula","Table properties":"Propietats de la taula","Table toolbar":"Barra d'eines de taula","Text alignment":"Alineació text","Text alignment toolbar":"Barra d'eines d'alineació de text","Text alternative":"Alternativa de text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'El color és invàlid. Prova "#FF0000" o "rgb(255,0,0)" o "vermell".','The value is invalid. Try "10px" or "2em" or simply "2".':'El valor és invàlid. Prova "10px" o "2em" o simplement "2".',"This link has no URL":"Aquest enllaç no té cap URL",Tiny:"Molt petita","To-do List":"Llista de tasques pendents","Toggle caption off":"Desactivar el peu de foto","Toggle caption on":"Activar el peu de foto","Toggle the circle list style":"Canviar l'estil de llista de cercles","Toggle the decimal list style":"Canviar l'estil de llista decimal","Toggle the decimal with leading zero list style":"Commutar l'estil de la llista de decimals amb un zero al davant","Toggle the disc list style":"Canviar l'estil de llista de discs","Toggle the lower–latin list style":"Canviar l'estil de la llista a lletres llatines en minúscules","Toggle the lower–roman list style":"Canviar l'estil de la llista a numerals romans en minúscules","Toggle the square list style":"Canviar l'estil de llista quadrada","Toggle the upper–latin list style":"Canviar l'estil de la llista a lletres llatines en majúscules","Toggle the upper–roman list style":"Canviar l'estil de la llista a numerals romans en majúscules",Turquoise:"Turquesa","Type or paste your content here.":"Escriu o enganxa el teu contingut aquí.","Type your title":"Escriu el teu títol",Underline:"Subrallat",Undo:"Desfer",Unlink:"Desenllaçar",Update:"Actualitzar","Update image URL":"Actualitzar l'URL de la imatge","Upload failed":"No s'ha pogut carregar","Upload from computer":"Puja-ho des de l'ordinador","Upload image from computer":"Puja la imatge des de l'ordinador","Upload in progress":"Carrega en curs","Upper-latin":"Lletres llatines en majúscules","Upper-roman":"Numerals romans en majúscules","Vertical text alignment toolbar":"Barra d'eines d'alineació de text vertical",White:"Blanc","Widget toolbar":"Barra d'eines de ginys",Width:"Amplada","Wrap text":"Embolcallar el text",Yellow:"Groc"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.ca=e.ca||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Accepta","Align cell text to the bottom":"Alinear el text de la cel·la a la part inferior","Align cell text to the center":"Alinear el text de la cel·la al centre","Align cell text to the left":"Alinear el text de la cel·la a l'esquerra","Align cell text to the middle":"Alinear el text de la cel·la al centre","Align cell text to the right":"Alinear el text de la cel·la a la dreta","Align cell text to the top":"Alinear el text de la cel·la a la part superior","Align center":"Alineació centre","Align left":"Alineació esquerra","Align right":"Alineació dreta","Align table to the left":"Alinear la taula a l'esquerra","Align table to the right":"Alinear la taula a la dreta",Alignment:"Alineació",Aquamarine:"Aiguamarina",Background:"Fons",Big:"Gran",Black:"Negre","Block quote":"Cita de bloc",Blue:"Blau",Bold:"Negreta",Border:"Vora","Break text":"Partir el text","Bulleted List":"Llista amb vinyetes","Bulleted list styles toolbar":"Barra d'eines d'estils de llista amb vinyetes",Cancel:"Cancel·lar","Caption for image: %0":"Peu de foto: %0","Caption for the image":"Peu de foto","Cell properties":"Propietats de la cel·la","Center table":"Centrar la taula","Centered image":"Imatge centrada","Change image text alternative":"Canviar l'alternativa del text de la imatge","Choose heading":"Escull capçalera",Circle:"Cercle",Clear:"Esborra","Click to edit block":"Fes clic per editar el bloc",Close:"Tanca",Code:"Codi",Color:"Color","Color picker":"Selector de colors",Column:"Columna",Dashed:"De guions",Decimal:"Decimal","Decimal with leading zero":"Decimal amb un zero al davant","Decrease indent":"Reduir el sagnat",Default:"Predeterminada","Delete column":"Suprimir la columna","Delete row":"Suprimir fila","Dim grey":"Gris fosc",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Colors del document",Dotted:"De punts",Double:"Doble",Downloadable:"Es pot descarregar","Drag to move":"Arrossega per moure","Dropdown toolbar":"Barra d'eines desplegable","Edit block":"Editar bloc","Edit link":"Editar enllaç","Editor block content toolbar":"Barra d'eines de contingut del bloc de l'editor","Editor contextual toolbar":"Barra d'eines contextual de l'editor","Editor dialog":"Diàleg de l'editor","Editor editing area: %0":"Àrea d'edició d'editor: %0","Editor toolbar":"Barra d'eines de l'editor","Enter image caption":"Introduir el peu de foto de la imatge","Enter table caption":"Introduir el peu de foto de la taula","Font Background Color":"Color de fons del tipus de lletra","Font Color":"Color del tipus de lletra","Font Family":"Font","Font Size":"Mida de la font","Full size image":"Imatge a mida completa",Green:"Verd",Grey:"Gris",Groove:"De solc","Header column":"Columna d'encapçalament","Header row":"Fila d'encapçalament",Heading:"Capçalera","Heading 1":"Capçalera 1","Heading 2":"Capçalera 2","Heading 3":"Capçalera 3","Heading 4":"Encapçalament 4","Heading 5":"Encapçalament 5","Heading 6":"Encapçalament 6",Height:"Alçada",HEX:"HEX","Horizontal line":"Línia horitzontal","Horizontal text alignment toolbar":"Barra d'eines d'alineació de text horitzontal","HTML object":"Objecte HTML",Huge:"Molt gran","Image resize list":"Llista de redimensionament de la imatge","Image toolbar":"Barra d'eines d'imatge","image widget":"giny d'imatge","In line":"A la línia","Increase indent":"Augmentar el sagnat",Insert:"Introduir","Insert column left":"Inserir columna a l'esquerra","Insert column right":"Inserir la columna a la dreta","Insert image":"Introduir la imatge","Insert image via URL":"Introduir la imatge mitjançant l'URL","Insert paragraph after block":"Inserir un paràgraf després del bloc","Insert paragraph before block":"Inserir un paràgraf abans del bloc","Insert row above":"Inserir fila a sobre","Insert row below":"Inserir la fila a continuació","Insert table":"Introduir taula",Inset:"Entrant",Italic:"Cursiva",Justify:"Justificar","Justify cell text":"Justificar el text de la cel·la","Left aligned image":"Imatge alineada a l'esquerra","Light blue":"Blau clar","Light green":"Verd clar","Light grey":"Gris clar",Link:"Enllaç","Link image":"Enllaçar imatge","Link URL":"Enllaçar URL","List properties":"Llista de propietats","Lower-latin":"Lletres llatines en minúscules","Lower–roman":"Numerals romans en minúscules","Merge cell down":"Combinar la cel·la cap avall","Merge cell left":"Combinar la cel·la a l'esquerra","Merge cell right":"Combinar la cel·la a la dreta","Merge cell up":"Combinar la cel·la cap amunt","Merge cells":"Combinar cel·les",Next:"Següent","No results found":"Sense resultats","No searchable items":"No hi ha elements de cerca",None:"Cap","Numbered List":"Llista numerada","Numbered list styles toolbar":"Barra d'eines d'estils de llista numerada","Open in a new tab":"Obrir en una pestanya nova","Open link in new tab":"Obrir l'enllaç en una pestanya nova",Orange:"Taronja",Original:"Original",Outset:"Sortint",Padding:"Padding",Paragraph:"Pàrraf","Press Enter to type after or press Shift + Enter to type before the widget":"Premeu Retorn per escriure després o premeu Maj + Retorn per escriure abans del giny",Previous:"Anterior",Purple:"Lila",Red:"Vermell",Redo:"Refer","Remove color":"Eliminar el color","Remove Format":"Esborrar el format","Replace from computer":"Substitueix-ho des de l'ordinador","Replace image":"Substitueix la imatge","Replace image from computer":"Substitueix la imatge des de l'ordinador","Resize image":"Redimensionar la imatge","Resize image to %0":"Redimensiona la imatge a %0","Resize image to the original size":"Redimensiona la imatge a la mida original","Restore default":"Restaurar el valor predeterminat","Reversed order":"Ordre invertit","Rich Text Editor":"Editor de text enriquit",Ridge:"De cresta","Right aligned image":"Imatge alineada a la dreta",Row:"Fila",Save:"Desar","Select all":"Seleccionar-ho tot","Select column":"Seleccionar columna","Select row":"Seleccionar fila","Show more items":"Mostrar més elements","Side image":"Imatge lateral",Small:"Peita",Solid:"Sòlid","Split cell horizontally":"Dividir la cel·la horitzontalment","Split cell vertically":"Dividir la cel·la verticalment",Square:"Quadrat","Start at":"Començar a","Start index must be greater than 0.":"L'índex inicial ha de ser superior a 0.",Strikethrough:"Marcat",Style:"Estil",Subscript:"Subíndex",Superscript:"Superíndex","Table alignment toolbar":"Barra d'eines d'alineació de taules","Table cell text alignment":"Alineació del text de la cel·la de la taula","Table properties":"Propietats de la taula","Table toolbar":"Barra d'eines de taula","Text alignment":"Alineació text","Text alignment toolbar":"Barra d'eines d'alineació de text","Text alternative":"Alternativa de text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'El color és invàlid. Prova "#FF0000" o "rgb(255,0,0)" o "vermell".','The value is invalid. Try "10px" or "2em" or simply "2".':'El valor és invàlid. Prova "10px" o "2em" o simplement "2".',"This link has no URL":"Aquest enllaç no té cap URL",Tiny:"Molt petita","To-do List":"Llista de tasques pendents","Toggle caption off":"Desactivar el peu de foto","Toggle caption on":"Activar el peu de foto","Toggle the circle list style":"Canviar l'estil de llista de cercles","Toggle the decimal list style":"Canviar l'estil de llista decimal","Toggle the decimal with leading zero list style":"Commutar l'estil de la llista de decimals amb un zero al davant","Toggle the disc list style":"Canviar l'estil de llista de discs","Toggle the lower–latin list style":"Canviar l'estil de la llista a lletres llatines en minúscules","Toggle the lower–roman list style":"Canviar l'estil de la llista a numerals romans en minúscules","Toggle the square list style":"Canviar l'estil de llista quadrada","Toggle the upper–latin list style":"Canviar l'estil de la llista a lletres llatines en majúscules","Toggle the upper–roman list style":"Canviar l'estil de la llista a numerals romans en majúscules",Turquoise:"Turquesa","Type or paste your content here.":"Escriu o enganxa el teu contingut aquí.","Type your title":"Escriu el teu títol",Underline:"Subrallat",Undo:"Desfer",Unlink:"Desenllaçar",Update:"Actualitzar","Update image URL":"Actualitzar l'URL de la imatge","Upload failed":"No s'ha pogut carregar","Upload from computer":"Puja-ho des de l'ordinador","Upload image from computer":"Puja la imatge des de l'ordinador","Upload in progress":"Carrega en curs","Upper-latin":"Lletres llatines en majúscules","Upper-roman":"Numerals romans en majúscules","Vertical text alignment toolbar":"Barra d'eines d'alineació de text vertical",White:"Blanc","Widget toolbar":"Barra d'eines de ginys",Width:"Amplada","Wrap text":"Embolcallar el text",Yellow:"Groc"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/cs.js b/public/static/plugs/ckeditor5/translations/cs.js
index 1aafab0b7..29affa0f5 100644
--- a/public/static/plugs/ckeditor5/translations/cs.js
+++ b/public/static/plugs/ckeditor5/translations/cs.js
@@ -1 +1 @@
-!function(e){const t=e.cs=e.cs||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 z %1",Accept:"Přijmout","Align cell text to the bottom":"Zarovnat text buňky dolů","Align cell text to the center":"Zarovnat text buňky na střed","Align cell text to the left":"Zarovnat text buňky doleva","Align cell text to the middle":"Zarovnat text buňky na střed","Align cell text to the right":"Zarovnat text buňky doprava","Align cell text to the top":"Zarovnat text buňky nahoru","Align center":"Zarovnat na střed","Align left":"Zarovnat vlevo","Align right":"Zarovnat vpravo","Align table to the left":"Zarovnat tabulku doleva","Align table to the right":"Zarovnat tabulku doprava",Alignment:"Zarovnání",Aquamarine:"Akvamarínová",Background:"Pozadí",Big:"Velké",Black:"Černá","Block quote":"Citace",Blue:"Modrá",Bold:"Tučné",Border:"Okraj","Break text":"Obtékání textu","Bulleted List":"Odrážky","Bulleted list styles toolbar":"Panel seznamu s odrážkami",Cancel:"Zrušit","Caption for image: %0":"Popisek k obrázku: %0","Caption for the image":"Popisek k obrázku","Cell properties":"Vlastnosti buňky","Center table":"Centrovat tabulku","Centered image":"Obrázek zarovnaný na střed","Change image text alternative":"Změnit alternativní text obrázku","Choose heading":"Zvolte nadpis",Circle:"Kruh",Clear:"Smazat","Click to edit block":"Kliknutím upravíte blok",Code:"Kódový blok",Color:"Barva","Color picker":"Vybrat barvu",Column:"Sloupec",Dashed:"Čárkovaná",Decimal:"Čísla","Decimal with leading zero":"Čísla s nulou na začátku","Decrease indent":"Zmenšit odsazení",Default:"Výchozí","Delete column":"Smazat sloupec","Delete row":"Smazat řádek","Dim grey":"Tmavě šedá",Dimensions:"Rozměry",Disc:"Plný kruh","Document colors":"Barvy dokumentu",Dotted:"Tečkovaná",Double:"Dvojitá",Downloadable:"Ke stažení","Drag to move":"Přesuňte potažením","Dropdown toolbar":"Rozbalovací panel nástrojů","Edit block":"Upravit blok","Edit link":"Upravit odkaz","Editor block content toolbar":"Panel nástrojů obsahu bloku editoru","Editor contextual toolbar":"Kontextový panel nástrojů editoru","Editor editing area: %0":"Editační oblast editoru: %0","Editor toolbar":"Panel nástrojů editoru","Enter image caption":"Zadejte popis obrázku","Enter table caption":"Zadejte titulek tabulky","Font Background Color":"Barva pozadí písma","Font Color":"Barva písma","Font Family":"Typ písma","Font Size":"Velikost písma","Full size image":"Obrázek v plné velikosti",Green:"Zelená",Grey:"Šedá",Groove:"Drážkovaná","Header column":"Sloupec záhlaví","Header row":"Řádek záhlaví",Heading:"Nadpis","Heading 1":"Nadpis 1","Heading 2":"Nadpis 2","Heading 3":"Nadpis 3","Heading 4":"Nadpis 4","Heading 5":"Nadpis 5","Heading 6":"Nadpis 6",Height:"Výška",HEX:"HEX","Horizontal line":"Vodorovná čára","Horizontal text alignment toolbar":"Horizontální zarovnání textu v panelu","HTML object":"HTML objekt",Huge:"Obrovské","Image resize list":"Seznam možností změny velikosti","Image toolbar":"Panel nástrojů obrázku","image widget":"ovládací prvek obrázku","In line":"Rovnoběžně s textem","Increase indent":"Zvětšit odsazení",Insert:"Vložit","Insert column left":"Vložit sloupec vlevo","Insert column right":"Vložit sloupec vpravo","Insert image":"Vložit obrázek","Insert image via URL":"Vložit obrázek pomocí URL","Insert paragraph after block":"Vložte odstavec za blok","Insert paragraph before block":"Vložte odstavec před blok","Insert row above":"Vložit řádek před","Insert row below":"Vložit řádek pod","Insert table":"Vložit tabulku",Inset:"Vložená zevnitř",Italic:"Kurzíva",Justify:"Zarovnat do bloku","Justify cell text":"Zarovnat text buňky z obou stran","Left aligned image":"Obrázek zarovnaný vlevo","Light blue":"Světle modrá","Light green":"Světle zelená","Light grey":"Světle šedá",Link:"Odkaz","Link image":"Adresa obrázku","Link URL":"URL odkazu","List properties":"Vlastnosti seznamu","Lower-latin":"Malá písmena","Lower–roman":"Malé římské čísla","Merge cell down":"Sloučit s buňkou pod","Merge cell left":"Sloučit s buňkou vlevo","Merge cell right":"Sloučit s buňkou vpravo","Merge cell up":"Sloučit s buňkou nad","Merge cells":"Sloučit buňky",Next:"Další","No results found":"Nenalezeny žádné výsledky","No searchable items":"Žádné položky k vyhledání",None:"Žádná","Numbered List":"Číslování","Numbered list styles toolbar":"Panel se styly číslovaného seznamu","Open in a new tab":"Otevřít v nové kartě","Open link in new tab":"Otevřít odkaz v nové kartě",Orange:"Oranžová",Original:"Originální",Outset:"Vložená zvenku",Padding:"Vnitřní okraj",Paragraph:"Odstavec","Press Enter to type after or press Shift + Enter to type before the widget":"Stisknutím klávesy Enter můžete psát za widgetem a stisknutím Shift + Enter před ním",Previous:"Předchozí",Purple:"Fialová",Red:"Červená",Redo:"Znovu","Remove color":"Odstranit barvu","Remove Format":"Odstranit formátování","Replace from computer":"Nahradit z počítače","Replace image":"Nahradit obrázek","Replace image from computer":"Nahradit obrázek z počítače","Resize image":"Změnit velikost","Resize image to %0":"Změnit velikost na %0","Resize image to the original size":"Změnit velikost na původní velikost","Restore default":"Obnovit výchozí","Reversed order":"Obrácené pořadí","Rich Text Editor":"Textový editor",Ridge:"Rámovaná","Right aligned image":"Obrázek zarovnaný vpravo",Row:"Řádek",Save:"Uložit","Select all":"Vybrat vše","Select column":"Vybrat sloupec","Select row":"Vybrat řádek","Show more items":"Zobrazit další položky","Side image":"Postranní obrázek",Small:"Malé",Solid:"Plná","Split cell horizontally":"Rozdělit buňky horizontálně","Split cell vertically":"Rozdělit buňky vertikálně",Square:"Čtverec","Start at":"Začít na","Start index must be greater than 0.":"Počátek musí být větší jak 0.",Strikethrough:"Přeškrtnuté",Style:"Styl",Subscript:"Dolní index",Superscript:"Horní index","Table alignment toolbar":"Panel zarovnání tabulky","Table cell text alignment":"Zarovnání textu buňky tabulky","Table properties":"Vlastnosti tabulky","Table toolbar":"Panel nástrojů tabulky","Text alignment":"Zarovnání textu","Text alignment toolbar":"Panel nástrojů zarovnání textu","Text alternative":"Alternativní text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Barva má nesprávný formát. Zkuste "#FF0000", "rgb(255,0,0)" nebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávná. Zkuste "10px", "2em" nebo jednoduše "2".',"This link has no URL":"Tento odkaz nemá žádnou URL",Tiny:"Drobné","To-do List":"Seznam úkolů","Toggle caption off":"Vypnout titulek","Toggle caption on":"Zapnout titulek","Toggle the circle list style":"Přepnout na seznam s kruhovým označením","Toggle the decimal list style":"Přepnout na číselný seznam","Toggle the decimal with leading zero list style":"Přepnout na číselný seznam s nulou na začátku","Toggle the disc list style":"Přepnout na seznam s označením plného kruhu","Toggle the lower–latin list style":"Přepnout na seznam s malými písmeny","Toggle the lower–roman list style":"Přepnout na seznam s malými římskými čísly","Toggle the square list style":"Přepnout na seznam se čtvercovým označením","Toggle the upper–latin list style":"Přepnout na seznam s velkými písmeny","Toggle the upper–roman list style":"Přepnout na seznam s velkými římskými čísly",Turquoise:"Tyrkysová","Type or paste your content here.":"Zde zadejte nebo vložte obsah.","Type your title":"Sem zadejte název",Underline:"Podtržené",Undo:"Zpět",Unlink:"Odstranit odkaz",Update:"Aktualizovat","Update image URL":"Aktualizovat URL obrázku","Upload failed":"Nahrání selhalo","Upload from computer":"Nahrát z počítače","Upload image from computer":"Nahrát obrázek z počítače","Upload in progress":"Probíhá nahrávání","Upper-latin":"Velká písmena","Upper-roman":"Velké římské čísla","Vertical text alignment toolbar":"Vertikální zarovnání textu v panelu",White:"Bílá","Widget toolbar":"Panel nástrojů ovládacího prvku",Width:"Šířka","Wrap text":"Text nahoře a dole",Yellow:"Žlutá"}),t.getPluralForm=function(e){return 1==e&&e%1==0?0:e>=2&&e<=4&&e%1==0?1:e%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.cs=e.cs||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 z %1",Accept:"Přijmout","Align cell text to the bottom":"Zarovnat text buňky dolů","Align cell text to the center":"Zarovnat text buňky na střed","Align cell text to the left":"Zarovnat text buňky doleva","Align cell text to the middle":"Zarovnat text buňky na střed","Align cell text to the right":"Zarovnat text buňky doprava","Align cell text to the top":"Zarovnat text buňky nahoru","Align center":"Zarovnat na střed","Align left":"Zarovnat vlevo","Align right":"Zarovnat vpravo","Align table to the left":"Zarovnat tabulku doleva","Align table to the right":"Zarovnat tabulku doprava",Alignment:"Zarovnání",Aquamarine:"Akvamarínová",Background:"Pozadí",Big:"Velké",Black:"Černá","Block quote":"Citace",Blue:"Modrá",Bold:"Tučné",Border:"Okraj","Break text":"Obtékání textu","Bulleted List":"Odrážky","Bulleted list styles toolbar":"Panel seznamu s odrážkami",Cancel:"Zrušit","Caption for image: %0":"Popisek k obrázku: %0","Caption for the image":"Popisek k obrázku","Cell properties":"Vlastnosti buňky","Center table":"Centrovat tabulku","Centered image":"Obrázek zarovnaný na střed","Change image text alternative":"Změnit alternativní text obrázku","Choose heading":"Zvolte nadpis",Circle:"Kruh",Clear:"Smazat","Click to edit block":"Kliknutím upravíte blok",Close:"Zavřít",Code:"Kódový blok",Color:"Barva","Color picker":"Vybrat barvu",Column:"Sloupec",Dashed:"Čárkovaná",Decimal:"Čísla","Decimal with leading zero":"Čísla s nulou na začátku","Decrease indent":"Zmenšit odsazení",Default:"Výchozí","Delete column":"Smazat sloupec","Delete row":"Smazat řádek","Dim grey":"Tmavě šedá",Dimensions:"Rozměry",Disc:"Plný kruh","Document colors":"Barvy dokumentu",Dotted:"Tečkovaná",Double:"Dvojitá",Downloadable:"Ke stažení","Drag to move":"Přesuňte potažením","Dropdown toolbar":"Rozbalovací panel nástrojů","Edit block":"Upravit blok","Edit link":"Upravit odkaz","Editor block content toolbar":"Panel nástrojů obsahu bloku editoru","Editor contextual toolbar":"Kontextový panel nástrojů editoru","Editor dialog":"Dialog editoru","Editor editing area: %0":"Editační oblast editoru: %0","Editor toolbar":"Panel nástrojů editoru","Enter image caption":"Zadejte popis obrázku","Enter table caption":"Zadejte titulek tabulky","Font Background Color":"Barva pozadí písma","Font Color":"Barva písma","Font Family":"Typ písma","Font Size":"Velikost písma","Full size image":"Obrázek v plné velikosti",Green:"Zelená",Grey:"Šedá",Groove:"Drážkovaná","Header column":"Sloupec záhlaví","Header row":"Řádek záhlaví",Heading:"Nadpis","Heading 1":"Nadpis 1","Heading 2":"Nadpis 2","Heading 3":"Nadpis 3","Heading 4":"Nadpis 4","Heading 5":"Nadpis 5","Heading 6":"Nadpis 6",Height:"Výška",HEX:"HEX","Horizontal line":"Vodorovná čára","Horizontal text alignment toolbar":"Horizontální zarovnání textu v panelu","HTML object":"HTML objekt",Huge:"Obrovské","Image resize list":"Seznam možností změny velikosti","Image toolbar":"Panel nástrojů obrázku","image widget":"ovládací prvek obrázku","In line":"Rovnoběžně s textem","Increase indent":"Zvětšit odsazení",Insert:"Vložit","Insert column left":"Vložit sloupec vlevo","Insert column right":"Vložit sloupec vpravo","Insert image":"Vložit obrázek","Insert image via URL":"Vložit obrázek pomocí URL","Insert paragraph after block":"Vložte odstavec za blok","Insert paragraph before block":"Vložte odstavec před blok","Insert row above":"Vložit řádek před","Insert row below":"Vložit řádek pod","Insert table":"Vložit tabulku",Inset:"Vložená zevnitř",Italic:"Kurzíva",Justify:"Zarovnat do bloku","Justify cell text":"Zarovnat text buňky z obou stran","Left aligned image":"Obrázek zarovnaný vlevo","Light blue":"Světle modrá","Light green":"Světle zelená","Light grey":"Světle šedá",Link:"Odkaz","Link image":"Adresa obrázku","Link URL":"URL odkazu","List properties":"Vlastnosti seznamu","Lower-latin":"Malá písmena","Lower–roman":"Malé římské čísla","Merge cell down":"Sloučit s buňkou pod","Merge cell left":"Sloučit s buňkou vlevo","Merge cell right":"Sloučit s buňkou vpravo","Merge cell up":"Sloučit s buňkou nad","Merge cells":"Sloučit buňky",Next:"Další","No results found":"Nenalezeny žádné výsledky","No searchable items":"Žádné položky k vyhledání",None:"Žádná","Numbered List":"Číslování","Numbered list styles toolbar":"Panel se styly číslovaného seznamu","Open in a new tab":"Otevřít v nové kartě","Open link in new tab":"Otevřít odkaz v nové kartě",Orange:"Oranžová",Original:"Originální",Outset:"Vložená zvenku",Padding:"Vnitřní okraj",Paragraph:"Odstavec","Press Enter to type after or press Shift + Enter to type before the widget":"Stisknutím klávesy Enter můžete psát za widgetem a stisknutím Shift + Enter před ním",Previous:"Předchozí",Purple:"Fialová",Red:"Červená",Redo:"Znovu","Remove color":"Odstranit barvu","Remove Format":"Odstranit formátování","Replace from computer":"Nahradit z počítače","Replace image":"Nahradit obrázek","Replace image from computer":"Nahradit obrázek z počítače","Resize image":"Změnit velikost","Resize image to %0":"Změnit velikost na %0","Resize image to the original size":"Změnit velikost na původní velikost","Restore default":"Obnovit výchozí","Reversed order":"Obrácené pořadí","Rich Text Editor":"Textový editor",Ridge:"Rámovaná","Right aligned image":"Obrázek zarovnaný vpravo",Row:"Řádek",Save:"Uložit","Select all":"Vybrat vše","Select column":"Vybrat sloupec","Select row":"Vybrat řádek","Show more items":"Zobrazit další položky","Side image":"Postranní obrázek",Small:"Malé",Solid:"Plná","Split cell horizontally":"Rozdělit buňky horizontálně","Split cell vertically":"Rozdělit buňky vertikálně",Square:"Čtverec","Start at":"Začít na","Start index must be greater than 0.":"Počátek musí být větší jak 0.",Strikethrough:"Přeškrtnuté",Style:"Styl",Subscript:"Dolní index",Superscript:"Horní index","Table alignment toolbar":"Panel zarovnání tabulky","Table cell text alignment":"Zarovnání textu buňky tabulky","Table properties":"Vlastnosti tabulky","Table toolbar":"Panel nástrojů tabulky","Text alignment":"Zarovnání textu","Text alignment toolbar":"Panel nástrojů zarovnání textu","Text alternative":"Alternativní text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Barva má nesprávný formát. Zkuste "#FF0000", "rgb(255,0,0)" nebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávná. Zkuste "10px", "2em" nebo jednoduše "2".',"This link has no URL":"Tento odkaz nemá žádnou URL",Tiny:"Drobné","To-do List":"Seznam úkolů","Toggle caption off":"Vypnout titulek","Toggle caption on":"Zapnout titulek","Toggle the circle list style":"Přepnout na seznam s kruhovým označením","Toggle the decimal list style":"Přepnout na číselný seznam","Toggle the decimal with leading zero list style":"Přepnout na číselný seznam s nulou na začátku","Toggle the disc list style":"Přepnout na seznam s označením plného kruhu","Toggle the lower–latin list style":"Přepnout na seznam s malými písmeny","Toggle the lower–roman list style":"Přepnout na seznam s malými římskými čísly","Toggle the square list style":"Přepnout na seznam se čtvercovým označením","Toggle the upper–latin list style":"Přepnout na seznam s velkými písmeny","Toggle the upper–roman list style":"Přepnout na seznam s velkými římskými čísly",Turquoise:"Tyrkysová","Type or paste your content here.":"Zde zadejte nebo vložte obsah.","Type your title":"Sem zadejte název",Underline:"Podtržené",Undo:"Zpět",Unlink:"Odstranit odkaz",Update:"Aktualizovat","Update image URL":"Aktualizovat URL obrázku","Upload failed":"Nahrání selhalo","Upload from computer":"Nahrát z počítače","Upload image from computer":"Nahrát obrázek z počítače","Upload in progress":"Probíhá nahrávání","Upper-latin":"Velká písmena","Upper-roman":"Velké římské čísla","Vertical text alignment toolbar":"Vertikální zarovnání textu v panelu",White:"Bílá","Widget toolbar":"Panel nástrojů ovládacího prvku",Width:"Šířka","Wrap text":"Text nahoře a dole",Yellow:"Žlutá"}),t.getPluralForm=function(e){return 1==e&&e%1==0?0:e>=2&&e<=4&&e%1==0?1:e%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/da.js b/public/static/plugs/ckeditor5/translations/da.js
index 9d978a074..b29bb178f 100644
--- a/public/static/plugs/ckeditor5/translations/da.js
+++ b/public/static/plugs/ckeditor5/translations/da.js
@@ -1 +1 @@
-!function(e){const t=e.da=e.da||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 af %1",Accept:"Accepter","Align cell text to the bottom":"Justér tekstcelle til bunden","Align cell text to the center":"Justér tekstcelle centreret","Align cell text to the left":"Justér tekstcelle til venstre","Align cell text to the middle":"Justér tekstcelle til midten","Align cell text to the right":"Justér tekstcelle til højre","Align cell text to the top":"Justér tekstcelle til top","Align center":"Justér center","Align left":"Justér venstre","Align right":"Justér højre","Align table to the left":"Justér tabel til venstre","Align table to the right":"Justér tabel til højre",Alignment:"Justering",Aquamarine:"Marineblå",Background:"Baggrund",Big:"Stor",Black:"Sort","Block quote":"Blot citat",Blue:"Blå",Bold:"Fed",Border:"Ramme","Break text":"Opdel tekst","Bulleted List":"Punktopstilling","Bulleted list styles toolbar":"Værktøjslinje til punktopdelt liste",Cancel:"Annullér","Caption for image: %0":"Billedtekst for billede: %0","Caption for the image":"Billedtekst for billedet","Cell properties":"Celleegenskaber","Center table":"Centrér tabel","Centered image":"Centreret billede","Change image text alternative":"Skift alternativ billedtekst","Choose heading":"Vælg overskrift",Circle:"Cirkel",Clear:"Ryd","Click to edit block":"Klik for at redigere blok",Code:"Kode",Color:"Farve","Color picker":"Farvevælger",Column:"Kolonne",Dashed:"Stiplet (streg)",Decimal:"Decimal","Decimal with leading zero":"Decimal med nul i starten","Decrease indent":"Formindsk indrykning",Default:"Standard","Delete column":"Slet kolonne","Delete row":"Slet række","Dim grey":"Dunkel grå",Dimensions:"Dimensioner",Disc:"Disk","Document colors":"Dokumentfarve",Dotted:"Stiplet (prik)",Double:"Dobbel",Downloadable:"Kan downloades","Drag to move":"Træk for at flytte","Dropdown toolbar":"Dropdown værktøjslinje","Edit block":"Redigér blok","Edit link":"Redigér link","Editor block content toolbar":"Redigeringskasse indholdsværktøjslinje","Editor contextual toolbar":"Kontekstuel værktøjslinje til redigeringsprogram","Editor editing area: %0":"Redigeringsområde: %0","Editor toolbar":"Editor værktøjslinje","Enter image caption":"Indtast billedoverskrift","Enter table caption":"Indtast tabeltekst","Font Background Color":"Skrift baggrundsfarve","Font Color":"Skriftfarve","Font Family":"Skriftfamilie","Font Size":"Skriftstørrelse","Full size image":"Fuld billedstørrelse",Green:"Grøn",Grey:"Grå",Groove:"Not","Header column":"Headerkolonne","Header row":"Headerrække",Heading:"Overskrift","Heading 1":"Overskrift 1","Heading 2":"Overskrift 2","Heading 3":"Overskrift 3","Heading 4":"Overskrift 4","Heading 5":"Overskrift 5","Heading 6":"Overskrift 6",Height:"Højde",HEX:"Hex","Horizontal line":"Horisontal linje","Horizontal text alignment toolbar":"Horisontal tekstjustering værktøjslinje","HTML object":"HTML-objekt",Huge:"Kæmpe","Image resize list":"Liste over justering af billedstørrelse","Image toolbar":"Billedværktøjslinje","image widget":"billed widget","In line":"På linje","Increase indent":"Forøg indrykning",Insert:"Indsæt","Insert column left":"Indsæt kolonne venstre","Insert column right":"Indsæt kolonne højre","Insert image":"Indsæt billede","Insert image via URL":"Indsæt billede via URL","Insert paragraph after block":"Indsæt paragraf efter blok","Insert paragraph before block":"Indsæt paragraf før blok","Insert row above":"Indsæt header over","Insert row below":"Indsæt header under","Insert table":"Indsæt tabel",Inset:"Forsænket",Italic:"Kursiv",Justify:"Justér","Justify cell text":"Justér tekstcelle","Left aligned image":"Venstrestillet billede","Light blue":"Lys blå","Light green":"Lys grøn","Light grey":"Lys grå",Link:"Link","Link image":"Link-billede","Link URL":"Link URL","List properties":"Listeegenskaber","Lower-latin":"Latinsk med små bogstaver","Lower–roman":"Romertal med små bogstaver","Merge cell down":"Flet celler ned","Merge cell left":"Flet celler venstre","Merge cell right":"Flet celler højre","Merge cell up":"Flet celler op","Merge cells":"Flet celler",Next:"Næste","No results found":"Ingen resultater blev fundet","No searchable items":"Ingen søgbare artikler",None:"Ingen","Numbered List":"Opstilling med tal","Numbered list styles toolbar":"Værktøjslinje til nummereret listestil","Open in a new tab":"Åben i ny fane","Open link in new tab":"Åben link i ny fane",Orange:"Orange",Original:"Original",Outset:"Fra starten",Padding:"Fyld",Paragraph:"Afsnit","Press Enter to type after or press Shift + Enter to type before the widget":"Tryk på Enter for at skrive efter, eller tryk på Shift + Enter for at skrive før widgetten",Previous:"Forrige",Purple:"Lilla",Red:"Rød",Redo:"Gentag","Remove color":"Fjern farve","Remove Format":"Fjern format","Replace from computer":"Udskift fra computer","Replace image":"Udskift billede","Replace image from computer":"Udskift billede fra computer","Resize image":"Juster billedstørrelse","Resize image to %0":"Juster billedstørrelse til %0","Resize image to the original size":"Juster billedstørrelse til original størrelse","Restore default":"Nulstil","Reversed order":"Omvendt rækkefølge","Rich Text Editor":"Wysiwyg editor",Ridge:"Kam","Right aligned image":"Højrestillet billede",Row:"Række",Save:"Gem","Select all":"Vælg alt","Select column":"Vælg kolonne","Select row":"Vælg række","Show more items":"Vis flere emner","Side image":"Sidebillede",Small:"Lille",Solid:"Massiv","Split cell horizontally":"Del celle horisontalt","Split cell vertically":"Del celle vertikalt",Square:"Firkant","Start at":"Start ved","Start index must be greater than 0.":"Startindeks skal være større end 0.",Strikethrough:"Gennemstreg",Style:"Stil",Subscript:"Sænket skrift",Superscript:"Hævet skrift","Table alignment toolbar":"Tabeljustering værktøjslinje","Table cell text alignment":"Tabelcelle tekstjustering","Table properties":"Tabelegenskaber","Table toolbar":"Tabel værktøjslinje","Text alignment":"Tekstjustering","Text alignment toolbar":"Tekstjustering værktøjslinje","Text alternative":"Alternativ tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farven er ugyldig. Prøv "#FF0000" eller "rgb(255,0,0)" eller "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Værdien er ugyldig. Prøv "10px" eller "2em" eller ganske enkelt "2".',"This link has no URL":"Dette link har ingen URL",Tiny:"Lillebitte","To-do List":"To-do liste","Toggle caption off":"Slå billedtekst fra","Toggle caption on":"Slå billedtekst til","Toggle the circle list style":"Slå listestilen cirkel til og fra","Toggle the decimal list style":"Slå listestilen decimal til og fra","Toggle the decimal with leading zero list style":"Slå listestilen decimal med nul i starten til og fra","Toggle the disc list style":"Slå listestilen disk til og fra","Toggle the lower–latin list style":"Slå listestilen latinsk med små bogstaver til","Toggle the lower–roman list style":"Slå listestilen romertal med små bogstaver til","Toggle the square list style":"Slå listestilen firkantet til og fra","Toggle the upper–latin list style":"Slå listestilen latinsk med store bogstaver til","Toggle the upper–roman list style":"Slå listestilen romertal med store bogstaver til",Turquoise:"Turkis","Type or paste your content here.":"Skriv eller indsæt dit indhold her.","Type your title":"Skriv din titel",Underline:"Understreget",Undo:"Fortryd",Unlink:"Fjern link",Update:"Opdater","Update image URL":"Opdater billed-URL","Upload failed":"Upload fejlede","Upload from computer":"Upload fra computer","Upload image from computer":"Upload billede fra computer","Upload in progress":"Upload i gang","Upper-latin":"Latinsk med store bogstaver","Upper-roman":"Romertal med store bogstaver","Vertical text alignment toolbar":"Vertikal tekstjustering værktøjslinje",White:"Hvid","Widget toolbar":"Widget værktøjslinje",Width:"Bredde","Wrap text":"Ombryd tekst",Yellow:"Gyl"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.da=e.da||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 af %1",Accept:"Accepter","Align cell text to the bottom":"Justér tekstcelle til bunden","Align cell text to the center":"Justér tekstcelle centreret","Align cell text to the left":"Justér tekstcelle til venstre","Align cell text to the middle":"Justér tekstcelle til midten","Align cell text to the right":"Justér tekstcelle til højre","Align cell text to the top":"Justér tekstcelle til top","Align center":"Justér center","Align left":"Justér venstre","Align right":"Justér højre","Align table to the left":"Justér tabel til venstre","Align table to the right":"Justér tabel til højre",Alignment:"Justering",Aquamarine:"Marineblå",Background:"Baggrund",Big:"Stor",Black:"Sort","Block quote":"Blot citat",Blue:"Blå",Bold:"Fed",Border:"Ramme","Break text":"Opdel tekst","Bulleted List":"Punktopstilling","Bulleted list styles toolbar":"Værktøjslinje til punktopdelt liste",Cancel:"Annullér","Caption for image: %0":"Billedtekst for billede: %0","Caption for the image":"Billedtekst for billedet","Cell properties":"Celleegenskaber","Center table":"Centrér tabel","Centered image":"Centreret billede","Change image text alternative":"Skift alternativ billedtekst","Choose heading":"Vælg overskrift",Circle:"Cirkel",Clear:"Ryd","Click to edit block":"Klik for at redigere blok",Close:"Luk",Code:"Kode",Color:"Farve","Color picker":"Farvevælger",Column:"Kolonne",Dashed:"Stiplet (streg)",Decimal:"Decimal","Decimal with leading zero":"Decimal med nul i starten","Decrease indent":"Formindsk indrykning",Default:"Standard","Delete column":"Slet kolonne","Delete row":"Slet række","Dim grey":"Dunkel grå",Dimensions:"Dimensioner",Disc:"Disk","Document colors":"Dokumentfarve",Dotted:"Stiplet (prik)",Double:"Dobbel",Downloadable:"Kan downloades","Drag to move":"Træk for at flytte","Dropdown toolbar":"Dropdown værktøjslinje","Edit block":"Redigér blok","Edit link":"Redigér link","Editor block content toolbar":"Redigeringskasse indholdsværktøjslinje","Editor contextual toolbar":"Kontekstuel værktøjslinje til redigeringsprogram","Editor dialog":"Editor-dialog","Editor editing area: %0":"Redigeringsområde: %0","Editor toolbar":"Editor værktøjslinje","Enter image caption":"Indtast billedoverskrift","Enter table caption":"Indtast tabeltekst","Font Background Color":"Skrift baggrundsfarve","Font Color":"Skriftfarve","Font Family":"Skriftfamilie","Font Size":"Skriftstørrelse","Full size image":"Fuld billedstørrelse",Green:"Grøn",Grey:"Grå",Groove:"Not","Header column":"Headerkolonne","Header row":"Headerrække",Heading:"Overskrift","Heading 1":"Overskrift 1","Heading 2":"Overskrift 2","Heading 3":"Overskrift 3","Heading 4":"Overskrift 4","Heading 5":"Overskrift 5","Heading 6":"Overskrift 6",Height:"Højde",HEX:"Hex","Horizontal line":"Horisontal linje","Horizontal text alignment toolbar":"Horisontal tekstjustering værktøjslinje","HTML object":"HTML-objekt",Huge:"Kæmpe","Image resize list":"Liste over justering af billedstørrelse","Image toolbar":"Billedværktøjslinje","image widget":"billed widget","In line":"På linje","Increase indent":"Forøg indrykning",Insert:"Indsæt","Insert column left":"Indsæt kolonne venstre","Insert column right":"Indsæt kolonne højre","Insert image":"Indsæt billede","Insert image via URL":"Indsæt billede via URL","Insert paragraph after block":"Indsæt paragraf efter blok","Insert paragraph before block":"Indsæt paragraf før blok","Insert row above":"Indsæt header over","Insert row below":"Indsæt header under","Insert table":"Indsæt tabel",Inset:"Forsænket",Italic:"Kursiv",Justify:"Justér","Justify cell text":"Justér tekstcelle","Left aligned image":"Venstrestillet billede","Light blue":"Lys blå","Light green":"Lys grøn","Light grey":"Lys grå",Link:"Link","Link image":"Link-billede","Link URL":"Link URL","List properties":"Listeegenskaber","Lower-latin":"Latinsk med små bogstaver","Lower–roman":"Romertal med små bogstaver","Merge cell down":"Flet celler ned","Merge cell left":"Flet celler venstre","Merge cell right":"Flet celler højre","Merge cell up":"Flet celler op","Merge cells":"Flet celler",Next:"Næste","No results found":"Ingen resultater blev fundet","No searchable items":"Ingen søgbare artikler",None:"Ingen","Numbered List":"Opstilling med tal","Numbered list styles toolbar":"Værktøjslinje til nummereret listestil","Open in a new tab":"Åben i ny fane","Open link in new tab":"Åben link i ny fane",Orange:"Orange",Original:"Original",Outset:"Fra starten",Padding:"Fyld",Paragraph:"Afsnit","Press Enter to type after or press Shift + Enter to type before the widget":"Tryk på Enter for at skrive efter, eller tryk på Shift + Enter for at skrive før widgetten",Previous:"Forrige",Purple:"Lilla",Red:"Rød",Redo:"Gentag","Remove color":"Fjern farve","Remove Format":"Fjern format","Replace from computer":"Udskift fra computer","Replace image":"Udskift billede","Replace image from computer":"Udskift billede fra computer","Resize image":"Juster billedstørrelse","Resize image to %0":"Juster billedstørrelse til %0","Resize image to the original size":"Juster billedstørrelse til original størrelse","Restore default":"Nulstil","Reversed order":"Omvendt rækkefølge","Rich Text Editor":"Wysiwyg editor",Ridge:"Kam","Right aligned image":"Højrestillet billede",Row:"Række",Save:"Gem","Select all":"Vælg alt","Select column":"Vælg kolonne","Select row":"Vælg række","Show more items":"Vis flere emner","Side image":"Sidebillede",Small:"Lille",Solid:"Massiv","Split cell horizontally":"Del celle horisontalt","Split cell vertically":"Del celle vertikalt",Square:"Firkant","Start at":"Start ved","Start index must be greater than 0.":"Startindeks skal være større end 0.",Strikethrough:"Gennemstreg",Style:"Stil",Subscript:"Sænket skrift",Superscript:"Hævet skrift","Table alignment toolbar":"Tabeljustering værktøjslinje","Table cell text alignment":"Tabelcelle tekstjustering","Table properties":"Tabelegenskaber","Table toolbar":"Tabel værktøjslinje","Text alignment":"Tekstjustering","Text alignment toolbar":"Tekstjustering værktøjslinje","Text alternative":"Alternativ tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farven er ugyldig. Prøv "#FF0000" eller "rgb(255,0,0)" eller "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Værdien er ugyldig. Prøv "10px" eller "2em" eller ganske enkelt "2".',"This link has no URL":"Dette link har ingen URL",Tiny:"Lillebitte","To-do List":"To-do liste","Toggle caption off":"Slå billedtekst fra","Toggle caption on":"Slå billedtekst til","Toggle the circle list style":"Slå listestilen cirkel til og fra","Toggle the decimal list style":"Slå listestilen decimal til og fra","Toggle the decimal with leading zero list style":"Slå listestilen decimal med nul i starten til og fra","Toggle the disc list style":"Slå listestilen disk til og fra","Toggle the lower–latin list style":"Slå listestilen latinsk med små bogstaver til","Toggle the lower–roman list style":"Slå listestilen romertal med små bogstaver til","Toggle the square list style":"Slå listestilen firkantet til og fra","Toggle the upper–latin list style":"Slå listestilen latinsk med store bogstaver til","Toggle the upper–roman list style":"Slå listestilen romertal med store bogstaver til",Turquoise:"Turkis","Type or paste your content here.":"Skriv eller indsæt dit indhold her.","Type your title":"Skriv din titel",Underline:"Understreget",Undo:"Fortryd",Unlink:"Fjern link",Update:"Opdater","Update image URL":"Opdater billed-URL","Upload failed":"Upload fejlede","Upload from computer":"Upload fra computer","Upload image from computer":"Upload billede fra computer","Upload in progress":"Upload i gang","Upper-latin":"Latinsk med store bogstaver","Upper-roman":"Romertal med store bogstaver","Vertical text alignment toolbar":"Vertikal tekstjustering værktøjslinje",White:"Hvid","Widget toolbar":"Widget værktøjslinje",Width:"Bredde","Wrap text":"Ombryd tekst",Yellow:"Gyl"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/de-ch.js b/public/static/plugs/ckeditor5/translations/de-ch.js
index 54777d774..44654b61d 100644
--- a/public/static/plugs/ckeditor5/translations/de-ch.js
+++ b/public/static/plugs/ckeditor5/translations/de-ch.js
@@ -1 +1 @@
-!function(e){const t=e["de-ch"]=e["de-ch"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Zentriert","Align left":"Linksbündig","Align right":"Rechtsbündig","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"",Background:"",Big:"Gross",Black:"","Block quote":"Blockzitat",Blue:"",Bold:"Fett",Border:"","Break text":"","Bulleted List":"Aufzählungsliste","Bulleted list styles toolbar":"Darstellung der ungeordneten Liste",Cancel:"Abbrechen","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"zentriertes Bild","Change image text alternative":"Alternativtext ändern","Choose heading":"Überschrift auswählen",Circle:"Leerer Kreis",Clear:"","Click to edit block":"",Code:"Code",Color:"","Color picker":"",Column:"Spalte",Dashed:"",Decimal:"Dezimalzahlen","Decimal with leading zero":"Dezimalzahlen mit vorangestellten Nullen","Decrease indent":"Einzug verkleinern",Default:"Standard","Delete column":"Spalte löschen","Delete row":"Zeile löschen","Dim grey":"",Dimensions:"",Disc:"Gefüllter Kreis","Document colors":"Farben des Dokuments",Dotted:"",Double:"",Downloadable:"Herunterladbar","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"Link bearbeiten","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Bildunterschrift eingeben","Enter table caption":"","Font Background Color":"Hintergrundfarbe der Schrift","Font Color":"Schriftfarbe","Font Family":"Schriftfamilie","Font Size":"Schriftgrösse","Full size image":"Bild in voller Grösse",Green:"",Grey:"",Groove:"","Header column":"Kopfspalte","Header row":"Kopfspalte",Heading:"Überschrift","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4","Heading 5":"Überschrift 5","Heading 6":"Überschrift 6",Height:"",HEX:"","Horizontal line":"Horizontale Linie","Horizontal text alignment toolbar":"",Huge:"Riesig","Image resize list":"Bildgrössen-Liste","Image toolbar":"Bild Werkzeugleiste","image widget":"Bild-Steuerelement","In line":"","Increase indent":"Einzug vergrössern",Insert:"Einfügen","Insert column left":"","Insert column right":"","Insert image":"Bild einfügen","Insert image via URL":"Bild von URL einfügen","Insert paragraph after block":"Absatz nach Block einfügen","Insert paragraph before block":"Absatz vor Block einfügen","Insert row above":"Zeile oben einfügen","Insert row below":"Zeile unten einfügen","Insert table":"Tabelle einfügen",Inset:"",Italic:"Kursiv",Justify:"Blocksatz","Justify cell text":"","Left aligned image":"linksbündiges Bild","Light blue":"","Light green":"","Light grey":"",Link:"Link","Link image":"Bild verlinken","Link URL":"Link Adresse","List properties":"","Lower-latin":"Kleingeschriebene lateinische Buchstaben","Lower–roman":"Kleingeschriebene römische Zahlen","Merge cell down":"Zelle unten verbinden","Merge cell left":"Zelle links verbinden","Merge cell right":"Zele rechts verbinden","Merge cell up":"Zelle oben verbinden","Merge cells":"Zellen verbinden",Next:"","No results found":"","No searchable items":"",None:"","Numbered List":"Nummerierte Liste","Numbered list styles toolbar":"Darstellung der nummerierten Liste","Open in a new tab":"In neuem Tab öffnen","Open link in new tab":"Link in neuem Tab öffnen",Orange:"",Original:"Original",Outset:"",Padding:"",Paragraph:"Absatz","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"",Purple:"",Red:"",Redo:"Wiederherstellen","Remove color":"Farbe entfernen","Remove Format":"Formatierung entfernen","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Bildgrösse ändern","Resize image to %0":"Bildgrösse ändern in %0","Resize image to the original size":"Originalgrösse wiederherstellen","Restore default":"","Reversed order":"","Rich Text Editor":"Rich-Text-Edito",Ridge:"","Right aligned image":"rechtsbündiges Bild",Row:"Zeile",Save:"Speichern","Select all":"Alles auswählen","Select column":"","Select row":"","Show more items":"","Side image":"Ausgerichtetes Bild",Small:"Klein",Solid:"","Split cell horizontally":"Zelle horizontal teilen","Split cell vertically":"Zelle vertikal teilen",Square:"Quadrat","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Durchgestrichen",Style:"",Subscript:"Tiefgestellt",Superscript:"Hochgestellt","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Textausrichtung","Text alignment toolbar":"Textausrichtung Werkzeugleiste","Text alternative":"Alternativtext",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Dieser Link hat keine Adresse",Tiny:"Winzig","To-do List":"Aufgabenliste","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"Leeren Kreis einstellen","Toggle the decimal list style":"Dezimalzahlen einstellen","Toggle the decimal with leading zero list style":"Dezimalzahlen mit vorangestellten Nullen einstellen","Toggle the disc list style":"Gefüllten Kreis einstellen","Toggle the lower–latin list style":"Kleingeschriebene lateinische Buchstaben einstellen","Toggle the lower–roman list style":"Kleingeschriebene römische Zahlen einstellen","Toggle the square list style":"Quadrat einstellen","Toggle the upper–latin list style":"Grossgeschriebene lateinische Buchstaben einstellen","Toggle the upper–roman list style":"Grossgeschriebene römische Zahlen einstellen",Turquoise:"","Type or paste your content here.":"Hier Inhalt einfügen.","Type your title":"Titel eingeben",Underline:"Unterstrichen",Undo:"Rückgängig",Unlink:"Link entfernen",Update:"Aktualisieren","Update image URL":"Bild-URL aktualisieren","Upload failed":"Hochladen fehlgeschlagen","Upload from computer":"","Upload image from computer":"","Upload in progress":"Upload läuft","Upper-latin":"Grossgeschriebene lateinische Buchstaben","Upper-roman":"Grossgeschriebene römische Zahlen","Vertical text alignment toolbar":"",White:"","Widget toolbar":"Widget Werkzeugleiste",Width:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e["de-ch"]=e["de-ch"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Zentriert","Align left":"Linksbündig","Align right":"Rechtsbündig","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"",Background:"",Big:"Gross",Black:"","Block quote":"Blockzitat",Blue:"",Bold:"Fett",Border:"","Break text":"","Bulleted List":"Aufzählungsliste","Bulleted list styles toolbar":"Darstellung der ungeordneten Liste",Cancel:"Abbrechen","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"zentriertes Bild","Change image text alternative":"Alternativtext ändern","Choose heading":"Überschrift auswählen",Circle:"Leerer Kreis",Clear:"","Click to edit block":"",Close:"",Code:"Code",Color:"","Color picker":"",Column:"Spalte",Dashed:"",Decimal:"Dezimalzahlen","Decimal with leading zero":"Dezimalzahlen mit vorangestellten Nullen","Decrease indent":"Einzug verkleinern",Default:"Standard","Delete column":"Spalte löschen","Delete row":"Zeile löschen","Dim grey":"",Dimensions:"",Disc:"Gefüllter Kreis","Document colors":"Farben des Dokuments",Dotted:"",Double:"",Downloadable:"Herunterladbar","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"Link bearbeiten","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Bildunterschrift eingeben","Enter table caption":"","Font Background Color":"Hintergrundfarbe der Schrift","Font Color":"Schriftfarbe","Font Family":"Schriftfamilie","Font Size":"Schriftgrösse","Full size image":"Bild in voller Grösse",Green:"",Grey:"",Groove:"","Header column":"Kopfspalte","Header row":"Kopfspalte",Heading:"Überschrift","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4","Heading 5":"Überschrift 5","Heading 6":"Überschrift 6",Height:"",HEX:"","Horizontal line":"Horizontale Linie","Horizontal text alignment toolbar":"",Huge:"Riesig","Image resize list":"Bildgrössen-Liste","Image toolbar":"Bild Werkzeugleiste","image widget":"Bild-Steuerelement","In line":"","Increase indent":"Einzug vergrössern",Insert:"Einfügen","Insert column left":"","Insert column right":"","Insert image":"Bild einfügen","Insert image via URL":"Bild von URL einfügen","Insert paragraph after block":"Absatz nach Block einfügen","Insert paragraph before block":"Absatz vor Block einfügen","Insert row above":"Zeile oben einfügen","Insert row below":"Zeile unten einfügen","Insert table":"Tabelle einfügen",Inset:"",Italic:"Kursiv",Justify:"Blocksatz","Justify cell text":"","Left aligned image":"linksbündiges Bild","Light blue":"","Light green":"","Light grey":"",Link:"Link","Link image":"Bild verlinken","Link URL":"Link Adresse","List properties":"","Lower-latin":"Kleingeschriebene lateinische Buchstaben","Lower–roman":"Kleingeschriebene römische Zahlen","Merge cell down":"Zelle unten verbinden","Merge cell left":"Zelle links verbinden","Merge cell right":"Zele rechts verbinden","Merge cell up":"Zelle oben verbinden","Merge cells":"Zellen verbinden",Next:"","No results found":"","No searchable items":"",None:"","Numbered List":"Nummerierte Liste","Numbered list styles toolbar":"Darstellung der nummerierten Liste","Open in a new tab":"In neuem Tab öffnen","Open link in new tab":"Link in neuem Tab öffnen",Orange:"",Original:"Original",Outset:"",Padding:"",Paragraph:"Absatz","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"",Purple:"",Red:"",Redo:"Wiederherstellen","Remove color":"Farbe entfernen","Remove Format":"Formatierung entfernen","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Bildgrösse ändern","Resize image to %0":"Bildgrösse ändern in %0","Resize image to the original size":"Originalgrösse wiederherstellen","Restore default":"","Reversed order":"","Rich Text Editor":"Rich-Text-Edito",Ridge:"","Right aligned image":"rechtsbündiges Bild",Row:"Zeile",Save:"Speichern","Select all":"Alles auswählen","Select column":"","Select row":"","Show more items":"","Side image":"Ausgerichtetes Bild",Small:"Klein",Solid:"","Split cell horizontally":"Zelle horizontal teilen","Split cell vertically":"Zelle vertikal teilen",Square:"Quadrat","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Durchgestrichen",Style:"",Subscript:"Tiefgestellt",Superscript:"Hochgestellt","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Textausrichtung","Text alignment toolbar":"Textausrichtung Werkzeugleiste","Text alternative":"Alternativtext",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Dieser Link hat keine Adresse",Tiny:"Winzig","To-do List":"Aufgabenliste","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"Leeren Kreis einstellen","Toggle the decimal list style":"Dezimalzahlen einstellen","Toggle the decimal with leading zero list style":"Dezimalzahlen mit vorangestellten Nullen einstellen","Toggle the disc list style":"Gefüllten Kreis einstellen","Toggle the lower–latin list style":"Kleingeschriebene lateinische Buchstaben einstellen","Toggle the lower–roman list style":"Kleingeschriebene römische Zahlen einstellen","Toggle the square list style":"Quadrat einstellen","Toggle the upper–latin list style":"Grossgeschriebene lateinische Buchstaben einstellen","Toggle the upper–roman list style":"Grossgeschriebene römische Zahlen einstellen",Turquoise:"","Type or paste your content here.":"Hier Inhalt einfügen.","Type your title":"Titel eingeben",Underline:"Unterstrichen",Undo:"Rückgängig",Unlink:"Link entfernen",Update:"Aktualisieren","Update image URL":"Bild-URL aktualisieren","Upload failed":"Hochladen fehlgeschlagen","Upload from computer":"","Upload image from computer":"","Upload in progress":"Upload läuft","Upper-latin":"Grossgeschriebene lateinische Buchstaben","Upper-roman":"Grossgeschriebene römische Zahlen","Vertical text alignment toolbar":"",White:"","Widget toolbar":"Widget Werkzeugleiste",Width:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/de.js b/public/static/plugs/ckeditor5/translations/de.js
index 898085d97..5d981feab 100644
--- a/public/static/plugs/ckeditor5/translations/de.js
+++ b/public/static/plugs/ckeditor5/translations/de.js
@@ -1 +1 @@
-!function(e){const t=e.de=e.de||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 von %1",Accept:"Akzeptieren","Align cell text to the bottom":"Zellentext unten ausrichten","Align cell text to the center":"Zellentext zentriert ausrichten","Align cell text to the left":"Zellentext linksbündig ausrichten","Align cell text to the middle":"Zellentext mittig ausrichten","Align cell text to the right":"Zellentext rechtsbündig ausrichten","Align cell text to the top":"Zellentext oben ausrichten","Align center":"Zentriert","Align left":"Linksbündig","Align right":"Rechtsbündig","Align table to the left":"Tabelle links ausrichten","Align table to the right":"Tabelle rechts ausrichten",Alignment:"Ausrichtung",Aquamarine:"Aquamarinblau",Background:"Hintergrund",Big:"Groß",Black:"Schwarz","Block quote":"Blockzitat",Blue:"Blau",Bold:"Fett",Border:"Rahmen","Break text":"Bild teilt Text","Bulleted List":"Aufzählungsliste","Bulleted list styles toolbar":"Darstellung der ungeordneten Liste",Cancel:"Abbrechen","Caption for image: %0":"Bildunterschrift: %0","Caption for the image":"Bildunterschrift","Cell properties":"Zelleneigenschaften","Center table":"Tabelle zentrieren","Centered image":"Zentriertes Bild","Change image text alternative":"Alternativtext ändern","Choose heading":"Überschrift auswählen",Circle:"Leerer Kreis",Clear:"Löschen","Click to edit block":"Zum Bearbeiten des Blocks klicken",Code:"Code",Color:"Farbe","Color picker":"Farbwähler",Column:"Spalte",Dashed:"Gestrichelt",Decimal:"Dezimalzahlen","Decimal with leading zero":"Dezimalzahlen mit vorangestellten Nullen","Decrease indent":"Einzug verkleinern",Default:"Standard","Delete column":"Spalte löschen","Delete row":"Zeile löschen","Dim grey":"Dunkelgrau",Dimensions:"Größe",Disc:"Gefüllter Kreis","Document colors":"Dokumentfarben",Dotted:"Gepunktet",Double:"Doppelt",Downloadable:"Herunterladbar","Drag to move":"Zum Verschieben ziehen","Dropdown toolbar":"Dropdown-Liste Werkzeugleiste","Edit block":"Absatz bearbeiten","Edit link":"Link bearbeiten","Editor block content toolbar":"Editor Blockinhalt-Toolbar","Editor contextual toolbar":"Editor kontextuelle Toolbar","Editor editing area: %0":"Bearbeitungsbereich des Editors: %0","Editor toolbar":"Editor Werkzeugleiste","Enter image caption":"Bildunterschrift eingeben","Enter table caption":"Tabellenüberschrift eingeben","Font Background Color":"Hintergrundfarbe","Font Color":"Schriftfarbe","Font Family":"Schriftart","Font Size":"Schriftgröße","Full size image":"Bild in voller Größe",Green:"Grün",Grey:"Grau",Groove:"Eingeritzt","Header column":"Kopfspalte","Header row":"Kopfzeile",Heading:"Überschrift","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4","Heading 5":"Überschrift 5","Heading 6":"Überschrift 6",Height:"Höhe",HEX:"HEX","Horizontal line":"Horizontale Linie","Horizontal text alignment toolbar":"Werkzeugleiste für die horizontale Zellentext-Ausrichtung","HTML object":"HTML-Objekt",Huge:"Sehr groß","Image resize list":"Bildgrößen-Liste","Image toolbar":"Bild Werkzeugleiste","image widget":"Bild-Steuerelement","In line":"Text in Zeile","Increase indent":"Einzug vergrößern",Insert:"Einfügen","Insert column left":"Spalte links einfügen","Insert column right":"Spalte rechts einfügen","Insert image":"Bild einfügen","Insert image via URL":"Bild von URL einfügen","Insert paragraph after block":"Absatz nach Block einfügen","Insert paragraph before block":"Absatz vor Block einfügen","Insert row above":"Zeile oben einfügen","Insert row below":"Zeile unten einfügen","Insert table":"Tabelle einfügen",Inset:"Eingelassen",Italic:"Kursiv",Justify:"Blocksatz","Justify cell text":"Zellentext als Blocksatz ausrichten","Left aligned image":"Linksbündiges Bild","Light blue":"Hellblau","Light green":"Hellgrün","Light grey":"Hellgrau",Link:"Link","Link image":"Bild verlinken","Link URL":"Linkadresse","List properties":"Listeneigenschaften","Lower-latin":"Kleingeschriebene lateinische Buchstaben","Lower–roman":"Kleingeschriebene römische Zahlen","Merge cell down":"Zelle unten verbinden","Merge cell left":"Zelle links verbinden","Merge cell right":"Zelle rechts verbinden","Merge cell up":"Zelle verbinden","Merge cells":"Zellen verbinden",Next:"Nächste","No results found":"Keine Ergebnisse gefunden","No searchable items":"Keine durchsuchbaren Elemente",None:"Kein Rahmen","Numbered List":"Nummerierte Liste","Numbered list styles toolbar":"Darstellung der geordneten Liste","Open in a new tab":"In neuem Tab öffnen","Open link in new tab":"Link im neuen Tab öffnen",Orange:"Orange",Original:"Original",Outset:"Geprägt",Padding:"Innenabstand",Paragraph:"Absatz","Press Enter to type after or press Shift + Enter to type before the widget":"Drücken Sie die Eingabetaste, um nach dem Widget zu tippen oder Shift + Eingabetaste, um vor dem Widget zu tippen.",Previous:"vorherige",Purple:"Violett",Red:"Rot",Redo:"Wiederherstellen","Remove color":"Farbe entfernen","Remove Format":"Formatierung entfernen","Replace from computer":"Vom Computer ersetzen","Replace image":"Bild ersetzen","Replace image from computer":"Bild vom Computer ersetzen","Resize image":"Bildgröße ändern","Resize image to %0":"Bildgröße ändern in %0","Resize image to the original size":"Bild in Originalgröße ändern","Restore default":"Standard wiederherstellen","Reversed order":"Umgekehrte Reihenfolge","Rich Text Editor":"Rich Text Editor",Ridge:"Hervorgehoben","Right aligned image":"Rechtsbündiges Bild",Row:"Zeile",Save:"Speichern","Select all":"Alles auswählen","Select column":"Spalte auswählen","Select row":"Zeile auswählen","Show more items":"Mehr anzeigen","Side image":"Seitenbild",Small:"Klein",Solid:"Durchgezogen","Split cell horizontally":"Zelle horizontal teilen","Split cell vertically":"Zelle vertikal teilen",Square:"Quadrat","Start at":"Beginnen mit","Start index must be greater than 0.":"Der Startwert muss größer als 0 sein.",Strikethrough:"Durchgestrichen",Style:"Rahmenart",Subscript:"Tiefgestellt",Superscript:"Hochgestellt","Table alignment toolbar":"Werkzeugleiste für die Tabellen-Ausrichtung","Table cell text alignment":"Ausrichtung des Zellentextes","Table properties":"Tabelleneigenschaften","Table toolbar":"Tabelle Werkzeugleiste","Text alignment":"Textausrichtung","Text alignment toolbar":"Text-Ausrichtung Toolbar","Text alternative":"Alternativtext",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"Die Farbe ist ungültig. Probieren Sie „#FF0000“ oder „rgb(255,0,0)“ oder „red“.",'The value is invalid. Try "10px" or "2em" or simply "2".':"Der Wert ist ungültig. Probieren Sie „10px“ oder „2em“ oder „2“.","This link has no URL":"Dieser Link hat keine Adresse",Tiny:"Sehr klein","To-do List":"Aufgabenliste","Toggle caption off":"Tabellenüberschrift deaktivieren","Toggle caption on":"Tabellenüberschrift aktivieren","Toggle the circle list style":"Leeren Kreis einstellen","Toggle the decimal list style":"Dezimalzahlen einstellen","Toggle the decimal with leading zero list style":"Dezimalzahlen mit vorangestellten Nullen einstellen","Toggle the disc list style":"Gefüllten Kreis einstellen","Toggle the lower–latin list style":"Kleingeschriebene lateinische Buchstaben einstellen","Toggle the lower–roman list style":"Kleingeschriebene römische Zahlen einstellen","Toggle the square list style":"Quadrat einstellen","Toggle the upper–latin list style":"Großgeschriebene lateinische Buchstaben einstellen","Toggle the upper–roman list style":"Großgeschriebene römische Zahlen einstellen",Turquoise:"Türkis","Type or paste your content here.":"Hier Inhalt einfügen.","Type your title":"Titel eingeben",Underline:"Unterstrichen",Undo:"Rückgängig",Unlink:"Link entfernen",Update:"Aktualisieren","Update image URL":"Bild-URL aktualisieren","Upload failed":"Hochladen fehlgeschlagen","Upload from computer":"Vom Computer hochladen","Upload image from computer":"Bild vom Computer hochladen","Upload in progress":"Upload läuft","Upper-latin":"Großgeschriebene lateinische Buchstaben","Upper-roman":"Großgeschriebene römische Zahlen","Vertical text alignment toolbar":"Werkzeugleiste für die vertikale Zellentext-Ausrichtung",White:"Weiß","Widget toolbar":"Widget Werkzeugleiste",Width:"Breite","Wrap text":"Text umfließt Bild",Yellow:"Gelb"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.de=e.de||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 von %1",Accept:"Akzeptieren","Align cell text to the bottom":"Zellentext unten ausrichten","Align cell text to the center":"Zellentext zentriert ausrichten","Align cell text to the left":"Zellentext linksbündig ausrichten","Align cell text to the middle":"Zellentext mittig ausrichten","Align cell text to the right":"Zellentext rechtsbündig ausrichten","Align cell text to the top":"Zellentext oben ausrichten","Align center":"Zentriert","Align left":"Linksbündig","Align right":"Rechtsbündig","Align table to the left":"Tabelle links ausrichten","Align table to the right":"Tabelle rechts ausrichten",Alignment:"Ausrichtung",Aquamarine:"Aquamarinblau",Background:"Hintergrund",Big:"Groß",Black:"Schwarz","Block quote":"Blockzitat",Blue:"Blau",Bold:"Fett",Border:"Rahmen","Break text":"Bild teilt Text","Bulleted List":"Aufzählungsliste","Bulleted list styles toolbar":"Darstellung der ungeordneten Liste",Cancel:"Abbrechen","Caption for image: %0":"Bildunterschrift: %0","Caption for the image":"Bildunterschrift","Cell properties":"Zelleneigenschaften","Center table":"Tabelle zentrieren","Centered image":"Zentriertes Bild","Change image text alternative":"Alternativtext ändern","Choose heading":"Überschrift auswählen",Circle:"Leerer Kreis",Clear:"Löschen","Click to edit block":"Zum Bearbeiten des Blocks klicken",Close:"Schließen",Code:"Code",Color:"Farbe","Color picker":"Farbwähler",Column:"Spalte",Dashed:"Gestrichelt",Decimal:"Dezimalzahlen","Decimal with leading zero":"Dezimalzahlen mit vorangestellten Nullen","Decrease indent":"Einzug verkleinern",Default:"Standard","Delete column":"Spalte löschen","Delete row":"Zeile löschen","Dim grey":"Dunkelgrau",Dimensions:"Größe",Disc:"Gefüllter Kreis","Document colors":"Dokumentfarben",Dotted:"Gepunktet",Double:"Doppelt",Downloadable:"Herunterladbar","Drag to move":"Zum Verschieben ziehen","Dropdown toolbar":"Dropdown-Liste Werkzeugleiste","Edit block":"Absatz bearbeiten","Edit link":"Link bearbeiten","Editor block content toolbar":"Editor Blockinhalt-Toolbar","Editor contextual toolbar":"Editor kontextuelle Toolbar","Editor dialog":"Editor-Dialog","Editor editing area: %0":"Bearbeitungsbereich des Editors: %0","Editor toolbar":"Editor Werkzeugleiste","Enter image caption":"Bildunterschrift eingeben","Enter table caption":"Tabellenüberschrift eingeben","Font Background Color":"Hintergrundfarbe","Font Color":"Schriftfarbe","Font Family":"Schriftart","Font Size":"Schriftgröße","Full size image":"Bild in voller Größe",Green:"Grün",Grey:"Grau",Groove:"Eingeritzt","Header column":"Kopfspalte","Header row":"Kopfzeile",Heading:"Überschrift","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4","Heading 5":"Überschrift 5","Heading 6":"Überschrift 6",Height:"Höhe",HEX:"HEX","Horizontal line":"Horizontale Linie","Horizontal text alignment toolbar":"Werkzeugleiste für die horizontale Zellentext-Ausrichtung","HTML object":"HTML-Objekt",Huge:"Sehr groß","Image resize list":"Bildgrößen-Liste","Image toolbar":"Bild Werkzeugleiste","image widget":"Bild-Steuerelement","In line":"Text in Zeile","Increase indent":"Einzug vergrößern",Insert:"Einfügen","Insert column left":"Spalte links einfügen","Insert column right":"Spalte rechts einfügen","Insert image":"Bild einfügen","Insert image via URL":"Bild von URL einfügen","Insert paragraph after block":"Absatz nach Block einfügen","Insert paragraph before block":"Absatz vor Block einfügen","Insert row above":"Zeile oben einfügen","Insert row below":"Zeile unten einfügen","Insert table":"Tabelle einfügen",Inset:"Eingelassen",Italic:"Kursiv",Justify:"Blocksatz","Justify cell text":"Zellentext als Blocksatz ausrichten","Left aligned image":"Linksbündiges Bild","Light blue":"Hellblau","Light green":"Hellgrün","Light grey":"Hellgrau",Link:"Link","Link image":"Bild verlinken","Link URL":"Linkadresse","List properties":"Listeneigenschaften","Lower-latin":"Kleingeschriebene lateinische Buchstaben","Lower–roman":"Kleingeschriebene römische Zahlen","Merge cell down":"Zelle unten verbinden","Merge cell left":"Zelle links verbinden","Merge cell right":"Zelle rechts verbinden","Merge cell up":"Zelle verbinden","Merge cells":"Zellen verbinden",Next:"Nächste","No results found":"Keine Ergebnisse gefunden","No searchable items":"Keine durchsuchbaren Elemente",None:"Kein Rahmen","Numbered List":"Nummerierte Liste","Numbered list styles toolbar":"Darstellung der geordneten Liste","Open in a new tab":"In neuem Tab öffnen","Open link in new tab":"Link im neuen Tab öffnen",Orange:"Orange",Original:"Original",Outset:"Geprägt",Padding:"Innenabstand",Paragraph:"Absatz","Press Enter to type after or press Shift + Enter to type before the widget":"Drücken Sie die Eingabetaste, um nach dem Widget zu tippen oder Shift + Eingabetaste, um vor dem Widget zu tippen.",Previous:"vorherige",Purple:"Violett",Red:"Rot",Redo:"Wiederherstellen","Remove color":"Farbe entfernen","Remove Format":"Formatierung entfernen","Replace from computer":"Vom Computer ersetzen","Replace image":"Bild ersetzen","Replace image from computer":"Bild vom Computer ersetzen","Resize image":"Bildgröße ändern","Resize image to %0":"Bildgröße ändern in %0","Resize image to the original size":"Bild in Originalgröße ändern","Restore default":"Standard wiederherstellen","Reversed order":"Umgekehrte Reihenfolge","Rich Text Editor":"Rich Text Editor",Ridge:"Hervorgehoben","Right aligned image":"Rechtsbündiges Bild",Row:"Zeile",Save:"Speichern","Select all":"Alles auswählen","Select column":"Spalte auswählen","Select row":"Zeile auswählen","Show more items":"Mehr anzeigen","Side image":"Seitenbild",Small:"Klein",Solid:"Durchgezogen","Split cell horizontally":"Zelle horizontal teilen","Split cell vertically":"Zelle vertikal teilen",Square:"Quadrat","Start at":"Beginnen mit","Start index must be greater than 0.":"Der Startwert muss größer als 0 sein.",Strikethrough:"Durchgestrichen",Style:"Rahmenart",Subscript:"Tiefgestellt",Superscript:"Hochgestellt","Table alignment toolbar":"Werkzeugleiste für die Tabellen-Ausrichtung","Table cell text alignment":"Ausrichtung des Zellentextes","Table properties":"Tabelleneigenschaften","Table toolbar":"Tabelle Werkzeugleiste","Text alignment":"Textausrichtung","Text alignment toolbar":"Text-Ausrichtung Toolbar","Text alternative":"Alternativtext",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"Die Farbe ist ungültig. Probieren Sie „#FF0000“ oder „rgb(255,0,0)“ oder „red“.",'The value is invalid. Try "10px" or "2em" or simply "2".':"Der Wert ist ungültig. Probieren Sie „10px“ oder „2em“ oder „2“.","This link has no URL":"Dieser Link hat keine Adresse",Tiny:"Sehr klein","To-do List":"Aufgabenliste","Toggle caption off":"Tabellenüberschrift deaktivieren","Toggle caption on":"Tabellenüberschrift aktivieren","Toggle the circle list style":"Leeren Kreis einstellen","Toggle the decimal list style":"Dezimalzahlen einstellen","Toggle the decimal with leading zero list style":"Dezimalzahlen mit vorangestellten Nullen einstellen","Toggle the disc list style":"Gefüllten Kreis einstellen","Toggle the lower–latin list style":"Kleingeschriebene lateinische Buchstaben einstellen","Toggle the lower–roman list style":"Kleingeschriebene römische Zahlen einstellen","Toggle the square list style":"Quadrat einstellen","Toggle the upper–latin list style":"Großgeschriebene lateinische Buchstaben einstellen","Toggle the upper–roman list style":"Großgeschriebene römische Zahlen einstellen",Turquoise:"Türkis","Type or paste your content here.":"Hier Inhalt einfügen.","Type your title":"Titel eingeben",Underline:"Unterstrichen",Undo:"Rückgängig",Unlink:"Link entfernen",Update:"Aktualisieren","Update image URL":"Bild-URL aktualisieren","Upload failed":"Hochladen fehlgeschlagen","Upload from computer":"Vom Computer hochladen","Upload image from computer":"Bild vom Computer hochladen","Upload in progress":"Upload läuft","Upper-latin":"Großgeschriebene lateinische Buchstaben","Upper-roman":"Großgeschriebene römische Zahlen","Vertical text alignment toolbar":"Werkzeugleiste für die vertikale Zellentext-Ausrichtung",White:"Weiß","Widget toolbar":"Widget Werkzeugleiste",Width:"Breite","Wrap text":"Text umfließt Bild",Yellow:"Gelb"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/el.js b/public/static/plugs/ckeditor5/translations/el.js
index c2cc7db39..53d4bea47 100644
--- a/public/static/plugs/ckeditor5/translations/el.js
+++ b/public/static/plugs/ckeditor5/translations/el.js
@@ -1 +1 @@
-!function(e){const t=e.el=e.el||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 από %1",Accept:"Αποδοχή","Align cell text to the bottom":"Στοίχιση κειμένου κελιού κάτω","Align cell text to the center":"Στοίχιση κειμένου κελιού στο κέντρο","Align cell text to the left":"Στοίχιση κειμένου κελιού στα αριστερά","Align cell text to the middle":"Στοίχιση κειμένου κελιού στο μέσο","Align cell text to the right":"Στοίχιση κειμένου κελιού στα δεξιά","Align cell text to the top":"Στοίχιση κειμένου κελιού επάνω","Align center":"Στοίχιση στο κέντρο","Align left":"Στοίχιση αριστερά","Align right":"Στοίχιση δεξιά","Align table to the left":"Στοίχιση πίνακα στα αριστερά","Align table to the right":"Στοίχιση πίνακα στα δεξιά",Alignment:"Στοίχιση",Aquamarine:"Ακουαμαρίνα",Background:"Υπόβαθρο",Big:"Μεγάλο",Black:"Μαύρο","Block quote":"Περιοχή παράθεσης",Blue:"Μπλε",Bold:"Έντονα",Border:"Περίγραμμα","Break text":"Κατάτμηση κειμένου","Bulleted List":"Λίστα με κουκκίδες","Bulleted list styles toolbar":"Γραμμή εργαλείων στυλ λιστών με κουκίδες",Cancel:"Ακύρωση","Caption for image: %0":"Λεζάντα για την εικόνα: %0","Caption for the image":"Λεζάντα για την εικόνα","Cell properties":"Ιδιότητες κελιού","Center table":"Στοίχιση πίνακα στο κέντρο","Centered image":"Εικόνα με στοίχιση στο κέντρο","Change image text alternative":"Αλλαγή εναλλακτικού κείμενου εικόνας","Choose heading":"Επιλέξτε κεφαλίδα",Circle:"Κύκλος",Clear:"Καθαρισμός","Click to edit block":"Κάντε κλικ για να επεξεργαστείτε το μπλοκ",Code:"Κώδικας",Color:"Χρώμα","Color picker":"Επιλογέας χρώματος",Column:"Στήλη",Dashed:"Με παύλες",Decimal:"Δεκαδικό","Decimal with leading zero":"Δεκαδικό με μηδενικά","Decrease indent":"Μείωση εσοχής",Default:"Προεπιλογή","Delete column":"Διαγραφή στήλης","Delete row":"Διαγραφή γραμμής","Dim grey":"Θολό γκρι",Dimensions:"Διαστάσεις",Disc:"Δίσκος","Document colors":"Χρώματα εγγράφου",Dotted:"Διάστικτο",Double:"Διπλό",Downloadable:"Με δυνατότητα λήψης","Drag to move":"Σύρετε για μετακίνηση","Dropdown toolbar":"Γραμμή εργαλείων αναδυόμενου μενού","Edit block":"Επεξεργασία τμήματος","Edit link":"Επεξεργασία συνδέσμου","Editor block content toolbar":"Γραμμή εργαλείων επεξεργασίας περιεχομένου αποκλεισμού","Editor contextual toolbar":"Γραμμή εργαλείων επεξεργασίας συμφραζομένων","Editor editing area: %0":"Περιοχή επεξεργασίας προγράμματος επεξεργασίας: %0","Editor toolbar":"Γραμμή εργαλείων επεξεργαστή","Enter image caption":"Εισαγωγή λεζάντας εικόνας","Enter table caption":"Εισαγωγή λεζάντας πίνακα","Font Background Color":"Χρώμα υποβάθρου γραμματοσειράς","Font Color":"Χρώμα γραμματοσειράς","Font Family":"Οικογένεια γραμματοσειρών","Font Size":"Μέγεθος γραμματοσειράς","Full size image":"Εικόνα σε πλήρες μέγεθος",Green:"Πράσινο",Grey:"Γκρι",Groove:"Βαθουλωτό","Header column":"Στήλη κεφαλίδας","Header row":"Γραμμή κεφαλίδας",Heading:"Κεφαλίδα","Heading 1":"Κεφαλίδα 1","Heading 2":"Κεφαλίδα 2","Heading 3":"Κεφαλίδα 3","Heading 4":"Κεφαλίδα 4","Heading 5":"Κεφαλίδα 5","Heading 6":"Κεφαλίδα 6",Height:"Ύψος",HEX:"Δεκαεξαδική μορφή χρωμάτων","Horizontal line":"Οριζόντια γραμμή","Horizontal text alignment toolbar":"Γραμμή εργαλείων οριζόντιας στοίχισης κειμένου","HTML object":"Αντικείμενο HTML",Huge:"Τεράστιο","Image resize list":"Λίστα μεγεθών εικόνων","Image toolbar":"Γραμμή εργαλείων εικόνας","image widget":"Γραφικό στοιχείο εικόνας","In line":"Εντός γραμμής","Increase indent":"Αύξηση εσοχής",Insert:"Εισαγωγή","Insert column left":"Εισαγωγή στήλης αριστερά","Insert column right":"Εισαγωγή στήλης δεξιά","Insert image":"Εισαγωγή εικόνας","Insert image via URL":"Εισαγωγή εικόνας μέσω διεύθυνσης","Insert paragraph after block":"Εισαγωγή παραγράφου μετά το τμήμα","Insert paragraph before block":"Εισαγωγή παραγράφου πριν το τμήμα","Insert row above":"Εισαγωγή γραμμής πάνω","Insert row below":"Εισαγωγή γραμμής κάτω","Insert table":"Εισαγωγή πίνακα",Inset:"Κείμενο με βάθος",Italic:"Πλάγια",Justify:"Πλήρης στοίχηση","Justify cell text":"Πλήρης στοίχιση κειμένου κελιού","Left aligned image":"Εικόνα με αριστερή στοίχιση","Light blue":"Φωτινό μπλε","Light green":"Φωτινό πράσινο","Light grey":"Φωτινό γκρι",Link:"Σύνδεσμος","Link image":"Εικόνα συνδέσμου","Link URL":"Διεύθυνση συνδέσμου","List properties":"Ιδιότητες λίστας","Lower-latin":"Μικρά λατινικά","Lower–roman":"Μικρά ρωμαϊκά","Merge cell down":"Συγχώνευση κελιού κάτω","Merge cell left":"Συγχώνευση κελιού αριστερά","Merge cell right":"Συγχώνευση κελιού δεξιά","Merge cell up":"Συγχώνευση κελιού πάνω","Merge cells":"Συγχώνευση κελιών",Next:"Επόμενο","No results found":"Δεν βρέθηκαν αποτελέσματα","No searchable items":"Δεν υπάρχει δυνατότητα αναζήτησης στοιχείων",None:"Χωρίς περίγραμμα","Numbered List":"Λίστα με αριθμούς","Numbered list styles toolbar":"Γραμμή εργαλείων στυλ λιστών με αριθμούς","Open in a new tab":"Άνοιγμα σε νέα καρτέλα","Open link in new tab":"Άνοιγμα συνδέσμου σε νέα καρτέλα",Orange:"Πορτοκαλί",Original:"Αρχικό",Outset:"Κείμενο με ύψος",Padding:"Απόσταση κειμένου από το περίγραμμα",Paragraph:"Παράγραφος","Press Enter to type after or press Shift + Enter to type before the widget":"Πατήστε Enter για να πληκτρολογήσετε μετά ή πατήστε Shift + Enter για να πληκτρολογήσετε πριν από το γραφικό στοιχείο",Previous:"Προηγούμενο",Purple:"Πορφυρό",Red:"Κόκκινο",Redo:"Επανάληψη","Remove color":"Απομάκρυνση χρώματος","Remove Format":"Απομάκρυνση μορφοποίησης","Replace from computer":"Αντικατάσταση από υπολογιστή","Replace image":"Αντικατάσταση εικόνας","Replace image from computer":"Αντικατάσταση εικόνας από υπολογιστή","Resize image":"Αλλαγή μεγέθους εικόνας","Resize image to %0":"Αλλαγή μεγέθους σε %0","Resize image to the original size":"Αλλαγή μεγέθους εικόνας στο αρχικό μέγεθος","Restore default":"Επαναφορά προεπιλογής","Reversed order":"Αντίστροφη σειρά","Rich Text Editor":"Επεξεργαστής εμπλουτισμένου κειμένου",Ridge:"Ραχωτό","Right aligned image":"Εικόνα με δεξιά στοίχιση",Row:"Γραμμή",Save:"Αποθήκευση","Select all":"Επιλογή όλων","Select column":"Επιλογή στήλης","Select row":"Επιλογή γραμμής","Show more items":"Προβολή περισσότερων αντικειμένων","Side image":"Πλευρική εικόνα",Small:"Μικρό",Solid:"Συμπαγές","Split cell horizontally":"Διαχωρισμός κελιού οριζόντια","Split cell vertically":"Διαχωρισμός κελιού κάθετα",Square:"Τετράγωνο","Start at":"Εναρξη από","Start index must be greater than 0.":"Ο αριθμός έναρξης πρέπει να είναι μεγαλύτερος από 0.",Strikethrough:"Διακριτή διαγραφή",Style:"Στυλ",Subscript:"Δείκτης",Superscript:"Εκθέτης","Table alignment toolbar":"Γραμμή εργαλείων στοίχισης πίνακα","Table cell text alignment":"Στοίχιση κειμένου κελιού πίνακα","Table properties":"Ιδιότητες πίνακα","Table toolbar":"Γραμμή εργαλείων πίνακα","Text alignment":"Στοίχιση κειμένου","Text alignment toolbar":"Γραμμή εργαλείων στοίχισης κειμένου","Text alternative":"Εναλλακτικό κείμενο",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"Το χρώμα δεν είναι έγκυρο. Δοκιμάστε «#FF0000» ή «rgb(255,0,0)» ή «red».",'The value is invalid. Try "10px" or "2em" or simply "2".':"Η τιμή δεν είναι έγκυρη. Δοκιμάστε «10px» ή «2em» ή απλά «2».","This link has no URL":"Ο σύνδεσμος δεν έχει διεύθυνση",Tiny:"Μικροσκοπικό","To-do List":"Λίστα προγραμματισμένων ενεργειών","Toggle caption off":"Εναλλαγή απόκρυψης λεζάντας","Toggle caption on":"Εναλλαγής εμφάνισης λεζάντας","Toggle the circle list style":"Εναλλαγή του στυλ λίστας με κύκλο","Toggle the decimal list style":"Εναλλαγή του στυλ λίστας με δεκαδικά","Toggle the decimal with leading zero list style":"Εναλλαγή του στυλ λίστας δεκαδικών με μηδενικά","Toggle the disc list style":"Εναλλαγή του στυλ λίστας με δίσκο","Toggle the lower–latin list style":"Εναλλαγή του στυλ λίστας με μικρά λατινικά","Toggle the lower–roman list style":"Εναλλαγή του στυλ λίστας με μικρά ρωμαϊκά","Toggle the square list style":"Εναλαγή του στυλ λίστας με τετράγωνο","Toggle the upper–latin list style":"Εναλλαγή του στυλ λίστας με κεφαλαία λατινικά","Toggle the upper–roman list style":"Εναλλαγή του στυλ λίστας με κεφαλαία ρωμαϊκά",Turquoise:"Τιρκουάζ","Type or paste your content here.":"Γράψτε ή επικολλήστε τα περιεχόμενά σας εδώ.","Type your title":"Γράψτε τον τίτλο σας εδώ",Underline:"Υπογράμμιση",Undo:"Αναίρεση",Unlink:"Αφαίρεση συνδέσμου",Update:"Ενημέρωση","Update image URL":"Ενημέρωση διεύθυνσης εικόνας","Upload failed":"Η αποστολή απέτυχε","Upload from computer":"Μεταφόρτωση από υπολογιστή","Upload image from computer":"Μεταφόρτωση εικόνας από υπολογιστή","Upload in progress":"Αποστολή σε εξέλιξη","Upper-latin":"Κεφαλαία λατινικά","Upper-roman":"Κεφαλαία ρωμαϊκά","Vertical text alignment toolbar":"Γραμμή εργαλείων κάθετης στοίχισης κειμένου",White:"Λευκό","Widget toolbar":"Γραμμή εργαλείων γραφικού στοιχείου",Width:"Πλάτος","Wrap text":"Αναδίπλωση κειμένου",Yellow:"Κίτρινο"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.el=e.el||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 από %1",Accept:"Αποδοχή","Align cell text to the bottom":"Στοίχιση κειμένου κελιού κάτω","Align cell text to the center":"Στοίχιση κειμένου κελιού στο κέντρο","Align cell text to the left":"Στοίχιση κειμένου κελιού στα αριστερά","Align cell text to the middle":"Στοίχιση κειμένου κελιού στο μέσο","Align cell text to the right":"Στοίχιση κειμένου κελιού στα δεξιά","Align cell text to the top":"Στοίχιση κειμένου κελιού επάνω","Align center":"Στοίχιση στο κέντρο","Align left":"Στοίχιση αριστερά","Align right":"Στοίχιση δεξιά","Align table to the left":"Στοίχιση πίνακα στα αριστερά","Align table to the right":"Στοίχιση πίνακα στα δεξιά",Alignment:"Στοίχιση",Aquamarine:"Ακουαμαρίνα",Background:"Υπόβαθρο",Big:"Μεγάλο",Black:"Μαύρο","Block quote":"Περιοχή παράθεσης",Blue:"Μπλε",Bold:"Έντονα",Border:"Περίγραμμα","Break text":"Κατάτμηση κειμένου","Bulleted List":"Λίστα με κουκκίδες","Bulleted list styles toolbar":"Γραμμή εργαλείων στυλ λιστών με κουκίδες",Cancel:"Ακύρωση","Caption for image: %0":"Λεζάντα για την εικόνα: %0","Caption for the image":"Λεζάντα για την εικόνα","Cell properties":"Ιδιότητες κελιού","Center table":"Στοίχιση πίνακα στο κέντρο","Centered image":"Εικόνα με στοίχιση στο κέντρο","Change image text alternative":"Αλλαγή εναλλακτικού κείμενου εικόνας","Choose heading":"Επιλέξτε κεφαλίδα",Circle:"Κύκλος",Clear:"Καθαρισμός","Click to edit block":"Κάντε κλικ για να επεξεργαστείτε το μπλοκ",Close:"Κλείσιμο",Code:"Κώδικας",Color:"Χρώμα","Color picker":"Επιλογέας χρώματος",Column:"Στήλη",Dashed:"Με παύλες",Decimal:"Δεκαδικό","Decimal with leading zero":"Δεκαδικό με μηδενικά","Decrease indent":"Μείωση εσοχής",Default:"Προεπιλογή","Delete column":"Διαγραφή στήλης","Delete row":"Διαγραφή γραμμής","Dim grey":"Θολό γκρι",Dimensions:"Διαστάσεις",Disc:"Δίσκος","Document colors":"Χρώματα εγγράφου",Dotted:"Διάστικτο",Double:"Διπλό",Downloadable:"Με δυνατότητα λήψης","Drag to move":"Σύρετε για μετακίνηση","Dropdown toolbar":"Γραμμή εργαλείων αναδυόμενου μενού","Edit block":"Επεξεργασία τμήματος","Edit link":"Επεξεργασία συνδέσμου","Editor block content toolbar":"Γραμμή εργαλείων επεξεργασίας περιεχομένου αποκλεισμού","Editor contextual toolbar":"Γραμμή εργαλείων επεξεργασίας συμφραζομένων","Editor dialog":"Παράθυρο διαλόγου επεξεργαστή","Editor editing area: %0":"Περιοχή επεξεργασίας προγράμματος επεξεργασίας: %0","Editor toolbar":"Γραμμή εργαλείων επεξεργαστή","Enter image caption":"Εισαγωγή λεζάντας εικόνας","Enter table caption":"Εισαγωγή λεζάντας πίνακα","Font Background Color":"Χρώμα υποβάθρου γραμματοσειράς","Font Color":"Χρώμα γραμματοσειράς","Font Family":"Οικογένεια γραμματοσειρών","Font Size":"Μέγεθος γραμματοσειράς","Full size image":"Εικόνα σε πλήρες μέγεθος",Green:"Πράσινο",Grey:"Γκρι",Groove:"Βαθουλωτό","Header column":"Στήλη κεφαλίδας","Header row":"Γραμμή κεφαλίδας",Heading:"Κεφαλίδα","Heading 1":"Κεφαλίδα 1","Heading 2":"Κεφαλίδα 2","Heading 3":"Κεφαλίδα 3","Heading 4":"Κεφαλίδα 4","Heading 5":"Κεφαλίδα 5","Heading 6":"Κεφαλίδα 6",Height:"Ύψος",HEX:"Δεκαεξαδική μορφή χρωμάτων","Horizontal line":"Οριζόντια γραμμή","Horizontal text alignment toolbar":"Γραμμή εργαλείων οριζόντιας στοίχισης κειμένου","HTML object":"Αντικείμενο HTML",Huge:"Τεράστιο","Image resize list":"Λίστα μεγεθών εικόνων","Image toolbar":"Γραμμή εργαλείων εικόνας","image widget":"Γραφικό στοιχείο εικόνας","In line":"Εντός γραμμής","Increase indent":"Αύξηση εσοχής",Insert:"Εισαγωγή","Insert column left":"Εισαγωγή στήλης αριστερά","Insert column right":"Εισαγωγή στήλης δεξιά","Insert image":"Εισαγωγή εικόνας","Insert image via URL":"Εισαγωγή εικόνας μέσω διεύθυνσης","Insert paragraph after block":"Εισαγωγή παραγράφου μετά το τμήμα","Insert paragraph before block":"Εισαγωγή παραγράφου πριν το τμήμα","Insert row above":"Εισαγωγή γραμμής πάνω","Insert row below":"Εισαγωγή γραμμής κάτω","Insert table":"Εισαγωγή πίνακα",Inset:"Κείμενο με βάθος",Italic:"Πλάγια",Justify:"Πλήρης στοίχηση","Justify cell text":"Πλήρης στοίχιση κειμένου κελιού","Left aligned image":"Εικόνα με αριστερή στοίχιση","Light blue":"Φωτινό μπλε","Light green":"Φωτινό πράσινο","Light grey":"Φωτινό γκρι",Link:"Σύνδεσμος","Link image":"Εικόνα συνδέσμου","Link URL":"Διεύθυνση συνδέσμου","List properties":"Ιδιότητες λίστας","Lower-latin":"Μικρά λατινικά","Lower–roman":"Μικρά ρωμαϊκά","Merge cell down":"Συγχώνευση κελιού κάτω","Merge cell left":"Συγχώνευση κελιού αριστερά","Merge cell right":"Συγχώνευση κελιού δεξιά","Merge cell up":"Συγχώνευση κελιού πάνω","Merge cells":"Συγχώνευση κελιών",Next:"Επόμενο","No results found":"Δεν βρέθηκαν αποτελέσματα","No searchable items":"Δεν υπάρχει δυνατότητα αναζήτησης στοιχείων",None:"Χωρίς περίγραμμα","Numbered List":"Λίστα με αριθμούς","Numbered list styles toolbar":"Γραμμή εργαλείων στυλ λιστών με αριθμούς","Open in a new tab":"Άνοιγμα σε νέα καρτέλα","Open link in new tab":"Άνοιγμα συνδέσμου σε νέα καρτέλα",Orange:"Πορτοκαλί",Original:"Αρχικό",Outset:"Κείμενο με ύψος",Padding:"Απόσταση κειμένου από το περίγραμμα",Paragraph:"Παράγραφος","Press Enter to type after or press Shift + Enter to type before the widget":"Πατήστε Enter για να πληκτρολογήσετε μετά ή πατήστε Shift + Enter για να πληκτρολογήσετε πριν από το γραφικό στοιχείο",Previous:"Προηγούμενο",Purple:"Πορφυρό",Red:"Κόκκινο",Redo:"Επανάληψη","Remove color":"Απομάκρυνση χρώματος","Remove Format":"Απομάκρυνση μορφοποίησης","Replace from computer":"Αντικατάσταση από υπολογιστή","Replace image":"Αντικατάσταση εικόνας","Replace image from computer":"Αντικατάσταση εικόνας από υπολογιστή","Resize image":"Αλλαγή μεγέθους εικόνας","Resize image to %0":"Αλλαγή μεγέθους σε %0","Resize image to the original size":"Αλλαγή μεγέθους εικόνας στο αρχικό μέγεθος","Restore default":"Επαναφορά προεπιλογής","Reversed order":"Αντίστροφη σειρά","Rich Text Editor":"Επεξεργαστής εμπλουτισμένου κειμένου",Ridge:"Ραχωτό","Right aligned image":"Εικόνα με δεξιά στοίχιση",Row:"Γραμμή",Save:"Αποθήκευση","Select all":"Επιλογή όλων","Select column":"Επιλογή στήλης","Select row":"Επιλογή γραμμής","Show more items":"Προβολή περισσότερων αντικειμένων","Side image":"Πλευρική εικόνα",Small:"Μικρό",Solid:"Συμπαγές","Split cell horizontally":"Διαχωρισμός κελιού οριζόντια","Split cell vertically":"Διαχωρισμός κελιού κάθετα",Square:"Τετράγωνο","Start at":"Εναρξη από","Start index must be greater than 0.":"Ο αριθμός έναρξης πρέπει να είναι μεγαλύτερος από 0.",Strikethrough:"Διακριτή διαγραφή",Style:"Στυλ",Subscript:"Δείκτης",Superscript:"Εκθέτης","Table alignment toolbar":"Γραμμή εργαλείων στοίχισης πίνακα","Table cell text alignment":"Στοίχιση κειμένου κελιού πίνακα","Table properties":"Ιδιότητες πίνακα","Table toolbar":"Γραμμή εργαλείων πίνακα","Text alignment":"Στοίχιση κειμένου","Text alignment toolbar":"Γραμμή εργαλείων στοίχισης κειμένου","Text alternative":"Εναλλακτικό κείμενο",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"Το χρώμα δεν είναι έγκυρο. Δοκιμάστε «#FF0000» ή «rgb(255,0,0)» ή «red».",'The value is invalid. Try "10px" or "2em" or simply "2".':"Η τιμή δεν είναι έγκυρη. Δοκιμάστε «10px» ή «2em» ή απλά «2».","This link has no URL":"Ο σύνδεσμος δεν έχει διεύθυνση",Tiny:"Μικροσκοπικό","To-do List":"Λίστα προγραμματισμένων ενεργειών","Toggle caption off":"Εναλλαγή απόκρυψης λεζάντας","Toggle caption on":"Εναλλαγής εμφάνισης λεζάντας","Toggle the circle list style":"Εναλλαγή του στυλ λίστας με κύκλο","Toggle the decimal list style":"Εναλλαγή του στυλ λίστας με δεκαδικά","Toggle the decimal with leading zero list style":"Εναλλαγή του στυλ λίστας δεκαδικών με μηδενικά","Toggle the disc list style":"Εναλλαγή του στυλ λίστας με δίσκο","Toggle the lower–latin list style":"Εναλλαγή του στυλ λίστας με μικρά λατινικά","Toggle the lower–roman list style":"Εναλλαγή του στυλ λίστας με μικρά ρωμαϊκά","Toggle the square list style":"Εναλαγή του στυλ λίστας με τετράγωνο","Toggle the upper–latin list style":"Εναλλαγή του στυλ λίστας με κεφαλαία λατινικά","Toggle the upper–roman list style":"Εναλλαγή του στυλ λίστας με κεφαλαία ρωμαϊκά",Turquoise:"Τιρκουάζ","Type or paste your content here.":"Γράψτε ή επικολλήστε τα περιεχόμενά σας εδώ.","Type your title":"Γράψτε τον τίτλο σας εδώ",Underline:"Υπογράμμιση",Undo:"Αναίρεση",Unlink:"Αφαίρεση συνδέσμου",Update:"Ενημέρωση","Update image URL":"Ενημέρωση διεύθυνσης εικόνας","Upload failed":"Η αποστολή απέτυχε","Upload from computer":"Μεταφόρτωση από υπολογιστή","Upload image from computer":"Μεταφόρτωση εικόνας από υπολογιστή","Upload in progress":"Αποστολή σε εξέλιξη","Upper-latin":"Κεφαλαία λατινικά","Upper-roman":"Κεφαλαία ρωμαϊκά","Vertical text alignment toolbar":"Γραμμή εργαλείων κάθετης στοίχισης κειμένου",White:"Λευκό","Widget toolbar":"Γραμμή εργαλείων γραφικού στοιχείου",Width:"Πλάτος","Wrap text":"Αναδίπλωση κειμένου",Yellow:"Κίτρινο"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/en-au.js b/public/static/plugs/ckeditor5/translations/en-au.js
index 603a4e203..b9789fc8e 100644
--- a/public/static/plugs/ckeditor5/translations/en-au.js
+++ b/public/static/plugs/ckeditor5/translations/en-au.js
@@ -1 +1 @@
-!function(e){const t=e["en-au"]=e["en-au"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"","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 center":"Align centre","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Centre table","Centered image":"Centred image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"",Code:"Code",Color:"Colour","Color picker":"Colour picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colours",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Font Background Color":"Font Background Colour","Font Color":"Font Colour","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",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",Height:"Height",HEX:"","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"HTML object",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","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",Next:"Next","No results found":"","No searchable items":"",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove colour","Remove Format":"Remove Format","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The colour 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".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","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",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"","Upload image from computer":"","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e["en-au"]=e["en-au"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"","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 center":"Align centre","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Centre table","Centered image":"Centred image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"",Close:"",Code:"Code",Color:"Colour","Color picker":"Colour picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colours",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Font Background Color":"Font Background Colour","Font Color":"Font Colour","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",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",Height:"Height",HEX:"","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"HTML object",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","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",Next:"Next","No results found":"","No searchable items":"",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove colour","Remove Format":"Remove Format","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The colour 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".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","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",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"","Upload image from computer":"","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/en-gb.js b/public/static/plugs/ckeditor5/translations/en-gb.js
index 721caf302..5fc72d010 100644
--- a/public/static/plugs/ckeditor5/translations/en-gb.js
+++ b/public/static/plugs/ckeditor5/translations/en-gb.js
@@ -1 +1 @@
-!function(e){const t=e["en-gb"]=e["en-gb"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Aquamarine",Background:"",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"","Break text":"","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"",Cancel:"Cancel","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"Centred image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"",Clear:"","Click to edit block":"",Code:"Code",Color:"","Color picker":"",Column:"Column",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"",Disc:"","Document colors":"Document colours",Dotted:"",Double:"",Downloadable:"Downloadable","Drag to move":"","Dropdown toolbar":"","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Enter image caption","Enter table caption":"","Font Background Color":"Font Background Colour","Font Color":"Font Colour","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"","Header column":"Header column","Header row":"Header row",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",Height:"",HEX:"","Horizontal text alignment toolbar":"",Huge:"Huge","Image resize list":"","Image toolbar":"","image widget":"Image widget","In line":"","Increase indent":"Increase indent",Insert:"","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"",Italic:"Italic",Justify:"Justify","Justify cell text":"","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"","Link URL":"Link URL","List properties":"","Lower-latin":"","Lower–roman":"","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",Next:"Next","No results found":"","No searchable items":"",None:"","Numbered List":"Numbered List","Numbered list styles toolbar":"","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"",Outset:"",Padding:"",Paragraph:"Paragraph",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove colour","Remove Format":"Remove Format","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Rich Text Editor",Ridge:"","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select column":"","Select row":"","Show more items":"","Side image":"Side image",Small:"Small",Solid:"","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Strikethrough",Style:"",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Text alignment","Text alignment toolbar":"","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Turquoise","Type or paste your content here.":"","Type your title":"",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"","Update image URL":"","Upload failed":"Upload failed","Upload from computer":"","Upload image from computer":"","Upload in progress":"Upload in progress","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"White",Width:"","Wrap text":"",Yellow:"Yellow"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e["en-gb"]=e["en-gb"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Aquamarine",Background:"",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"","Break text":"","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"",Cancel:"Cancel","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"Centred image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"Code",Color:"","Color picker":"",Column:"Column",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"",Disc:"","Document colors":"Document colours",Dotted:"",Double:"",Downloadable:"Downloadable","Drag to move":"","Dropdown toolbar":"","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Enter image caption","Enter table caption":"","Font Background Color":"Font Background Colour","Font Color":"Font Colour","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"","Header column":"Header column","Header row":"Header row",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",Height:"",HEX:"","Horizontal text alignment toolbar":"",Huge:"Huge","Image resize list":"","Image toolbar":"","image widget":"Image widget","In line":"","Increase indent":"Increase indent",Insert:"","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"",Italic:"Italic",Justify:"Justify","Justify cell text":"","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"","Link URL":"Link URL","List properties":"","Lower-latin":"","Lower–roman":"","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",Next:"Next","No results found":"","No searchable items":"",None:"","Numbered List":"Numbered List","Numbered list styles toolbar":"","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"",Outset:"",Padding:"",Paragraph:"Paragraph",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove colour","Remove Format":"Remove Format","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Rich Text Editor",Ridge:"","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select column":"","Select row":"","Show more items":"","Side image":"Side image",Small:"Small",Solid:"","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Strikethrough",Style:"",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Text alignment","Text alignment toolbar":"","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Turquoise","Type or paste your content here.":"","Type your title":"",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"","Update image URL":"","Upload failed":"Upload failed","Upload from computer":"","Upload image from computer":"","Upload in progress":"Upload in progress","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"White",Width:"","Wrap text":"",Yellow:"Yellow"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/en.js b/public/static/plugs/ckeditor5/translations/en.js
index 12b5fca7f..14ff80e3a 100644
--- a/public/static/plugs/ckeditor5/translations/en.js
+++ b/public/static/plugs/ckeditor5/translations/en.js
@@ -1 +1 @@
-!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Accept","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 center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",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",Height:"Height",HEX:"HEX","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"HTML object",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","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",Next:"Next","No results found":"No results found","No searchable items":"No searchable items",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'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".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","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",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Accept","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 center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",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",Height:"Height",HEX:"HEX","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"HTML object",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","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",Next:"Next","No results found":"No results found","No searchable items":"No searchable items",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'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".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","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",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/eo.js b/public/static/plugs/ckeditor5/translations/eo.js
index f3ba85b52..13ab3ad9d 100644
--- a/public/static/plugs/ckeditor5/translations/eo.js
+++ b/public/static/plugs/ckeditor5/translations/eo.js
@@ -1 +1 @@
-!function(e){const i=e.eo=e.eo||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"",Blue:"",Bold:"grasa","Break text":"","Bulleted List":"Bula Listo","Bulleted list styles toolbar":"",Cancel:"Nuligi","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"Ŝanĝu la alternativan tekston de la bildo","Choose heading":"Elektu ĉapon",Circle:"",Clear:"","Click to edit block":"",Code:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Skribu klarigon pri la bildo","Full size image":"Bildo kun reala dimensio",Green:"",Grey:"",Heading:"Ĉapo","Heading 1":"Ĉapo 1","Heading 2":"Ĉapo 2","Heading 3":"Ĉapo 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"bilda fenestraĵo","In line":"",Insert:"","Insert image":"Enmetu bildon","Insert image via URL":"",Italic:"kursiva","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"Ligilo","Link image":"","Link URL":"URL de la ligilo","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"Numerita Listo","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"Paragrafo",Previous:"",Purple:"",Red:"",Redo:"Refari","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Redaktilo de Riĉa Teksto","Right aligned image":"",Save:"Konservi","Show more items":"","Side image":"Flanka biildo",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"Alternativa teksto","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"",Undo:"Malfari",Unlink:"Malligi",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),i.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const i=e.eo=e.eo||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"",Blue:"",Bold:"grasa","Break text":"","Bulleted List":"Bula Listo","Bulleted list styles toolbar":"",Cancel:"Nuligi","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"Ŝanĝu la alternativan tekston de la bildo","Choose heading":"Elektu ĉapon",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Skribu klarigon pri la bildo","Full size image":"Bildo kun reala dimensio",Green:"",Grey:"",Heading:"Ĉapo","Heading 1":"Ĉapo 1","Heading 2":"Ĉapo 2","Heading 3":"Ĉapo 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"bilda fenestraĵo","In line":"",Insert:"","Insert image":"Enmetu bildon","Insert image via URL":"",Italic:"kursiva","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"Ligilo","Link image":"","Link URL":"URL de la ligilo","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"Numerita Listo","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"Paragrafo",Previous:"",Purple:"",Red:"",Redo:"Refari","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Redaktilo de Riĉa Teksto","Right aligned image":"",Save:"Konservi","Show more items":"","Side image":"Flanka biildo",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"Alternativa teksto","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"",Undo:"Malfari",Unlink:"Malligi",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),i.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/es.js b/public/static/plugs/ckeditor5/translations/es.js
index d0147d7de..7fb2c3194 100644
--- a/public/static/plugs/ckeditor5/translations/es.js
+++ b/public/static/plugs/ckeditor5/translations/es.js
@@ -1 +1 @@
-!function(e){const a=e.es=e.es||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceptar","Align cell text to the bottom":"Alinear texto de celda hacia abajo","Align cell text to the center":"Centrar texto de celda","Align cell text to the left":"Alinear texto de celda a la izquierda","Align cell text to the middle":"Alinear texto de celda al medio","Align cell text to the right":"Alinear texto de celda a la derecha","Align cell text to the top":"Alinear texto de celda hacia arriba","Align center":"Centrar","Align left":"Alinear a la izquierda","Align right":"Alinear a la derecha","Align table to the left":"Alinear tabla a la izquierda","Align table to the right":"Alinear tabla a la derecha",Alignment:"Alineación",Aquamarine:"Aguamarina",Background:"Fondo",Big:"Grande",Black:"Negro","Block quote":"Cita de bloque",Blue:"Azul",Bold:"Negrita",Border:"Borde","Break text":"Permitir quebrar texto","Bulleted List":"Lista con viñetas","Bulleted list styles toolbar":"Estilos de lista con viñetas",Cancel:"Cancelar","Caption for image: %0":"Título de la imagen: %0","Caption for the image":"Descripción de la imagen","Cell properties":"Propiedades de celda","Center table":"Centrar tabla","Centered image":"Imagen centrada","Change image text alternative":"Cambiar el texto alternativo de la imagen","Choose heading":"Elegir Encabezado",Circle:"Círculo",Clear:"Borrar","Click to edit block":"Haz clic para editar el bloque",Code:"Código",Color:"Color","Color picker":"Selector de color",Column:"Columna",Dashed:"Línea discontinua",Decimal:"Decimal","Decimal with leading zero":"Decimal con cero","Decrease indent":"Disminuir sangría",Default:"Por defecto","Delete column":"Eliminar columna","Delete row":"Eliminar fila","Dim grey":"Gris Oscuro",Dimensions:"Dimensiones",Disc:"Disco","Document colors":"Colores del documento",Dotted:"Línea de puntos",Double:"Doble línea",Downloadable:"Descargable","Drag to move":"Arrastra para mover","Dropdown toolbar":"Barra de herramientas desplegable","Edit block":"Cuadro de edición","Edit link":"Editar enlace","Editor block content toolbar":"Barra de herramientas de contenido del bloque del editor","Editor contextual toolbar":"Barra de herramientas contextual del editor","Editor editing area: %0":"Área de edición del editor: %0","Editor toolbar":"Barra de herramientas de edición","Enter image caption":"Introducir título de la imagen","Enter table caption":"Ingresar título de tabla","Font Background Color":"Color de Fondo","Font Color":"Color de Fuente","Font Family":"Fuente","Font Size":"Tamaño de fuente","Full size image":"Imagen a tamaño completo",Green:"Verde",Grey:"Gris",Groove:"Bisel","Header column":"Columna de encabezado","Header row":"Fila de encabezado",Heading:"Encabezado","Heading 1":"Encabezado 1","Heading 2":"Encabezado 2","Heading 3":"Encabezado 3","Heading 4":"Encabezado 4","Heading 5":"Encabezado 5","Heading 6":"Encabezado 6",Height:"Altura",HEX:"HEX","Horizontal line":"Línea horizontal","Horizontal text alignment toolbar":"Alineación horizontal de texto","HTML object":"Objeto HTML",Huge:"Enorme","Image resize list":"Listado para redimensionar imagen","Image toolbar":"Barra de herramientas de imagen","image widget":"Widget de imagen","In line":"En línea","Increase indent":"Aumentar sangría",Insert:"Insertar","Insert column left":"Insertar columna izquierda","Insert column right":"Insertar columna derecha","Insert image":"Insertar imagen","Insert image via URL":"Insertar imagen vía URL","Insert paragraph after block":"Insertar párrafo después del bloque","Insert paragraph before block":"Insertar párrafo antes del bloque","Insert row above":"Insertar fila encima","Insert row below":"Insertar fila debajo","Insert table":"Insertar tabla",Inset:"Incrustación",Italic:"Cursiva",Justify:"Justificar","Justify cell text":"Justificar texto de celda","Left aligned image":"Imagen alineada a la izquierda","Light blue":"Azul Claro","Light green":"Verde Claro","Light grey":"Gris Claro",Link:"Enlace","Link image":"URL de la imagen","Link URL":"URL del enlace","List properties":"Propiedades de la lista","Lower-latin":"Latinos minúsculas","Lower–roman":"Romanos minúsculas","Merge cell down":"Combinar celda inferior","Merge cell left":"Combinar celda izquierda","Merge cell right":"Combinar celda derecha","Merge cell up":"Combinar celda superior","Merge cells":"Combinar celdas",Next:"Siguiente","No results found":"No se han encontrado resultados","No searchable items":"No hay elementos que buscar",None:"Ninguno","Numbered List":"Lista numerada","Numbered list styles toolbar":"Estilos de lista numerada","Open in a new tab":"Abrir en una pestaña nueva ","Open link in new tab":"Abrir enlace en una pestaña nueva",Orange:"Anaranjado",Original:"Original",Outset:"Relieve",Padding:"Márgenes",Paragraph:"Párrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Pulse Intro para escribir después o pulse Mayús + Intro para escribir antes del «widget».",Previous:"Anterior",Purple:"Morado",Red:"Rojo",Redo:"Rehacer","Remove color":"Quitar color","Remove Format":"Quitar Formato","Replace from computer":"Reemplazar desde el ordenador","Replace image":"Reemplazar imagen","Replace image from computer":"Reemplazar imagen del ordenador","Resize image":"Redimensionar imagen","Resize image to %0":"Redimensionar imagen al %0","Resize image to the original size":"Redimensionar imagen al tamaño original","Restore default":"Restaurar valores predeterminados","Reversed order":"Orden inverso","Rich Text Editor":"Editor de Texto Enriquecido",Ridge:"Marco","Right aligned image":"Imagen alineada a la derecha",Row:"Fila",Save:"Guardar","Select all":"Seleccionar todo","Select column":"Seleccionar columna","Select row":"Seleccionar fila","Show more items":"Mostrar más elementos","Side image":"Imagen lateral",Small:"Pequeño",Solid:"Sólido","Split cell horizontally":"Dividir celdas horizontalmente","Split cell vertically":"Dividir celdas verticalmente",Square:"Cuadrado","Start at":"Empezar en","Start index must be greater than 0.":"El número de inicio debe ser mayor que 0.",Strikethrough:"Tachado",Style:"Estilo",Subscript:"Subíndice",Superscript:"Superíndice","Table alignment toolbar":"Alineación de tabla","Table cell text alignment":"Alineación texto de celda","Table properties":"Propiedades de tabla","Table toolbar":"Barra de herramientas de tabla","Text alignment":"Alineación del texto","Text alignment toolbar":"Barra de herramientas de alineación del texto","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'El color es inválido. Intente con "#FF0000", "rgb(255,0,0)" o "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'El valor es inválido. Intente con "10px", "2em" o simplemente "2".',"This link has no URL":"Este enlace no tiene URL",Tiny:"Minúsculo","To-do List":"Lista de tareas","Toggle caption off":"Desactivar título","Toggle caption on":"Activar título","Toggle the circle list style":"Cambiar estilo de viñeta a círculo","Toggle the decimal list style":"Cambiar estilo de lista a decimal","Toggle the decimal with leading zero list style":"Cambiar estilo de lista decimal empezando con cero","Toggle the disc list style":"Cambiar estilo de viñeta a disco","Toggle the lower–latin list style":"Cambiar estilo de lista a números latinos en minúsculas","Toggle the lower–roman list style":"Cambiar estilo de lista a números romanos en minúsculas","Toggle the square list style":"Cambiar estilo de viñeta a cuadrado","Toggle the upper–latin list style":"Cambiar estilo de lista a números latinos en mayúsculas","Toggle the upper–roman list style":"Cambiar estilo de lista a números roanos en mayúsculas",Turquoise:"Turquesa","Type or paste your content here.":"Introduce o pega tu contenido aquí","Type your title":"Introduce tu título",Underline:"Subrayado",Undo:"Deshacer",Unlink:"Quitar enlace",Update:"Actualizar","Update image URL":"Actualizar imagen vía URL","Upload failed":"Fallo en la subida","Upload from computer":"Subir desde el ordenador","Upload image from computer":"Subir imagen desde el ordenador","Upload in progress":"Subida en progreso","Upper-latin":"Latinos minúsculas","Upper-roman":"Romanos mayúscula","Vertical text alignment toolbar":"Alineación vertical de texto",White:"Blanco","Widget toolbar":"Barra de herramientas del widget",Width:"Ancho","Wrap text":"Mantener texto unido",Yellow:"Amarillo"}),a.getPluralForm=function(e){return 1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.es=e.es||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceptar","Align cell text to the bottom":"Alinear texto de celda hacia abajo","Align cell text to the center":"Centrar texto de celda","Align cell text to the left":"Alinear texto de celda a la izquierda","Align cell text to the middle":"Alinear texto de celda al medio","Align cell text to the right":"Alinear texto de celda a la derecha","Align cell text to the top":"Alinear texto de celda hacia arriba","Align center":"Centrar","Align left":"Alinear a la izquierda","Align right":"Alinear a la derecha","Align table to the left":"Alinear tabla a la izquierda","Align table to the right":"Alinear tabla a la derecha",Alignment:"Alineación",Aquamarine:"Aguamarina",Background:"Fondo",Big:"Grande",Black:"Negro","Block quote":"Bloque de cita",Blue:"Azul",Bold:"Negrita",Border:"Borde","Break text":"Permitir quebrar texto","Bulleted List":"Lista con viñetas","Bulleted list styles toolbar":"Estilos de lista con viñetas",Cancel:"Cancelar","Caption for image: %0":"Título de la imagen: %0","Caption for the image":"Descripción de la imagen","Cell properties":"Propiedades de celda","Center table":"Centrar tabla","Centered image":"Imagen centrada","Change image text alternative":"Cambiar el texto alternativo de la imagen","Choose heading":"Elegir Encabezado",Circle:"Círculo",Clear:"Borrar","Click to edit block":"Haz clic para editar el bloque",Close:"Cerrar",Code:"Código",Color:"Color","Color picker":"Selector de color",Column:"Columna",Dashed:"Línea discontinua",Decimal:"Decimal","Decimal with leading zero":"Decimal con cero","Decrease indent":"Disminuir sangría",Default:"Por defecto","Delete column":"Eliminar columna","Delete row":"Eliminar fila","Dim grey":"Gris oscuro",Dimensions:"Dimensiones",Disc:"Disco","Document colors":"Colores del documento",Dotted:"Línea de puntos",Double:"Doble línea",Downloadable:"Descargable","Drag to move":"Arrastra para mover","Dropdown toolbar":"Barra de herramientas desplegable","Edit block":"Cuadro de edición","Edit link":"Editar enlace","Editor block content toolbar":"Barra de herramientas de contenido del bloque del editor","Editor contextual toolbar":"Barra de herramientas contextual del editor","Editor dialog":"Diálogo del editor","Editor editing area: %0":"Área de edición del editor: %0","Editor toolbar":"Barra de herramientas de edición","Enter image caption":"Introducir título de la imagen","Enter table caption":"Ingresar título de tabla","Font Background Color":"Color de Fondo","Font Color":"Color de Fuente","Font Family":"Fuente","Font Size":"Tamaño de fuente","Full size image":"Imagen a tamaño completo",Green:"Verde",Grey:"Gris",Groove:"Bisel","Header column":"Columna de encabezado","Header row":"Fila de encabezado",Heading:"Encabezado","Heading 1":"Encabezado 1","Heading 2":"Encabezado 2","Heading 3":"Encabezado 3","Heading 4":"Encabezado 4","Heading 5":"Encabezado 5","Heading 6":"Encabezado 6",Height:"Altura",HEX:"HEX","Horizontal line":"Línea horizontal","Horizontal text alignment toolbar":"Alineación horizontal de texto","HTML object":"Objeto HTML",Huge:"Enorme","Image resize list":"Listado para redimensionar imagen","Image toolbar":"Barra de herramientas de imagen","image widget":"Widget de imagen","In line":"En línea","Increase indent":"Aumentar sangría",Insert:"Insertar","Insert column left":"Insertar columna izquierda","Insert column right":"Insertar columna derecha","Insert image":"Insertar imagen","Insert image via URL":"Insertar imagen vía URL","Insert paragraph after block":"Insertar párrafo después del bloque","Insert paragraph before block":"Insertar párrafo antes del bloque","Insert row above":"Insertar fila encima","Insert row below":"Insertar fila debajo","Insert table":"Insertar tabla",Inset:"Incrustación",Italic:"Cursiva",Justify:"Justificar","Justify cell text":"Justificar texto de celda","Left aligned image":"Imagen alineada a la izquierda","Light blue":"Azul claro","Light green":"Verde claro","Light grey":"Gris claro",Link:"Enlace","Link image":"URL de la imagen","Link URL":"URL del enlace","List properties":"Propiedades de la lista","Lower-latin":"Latinos minúsculas","Lower–roman":"Romanos minúsculas","Merge cell down":"Combinar celda inferior","Merge cell left":"Combinar celda izquierda","Merge cell right":"Combinar celda derecha","Merge cell up":"Combinar celda superior","Merge cells":"Combinar celdas",Next:"Siguiente","No results found":"No se han encontrado resultados","No searchable items":"No hay elementos que buscar",None:"Ninguno","Numbered List":"Lista numerada","Numbered list styles toolbar":"Estilos de lista numerada","Open in a new tab":"Abrir en una pestaña nueva ","Open link in new tab":"Abrir enlace en una pestaña nueva",Orange:"Naranja",Original:"Original",Outset:"Relieve",Padding:"Márgenes",Paragraph:"Párrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Pulse Intro para escribir después o pulse Mayús + Intro para escribir antes del «widget».",Previous:"Anterior",Purple:"Morado",Red:"Rojo",Redo:"Rehacer","Remove color":"Quitar color","Remove Format":"Quitar Formato","Replace from computer":"Reemplazar desde el ordenador","Replace image":"Reemplazar imagen","Replace image from computer":"Reemplazar imagen del ordenador","Resize image":"Redimensionar imagen","Resize image to %0":"Redimensionar imagen al %0","Resize image to the original size":"Redimensionar imagen al tamaño original","Restore default":"Restaurar valores predeterminados","Reversed order":"Orden inverso","Rich Text Editor":"Editor de Texto Enriquecido",Ridge:"Marco","Right aligned image":"Imagen alineada a la derecha",Row:"Fila",Save:"Guardar","Select all":"Seleccionar todo","Select column":"Seleccionar columna","Select row":"Seleccionar fila","Show more items":"Mostrar más elementos","Side image":"Imagen lateral",Small:"Pequeño",Solid:"Sólido","Split cell horizontally":"Dividir celdas horizontalmente","Split cell vertically":"Dividir celdas verticalmente",Square:"Cuadrado","Start at":"Empezar en","Start index must be greater than 0.":"El número de inicio debe ser mayor que 0.",Strikethrough:"Tachado",Style:"Estilo",Subscript:"Subíndice",Superscript:"Superíndice","Table alignment toolbar":"Alineación de tabla","Table cell text alignment":"Alineación texto de celda","Table properties":"Propiedades de tabla","Table toolbar":"Barra de herramientas de tabla","Text alignment":"Alineación del texto","Text alignment toolbar":"Barra de herramientas de alineación del texto","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'El color es inválido. Intente con "#FF0000", "rgb(255,0,0)" o "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'El valor es inválido. Intente con "10px", "2em" o simplemente "2".',"This link has no URL":"Este enlace no tiene URL",Tiny:"Minúsculo","To-do List":"Lista de tareas","Toggle caption off":"Desactivar título","Toggle caption on":"Activar título","Toggle the circle list style":"Cambiar estilo de viñeta a círculo","Toggle the decimal list style":"Cambiar estilo de lista a decimal","Toggle the decimal with leading zero list style":"Cambiar estilo de lista decimal empezando con cero","Toggle the disc list style":"Cambiar estilo de viñeta a disco","Toggle the lower–latin list style":"Cambiar estilo de lista a números latinos en minúsculas","Toggle the lower–roman list style":"Cambiar estilo de lista a números romanos en minúsculas","Toggle the square list style":"Cambiar estilo de viñeta a cuadrado","Toggle the upper–latin list style":"Cambiar estilo de lista a números latinos en mayúsculas","Toggle the upper–roman list style":"Cambiar estilo de lista a números roanos en mayúsculas",Turquoise:"Turquesa","Type or paste your content here.":"Introduce o pega tu contenido aquí","Type your title":"Introduce tu título",Underline:"Subrayado",Undo:"Deshacer",Unlink:"Quitar enlace",Update:"Actualizar","Update image URL":"Actualizar imagen vía URL","Upload failed":"Fallo en la subida","Upload from computer":"Subir desde el ordenador","Upload image from computer":"Subir imagen desde el ordenador","Upload in progress":"Subida en progreso","Upper-latin":"Latinos minúsculas","Upper-roman":"Romanos mayúscula","Vertical text alignment toolbar":"Alineación vertical de texto",White:"Blanco","Widget toolbar":"Barra de herramientas del widget",Width:"Ancho","Wrap text":"Mantener texto unido",Yellow:"Amarillo"}),a.getPluralForm=function(e){return 1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/et.js b/public/static/plugs/ckeditor5/translations/et.js
index 8638cb569..150519f88 100644
--- a/public/static/plugs/ckeditor5/translations/et.js
+++ b/public/static/plugs/ckeditor5/translations/et.js
@@ -1 +1 @@
-!function(e){const i=e.et=e.et||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"Nõustu","Align cell text to the bottom":"Lahtri tekst all","Align cell text to the center":"Lahtri tekst keskel","Align cell text to the left":"Lahtri tekst vasakul","Align cell text to the middle":"Lahtri tekst kõrguse järgi keskel","Align cell text to the right":"Lahtri tekst paremal","Align cell text to the top":"Lahtri tekst üleval","Align center":"Keskjoondus","Align left":"Vasakjoondus","Align right":"Paremjoondus","Align table to the left":"Tabel joondatud vasakule","Align table to the right":"Tabel joondatud paremale",Alignment:"Joondus",Aquamarine:"Akvamariin",Background:"Taust",Big:"Suur",Black:"Must","Block quote":"Tsitaat",Blue:"Sinine",Bold:"Rasvane",Border:"Ääris","Break text":"Murra teksti","Bulleted List":"Punktidega loetelu","Bulleted list styles toolbar":"Täpploendi stiili tööriistariba",Cancel:"Loobu","Caption for image: %0":"Pildi pealkiri: %0","Caption for the image":"Pildi pealkiri","Cell properties":"Lahtri omadused","Center table":"Tabel joondatud keskele","Centered image":"Keskele joondatud pilt","Change image text alternative":"Muuda pildi asenduskirjeldust","Choose heading":"Vali pealkiri",Circle:"Ring",Clear:"Selge","Click to edit block":"Ploki muutmiseks klõpsa",Code:"Kood",Color:"Värvus","Color picker":"Värvi valija",Column:"Veerg",Dashed:"Kriipsjoon",Decimal:"Kümnend","Decimal with leading zero":"Nulliga kümnendsüsteem","Decrease indent":"Vähenda taanet",Default:"Vaikimisi","Delete column":"Kustuta veerg","Delete row":"Kustuta rida","Dim grey":"Tumehall",Dimensions:"Mõõtmed",Disc:"Ketas","Document colors":"Dokumendi värvid",Dotted:"Punktiir",Double:"Topelt",Downloadable:"Allalaaditav","Drag to move":"Liigutamiseks lohista","Dropdown toolbar":"Avatav tööriistariba","Edit block":"Muuda plokki","Edit link":"Muuda linki","Editor block content toolbar":"Redigeerija ploki sisu tööriistariba","Editor contextual toolbar":"Redigeerija kontekstuaalne tööriistariba","Editor editing area: %0":"Redaktori redigeerimisala: %0","Editor toolbar":"Redaktori tööriistariba","Enter image caption":"Sisesta pildi pealkiri","Enter table caption":"Sisesta tabeli pealdis","Font Background Color":"Kirja tausta värvus","Font Color":"Fondi värvus","Font Family":"Kirjastiil","Font Size":"Teksti suurus","Full size image":"Täissuuruses pilt",Green:"Roheline",Grey:"Hall",Groove:"Kraav","Header column":"Päise veerg","Header row":"Päise rida",Heading:"Pealkiri","Heading 1":"Pealkiri 1","Heading 2":"Pealkiri 2","Heading 3":"Pealkiri 3","Heading 4":"Pealkiri 4","Heading 5":"Pealkiri 5","Heading 6":"Pealkiri 6",Height:"Kõrgus",HEX:"HEX","Horizontal line":"Horisontaalne joon","Horizontal text alignment toolbar":"Teksti rõhtpaigutuse tööriistariba","HTML object":"HTML objekt",Huge:"Ülisuur","Image resize list":"Pildi suuruse muutmise loend","Image toolbar":"Piltide tööriistariba","image widget":"pildi vidin","In line":"Joone sees","Increase indent":"Suurenda taanet",Insert:"Sisesta","Insert column left":"Sisesta veerg vasakule","Insert column right":"Sisesta veerg paremale","Insert image":"Sisesta pilt","Insert image via URL":"Sisesta pilt läbi URL-i","Insert paragraph after block":"Sisesta lõik pärast plokki","Insert paragraph before block":"Sisesta lõik enne plokki","Insert row above":"Sisesta rida ülespoole","Insert row below":"Sisesta rida allapoole","Insert table":"Sisesta tabel",Inset:"Süvik",Italic:"Kaldkiri",Justify:"Rööpjoondus","Justify cell text":"Lahtri tekst rööpjoondatud","Left aligned image":"Vasakule joondatud pilt","Light blue":"Helesinine","Light green":"Heleroheline","Light grey":"Helehall",Link:"Link","Link image":"Lingi pilt","Link URL":"Lingi URL","List properties":"Loendi atribuudid","Lower-latin":"Ladina väiketähe","Lower–roman":"Väikse rooma numbri","Merge cell down":"Liida alumise lahtriga","Merge cell left":"Liida vasakul oleva lahtriga","Merge cell right":"Liida paremal oleva lahtriga","Merge cell up":"Liida ülemise lahtriga","Merge cells":"Liida lahtrid",Next:"Järgmine","No results found":"Tulemusi ei leitud","No searchable items":"Tulemusi pole",None:"Puudub","Numbered List":"Nummerdatud loetelu","Numbered list styles toolbar":"Numbriloendi stiilide tööriistariba","Open in a new tab":"Ava uuel kaardil","Open link in new tab":"Ava link uuel vahekaardil",Orange:"Oranž",Original:"Algne",Outset:"Küngas",Padding:"Vahe sisuni",Paragraph:"Lõik","Press Enter to type after or press Shift + Enter to type before the widget":"Vajutage Enter, et tippida pärast, või Shift + Enter, et tippida enne vidinat",Previous:"Eelmine",Purple:"Lilla",Red:"Punane",Redo:"Tee uuesti","Remove color":"Eemalda värv","Remove Format":"Eemalda vorming","Replace from computer":"Asenda arvutist","Replace image":"Asenda pilt","Replace image from computer":"Asenda pilt arvutist","Resize image":"Muuda pildi suurust","Resize image to %0":"Muuda pilt suurusesse %0","Resize image to the original size":"Muuda pilt algsuurusesse","Restore default":"Taasta algne","Reversed order":"Vastupidine järjekord","Rich Text Editor":"Tekstiredaktor",Ridge:"Vall","Right aligned image":"Paremale joondatud pilt",Row:"Rida",Save:"Salvesta","Select all":"Vali kõik","Select column":"Vali veerg","Select row":"Vali rida","Show more items":"Näita veel","Side image":"Pilt küljel",Small:"Väike",Solid:"Pidev","Split cell horizontally":"Jaga lahter horisontaalselt","Split cell vertically":"Jaga lahter vertikaalselt",Square:"Ruut","Start at":"Alusta alates","Start index must be greater than 0.":"Algindeks peab olema suurem kui 0.",Strikethrough:"Läbijoonitud",Style:"Stiil",Subscript:"Alaindeks",Superscript:"Ülaindeks","Table alignment toolbar":"Tabeli paigutuse tööriistariba","Table cell text alignment":"Teksti paigutus lahtris","Table properties":"Tabeli omadused","Table toolbar":"Tabelite tööriistariba","Text alignment":"Teksti joondamine","Text alignment toolbar":"Teksti joonduse tööriistariba","Text alternative":"Asenduskirjeldus",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Värvus ei sobi. Proovi "#FF0000" või "rgb(255,0,0)" või "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Väärtus ei sobi. Proovi "10px", "2em" või lihtsalt "2".',"This link has no URL":"Sellel lingil puudub URL",Tiny:"Imepisike","To-do List":"Tööde nimekiri","Toggle caption off":"Lülita pealdis välja","Toggle caption on":"Lülita pealdis sisse","Toggle the circle list style":"Lülita ringi loendistiili sisse-välja","Toggle the decimal list style":"Lülita kümnendsüsteemi loendistiili sisse-välja","Toggle the decimal with leading zero list style":"Lülita nulliga kümnendsüsteemi loendistiili sisse-välja","Toggle the disc list style":"Lülita ketta loendistiili sisse-välja","Toggle the lower–latin list style":"Lülita ladina väiketähe loendistiili sisse-välja","Toggle the lower–roman list style":"Lülita väikse rooma numbri loendistiili sisse-välja","Toggle the square list style":"Lülita ruudu loendistiili sisse-välja","Toggle the upper–latin list style":"Lülita ladina suurtähe loendistiili sisse-välja","Toggle the upper–roman list style":"Lülita suure rooma numbri loendistiili sisse-välja",Turquoise:"Türkiis","Type or paste your content here.":"Siia tipi või kopeeri tekst.","Type your title":"Sisesta pealkiri",Underline:"Allajoonitud",Undo:"Võta tagasi",Unlink:"Eemalda link",Update:"Uuenda","Update image URL":"Uuenda pildi URL-i","Upload failed":"Üleslaadimine ebaõnnestus","Upload from computer":"Laadi üles arvutist","Upload image from computer":"Laadi pilt üles arvutist","Upload in progress":"Üleslaadimine pooleli","Upper-latin":"Ladina suurtähe","Upper-roman":"Suure rooma numbri","Vertical text alignment toolbar":"Teksti püstpaigutuse tööriistariba",White:"Valge","Widget toolbar":"Vidinate tööriistariba",Width:"Laius","Wrap text":"Murra teksti ridu",Yellow:"Kollane"}),i.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const i=e.et=e.et||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"Nõustu","Align cell text to the bottom":"Lahtri tekst all","Align cell text to the center":"Lahtri tekst keskel","Align cell text to the left":"Lahtri tekst vasakul","Align cell text to the middle":"Lahtri tekst kõrguse järgi keskel","Align cell text to the right":"Lahtri tekst paremal","Align cell text to the top":"Lahtri tekst üleval","Align center":"Keskjoondus","Align left":"Vasakjoondus","Align right":"Paremjoondus","Align table to the left":"Tabel joondatud vasakule","Align table to the right":"Tabel joondatud paremale",Alignment:"Joondus",Aquamarine:"Akvamariin",Background:"Taust",Big:"Suur",Black:"Must","Block quote":"Tsitaat",Blue:"Sinine",Bold:"Rasvane",Border:"Ääris","Break text":"Murra teksti","Bulleted List":"Punktidega loetelu","Bulleted list styles toolbar":"Täpploendi stiili tööriistariba",Cancel:"Loobu","Caption for image: %0":"Pildi pealkiri: %0","Caption for the image":"Pildi pealkiri","Cell properties":"Lahtri omadused","Center table":"Tabel joondatud keskele","Centered image":"Keskele joondatud pilt","Change image text alternative":"Muuda pildi asenduskirjeldust","Choose heading":"Vali pealkiri",Circle:"Ring",Clear:"Selge","Click to edit block":"Ploki muutmiseks klõpsa",Close:"Sulge",Code:"Kood",Color:"Värvus","Color picker":"Värvi valija",Column:"Veerg",Dashed:"Kriipsjoon",Decimal:"Kümnend","Decimal with leading zero":"Nulliga kümnendsüsteem","Decrease indent":"Vähenda taanet",Default:"Vaikimisi","Delete column":"Kustuta veerg","Delete row":"Kustuta rida","Dim grey":"Tumehall",Dimensions:"Mõõtmed",Disc:"Ketas","Document colors":"Dokumendi värvid",Dotted:"Punktiir",Double:"Topelt",Downloadable:"Allalaaditav","Drag to move":"Liigutamiseks lohista","Dropdown toolbar":"Avatav tööriistariba","Edit block":"Muuda plokki","Edit link":"Muuda linki","Editor block content toolbar":"Redigeerija ploki sisu tööriistariba","Editor contextual toolbar":"Redigeerija kontekstuaalne tööriistariba","Editor dialog":"Muutja dialoog","Editor editing area: %0":"Redaktori redigeerimisala: %0","Editor toolbar":"Redaktori tööriistariba","Enter image caption":"Sisesta pildi pealkiri","Enter table caption":"Sisesta tabeli pealdis","Font Background Color":"Kirja tausta värvus","Font Color":"Fondi värvus","Font Family":"Kirjastiil","Font Size":"Teksti suurus","Full size image":"Täissuuruses pilt",Green:"Roheline",Grey:"Hall",Groove:"Kraav","Header column":"Päise veerg","Header row":"Päise rida",Heading:"Pealkiri","Heading 1":"Pealkiri 1","Heading 2":"Pealkiri 2","Heading 3":"Pealkiri 3","Heading 4":"Pealkiri 4","Heading 5":"Pealkiri 5","Heading 6":"Pealkiri 6",Height:"Kõrgus",HEX:"HEX","Horizontal line":"Horisontaalne joon","Horizontal text alignment toolbar":"Teksti rõhtpaigutuse tööriistariba","HTML object":"HTML objekt",Huge:"Ülisuur","Image resize list":"Pildi suuruse muutmise loend","Image toolbar":"Piltide tööriistariba","image widget":"pildi vidin","In line":"Joone sees","Increase indent":"Suurenda taanet",Insert:"Sisesta","Insert column left":"Sisesta veerg vasakule","Insert column right":"Sisesta veerg paremale","Insert image":"Sisesta pilt","Insert image via URL":"Sisesta pilt läbi URL-i","Insert paragraph after block":"Sisesta lõik pärast plokki","Insert paragraph before block":"Sisesta lõik enne plokki","Insert row above":"Sisesta rida ülespoole","Insert row below":"Sisesta rida allapoole","Insert table":"Sisesta tabel",Inset:"Süvik",Italic:"Kaldkiri",Justify:"Rööpjoondus","Justify cell text":"Lahtri tekst rööpjoondatud","Left aligned image":"Vasakule joondatud pilt","Light blue":"Helesinine","Light green":"Heleroheline","Light grey":"Helehall",Link:"Link","Link image":"Lingi pilt","Link URL":"Lingi URL","List properties":"Loendi atribuudid","Lower-latin":"Ladina väiketähe","Lower–roman":"Väikse rooma numbri","Merge cell down":"Liida alumise lahtriga","Merge cell left":"Liida vasakul oleva lahtriga","Merge cell right":"Liida paremal oleva lahtriga","Merge cell up":"Liida ülemise lahtriga","Merge cells":"Liida lahtrid",Next:"Järgmine","No results found":"Tulemusi ei leitud","No searchable items":"Tulemusi pole",None:"Puudub","Numbered List":"Nummerdatud loetelu","Numbered list styles toolbar":"Numbriloendi stiilide tööriistariba","Open in a new tab":"Ava uuel kaardil","Open link in new tab":"Ava link uuel vahekaardil",Orange:"Oranž",Original:"Algne",Outset:"Küngas",Padding:"Vahe sisuni",Paragraph:"Lõik","Press Enter to type after or press Shift + Enter to type before the widget":"Vajutage Enter, et tippida pärast, või Shift + Enter, et tippida enne vidinat",Previous:"Eelmine",Purple:"Lilla",Red:"Punane",Redo:"Tee uuesti","Remove color":"Eemalda värv","Remove Format":"Eemalda vorming","Replace from computer":"Asenda arvutist","Replace image":"Asenda pilt","Replace image from computer":"Asenda pilt arvutist","Resize image":"Muuda pildi suurust","Resize image to %0":"Muuda pilt suurusesse %0","Resize image to the original size":"Muuda pilt algsuurusesse","Restore default":"Taasta algne","Reversed order":"Vastupidine järjekord","Rich Text Editor":"Tekstiredaktor",Ridge:"Vall","Right aligned image":"Paremale joondatud pilt",Row:"Rida",Save:"Salvesta","Select all":"Vali kõik","Select column":"Vali veerg","Select row":"Vali rida","Show more items":"Näita veel","Side image":"Pilt küljel",Small:"Väike",Solid:"Pidev","Split cell horizontally":"Jaga lahter horisontaalselt","Split cell vertically":"Jaga lahter vertikaalselt",Square:"Ruut","Start at":"Alusta alates","Start index must be greater than 0.":"Algindeks peab olema suurem kui 0.",Strikethrough:"Läbijoonitud",Style:"Stiil",Subscript:"Alaindeks",Superscript:"Ülaindeks","Table alignment toolbar":"Tabeli paigutuse tööriistariba","Table cell text alignment":"Teksti paigutus lahtris","Table properties":"Tabeli omadused","Table toolbar":"Tabelite tööriistariba","Text alignment":"Teksti joondamine","Text alignment toolbar":"Teksti joonduse tööriistariba","Text alternative":"Asenduskirjeldus",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Värvus ei sobi. Proovi "#FF0000" või "rgb(255,0,0)" või "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Väärtus ei sobi. Proovi "10px", "2em" või lihtsalt "2".',"This link has no URL":"Sellel lingil puudub URL",Tiny:"Imepisike","To-do List":"Tööde nimekiri","Toggle caption off":"Lülita pealdis välja","Toggle caption on":"Lülita pealdis sisse","Toggle the circle list style":"Lülita ringi loendistiili sisse-välja","Toggle the decimal list style":"Lülita kümnendsüsteemi loendistiili sisse-välja","Toggle the decimal with leading zero list style":"Lülita nulliga kümnendsüsteemi loendistiili sisse-välja","Toggle the disc list style":"Lülita ketta loendistiili sisse-välja","Toggle the lower–latin list style":"Lülita ladina väiketähe loendistiili sisse-välja","Toggle the lower–roman list style":"Lülita väikse rooma numbri loendistiili sisse-välja","Toggle the square list style":"Lülita ruudu loendistiili sisse-välja","Toggle the upper–latin list style":"Lülita ladina suurtähe loendistiili sisse-välja","Toggle the upper–roman list style":"Lülita suure rooma numbri loendistiili sisse-välja",Turquoise:"Türkiis","Type or paste your content here.":"Siia tipi või kopeeri tekst.","Type your title":"Sisesta pealkiri",Underline:"Allajoonitud",Undo:"Võta tagasi",Unlink:"Eemalda link",Update:"Uuenda","Update image URL":"Uuenda pildi URL-i","Upload failed":"Üleslaadimine ebaõnnestus","Upload from computer":"Laadi üles arvutist","Upload image from computer":"Laadi pilt üles arvutist","Upload in progress":"Üleslaadimine pooleli","Upper-latin":"Ladina suurtähe","Upper-roman":"Suure rooma numbri","Vertical text alignment toolbar":"Teksti püstpaigutuse tööriistariba",White:"Valge","Widget toolbar":"Vidinate tööriistariba",Width:"Laius","Wrap text":"Murra teksti ridu",Yellow:"Kollane"}),i.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/eu.js b/public/static/plugs/ckeditor5/translations/eu.js
index 0871df833..603c2d363 100644
--- a/public/static/plugs/ckeditor5/translations/eu.js
+++ b/public/static/plugs/ckeditor5/translations/eu.js
@@ -1 +1 @@
-!function(e){const a=e.eu=e.eu||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"","Block quote":"Aipua",Blue:"",Bold:"Lodia","Break text":"","Bulleted List":"Buletdun zerrenda","Bulleted list styles toolbar":"",Cancel:"Utzi","Caption for image: %0":"","Caption for the image":"","Centered image":"Zentratutako irudia","Change image text alternative":"Aldatu irudiaren ordezko testua","Choose heading":"Aukeratu izenburua",Circle:"",Clear:"","Click to edit block":"",Code:"Kodea",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Sartu irudiaren epigrafea","Full size image":"Tamaina osoko irudia",Green:"",Grey:"",Heading:"Izenburua","Heading 1":"Izenburua 1","Heading 2":"Izenburua 2","Heading 3":"Izenburua 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"irudi widgeta","In line":"",Insert:"","Insert image":"Txertatu irudia","Insert image via URL":"",Italic:"Etzana","Left aligned image":"Ezkerrean lerrokatutako irudia","Light blue":"","Light green":"","Light grey":"",Link:"Esteka","Link image":"","Link URL":"Estekaren URLa","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"Zenbakidun zerrenda","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"Paragrafoa",Previous:"",Purple:"",Red:"",Redo:"Berregin","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Testu aberastuaren editorea","Right aligned image":"Eskuinean lerrokatutako irudia",Save:"Gorde","Show more items":"","Side image":"Alboko irudia",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"Ordezko testua","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"Azpimarra",Undo:"Desegin",Unlink:"Desestekatu",Update:"","Update image URL":"","Upload failed":"Kargatzeak huts egin du","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.eu=e.eu||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"","Block quote":"Aipua",Blue:"",Bold:"Lodia","Break text":"","Bulleted List":"Buletdun zerrenda","Bulleted list styles toolbar":"",Cancel:"Utzi","Caption for image: %0":"","Caption for the image":"","Centered image":"Zentratutako irudia","Change image text alternative":"Aldatu irudiaren ordezko testua","Choose heading":"Aukeratu izenburua",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"Kodea",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Sartu irudiaren epigrafea","Full size image":"Tamaina osoko irudia",Green:"",Grey:"",Heading:"Izenburua","Heading 1":"Izenburua 1","Heading 2":"Izenburua 2","Heading 3":"Izenburua 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"irudi widgeta","In line":"",Insert:"","Insert image":"Txertatu irudia","Insert image via URL":"",Italic:"Etzana","Left aligned image":"Ezkerrean lerrokatutako irudia","Light blue":"","Light green":"","Light grey":"",Link:"Esteka","Link image":"","Link URL":"Estekaren URLa","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"Zenbakidun zerrenda","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"Paragrafoa",Previous:"",Purple:"",Red:"",Redo:"Berregin","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Testu aberastuaren editorea","Right aligned image":"Eskuinean lerrokatutako irudia",Save:"Gorde","Show more items":"","Side image":"Alboko irudia",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"Ordezko testua","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"Azpimarra",Undo:"Desegin",Unlink:"Desestekatu",Update:"","Update image URL":"","Upload failed":"Kargatzeak huts egin du","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/fa.js b/public/static/plugs/ckeditor5/translations/fa.js
index 03df0a584..568ca11a8 100644
--- a/public/static/plugs/ckeditor5/translations/fa.js
+++ b/public/static/plugs/ckeditor5/translations/fa.js
@@ -1 +1 @@
-!function(e){const t=e.fa=e.fa||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 از %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"متن سلول را در سمت راست تراز کنید","Align cell text to the top":"","Align center":"تراز وسط","Align left":"تراز چپ","Align right":"تراز راست","Align table to the left":"","Align table to the right":"جدول را در سمت راست تراز کنید",Alignment:"ترازبندی",Aquamarine:"زمرد کبود",Background:"زمینه",Big:"بزرگ",Black:"سیاه","Block quote":" بلوک نقل قول",Blue:"آبی",Bold:"درشت",Border:"حاشیه","Break text":"","Bulleted List":"لیست نشانه‌دار","Bulleted list styles toolbar":"",Cancel:"لغو","Caption for image: %0":"","Caption for the image":"","Cell properties":"خصوصیات سلول","Center table":"جدول وسط","Centered image":"تصویر در وسط","Change image text alternative":"تغییر متن جایگزین تصویر","Choose heading":"انتخاب عنوان",Circle:"",Clear:"","Click to edit block":"",Code:"کد",Color:"رنگ","Color picker":"",Column:"ستون",Dashed:"نقطه چین",Decimal:"","Decimal with leading zero":"","Decrease indent":"کاهش تورفتگی",Default:"پیش فرض","Delete column":"حذف ستون","Delete row":"حذف سطر","Dim grey":"خاکستری تیره",Dimensions:"ابعاد",Disc:"","Document colors":"رنگ اسناد",Dotted:"خط چین",Double:"دوبل",Downloadable:"قابل بارگیری","Drag to move":"","Dropdown toolbar":"نوارابزار کشویی","Edit block":"ویرایش قطعه","Edit link":"ویرایش پیوند","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"نوارابزار ویرایشگر","Enter image caption":"عنوان تصویر را وارد کنید","Enter table caption":"","Font Background Color":"رنگ پس زمینه فونت","Font Color":"رنگ فونت","Font Family":"خانواده فونت","Font Size":"اندازه فونت","Full size image":"تصویر در اندازه کامل",Green:"سبز",Grey:"خاکستری",Groove:"خط دار کردن","Header column":"ستون سربرگ","Header row":"سطر سربرگ",Heading:"عنوان","Heading 1":"عنوان 1","Heading 2":"عنوان 2","Heading 3":"عنوان 3","Heading 4":"عنوان 4","Heading 5":"عنوان 5","Heading 6":"عنوان 6",Height:"ارتفاع",HEX:"","Horizontal line":"خط افقی","Horizontal text alignment toolbar":"",Huge:"بسیار بزرگ","Image resize list":"","Image toolbar":"نوارابزار تصویر","image widget":"ابزاره تصویر","In line":"","Increase indent":"افزایش تورفتگی",Insert:"","Insert column left":"درج ستون در سمت چپ","Insert column right":"درج ستون در سمت راست","Insert image":"قرار دادن تصویر","Insert image via URL":"","Insert paragraph after block":"درج پاراگراف بعد از بلوک","Insert paragraph before block":"درج پاراگراف قبل از بلوک","Insert row above":"درج سطر در بالا","Insert row below":"درج سطر در پایین","Insert table":"درج جدول",Inset:"",Italic:"کج",Justify:"هم تراز کردن","Justify cell text":"","Left aligned image":"تصویر تراز شده چپ","Light blue":"آبی روشن","Light green":"سبز روشن","Light grey":"خاکستری روشن",Link:"پیوند","Link image":"اتصال پیوند به تصویر","Link URL":"نشانی اینترنتی پیوند","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"ادغام سلول پایین","Merge cell left":"ادغام سلول چپ","Merge cell right":"ادغام سلول راست","Merge cell up":"ادغام سلول بالا","Merge cells":"ادغام سلول ها",Next:"بعدی","No results found":"","No searchable items":"",None:"هیچ کدام","Numbered List":"لیست عددی","Numbered list styles toolbar":"","Open in a new tab":"بازکردن در برگه جدید","Open link in new tab":"باز کردن پیوند در برگه جدید",Orange:"نارنجی",Original:"",Outset:"",Padding:"حاشیه داخلی",Paragraph:"پاراگراف","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"قبلی",Purple:"بنفش",Red:"قرمز",Redo:"باز انجام","Remove color":"حذف رنگ","Remove Format":"حذف کردن قالب","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"بازیابی پیش فرض","Reversed order":"","Rich Text Editor":"ویرایشگر متن غنی",Ridge:"","Right aligned image":"تصویر تراز شده راست",Row:"سطر",Save:"ذخیره","Select all":"انتخاب همه","Select column":"","Select row":"","Show more items":"نمایش گزینه‌های بیشتر","Side image":"تصویر جانبی",Small:"کوچک",Solid:"توپر","Split cell horizontally":"تقسیم افقی سلول","Split cell vertically":"تقسیم عمودی سلول",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"خط خورده",Style:"",Subscript:"پایین نویس",Superscript:"بالانویس","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"خصوصیات جدول","Table toolbar":"نوارابزار جدول","Text alignment":"تراز متن","Text alignment toolbar":"نوار ابزار ترازبندی متن","Text alternative":"متن جایگزین",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"این پیوند نشانی اینترنتی ندارد",Tiny:"بسیار کوچک","To-do List":"لیست انجام کار","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"فیروزه ای","Type or paste your content here.":"محتوای خود را در اینجا تایپ یا پیست کنید.","Type your title":"عنوان خود را تایپ کنید",Underline:"خط زیر",Undo:"بازگردانی",Unlink:"لغو پیوند",Update:"","Update image URL":"","Upload failed":"آپلود ناموفق بود","Upload from computer":"","Upload image from computer":"","Upload in progress":"آپلود در حال انجام","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"سفید","Widget toolbar":"نوار ابزار ویجت",Width:"عرض","Wrap text":"",Yellow:"زرد"}),t.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.fa=e.fa||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 از %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"متن سلول را در سمت راست تراز کنید","Align cell text to the top":"","Align center":"تراز وسط","Align left":"تراز چپ","Align right":"تراز راست","Align table to the left":"","Align table to the right":"جدول را در سمت راست تراز کنید",Alignment:"ترازبندی",Aquamarine:"زمرد کبود",Background:"زمینه",Big:"بزرگ",Black:"سیاه","Block quote":" بلوک نقل قول",Blue:"آبی",Bold:"درشت",Border:"حاشیه","Break text":"","Bulleted List":"لیست نشانه‌دار","Bulleted list styles toolbar":"",Cancel:"لغو","Caption for image: %0":"","Caption for the image":"","Cell properties":"خصوصیات سلول","Center table":"جدول وسط","Centered image":"تصویر در وسط","Change image text alternative":"تغییر متن جایگزین تصویر","Choose heading":"انتخاب عنوان",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"کد",Color:"رنگ","Color picker":"",Column:"ستون",Dashed:"نقطه چین",Decimal:"","Decimal with leading zero":"","Decrease indent":"کاهش تورفتگی",Default:"پیش فرض","Delete column":"حذف ستون","Delete row":"حذف سطر","Dim grey":"خاکستری تیره",Dimensions:"ابعاد",Disc:"","Document colors":"رنگ اسناد",Dotted:"خط چین",Double:"دوبل",Downloadable:"قابل بارگیری","Drag to move":"","Dropdown toolbar":"نوارابزار کشویی","Edit block":"ویرایش قطعه","Edit link":"ویرایش پیوند","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"نوارابزار ویرایشگر","Enter image caption":"عنوان تصویر را وارد کنید","Enter table caption":"","Font Background Color":"رنگ پس زمینه فونت","Font Color":"رنگ فونت","Font Family":"خانواده فونت","Font Size":"اندازه فونت","Full size image":"تصویر در اندازه کامل",Green:"سبز",Grey:"خاکستری",Groove:"خط دار کردن","Header column":"ستون سربرگ","Header row":"سطر سربرگ",Heading:"عنوان","Heading 1":"عنوان 1","Heading 2":"عنوان 2","Heading 3":"عنوان 3","Heading 4":"عنوان 4","Heading 5":"عنوان 5","Heading 6":"عنوان 6",Height:"ارتفاع",HEX:"","Horizontal line":"خط افقی","Horizontal text alignment toolbar":"",Huge:"بسیار بزرگ","Image resize list":"","Image toolbar":"نوارابزار تصویر","image widget":"ابزاره تصویر","In line":"","Increase indent":"افزایش تورفتگی",Insert:"","Insert column left":"درج ستون در سمت چپ","Insert column right":"درج ستون در سمت راست","Insert image":"قرار دادن تصویر","Insert image via URL":"","Insert paragraph after block":"درج پاراگراف بعد از بلوک","Insert paragraph before block":"درج پاراگراف قبل از بلوک","Insert row above":"درج سطر در بالا","Insert row below":"درج سطر در پایین","Insert table":"درج جدول",Inset:"",Italic:"کج",Justify:"هم تراز کردن","Justify cell text":"","Left aligned image":"تصویر تراز شده چپ","Light blue":"آبی روشن","Light green":"سبز روشن","Light grey":"خاکستری روشن",Link:"پیوند","Link image":"اتصال پیوند به تصویر","Link URL":"نشانی اینترنتی پیوند","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"ادغام سلول پایین","Merge cell left":"ادغام سلول چپ","Merge cell right":"ادغام سلول راست","Merge cell up":"ادغام سلول بالا","Merge cells":"ادغام سلول ها",Next:"بعدی","No results found":"","No searchable items":"",None:"هیچ کدام","Numbered List":"لیست عددی","Numbered list styles toolbar":"","Open in a new tab":"بازکردن در برگه جدید","Open link in new tab":"باز کردن پیوند در برگه جدید",Orange:"نارنجی",Original:"",Outset:"",Padding:"حاشیه داخلی",Paragraph:"پاراگراف","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"قبلی",Purple:"بنفش",Red:"قرمز",Redo:"باز انجام","Remove color":"حذف رنگ","Remove Format":"حذف کردن قالب","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"بازیابی پیش فرض","Reversed order":"","Rich Text Editor":"ویرایشگر متن غنی",Ridge:"","Right aligned image":"تصویر تراز شده راست",Row:"سطر",Save:"ذخیره","Select all":"انتخاب همه","Select column":"","Select row":"","Show more items":"نمایش گزینه‌های بیشتر","Side image":"تصویر جانبی",Small:"کوچک",Solid:"توپر","Split cell horizontally":"تقسیم افقی سلول","Split cell vertically":"تقسیم عمودی سلول",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"خط خورده",Style:"",Subscript:"پایین نویس",Superscript:"بالانویس","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"خصوصیات جدول","Table toolbar":"نوارابزار جدول","Text alignment":"تراز متن","Text alignment toolbar":"نوار ابزار ترازبندی متن","Text alternative":"متن جایگزین",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"این پیوند نشانی اینترنتی ندارد",Tiny:"بسیار کوچک","To-do List":"لیست انجام کار","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"فیروزه ای","Type or paste your content here.":"محتوای خود را در اینجا تایپ یا پیست کنید.","Type your title":"عنوان خود را تایپ کنید",Underline:"خط زیر",Undo:"بازگردانی",Unlink:"لغو پیوند",Update:"","Update image URL":"","Upload failed":"آپلود ناموفق بود","Upload from computer":"","Upload image from computer":"","Upload in progress":"آپلود در حال انجام","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"سفید","Widget toolbar":"نوار ابزار ویجت",Width:"عرض","Wrap text":"",Yellow:"زرد"}),t.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/fi.js b/public/static/plugs/ckeditor5/translations/fi.js
index 4dd0d3a73..10786a347 100644
--- a/public/static/plugs/ckeditor5/translations/fi.js
+++ b/public/static/plugs/ckeditor5/translations/fi.js
@@ -1 +1 @@
-!function(e){const a=e.fi=e.fi||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"Hyväksy","Align cell text to the bottom":"Siirrä solun teksti alaosaan","Align cell text to the center":"Siirrä solun teksti keskelle","Align cell text to the left":"Siirrä solun teksti vasemmalle","Align cell text to the middle":"Siirrä solun teksti keskiosaan","Align cell text to the right":"Siirrä solun teksti oikealle","Align cell text to the top":"Siirrä solun teksti yläosaan","Align center":"Tasaa keskelle","Align left":"Tasaa vasemmalle","Align right":"Tasaa oikealle","Align table to the left":"Siirrä taulukko vasemmalle","Align table to the right":"Siirrä taulukko oikealle",Alignment:"Suunta",Aquamarine:"Akvamariini",Background:"Tausta",Big:"Suuri",Black:"Musta","Block quote":"Lainaus",Blue:"Sininen",Bold:"Lihavointi",Border:"Reunus","Break text":"Irrota teksti","Bulleted List":"Lista","Bulleted list styles toolbar":"Luetelmalistan työkalupalkki",Cancel:"Peruuta","Caption for image: %0":"Kuvan kuvateksti: %0","Caption for the image":"Kuvan kuvateksti","Cell properties":"Solun ominaisuudet","Center table":"Keskitä taulukko","Centered image":"Keskitetty kuva","Change image text alternative":"Vaihda kuvan vaihtoehtoinen teksti","Choose heading":"Valitse otsikko",Circle:"Ympyrä",Clear:"Tyhjennä","Click to edit block":"Muokkaa lohkoa klikkaamalla",Code:"Koodi",Color:"Väri","Color picker":"Värin valitsin",Column:"Sarake",Dashed:"Katkoviiva",Decimal:"Desimaali","Decimal with leading zero":"Nolla alussa -desimaali","Decrease indent":"Vähennä sisennystä",Default:"Oletus","Delete column":"Poista sarake","Delete row":"Poista rivi","Dim grey":"Vaaleanharmaa",Dimensions:"Mittasuhteet",Disc:"Levy","Document colors":"Asiakirjan värit",Dotted:"Pisteviiva",Double:"Kaksinkertainen",Downloadable:"Ladattava","Drag to move":"Siirrä raahamalla","Dropdown toolbar":"Pudotusvalikon työkalupalkki","Edit block":"Muokkaa lohkoa","Edit link":"Muokkaa linkkiä","Editor block content toolbar":"Editorin lohkon sisällön työkalupalkki","Editor contextual toolbar":"Editorin kontekstuaalinen työkalupalkki","Editor editing area: %0":"Editorin muokkausalue: %0","Editor toolbar":"Editorin työkalupalkki","Enter image caption":"Syötä kuvateksti","Enter table caption":"Syötä taulukon kuvaus","Font Background Color":"Fontin taustaväri","Font Color":"Fontin väri","Font Family":"Fonttiperhe","Font Size":"Fontin koko","Full size image":"Täysikokoinen kuva",Green:"Vihreä",Grey:"Harmaa",Groove:"Uurrettu","Header column":"Otsikkosarake","Header row":"Otsikkorivi",Heading:"Otsikkotyyli","Heading 1":"Otsikko 1","Heading 2":"Otsikko 2","Heading 3":"Otsikko 3","Heading 4":"Otsikko 4","Heading 5":"Otsikko 5","Heading 6":"Otsikko 6",Height:"Korkeus",HEX:"HEX","Horizontal line":"Vaakasuora viiva","Horizontal text alignment toolbar":"Vaakasuoran tekstin suunnan työkalupalkki","HTML object":"HMTL-kohde",Huge:"Hyvin suuri","Image resize list":"Kuvan koon muokkaamisen lista","Image toolbar":"Kuvan työkalupalkki","image widget":"Kuvavimpain","In line":"Rivin sisällä","Increase indent":"Lisää sisennystä",Insert:"Liitä","Insert column left":"Lisää sarake vasemmalle","Insert column right":"Lisää sarake oikealle","Insert image":"Lisää kuva","Insert image via URL":"Liitä kuva URL-koodin kautta","Insert paragraph after block":"Liitä kappale lohkon jälkeen","Insert paragraph before block":"Liitä kappale ennen lohkoa","Insert row above":"Lisää rivi ylle","Insert row below":"Lisää rivi alle","Insert table":"Lisää taulukko",Inset:"Upote",Italic:"Kursivointi",Justify:"Tasaa molemmat reunat","Justify cell text":"Tasaa solun teksti","Left aligned image":"Vasemmalle tasattu kuva","Light blue":"Vaaleansininen","Light green":"Vaaleanvihreä","Light grey":"Vaaleanharmaa",Link:"Linkki","Link image":"Linkkikuva","Link URL":"Linkin osoite","List properties":"Listaominaisuudet","Lower-latin":"Pienet latinalaiset aakkoset","Lower–roman":"Pienet roomalaiset numerot","Merge cell down":"Yhdistä solu alas","Merge cell left":"Yhdistä solu vasemmalle","Merge cell right":"Yhdistä solu oikealle","Merge cell up":"Yhdistä solu ylös","Merge cells":"Yhdistä tai jaa soluja",Next:"Seuraava","No results found":"Tuloksia ei löytynyt","No searchable items":"Ei haettavia nimikkeitä",None:"Ei mitään","Numbered List":"Numeroitu lista","Numbered list styles toolbar":"Numerolistan työkalupalkki","Open in a new tab":"Avaa uudelle välilehdelle","Open link in new tab":"Avaa linkki uudessa välilehdessä",Orange:"Oranssi",Original:"Alkuperäinen",Outset:"Ulkonema",Padding:"Täyte",Paragraph:"Kappale","Press Enter to type after or press Shift + Enter to type before the widget":"Paina enter-näppäintä kirjoittaaksesi tai paina shift + enter kirjoittaaksesi ennen widget-sovellusta",Previous:"Edellinen",Purple:"Purppura",Red:"Punainen",Redo:"Tee uudelleen","Remove color":"Poista väri","Remove Format":"Poista muotoilu","Replace from computer":"Korvaa tietokoneelta","Replace image":"Korvaa kuva","Replace image from computer":"Korvaa kuva tietokoneelta","Resize image":"Muokkaa kuvan kokoa","Resize image to %0":"Muokkaa kuvan kooksi %0","Resize image to the original size":"Vaihda kuvan koko alkuperäiseen kokoon","Restore default":"Palauta oletus","Reversed order":"Päinvastainen järjestys","Rich Text Editor":"Rikas tekstieditori",Ridge:"Harjanne","Right aligned image":"Oikealle tasattu kuva",Row:"Rivi",Save:"Tallenna","Select all":"Valitse kaikki","Select column":"Valitse sarake","Select row":"Valitse rivi","Show more items":"Näytä lisää toimintoja","Side image":"Pieni kuva",Small:"Pieni",Solid:"Kiinteä","Split cell horizontally":"Jaa solu vaakasuunnassa","Split cell vertically":"Jaa solu pystysuunnassa",Square:"Neliö","Start at":"Alkaa","Start index must be greater than 0.":"Aloitusindeksin pitää olla suurempi kuin 0.",Strikethrough:"Yliviivaus",Style:"Tyyli",Subscript:"Alaindeksi",Superscript:"Yläindeksi","Table alignment toolbar":"Taulukon suunnan työkalupalkki","Table cell text alignment":"Taulukkosolun tekstin suunta","Table properties":"Taulukon ominaisuudet","Table toolbar":"Taulukon työkalupalkki","Text alignment":"Tekstin tasaus","Text alignment toolbar":"Tekstin suuntauksen työkalupalkki","Text alternative":"Vaihtoehtoinen teksti",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Väri ei kelpaa. Ota sen sijaan käyttöön "#FF0000", "rgb(255,0,0)" tai "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Arvo ei kelpaa. Ota käyttöön "10px", "2em" tai pelkästään "2".',"This link has no URL":"Linkillä ei ole URL-osoitetta",Tiny:"Hyvin pieni","To-do List":"Tehtävälista","Toggle caption off":"Poista taulukon kuvaus","Toggle caption on":"Lisää taulukon kuvaus","Toggle the circle list style":"Ympyrälistatyylin vaihdin","Toggle the decimal list style":"Desimaalilistatyylin vaihdin","Toggle the decimal with leading zero list style":"Nolla alussa -desimaalilistatyylin vaihdin","Toggle the disc list style":"Levylistatyylin vaihdin","Toggle the lower–latin list style":"Pienet latinalaiset aakkoset -listatyylin vaihdin","Toggle the lower–roman list style":"Pienet roomalaiset numerot -listatyylin vaihdin","Toggle the square list style":"Neliölistatyylin vaihdin","Toggle the upper–latin list style":"Isot latinalaiset aakkoset -listatyylin vaihdin","Toggle the upper–roman list style":"Isot roomalaiset numerot -listatyylin vaihdin",Turquoise:"Turkoosi","Type or paste your content here.":"Kirjoita tai liitä sisältösi tänne.","Type your title":"Kirjoita otsikkosi",Underline:"Alleviivaus",Undo:"Peru",Unlink:"Poista linkki",Update:"Päivitä","Update image URL":"Päivitä kuvan URL","Upload failed":"Lataus epäonnistui","Upload from computer":"Lataa tietokoneelta","Upload image from computer":"Lataa kuva tietokoneelta","Upload in progress":"Lähetys käynnissä","Upper-latin":"Isot latinalaiset aakkoset","Upper-roman":"Isot roomalaiset numerot","Vertical text alignment toolbar":"Pystysuoran tekstin suunnan työkalupalkki",White:"Valkoinen","Widget toolbar":"Widget-työkalupalkki",Width:"Leveys","Wrap text":"Sovita teksti",Yellow:"Keltainen"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const i=e.fi=e.fi||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"Hyväksy","Align cell text to the bottom":"Siirrä solun teksti alaosaan","Align cell text to the center":"Siirrä solun teksti keskelle","Align cell text to the left":"Siirrä solun teksti vasemmalle","Align cell text to the middle":"Siirrä solun teksti keskiosaan","Align cell text to the right":"Siirrä solun teksti oikealle","Align cell text to the top":"Siirrä solun teksti yläosaan","Align center":"Tasaa keskelle","Align left":"Tasaa vasemmalle","Align right":"Tasaa oikealle","Align table to the left":"Siirrä taulukko vasemmalle","Align table to the right":"Siirrä taulukko oikealle",Alignment:"Suunta",Aquamarine:"Akvamariini",Background:"Tausta",Big:"Suuri",Black:"Musta","Block quote":"Lainaus",Blue:"Sininen",Bold:"Lihavointi",Border:"Reunus","Break text":"Irrota teksti","Bulleted List":"Lista","Bulleted list styles toolbar":"Luetelmalistan työkalupalkki",Cancel:"Peruuta","Caption for image: %0":"Kuvan kuvateksti: %0","Caption for the image":"Kuvan kuvateksti","Cell properties":"Solun ominaisuudet","Center table":"Keskitä taulukko","Centered image":"Keskitetty kuva","Change image text alternative":"Vaihda kuvan vaihtoehtoinen teksti","Choose heading":"Valitse otsikko",Circle:"Ympyrä",Clear:"Tyhjennä","Click to edit block":"Muokkaa lohkoa klikkaamalla",Close:"Sulje",Code:"Koodi",Color:"Väri","Color picker":"Värin valitsin",Column:"Sarake",Dashed:"Katkoviiva",Decimal:"Desimaali","Decimal with leading zero":"Nolla alussa -desimaali","Decrease indent":"Vähennä sisennystä",Default:"Oletus","Delete column":"Poista sarake","Delete row":"Poista rivi","Dim grey":"Vaaleanharmaa",Dimensions:"Mittasuhteet",Disc:"Levy","Document colors":"Asiakirjan värit",Dotted:"Pisteviiva",Double:"Kaksinkertainen",Downloadable:"Ladattava","Drag to move":"Siirrä raahamalla","Dropdown toolbar":"Pudotusvalikon työkalupalkki","Edit block":"Muokkaa lohkoa","Edit link":"Muokkaa linkkiä","Editor block content toolbar":"Editorin lohkon sisällön työkalupalkki","Editor contextual toolbar":"Editorin kontekstuaalinen työkalupalkki","Editor dialog":"Editorin dialogi","Editor editing area: %0":"Editorin muokkausalue: %0","Editor toolbar":"Editorin työkalupalkki","Enter image caption":"Syötä kuvateksti","Enter table caption":"Syötä taulukon kuvaus","Font Background Color":"Fontin taustaväri","Font Color":"Fontin väri","Font Family":"Fonttiperhe","Font Size":"Fontin koko","Full size image":"Täysikokoinen kuva",Green:"Vihreä",Grey:"Harmaa",Groove:"Uurrettu","Header column":"Otsikkosarake","Header row":"Otsikkorivi",Heading:"Otsikkotyyli","Heading 1":"Otsikko 1","Heading 2":"Otsikko 2","Heading 3":"Otsikko 3","Heading 4":"Otsikko 4","Heading 5":"Otsikko 5","Heading 6":"Otsikko 6",Height:"Korkeus",HEX:"HEX","Horizontal line":"Vaakasuora viiva","Horizontal text alignment toolbar":"Vaakasuoran tekstin suunnan työkalupalkki","HTML object":"HMTL-kohde",Huge:"Hyvin suuri","Image resize list":"Kuvan koon muokkaamisen lista","Image toolbar":"Kuvan työkalupalkki","image widget":"Kuvavimpain","In line":"Rivin sisällä","Increase indent":"Lisää sisennystä",Insert:"Liitä","Insert column left":"Lisää sarake vasemmalle","Insert column right":"Lisää sarake oikealle","Insert image":"Lisää kuva","Insert image via URL":"Liitä kuva URL-koodin kautta","Insert paragraph after block":"Liitä kappale lohkon jälkeen","Insert paragraph before block":"Liitä kappale ennen lohkoa","Insert row above":"Lisää rivi ylle","Insert row below":"Lisää rivi alle","Insert table":"Lisää taulukko",Inset:"Upote",Italic:"Kursivointi",Justify:"Tasaa molemmat reunat","Justify cell text":"Tasaa solun teksti","Left aligned image":"Vasemmalle tasattu kuva","Light blue":"Vaaleansininen","Light green":"Vaaleanvihreä","Light grey":"Vaaleanharmaa",Link:"Linkki","Link image":"Linkkikuva","Link URL":"Linkin osoite","List properties":"Listaominaisuudet","Lower-latin":"Pienet latinalaiset aakkoset","Lower–roman":"Pienet roomalaiset numerot","Merge cell down":"Yhdistä solu alas","Merge cell left":"Yhdistä solu vasemmalle","Merge cell right":"Yhdistä solu oikealle","Merge cell up":"Yhdistä solu ylös","Merge cells":"Yhdistä tai jaa soluja",Next:"Seuraava","No results found":"Tuloksia ei löytynyt","No searchable items":"Ei haettavia nimikkeitä",None:"Ei mitään","Numbered List":"Numeroitu lista","Numbered list styles toolbar":"Numerolistan työkalupalkki","Open in a new tab":"Avaa uudelle välilehdelle","Open link in new tab":"Avaa linkki uudessa välilehdessä",Orange:"Oranssi",Original:"Alkuperäinen",Outset:"Ulkonema",Padding:"Täyte",Paragraph:"Kappale","Press Enter to type after or press Shift + Enter to type before the widget":"Paina enter-näppäintä kirjoittaaksesi tai paina shift + enter kirjoittaaksesi ennen widget-sovellusta",Previous:"Edellinen",Purple:"Purppura",Red:"Punainen",Redo:"Tee uudelleen","Remove color":"Poista väri","Remove Format":"Poista muotoilu","Replace from computer":"Korvaa tietokoneelta","Replace image":"Korvaa kuva","Replace image from computer":"Korvaa kuva tietokoneelta","Resize image":"Muokkaa kuvan kokoa","Resize image to %0":"Muokkaa kuvan kooksi %0","Resize image to the original size":"Vaihda kuvan koko alkuperäiseen kokoon","Restore default":"Palauta oletus","Reversed order":"Päinvastainen järjestys","Rich Text Editor":"Rikas tekstieditori",Ridge:"Harjanne","Right aligned image":"Oikealle tasattu kuva",Row:"Rivi",Save:"Tallenna","Select all":"Valitse kaikki","Select column":"Valitse sarake","Select row":"Valitse rivi","Show more items":"Näytä lisää toimintoja","Side image":"Pieni kuva",Small:"Pieni",Solid:"Kiinteä","Split cell horizontally":"Jaa solu vaakasuunnassa","Split cell vertically":"Jaa solu pystysuunnassa",Square:"Neliö","Start at":"Alkaa","Start index must be greater than 0.":"Aloitusindeksin pitää olla suurempi kuin 0.",Strikethrough:"Yliviivaus",Style:"Tyyli",Subscript:"Alaindeksi",Superscript:"Yläindeksi","Table alignment toolbar":"Taulukon suunnan työkalupalkki","Table cell text alignment":"Taulukkosolun tekstin suunta","Table properties":"Taulukon ominaisuudet","Table toolbar":"Taulukon työkalupalkki","Text alignment":"Tekstin tasaus","Text alignment toolbar":"Tekstin suuntauksen työkalupalkki","Text alternative":"Vaihtoehtoinen teksti",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Väri ei kelpaa. Ota sen sijaan käyttöön "#FF0000", "rgb(255,0,0)" tai "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Arvo ei kelpaa. Ota käyttöön "10px", "2em" tai pelkästään "2".',"This link has no URL":"Linkillä ei ole URL-osoitetta",Tiny:"Hyvin pieni","To-do List":"Tehtävälista","Toggle caption off":"Poista taulukon kuvaus","Toggle caption on":"Lisää taulukon kuvaus","Toggle the circle list style":"Ympyrälistatyylin vaihdin","Toggle the decimal list style":"Desimaalilistatyylin vaihdin","Toggle the decimal with leading zero list style":"Nolla alussa -desimaalilistatyylin vaihdin","Toggle the disc list style":"Levylistatyylin vaihdin","Toggle the lower–latin list style":"Pienet latinalaiset aakkoset -listatyylin vaihdin","Toggle the lower–roman list style":"Pienet roomalaiset numerot -listatyylin vaihdin","Toggle the square list style":"Neliölistatyylin vaihdin","Toggle the upper–latin list style":"Isot latinalaiset aakkoset -listatyylin vaihdin","Toggle the upper–roman list style":"Isot roomalaiset numerot -listatyylin vaihdin",Turquoise:"Turkoosi","Type or paste your content here.":"Kirjoita tai liitä sisältösi tänne.","Type your title":"Kirjoita otsikkosi",Underline:"Alleviivaus",Undo:"Peru",Unlink:"Poista linkki",Update:"Päivitä","Update image URL":"Päivitä kuvan URL","Upload failed":"Lataus epäonnistui","Upload from computer":"Lataa tietokoneelta","Upload image from computer":"Lataa kuva tietokoneelta","Upload in progress":"Lähetys käynnissä","Upper-latin":"Isot latinalaiset aakkoset","Upper-roman":"Isot roomalaiset numerot","Vertical text alignment toolbar":"Pystysuoran tekstin suunnan työkalupalkki",White:"Valkoinen","Widget toolbar":"Widget-työkalupalkki",Width:"Leveys","Wrap text":"Sovita teksti",Yellow:"Keltainen"}),i.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/fr.js b/public/static/plugs/ckeditor5/translations/fr.js
index 4fad06c43..dfe8d29be 100644
--- a/public/static/plugs/ckeditor5/translations/fr.js
+++ b/public/static/plugs/ckeditor5/translations/fr.js
@@ -1 +1 @@
-!function(e){const l=e.fr=e.fr||{};l.dictionary=Object.assign(l.dictionary||{},{"%0 of %1":"%0 sur %1",Accept:"Accepter","Align cell text to the bottom":"Aligner le texte en bas","Align cell text to the center":"Aligner la cellule au centre","Align cell text to the left":"Aligner la cellule à gauche","Align cell text to the middle":"Aligner le texte au milieu","Align cell text to the right":"Aligner la cellule à droite","Align cell text to the top":"Aligner le texte en haut","Align center":"Centrer","Align left":"Aligner à gauche","Align right":"Aligner à droite","Align table to the left":"Aligner le tableau à gauche","Align table to the right":"Aligner le tableau à droite",Alignment:"Alignement",Aquamarine:"Bleu vert",Background:"Fond",Big:"Grand",Black:"Noir","Block quote":"Citation",Blue:"Bleu",Bold:"Gras",Border:"Bordure","Break text":"Saut de ligne","Bulleted List":"Liste à puces","Bulleted list styles toolbar":"Barre d'outils des styles de liste à puce",Cancel:"Annuler","Caption for image: %0":"Légende de l'image : %0","Caption for the image":"Légende de l'image","Cell properties":"Propriétés de la cellule","Center table":"Centrer le tableau ","Centered image":"Image centrée","Change image text alternative":"Changer le texte alternatif à l’image","Choose heading":"Choisir l'en-tête",Circle:"Cercle",Clear:"Effacer","Click to edit block":"Cliquer pour modifier le bloc",Code:"Code",Color:"Couleur","Color picker":"Pipette à couleurs",Column:"Colonne",Dashed:"Tirets",Decimal:"Chiffres","Decimal with leading zero":"Chiffres avec des zéros supplémentaire","Decrease indent":"Diminuer le retrait",Default:"Par défaut","Delete column":"Supprimer la colonne","Delete row":"Supprimer la ligne","Dim grey":"Gris pâle",Dimensions:"Dimensions",Disc:"Disque","Document colors":"Couleurs du document",Dotted:"Pointillés",Double:"Double",Downloadable:"Fichier téléchargeable","Drag to move":"Faire glisser pour déplacer","Dropdown toolbar":"Barre d'outils dans un menu déroulant","Edit block":"Modifier le bloc","Edit link":"Modifier le lien","Editor block content toolbar":"Barre d'outils du contenu du bloc éditeur","Editor contextual toolbar":"Barre d'outils contextuelle de l'éditeur","Editor editing area: %0":"Zone d'édition de l'éditeur : %0","Editor toolbar":"Barre d'outils de l'éditeur","Enter image caption":"Saisir la légende de l’image","Enter table caption":"Saisir la légende du tableau","Font Background Color":"Couleur d'arrière-plan","Font Color":"Couleur de police","Font Family":"Police","Font Size":"Taille de police","Full size image":"Image taille réelle",Green:"Vert",Grey:"Gris",Groove:"Rainuré","Header column":"Colonne d'entête","Header row":"Ligne d'entête",Heading:"En-tête","Heading 1":"Titre 1","Heading 2":"Titre 2","Heading 3":"Titre 3","Heading 4":"Titre 4","Heading 5":"Titre 5","Heading 6":"Titre 6",Height:"Hauteur",HEX:"HEX","Horizontal line":"Ligne horizontale","Horizontal text alignment toolbar":"Barre d'outils pour modifier l'alignement horizontal du texte","HTML object":"Objet HTML",Huge:"Enorme","Image resize list":"Liste des tailles d'images","Image toolbar":"Barre d'outils des images","image widget":"Objet image","In line":"Aligné","Increase indent":"Augmenter le retrait",Insert:"Insérer","Insert column left":"Insérer une colonne à gauche","Insert column right":"Insérer une colonne à droite","Insert image":"Insérer une image","Insert image via URL":"Insérer une image à partir d'une URL","Insert paragraph after block":"Insérer du texte après ce bloc","Insert paragraph before block":"Insérer du texte avant ce bloc","Insert row above":"Insérer une ligne au-dessus","Insert row below":"Insérer une ligne en-dessous","Insert table":"Insérer un tableau",Inset:"Relief intérieur",Italic:"Italique",Justify:"Justifier","Justify cell text":"Justifier le contenu de la cellule","Left aligned image":"Image alignée à gauche","Light blue":"Bleu clair","Light green":"Vert clair","Light grey":"Gris clair",Link:"Lien","Link image":"Lien d'image","Link URL":"URL du lien","List properties":"Liste des propriétés","Lower-latin":"Lettres minuscules","Lower–roman":"Chiffres romains en minuscules","Merge cell down":"Fusionner la cellule en-dessous","Merge cell left":"Fusionner la cellule à gauche","Merge cell right":"Fusionner la cellule à droite","Merge cell up":"Fusionner la cellule au-dessus","Merge cells":"Fusionner les cellules",Next:"Suivant","No results found":"Aucun résultat trouvé","No searchable items":"Aucun élément consultable",None:"Aucun","Numbered List":"Liste numérotée","Numbered list styles toolbar":"Barre d'outils des styles de liste numérotée","Open in a new tab":"Ouvrir dans un nouvel onglet","Open link in new tab":"Ouvrir le lien dans un nouvel onglet",Orange:"Orange",Original:"Taille originale",Outset:"Relief extérieur",Padding:"Remplissage pour aérer le texte",Paragraph:"Paragraphe","Press Enter to type after or press Shift + Enter to type before the widget":"Appuyez sur la touche Entrée pour taper après ou sur Maj + Entrée pour taper avant le widget.",Previous:"Précedent",Purple:"Violet",Red:"Rouge",Redo:"Restaurer","Remove color":"Enlever la couleur","Remove Format":"Enlever le format","Replace from computer":"Remplacer depuis l'ordinateur","Replace image":"Remplacer l'image","Replace image from computer":"Remplacer l'image depuis l'ordinateur","Resize image":"Redimensionner l'image","Resize image to %0":"Redimensionner à %0","Resize image to the original size":"Appliquer les dimensions d'origine","Restore default":"Restaurer par défaut","Reversed order":"Ordre inversé","Rich Text Editor":"Éditeur de texte enrichi",Ridge:"Relief","Right aligned image":"Image alignée à droite",Row:"Ligne",Save:"Enregistrer","Select all":"Sélectionner tout","Select column":"Sélectionner la colonne","Select row":"Sélectionner la ligne","Show more items":"Montrer plus d'éléments","Side image":"Image latérale",Small:"Petit",Solid:"Continu","Split cell horizontally":"Scinder la cellule horizontalement","Split cell vertically":"Scinder la cellule verticalement",Square:"Carré","Start at":"Commencer à","Start index must be greater than 0.":"L'indice de départ doit être supérieur à 0.",Strikethrough:"Barré",Style:"Style",Subscript:"Indice",Superscript:"Exposant","Table alignment toolbar":"Barre d'outils pour modifier l'alignement du tableau","Table cell text alignment":"Alignement du texte de la cellule","Table properties":"Propriétés du tableau","Table toolbar":"Barre d'outils des tableaux","Text alignment":"Alignement du texte","Text alignment toolbar":"Barre d'outils d'alignement du texte","Text alternative":"Texte alternatif",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'La couleur est invalide. Essayez "#FF0000" ou "rgb(255,0,0)" ou "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'La valeur est invalide. Essayez "10px" ou "2em" ou simplement "2".',"This link has no URL":"Ce lien n'a pas d'URL",Tiny:"Minuscule","To-do List":"Liste de tâches","Toggle caption off":"Désactiver la légende","Toggle caption on":"Activer la légende","Toggle the circle list style":'Activer / désactiver le style de liste "cercle"',"Toggle the decimal list style":'Activer / désactiver le style de liste "chiffres"',"Toggle the decimal with leading zero list style":'Activer / désactiver le style de liste "chiffres de mêmes longueurs"',"Toggle the disc list style":'Activer / désactiver le style de liste "disque"',"Toggle the lower–latin list style":'Activer / désactiver le style de liste "lettres minuscules"',"Toggle the lower–roman list style":'Activer / désactiver le style de liste "chiffres romains en minuscules"',"Toggle the square list style":'Activer / désactiver le style de liste "carré"',"Toggle the upper–latin list style":'Activer / désactiver le style de liste "lettres majuscules"',"Toggle the upper–roman list style":'Activer / désactiver le style de liste "chiffres romains en majuscules"',Turquoise:"Turquoise","Type or paste your content here.":"Noter ou coller votre contenu ici","Type your title":"Rentrer votre titre",Underline:"Souligné",Undo:"Annuler",Unlink:"Supprimer le lien",Update:"Modifier","Update image URL":"Modifier l'URL de l'image","Upload failed":"Échec de l'envoi","Upload from computer":"Télécharger depuis l'ordinateur","Upload image from computer":"Télécharger une image depuis l'ordinateur","Upload in progress":"Téléchargement en cours","Upper-latin":"Lettres majuscules","Upper-roman":"Chiffres romains en majuscules","Vertical text alignment toolbar":"Barre d'outils pour modifier l'alignement vertical du texte",White:"Blanc","Widget toolbar":"Barre d'outils du widget",Width:"Largeur","Wrap text":"Retour à la ligne",Yellow:"Jaune"}),l.getPluralForm=function(e){return 0==e||1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const l=e.fr=e.fr||{};l.dictionary=Object.assign(l.dictionary||{},{"%0 of %1":"%0 sur %1",Accept:"Accepter","Align cell text to the bottom":"Aligner le texte en bas","Align cell text to the center":"Aligner la cellule au centre","Align cell text to the left":"Aligner la cellule à gauche","Align cell text to the middle":"Aligner le texte au milieu","Align cell text to the right":"Aligner la cellule à droite","Align cell text to the top":"Aligner le texte en haut","Align center":"Centrer","Align left":"Aligner à gauche","Align right":"Aligner à droite","Align table to the left":"Aligner le tableau à gauche","Align table to the right":"Aligner le tableau à droite",Alignment:"Alignement",Aquamarine:"Bleu vert",Background:"Fond",Big:"Grand",Black:"Noir","Block quote":"Citation",Blue:"Bleu",Bold:"Gras",Border:"Bordure","Break text":"Saut de ligne","Bulleted List":"Liste à puces","Bulleted list styles toolbar":"Barre d'outils des styles de liste à puce",Cancel:"Annuler","Caption for image: %0":"Légende de l'image : %0","Caption for the image":"Légende de l'image","Cell properties":"Propriétés de la cellule","Center table":"Centrer le tableau ","Centered image":"Image centrée","Change image text alternative":"Changer le texte alternatif à l’image","Choose heading":"Choisir l'en-tête",Circle:"Cercle",Clear:"Effacer","Click to edit block":"Cliquer pour modifier le bloc",Close:"Fermer",Code:"Code",Color:"Couleur","Color picker":"Pipette à couleurs",Column:"Colonne",Dashed:"Tirets",Decimal:"Chiffres","Decimal with leading zero":"Chiffres avec des zéros supplémentaire","Decrease indent":"Diminuer le retrait",Default:"Par défaut","Delete column":"Supprimer la colonne","Delete row":"Supprimer la ligne","Dim grey":"Gris pâle",Dimensions:"Dimensions",Disc:"Disque","Document colors":"Couleurs du document",Dotted:"Pointillés",Double:"Double",Downloadable:"Fichier téléchargeable","Drag to move":"Faire glisser pour déplacer","Dropdown toolbar":"Barre d'outils dans un menu déroulant","Edit block":"Modifier le bloc","Edit link":"Modifier le lien","Editor block content toolbar":"Barre d'outils du contenu du bloc éditeur","Editor contextual toolbar":"Barre d'outils contextuelle de l'éditeur","Editor dialog":"Boîte de dialogue de l'éditeur","Editor editing area: %0":"Zone d'édition de l'éditeur : %0","Editor toolbar":"Barre d'outils de l'éditeur","Enter image caption":"Saisir la légende de l’image","Enter table caption":"Saisir la légende du tableau","Font Background Color":"Couleur d'arrière-plan","Font Color":"Couleur de police","Font Family":"Police","Font Size":"Taille de police","Full size image":"Image taille réelle",Green:"Vert",Grey:"Gris",Groove:"Rainuré","Header column":"Colonne d'entête","Header row":"Ligne d'entête",Heading:"En-tête","Heading 1":"Titre 1","Heading 2":"Titre 2","Heading 3":"Titre 3","Heading 4":"Titre 4","Heading 5":"Titre 5","Heading 6":"Titre 6",Height:"Hauteur",HEX:"HEX","Horizontal line":"Ligne horizontale","Horizontal text alignment toolbar":"Barre d'outils pour modifier l'alignement horizontal du texte","HTML object":"Objet HTML",Huge:"Enorme","Image resize list":"Liste des tailles d'images","Image toolbar":"Barre d'outils des images","image widget":"Objet image","In line":"Aligné","Increase indent":"Augmenter le retrait",Insert:"Insérer","Insert column left":"Insérer une colonne à gauche","Insert column right":"Insérer une colonne à droite","Insert image":"Insérer une image","Insert image via URL":"Insérer une image à partir d'une URL","Insert paragraph after block":"Insérer du texte après ce bloc","Insert paragraph before block":"Insérer du texte avant ce bloc","Insert row above":"Insérer une ligne au-dessus","Insert row below":"Insérer une ligne en-dessous","Insert table":"Insérer un tableau",Inset:"Relief intérieur",Italic:"Italique",Justify:"Justifier","Justify cell text":"Justifier le contenu de la cellule","Left aligned image":"Image alignée à gauche","Light blue":"Bleu clair","Light green":"Vert clair","Light grey":"Gris clair",Link:"Lien","Link image":"Lien d'image","Link URL":"URL du lien","List properties":"Liste des propriétés","Lower-latin":"Lettres minuscules","Lower–roman":"Chiffres romains en minuscules","Merge cell down":"Fusionner la cellule en-dessous","Merge cell left":"Fusionner la cellule à gauche","Merge cell right":"Fusionner la cellule à droite","Merge cell up":"Fusionner la cellule au-dessus","Merge cells":"Fusionner les cellules",Next:"Suivant","No results found":"Aucun résultat trouvé","No searchable items":"Aucun élément consultable",None:"Aucun","Numbered List":"Liste numérotée","Numbered list styles toolbar":"Barre d'outils des styles de liste numérotée","Open in a new tab":"Ouvrir dans un nouvel onglet","Open link in new tab":"Ouvrir le lien dans un nouvel onglet",Orange:"Orange",Original:"Taille originale",Outset:"Relief extérieur",Padding:"Remplissage pour aérer le texte",Paragraph:"Paragraphe","Press Enter to type after or press Shift + Enter to type before the widget":"Appuyez sur la touche Entrée pour taper après ou sur Maj + Entrée pour taper avant le widget.",Previous:"Précedent",Purple:"Violet",Red:"Rouge",Redo:"Restaurer","Remove color":"Enlever la couleur","Remove Format":"Enlever le format","Replace from computer":"Remplacer depuis l'ordinateur","Replace image":"Remplacer l'image","Replace image from computer":"Remplacer l'image depuis l'ordinateur","Resize image":"Redimensionner l'image","Resize image to %0":"Redimensionner à %0","Resize image to the original size":"Appliquer les dimensions d'origine","Restore default":"Restaurer par défaut","Reversed order":"Ordre inversé","Rich Text Editor":"Éditeur de texte enrichi",Ridge:"Relief","Right aligned image":"Image alignée à droite",Row:"Ligne",Save:"Enregistrer","Select all":"Sélectionner tout","Select column":"Sélectionner la colonne","Select row":"Sélectionner la ligne","Show more items":"Montrer plus d'éléments","Side image":"Image latérale",Small:"Petit",Solid:"Continu","Split cell horizontally":"Scinder la cellule horizontalement","Split cell vertically":"Scinder la cellule verticalement",Square:"Carré","Start at":"Commencer à","Start index must be greater than 0.":"L'indice de départ doit être supérieur à 0.",Strikethrough:"Barré",Style:"Style",Subscript:"Indice",Superscript:"Exposant","Table alignment toolbar":"Barre d'outils pour modifier l'alignement du tableau","Table cell text alignment":"Alignement du texte de la cellule","Table properties":"Propriétés du tableau","Table toolbar":"Barre d'outils des tableaux","Text alignment":"Alignement du texte","Text alignment toolbar":"Barre d'outils d'alignement du texte","Text alternative":"Texte alternatif",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'La couleur est invalide. Essayez "#FF0000" ou "rgb(255,0,0)" ou "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'La valeur est invalide. Essayez "10px" ou "2em" ou simplement "2".',"This link has no URL":"Ce lien n'a pas d'URL",Tiny:"Minuscule","To-do List":"Liste de tâches","Toggle caption off":"Désactiver la légende","Toggle caption on":"Activer la légende","Toggle the circle list style":'Activer / désactiver le style de liste "cercle"',"Toggle the decimal list style":'Activer / désactiver le style de liste "chiffres"',"Toggle the decimal with leading zero list style":'Activer / désactiver le style de liste "chiffres de mêmes longueurs"',"Toggle the disc list style":'Activer / désactiver le style de liste "disque"',"Toggle the lower–latin list style":'Activer / désactiver le style de liste "lettres minuscules"',"Toggle the lower–roman list style":'Activer / désactiver le style de liste "chiffres romains en minuscules"',"Toggle the square list style":'Activer / désactiver le style de liste "carré"',"Toggle the upper–latin list style":'Activer / désactiver le style de liste "lettres majuscules"',"Toggle the upper–roman list style":'Activer / désactiver le style de liste "chiffres romains en majuscules"',Turquoise:"Turquoise","Type or paste your content here.":"Noter ou coller votre contenu ici","Type your title":"Rentrer votre titre",Underline:"Souligné",Undo:"Annuler",Unlink:"Supprimer le lien",Update:"Modifier","Update image URL":"Modifier l'URL de l'image","Upload failed":"Échec de l'envoi","Upload from computer":"Télécharger depuis l'ordinateur","Upload image from computer":"Télécharger une image depuis l'ordinateur","Upload in progress":"Téléchargement en cours","Upper-latin":"Lettres majuscules","Upper-roman":"Chiffres romains en majuscules","Vertical text alignment toolbar":"Barre d'outils pour modifier l'alignement vertical du texte",White:"Blanc","Widget toolbar":"Barre d'outils du widget",Width:"Largeur","Wrap text":"Retour à la ligne",Yellow:"Jaune"}),l.getPluralForm=function(e){return 0==e||1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/gl.js b/public/static/plugs/ckeditor5/translations/gl.js
index 53ebc1640..22e6ae408 100644
--- a/public/static/plugs/ckeditor5/translations/gl.js
+++ b/public/static/plugs/ckeditor5/translations/gl.js
@@ -1 +1 @@
-!function(e){const a=e.gl=e.gl||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceptar","Align cell text to the bottom":"Aliñar o texto da cela á base","Align cell text to the center":"Aliñar o texto da cela ao centro","Align cell text to the left":"Aliñar o texto da cela á esquerda","Align cell text to the middle":"Aliñar o texto da cela ao medio","Align cell text to the right":"Aliña o texto da cela á dereita","Align cell text to the top":"Aliñar o texto da cela á parte superior","Align center":"Centrar horizontalmente","Align left":"Aliñar á esquerda","Align right":"Aliñar á dereita","Align table to the left":"Aliñar a táboa á esquerda","Align table to the right":"Aliñar a táboa á dereita",Alignment:"Aliñamento",Aquamarine:"Augamariña",Background:"Fondo",Big:"Grande",Black:"Negro","Block quote":"Cita de bloque",Blue:"Azul",Bold:"Negra",Border:"Bordo","Break text":"Romper o texto","Bulleted List":"Lista con viñetas","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista con viñetas",Cancel:"Cancelar","Caption for image: %0":"Lenda da imaxe: %0","Caption for the image":"Lenda da imaxe","Cell properties":"Propiedades da cela","Center table":"Centrar a táboa","Centered image":"Imaxe centrada horizontalmente","Change image text alternative":"Cambiar o texto alternativo da imaxe","Choose heading":"Escolla o título",Circle:"Círculos",Clear:"Limpar","Click to edit block":"Prema para editar o bloque",Code:"Código",Color:"Cor","Color picker":"Selector de cores",Column:"Columna",Dashed:"Raiado",Decimal:"Decimais","Decimal with leading zero":"Decimais con cero á esquerda","Decrease indent":"Reducir a sangría",Default:"Predeterminada","Delete column":"Eliminar columna","Delete row":"Eliminar fila","Dim grey":"Gris fume",Dimensions:"Dimensións",Disc:"Discos","Document colors":"Cores do documento",Dotted:"Punteado",Double:"Dobre",Downloadable:"Descargábel","Drag to move":"Arrastre para mover","Dropdown toolbar":"Barra de ferramentas despregábel","Edit block":"Editar bloque","Edit link":"Editar a ligazón","Editor block content toolbar":"Barra de ferramentas de contido do bloque do editor","Editor contextual toolbar":"Barra de ferramentas contextual do editor","Editor editing area: %0":"Área de edición do editor: %0","Editor toolbar":"Barra de ferramentas do editor","Enter image caption":"Introduza o título da imaxe","Enter table caption":"Introduza o título da táboa","Font Background Color":"Cor do fondo da letra","Font Color":"Cor da letra","Font Family":"Familia tipográfica","Font Size":"Tamaño da letra","Full size image":"Imaxe a tamaño completo",Green:"Verde",Grey:"Gris",Groove:"Rañura","Header column":"Cabeceira de columna","Header row":"Cabeceira de fila",Heading:"Título","Heading 1":"Título 1","Heading 2":"Título 2","Heading 3":"Título 3","Heading 4":"Título 4","Heading 5":"Título 5","Heading 6":"Título 6",Height:"Alto",HEX:"HEX","Horizontal line":"Liña horizontal","Horizontal text alignment toolbar":"Barra de ferramentas de aliñamento de texto horizontal","HTML object":"Obxecto HTML",Huge:"Enorme","Image resize list":"Lista de tamaños de imaxe","Image toolbar":"Barra de ferramentas de imaxe","image widget":"Trebello de imaxe","In line":"En liña","Increase indent":"Aumentar a sangría",Insert:"Inserir","Insert column left":"Inserir columna á esquerda","Insert column right":"Inserir columna á dereita","Insert image":"Inserir imaxe","Insert image via URL":"Inserir imaxe a través de URL","Insert paragraph after block":"Inserir parágrafo após o bloque","Insert paragraph before block":"Inserir parágrafo antes do bloque","Insert row above":"Inserir fila enriba","Insert row below":"Inserir fila embaixo","Insert table":"Inserir táboa",Inset:"Inserción",Italic:"Itálica",Justify:"Xustificado","Justify cell text":"Xustificar o texto da cela","Left aligned image":"Imaxe aliñada á esquerda","Light blue":"Azul claro","Light green":"Verde claro","Light grey":"Gris claro",Link:"Ligar","Link image":"Ligazón da imaxe","Link URL":"URL de ligazón","List properties":"Lista de propiedades","Lower-latin":"Letras minúsculas","Lower–roman":"Núm, romanos en minúscula","Merge cell down":"Combinar cela cara  abaixo","Merge cell left":"Combinar cela cara a esquerda","Merge cell right":"Combinar cela cara a dereita","Merge cell up":"Combinar cela cara arriba","Merge cells":"Combinar celas",Next:"Seguinte","No results found":"Non se atoparon resultados","No searchable items":"Non hai elementos que se poidan buscar",None:"Ningún","Numbered List":"Lista numerada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","Open in a new tab":"Abrir nunha nova lapela","Open link in new tab":"Abrir a ligazón nunha nova lapela",Orange:"Laranxa",Original:"Orixinal",Outset:"Inicio",Padding:"Recheo",Paragraph:"Parágrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Prema Intro para escribir após ou prema Maiús + Intro para escribir antes do trebello",Previous:"Anterior",Purple:"Púrpura",Red:"Vermello",Redo:"Refacer","Remove color":"Retirar a cor","Remove Format":"Retirar o formato","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Redimensionar a imaxe","Resize image to %0":"Redimensionar a imaxe ao %0","Resize image to the original size":"Aplicar o tamaño orixinal da imaxe","Restore default":"Restaurar valores predeterminados","Reversed order":"Orde inversa","Rich Text Editor":"Editor de texto mellorado",Ridge:"Crista","Right aligned image":"Imaxe aliñada á dereita",Row:"Fila",Save:"Gardar","Select all":"Seleccionar todo","Select column":"Seleccionar columna","Select row":"Seleccionar fila","Show more items":"Amosar máis elementos","Side image":"Lado da imaxe",Small:"Pequena",Solid:"Sólido","Split cell horizontally":"Dividir cela en horizontal","Split cell vertically":"Dividir cela en vertical",Square:"Cadrados","Start at":"Comezar en","Start index must be greater than 0.":"O índice de inicio debe ser maior que 0.",Strikethrough:"Riscado",Style:"Estilo",Subscript:"Subíndice",Superscript:"Superíndice","Table alignment toolbar":"Barra de ferramentas de aliñamento da táboa","Table cell text alignment":"Aliñamento do texto das celas da táboa","Table properties":"Propiedades da táboa","Table toolbar":"Barra de ferramentas de táboas","Text alignment":"Aliñamento do texto","Text alignment toolbar":"Barra de ferramentas de aliñamento de textos","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"A cor non é válida. Probe «#FF0000» ou «rgb(255,0,0)» ou «vermello».",'The value is invalid. Try "10px" or "2em" or simply "2".':"O valor non é válido. Probe «10px» ou «2em» ou simplemente «2».","This link has no URL":"Esta ligazón non ten URL",Tiny:"Diminuta","To-do List":"Lista de cousas por facer","Toggle caption off":"Desactivar os subtítulos","Toggle caption on":"Activar os subtítulos","Toggle the circle list style":"Alternar o estilo da lista «círculos»","Toggle the decimal list style":"Alternar o estilo da lista «decimais»","Toggle the decimal with leading zero list style":"Activar/desactivar o estilo «decimais con cero á esquerda»","Toggle the disc list style":"Alternar o estilo da lista «discos»","Toggle the lower–latin list style":"Activar/desactivar o estilo da lista «letras minúsculas»","Toggle the lower–roman list style":"Activar/desactivar o estilo da lista «núm. romanos en minúscula»","Toggle the square list style":"Alternar o estilo da lista «cadrados»","Toggle the upper–latin list style":"Activar/desactivar o estilo da lista «letras maiúsculas»","Toggle the upper–roman list style":"Activar/desactivar o estilo da lista «núm. romanos en maiúscula»",Turquoise:"Turquesa","Type or paste your content here.":"Escriba ou pegue o seu contido aquí.","Type your title":"Escriba o seu título",Underline:"Subliñado",Undo:"Desfacer",Unlink:"Desligar",Update:"Actualizar","Update image URL":"Actualizar o URL da imaxe","Upload failed":"Fallou o envío","Upload from computer":"","Upload image from computer":"","Upload in progress":"Envío en proceso","Upper-latin":"Letras maiúsculas","Upper-roman":"Núm, romanos en maiúscula","Vertical text alignment toolbar":"Barra de ferramentas de aliñamento de texto vertical",White:"Branco","Widget toolbar":"Barra de ferramentas de trebellos",Width:"Largo","Wrap text":"Envolver o texto",Yellow:"Amarelo"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.gl=e.gl||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceptar","Align cell text to the bottom":"Aliñar o texto da cela á base","Align cell text to the center":"Aliñar o texto da cela ao centro","Align cell text to the left":"Aliñar o texto da cela á esquerda","Align cell text to the middle":"Aliñar o texto da cela ao medio","Align cell text to the right":"Aliña o texto da cela á dereita","Align cell text to the top":"Aliñar o texto da cela á parte superior","Align center":"Centrar horizontalmente","Align left":"Aliñar á esquerda","Align right":"Aliñar á dereita","Align table to the left":"Aliñar a táboa á esquerda","Align table to the right":"Aliñar a táboa á dereita",Alignment:"Aliñamento",Aquamarine:"Augamariña",Background:"Fondo",Big:"Grande",Black:"Negro","Block quote":"Cita de bloque",Blue:"Azul",Bold:"Negra",Border:"Bordo","Break text":"Romper o texto","Bulleted List":"Lista con viñetas","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista con viñetas",Cancel:"Cancelar","Caption for image: %0":"Lenda da imaxe: %0","Caption for the image":"Lenda da imaxe","Cell properties":"Propiedades da cela","Center table":"Centrar a táboa","Centered image":"Imaxe centrada horizontalmente","Change image text alternative":"Cambiar o texto alternativo da imaxe","Choose heading":"Escolla o título",Circle:"Círculos",Clear:"Limpar","Click to edit block":"Prema para editar o bloque",Close:"",Code:"Código",Color:"Cor","Color picker":"Selector de cores",Column:"Columna",Dashed:"Raiado",Decimal:"Decimais","Decimal with leading zero":"Decimais con cero á esquerda","Decrease indent":"Reducir a sangría",Default:"Predeterminada","Delete column":"Eliminar columna","Delete row":"Eliminar fila","Dim grey":"Gris fume",Dimensions:"Dimensións",Disc:"Discos","Document colors":"Cores do documento",Dotted:"Punteado",Double:"Dobre",Downloadable:"Descargábel","Drag to move":"Arrastre para mover","Dropdown toolbar":"Barra de ferramentas despregábel","Edit block":"Editar bloque","Edit link":"Editar a ligazón","Editor block content toolbar":"Barra de ferramentas de contido do bloque do editor","Editor contextual toolbar":"Barra de ferramentas contextual do editor","Editor dialog":"","Editor editing area: %0":"Área de edición do editor: %0","Editor toolbar":"Barra de ferramentas do editor","Enter image caption":"Introduza o título da imaxe","Enter table caption":"Introduza o título da táboa","Font Background Color":"Cor do fondo da letra","Font Color":"Cor da letra","Font Family":"Familia tipográfica","Font Size":"Tamaño da letra","Full size image":"Imaxe a tamaño completo",Green:"Verde",Grey:"Gris",Groove:"Rañura","Header column":"Cabeceira de columna","Header row":"Cabeceira de fila",Heading:"Título","Heading 1":"Título 1","Heading 2":"Título 2","Heading 3":"Título 3","Heading 4":"Título 4","Heading 5":"Título 5","Heading 6":"Título 6",Height:"Alto",HEX:"HEX","Horizontal line":"Liña horizontal","Horizontal text alignment toolbar":"Barra de ferramentas de aliñamento de texto horizontal","HTML object":"Obxecto HTML",Huge:"Enorme","Image resize list":"Lista de tamaños de imaxe","Image toolbar":"Barra de ferramentas de imaxe","image widget":"Trebello de imaxe","In line":"En liña","Increase indent":"Aumentar a sangría",Insert:"Inserir","Insert column left":"Inserir columna á esquerda","Insert column right":"Inserir columna á dereita","Insert image":"Inserir imaxe","Insert image via URL":"Inserir imaxe a través de URL","Insert paragraph after block":"Inserir parágrafo após o bloque","Insert paragraph before block":"Inserir parágrafo antes do bloque","Insert row above":"Inserir fila enriba","Insert row below":"Inserir fila embaixo","Insert table":"Inserir táboa",Inset:"Inserción",Italic:"Itálica",Justify:"Xustificado","Justify cell text":"Xustificar o texto da cela","Left aligned image":"Imaxe aliñada á esquerda","Light blue":"Azul claro","Light green":"Verde claro","Light grey":"Gris claro",Link:"Ligar","Link image":"Ligazón da imaxe","Link URL":"URL de ligazón","List properties":"Lista de propiedades","Lower-latin":"Letras minúsculas","Lower–roman":"Núm, romanos en minúscula","Merge cell down":"Combinar cela cara  abaixo","Merge cell left":"Combinar cela cara a esquerda","Merge cell right":"Combinar cela cara a dereita","Merge cell up":"Combinar cela cara arriba","Merge cells":"Combinar celas",Next:"Seguinte","No results found":"Non se atoparon resultados","No searchable items":"Non hai elementos que se poidan buscar",None:"Ningún","Numbered List":"Lista numerada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","Open in a new tab":"Abrir nunha nova lapela","Open link in new tab":"Abrir a ligazón nunha nova lapela",Orange:"Laranxa",Original:"Orixinal",Outset:"Inicio",Padding:"Recheo",Paragraph:"Parágrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Prema Intro para escribir após ou prema Maiús + Intro para escribir antes do trebello",Previous:"Anterior",Purple:"Púrpura",Red:"Vermello",Redo:"Refacer","Remove color":"Retirar a cor","Remove Format":"Retirar o formato","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Redimensionar a imaxe","Resize image to %0":"Redimensionar a imaxe ao %0","Resize image to the original size":"Aplicar o tamaño orixinal da imaxe","Restore default":"Restaurar valores predeterminados","Reversed order":"Orde inversa","Rich Text Editor":"Editor de texto mellorado",Ridge:"Crista","Right aligned image":"Imaxe aliñada á dereita",Row:"Fila",Save:"Gardar","Select all":"Seleccionar todo","Select column":"Seleccionar columna","Select row":"Seleccionar fila","Show more items":"Amosar máis elementos","Side image":"Lado da imaxe",Small:"Pequena",Solid:"Sólido","Split cell horizontally":"Dividir cela en horizontal","Split cell vertically":"Dividir cela en vertical",Square:"Cadrados","Start at":"Comezar en","Start index must be greater than 0.":"O índice de inicio debe ser maior que 0.",Strikethrough:"Riscado",Style:"Estilo",Subscript:"Subíndice",Superscript:"Superíndice","Table alignment toolbar":"Barra de ferramentas de aliñamento da táboa","Table cell text alignment":"Aliñamento do texto das celas da táboa","Table properties":"Propiedades da táboa","Table toolbar":"Barra de ferramentas de táboas","Text alignment":"Aliñamento do texto","Text alignment toolbar":"Barra de ferramentas de aliñamento de textos","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"A cor non é válida. Probe «#FF0000» ou «rgb(255,0,0)» ou «vermello».",'The value is invalid. Try "10px" or "2em" or simply "2".':"O valor non é válido. Probe «10px» ou «2em» ou simplemente «2».","This link has no URL":"Esta ligazón non ten URL",Tiny:"Diminuta","To-do List":"Lista de cousas por facer","Toggle caption off":"Desactivar os subtítulos","Toggle caption on":"Activar os subtítulos","Toggle the circle list style":"Alternar o estilo da lista «círculos»","Toggle the decimal list style":"Alternar o estilo da lista «decimais»","Toggle the decimal with leading zero list style":"Activar/desactivar o estilo «decimais con cero á esquerda»","Toggle the disc list style":"Alternar o estilo da lista «discos»","Toggle the lower–latin list style":"Activar/desactivar o estilo da lista «letras minúsculas»","Toggle the lower–roman list style":"Activar/desactivar o estilo da lista «núm. romanos en minúscula»","Toggle the square list style":"Alternar o estilo da lista «cadrados»","Toggle the upper–latin list style":"Activar/desactivar o estilo da lista «letras maiúsculas»","Toggle the upper–roman list style":"Activar/desactivar o estilo da lista «núm. romanos en maiúscula»",Turquoise:"Turquesa","Type or paste your content here.":"Escriba ou pegue o seu contido aquí.","Type your title":"Escriba o seu título",Underline:"Subliñado",Undo:"Desfacer",Unlink:"Desligar",Update:"Actualizar","Update image URL":"Actualizar o URL da imaxe","Upload failed":"Fallou o envío","Upload from computer":"","Upload image from computer":"","Upload in progress":"Envío en proceso","Upper-latin":"Letras maiúsculas","Upper-roman":"Núm, romanos en maiúscula","Vertical text alignment toolbar":"Barra de ferramentas de aliñamento de texto vertical",White:"Branco","Widget toolbar":"Barra de ferramentas de trebellos",Width:"Largo","Wrap text":"Envolver o texto",Yellow:"Amarelo"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/he.js b/public/static/plugs/ckeditor5/translations/he.js
index 6a6e0b1b8..18df6ed47 100644
--- a/public/static/plugs/ckeditor5/translations/he.js
+++ b/public/static/plugs/ckeditor5/translations/he.js
@@ -1 +1 @@
-!function(e){const t=e.he=e.he||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 מתוך %1",Accept:"קבל","Align cell text to the bottom":"יישר את טקסט התא לחלק התחתון","Align cell text to the center":"יישר את טקסט התא למרכז","Align cell text to the left":"יישר את טקסט התא לשמאל","Align cell text to the middle":"יישר את טקסט התא לאמצע","Align cell text to the right":"יישר את טקסט התא לימין","Align cell text to the top":"יישר את טקסט התא לחלק העליון","Align center":"יישור באמצע","Align left":"יישור לשמאל","Align right":"יישור לימין","Align table to the left":"יישור טבלה לשמאל","Align table to the right":"יישור טבלה לימין",Alignment:"יישור",Aquamarine:"ירוק-כחלחל",Background:"רקע",Big:"גדול",Black:"שחור","Block quote":"בלוק ציטוט",Blue:"כחול",Bold:"מודגש",Border:"גבול","Break text":"שבירת טקסט","Bulleted List":"רשימה מנוקדת","Bulleted list styles toolbar":"סרגל כלים של סגנונות רשימה עם תבליטים",Cancel:"ביטול","Caption for image: %0":"כותרת עבור תמונה: %0","Caption for the image":"כותרת עבור התמונה","Cell properties":"אפשרויות תא","Center table":"מירכוז טבלה","Centered image":"תמונה ממרוכזת","Change image text alternative":"שינוי טקסט אלטרנטיבי לתמונה","Choose heading":"בחר סוג כותרת",Circle:"עיגול",Clear:"לנקות","Click to edit block":"להקיש לעריכת בלוק",Code:"קוד",Color:"צבע","Color picker":"בורר הצבעים",Column:"עמודה",Dashed:"מקווקו",Decimal:"עשרונית","Decimal with leading zero":"עשרונית עם אפס מוביל","Decrease indent":"הקטנת הזחה",Default:"ברירת מחדל","Delete column":"מחיקת עמודה","Delete row":"מחיקת שורה","Dim grey":"אפור עמום",Dimensions:"ממדים",Disc:"עיגול מלא","Document colors":"צבעי המסמך",Dotted:"מנוקד",Double:"כפול",Downloadable:"ניתן להורדה","Drag to move":"לגרור כדי להזיז","Dropdown toolbar":"סרגל כלים נפתח","Edit block":"הגדרות בלוק","Edit link":"עריכת קישור","Editor block content toolbar":"סרגל כלים של תוכן בלוק של העורך","Editor contextual toolbar":"סרגל כלים הקשרי של העורך","Editor editing area: %0":"אזור עריכה של העורך: %0","Editor toolbar":"סרגל הכלים","Enter image caption":"הזן כותרת תמונה","Enter table caption":"הזינו כיתוב טבלה","Font Background Color":"צבע הרקע של הגופן","Font Color":"צבע גופן","Font Family":"משפחת גופנים","Font Size":"גודל טקסט","Full size image":"תמונה בפריסה מלאה",Green:"ירוק",Grey:"אפור",Groove:"Groove","Header column":"עמודת כותרת","Header row":"שורת כותרת",Heading:"כותרת","Heading 1":"כותרת 1","Heading 2":"כותרת 2","Heading 3":"כותרת 3","Heading 4":"כותרת 4","Heading 5":"כותרת 5","Heading 6":"כותרת 6",Height:"גובה",HEX:"HEX","Horizontal line":"קו אופקי","Horizontal text alignment toolbar":"סרגל כלים של יישור טקסט אופקי","HTML object":"אובייקט HTML",Huge:"ענק","Image resize list":"רשימת שינוי גודל תמונה","Image toolbar":"סרגל תמונה","image widget":"תמונה","In line":"בתוך השורה","Increase indent":"הגדלת הזחה",Insert:"הכנס","Insert column left":"הכנסת עמודה משמאל","Insert column right":"הכנסת עמודה מימן","Insert image":"הוספת תמונה","Insert image via URL":"הכנסת תמונה באמצעות קישור","Insert paragraph after block":"הוספת פסקה מתחת","Insert paragraph before block":"הוספת פסקה מעל","Insert row above":"הכנסת שורה מעל","Insert row below":"הכנה שורה מתחת","Insert table":"הכנס טבלה",Inset:"פנימי",Italic:"נטוי",Justify:"מרכוז גבולות","Justify cell text":"יישר את טקסט התא לשני הצדדים","Left aligned image":"תמונה מיושרת לשמאל","Light blue":"כחול בהיר","Light green":"ירוק בהיר","Light grey":"אפור בהיר",Link:"קישור","Link image":"קישור תמונה","Link URL":"קישור כתובת אתר","List properties":"אפשרויות רשימה","Lower-latin":"אותיות לטיניות קטנות","Lower–roman":"אותיות רומיות קטנות","Merge cell down":"מיזוג תא למטה","Merge cell left":"מיזוג תא שמאלה","Merge cell right":"מיזוג תא ימינה","Merge cell up":"מיזוג תא למעלה","Merge cells":"מיזוג תאים",Next:"הבא","No results found":"לא נמצאו תוצאות","No searchable items":"אין פריטים ניתנים לחיפוש",None:"ללא","Numbered List":"רשימה ממוספרת","Numbered list styles toolbar":"סרגל כלים של סגנונות רשימה ממוספרת","Open in a new tab":"פתח בכרטיסייה חדשה","Open link in new tab":"פתח קישור בכרטיסייה חדשה",Orange:"כתום",Original:"גודל מקורי",Outset:"חיצוני",Padding:"מרווח",Paragraph:"פיסקה","Press Enter to type after or press Shift + Enter to type before the widget":"לחץ Enter כדי להקליד לפני היישומון או Shift + Enter כדי להקליד אחריו",Previous:"הקודם",Purple:"סגול",Red:"אדום",Redo:"ביצוע מחדש","Remove color":"מחיקת צבע","Remove Format":"הסרת עיצוב","Replace from computer":"החלפה מהמחשב","Replace image":"החלפת תמונה","Replace image from computer":"החלפת תמונה מהמחשב","Resize image":"שנה גודל תמונה","Resize image to %0":"שנה את גודל התמונה ל-%0","Resize image to the original size":"שנה את גודל התמונה לגודל המקורי","Restore default":"שחזור ברירת מחדל","Reversed order":"סדר הפוך","Rich Text Editor":"עורך טקסט עשיר",Ridge:"Ridge","Right aligned image":"תמונה מיושרת לימין",Row:"שורה",Save:"שמירה","Select all":"בחר הכל","Select column":"בחירת עמודה","Select row":"בחירת שורה","Show more items":"הצג פריטים נוספים","Side image":"תמונת צד",Small:"קטן",Solid:"אחיד","Split cell horizontally":"פיצול תא אופקית","Split cell vertically":"פיצול תא אנכית",Square:"ריבוע","Start at":"התחל ב-","Start index must be greater than 0.":"אינדקס ההתחלה חייב להיות גדול מ-0.",Strikethrough:"קו חוצה",Style:"עיצוב",Subscript:"כתב תחתי",Superscript:"כתב עילי","Table alignment toolbar":"סרגל כלים של יישור טבלה","Table cell text alignment":"יישור טקסט של תא טבלה","Table properties":"אפשרויות טבלה","Table toolbar":"סרגל כלים של טבלה","Text alignment":"יישור טקסט","Text alignment toolbar":"סרגל כלים יישור טקסט","Text alternative":"טקסט אלטרנטיבי",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'הצבע לא חוקי. נסו "#FF0000" או "rgb(255,0,0)" או "אדום".','The value is invalid. Try "10px" or "2em" or simply "2".':'הערך לא חוקי. נסו "10px" או "2em" או פשוט "2".',"This link has no URL":"לקישור זה אין כתובת אתר",Tiny:"זעיר","To-do List":"רשימת מטלות","Toggle caption off":"כבה את הכיתוב","Toggle caption on":"הפעל את הכיתוב","Toggle the circle list style":"החלף מצב סגנון רשימת מעגלים","Toggle the decimal list style":"החלף מצב סגנון רשימה עשרונית","Toggle the decimal with leading zero list style":"החלף מצב סגנון רשימה עשרונית עם אפס מוביל","Toggle the disc list style":"החלף מצב סגנון רשימת דיסקות","Toggle the lower–latin list style":"החלף מצב סגנון רשימה עם אותיות לטיניות קטנות","Toggle the lower–roman list style":"החלף מצב סגנון רשימה עם ספרות רומיות קטנות","Toggle the square list style":"החלף מצב סגנון רשימת ריבועים","Toggle the upper–latin list style":"החלף מצב סגנון רשימה עם אותיות לטיניות גדולות","Toggle the upper–roman list style":"החלף מצב סגנון רשימה עם ספרות רומיות גדולות",Turquoise:"טורקיז","Type or paste your content here.":"הזן או הדבק את התוכן כאן","Type your title":"הזן כותרת",Underline:"קו תחתון",Undo:"ביטול",Unlink:"ביטול קישור",Update:"עדכן","Update image URL":"עדכן את כתובת ה-URL של התמונה","Upload failed":"העלאה נכשלה","Upload from computer":"העלאה מהמחשב","Upload image from computer":"העלאת תמונה מהמחשב","Upload in progress":"העלאה מתבצעת","Upper-latin":"אותיות לטיניות גדולות","Upper-roman":"אותיות רומיות גדולות","Vertical text alignment toolbar":"סרגל כלים של יישור טקסט אנכי",White:"לבן","Widget toolbar":"סרגל יישומון",Width:"רוחב","Wrap text":"גלישת טקסט",Yellow:"צהוב"}),t.getPluralForm=function(e){return 1==e&&e%1==0?0:2==e&&e%1==0?1:e%10==0&&e%1==0&&e>10?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.he=e.he||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 מתוך %1",Accept:"קבל","Align cell text to the bottom":"יישר את טקסט התא לחלק התחתון","Align cell text to the center":"יישר את טקסט התא למרכז","Align cell text to the left":"יישר את טקסט התא לשמאל","Align cell text to the middle":"יישר את טקסט התא לאמצע","Align cell text to the right":"יישר את טקסט התא לימין","Align cell text to the top":"יישר את טקסט התא לחלק העליון","Align center":"יישור באמצע","Align left":"יישור לשמאל","Align right":"יישור לימין","Align table to the left":"יישור טבלה לשמאל","Align table to the right":"יישור טבלה לימין",Alignment:"יישור",Aquamarine:"ירוק-כחלחל",Background:"רקע",Big:"גדול",Black:"שחור","Block quote":"בלוק ציטוט",Blue:"כחול",Bold:"מודגש",Border:"גבול","Break text":"שבירת טקסט","Bulleted List":"רשימה מנוקדת","Bulleted list styles toolbar":"סרגל כלים של סגנונות רשימה עם תבליטים",Cancel:"ביטול","Caption for image: %0":"כותרת עבור תמונה: %0","Caption for the image":"כותרת עבור התמונה","Cell properties":"אפשרויות תא","Center table":"מירכוז טבלה","Centered image":"תמונה ממרוכזת","Change image text alternative":"שינוי טקסט אלטרנטיבי לתמונה","Choose heading":"בחר סוג כותרת",Circle:"עיגול",Clear:"לנקות","Click to edit block":"להקיש לעריכת בלוק",Close:"סגור",Code:"קוד",Color:"צבע","Color picker":"בורר הצבעים",Column:"עמודה",Dashed:"מקווקו",Decimal:"עשרונית","Decimal with leading zero":"עשרונית עם אפס מוביל","Decrease indent":"הקטנת הזחה",Default:"ברירת מחדל","Delete column":"מחיקת עמודה","Delete row":"מחיקת שורה","Dim grey":"אפור עמום",Dimensions:"ממדים",Disc:"עיגול מלא","Document colors":"צבעי המסמך",Dotted:"מנוקד",Double:"כפול",Downloadable:"ניתן להורדה","Drag to move":"לגרור כדי להזיז","Dropdown toolbar":"סרגל כלים נפתח","Edit block":"הגדרות בלוק","Edit link":"עריכת קישור","Editor block content toolbar":"סרגל כלים של תוכן בלוק של העורך","Editor contextual toolbar":"סרגל כלים הקשרי של העורך","Editor dialog":"חלון דו-שיח של העורך","Editor editing area: %0":"אזור עריכה של העורך: %0","Editor toolbar":"סרגל הכלים","Enter image caption":"הזן כותרת תמונה","Enter table caption":"הזינו כיתוב טבלה","Font Background Color":"צבע הרקע של הגופן","Font Color":"צבע גופן","Font Family":"משפחת גופנים","Font Size":"גודל טקסט","Full size image":"תמונה בפריסה מלאה",Green:"ירוק",Grey:"אפור",Groove:"Groove","Header column":"עמודת כותרת","Header row":"שורת כותרת",Heading:"כותרת","Heading 1":"כותרת 1","Heading 2":"כותרת 2","Heading 3":"כותרת 3","Heading 4":"כותרת 4","Heading 5":"כותרת 5","Heading 6":"כותרת 6",Height:"גובה",HEX:"HEX","Horizontal line":"קו אופקי","Horizontal text alignment toolbar":"סרגל כלים של יישור טקסט אופקי","HTML object":"אובייקט HTML",Huge:"ענק","Image resize list":"רשימת שינוי גודל תמונה","Image toolbar":"סרגל תמונה","image widget":"תמונה","In line":"בתוך השורה","Increase indent":"הגדלת הזחה",Insert:"הכנס","Insert column left":"הכנסת עמודה משמאל","Insert column right":"הכנסת עמודה מימן","Insert image":"הוספת תמונה","Insert image via URL":"הכנסת תמונה באמצעות קישור","Insert paragraph after block":"הוספת פסקה מתחת","Insert paragraph before block":"הוספת פסקה מעל","Insert row above":"הכנסת שורה מעל","Insert row below":"הכנה שורה מתחת","Insert table":"הכנס טבלה",Inset:"פנימי",Italic:"נטוי",Justify:"מרכוז גבולות","Justify cell text":"יישר את טקסט התא לשני הצדדים","Left aligned image":"תמונה מיושרת לשמאל","Light blue":"כחול בהיר","Light green":"ירוק בהיר","Light grey":"אפור בהיר",Link:"קישור","Link image":"קישור תמונה","Link URL":"קישור כתובת אתר","List properties":"אפשרויות רשימה","Lower-latin":"אותיות לטיניות קטנות","Lower–roman":"אותיות רומיות קטנות","Merge cell down":"מיזוג תא למטה","Merge cell left":"מיזוג תא שמאלה","Merge cell right":"מיזוג תא ימינה","Merge cell up":"מיזוג תא למעלה","Merge cells":"מיזוג תאים",Next:"הבא","No results found":"לא נמצאו תוצאות","No searchable items":"אין פריטים ניתנים לחיפוש",None:"ללא","Numbered List":"רשימה ממוספרת","Numbered list styles toolbar":"סרגל כלים של סגנונות רשימה ממוספרת","Open in a new tab":"פתח בכרטיסייה חדשה","Open link in new tab":"פתח קישור בכרטיסייה חדשה",Orange:"כתום",Original:"גודל מקורי",Outset:"חיצוני",Padding:"מרווח",Paragraph:"פיסקה","Press Enter to type after or press Shift + Enter to type before the widget":"לחץ Enter כדי להקליד לפני היישומון או Shift + Enter כדי להקליד אחריו",Previous:"הקודם",Purple:"סגול",Red:"אדום",Redo:"ביצוע מחדש","Remove color":"מחיקת צבע","Remove Format":"הסרת עיצוב","Replace from computer":"החלפה מהמחשב","Replace image":"החלפת תמונה","Replace image from computer":"החלפת תמונה מהמחשב","Resize image":"שנה גודל תמונה","Resize image to %0":"שנה את גודל התמונה ל-%0","Resize image to the original size":"שנה את גודל התמונה לגודל המקורי","Restore default":"שחזור ברירת מחדל","Reversed order":"סדר הפוך","Rich Text Editor":"עורך טקסט עשיר",Ridge:"Ridge","Right aligned image":"תמונה מיושרת לימין",Row:"שורה",Save:"שמירה","Select all":"בחר הכל","Select column":"בחירת עמודה","Select row":"בחירת שורה","Show more items":"הצג פריטים נוספים","Side image":"תמונת צד",Small:"קטן",Solid:"אחיד","Split cell horizontally":"פיצול תא אופקית","Split cell vertically":"פיצול תא אנכית",Square:"ריבוע","Start at":"התחל ב-","Start index must be greater than 0.":"אינדקס ההתחלה חייב להיות גדול מ-0.",Strikethrough:"קו חוצה",Style:"עיצוב",Subscript:"כתב תחתי",Superscript:"כתב עילי","Table alignment toolbar":"סרגל כלים של יישור טבלה","Table cell text alignment":"יישור טקסט של תא טבלה","Table properties":"אפשרויות טבלה","Table toolbar":"סרגל כלים של טבלה","Text alignment":"יישור טקסט","Text alignment toolbar":"סרגל כלים יישור טקסט","Text alternative":"טקסט אלטרנטיבי",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'הצבע לא חוקי. נסו "#FF0000" או "rgb(255,0,0)" או "אדום".','The value is invalid. Try "10px" or "2em" or simply "2".':'הערך לא חוקי. נסו "10px" או "2em" או פשוט "2".',"This link has no URL":"לקישור זה אין כתובת אתר",Tiny:"זעיר","To-do List":"רשימת מטלות","Toggle caption off":"כבה את הכיתוב","Toggle caption on":"הפעל את הכיתוב","Toggle the circle list style":"החלף מצב סגנון רשימת מעגלים","Toggle the decimal list style":"החלף מצב סגנון רשימה עשרונית","Toggle the decimal with leading zero list style":"החלף מצב סגנון רשימה עשרונית עם אפס מוביל","Toggle the disc list style":"החלף מצב סגנון רשימת דיסקות","Toggle the lower–latin list style":"החלף מצב סגנון רשימה עם אותיות לטיניות קטנות","Toggle the lower–roman list style":"החלף מצב סגנון רשימה עם ספרות רומיות קטנות","Toggle the square list style":"החלף מצב סגנון רשימת ריבועים","Toggle the upper–latin list style":"החלף מצב סגנון רשימה עם אותיות לטיניות גדולות","Toggle the upper–roman list style":"החלף מצב סגנון רשימה עם ספרות רומיות גדולות",Turquoise:"טורקיז","Type or paste your content here.":"הזן או הדבק את התוכן כאן","Type your title":"הזן כותרת",Underline:"קו תחתון",Undo:"ביטול",Unlink:"ביטול קישור",Update:"עדכן","Update image URL":"עדכן את כתובת ה-URL של התמונה","Upload failed":"העלאה נכשלה","Upload from computer":"העלאה מהמחשב","Upload image from computer":"העלאת תמונה מהמחשב","Upload in progress":"העלאה מתבצעת","Upper-latin":"אותיות לטיניות גדולות","Upper-roman":"אותיות רומיות גדולות","Vertical text alignment toolbar":"סרגל כלים של יישור טקסט אנכי",White:"לבן","Widget toolbar":"סרגל יישומון",Width:"רוחב","Wrap text":"גלישת טקסט",Yellow:"צהוב"}),t.getPluralForm=function(e){return 1==e&&e%1==0?0:2==e&&e%1==0?1:e%10==0&&e%1==0&&e>10?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/hi.js b/public/static/plugs/ckeditor5/translations/hi.js
index c2b2e375d..33e786094 100644
--- a/public/static/plugs/ckeditor5/translations/hi.js
+++ b/public/static/plugs/ckeditor5/translations/hi.js
@@ -1 +1 @@
-!function(e){const t=e.hi=e.hi||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"स्वीकार करें","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 center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"टेक्स्ट तोड़ें","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"छवि के लिए कैप्शन: %0","Caption for the image":"छवि के लिए कैप्शन","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"साफ़ करें","Click to edit block":"ब्लॉक एडिट करने के लिए क्लिक करें",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"मूव करने के लिए ड्रैग करें","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"एडीटर ब्लॉक कंटेंट टूलबार","Editor contextual toolbar":"एडीटर कॉन्टेक्स्टूअल टूलबार","Editor editing area: %0":"संपादक संपादन क्षेत्र: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"टेबल कैप्शन एंटर करें","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",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",Height:"Height",HEX:"HEX","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"एचटीएमएल वस्तु",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"इन - लाइन","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"प्रॉपर्टीज़ को लिस्ट करें","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","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",Next:"Next","No results found":"कोई रिजल्ट नहीं","No searchable items":"कोई खोजने लायक आइटम नहीं",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Press Enter to type after or press Shift + Enter to type before the widget":"विजेट के बाद टाइप करने के लिए एंटर  दबाएं या पहले टाइप करने के लिए शिफ्ट+एंटर दबाएं",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Replace from computer":"कंप्यूटर से बदलें","Replace image":"इमेज बदलें","Replace image from computer":"कंप्यूटर से इमेज बदलें","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"डिफ़ॉल्ट रिस्टोर कर दें","Reversed order":"रिवर्स किया गया क्रम","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"शुरू करे इस पर","Start index must be greater than 0.":"स्टार्ट इंडेक्स 0 से अधिक होना चाहिए.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'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".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"कैप्शन को टॉगल बंद करें","Toggle caption on":"कैप्शन का टॉगल ऑन करें","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",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"कंप्यूटर से अपलोड करे","Upload image from computer":"कंप्यूटर से इमेज अपलोड करें","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"टेक्स्ट रैप करें",Yellow:"Yellow"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.hi=e.hi||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"स्वीकार करें","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 center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"टेक्स्ट तोड़ें","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"छवि के लिए कैप्शन: %0","Caption for the image":"छवि के लिए कैप्शन","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"साफ़ करें","Click to edit block":"ब्लॉक एडिट करने के लिए क्लिक करें",Close:"बंद करें",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"मूव करने के लिए ड्रैग करें","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"एडीटर ब्लॉक कंटेंट टूलबार","Editor contextual toolbar":"एडीटर कॉन्टेक्स्टूअल टूलबार","Editor dialog":"एडिटर डायलॉग","Editor editing area: %0":"संपादक संपादन क्षेत्र: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"टेबल कैप्शन एंटर करें","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",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",Height:"Height",HEX:"HEX","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"एचटीएमएल वस्तु",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"इन - लाइन","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"प्रॉपर्टीज़ को लिस्ट करें","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","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",Next:"Next","No results found":"कोई रिजल्ट नहीं","No searchable items":"कोई खोजने लायक आइटम नहीं",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Press Enter to type after or press Shift + Enter to type before the widget":"विजेट के बाद टाइप करने के लिए एंटर  दबाएं या पहले टाइप करने के लिए शिफ्ट+एंटर दबाएं",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Replace from computer":"कंप्यूटर से बदलें","Replace image":"इमेज बदलें","Replace image from computer":"कंप्यूटर से इमेज बदलें","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"डिफ़ॉल्ट रिस्टोर कर दें","Reversed order":"रिवर्स किया गया क्रम","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"शुरू करे इस पर","Start index must be greater than 0.":"स्टार्ट इंडेक्स 0 से अधिक होना चाहिए.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'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".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"कैप्शन को टॉगल बंद करें","Toggle caption on":"कैप्शन का टॉगल ऑन करें","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",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"कंप्यूटर से अपलोड करे","Upload image from computer":"कंप्यूटर से इमेज अपलोड करें","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"टेक्स्ट रैप करें",Yellow:"Yellow"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/hr.js b/public/static/plugs/ckeditor5/translations/hr.js
index c3046b009..38fd0b0be 100644
--- a/public/static/plugs/ckeditor5/translations/hr.js
+++ b/public/static/plugs/ckeditor5/translations/hr.js
@@ -1 +1 @@
-!function(e){const a=e.hr=e.hr||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 od %1",Accept:"Prihvati","Align cell text to the bottom":"Tekst ćelije poravnaj prema dolje","Align cell text to the center":"Tekst ćelije poravnaj u sredinu","Align cell text to the left":"Tekst ćelije poravnaj lijevo","Align cell text to the middle":"Tekst ćelije poravnaj u sredinu","Align cell text to the right":"Tekst ćelije poravnaj udesno","Align cell text to the top":"Tekst ćelije poravnaj prema gore","Align center":"Poravnaj po sredini","Align left":"Poravnaj ulijevo","Align right":"Poravnaj udesno","Align table to the left":"Poravnaj tablicu ulijevo","Align table to the right":"Poravnaj tablicu udesno",Alignment:"Poravnanje",Aquamarine:"Akvamarin",Background:"Pozadina",Big:"Veliki",Black:"Crna","Block quote":"Blok citat",Blue:"Plava",Bold:"Podebljano",Border:"Granica","Break text":"Prelomi tekst","Bulleted List":"Obična lista","Bulleted list styles toolbar":"Alatna traka za stilove obične liste",Cancel:"Poništi","Caption for image: %0":"Naslov slike: %0","Caption for the image":"Naslov slike","Cell properties":"Svojstva ćelije","Center table":"Centriraj tablicu","Centered image":"Centrirana slika","Change image text alternative":"Promijeni alternativni tekst slike","Choose heading":"Odaberite naslov",Circle:"Krug",Clear:"Obriši","Click to edit block":"",Code:"Kod",Color:"Boja","Color picker":"Birač boje",Column:"Kolona",Dashed:"Crtičasta",Decimal:"Decimalni","Decimal with leading zero":"Decimalni s vodećom nulom","Decrease indent":"Umanji uvlačenje",Default:"Podrazumijevano","Delete column":"Obriši kolonu","Delete row":"Obriši red","Dim grey":"Tamnosiva",Dimensions:"Dimenzije",Disc:"Disk","Document colors":"Boje dokumenta",Dotted:"Točkasta",Double:"Dvostruka",Downloadable:"Moguće preuzeti","Drag to move":"","Dropdown toolbar":"Traka padajućeg izbornika","Edit block":"Uredi blok","Edit link":"Uredi vezu","Editor block content toolbar":"Alatna traka sadržaja uređivača blokova","Editor contextual toolbar":"Kontekstualna alatna traka uređivača","Editor editing area: %0":"Područje Editora: %0","Editor toolbar":"Traka uređivača","Enter image caption":"Unesite naslov slike","Enter table caption":"Unesite natpis","Font Background Color":"Pozadinska Boja Fonta","Font Color":"Boja Fonta","Font Family":"Obitelj fonta","Font Size":"Veličina fonta","Full size image":"Slika pune veličine",Green:"Zelena",Grey:"Siva",Groove:"","Header column":"Kolona zaglavlja","Header row":"Red zaglavlja",Heading:"Naslov","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Height:"Visina",HEX:"","Horizontal line":"Vodoravna linija","Horizontal text alignment toolbar":"Alatna traka za horizontalno poravnanje teksta","HTML object":"HTML objekt",Huge:"Ogroman","Image resize list":"Lista veličina slika","Image toolbar":"Traka za slike","image widget":"Slika widget","In line":"U istom redu","Increase indent":"Povećaj uvlačenje",Insert:"Ubaci","Insert column left":"Umetni stupac lijevo","Insert column right":"Umetni stupac desno","Insert image":"Umetni sliku","Insert image via URL":"Ubaci sliku putem URLa","Insert paragraph after block":"Umetni odlomak poslije bloka","Insert paragraph before block":"Umetni odlomak prije bloka","Insert row above":"Ubaci red iznad","Insert row below":"Ubaci red ispod","Insert table":"Ubaci tablicu",Inset:"",Italic:"Ukošeno",Justify:"Razvuci","Justify cell text":"Razvuci tekst ćelije","Left aligned image":"Lijevo poravnata slika","Light blue":"Svijetloplava","Light green":"Svijetlozelena","Light grey":"Svijetlosiva",Link:"Veza","Link image":"URL slike","Link URL":"URL veze","List properties":"Svojstva liste","Lower-latin":"Mala slova","Lower–roman":"Mali rimski brojevi","Merge cell down":"Spoji ćelije prema dolje","Merge cell left":"Spoji ćelije prema lijevo","Merge cell right":"Spoji ćelije prema desno","Merge cell up":"Spoji ćelije prema gore","Merge cells":"Spoji ćelije",Next:"Sljedeći","No results found":"","No searchable items":"",None:"Nikakva","Numbered List":"Brojčana lista","Numbered list styles toolbar":"Alatna traka za stilove brojčane liste","Open in a new tab":"Otvori u novoj kartici","Open link in new tab":"Otvori vezu u novoj kartici",Orange:"Narančasta",Original:"Original",Outset:"",Padding:"Podstava",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Pritisnite Enter za upisivanje nakon ili pritisnite Shift + Enter za upisivanje prije widgeta",Previous:"Prethodni",Purple:"Ljubičasta",Red:"Crvena",Redo:"Ponovi","Remove color":"Ukloni boju","Remove Format":"Ukloni format","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Promijeni veličinu slike","Resize image to %0":"Promijeni veličinu slike u %0","Resize image to the original size":"Vrati veličinu slike na originalnu veličinu","Restore default":"Vrati tvorničke postavke","Reversed order":"Obrnuti redoslijed","Rich Text Editor":"Rich Text Editor",Ridge:"Greben","Right aligned image":"Slika poravnata desno",Row:"Red",Save:"Snimi","Select all":"Odaberi sve","Select column":"Odaberi stupac","Select row":"Odaberi redak","Show more items":"Prikaži više stavaka","Side image":"Slika sa strane",Small:"Mali",Solid:"Neprekidna","Split cell horizontally":"Razdvoji ćeliju vodoravno","Split cell vertically":"Razdvoji ćeliju okomito",Square:"Kvadrat","Start at":"Počni sa","Start index must be greater than 0.":"Početni indeks mora biti veći od 0.",Strikethrough:"Precrtano",Style:"Stil",Subscript:"Indeks",Superscript:"Eksponent","Table alignment toolbar":"Alatna traka za poravnanje tablice","Table cell text alignment":"Poravnanje teksta ćelije tablice","Table properties":"Svojstva tablice","Table toolbar":"Traka za tablice","Text alignment":"Poravnanje teksta","Text alignment toolbar":"Traka za poravnanje","Text alternative":"Alternativni tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Neispravna boja. Pokušajte "#FF0000" ili "rgb(255,0,0)" ili "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Neispravna vrijednost. Pokušajte "10px" ili "2em" ili jednostavno "2".',"This link has no URL":"Ova veza nema URL",Tiny:"Sićušan","To-do List":"Lista zadataka","Toggle caption off":"Isključite natpis","Toggle caption on":"Uključite natpis","Toggle the circle list style":"Primjeni krug stil","Toggle the decimal list style":"Primjeni decimalni stil","Toggle the decimal with leading zero list style":"Primjeni decimalni stil s vodećom nulom","Toggle the disc list style":"Primjeni disk stil","Toggle the lower–latin list style":"Primjeni mala slova stil","Toggle the lower–roman list style":"Primjeni rimske brojeve mala slova stil","Toggle the square list style":"Primjeni kvadrat stil","Toggle the upper–latin list style":"Primjeni velika slova stil","Toggle the upper–roman list style":"Primjeni rimske brojeve velika slova stil",Turquoise:"Tirkizna","Type or paste your content here.":"Utipkajte ili zalijepite Vaš sadržaj ovdje.","Type your title":"Utipkajte naslov",Underline:"Podcrtavanje",Undo:"Poništi",Unlink:"Ukloni vezu",Update:"Snimi","Update image URL":"Snimi URL slike","Upload failed":"Slanje nije uspjelo","Upload from computer":"","Upload image from computer":"","Upload in progress":"Slanje u tijeku","Upper-latin":"Velika slova","Upper-roman":"Veliki rimski brojevi","Vertical text alignment toolbar":"Alatna traka za vertikalno poravnanje teksta",White:"Bijela","Widget toolbar":"Traka sa spravicama",Width:"Širina","Wrap text":"Prelamanje teksta",Yellow:"Žuta"}),a.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.hr=e.hr||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 od %1",Accept:"Prihvati","Align cell text to the bottom":"Tekst ćelije poravnaj prema dolje","Align cell text to the center":"Tekst ćelije poravnaj u sredinu","Align cell text to the left":"Tekst ćelije poravnaj lijevo","Align cell text to the middle":"Tekst ćelije poravnaj u sredinu","Align cell text to the right":"Tekst ćelije poravnaj udesno","Align cell text to the top":"Tekst ćelije poravnaj prema gore","Align center":"Poravnaj po sredini","Align left":"Poravnaj ulijevo","Align right":"Poravnaj udesno","Align table to the left":"Poravnaj tablicu ulijevo","Align table to the right":"Poravnaj tablicu udesno",Alignment:"Poravnanje",Aquamarine:"Akvamarin",Background:"Pozadina",Big:"Veliki",Black:"Crna","Block quote":"Blok citat",Blue:"Plava",Bold:"Podebljano",Border:"Granica","Break text":"Prelomi tekst","Bulleted List":"Obična lista","Bulleted list styles toolbar":"Alatna traka za stilove obične liste",Cancel:"Poništi","Caption for image: %0":"Naslov slike: %0","Caption for the image":"Naslov slike","Cell properties":"Svojstva ćelije","Center table":"Centriraj tablicu","Centered image":"Centrirana slika","Change image text alternative":"Promijeni alternativni tekst slike","Choose heading":"Odaberite naslov",Circle:"Krug",Clear:"Obriši","Click to edit block":"",Close:"",Code:"Kod",Color:"Boja","Color picker":"Birač boje",Column:"Kolona",Dashed:"Crtičasta",Decimal:"Decimalni","Decimal with leading zero":"Decimalni s vodećom nulom","Decrease indent":"Umanji uvlačenje",Default:"Podrazumijevano","Delete column":"Obriši kolonu","Delete row":"Obriši red","Dim grey":"Tamnosiva",Dimensions:"Dimenzije",Disc:"Disk","Document colors":"Boje dokumenta",Dotted:"Točkasta",Double:"Dvostruka",Downloadable:"Moguće preuzeti","Drag to move":"","Dropdown toolbar":"Traka padajućeg izbornika","Edit block":"Uredi blok","Edit link":"Uredi vezu","Editor block content toolbar":"Alatna traka sadržaja uređivača blokova","Editor contextual toolbar":"Kontekstualna alatna traka uređivača","Editor dialog":"","Editor editing area: %0":"Područje Editora: %0","Editor toolbar":"Traka uređivača","Enter image caption":"Unesite naslov slike","Enter table caption":"Unesite natpis","Font Background Color":"Pozadinska Boja Fonta","Font Color":"Boja Fonta","Font Family":"Obitelj fonta","Font Size":"Veličina fonta","Full size image":"Slika pune veličine",Green:"Zelena",Grey:"Siva",Groove:"","Header column":"Kolona zaglavlja","Header row":"Red zaglavlja",Heading:"Naslov","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Height:"Visina",HEX:"","Horizontal line":"Vodoravna linija","Horizontal text alignment toolbar":"Alatna traka za horizontalno poravnanje teksta","HTML object":"HTML objekt",Huge:"Ogroman","Image resize list":"Lista veličina slika","Image toolbar":"Traka za slike","image widget":"Slika widget","In line":"U istom redu","Increase indent":"Povećaj uvlačenje",Insert:"Ubaci","Insert column left":"Umetni stupac lijevo","Insert column right":"Umetni stupac desno","Insert image":"Umetni sliku","Insert image via URL":"Ubaci sliku putem URLa","Insert paragraph after block":"Umetni odlomak poslije bloka","Insert paragraph before block":"Umetni odlomak prije bloka","Insert row above":"Ubaci red iznad","Insert row below":"Ubaci red ispod","Insert table":"Ubaci tablicu",Inset:"",Italic:"Ukošeno",Justify:"Razvuci","Justify cell text":"Razvuci tekst ćelije","Left aligned image":"Lijevo poravnata slika","Light blue":"Svijetloplava","Light green":"Svijetlozelena","Light grey":"Svijetlosiva",Link:"Veza","Link image":"URL slike","Link URL":"URL veze","List properties":"Svojstva liste","Lower-latin":"Mala slova","Lower–roman":"Mali rimski brojevi","Merge cell down":"Spoji ćelije prema dolje","Merge cell left":"Spoji ćelije prema lijevo","Merge cell right":"Spoji ćelije prema desno","Merge cell up":"Spoji ćelije prema gore","Merge cells":"Spoji ćelije",Next:"Sljedeći","No results found":"","No searchable items":"",None:"Nikakva","Numbered List":"Brojčana lista","Numbered list styles toolbar":"Alatna traka za stilove brojčane liste","Open in a new tab":"Otvori u novoj kartici","Open link in new tab":"Otvori vezu u novoj kartici",Orange:"Narančasta",Original:"Original",Outset:"",Padding:"Podstava",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Pritisnite Enter za upisivanje nakon ili pritisnite Shift + Enter za upisivanje prije widgeta",Previous:"Prethodni",Purple:"Ljubičasta",Red:"Crvena",Redo:"Ponovi","Remove color":"Ukloni boju","Remove Format":"Ukloni format","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Promijeni veličinu slike","Resize image to %0":"Promijeni veličinu slike u %0","Resize image to the original size":"Vrati veličinu slike na originalnu veličinu","Restore default":"Vrati tvorničke postavke","Reversed order":"Obrnuti redoslijed","Rich Text Editor":"Rich Text Editor",Ridge:"Greben","Right aligned image":"Slika poravnata desno",Row:"Red",Save:"Snimi","Select all":"Odaberi sve","Select column":"Odaberi stupac","Select row":"Odaberi redak","Show more items":"Prikaži više stavaka","Side image":"Slika sa strane",Small:"Mali",Solid:"Neprekidna","Split cell horizontally":"Razdvoji ćeliju vodoravno","Split cell vertically":"Razdvoji ćeliju okomito",Square:"Kvadrat","Start at":"Počni sa","Start index must be greater than 0.":"Početni indeks mora biti veći od 0.",Strikethrough:"Precrtano",Style:"Stil",Subscript:"Indeks",Superscript:"Eksponent","Table alignment toolbar":"Alatna traka za poravnanje tablice","Table cell text alignment":"Poravnanje teksta ćelije tablice","Table properties":"Svojstva tablice","Table toolbar":"Traka za tablice","Text alignment":"Poravnanje teksta","Text alignment toolbar":"Traka za poravnanje","Text alternative":"Alternativni tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Neispravna boja. Pokušajte "#FF0000" ili "rgb(255,0,0)" ili "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Neispravna vrijednost. Pokušajte "10px" ili "2em" ili jednostavno "2".',"This link has no URL":"Ova veza nema URL",Tiny:"Sićušan","To-do List":"Lista zadataka","Toggle caption off":"Isključite natpis","Toggle caption on":"Uključite natpis","Toggle the circle list style":"Primjeni krug stil","Toggle the decimal list style":"Primjeni decimalni stil","Toggle the decimal with leading zero list style":"Primjeni decimalni stil s vodećom nulom","Toggle the disc list style":"Primjeni disk stil","Toggle the lower–latin list style":"Primjeni mala slova stil","Toggle the lower–roman list style":"Primjeni rimske brojeve mala slova stil","Toggle the square list style":"Primjeni kvadrat stil","Toggle the upper–latin list style":"Primjeni velika slova stil","Toggle the upper–roman list style":"Primjeni rimske brojeve velika slova stil",Turquoise:"Tirkizna","Type or paste your content here.":"Utipkajte ili zalijepite Vaš sadržaj ovdje.","Type your title":"Utipkajte naslov",Underline:"Podcrtavanje",Undo:"Poništi",Unlink:"Ukloni vezu",Update:"Snimi","Update image URL":"Snimi URL slike","Upload failed":"Slanje nije uspjelo","Upload from computer":"","Upload image from computer":"","Upload in progress":"Slanje u tijeku","Upper-latin":"Velika slova","Upper-roman":"Veliki rimski brojevi","Vertical text alignment toolbar":"Alatna traka za vertikalno poravnanje teksta",White:"Bijela","Widget toolbar":"Traka sa spravicama",Width:"Širina","Wrap text":"Prelamanje teksta",Yellow:"Žuta"}),a.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/hu.js b/public/static/plugs/ckeditor5/translations/hu.js
index d0d6d3dd2..1a0e1ebe4 100644
--- a/public/static/plugs/ckeditor5/translations/hu.js
+++ b/public/static/plugs/ckeditor5/translations/hu.js
@@ -1 +1 @@
-!function(e){const t=e.hu=e.hu||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"Elfogad","Align cell text to the bottom":"Szöveg igazítása a cellában alulra","Align cell text to the center":"Szöveg igazítása a cellában középre","Align cell text to the left":"Szöveg igazítása a cellában balra","Align cell text to the middle":"Szöveg igazítása a cellában középre","Align cell text to the right":"Szöveg igazítása a cellában jobbra","Align cell text to the top":"Szöveg igazítása a cellában felülre","Align center":"Középre igazítás","Align left":"Balra igazítás","Align right":"Jobbra igazítás","Align table to the left":"Tábla igazítása balra","Align table to the right":"Tábla igazítása jobbra",Alignment:"Igazítás",Aquamarine:"Kékeszöld",Background:"Háttér",Big:"Nagy",Black:"Fekete","Block quote":"Idézet",Blue:"Kék",Bold:"Félkövér",Border:"Keret","Break text":"Sortörés","Bulleted List":"Pontozott lista","Bulleted list styles toolbar":"Felsorolásos lista stílusú eszköztár",Cancel:"Mégsem","Caption for image: %0":"Képfelirat: %0","Caption for the image":"Felirat a képhez","Cell properties":"Cella tulajdonságok","Center table":"Tábla igazítása középre","Centered image":"Középre igazított kép","Change image text alternative":"Helyettesítő szöveg módosítása","Choose heading":"Stílus megadása",Circle:"Kör",Clear:"Törlés","Click to edit block":"Kattintson a blokk szerkesztéséhez",Code:"Forráskód",Color:"Szín","Color picker":"Szín választása",Column:"Oszlop",Dashed:"Szaggatott",Decimal:"Szám","Decimal with leading zero":"Nullával kezdődő szám","Decrease indent":"Behúzás csökkentése",Default:"Alapértelmezett","Delete column":"Oszlop törlése","Delete row":"Sor törlése","Dim grey":"Halvány szürke",Dimensions:"Méretek",Disc:"Korong","Document colors":"Dokumentum színek",Dotted:"Pontozott",Double:"Dupla",Downloadable:"Letölthető","Drag to move":"Húzza a mozgatáshoz","Dropdown toolbar":"Lenyíló eszköztár","Edit block":"Blokk szerkesztése","Edit link":"Link szerkesztése","Editor block content toolbar":"Szerkesztő - tartalomblokk  eszköztár","Editor contextual toolbar":"Szerkesztő - szövegre vonatkozó eszköztár","Editor editing area: %0":"Szerkesztő szerkesztési területe: %0","Editor toolbar":"Szerkesztő eszköztár","Enter image caption":"Képaláírás megadása","Enter table caption":"Táblázat feliratának megadása","Font Background Color":"Betű háttérszín","Font Color":"Betűszín","Font Family":"Betűtípus","Font Size":"Betűméret","Full size image":"Teljes méretű kép",Green:"Zöld",Grey:"Szürke",Groove:"Árok","Header column":"Oszlop fejléc","Header row":"Sor fejléc",Heading:"Stílusok","Heading 1":"Címsor 1","Heading 2":"Címsor 2","Heading 3":"Címsor 3","Heading 4":"Címsor 4","Heading 5":"Címsor 5","Heading 6":"Címsor 6",Height:"Magasság",HEX:"HEX színkód","Horizontal line":"Vízszintes elválasztóvonal","Horizontal text alignment toolbar":"Vízszintes szövegigazítási eszköztár","HTML object":"HTML objektum",Huge:"Hatalmas","Image resize list":"Kép átméretezési lista","Image toolbar":"Kép eszköztár","image widget":"képmodul","In line":"Soron belül","Increase indent":"Behúzás növelése",Insert:"Beszúrás","Insert column left":"Oszlop beszúrása balra","Insert column right":"Oszlop beszúrása jobbra","Insert image":"Kép beszúrása","Insert image via URL":"Kép beszúrása URL alapján","Insert paragraph after block":"Bekezdés beszúrása utána","Insert paragraph before block":"Bekezdés beszúrása elé","Insert row above":"Sor beszúrása fölé","Insert row below":"Sor beszúrása alá","Insert table":"Táblázat beszúrása",Inset:"Mélyített",Italic:"Dőlt",Justify:"Sorkizárt","Justify cell text":"Szöveg igazítása a cellában sorkizártra","Left aligned image":"Balra igazított kép","Light blue":"Világoskék","Light green":"Világoszöld","Light grey":"Világosszürke",Link:"Link","Link image":"Hivatkozás","Link URL":"URL link","List properties":"Lista tulajdonságai","Lower-latin":"Kisbetűs latin szám","Lower–roman":"Kisbetűs római szám","Merge cell down":"Cellák egyesítése lefelé","Merge cell left":"Cellák egyesítése balra","Merge cell right":"Cellák egyesítése jobbra","Merge cell up":"Cellák egyesítése felfelé","Merge cells":"Cellaegyesítés",Next:"Következő","No results found":"Nincs találat","No searchable items":"Nincsenek kereshető elemek",None:"Nincs","Numbered List":"Számozott lista","Numbered list styles toolbar":"Számozott lista stílusú eszköztár","Open in a new tab":"Megnyitás új lapon","Open link in new tab":"Link megnyitása új ablakban",Orange:"Narancs",Original:"Eredeti",Outset:"Kiemelkedő",Padding:"Térköz",Paragraph:"Bekezdés","Press Enter to type after or press Shift + Enter to type before the widget":"Az Enter billentyű megnyomásával a widget után, a Shift + Enter kombinációval pedig a widget előtt írhatja be a szöveget",Previous:"Előző",Purple:"Lila",Red:"Piros",Redo:"Újra","Remove color":"Szín eltávolítása","Remove Format":"Formázás eltávolítása","Replace from computer":"Kicserélés a számítógépről","Replace image":"Kép kicserélése","Replace image from computer":"Cserélje ki a számítógépről","Resize image":"Kép átméretezése","Resize image to %0":"Kép méretezése %0","Resize image to the original size":"Kép méretezése az eredeti méretre","Restore default":"Alapértelmezés visszaállítása","Reversed order":"Fordított sorrend","Rich Text Editor":"Bővített szövegszerkesztő",Ridge:"Gerinc","Right aligned image":"Jobbra igazított kép",Row:"Sor",Save:"Mentés","Select all":"Mindet kijelöl","Select column":"Oszlop kijelölése","Select row":"Sor kijelölése","Show more items":"További elemek","Side image":"Oldalsó kép",Small:"Kicsi",Solid:"Tömör","Split cell horizontally":"Cella felosztása vízszintesen","Split cell vertically":"Cella felosztása függőlegesen",Square:"Négyzet","Start at":"Kezdőpont","Start index must be greater than 0.":"A kezdő index nagyobb kell legyen mint 0.",Strikethrough:"Áthúzott",Style:"Stílus",Subscript:"Alsó index",Superscript:"Felső index","Table alignment toolbar":"Táblázatigazítási eszköztár","Table cell text alignment":"Szöveg igazítása a cellában","Table properties":"Táblázat tulajdonságai","Table toolbar":"Táblázat eszköztár","Text alignment":"Szöveg igazítása","Text alignment toolbar":"Szöveg igazítás eszköztár","Text alternative":"Helyettesítő szöveg",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'A szín érványtelen. Próbáld így "#FF0000" vagy "rgb(255,0,0)" vagy "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Az érték érvénytelen. Próbáld így "10px" vagy "2em" vagy csak egyszerűen "2".',"This link has no URL":"A link nem tartalmaz URL-t",Tiny:"Apró","To-do List":"Tennivaló lista","Toggle caption off":"Felirat kikapcsolása","Toggle caption on":"Felirat bekapcsolása","Toggle the circle list style":"Kör stílusú lista bekapcsolása","Toggle the decimal list style":"Tizedesjegy stílusú lista bekapcsolása","Toggle the decimal with leading zero list style":"Zéróval kezdődő tizedesjegy stílusú lista bekapcsolása","Toggle the disc list style":"Korong stílusú lista bekapcsolása","Toggle the lower–latin list style":"Kis latin betűs stílusú lista bekapcsolása","Toggle the lower–roman list style":"Kis római számok stílusú lista bekapcsolása","Toggle the square list style":"Négyzet stílusú lista bekapcsolása","Toggle the upper–latin list style":"Nagy latin betűs stílusú lista bekapcsolása","Toggle the upper–roman list style":"Nagy római számok stílusú lista bekapcsolása",Turquoise:"Türkiz","Type or paste your content here.":"Írja be, vagy illessze be a tartalmat.","Type your title":"Adja meg a címet",Underline:"Aláhúzott",Undo:"Visszavonás",Unlink:"Link eltávolítása",Update:"Módosítás","Update image URL":"Kép URL módosítása","Upload failed":"A feltöltés nem sikerült","Upload from computer":"Feltöltés a számítógépről","Upload image from computer":"Töltsön fel képet a számítógépről","Upload in progress":"A feltöltés folyamatban","Upper-latin":"Nagybetűs latin szám","Upper-roman":"Nagybetűs római szám","Vertical text alignment toolbar":"Függőleges szövegigazítási eszköztár",White:"Fehér","Widget toolbar":"Widget eszköztár",Width:"Szélesség","Wrap text":"Körbefuttatás",Yellow:"Sárga"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.hu=e.hu||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"Elfogad","Align cell text to the bottom":"Szöveg igazítása a cellában alulra","Align cell text to the center":"Szöveg igazítása a cellában középre","Align cell text to the left":"Szöveg igazítása a cellában balra","Align cell text to the middle":"Szöveg igazítása a cellában középre","Align cell text to the right":"Szöveg igazítása a cellában jobbra","Align cell text to the top":"Szöveg igazítása a cellában felülre","Align center":"Középre igazítás","Align left":"Balra igazítás","Align right":"Jobbra igazítás","Align table to the left":"Tábla igazítása balra","Align table to the right":"Tábla igazítása jobbra",Alignment:"Igazítás",Aquamarine:"Kékeszöld",Background:"Háttér",Big:"Nagy",Black:"Fekete","Block quote":"Idézet",Blue:"Kék",Bold:"Félkövér",Border:"Keret","Break text":"Sortörés","Bulleted List":"Pontozott lista","Bulleted list styles toolbar":"Felsorolásos lista stílusú eszköztár",Cancel:"Mégsem","Caption for image: %0":"Képfelirat: %0","Caption for the image":"Felirat a képhez","Cell properties":"Cella tulajdonságok","Center table":"Tábla igazítása középre","Centered image":"Középre igazított kép","Change image text alternative":"Helyettesítő szöveg módosítása","Choose heading":"Stílus megadása",Circle:"Kör",Clear:"Törlés","Click to edit block":"Kattintson a blokk szerkesztéséhez",Close:"Bezárás",Code:"Forráskód",Color:"Szín","Color picker":"Szín választása",Column:"Oszlop",Dashed:"Szaggatott",Decimal:"Szám","Decimal with leading zero":"Nullával kezdődő szám","Decrease indent":"Behúzás csökkentése",Default:"Alapértelmezett","Delete column":"Oszlop törlése","Delete row":"Sor törlése","Dim grey":"Halvány szürke",Dimensions:"Méretek",Disc:"Korong","Document colors":"Dokumentum színek",Dotted:"Pontozott",Double:"Dupla",Downloadable:"Letölthető","Drag to move":"Húzza a mozgatáshoz","Dropdown toolbar":"Lenyíló eszköztár","Edit block":"Blokk szerkesztése","Edit link":"Link szerkesztése","Editor block content toolbar":"Szerkesztő - tartalomblokk  eszköztár","Editor contextual toolbar":"Szerkesztő - szövegre vonatkozó eszköztár","Editor dialog":"Szerkesztői párbeszédpanel","Editor editing area: %0":"Szerkesztő szerkesztési területe: %0","Editor toolbar":"Szerkesztő eszköztár","Enter image caption":"Képaláírás megadása","Enter table caption":"Táblázat feliratának megadása","Font Background Color":"Betű háttérszín","Font Color":"Betűszín","Font Family":"Betűtípus","Font Size":"Betűméret","Full size image":"Teljes méretű kép",Green:"Zöld",Grey:"Szürke",Groove:"Árok","Header column":"Oszlop fejléc","Header row":"Sor fejléc",Heading:"Stílusok","Heading 1":"Címsor 1","Heading 2":"Címsor 2","Heading 3":"Címsor 3","Heading 4":"Címsor 4","Heading 5":"Címsor 5","Heading 6":"Címsor 6",Height:"Magasság",HEX:"HEX színkód","Horizontal line":"Vízszintes elválasztóvonal","Horizontal text alignment toolbar":"Vízszintes szövegigazítási eszköztár","HTML object":"HTML objektum",Huge:"Hatalmas","Image resize list":"Kép átméretezési lista","Image toolbar":"Kép eszköztár","image widget":"képmodul","In line":"Soron belül","Increase indent":"Behúzás növelése",Insert:"Beszúrás","Insert column left":"Oszlop beszúrása balra","Insert column right":"Oszlop beszúrása jobbra","Insert image":"Kép beszúrása","Insert image via URL":"Kép beszúrása URL alapján","Insert paragraph after block":"Bekezdés beszúrása utána","Insert paragraph before block":"Bekezdés beszúrása elé","Insert row above":"Sor beszúrása fölé","Insert row below":"Sor beszúrása alá","Insert table":"Táblázat beszúrása",Inset:"Mélyített",Italic:"Dőlt",Justify:"Sorkizárt","Justify cell text":"Szöveg igazítása a cellában sorkizártra","Left aligned image":"Balra igazított kép","Light blue":"Világoskék","Light green":"Világoszöld","Light grey":"Világosszürke",Link:"Link","Link image":"Hivatkozás","Link URL":"URL link","List properties":"Lista tulajdonságai","Lower-latin":"Kisbetűs latin szám","Lower–roman":"Kisbetűs római szám","Merge cell down":"Cellák egyesítése lefelé","Merge cell left":"Cellák egyesítése balra","Merge cell right":"Cellák egyesítése jobbra","Merge cell up":"Cellák egyesítése felfelé","Merge cells":"Cellaegyesítés",Next:"Következő","No results found":"Nincs találat","No searchable items":"Nincsenek kereshető elemek",None:"Nincs","Numbered List":"Számozott lista","Numbered list styles toolbar":"Számozott lista stílusú eszköztár","Open in a new tab":"Megnyitás új lapon","Open link in new tab":"Link megnyitása új ablakban",Orange:"Narancs",Original:"Eredeti",Outset:"Kiemelkedő",Padding:"Térköz",Paragraph:"Bekezdés","Press Enter to type after or press Shift + Enter to type before the widget":"Az Enter billentyű megnyomásával a widget után, a Shift + Enter kombinációval pedig a widget előtt írhatja be a szöveget",Previous:"Előző",Purple:"Lila",Red:"Piros",Redo:"Újra","Remove color":"Szín eltávolítása","Remove Format":"Formázás eltávolítása","Replace from computer":"Kicserélés a számítógépről","Replace image":"Kép kicserélése","Replace image from computer":"Cserélje ki a számítógépről","Resize image":"Kép átméretezése","Resize image to %0":"Kép méretezése %0","Resize image to the original size":"Kép méretezése az eredeti méretre","Restore default":"Alapértelmezés visszaállítása","Reversed order":"Fordított sorrend","Rich Text Editor":"Bővített szövegszerkesztő",Ridge:"Gerinc","Right aligned image":"Jobbra igazított kép",Row:"Sor",Save:"Mentés","Select all":"Mindet kijelöl","Select column":"Oszlop kijelölése","Select row":"Sor kijelölése","Show more items":"További elemek","Side image":"Oldalsó kép",Small:"Kicsi",Solid:"Tömör","Split cell horizontally":"Cella felosztása vízszintesen","Split cell vertically":"Cella felosztása függőlegesen",Square:"Négyzet","Start at":"Kezdőpont","Start index must be greater than 0.":"A kezdő index nagyobb kell legyen mint 0.",Strikethrough:"Áthúzott",Style:"Stílus",Subscript:"Alsó index",Superscript:"Felső index","Table alignment toolbar":"Táblázatigazítási eszköztár","Table cell text alignment":"Szöveg igazítása a cellában","Table properties":"Táblázat tulajdonságai","Table toolbar":"Táblázat eszköztár","Text alignment":"Szöveg igazítása","Text alignment toolbar":"Szöveg igazítás eszköztár","Text alternative":"Helyettesítő szöveg",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'A szín érványtelen. Próbáld így "#FF0000" vagy "rgb(255,0,0)" vagy "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Az érték érvénytelen. Próbáld így "10px" vagy "2em" vagy csak egyszerűen "2".',"This link has no URL":"A link nem tartalmaz URL-t",Tiny:"Apró","To-do List":"Tennivaló lista","Toggle caption off":"Felirat kikapcsolása","Toggle caption on":"Felirat bekapcsolása","Toggle the circle list style":"Kör stílusú lista bekapcsolása","Toggle the decimal list style":"Tizedesjegy stílusú lista bekapcsolása","Toggle the decimal with leading zero list style":"Zéróval kezdődő tizedesjegy stílusú lista bekapcsolása","Toggle the disc list style":"Korong stílusú lista bekapcsolása","Toggle the lower–latin list style":"Kis latin betűs stílusú lista bekapcsolása","Toggle the lower–roman list style":"Kis római számok stílusú lista bekapcsolása","Toggle the square list style":"Négyzet stílusú lista bekapcsolása","Toggle the upper–latin list style":"Nagy latin betűs stílusú lista bekapcsolása","Toggle the upper–roman list style":"Nagy római számok stílusú lista bekapcsolása",Turquoise:"Türkiz","Type or paste your content here.":"Írja be, vagy illessze be a tartalmat.","Type your title":"Adja meg a címet",Underline:"Aláhúzott",Undo:"Visszavonás",Unlink:"Link eltávolítása",Update:"Módosítás","Update image URL":"Kép URL módosítása","Upload failed":"A feltöltés nem sikerült","Upload from computer":"Feltöltés a számítógépről","Upload image from computer":"Töltsön fel képet a számítógépről","Upload in progress":"A feltöltés folyamatban","Upper-latin":"Nagybetűs latin szám","Upper-roman":"Nagybetűs római szám","Vertical text alignment toolbar":"Függőleges szövegigazítási eszköztár",White:"Fehér","Widget toolbar":"Widget eszköztár",Width:"Szélesség","Wrap text":"Körbefuttatás",Yellow:"Sárga"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/id.js b/public/static/plugs/ckeditor5/translations/id.js
index b1a333c42..92e4566ae 100644
--- a/public/static/plugs/ckeditor5/translations/id.js
+++ b/public/static/plugs/ckeditor5/translations/id.js
@@ -1 +1 @@
-!function(a){const e=a.id=a.id||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 dari %1",Accept:"Setuju","Align cell text to the bottom":"Sejajarkan teks sel ke bawah","Align cell text to the center":"Sejajarkan teks sel ke tengah","Align cell text to the left":"Sejajarkan teks sel ke kiri","Align cell text to the middle":"Sejajarkan teks sel ke tengah","Align cell text to the right":"Sejajarkan teks sel ke kanan","Align cell text to the top":"Sejajarkan teks sel ke atas","Align center":"Rata tengah","Align left":"Rata kiri","Align right":"Rata kanan","Align table to the left":"Sejajarkan teks sel ke kiri","Align table to the right":"Sejajarkan teks sel ke kanan",Alignment:"Penjajaran",Aquamarine:"Biru laut",Background:"Latar belakang",Big:"Besar",Black:"Hitam","Block quote":"Kutipan",Blue:"Biru",Bold:"Tebal",Border:"Garis batas","Break text":"Pecahkan teks","Bulleted List":"Daftar Tak Berangka","Bulleted list styles toolbar":"Bilah alat gaya daftar bullet",Cancel:"Batal","Caption for image: %0":"Keterangan gambar: %0","Caption for the image":"Keterangan untuk gambar","Cell properties":"Properti sel","Center table":"Tengahkan tabel","Centered image":"Gambar rata tengah","Change image text alternative":"Ganti alternatif teks gambar","Choose heading":"Pilih tajuk",Circle:"Lingkaran",Clear:"Kosongkan","Click to edit block":"Klik untuk mengedit blok",Code:"Kode",Color:"Warna","Color picker":"Pengambil warna",Column:"Kolom",Dashed:"Garis putus-putus",Decimal:"Desimal","Decimal with leading zero":"Desimal dengan awalan nol","Decrease indent":"Kurangi indentasi",Default:"Bawaan","Delete column":"Hapus kolom","Delete row":"Hapus baris","Dim grey":"Kelabu gelap",Dimensions:"Dimensi",Disc:"Disk","Document colors":"Warna dokumen",Dotted:"Titik titik",Double:"Ganda",Downloadable:"Dapat diunduh","Drag to move":"Seret untuk memindahkan","Dropdown toolbar":"Alat dropdown","Edit block":"Sunting blok","Edit link":"Sunting tautan","Editor block content toolbar":"Bilah alat konten blok editor","Editor contextual toolbar":"Bilah alat kontekstual editor","Editor editing area: %0":"Area edit editor: %0","Editor toolbar":"Alat editor","Enter image caption":"Tambahkan deskripsi gambar","Enter table caption":"Masukkan keterangan tabel","Font Background Color":"Warna Latar Huruf","Font Color":"Warna Huruf","Font Family":"Jenis Huruf","Font Size":"Ukuran Huruf","Full size image":"Gambar ukuran penuh",Green:"Hijau",Grey:"Kelabu",Groove:"Groove","Header column":"Kolom tajuk","Header row":"Baris tajuk",Heading:"Tajuk","Heading 1":"Tajuk 1","Heading 2":"Tajuk 2","Heading 3":"Tajuk 3","Heading 4":"Tajuk 4","Heading 5":"Tajuk 5","Heading 6":"Tajuk 6",Height:"Tinggi",HEX:"HEX","Horizontal line":"Garis horizontal","Horizontal text alignment toolbar":"Bilah alat penjajaran teks horizontal","HTML object":"Objek HTML",Huge:"Sangat Besar","Image resize list":"Daftar ukuran gambar","Image toolbar":"Alat gambar","image widget":"widget gambar","In line":"Sebaris","Increase indent":"Tambah indentasi",Insert:"Sisipkan","Insert column left":"Sisipkan kolom ke kiri","Insert column right":"Sisipkan kolom ke kanan","Insert image":"Sisipkan gambar","Insert image via URL":"Sisipkan gambar melalui URL","Insert paragraph after block":"Tambahkan paragraf setelah blok","Insert paragraph before block":"Tambahkan paragraf sebelum blok","Insert row above":"Sisipkan baris ke atas","Insert row below":"Sisipkan baris ke bawah","Insert table":"Sisipkan tabel",Inset:"Inset",Italic:"Miring",Justify:"Rata kanan-kiri","Justify cell text":"Ratakan teks sel","Left aligned image":"Gambar rata kiri","Light blue":"Biru terang","Light green":"Hijau terang","Light grey":"Kelabu terang",Link:"Tautan","Link image":"Tautkan gambar","Link URL":"URL tautan","List properties":"Properti daftar","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Merge cell down":"Gabungkan sel ke bawah","Merge cell left":"Gabungkan sel ke kiri","Merge cell right":"Gabungkan sel ke kanan","Merge cell up":"Gabungkan sel ke atas","Merge cells":"Gabungkan sel",Next:"Berikutnya","No results found":"Hasil tidak ditemukan","No searchable items":"Tidak ada item yang dapat dicari",None:"Tidak ada","Numbered List":"Daftar Berangka","Numbered list styles toolbar":"Bilah alat gaya daftar angka","Open in a new tab":"Buka di tab baru","Open link in new tab":"Buka tautan di tab baru",Orange:"Jingga",Original:"Asli",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Tekan Enter untuk mengetik setelah atau tekan Shift + Enter untuk mengetik sebelum widget",Previous:"Sebelumnya",Purple:"Ungu",Red:"Merah",Redo:"Lakukan lagi","Remove color":"Hapus warna","Remove Format":"Hapus Format","Replace from computer":"Ganti dari komputer","Replace image":"Ganti gambar","Replace image from computer":"Ganti gambar dari komputer","Resize image":"Ubah ukuran gambar","Resize image to %0":"Ubah ukuran gambar ke %0","Resize image to the original size":"Ubah ukuran gambar ke ukuran asli","Restore default":"Pulihkan nilai baku","Reversed order":"Urutan terbalik","Rich Text Editor":"Editor Teks Kaya",Ridge:"Ridge","Right aligned image":"Gambar rata kanan",Row:"Baris",Save:"Simpan","Select all":"Pilih semua","Select column":"Seleksi kolom","Select row":"Seleksi baris","Show more items":"Tampilkan lebih banyak item","Side image":"Gambar sisi",Small:"Kecil",Solid:"Garis utuh","Split cell horizontally":"Bagikan sel secara horizontal","Split cell vertically":"Bagikan sel secara vertikal",Square:"Kotak","Start at":"Mulai dari","Start index must be greater than 0.":"Indeks awal harus lebih besar dari 0.",Strikethrough:"Coret",Style:"Gaya",Subscript:"Subskrip",Superscript:"Superskrip","Table alignment toolbar":"Bilah alat penjajaran tabel","Table cell text alignment":"Penjajaran teks sel tabel","Table properties":"Properti tabel","Table toolbar":"Alat tabel","Text alignment":"Perataan teks","Text alignment toolbar":"Alat perataan teks","Text alternative":"Alternatif teks",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Warna tidak valid. Coba "#FF0000" atau "rgb(255,0,0)" atau "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Nilai tidak valid. Coba "10px" atau "2em" atau hanya "2".',"This link has no URL":"Tautan ini tidak memiliki URL",Tiny:"Sangat Kecil","To-do List":"Daftar untuk-dikerjakan","Toggle caption off":"Sembunyikan keterangan","Toggle caption on":"Tampilkan keterangan","Toggle the circle list style":"Alihkan gaya daftar circle","Toggle the decimal list style":"Alihkan gaya daftar decimal","Toggle the decimal with leading zero list style":"Alihkan gaya daftar decimal with leading zero","Toggle the disc list style":"Alihkan gaya daftar disc","Toggle the lower–latin list style":"Alihkan gaya daftar lower–latin","Toggle the lower–roman list style":"Alihkan gaya daftar lower–roman","Toggle the square list style":"Alihkan gaya daftar square","Toggle the upper–latin list style":"Alihkan gaya daftar upper–latin","Toggle the upper–roman list style":"Alihkan gaya daftar upper–roman",Turquoise:"Turkish","Type or paste your content here.":"Ketik atau tempel konten Anda di sini.","Type your title":"Ketik judul Anda",Underline:"Garis bawah",Undo:"Batal",Unlink:"Hapus tautan",Update:"Perbarui","Update image URL":"Perbarui URL gambar","Upload failed":"Gagal mengunggah","Upload from computer":"Unggah dari komputer","Upload image from computer":"Unggah gambar dari komputer","Upload in progress":"Sedang mengunggah","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Bilah alat penjajaran teks vertikal",White:"Putih","Widget toolbar":"Alat widget",Width:"Lebar","Wrap text":"Bungkus teks",Yellow:"Kuning"}),e.getPluralForm=function(a){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(a){const e=a.id=a.id||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 dari %1",Accept:"Setuju","Align cell text to the bottom":"Sejajarkan teks sel ke bawah","Align cell text to the center":"Sejajarkan teks sel ke tengah","Align cell text to the left":"Sejajarkan teks sel ke kiri","Align cell text to the middle":"Sejajarkan teks sel ke tengah","Align cell text to the right":"Sejajarkan teks sel ke kanan","Align cell text to the top":"Sejajarkan teks sel ke atas","Align center":"Rata tengah","Align left":"Rata kiri","Align right":"Rata kanan","Align table to the left":"Sejajarkan teks sel ke kiri","Align table to the right":"Sejajarkan teks sel ke kanan",Alignment:"Penjajaran",Aquamarine:"Biru laut",Background:"Latar belakang",Big:"Besar",Black:"Hitam","Block quote":"Kutipan",Blue:"Biru",Bold:"Tebal",Border:"Garis batas","Break text":"Pecahkan teks","Bulleted List":"Daftar Tak Berangka","Bulleted list styles toolbar":"Bilah alat gaya daftar bullet",Cancel:"Batal","Caption for image: %0":"Keterangan gambar: %0","Caption for the image":"Keterangan untuk gambar","Cell properties":"Properti sel","Center table":"Tengahkan tabel","Centered image":"Gambar rata tengah","Change image text alternative":"Ganti alternatif teks gambar","Choose heading":"Pilih tajuk",Circle:"Lingkaran",Clear:"Kosongkan","Click to edit block":"Klik untuk mengedit blok",Close:"Tutup",Code:"Kode",Color:"Warna","Color picker":"Pengambil warna",Column:"Kolom",Dashed:"Garis putus-putus",Decimal:"Desimal","Decimal with leading zero":"Desimal dengan awalan nol","Decrease indent":"Kurangi indentasi",Default:"Bawaan","Delete column":"Hapus kolom","Delete row":"Hapus baris","Dim grey":"Kelabu gelap",Dimensions:"Dimensi",Disc:"Disk","Document colors":"Warna dokumen",Dotted:"Titik titik",Double:"Ganda",Downloadable:"Dapat diunduh","Drag to move":"Seret untuk memindahkan","Dropdown toolbar":"Alat dropdown","Edit block":"Sunting blok","Edit link":"Sunting tautan","Editor block content toolbar":"Bilah alat konten blok editor","Editor contextual toolbar":"Bilah alat kontekstual editor","Editor dialog":"Dialog editor","Editor editing area: %0":"Area edit editor: %0","Editor toolbar":"Alat editor","Enter image caption":"Tambahkan deskripsi gambar","Enter table caption":"Masukkan keterangan tabel","Font Background Color":"Warna Latar Huruf","Font Color":"Warna Huruf","Font Family":"Jenis Huruf","Font Size":"Ukuran Huruf","Full size image":"Gambar ukuran penuh",Green:"Hijau",Grey:"Kelabu",Groove:"Groove","Header column":"Kolom tajuk","Header row":"Baris tajuk",Heading:"Tajuk","Heading 1":"Tajuk 1","Heading 2":"Tajuk 2","Heading 3":"Tajuk 3","Heading 4":"Tajuk 4","Heading 5":"Tajuk 5","Heading 6":"Tajuk 6",Height:"Tinggi",HEX:"HEX","Horizontal line":"Garis horizontal","Horizontal text alignment toolbar":"Bilah alat penjajaran teks horizontal","HTML object":"Objek HTML",Huge:"Sangat Besar","Image resize list":"Daftar ukuran gambar","Image toolbar":"Alat gambar","image widget":"widget gambar","In line":"Sebaris","Increase indent":"Tambah indentasi",Insert:"Sisipkan","Insert column left":"Sisipkan kolom ke kiri","Insert column right":"Sisipkan kolom ke kanan","Insert image":"Sisipkan gambar","Insert image via URL":"Sisipkan gambar melalui URL","Insert paragraph after block":"Tambahkan paragraf setelah blok","Insert paragraph before block":"Tambahkan paragraf sebelum blok","Insert row above":"Sisipkan baris ke atas","Insert row below":"Sisipkan baris ke bawah","Insert table":"Sisipkan tabel",Inset:"Inset",Italic:"Miring",Justify:"Rata kanan-kiri","Justify cell text":"Ratakan teks sel","Left aligned image":"Gambar rata kiri","Light blue":"Biru terang","Light green":"Hijau terang","Light grey":"Kelabu terang",Link:"Tautan","Link image":"Tautkan gambar","Link URL":"URL tautan","List properties":"Properti daftar","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Merge cell down":"Gabungkan sel ke bawah","Merge cell left":"Gabungkan sel ke kiri","Merge cell right":"Gabungkan sel ke kanan","Merge cell up":"Gabungkan sel ke atas","Merge cells":"Gabungkan sel",Next:"Berikutnya","No results found":"Hasil tidak ditemukan","No searchable items":"Tidak ada item yang dapat dicari",None:"Tidak ada","Numbered List":"Daftar Berangka","Numbered list styles toolbar":"Bilah alat gaya daftar angka","Open in a new tab":"Buka di tab baru","Open link in new tab":"Buka tautan di tab baru",Orange:"Jingga",Original:"Asli",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Tekan Enter untuk mengetik setelah atau tekan Shift + Enter untuk mengetik sebelum widget",Previous:"Sebelumnya",Purple:"Ungu",Red:"Merah",Redo:"Lakukan lagi","Remove color":"Hapus warna","Remove Format":"Hapus Format","Replace from computer":"Ganti dari komputer","Replace image":"Ganti gambar","Replace image from computer":"Ganti gambar dari komputer","Resize image":"Ubah ukuran gambar","Resize image to %0":"Ubah ukuran gambar ke %0","Resize image to the original size":"Ubah ukuran gambar ke ukuran asli","Restore default":"Pulihkan nilai baku","Reversed order":"Urutan terbalik","Rich Text Editor":"Editor Teks Kaya",Ridge:"Ridge","Right aligned image":"Gambar rata kanan",Row:"Baris",Save:"Simpan","Select all":"Pilih semua","Select column":"Seleksi kolom","Select row":"Seleksi baris","Show more items":"Tampilkan lebih banyak item","Side image":"Gambar sisi",Small:"Kecil",Solid:"Garis utuh","Split cell horizontally":"Bagikan sel secara horizontal","Split cell vertically":"Bagikan sel secara vertikal",Square:"Kotak","Start at":"Mulai dari","Start index must be greater than 0.":"Indeks awal harus lebih besar dari 0.",Strikethrough:"Coret",Style:"Gaya",Subscript:"Subskrip",Superscript:"Superskrip","Table alignment toolbar":"Bilah alat penjajaran tabel","Table cell text alignment":"Penjajaran teks sel tabel","Table properties":"Properti tabel","Table toolbar":"Alat tabel","Text alignment":"Perataan teks","Text alignment toolbar":"Alat perataan teks","Text alternative":"Alternatif teks",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Warna tidak valid. Coba "#FF0000" atau "rgb(255,0,0)" atau "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Nilai tidak valid. Coba "10px" atau "2em" atau hanya "2".',"This link has no URL":"Tautan ini tidak memiliki URL",Tiny:"Sangat Kecil","To-do List":"Daftar untuk-dikerjakan","Toggle caption off":"Sembunyikan keterangan","Toggle caption on":"Tampilkan keterangan","Toggle the circle list style":"Alihkan gaya daftar circle","Toggle the decimal list style":"Alihkan gaya daftar decimal","Toggle the decimal with leading zero list style":"Alihkan gaya daftar decimal with leading zero","Toggle the disc list style":"Alihkan gaya daftar disc","Toggle the lower–latin list style":"Alihkan gaya daftar lower–latin","Toggle the lower–roman list style":"Alihkan gaya daftar lower–roman","Toggle the square list style":"Alihkan gaya daftar square","Toggle the upper–latin list style":"Alihkan gaya daftar upper–latin","Toggle the upper–roman list style":"Alihkan gaya daftar upper–roman",Turquoise:"Turkish","Type or paste your content here.":"Ketik atau tempel konten Anda di sini.","Type your title":"Ketik judul Anda",Underline:"Garis bawah",Undo:"Batal",Unlink:"Hapus tautan",Update:"Perbarui","Update image URL":"Perbarui URL gambar","Upload failed":"Gagal mengunggah","Upload from computer":"Unggah dari komputer","Upload image from computer":"Unggah gambar dari komputer","Upload in progress":"Sedang mengunggah","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Bilah alat penjajaran teks vertikal",White:"Putih","Widget toolbar":"Alat widget",Width:"Lebar","Wrap text":"Bungkus teks",Yellow:"Kuning"}),e.getPluralForm=function(a){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/it.js b/public/static/plugs/ckeditor5/translations/it.js
index 8bd784185..eb31b9fff 100644
--- a/public/static/plugs/ckeditor5/translations/it.js
+++ b/public/static/plugs/ckeditor5/translations/it.js
@@ -1 +1 @@
-!function(e){const i=e.it=e.it||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 di %1",Accept:"Accetta","Align cell text to the bottom":"Allinea il testo della cella in basso","Align cell text to the center":"Allinea il testo della cella al centro","Align cell text to the left":"Allinea il testo della cella a sinistra","Align cell text to the middle":"Allinea il testo della cella in mezzo","Align cell text to the right":"Allinea il testo della cella a destra","Align cell text to the top":"Allinea il testo della cella in alto","Align center":"Allinea al centro","Align left":"Allinea a sinistra","Align right":"Allinea a destra","Align table to the left":"Allinea tabella a sinistra","Align table to the right":"Allinea tabella a destra",Alignment:"Allineamento",Aquamarine:"Aquamarina",Background:"Sfondo",Big:"Grandi",Black:"Nero","Block quote":"Blocco citazione",Blue:"Blu",Bold:"Grassetto",Border:"Bordo","Break text":"Interrompi testo","Bulleted List":"Elenco puntato","Bulleted list styles toolbar":"Barra degli strumenti con gli stili degli elenchi puntati",Cancel:"Annulla","Caption for image: %0":"Didascalia dell'immagine: %0","Caption for the image":"Didascalia dell'immagine","Cell properties":"Proprietà cella","Center table":"Allinea tabella al centro","Centered image":"Immagine centrata","Change image text alternative":"Cambia testo alternativo dell'immagine","Choose heading":"Seleziona intestazione",Circle:"Cerchio",Clear:"Cancella","Click to edit block":"Clicca per modificare il blocco",Code:"Codice",Color:"Colore","Color picker":"Selezione colore",Column:"Colonna",Dashed:"Tratteggiato",Decimal:"Numero","Decimal with leading zero":"Numero con zero anteposto","Decrease indent":"Riduci rientro",Default:"Predefinito","Delete column":"Elimina colonna","Delete row":"Elimina riga","Dim grey":"Grigio tenue",Dimensions:"Dimensioni",Disc:"Disco","Document colors":"Colori del docmento",Dotted:"Punteggiato",Double:"Doppio",Downloadable:"Scaricabile","Drag to move":"Trascina per spostare","Dropdown toolbar":"Barra degli strumenti del menu a discesa","Edit block":"Modifica blocco","Edit link":"Modifica collegamento","Editor block content toolbar":"Barra degli strumenti contestuale dell'editor del blocco","Editor contextual toolbar":"Barra degli strumenti contestuale dell'editor","Editor editing area: %0":"Area di modifica dell'editor: %0","Editor toolbar":"Barra degli strumenti dell'editor","Enter image caption":"inserire didascalia dell'immagine","Enter table caption":"Inserire la didascalia della tabella","Font Background Color":"Colore di sfondo caratteri","Font Color":"Colore caratteri","Font Family":"Tipo di caratteri","Font Size":"Dimensione caratteri","Full size image":"Immagine a dimensione intera",Green:"Verde",Grey:"Grigio",Groove:"Scanalatura","Header column":"Intestazione colonna","Header row":"Riga d'intestazione",Heading:"Intestazione","Heading 1":"Intestazione 1","Heading 2":"Intestazione 2","Heading 3":"Intestazione 3","Heading 4":"Intestazione 4","Heading 5":"Intestazione 5","Heading 6":"Intestazione 6",Height:"Altezza",HEX:"HEX","Horizontal line":"Linea orizzontale","Horizontal text alignment toolbar":"Barra degli strumenti dell'allineamento orizzontale del testo","HTML object":"Oggetto HTML",Huge:"Grandissimi","Image resize list":"Elenco ridimensionamenti immagine","Image toolbar":"Barra degli strumenti dell'immagine","image widget":"Widget immagine","In line":"In linea","Increase indent":"Aumenta rientro",Insert:"Inserisci","Insert column left":"Inserisci colonna a sinistra","Insert column right":"Inserisci colonna a destra","Insert image":"Inserisci immagine","Insert image via URL":"Inserisci immagine tramite URL","Insert paragraph after block":"Inserisci paragrafo dopo blocco","Insert paragraph before block":"Inserisci paragrafo prima di blocco","Insert row above":"Inserisci riga sopra","Insert row below":"Inserisci riga sotto","Insert table":"Inserisci tabella",Inset:"Incassato",Italic:"Corsivo",Justify:"Giustifica","Justify cell text":"Testo della cella giustificato","Left aligned image":"Immagine allineata a sinistra","Light blue":"Azzurro","Light green":"Verde chiaro","Light grey":"Grigio chiaro",Link:"Collegamento","Link image":"Collega immagine","Link URL":"URL del collegamento","List properties":"Proprietà elenco","Lower-latin":"Lettera minuscola","Lower–roman":"Numero romano minuscolo","Merge cell down":"Unisci cella sotto","Merge cell left":"Unisci cella a sinistra","Merge cell right":"Unisci cella a destra","Merge cell up":"Unisci cella sopra","Merge cells":"Unisci celle",Next:"Avanti","No results found":"Nessun risultato trovato","No searchable items":"Nessun elemento ricercabile",None:"Nessuno","Numbered List":"Elenco numerato","Numbered list styles toolbar":"Barra degli strumenti con gli stili degli elenchi numerati","Open in a new tab":"Apri in una nuova scheda","Open link in new tab":"Apri collegamento in nuova scheda",Orange:"Arancio",Original:"Originale",Outset:"Rialzato",Padding:"Spaziatura interna",Paragraph:"Paragrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Premere Invio per inserire dopo il widget o premere Maiusc + Invio per inserire prima del widget",Previous:"Indietro",Purple:"Porpora",Red:"Rosso",Redo:"Ripristina","Remove color":"Rimuovi colore","Remove Format":"Rimuovi formato","Replace from computer":"Sostituisci dal computer","Replace image":"Sostituisci l'immagine","Replace image from computer":"Sostituisci l'immagine dal computer","Resize image":"Ridimensiona immagine","Resize image to %0":"Ridimensiona immagine a %0","Resize image to the original size":"Ridimensiona immagine alle dimensioni originali","Restore default":"Ripristina predefinito","Reversed order":"Ordine inverso","Rich Text Editor":"Editor di testo formattato",Ridge:"Rilievo","Right aligned image":"Immagine allineata a destra",Row:"Riga",Save:"Salva","Select all":"Seleziona tutto","Select column":"Seleziona colonna","Select row":"Seleziona riga","Show more items":"Mostra più elementi","Side image":"Immagine laterale",Small:"Piccoli",Solid:"Solido","Split cell horizontally":"Dividi cella orizzontalmente","Split cell vertically":"Dividi cella verticalmente",Square:"Quadrato","Start at":"Inizia da","Start index must be greater than 0.":"L'indice iniziale deve essere maggiore di 0.",Strikethrough:"Barrato",Style:"Stile",Subscript:"Pedice",Superscript:"Apice","Table alignment toolbar":"Barra degli strumenti dell'allineamento della tabella","Table cell text alignment":"Allineamento del testo nella cella della tabella","Table properties":"Proprietà tabella","Table toolbar":"Barra degli strumenti della tabella","Text alignment":"Allineamento del testo","Text alignment toolbar":"Barra degli strumenti dell'allineamento","Text alternative":"Testo alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Il colore non è valido. Provare "#FF0000" o "rgb(255,0,0)" o "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Il valore non è valido. Provare "10px" o "2em" o semplicemente "2".',"This link has no URL":"Questo collegamento non ha un URL",Tiny:"Piccolissimi","To-do List":"Elenco cose da fare","Toggle caption off":"Attiva didascalia","Toggle caption on":"Disattiva didascalia","Toggle the circle list style":"Attiva/disattiva lo stile degli elenchi con cerchi","Toggle the decimal list style":"Attiva/disattiva lo stile degli elenchi con numeri","Toggle the decimal with leading zero list style":"Attiva/disattiva lo stile degli elenchi con numeri con zero anteposto","Toggle the disc list style":"Attiva/disattiva lo stile degli elenchi con dischi","Toggle the lower–latin list style":"Attiva/disattiva lo stile degli elenchi con lettere minuscole","Toggle the lower–roman list style":"Attiva/disattiva lo stile degli elenchi con numeri romani minuscoli","Toggle the square list style":"Attiva/disattiva lo stile degli elenchi con quadrati","Toggle the upper–latin list style":"Attiva/disattiva lo stile degli elenchi con lettere maiuscole","Toggle the upper–roman list style":"Attiva/disattiva lo stile degli elenchi con numeri romani maiuscoli",Turquoise:"Turchese","Type or paste your content here.":"Inserire o incollare qui il proprio contenuto.","Type your title":"Inserire il proprio titolo",Underline:"Sottolineato",Undo:"Annulla",Unlink:"Elimina collegamento",Update:"Aggiorna","Update image URL":"Aggiorna URL immagine","Upload failed":"Caricamento fallito","Upload from computer":"Carica dal computer","Upload image from computer":"Carica l'immagine dal computer","Upload in progress":"Caricamento in corso","Upper-latin":"Lettera maiuscola","Upper-roman":"Numero romano maiuscolo","Vertical text alignment toolbar":"Barra degli strumenti dell'allineamento verticale del testo",White:"Bianco","Widget toolbar":"Barra degli strumenti del widget",Width:"Larghezza","Wrap text":"Testo a capo",Yellow:"Giallo"}),i.getPluralForm=function(e){return 1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const i=e.it=e.it||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 di %1",Accept:"Accetta","Align cell text to the bottom":"Allinea il testo della cella in basso","Align cell text to the center":"Allinea il testo della cella al centro","Align cell text to the left":"Allinea il testo della cella a sinistra","Align cell text to the middle":"Allinea il testo della cella in mezzo","Align cell text to the right":"Allinea il testo della cella a destra","Align cell text to the top":"Allinea il testo della cella in alto","Align center":"Allinea al centro","Align left":"Allinea a sinistra","Align right":"Allinea a destra","Align table to the left":"Allinea tabella a sinistra","Align table to the right":"Allinea tabella a destra",Alignment:"Allineamento",Aquamarine:"Aquamarina",Background:"Sfondo",Big:"Grandi",Black:"Nero","Block quote":"Blocco citazione",Blue:"Blu",Bold:"Grassetto",Border:"Bordo","Break text":"Interrompi testo","Bulleted List":"Elenco puntato","Bulleted list styles toolbar":"Barra degli strumenti con gli stili degli elenchi puntati",Cancel:"Annulla","Caption for image: %0":"Didascalia dell'immagine: %0","Caption for the image":"Didascalia dell'immagine","Cell properties":"Proprietà cella","Center table":"Allinea tabella al centro","Centered image":"Immagine centrata","Change image text alternative":"Cambia testo alternativo dell'immagine","Choose heading":"Seleziona intestazione",Circle:"Cerchio",Clear:"Cancella","Click to edit block":"Clicca per modificare il blocco",Close:"Chiudi",Code:"Codice",Color:"Colore","Color picker":"Selezione colore",Column:"Colonna",Dashed:"Tratteggiato",Decimal:"Numero","Decimal with leading zero":"Numero con zero anteposto","Decrease indent":"Riduci rientro",Default:"Predefinito","Delete column":"Elimina colonna","Delete row":"Elimina riga","Dim grey":"Grigio tenue",Dimensions:"Dimensioni",Disc:"Disco","Document colors":"Colori del docmento",Dotted:"Punteggiato",Double:"Doppio",Downloadable:"Scaricabile","Drag to move":"Trascina per spostare","Dropdown toolbar":"Barra degli strumenti del menu a discesa","Edit block":"Modifica blocco","Edit link":"Modifica collegamento","Editor block content toolbar":"Barra degli strumenti contestuale dell'editor del blocco","Editor contextual toolbar":"Barra degli strumenti contestuale dell'editor","Editor dialog":"Finestra di dialogo dell'editor","Editor editing area: %0":"Area di modifica dell'editor: %0","Editor toolbar":"Barra degli strumenti dell'editor","Enter image caption":"inserire didascalia dell'immagine","Enter table caption":"Inserire la didascalia della tabella","Font Background Color":"Colore di sfondo caratteri","Font Color":"Colore caratteri","Font Family":"Tipo di caratteri","Font Size":"Dimensione caratteri","Full size image":"Immagine a dimensione intera",Green:"Verde",Grey:"Grigio",Groove:"Scanalatura","Header column":"Intestazione colonna","Header row":"Riga d'intestazione",Heading:"Intestazione","Heading 1":"Intestazione 1","Heading 2":"Intestazione 2","Heading 3":"Intestazione 3","Heading 4":"Intestazione 4","Heading 5":"Intestazione 5","Heading 6":"Intestazione 6",Height:"Altezza",HEX:"HEX","Horizontal line":"Linea orizzontale","Horizontal text alignment toolbar":"Barra degli strumenti dell'allineamento orizzontale del testo","HTML object":"Oggetto HTML",Huge:"Grandissimi","Image resize list":"Elenco ridimensionamenti immagine","Image toolbar":"Barra degli strumenti dell'immagine","image widget":"Widget immagine","In line":"In linea","Increase indent":"Aumenta rientro",Insert:"Inserisci","Insert column left":"Inserisci colonna a sinistra","Insert column right":"Inserisci colonna a destra","Insert image":"Inserisci immagine","Insert image via URL":"Inserisci immagine tramite URL","Insert paragraph after block":"Inserisci paragrafo dopo blocco","Insert paragraph before block":"Inserisci paragrafo prima di blocco","Insert row above":"Inserisci riga sopra","Insert row below":"Inserisci riga sotto","Insert table":"Inserisci tabella",Inset:"Incassato",Italic:"Corsivo",Justify:"Giustifica","Justify cell text":"Testo della cella giustificato","Left aligned image":"Immagine allineata a sinistra","Light blue":"Azzurro","Light green":"Verde chiaro","Light grey":"Grigio chiaro",Link:"Collegamento","Link image":"Collega immagine","Link URL":"URL del collegamento","List properties":"Proprietà elenco","Lower-latin":"Lettera minuscola","Lower–roman":"Numero romano minuscolo","Merge cell down":"Unisci cella sotto","Merge cell left":"Unisci cella a sinistra","Merge cell right":"Unisci cella a destra","Merge cell up":"Unisci cella sopra","Merge cells":"Unisci celle",Next:"Avanti","No results found":"Nessun risultato trovato","No searchable items":"Nessun elemento ricercabile",None:"Nessuno","Numbered List":"Elenco numerato","Numbered list styles toolbar":"Barra degli strumenti con gli stili degli elenchi numerati","Open in a new tab":"Apri in una nuova scheda","Open link in new tab":"Apri collegamento in nuova scheda",Orange:"Arancio",Original:"Originale",Outset:"Rialzato",Padding:"Spaziatura interna",Paragraph:"Paragrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Premere Invio per inserire dopo il widget o premere Maiusc + Invio per inserire prima del widget",Previous:"Indietro",Purple:"Porpora",Red:"Rosso",Redo:"Ripristina","Remove color":"Rimuovi colore","Remove Format":"Rimuovi formato","Replace from computer":"Sostituisci dal computer","Replace image":"Sostituisci l'immagine","Replace image from computer":"Sostituisci l'immagine dal computer","Resize image":"Ridimensiona immagine","Resize image to %0":"Ridimensiona immagine a %0","Resize image to the original size":"Ridimensiona immagine alle dimensioni originali","Restore default":"Ripristina predefinito","Reversed order":"Ordine inverso","Rich Text Editor":"Editor di testo formattato",Ridge:"Rilievo","Right aligned image":"Immagine allineata a destra",Row:"Riga",Save:"Salva","Select all":"Seleziona tutto","Select column":"Seleziona colonna","Select row":"Seleziona riga","Show more items":"Mostra più elementi","Side image":"Immagine laterale",Small:"Piccoli",Solid:"Solido","Split cell horizontally":"Dividi cella orizzontalmente","Split cell vertically":"Dividi cella verticalmente",Square:"Quadrato","Start at":"Inizia da","Start index must be greater than 0.":"L'indice iniziale deve essere maggiore di 0.",Strikethrough:"Barrato",Style:"Stile",Subscript:"Pedice",Superscript:"Apice","Table alignment toolbar":"Barra degli strumenti dell'allineamento della tabella","Table cell text alignment":"Allineamento del testo nella cella della tabella","Table properties":"Proprietà tabella","Table toolbar":"Barra degli strumenti della tabella","Text alignment":"Allineamento del testo","Text alignment toolbar":"Barra degli strumenti dell'allineamento","Text alternative":"Testo alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Il colore non è valido. Provare "#FF0000" o "rgb(255,0,0)" o "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Il valore non è valido. Provare "10px" o "2em" o semplicemente "2".',"This link has no URL":"Questo collegamento non ha un URL",Tiny:"Piccolissimi","To-do List":"Elenco cose da fare","Toggle caption off":"Attiva didascalia","Toggle caption on":"Disattiva didascalia","Toggle the circle list style":"Attiva/disattiva lo stile degli elenchi con cerchi","Toggle the decimal list style":"Attiva/disattiva lo stile degli elenchi con numeri","Toggle the decimal with leading zero list style":"Attiva/disattiva lo stile degli elenchi con numeri con zero anteposto","Toggle the disc list style":"Attiva/disattiva lo stile degli elenchi con dischi","Toggle the lower–latin list style":"Attiva/disattiva lo stile degli elenchi con lettere minuscole","Toggle the lower–roman list style":"Attiva/disattiva lo stile degli elenchi con numeri romani minuscoli","Toggle the square list style":"Attiva/disattiva lo stile degli elenchi con quadrati","Toggle the upper–latin list style":"Attiva/disattiva lo stile degli elenchi con lettere maiuscole","Toggle the upper–roman list style":"Attiva/disattiva lo stile degli elenchi con numeri romani maiuscoli",Turquoise:"Turchese","Type or paste your content here.":"Inserire o incollare qui il proprio contenuto.","Type your title":"Inserire il proprio titolo",Underline:"Sottolineato",Undo:"Annulla",Unlink:"Elimina collegamento",Update:"Aggiorna","Update image URL":"Aggiorna URL immagine","Upload failed":"Caricamento fallito","Upload from computer":"Carica dal computer","Upload image from computer":"Carica l'immagine dal computer","Upload in progress":"Caricamento in corso","Upper-latin":"Lettera maiuscola","Upper-roman":"Numero romano maiuscolo","Vertical text alignment toolbar":"Barra degli strumenti dell'allineamento verticale del testo",White:"Bianco","Widget toolbar":"Barra degli strumenti del widget",Width:"Larghezza","Wrap text":"Testo a capo",Yellow:"Giallo"}),i.getPluralForm=function(e){return 1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ja.js b/public/static/plugs/ckeditor5/translations/ja.js
index 5fa7b58a0..de67cec85 100644
--- a/public/static/plugs/ckeditor5/translations/ja.js
+++ b/public/static/plugs/ckeditor5/translations/ja.js
@@ -1 +1 @@
-!function(e){const t=e.ja=e.ja||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0/%1",Accept:"同意します","Align cell text to the bottom":"セルのテキストを下に寄せる","Align cell text to the center":"セルのテキストを中央へ揃える","Align cell text to the left":"セルのテキストを左へ寄せる","Align cell text to the middle":"セルのテキストを中央へ揃える","Align cell text to the right":"セルのテキストを右へ寄せる","Align cell text to the top":"セルのテキストを上に寄せる","Align center":"中央揃え","Align left":"左揃え","Align right":"右揃え","Align table to the left":"テーブルを左へ寄せる","Align table to the right":"テーブルを右へ寄せる",Alignment:"配置",Aquamarine:"薄い青緑",Background:"背景",Big:"大",Black:"黒","Block quote":"ブロッククオート(引用)",Blue:"青",Bold:"ボールド",Border:"罫線","Break text":"テキストを分割する","Bulleted List":"箇条書きリスト","Bulleted list styles toolbar":"箇条書きリストスタイルのツールバー",Cancel:"キャンセル","Caption for image: %0":"画像キャプション:%0","Caption for the image":"画像キャプション","Cell properties":"セルのプロパティ","Center table":"テーブルを中央へ寄せる","Centered image":"中央寄せ画像","Change image text alternative":"画像の代替テキストを変更","Choose heading":"見出しを選択",Circle:"白い丸",Clear:"消去","Click to edit block":"クリックしてブロックを編集する",Code:"コード",Color:"色","Color picker":"カラーピッカー",Column:"列",Dashed:"破線",Decimal:"10進数の数値","Decimal with leading zero":"10進数の数値の前に0がつく","Decrease indent":"インデントの削除",Default:"デフォルト","Delete column":"列を削除","Delete row":"行を削除","Dim grey":"暗い灰色",Dimensions:"寸法",Disc:"黒い丸","Document colors":"ドキュメント背景色",Dotted:"点線",Double:"2本線",Downloadable:"ダウンロード可能","Drag to move":"ドラッグして動かす","Dropdown toolbar":"ドロップダウンツールバー","Edit block":"ブロックを編集","Edit link":"リンクを編集","Editor block content toolbar":"エディター ブロック コンテンツ ツールバー","Editor contextual toolbar":"エディター コンテクスト ツールバー","Editor editing area: %0":"エディタ編集エリア:%0","Editor toolbar":"エディタツールバー","Enter image caption":"画像の注釈を入力","Enter table caption":"テーブルキャプションを入力","Font Background Color":"背景色","Font Color":"文字色","Font Family":"フォントファミリー","Font Size":"フォントサイズ","Full size image":"フルサイズ画像",Green:"緑",Grey:"灰色",Groove:"立体的にくぼんだ線","Header column":"見出し列","Header row":"見出し行",Heading:"見出し","Heading 1":"見出し1","Heading 2":"見出し2","Heading 3":"見出し3 ","Heading 4":"見出し4","Heading 5":"見出し5","Heading 6":"見出し6",Height:"高さ",HEX:"HEX","Horizontal line":"区切り","Horizontal text alignment toolbar":"水平方向のテキスト配置ツールバー","HTML object":"HTMLオブジェクト",Huge:"極大","Image resize list":"画像サイズリスト","Image toolbar":"画像","image widget":"画像ウィジェット","In line":"インライン","Increase indent":"インデントの追加",Insert:"挿入","Insert column left":"左に列を挿入","Insert column right":"右に列を挿入","Insert image":"画像挿入","Insert image via URL":"画像URLを挿入","Insert paragraph after block":"ブロックの後にパラグラフを挿入","Insert paragraph before block":"ブロックの前にパラグラフを挿入","Insert row above":"上に行を挿入","Insert row below":"下に行を挿入","Insert table":"表の挿入",Inset:"内側全体がくぼんだ線",Italic:"イタリック",Justify:"両端揃え","Justify cell text":"セルのテキストを両端へ揃える","Left aligned image":"左寄せ画像","Light blue":"明るい青","Light green":"明るい緑","Light grey":"明るい灰色",Link:"リンク","Link image":"リンク画像","Link URL":"リンクURL","List properties":"リストのプロパティ","Lower-latin":"小文字アルファベット","Lower–roman":"小文字ローマ数字","Merge cell down":"下のセルと結合","Merge cell left":"左のセルと結合","Merge cell right":"右のセルと結合","Merge cell up":"上のセルと結合","Merge cells":"セルを結合",Next:"次へ","No results found":"結果は見つかりませんでした","No searchable items":"検索可能なアイテムがありません",None:"なし","Numbered List":"番号付きリスト","Numbered list styles toolbar":"番号付きリストスタイルのツールバー","Open in a new tab":"新しいタブで開く","Open link in new tab":"新しいタブでリンクを開く",Orange:"オレンジ",Original:"オリジナル",Outset:"内側全体が隆起した線",Padding:"パディング",Paragraph:"段落","Press Enter to type after or press Shift + Enter to type before the widget":"Enterを押してウィジェットの後に入力するか、Shift + Enterを押してウィジェットの前に入力してください",Previous:"前へ",Purple:"紫",Red:"赤",Redo:"やり直し","Remove color":"カラーを削除","Remove Format":"フォーマットの削除","Replace from computer":"パソコンから置換","Replace image":"画像を置換","Replace image from computer":"パソコンから画像を置換","Resize image":"画像サイズ","Resize image to %0":"画像サイズを%0に変更","Resize image to the original size":"画像サイズを元のサイズに変更","Restore default":"初期値に戻す","Reversed order":"逆順","Rich Text Editor":"リッチテキストエディター",Ridge:"立体的に隆起した線","Right aligned image":"右寄せ画像",Row:"行",Save:"保存","Select all":"すべて選択","Select column":"列を選択","Select row":"行を選択","Show more items":"他の項目を表示","Side image":"サイドイメージ",Small:"小",Solid:"1本線","Split cell horizontally":"縦にセルを分離","Split cell vertically":"横にセルを分離",Square:"黒い四角","Start at":"開始数字","Start index must be greater than 0.":"開始インデックスは0より大きくなければいけません。",Strikethrough:"取り消し線",Style:"スタイル",Subscript:"下付き文字",Superscript:"上付き文字","Table alignment toolbar":"テーブル配置ツールバー","Table cell text alignment":"テーブルセルのテキスト配置","Table properties":"テーブルのプロパティ","Table toolbar":"テーブルのツールバー","Text alignment":"文字揃え","Text alignment toolbar":"テキストの整列","Text alternative":"代替テキスト",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"この色は無効です。「#FF0000」、「rgb(255,0,0」または「赤」をお試しください。",'The value is invalid. Try "10px" or "2em" or simply "2".':"この値は無効です。「10px」、「2em」または単純に「2」をお試しください。","This link has no URL":"リンクにURLが設定されていません",Tiny:"極小","To-do List":"やることリスト","Toggle caption off":"キャプションをオフにする","Toggle caption on":"キャプションをオンにする","Toggle the circle list style":"白い丸リストスタイルを切り替える","Toggle the decimal list style":"10進数リストスタイルを切り替える","Toggle the decimal with leading zero list style":"10進数の数値の前に0がつくリストスタイルを切り替える","Toggle the disc list style":"黒い丸リストスタイルを切り替える","Toggle the lower–latin list style":"小文字アルファベットリストスタイルを切り替える","Toggle the lower–roman list style":"小文字ローマ数字リストスタイルを切り替える","Toggle the square list style":"黒い四角リストスタイルを切り替える","Toggle the upper–latin list style":"大文字アルファベットリストスタイルを切り替える","Toggle the upper–roman list style":"大文字ローマ数字リストスタイルを切り替える",Turquoise:"水色","Type or paste your content here.":"コンテンツをここに入力または貼り付けしてください。","Type your title":"タイトルを入力",Underline:"アンダーライン",Undo:"元に戻す",Unlink:"リンク解除",Update:"更新","Update image URL":"画像URLを更新","Upload failed":"アップロード失敗","Upload from computer":"パソコンからアップロード","Upload image from computer":"パソコンから画像をアップロード","Upload in progress":"アップロード中","Upper-latin":"大文字アルファベット","Upper-roman":"大文字ローマ数字","Vertical text alignment toolbar":"垂直方向のテキスト配置ツールバー",White:"白","Widget toolbar":"ウィジェットツールバー",Width:"幅","Wrap text":"テキストを折り返す",Yellow:"黄"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ja=e.ja||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0/%1",Accept:"同意します","Align cell text to the bottom":"セルのテキストを下に寄せる","Align cell text to the center":"セルのテキストを中央へ揃える","Align cell text to the left":"セルのテキストを左へ寄せる","Align cell text to the middle":"セルのテキストを中央へ揃える","Align cell text to the right":"セルのテキストを右へ寄せる","Align cell text to the top":"セルのテキストを上に寄せる","Align center":"中央揃え","Align left":"左揃え","Align right":"右揃え","Align table to the left":"テーブルを左へ寄せる","Align table to the right":"テーブルを右へ寄せる",Alignment:"配置",Aquamarine:"薄い青緑",Background:"背景",Big:"大",Black:"黒","Block quote":"ブロッククオート(引用)",Blue:"青",Bold:"ボールド",Border:"罫線","Break text":"テキストを分割する","Bulleted List":"箇条書きリスト","Bulleted list styles toolbar":"箇条書きリストスタイルのツールバー",Cancel:"キャンセル","Caption for image: %0":"画像キャプション:%0","Caption for the image":"画像キャプション","Cell properties":"セルのプロパティ","Center table":"テーブルを中央へ寄せる","Centered image":"中央寄せ画像","Change image text alternative":"画像の代替テキストを変更","Choose heading":"見出しを選択",Circle:"白い丸",Clear:"消去","Click to edit block":"クリックしてブロックを編集する",Close:"閉じる",Code:"コード",Color:"色","Color picker":"カラーピッカー",Column:"列",Dashed:"破線",Decimal:"10進数の数値","Decimal with leading zero":"10進数の数値の前に0がつく","Decrease indent":"インデントの削除",Default:"デフォルト","Delete column":"列を削除","Delete row":"行を削除","Dim grey":"暗い灰色",Dimensions:"寸法",Disc:"黒い丸","Document colors":"ドキュメント背景色",Dotted:"点線",Double:"2本線",Downloadable:"ダウンロード可能","Drag to move":"ドラッグして動かす","Dropdown toolbar":"ドロップダウンツールバー","Edit block":"ブロックを編集","Edit link":"リンクを編集","Editor block content toolbar":"エディター ブロック コンテンツ ツールバー","Editor contextual toolbar":"エディター コンテクスト ツールバー","Editor dialog":"エディタダイアログ","Editor editing area: %0":"エディタ編集エリア:%0","Editor toolbar":"エディタツールバー","Enter image caption":"画像の注釈を入力","Enter table caption":"テーブルキャプションを入力","Font Background Color":"背景色","Font Color":"文字色","Font Family":"フォントファミリー","Font Size":"フォントサイズ","Full size image":"フルサイズ画像",Green:"緑",Grey:"灰色",Groove:"立体的にくぼんだ線","Header column":"見出し列","Header row":"見出し行",Heading:"見出し","Heading 1":"見出し1","Heading 2":"見出し2","Heading 3":"見出し3 ","Heading 4":"見出し4","Heading 5":"見出し5","Heading 6":"見出し6",Height:"高さ",HEX:"HEX","Horizontal line":"区切り","Horizontal text alignment toolbar":"水平方向のテキスト配置ツールバー","HTML object":"HTMLオブジェクト",Huge:"極大","Image resize list":"画像サイズリスト","Image toolbar":"画像","image widget":"画像ウィジェット","In line":"インライン","Increase indent":"インデントの追加",Insert:"挿入","Insert column left":"左に列を挿入","Insert column right":"右に列を挿入","Insert image":"画像挿入","Insert image via URL":"画像URLを挿入","Insert paragraph after block":"ブロックの後にパラグラフを挿入","Insert paragraph before block":"ブロックの前にパラグラフを挿入","Insert row above":"上に行を挿入","Insert row below":"下に行を挿入","Insert table":"表の挿入",Inset:"内側全体がくぼんだ線",Italic:"イタリック",Justify:"両端揃え","Justify cell text":"セルのテキストを両端へ揃える","Left aligned image":"左寄せ画像","Light blue":"明るい青","Light green":"明るい緑","Light grey":"明るい灰色",Link:"リンク","Link image":"リンク画像","Link URL":"リンクURL","List properties":"リストのプロパティ","Lower-latin":"小文字アルファベット","Lower–roman":"小文字ローマ数字","Merge cell down":"下のセルと結合","Merge cell left":"左のセルと結合","Merge cell right":"右のセルと結合","Merge cell up":"上のセルと結合","Merge cells":"セルを結合",Next:"次へ","No results found":"結果は見つかりませんでした","No searchable items":"検索可能なアイテムがありません",None:"なし","Numbered List":"番号付きリスト","Numbered list styles toolbar":"番号付きリストスタイルのツールバー","Open in a new tab":"新しいタブで開く","Open link in new tab":"新しいタブでリンクを開く",Orange:"オレンジ",Original:"オリジナル",Outset:"内側全体が隆起した線",Padding:"パディング",Paragraph:"段落","Press Enter to type after or press Shift + Enter to type before the widget":"Enterを押してウィジェットの後に入力するか、Shift + Enterを押してウィジェットの前に入力してください",Previous:"前へ",Purple:"紫",Red:"赤",Redo:"やり直し","Remove color":"カラーを削除","Remove Format":"フォーマットの削除","Replace from computer":"パソコンから置換","Replace image":"画像を置換","Replace image from computer":"パソコンから画像を置換","Resize image":"画像サイズ","Resize image to %0":"画像サイズを%0に変更","Resize image to the original size":"画像サイズを元のサイズに変更","Restore default":"初期値に戻す","Reversed order":"逆順","Rich Text Editor":"リッチテキストエディター",Ridge:"立体的に隆起した線","Right aligned image":"右寄せ画像",Row:"行",Save:"保存","Select all":"すべて選択","Select column":"列を選択","Select row":"行を選択","Show more items":"他の項目を表示","Side image":"サイドイメージ",Small:"小",Solid:"1本線","Split cell horizontally":"縦にセルを分離","Split cell vertically":"横にセルを分離",Square:"黒い四角","Start at":"開始数字","Start index must be greater than 0.":"開始インデックスは0より大きくなければいけません。",Strikethrough:"取り消し線",Style:"スタイル",Subscript:"下付き文字",Superscript:"上付き文字","Table alignment toolbar":"テーブル配置ツールバー","Table cell text alignment":"テーブルセルのテキスト配置","Table properties":"テーブルのプロパティ","Table toolbar":"テーブルのツールバー","Text alignment":"文字揃え","Text alignment toolbar":"テキストの整列","Text alternative":"代替テキスト",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"この色は無効です。「#FF0000」、「rgb(255,0,0」または「赤」をお試しください。",'The value is invalid. Try "10px" or "2em" or simply "2".':"この値は無効です。「10px」、「2em」または単純に「2」をお試しください。","This link has no URL":"リンクにURLが設定されていません",Tiny:"極小","To-do List":"やることリスト","Toggle caption off":"キャプションをオフにする","Toggle caption on":"キャプションをオンにする","Toggle the circle list style":"白い丸リストスタイルを切り替える","Toggle the decimal list style":"10進数リストスタイルを切り替える","Toggle the decimal with leading zero list style":"10進数の数値の前に0がつくリストスタイルを切り替える","Toggle the disc list style":"黒い丸リストスタイルを切り替える","Toggle the lower–latin list style":"小文字アルファベットリストスタイルを切り替える","Toggle the lower–roman list style":"小文字ローマ数字リストスタイルを切り替える","Toggle the square list style":"黒い四角リストスタイルを切り替える","Toggle the upper–latin list style":"大文字アルファベットリストスタイルを切り替える","Toggle the upper–roman list style":"大文字ローマ数字リストスタイルを切り替える",Turquoise:"水色","Type or paste your content here.":"コンテンツをここに入力または貼り付けしてください。","Type your title":"タイトルを入力",Underline:"アンダーライン",Undo:"元に戻す",Unlink:"リンク解除",Update:"更新","Update image URL":"画像URLを更新","Upload failed":"アップロード失敗","Upload from computer":"パソコンからアップロード","Upload image from computer":"パソコンから画像をアップロード","Upload in progress":"アップロード中","Upper-latin":"大文字アルファベット","Upper-roman":"大文字ローマ数字","Vertical text alignment toolbar":"垂直方向のテキスト配置ツールバー",White:"白","Widget toolbar":"ウィジェットツールバー",Width:"幅","Wrap text":"テキストを折り返す",Yellow:"黄"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/km.js b/public/static/plugs/ckeditor5/translations/km.js
index 33ce4905f..c7bdc99b1 100644
--- a/public/static/plugs/ckeditor5/translations/km.js
+++ b/public/static/plugs/ckeditor5/translations/km.js
@@ -1 +1 @@
-!function(e){const t=e.km=e.km||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align center":"តម្រឹម​កណ្ដាល","Align left":"តម្រឹម​ឆ្វេង","Align right":"តម្រឹម​ស្ដាំ",Aquamarine:"",Black:"","Block quote":"ប្លុក​ពាក្យ​សម្រង់",Blue:"",Bold:"ដិត","Break text":"","Bulleted List":"បញ្ជី​ជា​ចំណុច","Bulleted list styles toolbar":"",Cancel:"បោះបង់","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"","Choose heading":"ជ្រើសរើស​ក្បាលអត្ថបទ",Circle:"",Clear:"","Click to edit block":"",Code:"កូដ",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"បញ្ចូល​ពាក្យ​ពណ៌នា​រូបភាព","Full size image":"រូបភាព​ពេញ​ទំហំ",Green:"",Grey:"",Heading:"ក្បាលអត្ថបទ","Heading 1":"ក្បាលអត្ថបទ 1","Heading 2":"ក្បាលអត្ថបទ 2","Heading 3":"ក្បាលអត្ថបទ 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"វិដជិត​រូបភាព","In line":"",Insert:"","Insert image":"បញ្ចូល​រូបភាព","Insert image via URL":"",Italic:"ទ្រេត",Justify:"តម្រឹម​សងខាង","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"តំណ","Link image":"","Link URL":"URL តំណ","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"បញ្ជី​ជា​លេខ","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"កថាខណ្ឌ",Previous:"",Purple:"",Red:"",Redo:"ធ្វើ​វិញ","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"កម្មវិធី​កែសម្រួល​អត្ថបទ​សម្បូរបែប","Right aligned image":"",Save:"រក្សាទុ","Show more items":"","Side image":"រូបភាព​នៅ​ខាង",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"ឆូតកណ្ដាល",Subscript:"អក្សរ​តូចក្រោម",Superscript:"អក្សរ​តូចលើ","Text alignment":"ការ​តម្រឹម​អក្សរ","Text alignment toolbar":"របារ​ឧបករណ៍​តម្រឹម​អក្សរ","Text alternative":"","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"គូស​បន្ទាត់​ក្រោម",Undo:"លែង​ធ្វើ​វិញ",Unlink:"ផ្ដាច់​តំណ",Update:"","Update image URL":"","Upload failed":"អាប់ឡូត​មិនបាន","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.km=e.km||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align center":"តម្រឹម​កណ្ដាល","Align left":"តម្រឹម​ឆ្វេង","Align right":"តម្រឹម​ស្ដាំ",Aquamarine:"",Black:"","Block quote":"ប្លុក​ពាក្យ​សម្រង់",Blue:"",Bold:"ដិត","Break text":"","Bulleted List":"បញ្ជី​ជា​ចំណុច","Bulleted list styles toolbar":"",Cancel:"បោះបង់","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"","Choose heading":"ជ្រើសរើស​ក្បាលអត្ថបទ",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"កូដ",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"បញ្ចូល​ពាក្យ​ពណ៌នា​រូបភាព","Full size image":"រូបភាព​ពេញ​ទំហំ",Green:"",Grey:"",Heading:"ក្បាលអត្ថបទ","Heading 1":"ក្បាលអត្ថបទ 1","Heading 2":"ក្បាលអត្ថបទ 2","Heading 3":"ក្បាលអត្ថបទ 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"វិដជិត​រូបភាព","In line":"",Insert:"","Insert image":"បញ្ចូល​រូបភាព","Insert image via URL":"",Italic:"ទ្រេត",Justify:"តម្រឹម​សងខាង","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"តំណ","Link image":"","Link URL":"URL តំណ","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"បញ្ជី​ជា​លេខ","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"កថាខណ្ឌ",Previous:"",Purple:"",Red:"",Redo:"ធ្វើ​វិញ","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"កម្មវិធី​កែសម្រួល​អត្ថបទ​សម្បូរបែប","Right aligned image":"",Save:"រក្សាទុ","Show more items":"","Side image":"រូបភាព​នៅ​ខាង",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"ឆូតកណ្ដាល",Subscript:"អក្សរ​តូចក្រោម",Superscript:"អក្សរ​តូចលើ","Text alignment":"ការ​តម្រឹម​អក្សរ","Text alignment toolbar":"របារ​ឧបករណ៍​តម្រឹម​អក្សរ","Text alternative":"","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"គូស​បន្ទាត់​ក្រោម",Undo:"លែង​ធ្វើ​វិញ",Unlink:"ផ្ដាច់​តំណ",Update:"","Update image URL":"","Upload failed":"អាប់ឡូត​មិនបាន","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/kn.js b/public/static/plugs/ckeditor5/translations/kn.js
index daf39366e..2ba194677 100644
--- a/public/static/plugs/ckeditor5/translations/kn.js
+++ b/public/static/plugs/ckeditor5/translations/kn.js
@@ -1 +1 @@
-!function(e){const t=e.kn=e.kn||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"","Block quote":"‍‍‍‍ಗುರುತಿಸಲಾದ ‍‍ಉಲ್ಲೇಖ",Blue:"",Bold:"‍‍ದಪ್ಪ","Break text":"","Bulleted List":"‍‍ಬುಲೆಟ್ ಪಟ್ಟಿ","Bulleted list styles toolbar":"",Cancel:"ರದ್ದುಮಾಡು","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"‍ಚಿತ್ರದ ಬದಲಿ ಪಠ್ಯ ಬದಲಾಯಿಸು","Choose heading":"ಶೀರ್ಷಿಕೆ ಆಯ್ಕೆಮಾಡು",Circle:"",Clear:"","Click to edit block":"",Code:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"‍ಚಿತ್ರದ ಶೀರ್ಷಿಕೆ ಸೇರಿಸು","Full size image":"‍ಪೂರ್ಣ ‍‍ಅಳತೆಯ ಚಿತ್ರ",Green:"",Grey:"",Heading:"ಶೀರ್ಷಿಕೆ","Heading 1":"ಶೀರ್ಷಿಕೆ 1","Heading 2":"ಶೀರ್ಷಿಕೆ 2","Heading 3":"ಶೀರ್ಷಿಕೆ 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"‍ಚಿತ್ರ ವಿಜೆಟ್","In line":"",Insert:"","Insert image":"","Insert image via URL":"",Italic:"‍ಇಟಾಲಿಕ್","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"‍ಕೊಂಡಿ","Link image":"","Link URL":"‍ಕೊಂಡಿ ಸಂಪರ್ಕಿಸು","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"‍ಸಂಖ್ಯೆಯ ಪಟ್ಟಿ‍","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"ಪ್ಯಾರಾಗ್ರಾಫ್",Previous:"",Purple:"",Red:"",Redo:"‍ಮತ್ತೆ ಮಾಡು","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"‍ಸಮೃದ್ಧ ಪಠ್ಯ ಸಂಪಾದಕ‍‍","Right aligned image":"",Save:"ಉಳಿಸು","Show more items":"","Side image":"‍ಪಕ್ಕದ ಚಿತ್ರ",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"‍ಪಠ್ಯದ ಬದಲಿ","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"",Undo:"‍‍ರದ್ದು",Unlink:"‍ಕೊಂಡಿ ತೆಗೆ",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.kn=e.kn||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"",Aquamarine:"",Black:"","Block quote":"‍‍‍‍ಗುರುತಿಸಲಾದ ‍‍ಉಲ್ಲೇಖ",Blue:"",Bold:"‍‍ದಪ್ಪ","Break text":"","Bulleted List":"‍‍ಬುಲೆಟ್ ಪಟ್ಟಿ","Bulleted list styles toolbar":"",Cancel:"ರದ್ದುಮಾಡು","Caption for image: %0":"","Caption for the image":"","Centered image":"","Change image text alternative":"‍ಚಿತ್ರದ ಬದಲಿ ಪಠ್ಯ ಬದಲಾಯಿಸು","Choose heading":"ಶೀರ್ಷಿಕೆ ಆಯ್ಕೆಮಾಡು",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"",Decimal:"","Decimal with leading zero":"","Dim grey":"",Disc:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"‍ಚಿತ್ರದ ಶೀರ್ಷಿಕೆ ಸೇರಿಸು","Full size image":"‍ಪೂರ್ಣ ‍‍ಅಳತೆಯ ಚಿತ್ರ",Green:"",Grey:"",Heading:"ಶೀರ್ಷಿಕೆ","Heading 1":"ಶೀರ್ಷಿಕೆ 1","Heading 2":"ಶೀರ್ಷಿಕೆ 2","Heading 3":"ಶೀರ್ಷಿಕೆ 3","Heading 4":"","Heading 5":"","Heading 6":"",HEX:"","Image resize list":"","Image toolbar":"","image widget":"‍ಚಿತ್ರ ವಿಜೆಟ್","In line":"",Insert:"","Insert image":"","Insert image via URL":"",Italic:"‍ಇಟಾಲಿಕ್","Left aligned image":"","Light blue":"","Light green":"","Light grey":"",Link:"‍ಕೊಂಡಿ","Link image":"","Link URL":"‍ಕೊಂಡಿ ಸಂಪರ್ಕಿಸು","List properties":"","Lower-latin":"","Lower–roman":"",Next:"","No results found":"","No searchable items":"","Numbered List":"‍ಸಂಖ್ಯೆಯ ಪಟ್ಟಿ‍","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"",Original:"",Paragraph:"ಪ್ಯಾರಾಗ್ರಾಫ್",Previous:"",Purple:"",Red:"",Redo:"‍ಮತ್ತೆ ಮಾಡು","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"‍ಸಮೃದ್ಧ ಪಠ್ಯ ಸಂಪಾದಕ‍‍","Right aligned image":"",Save:"ಉಳಿಸು","Show more items":"","Side image":"‍ಪಕ್ಕದ ಚಿತ್ರ",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Subscript:"",Superscript:"","Text alternative":"‍ಪಠ್ಯದ ಬದಲಿ","This link has no URL":"","To-do List":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"",Undo:"‍‍ರದ್ದು",Unlink:"‍ಕೊಂಡಿ ತೆಗೆ",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"",White:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ko.js b/public/static/plugs/ckeditor5/translations/ko.js
index d10e9218f..809083911 100644
--- a/public/static/plugs/ckeditor5/translations/ko.js
+++ b/public/static/plugs/ckeditor5/translations/ko.js
@@ -1 +1 @@
-!function(e){const t=e.ko=e.ko||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"수락","Align cell text to the bottom":"셀 텍스트를 아래로 정렬","Align cell text to the center":"셀 텍스트를 가로 가운데로 정렬","Align cell text to the left":"셀 텍스트를 왼쪽으로 정렬","Align cell text to the middle":"셀 텍스트를 세로 가운데로 정렬","Align cell text to the right":"셀 텍스트를 오른쪽으로 정렬","Align cell text to the top":"셀 텍스트를 위로 정렬","Align center":"가운데 정렬","Align left":"왼쪽 정렬","Align right":"오른쪽 정렬","Align table to the left":"테이블을 왼쪽으로 정렬","Align table to the right":"테이블을 오른쪽으로 정렬",Alignment:"정렬",Aquamarine:"연한 청록색",Background:"배경색",Big:"큰",Black:"검은색","Block quote":"인용 단락",Blue:"파랑색",Bold:"굵게",Border:"테두리","Break text":"텍스트 분리","Bulleted List":"불릿 목록","Bulleted list styles toolbar":"글머리 기호 목록 스타일 도구 모음",Cancel:"취소","Caption for image: %0":"이미지용 캡션: %0","Caption for the image":"이미지용 캡션","Cell properties":"셀 속성","Center table":"테이블을 가운데로 정렬","Centered image":"가운데 정렬","Change image text alternative":"대체 문구 변경","Choose heading":"제목 선택",Circle:"흰 원형",Clear:"지우기","Click to edit block":"클릭하여 블록 편집",Code:"코드",Color:"색","Color picker":"색상 선택기",Column:"열",Dashed:"파선",Decimal:"십진수","Decimal with leading zero":"앞에 0이 붙는 십진수","Decrease indent":"들여쓰기 줄이기",Default:"기본","Delete column":"열 삭제","Delete row":"행 삭제","Dim grey":"진한 회색",Dimensions:"크기",Disc:"검은 원형","Document colors":"문서 색깔들",Dotted:"점선",Double:"이중선",Downloadable:"다운로드 가능","Drag to move":"드래그하여 이동","Dropdown toolbar":"드롭다운 툴바","Edit block":"편집 영역","Edit link":"링크 편집","Editor block content toolbar":"편집기 영역 내용 툴바","Editor contextual toolbar":"편집기 문맥 툴바","Editor editing area: %0":"편집기 편집 영역: %0","Editor toolbar":"편집기 툴바","Enter image caption":"사진 설명을 입력하세요","Enter table caption":"테이블 캡션 입력","Font Background Color":"글자 배경 색깔","Font Color":"글자 색깔","Font Family":"글꼴 집합","Font Size":"글자 크기","Full size image":"꽉 찬 크기",Green:"초록색",Grey:"회색",Groove:"음각선","Header column":"헤더 열","Header row":"헤더 행",Heading:"제목","Heading 1":"제목 1","Heading 2":"제목 2","Heading 3":"제목 3","Heading 4":"제목 4","Heading 5":"제목 5","Heading 6":"제목 6",Height:"세로",HEX:"HEX","Horizontal line":"수평선","Horizontal text alignment toolbar":"가로 텍스트 정렬 도구 모음","HTML object":"HTML 오브젝트",Huge:"매우 큰","Image resize list":"사진 크기 목록","Image toolbar":"사진 툴바","image widget":"사진 위젯","In line":"줄 안에","Increase indent":"들여쓰기 늘리기",Insert:"삽입","Insert column left":"왼쪽에 열 삽입","Insert column right":"오른쪽에 열 삽입","Insert image":"사진 삽입","Insert image via URL":"URL로 이미지 삽입","Insert paragraph after block":"블록 뒤에 단락 삽입","Insert paragraph before block":"블록 앞에 단락 삽입","Insert row above":"위에 행 삽입","Insert row below":"아래에 행 삽입","Insert table":"테이블 삽입",Inset:"측면 음각선",Italic:"기울임꼴",Justify:"양쪽 정렬","Justify cell text":"셀 텍스트를 양쪽으로 정렬","Left aligned image":"왼쪽 정렬","Light blue":"연한 파랑색","Light green":"연한 초록색","Light grey":"밝은 회색",Link:"링크","Link image":"사진 링크","Link URL":"링크 주소","List properties":"목록 속성","Lower-latin":"소문자 알파벳","Lower–roman":"소문자 로마자","Merge cell down":"아래 셀과 병합","Merge cell left":"왼쪽 셀과 병합","Merge cell right":"오른쪽 셀과 병합","Merge cell up":"위 셀과 병합","Merge cells":"셀 병합",Next:"다음","No results found":"결과 찾을 수 없음","No searchable items":"검색 가능한 항목 없음",None:"선 없음","Numbered List":"번호 목록","Numbered list styles toolbar":"번호 목록 스타일 도구 모음","Open in a new tab":"새 탭에서 열기","Open link in new tab":"새 탭에서 링크 열기",Orange:"주황색",Original:"원본",Outset:"측면 양각선",Padding:"여백",Paragraph:"문단","Press Enter to type after or press Shift + Enter to type before the widget":"엔터를 눌러서 위젯 뒤에 입력하거나 시프트 + 엔터를 눌러서 위젯 앞에 입력하세요",Previous:"이전",Purple:"보라색",Red:"빨간색",Redo:"다시 실행","Remove color":"색깔 제거","Remove Format":"서식 지우기","Replace from computer":"컴퓨터에서 교체","Replace image":"이미지 교체","Replace image from computer":"컴퓨터에서 이미지 교체","Resize image":"사진 크기 조절","Resize image to %0":"사진의 크기를 %0으로 조절","Resize image to the original size":"사진을 원래 크기로 돌려놓기","Restore default":"기본값 복원","Reversed order":"역순","Rich Text Editor":"서식 있는 텍스트 편집기",Ridge:"양각선","Right aligned image":"오른쪽 정렬",Row:"행",Save:"저장","Select all":"전체 선택","Select column":"열 선택","Select row":"행 선택","Show more items":"더보기","Side image":"본문 옆에 배치",Small:"작은",Solid:"실선","Split cell horizontally":"가로로 셀 분할","Split cell vertically":"세로로 셀 분할",Square:"검은 사각형","Start at":"시작 번호","Start index must be greater than 0.":"시작 번호는 0보다 커야 합니다.",Strikethrough:"취소선",Style:"스타일",Subscript:"아래 첨자",Superscript:"위 첨자","Table alignment toolbar":"표 정렬 도구 모음","Table cell text alignment":"표 셀 텍스트 정렬","Table properties":"표 속성","Table toolbar":"표 도구 모음","Text alignment":"텍스트 정렬","Text alignment toolbar":"텍스트 정렬 툴바","Text alternative":"대체 문구",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'유효하지 않은 색입니다. "#FF0000"이나 "rgb(255,0,0)", 또는 "red"를 입력해 보세요.','The value is invalid. Try "10px" or "2em" or simply "2".':'유효하지 않은 값입니다. "10px"나 "2em" 또는 그냥 "2"를 입력해 보세요.',"This link has no URL":"이 주소에는 URL이 없습니다.",Tiny:"매우 작은","To-do List":"확인 목록","Toggle caption off":"캡션 지우기","Toggle caption on":"캡션 넣기","Toggle the circle list style":"검은 원형 목록 스타일 전환","Toggle the decimal list style":"십진수 목록 스타일 전환","Toggle the decimal with leading zero list style":"앞에 0이 붙는 십진수 목록 스타일 전환","Toggle the disc list style":"흰 원형 목록 스타일 전환","Toggle the lower–latin list style":"소문자 알파벳 목록 스타일 전환","Toggle the lower–roman list style":"소문자 로마자 목록 스타일 전환","Toggle the square list style":"검은 사각형 목록 스타일 전환","Toggle the upper–latin list style":"대문자 알파벳 목록 스타일 전환","Toggle the upper–roman list style":"대문자 로마자 목록 스타일 전환",Turquoise:"청록색","Type or paste your content here.":"여기에 내용을 입력하거나 붙여넣으세요.","Type your title":"제목을 입력해주세요",Underline:"밑줄",Undo:"실행 취소",Unlink:"링크 삭제",Update:"업데이트","Update image URL":"이미지 URL 업데이트","Upload failed":"업로드 실패","Upload from computer":"컴퓨터에서 업로드","Upload image from computer":"컴퓨터에서 이미지 업로드","Upload in progress":"업로드 진행 중","Upper-latin":"대문자 알파벳","Upper-roman":"대문자 로마자","Vertical text alignment toolbar":"세로 텍스트 정렬 도구 모음",White:"흰색","Widget toolbar":"위젯 툴바",Width:"가로","Wrap text":"텍스트 줄 바꿈",Yellow:"노랑색"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ko=e.ko||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"수락","Align cell text to the bottom":"셀 텍스트를 아래로 정렬","Align cell text to the center":"셀 텍스트를 가로 가운데로 정렬","Align cell text to the left":"셀 텍스트를 왼쪽으로 정렬","Align cell text to the middle":"셀 텍스트를 세로 가운데로 정렬","Align cell text to the right":"셀 텍스트를 오른쪽으로 정렬","Align cell text to the top":"셀 텍스트를 위로 정렬","Align center":"가운데 정렬","Align left":"왼쪽 정렬","Align right":"오른쪽 정렬","Align table to the left":"테이블을 왼쪽으로 정렬","Align table to the right":"테이블을 오른쪽으로 정렬",Alignment:"정렬",Aquamarine:"연한 청록색",Background:"배경색",Big:"큰",Black:"검은색","Block quote":"인용 단락",Blue:"파랑색",Bold:"굵게",Border:"테두리","Break text":"텍스트 분리","Bulleted List":"불릿 목록","Bulleted list styles toolbar":"글머리 기호 목록 스타일 도구 모음",Cancel:"취소","Caption for image: %0":"이미지용 캡션: %0","Caption for the image":"이미지용 캡션","Cell properties":"셀 속성","Center table":"테이블을 가운데로 정렬","Centered image":"가운데 정렬","Change image text alternative":"대체 문구 변경","Choose heading":"제목 선택",Circle:"흰 원형",Clear:"지우기","Click to edit block":"클릭하여 블록 편집",Close:"닫기",Code:"코드",Color:"색","Color picker":"색상 선택기",Column:"열",Dashed:"파선",Decimal:"십진수","Decimal with leading zero":"앞에 0이 붙는 십진수","Decrease indent":"들여쓰기 줄이기",Default:"기본","Delete column":"열 삭제","Delete row":"행 삭제","Dim grey":"진한 회색",Dimensions:"크기",Disc:"검은 원형","Document colors":"문서 색깔들",Dotted:"점선",Double:"이중선",Downloadable:"다운로드 가능","Drag to move":"드래그하여 이동","Dropdown toolbar":"드롭다운 툴바","Edit block":"편집 영역","Edit link":"링크 편집","Editor block content toolbar":"편집기 영역 내용 툴바","Editor contextual toolbar":"편집기 문맥 툴바","Editor dialog":"편집기 대화상자","Editor editing area: %0":"편집기 편집 영역: %0","Editor toolbar":"편집기 툴바","Enter image caption":"사진 설명을 입력하세요","Enter table caption":"테이블 캡션 입력","Font Background Color":"글자 배경 색깔","Font Color":"글자 색깔","Font Family":"글꼴 집합","Font Size":"글자 크기","Full size image":"꽉 찬 크기",Green:"초록색",Grey:"회색",Groove:"음각선","Header column":"헤더 열","Header row":"헤더 행",Heading:"제목","Heading 1":"제목 1","Heading 2":"제목 2","Heading 3":"제목 3","Heading 4":"제목 4","Heading 5":"제목 5","Heading 6":"제목 6",Height:"세로",HEX:"HEX","Horizontal line":"수평선","Horizontal text alignment toolbar":"가로 텍스트 정렬 도구 모음","HTML object":"HTML 오브젝트",Huge:"매우 큰","Image resize list":"사진 크기 목록","Image toolbar":"사진 툴바","image widget":"사진 위젯","In line":"줄 안에","Increase indent":"들여쓰기 늘리기",Insert:"삽입","Insert column left":"왼쪽에 열 삽입","Insert column right":"오른쪽에 열 삽입","Insert image":"사진 삽입","Insert image via URL":"URL로 이미지 삽입","Insert paragraph after block":"블록 뒤에 단락 삽입","Insert paragraph before block":"블록 앞에 단락 삽입","Insert row above":"위에 행 삽입","Insert row below":"아래에 행 삽입","Insert table":"테이블 삽입",Inset:"측면 음각선",Italic:"기울임꼴",Justify:"양쪽 정렬","Justify cell text":"셀 텍스트를 양쪽으로 정렬","Left aligned image":"왼쪽 정렬","Light blue":"연한 파랑색","Light green":"연한 초록색","Light grey":"밝은 회색",Link:"링크","Link image":"사진 링크","Link URL":"링크 주소","List properties":"목록 속성","Lower-latin":"소문자 알파벳","Lower–roman":"소문자 로마자","Merge cell down":"아래 셀과 병합","Merge cell left":"왼쪽 셀과 병합","Merge cell right":"오른쪽 셀과 병합","Merge cell up":"위 셀과 병합","Merge cells":"셀 병합",Next:"다음","No results found":"결과 찾을 수 없음","No searchable items":"검색 가능한 항목 없음",None:"선 없음","Numbered List":"번호 목록","Numbered list styles toolbar":"번호 목록 스타일 도구 모음","Open in a new tab":"새 탭에서 열기","Open link in new tab":"새 탭에서 링크 열기",Orange:"주황색",Original:"원본",Outset:"측면 양각선",Padding:"여백",Paragraph:"문단","Press Enter to type after or press Shift + Enter to type before the widget":"엔터를 눌러서 위젯 뒤에 입력하거나 시프트 + 엔터를 눌러서 위젯 앞에 입력하세요",Previous:"이전",Purple:"보라색",Red:"빨간색",Redo:"다시 실행","Remove color":"색깔 제거","Remove Format":"서식 지우기","Replace from computer":"컴퓨터에서 교체","Replace image":"이미지 교체","Replace image from computer":"컴퓨터에서 이미지 교체","Resize image":"사진 크기 조절","Resize image to %0":"사진의 크기를 %0으로 조절","Resize image to the original size":"사진을 원래 크기로 돌려놓기","Restore default":"기본값 복원","Reversed order":"역순","Rich Text Editor":"서식 있는 텍스트 편집기",Ridge:"양각선","Right aligned image":"오른쪽 정렬",Row:"행",Save:"저장","Select all":"전체 선택","Select column":"열 선택","Select row":"행 선택","Show more items":"더보기","Side image":"본문 옆에 배치",Small:"작은",Solid:"실선","Split cell horizontally":"가로로 셀 분할","Split cell vertically":"세로로 셀 분할",Square:"검은 사각형","Start at":"시작 번호","Start index must be greater than 0.":"시작 번호는 0보다 커야 합니다.",Strikethrough:"취소선",Style:"스타일",Subscript:"아래 첨자",Superscript:"위 첨자","Table alignment toolbar":"표 정렬 도구 모음","Table cell text alignment":"표 셀 텍스트 정렬","Table properties":"표 속성","Table toolbar":"표 도구 모음","Text alignment":"텍스트 정렬","Text alignment toolbar":"텍스트 정렬 툴바","Text alternative":"대체 문구",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'유효하지 않은 색입니다. "#FF0000"이나 "rgb(255,0,0)", 또는 "red"를 입력해 보세요.','The value is invalid. Try "10px" or "2em" or simply "2".':'유효하지 않은 값입니다. "10px"나 "2em" 또는 그냥 "2"를 입력해 보세요.',"This link has no URL":"이 주소에는 URL이 없습니다.",Tiny:"매우 작은","To-do List":"확인 목록","Toggle caption off":"캡션 지우기","Toggle caption on":"캡션 넣기","Toggle the circle list style":"검은 원형 목록 스타일 전환","Toggle the decimal list style":"십진수 목록 스타일 전환","Toggle the decimal with leading zero list style":"앞에 0이 붙는 십진수 목록 스타일 전환","Toggle the disc list style":"흰 원형 목록 스타일 전환","Toggle the lower–latin list style":"소문자 알파벳 목록 스타일 전환","Toggle the lower–roman list style":"소문자 로마자 목록 스타일 전환","Toggle the square list style":"검은 사각형 목록 스타일 전환","Toggle the upper–latin list style":"대문자 알파벳 목록 스타일 전환","Toggle the upper–roman list style":"대문자 로마자 목록 스타일 전환",Turquoise:"청록색","Type or paste your content here.":"여기에 내용을 입력하거나 붙여넣으세요.","Type your title":"제목을 입력해주세요",Underline:"밑줄",Undo:"실행 취소",Unlink:"링크 삭제",Update:"업데이트","Update image URL":"이미지 URL 업데이트","Upload failed":"업로드 실패","Upload from computer":"컴퓨터에서 업로드","Upload image from computer":"컴퓨터에서 이미지 업로드","Upload in progress":"업로드 진행 중","Upper-latin":"대문자 알파벳","Upper-roman":"대문자 로마자","Vertical text alignment toolbar":"세로 텍스트 정렬 도구 모음",White:"흰색","Widget toolbar":"위젯 툴바",Width:"가로","Wrap text":"텍스트 줄 바꿈",Yellow:"노랑색"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ku.js b/public/static/plugs/ckeditor5/translations/ku.js
index 125fc0ae8..b97480693 100644
--- a/public/static/plugs/ckeditor5/translations/ku.js
+++ b/public/static/plugs/ckeditor5/translations/ku.js
@@ -1 +1 @@
-!function(e){const t=e.ku=e.ku||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 لە %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"بەهێڵکردنی ناورەڕاست","Align left":"بەهێڵکردنی چەپ","Align right":"بەهێڵکردنی ڕاست","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"شینی دەریایی",Background:"",Big:"گەورە",Black:"ڕەش","Block quote":"وتەی وەرگیراو",Blue:"شین",Bold:"قەڵەو",Border:"","Break text":"","Bulleted List":"لیستەی خاڵەیی","Bulleted list styles toolbar":"",Cancel:"هەڵوەشاندنەوە","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"ناوەڕاستکراوی وێنە","Change image text alternative":"گۆڕینی جێگروەی تێکیسی وێنە","Choose heading":"سەرنووسە هەڵبژێرە",Circle:"",Clear:"","Click to edit block":"",Code:"کۆد",Color:"","Color picker":"",Column:"ستوون",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"کەمکردنەوەی بۆشایی",Default:"بنچینە","Delete column":"سڕینەوەی ستوون","Delete row":"سڕینەوەی ڕیز","Dim grey":"ڕەساسی تاریک",Dimensions:"",Disc:"","Document colors":"ڕەنگەکانی دۆکومێنت",Dotted:"",Double:"",Downloadable:"Downloadable","Drag to move":"","Dropdown toolbar":"تووڵامرازی لیستەیی","Edit block":"دەستکاری بلۆک","Edit link":"دەستکاری بەستەر","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"تووڵامرازی دەسکاریکەر","Enter image caption":"سەردێڕی وێنە دابنێ","Enter table caption":"","Font Background Color":"ڕەنگی پاشبنەمای فۆنت","Font Color":"ڕەنگی فۆنت","Font Family":"فۆنتی خێزانی","Font Size":"قەبارەی فۆنت","Full size image":"پڕ بەقەبارەی وێنە",Green:"سەوز",Grey:"ڕەساسی",Groove:"","Header column":"ستوونی دەسپێک","Header row":"ڕیزی دەسپێک",Heading:"سەرنووسە","Heading 1":"سەرنووسەی 1","Heading 2":"سەرنووسەی 2","Heading 3":"سەرنووسەی 3","Heading 4":"سەرنووسەی 4","Heading 5":"سەرنووسەی 5","Heading 6":"سەرنووسەی 6",Height:"",HEX:"","Horizontal line":"هێڵی ئاسۆیی","Horizontal text alignment toolbar":"",Huge:"زۆر گەورە","Image resize list":"","Image toolbar":"تووڵامرازی وێنە","image widget":"وێدجیتی وێنە","In line":"","Increase indent":"زیادکردنی بۆشایی",Insert:"","Insert column left":"دانانی ستوون لە چەپ","Insert column right":"دانانی ستوون لە ڕاست","Insert image":"وێنە دابنێ","Insert image via URL":"","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"دانانی ڕیز لە سەرەوە","Insert row below":"دانانی ڕیز لە ژێرەوە","Insert table":"خشتە دابنێ",Inset:"",Italic:"لار",Justify:"هاوستوونی","Justify cell text":"","Left aligned image":"ڕیزکردنی وێنە بۆ لای چەپ","Light blue":"شینی ڕووناک","Light green":"سەوزی ڕووناک","Light grey":"ڕەساسی ڕووناک",Link:"بەستەر","Link image":"","Link URL":"ناونیشانی بەستەر","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"تێکەڵکردنی خانەکان بەرەو ژێرەوە","Merge cell left":"تێکەڵکردنی خانەکان بەرەو چەپ","Merge cell right":"تێکەڵکردنی خانەکان بەرەو ڕاست","Merge cell up":"تێکەڵکردنی خانەکان بەرەو سەر","Merge cells":"تێکەڵکردنی خانەکان",Next:"دواتر","No results found":"","No searchable items":"",None:"","Numbered List":"لیستەی ژمارەیی","Numbered list styles toolbar":"","Open in a new tab":"کردنەوەی لە پەنجەرەیەکی نوێ","Open link in new tab":"کردنەوەی بەستەرەکە لە پەڕەیەکی نوێ",Orange:"پرتەقاڵی",Original:"",Outset:"",Padding:"",Paragraph:"پەراگراف","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"پێشتر",Purple:"مۆر",Red:"سور",Redo:"هەلگەڕاندنەوە","Remove color":"لابردنی ڕەنگ","Remove Format":"لابردنی شێواز","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"سەرنوسەری دەقی بەپیت",Ridge:"","Right aligned image":"ڕیزکردنی وێنە بۆ لای ڕاست",Row:"ڕیز",Save:"پاشکەوتکردن","Select column":"","Select row":"","Show more items":"بڕگەی زیاتر نیشانبدە","Side image":"لای وێنە",Small:"بچوک",Solid:"","Split cell horizontally":"بەشکردنی خانەکان بە ئاسۆیی","Split cell vertically":"بەشکردنی خانەکان بە ئەستوونی",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"هێڵ بەسەرداهاتوو",Style:"",Subscript:"ژێرنووس",Superscript:"سەرنووس","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"تووڵامرازی خشتە","Text alignment":"ڕیززکردنی تێکست","Text alignment toolbar":"تووڵامرازی ڕیززکردنی تێکست","Text alternative":"جێگرەوەی تێکست",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"ئەم بەستەرە ناونیشانی نیە",Tiny:"گچکە","To-do List":"لیستەی کردن","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"شینی ئاسمانی","Type or paste your content here.":"بنووسە یاخوود ناوەڕۆکی کۆپیکراو لیڕە بلکێنە","Type your title":"نوسینی ناونیشان",Underline:"ژێرهێڵ",Undo:"وەک خۆی لێ بکەوە",Unlink:"لابردنی بەستەر",Update:"","Update image URL":"","Upload failed":"بارکردنەکە سەرنەکەووت","Upload from computer":"","Upload image from computer":"","Upload in progress":"بارکردنەکە لە جێبەجێکردن دایە","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"سپی","Widget toolbar":"تووڵامرازی ویدجێت",Width:"","Wrap text":"",Yellow:"زەرد"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ku=e.ku||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 لە %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"بەهێڵکردنی ناورەڕاست","Align left":"بەهێڵکردنی چەپ","Align right":"بەهێڵکردنی ڕاست","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"شینی دەریایی",Background:"",Big:"گەورە",Black:"ڕەش","Block quote":"وتەی وەرگیراو",Blue:"شین",Bold:"قەڵەو",Border:"","Break text":"","Bulleted List":"لیستەی خاڵەیی","Bulleted list styles toolbar":"",Cancel:"هەڵوەشاندنەوە","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"ناوەڕاستکراوی وێنە","Change image text alternative":"گۆڕینی جێگروەی تێکیسی وێنە","Choose heading":"سەرنووسە هەڵبژێرە",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"کۆد",Color:"","Color picker":"",Column:"ستوون",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"کەمکردنەوەی بۆشایی",Default:"بنچینە","Delete column":"سڕینەوەی ستوون","Delete row":"سڕینەوەی ڕیز","Dim grey":"ڕەساسی تاریک",Dimensions:"",Disc:"","Document colors":"ڕەنگەکانی دۆکومێنت",Dotted:"",Double:"",Downloadable:"Downloadable","Drag to move":"","Dropdown toolbar":"تووڵامرازی لیستەیی","Edit block":"دەستکاری بلۆک","Edit link":"دەستکاری بەستەر","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"تووڵامرازی دەسکاریکەر","Enter image caption":"سەردێڕی وێنە دابنێ","Enter table caption":"","Font Background Color":"ڕەنگی پاشبنەمای فۆنت","Font Color":"ڕەنگی فۆنت","Font Family":"فۆنتی خێزانی","Font Size":"قەبارەی فۆنت","Full size image":"پڕ بەقەبارەی وێنە",Green:"سەوز",Grey:"ڕەساسی",Groove:"","Header column":"ستوونی دەسپێک","Header row":"ڕیزی دەسپێک",Heading:"سەرنووسە","Heading 1":"سەرنووسەی 1","Heading 2":"سەرنووسەی 2","Heading 3":"سەرنووسەی 3","Heading 4":"سەرنووسەی 4","Heading 5":"سەرنووسەی 5","Heading 6":"سەرنووسەی 6",Height:"",HEX:"","Horizontal line":"هێڵی ئاسۆیی","Horizontal text alignment toolbar":"",Huge:"زۆر گەورە","Image resize list":"","Image toolbar":"تووڵامرازی وێنە","image widget":"وێدجیتی وێنە","In line":"","Increase indent":"زیادکردنی بۆشایی",Insert:"","Insert column left":"دانانی ستوون لە چەپ","Insert column right":"دانانی ستوون لە ڕاست","Insert image":"وێنە دابنێ","Insert image via URL":"","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"دانانی ڕیز لە سەرەوە","Insert row below":"دانانی ڕیز لە ژێرەوە","Insert table":"خشتە دابنێ",Inset:"",Italic:"لار",Justify:"هاوستوونی","Justify cell text":"","Left aligned image":"ڕیزکردنی وێنە بۆ لای چەپ","Light blue":"شینی ڕووناک","Light green":"سەوزی ڕووناک","Light grey":"ڕەساسی ڕووناک",Link:"بەستەر","Link image":"","Link URL":"ناونیشانی بەستەر","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"تێکەڵکردنی خانەکان بەرەو ژێرەوە","Merge cell left":"تێکەڵکردنی خانەکان بەرەو چەپ","Merge cell right":"تێکەڵکردنی خانەکان بەرەو ڕاست","Merge cell up":"تێکەڵکردنی خانەکان بەرەو سەر","Merge cells":"تێکەڵکردنی خانەکان",Next:"دواتر","No results found":"","No searchable items":"",None:"","Numbered List":"لیستەی ژمارەیی","Numbered list styles toolbar":"","Open in a new tab":"کردنەوەی لە پەنجەرەیەکی نوێ","Open link in new tab":"کردنەوەی بەستەرەکە لە پەڕەیەکی نوێ",Orange:"پرتەقاڵی",Original:"",Outset:"",Padding:"",Paragraph:"پەراگراف","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"پێشتر",Purple:"مۆر",Red:"سور",Redo:"هەلگەڕاندنەوە","Remove color":"لابردنی ڕەنگ","Remove Format":"لابردنی شێواز","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"سەرنوسەری دەقی بەپیت",Ridge:"","Right aligned image":"ڕیزکردنی وێنە بۆ لای ڕاست",Row:"ڕیز",Save:"پاشکەوتکردن","Select column":"","Select row":"","Show more items":"بڕگەی زیاتر نیشانبدە","Side image":"لای وێنە",Small:"بچوک",Solid:"","Split cell horizontally":"بەشکردنی خانەکان بە ئاسۆیی","Split cell vertically":"بەشکردنی خانەکان بە ئەستوونی",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"هێڵ بەسەرداهاتوو",Style:"",Subscript:"ژێرنووس",Superscript:"سەرنووس","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"تووڵامرازی خشتە","Text alignment":"ڕیززکردنی تێکست","Text alignment toolbar":"تووڵامرازی ڕیززکردنی تێکست","Text alternative":"جێگرەوەی تێکست",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"ئەم بەستەرە ناونیشانی نیە",Tiny:"گچکە","To-do List":"لیستەی کردن","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"شینی ئاسمانی","Type or paste your content here.":"بنووسە یاخوود ناوەڕۆکی کۆپیکراو لیڕە بلکێنە","Type your title":"نوسینی ناونیشان",Underline:"ژێرهێڵ",Undo:"وەک خۆی لێ بکەوە",Unlink:"لابردنی بەستەر",Update:"","Update image URL":"","Upload failed":"بارکردنەکە سەرنەکەووت","Upload from computer":"","Upload image from computer":"","Upload in progress":"بارکردنەکە لە جێبەجێکردن دایە","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"سپی","Widget toolbar":"تووڵامرازی ویدجێت",Width:"","Wrap text":"",Yellow:"زەرد"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/lt.js b/public/static/plugs/ckeditor5/translations/lt.js
index 987a6dd3c..4ef8ab8a7 100644
--- a/public/static/plugs/ckeditor5/translations/lt.js
+++ b/public/static/plugs/ckeditor5/translations/lt.js
@@ -1 +1 @@
-!function(i){const e=i.lt=i.lt||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 iš %1",Accept:"Priimti","Align cell text to the bottom":"Lygiuoti langelio tekstą apačioje","Align cell text to the center":"Lygiuoti langelio tekstą centre","Align cell text to the left":"Lygiuoti langelio tekstą kairėje","Align cell text to the middle":"Lygiuoti langelio tekstą viduryje","Align cell text to the right":"Lygiuoti langelio tekstą dešinėje","Align cell text to the top":"Lygiuoti langelio tekstą viršuje","Align center":"Centruoti","Align left":"Lygiuoti į kairę","Align right":"Lygiuoti į dešinę","Align table to the left":"Lygiuoti lentelę kairėje","Align table to the right":"Lygiuoti lentelę dešinėje",Alignment:"Lygiavimas",Aquamarine:"Aquamarine",Background:"Fonas",Big:"Didelis",Black:"Juoda","Block quote":"Citata",Blue:"Mėlyna",Bold:"Paryškintas",Border:"Kraštas","Break text":"Suskaidyti tekstą","Bulleted List":"Sąrašas","Bulleted list styles toolbar":"Ženklinto sąrašo stilių įrankių juosta",Cancel:"Atšaukti","Caption for image: %0":"Vaizdo antraštė: %0","Caption for the image":"Vaizdo antraštė","Cell properties":"Langelio savybės","Center table":"Centruoti lentelę","Centered image":"Vaizdas centre","Change image text alternative":"Pakeisti vaizdo alternatyvųjį tekstą","Choose heading":"Pasirinkite antraštę",Circle:"Apskritimas",Clear:"Išvalyti","Click to edit block":"Spustelėkite norėdami redaguoti bloką",Code:"Kodas",Color:"Spalva","Color picker":"Spalvos ieškiklis",Column:"Stulpelis",Dashed:"Brūkšneliais",Decimal:"Dešimtainis","Decimal with leading zero":"Dešimtainis su nuliu priekyje","Decrease indent":"Sumažinti atitraukimą",Default:"Numatyta","Delete column":"Ištrinti stulpelį","Delete row":"Ištrinti eilutę","Dim grey":"Pilkšva",Dimensions:"Matmenys",Disc:"Diskas","Document colors":"Dokumento spalvos",Dotted:"Taškuotas",Double:"Dvigubas",Downloadable:"Parsisiunčiamas","Drag to move":"Vilkite, kad perkeltumėte","Dropdown toolbar":"Įrankių juosta pasirenkamajame sąraše","Edit block":"Redaguoti bloką","Edit link":"Keisti nuorodą","Editor block content toolbar":"Redaktoriaus bloko turinio įrankių juosta","Editor contextual toolbar":"Redaktoriaus kontekstinė įrankių juosta","Editor editing area: %0":"Redaktoriaus redagavimo sritis: %0","Editor toolbar":"Redaktoriaus įrankių juosta","Enter image caption":"Įveskite vaizdo antraštę","Enter table caption":"Įvesti lentelės antraštę","Font Background Color":"Šrifto fono spalva","Font Color":"Šrifto spalva","Font Family":"Šrifto šeima","Font Size":"Šrifto dydis","Full size image":"Pilno dydžio vaizdas",Green:"Žalia",Grey:"Pilka",Groove:"Ilgas ir siauras","Header column":"Antraštės stulpelis","Header row":"Antraštės eilutė",Heading:"Antraštė","Heading 1":"Antraštė 1","Heading 2":"Antraštė 2","Heading 3":"Antraštė 3","Heading 4":"Antraštė 4","Heading 5":"Antraštė 5","Heading 6":"Antraštė 6",Height:"Aukštis",HEX:"Šešioliktainė reikšmė (angl. HEX)","Horizontal line":"Horizontali linija","Horizontal text alignment toolbar":"Horizontalaus teksto lygiavimo įrankių juosta","HTML object":"HTML object",Huge:"Milžiniškas","Image resize list":"Paveikslėlio dydžio keitimo sąrašas","Image toolbar":"Paveikslėlių įrankių juosta","image widget":"vaizdų valdiklis","In line":"tolygiai","Increase indent":"Padidinti atitraukimą",Insert:"Įkelti","Insert column left":"Įterpti stulpelį kairėje","Insert column right":"Įterpti stulpelį dešinėje","Insert image":"Įterpti vaizdą","Insert image via URL":"Įkelti paveikslėlį naudojant URL","Insert paragraph after block":"Įkelti pastraipą po bloko","Insert paragraph before block":"Įkelti pastraipą prieš bloką","Insert row above":"Įterpti eilutę aukščiau","Insert row below":"Įterpti eilutę žemiau","Insert table":"Įterpti lentelę",Inset:"Intarpas",Italic:"Kursyvas",Justify:"Lygiuoti per visą plotį","Justify cell text":"Pabrėžti langelio tekstą","Left aligned image":"Vaizdas kairėje","Light blue":"Šviesiai mėlyna","Light green":"Šviesiai žalia","Light grey":"Šviesiai pilka",Link:"Pridėti nuorodą","Link image":"Susieti paveikslėlį","Link URL":"Nuorodos URL","List properties":"Vardyti ypatybes","Lower-latin":"žemesnysis-lotyniškas","Lower–roman":"žemesnysis-romėniškas","Merge cell down":"Prijungti langelį apačioje","Merge cell left":"Prijungti langelį kairėje","Merge cell right":"Prijungti langelį dešinėje","Merge cell up":"Prijungti langelį viršuje","Merge cells":"Sujungti langelius",Next:"Kitas","No results found":"Nieko nerasta","No searchable items":"Nėra paieškos elementų",None:"Nieko","Numbered List":"Numeruotas rąrašas","Numbered list styles toolbar":"Numeruoto sąrašo stilių įrankių juosta","Open in a new tab":"Atverti naujoje kortelėje","Open link in new tab":"Atidaryti nuorodą naujame skirtuke",Orange:"Oranžinė",Original:"Originalus",Outset:"Pradžia",Padding:"Užpildymas",Paragraph:"Paragrafas","Press Enter to type after or press Shift + Enter to type before the widget":"Paspauskite Enter, jei norite rašyti po valdiklio, arba paspauskite Shift + Enter, jei norite rašyti prieš valdiklį.",Previous:"Buvęs",Purple:"Violetinė",Red:"Raudona",Redo:"Pirmyn","Remove color":"Pašalinti spalvą","Remove Format":"Naikinti formatavimą","Replace from computer":"Pakeisti iš kompiuterio","Replace image":"Pakeisti vaizdą","Replace image from computer":"Pakeisti paveiksliuką iš kompiuterio","Resize image":"Pakeisti paveikslėlio dydį","Resize image to %0":"Pakeisti paveikslėlio dydį į %0","Resize image to the original size":"Pakeisti paveikslėlio dydį į originalų","Restore default":"Atkurti numatytuosius","Reversed order":"Atvirkštinė tvarka","Rich Text Editor":"Raiškiojo teksto redaktorius",Ridge:"Briaunuotas","Right aligned image":"Vaizdas dešinėje",Row:"Eilutė",Save:"Išsaugoti","Select all":"Pasirinkti viską","Select column":"Pasirinkti stulpelį","Select row":"Pasirinkti eilutę","Show more items":"Rodyti daugiau elementų","Side image":"Vaizdas šone",Small:"Mažas",Solid:"Vientisas","Split cell horizontally":"Padalinti langelį horizontaliai","Split cell vertically":"Padalinti langelį vertikaliai",Square:"Kvadratas","Start at":"Pradėti nuo","Start index must be greater than 0.":"Pradžios indeksas turi būti didesnis nei 0.",Strikethrough:"Perbrauktas",Style:"Stilius",Subscript:"Žemiau",Superscript:"Aukščiau","Table alignment toolbar":"Teksto lygiavimo įrankių juosta","Table cell text alignment":"Lentelės langelio teksto lygiavimas","Table properties":"Lentelės savybės","Table toolbar":"Lentelės įrankių juosta","Text alignment":"Teksto lygiavimas","Text alignment toolbar":"Teksto lygiavimo įrankių juosta","Text alternative":"Alternatyvusis tekstas",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Spalva neteisinga. Mėginkite "#FF0000" arba "rgb(255,0,0)" arba "raudona".','The value is invalid. Try "10px" or "2em" or simply "2".':'Reikšmė neteisinga. Mėginkite "10px" arba "2em", ar paprasčiausiai "2".',"This link has no URL":"Ši nuorda neturi URL",Tiny:"Mažytis","To-do List":"Užduočių sąrašas","Toggle caption off":"Išjungti antraštę","Toggle caption on":"Įjungti antraštę","Toggle the circle list style":"Perjungti ovalų sąrašo stilių","Toggle the decimal list style":"Perjungti dešimtainį sąrašo stilių","Toggle the decimal with leading zero list style":"Perjungti dešimtainį sąrašo su nuliu priekyje stilių","Toggle the disc list style":"Perjungti diskinį sąrašo stilių","Toggle the lower–latin list style":"Perjungti žemesnįjį lotyniško stiliaus sąrašą","Toggle the lower–roman list style":"Perjungti žemesnįjį romėniško stiliaus sąrašą","Toggle the square list style":"Perjungti kvadratinį sąrašo stilių","Toggle the upper–latin list style":"Perjungti aukštesnįjį lotyniško stiliaus sąrašą","Toggle the upper–roman list style":"Perjungti aukštesnįjį romėniško stiliaus sąrašą",Turquoise:"Turkio","Type or paste your content here.":"Rašykite ar įkopijuokite turinį čia.","Type your title":"Įveskite savo pavadinimą",Underline:"Pabrauktas",Undo:"Atgal",Unlink:"Pašalinti nuorodą",Update:"Atnaujinti","Update image URL":"Atnaujinti paveikslėlio URL","Upload failed":"Įkelti nepavyko","Upload from computer":"Įkelti iš kompiuterio","Upload image from computer":"Įkelti paveiksliuką iš kompiuterio","Upload in progress":"Įkelima","Upper-latin":"Viršutinis romėniškas","Upper-roman":"Viršutinis romėniškas","Vertical text alignment toolbar":"Vertikalaus teksto lygiavimo įrankių juosta",White:"Balta","Widget toolbar":"Valdiklių įrankių juosta",Width:"Plotis","Wrap text":"Perkelti tekstą į kitą eilutę",Yellow:"Geltona"}),e.getPluralForm=function(i){return i%10==1&&(i%100>19||i%100<11)?0:i%10>=2&&i%10<=9&&(i%100>19||i%100<11)?1:i%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(i){const e=i.lt=i.lt||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 iš %1",Accept:"Priimti","Align cell text to the bottom":"Lygiuoti langelio tekstą apačioje","Align cell text to the center":"Lygiuoti langelio tekstą centre","Align cell text to the left":"Lygiuoti langelio tekstą kairėje","Align cell text to the middle":"Lygiuoti langelio tekstą viduryje","Align cell text to the right":"Lygiuoti langelio tekstą dešinėje","Align cell text to the top":"Lygiuoti langelio tekstą viršuje","Align center":"Centruoti","Align left":"Lygiuoti į kairę","Align right":"Lygiuoti į dešinę","Align table to the left":"Lygiuoti lentelę kairėje","Align table to the right":"Lygiuoti lentelę dešinėje",Alignment:"Lygiavimas",Aquamarine:"Aquamarine",Background:"Fonas",Big:"Didelis",Black:"Juoda","Block quote":"Citata",Blue:"Mėlyna",Bold:"Paryškintas",Border:"Kraštas","Break text":"Suskaidyti tekstą","Bulleted List":"Sąrašas","Bulleted list styles toolbar":"Ženklinto sąrašo stilių įrankių juosta",Cancel:"Atšaukti","Caption for image: %0":"Vaizdo antraštė: %0","Caption for the image":"Vaizdo antraštė","Cell properties":"Langelio savybės","Center table":"Centruoti lentelę","Centered image":"Vaizdas centre","Change image text alternative":"Pakeisti vaizdo alternatyvųjį tekstą","Choose heading":"Pasirinkite antraštę",Circle:"Apskritimas",Clear:"Išvalyti","Click to edit block":"Spustelėkite norėdami redaguoti bloką",Close:"Uždaryti",Code:"Kodas",Color:"Spalva","Color picker":"Spalvos ieškiklis",Column:"Stulpelis",Dashed:"Brūkšneliais",Decimal:"Dešimtainis","Decimal with leading zero":"Dešimtainis su nuliu priekyje","Decrease indent":"Sumažinti atitraukimą",Default:"Numatyta","Delete column":"Ištrinti stulpelį","Delete row":"Ištrinti eilutę","Dim grey":"Pilkšva",Dimensions:"Matmenys",Disc:"Diskas","Document colors":"Dokumento spalvos",Dotted:"Taškuotas",Double:"Dvigubas",Downloadable:"Parsisiunčiamas","Drag to move":"Vilkite, kad perkeltumėte","Dropdown toolbar":"Įrankių juosta pasirenkamajame sąraše","Edit block":"Redaguoti bloką","Edit link":"Keisti nuorodą","Editor block content toolbar":"Redaktoriaus bloko turinio įrankių juosta","Editor contextual toolbar":"Redaktoriaus kontekstinė įrankių juosta","Editor dialog":"Redaktoriaus dialogo langas","Editor editing area: %0":"Redaktoriaus redagavimo sritis: %0","Editor toolbar":"Redaktoriaus įrankių juosta","Enter image caption":"Įveskite vaizdo antraštę","Enter table caption":"Įvesti lentelės antraštę","Font Background Color":"Šrifto fono spalva","Font Color":"Šrifto spalva","Font Family":"Šrifto šeima","Font Size":"Šrifto dydis","Full size image":"Pilno dydžio vaizdas",Green:"Žalia",Grey:"Pilka",Groove:"Ilgas ir siauras","Header column":"Antraštės stulpelis","Header row":"Antraštės eilutė",Heading:"Antraštė","Heading 1":"Antraštė 1","Heading 2":"Antraštė 2","Heading 3":"Antraštė 3","Heading 4":"Antraštė 4","Heading 5":"Antraštė 5","Heading 6":"Antraštė 6",Height:"Aukštis",HEX:"Šešioliktainė reikšmė (angl. HEX)","Horizontal line":"Horizontali linija","Horizontal text alignment toolbar":"Horizontalaus teksto lygiavimo įrankių juosta","HTML object":"HTML object",Huge:"Milžiniškas","Image resize list":"Paveikslėlio dydžio keitimo sąrašas","Image toolbar":"Paveikslėlių įrankių juosta","image widget":"vaizdų valdiklis","In line":"tolygiai","Increase indent":"Padidinti atitraukimą",Insert:"Įkelti","Insert column left":"Įterpti stulpelį kairėje","Insert column right":"Įterpti stulpelį dešinėje","Insert image":"Įterpti vaizdą","Insert image via URL":"Įkelti paveikslėlį naudojant URL","Insert paragraph after block":"Įkelti pastraipą po bloko","Insert paragraph before block":"Įkelti pastraipą prieš bloką","Insert row above":"Įterpti eilutę aukščiau","Insert row below":"Įterpti eilutę žemiau","Insert table":"Įterpti lentelę",Inset:"Intarpas",Italic:"Kursyvas",Justify:"Lygiuoti per visą plotį","Justify cell text":"Pabrėžti langelio tekstą","Left aligned image":"Vaizdas kairėje","Light blue":"Šviesiai mėlyna","Light green":"Šviesiai žalia","Light grey":"Šviesiai pilka",Link:"Pridėti nuorodą","Link image":"Susieti paveikslėlį","Link URL":"Nuorodos URL","List properties":"Vardyti ypatybes","Lower-latin":"žemesnysis-lotyniškas","Lower–roman":"žemesnysis-romėniškas","Merge cell down":"Prijungti langelį apačioje","Merge cell left":"Prijungti langelį kairėje","Merge cell right":"Prijungti langelį dešinėje","Merge cell up":"Prijungti langelį viršuje","Merge cells":"Sujungti langelius",Next:"Kitas","No results found":"Nieko nerasta","No searchable items":"Nėra paieškos elementų",None:"Nieko","Numbered List":"Numeruotas rąrašas","Numbered list styles toolbar":"Numeruoto sąrašo stilių įrankių juosta","Open in a new tab":"Atverti naujoje kortelėje","Open link in new tab":"Atidaryti nuorodą naujame skirtuke",Orange:"Oranžinė",Original:"Originalus",Outset:"Pradžia",Padding:"Užpildymas",Paragraph:"Paragrafas","Press Enter to type after or press Shift + Enter to type before the widget":"Paspauskite Enter, jei norite rašyti po valdiklio, arba paspauskite Shift + Enter, jei norite rašyti prieš valdiklį.",Previous:"Buvęs",Purple:"Violetinė",Red:"Raudona",Redo:"Pirmyn","Remove color":"Pašalinti spalvą","Remove Format":"Naikinti formatavimą","Replace from computer":"Pakeisti iš kompiuterio","Replace image":"Pakeisti vaizdą","Replace image from computer":"Pakeisti paveiksliuką iš kompiuterio","Resize image":"Pakeisti paveikslėlio dydį","Resize image to %0":"Pakeisti paveikslėlio dydį į %0","Resize image to the original size":"Pakeisti paveikslėlio dydį į originalų","Restore default":"Atkurti numatytuosius","Reversed order":"Atvirkštinė tvarka","Rich Text Editor":"Raiškiojo teksto redaktorius",Ridge:"Briaunuotas","Right aligned image":"Vaizdas dešinėje",Row:"Eilutė",Save:"Išsaugoti","Select all":"Pasirinkti viską","Select column":"Pasirinkti stulpelį","Select row":"Pasirinkti eilutę","Show more items":"Rodyti daugiau elementų","Side image":"Vaizdas šone",Small:"Mažas",Solid:"Vientisas","Split cell horizontally":"Padalinti langelį horizontaliai","Split cell vertically":"Padalinti langelį vertikaliai",Square:"Kvadratas","Start at":"Pradėti nuo","Start index must be greater than 0.":"Pradžios indeksas turi būti didesnis nei 0.",Strikethrough:"Perbrauktas",Style:"Stilius",Subscript:"Žemiau",Superscript:"Aukščiau","Table alignment toolbar":"Teksto lygiavimo įrankių juosta","Table cell text alignment":"Lentelės langelio teksto lygiavimas","Table properties":"Lentelės savybės","Table toolbar":"Lentelės įrankių juosta","Text alignment":"Teksto lygiavimas","Text alignment toolbar":"Teksto lygiavimo įrankių juosta","Text alternative":"Alternatyvusis tekstas",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Spalva neteisinga. Mėginkite "#FF0000" arba "rgb(255,0,0)" arba "raudona".','The value is invalid. Try "10px" or "2em" or simply "2".':'Reikšmė neteisinga. Mėginkite "10px" arba "2em", ar paprasčiausiai "2".',"This link has no URL":"Ši nuorda neturi URL",Tiny:"Mažytis","To-do List":"Užduočių sąrašas","Toggle caption off":"Išjungti antraštę","Toggle caption on":"Įjungti antraštę","Toggle the circle list style":"Perjungti ovalų sąrašo stilių","Toggle the decimal list style":"Perjungti dešimtainį sąrašo stilių","Toggle the decimal with leading zero list style":"Perjungti dešimtainį sąrašo su nuliu priekyje stilių","Toggle the disc list style":"Perjungti diskinį sąrašo stilių","Toggle the lower–latin list style":"Perjungti žemesnįjį lotyniško stiliaus sąrašą","Toggle the lower–roman list style":"Perjungti žemesnįjį romėniško stiliaus sąrašą","Toggle the square list style":"Perjungti kvadratinį sąrašo stilių","Toggle the upper–latin list style":"Perjungti aukštesnįjį lotyniško stiliaus sąrašą","Toggle the upper–roman list style":"Perjungti aukštesnįjį romėniško stiliaus sąrašą",Turquoise:"Turkio","Type or paste your content here.":"Rašykite ar įkopijuokite turinį čia.","Type your title":"Įveskite savo pavadinimą",Underline:"Pabrauktas",Undo:"Atgal",Unlink:"Pašalinti nuorodą",Update:"Atnaujinti","Update image URL":"Atnaujinti paveikslėlio URL","Upload failed":"Įkelti nepavyko","Upload from computer":"Įkelti iš kompiuterio","Upload image from computer":"Įkelti paveiksliuką iš kompiuterio","Upload in progress":"Įkelima","Upper-latin":"Viršutinis romėniškas","Upper-roman":"Viršutinis romėniškas","Vertical text alignment toolbar":"Vertikalaus teksto lygiavimo įrankių juosta",White:"Balta","Widget toolbar":"Valdiklių įrankių juosta",Width:"Plotis","Wrap text":"Perkelti tekstą į kitą eilutę",Yellow:"Geltona"}),e.getPluralForm=function(i){return i%10==1&&(i%100>19||i%100<11)?0:i%10>=2&&i%10<=9&&(i%100>19||i%100<11)?1:i%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/lv.js b/public/static/plugs/ckeditor5/translations/lv.js
index f3d927237..0b92d6da8 100644
--- a/public/static/plugs/ckeditor5/translations/lv.js
+++ b/public/static/plugs/ckeditor5/translations/lv.js
@@ -1 +1 @@
-!function(t){const e=t.lv=t.lv||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 no %1",Accept:"Apstiprināt","Align cell text to the bottom":"Līdzināt šūnas tekstu pie apakšas","Align cell text to the center":"Līdzināt šūnas tekstu centrā","Align cell text to the left":"Līdzināt šūnas tekstu pa kreisi","Align cell text to the middle":"Līdzināt šūnas tekstu vidū","Align cell text to the right":"Līdzināt šūnas tekstu pa labi","Align cell text to the top":"Līdzināt šūnas tekstu pie augšas","Align center":"Centrēt","Align left":"Pa kreisi","Align right":"Pa labi","Align table to the left":"Līdzināt tabulu pa kreisi","Align table to the right":"Līdzināt tabulu pa labi",Alignment:"Novietojums",Aquamarine:"Akvamarīns",Background:"Fona krāsa",Big:"Liels",Black:"Melns","Block quote":"Citāts",Blue:"Zils",Bold:"Trekns",Border:"Apmale","Break text":"Pārtraukt tekstu","Bulleted List":"Nenumurēts Saraksts","Bulleted list styles toolbar":"Nenumurēta saraksta stili",Cancel:"Atcelt","Caption for image: %0":"Attēla virsraksts: %0","Caption for the image":"Attēla virsraksts","Cell properties":"Šūnas īpašības","Center table":"Centrēt tabulu","Centered image":"Centrēts attēls","Change image text alternative":"Mainīt attēla alternatīvo tekstu","Choose heading":"Izvēlēties virsrakstu",Circle:"Aplis",Clear:"Notīrīt","Click to edit block":"Noklikšķiniet, lai rediģētu sadaļu",Code:"Kods",Color:"Teksta krāsa","Color picker":"Krāsu palete",Column:"Kolonna",Dashed:"Pārtraukta līnija",Decimal:"Cipari","Decimal with leading zero":"Decimālskaitļi sākot ar nulli","Decrease indent":"Samazināt atkāpi",Default:"Noklusējuma","Delete column":"Dzēst kolonnu","Delete row":"Dzēst rindu","Dim grey":"Blāvi pelēks",Dimensions:"Izmēri",Disc:"Disks","Document colors":"Krāsas dokumentā",Dotted:"Punktēta līnija",Double:"Dubulta līnija",Downloadable:"Lejupielādējams","Drag to move":"Velciet, lai pārvietotu","Dropdown toolbar":"Papildus izvēlnes rīkjosla","Edit block":"Labot bloku","Edit link":"Labot Saiti","Editor block content toolbar":"Rediģēšanas bloka satura rīkjosla","Editor contextual toolbar":"Redaktora konteksta rīkjosla","Editor editing area: %0":"Redaktora rediģēšanas zona: %0","Editor toolbar":"Redaktora rīkjosla","Enter image caption":"Ievadiet attēla parakstu","Enter table caption":"Ievadiet tabulas parakstu","Font Background Color":"Fonta fona krāsa","Font Color":"Fonta krāsa","Font Family":"Fonts","Font Size":"Fonta Lielums","Full size image":"Pilna izmēra attēls",Green:"Zaļš",Grey:"Pelēks",Groove:"Iespiesta līnija","Header column":"Šī kolonna ir galvene","Header row":"Šī rinda ir galvene",Heading:"Virsraksts","Heading 1":"Virsraksts 1","Heading 2":"Virsraksts 2","Heading 3":"Virsraksts 3","Heading 4":"Virsraksts 4","Heading 5":"Virsraksts 5","Heading 6":"Virsraksts 6",Height:"Augstums",HEX:"HEX Krāsu kods","Horizontal line":"Horizontāli atdalošā līnija","Horizontal text alignment toolbar":"Horizontāla teksta līdzināšana","HTML object":"HTML objekts",Huge:"Milzīgs","Image resize list":"Attēla izmēru saraksts","Image toolbar":"Attēlu rīkjosla","image widget":"attēla sīkrīks","In line":"Rindā","Increase indent":"Palielināt atkāpi",Insert:"Ievietot","Insert column left":"Ievietot kolonnu pa kreisi","Insert column right":"Ievietot kolonnu pa labi","Insert image":"Ievietot attēlu","Insert image via URL":"Ievietot attēlu, izmantojot saiti","Insert paragraph after block":"Ievietot paragrāfu aiz bloka","Insert paragraph before block":"Ievietot paragrāfu pirms bloka","Insert row above":"Ievietot rindu virs","Insert row below":"Ievietot rindu zem","Insert table":"Ievietot tabulu",Inset:"Ievietot / ieliktnis",Italic:"Kursīvs",Justify:"Izlīdzināt abas malas","Justify cell text":"Taisnot šūnas tekstu","Left aligned image":"Pa kreisi līdzināts attēls","Light blue":"Gaiši zils","Light green":"Gaiši zaļš","Light grey":"Gaiši pelēks",Link:"Saite","Link image":"Ievietot saiti uz attēla","Link URL":"Saites URL","List properties":"saraksta detaļas","Lower-latin":"mazie latīņu burti","Lower–roman":"mazie romiešu burti","Merge cell down":"Apvienot šūnas uz leju","Merge cell left":"Apvienot šūnas pa kreisi","Merge cell right":"Apvienot šūnas pa labi","Merge cell up":"Apvienot šūnas uz augšu","Merge cells":"Apvienot šūnas",Next:"Nākamā","No results found":"Nekas nav atrasts","No searchable items":"Nav meklējamu vienumu",None:"Bez apmales","Numbered List":"Numurēts Saraksts","Numbered list styles toolbar":"Numurēta saraksta stili","Open in a new tab":"Atvērt jaunā cilnē","Open link in new tab":"Atvērt saiti jaunā cilnē",Orange:"Oranžs",Original:"Oriģināls",Outset:"sākums",Padding:"Atstatums",Paragraph:"Paragrāfs","Press Enter to type after or press Shift + Enter to type before the widget":"Nospiediet taustiņu Enter, lai rakstītu aiz logrīka, vai nospiediet taustiņu Shift + Enter, lai rakstītu pirms logrīka",Previous:"Iepriekšējā",Purple:"Violets",Red:"Sarkans",Redo:"Uz priekšu","Remove color":"Noņemt krāsu","Remove Format":"Noņemt formatējumu","Replace from computer":"Aizvietot no datora","Replace image":"Aizstāt attēlu","Replace image from computer":"Aizstāt attēlu no datora","Resize image":"Mainīt attēla izmērus","Resize image to %0":"Mainīt attēla izmēru uz %0","Resize image to the original size":"Mainīt attēla izmēru uz oriģinālo izmēru","Restore default":"Atgriezt noklusējumu","Reversed order":"Pretēja secība","Rich Text Editor":"Bagātinātais Teksta Redaktors",Ridge:"Izcelta līnija","Right aligned image":"Pa labi līdzināts attēls",Row:"Rinda",Save:"Saglabāt","Select all":"Izvēlēties visu","Select column":"Izvēlēties kolonnu","Select row":"Izvēlēties rindu","Show more items":"Parādīt vairāk vienumus","Side image":"Sānā novietots attēls",Small:"Mazs",Solid:"Nepārtraukta līnija","Split cell horizontally":"Atdalīt šūnu horizontāli","Split cell vertically":"Atdalīt šūnu vertikāli",Square:"Kvadrāts","Start at":"Sākt no","Start index must be greater than 0.":"Indeksam jābūt lielākam par 0",Strikethrough:"Nosvītrots",Style:"Stils",Subscript:"Apakšraksts",Superscript:"Augšraksts","Table alignment toolbar":"Tabulas līdzināšana","Table cell text alignment":"Teksta novietojums šūnā","Table properties":"Tabulas īpašības","Table toolbar":"Tabulas rīkjosla","Text alignment":"Teksta izlīdzināšana","Text alignment toolbar":"Teksta līdzināšanas rīkjosla","Text alternative":"Alternatīvais teksts",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Krāsa nav korekta. Mēģiniet "#FF0000" vai "rgb(255,0,0)" vai "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'Vērtība nav korekta. Mēģiniet "10px" vai "2em" vai vienkārši "2"',"This link has no URL":"Saitei nav norādīts URL",Tiny:"Ļoti mazs","To-do List":"To-do Saraksts","Toggle caption off":"Izslēgt tabulas parakstu","Toggle caption on":"Ieslēgt tabulas parakstu","Toggle the circle list style":"Pārslēgt apļveida saraksta stilu","Toggle the decimal list style":"Pārslēgt decimālskaitļu saraksta stilu","Toggle the decimal with leading zero list style":"Pārslēgt decimālskaitļu sākot ar nulli saraksta stilu","Toggle the disc list style":"Pārslēgt diskveida saraksta stilu","Toggle the lower–latin list style":"Pārslēgt mazo latīņu burtu saraksta stilu","Toggle the lower–roman list style":"Pārslēgt mazo romiešu burtu saraksta stilu","Toggle the square list style":"Pārslēgt kvadrātveida saraksta stilu","Toggle the upper–latin list style":"Pārslēgt lielo latīņu burtu saraksta stilu","Toggle the upper–roman list style":"Pārslēgt lielo romiešu burtu saraksta stilu",Turquoise:"Tirkīza","Type or paste your content here.":"Rakstiet vai ielīmējiet saturu šeit.","Type your title":"Ievadiet virsrakstu",Underline:"Pasvītrots",Undo:"Atsaukt",Unlink:"Noņemt Saiti",Update:"Atjaunināt","Update image URL":"Labot attēla avota saiti","Upload failed":"Augšupielāde neizdevusies","Upload from computer":"Augšupielādēt no datora","Upload image from computer":"Augšupielādēt attēlu no datora","Upload in progress":"Notiek augšupielāde","Upper-latin":"lielie latīņu burti","Upper-roman":"lielie romiešu burti","Vertical text alignment toolbar":"Vertikāla teksta līdzināšana",White:"Balts","Widget toolbar":"Sīkrīku rīkjosla",Width:"Platums","Wrap text":"Aplauzt tekstu",Yellow:"Dzeltens"}),e.getPluralForm=function(t){return t%10==1&&t%100!=11?0:0!=t?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(t){const a=t.lv=t.lv||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 no %1",Accept:"Apstiprināt","Align cell text to the bottom":"Līdzināt šūnas tekstu pie apakšas","Align cell text to the center":"Līdzināt šūnas tekstu centrā","Align cell text to the left":"Līdzināt šūnas tekstu pa kreisi","Align cell text to the middle":"Līdzināt šūnas tekstu vidū","Align cell text to the right":"Līdzināt šūnas tekstu pa labi","Align cell text to the top":"Līdzināt šūnas tekstu pie augšas","Align center":"Centrēt","Align left":"Pa kreisi","Align right":"Pa labi","Align table to the left":"Līdzināt tabulu pa kreisi","Align table to the right":"Līdzināt tabulu pa labi",Alignment:"Novietojums",Aquamarine:"Akvamarīns",Background:"Fona krāsa",Big:"Liels",Black:"Melns","Block quote":"Citāts",Blue:"Zils",Bold:"Trekns",Border:"Apmale","Break text":"Pārtraukt tekstu","Bulleted List":"Nenumurēts Saraksts","Bulleted list styles toolbar":"Nenumurēta saraksta stili",Cancel:"Atcelt","Caption for image: %0":"Attēla virsraksts: %0","Caption for the image":"Attēla virsraksts","Cell properties":"Šūnas īpašības","Center table":"Centrēt tabulu","Centered image":"Centrēts attēls","Change image text alternative":"Mainīt attēla alternatīvo tekstu","Choose heading":"Izvēlēties virsrakstu",Circle:"Aplis",Clear:"Notīrīt","Click to edit block":"Noklikšķiniet, lai rediģētu sadaļu",Close:"Aizvērt",Code:"Kods",Color:"Teksta krāsa","Color picker":"Krāsu palete",Column:"Kolonna",Dashed:"Pārtraukta līnija",Decimal:"Cipari","Decimal with leading zero":"Decimālskaitļi sākot ar nulli","Decrease indent":"Samazināt atkāpi",Default:"Noklusējuma","Delete column":"Dzēst kolonnu","Delete row":"Dzēst rindu","Dim grey":"Blāvi pelēks",Dimensions:"Izmēri",Disc:"Disks","Document colors":"Krāsas dokumentā",Dotted:"Punktēta līnija",Double:"Dubulta līnija",Downloadable:"Lejupielādējams","Drag to move":"Velciet, lai pārvietotu","Dropdown toolbar":"Papildus izvēlnes rīkjosla","Edit block":"Labot bloku","Edit link":"Labot Saiti","Editor block content toolbar":"Rediģēšanas bloka satura rīkjosla","Editor contextual toolbar":"Redaktora konteksta rīkjosla","Editor dialog":"Redaktora dialoglodziņš","Editor editing area: %0":"Redaktora rediģēšanas zona: %0","Editor toolbar":"Redaktora rīkjosla","Enter image caption":"Ievadiet attēla parakstu","Enter table caption":"Ievadiet tabulas parakstu","Font Background Color":"Fonta fona krāsa","Font Color":"Fonta krāsa","Font Family":"Fonts","Font Size":"Fonta Lielums","Full size image":"Pilna izmēra attēls",Green:"Zaļš",Grey:"Pelēks",Groove:"Iespiesta līnija","Header column":"Šī kolonna ir galvene","Header row":"Šī rinda ir galvene",Heading:"Virsraksts","Heading 1":"Virsraksts 1","Heading 2":"Virsraksts 2","Heading 3":"Virsraksts 3","Heading 4":"Virsraksts 4","Heading 5":"Virsraksts 5","Heading 6":"Virsraksts 6",Height:"Augstums",HEX:"HEX Krāsu kods","Horizontal line":"Horizontāli atdalošā līnija","Horizontal text alignment toolbar":"Horizontāla teksta līdzināšana","HTML object":"HTML objekts",Huge:"Milzīgs","Image resize list":"Attēla izmēru saraksts","Image toolbar":"Attēlu rīkjosla","image widget":"attēla sīkrīks","In line":"Rindā","Increase indent":"Palielināt atkāpi",Insert:"Ievietot","Insert column left":"Ievietot kolonnu pa kreisi","Insert column right":"Ievietot kolonnu pa labi","Insert image":"Ievietot attēlu","Insert image via URL":"Ievietot attēlu, izmantojot saiti","Insert paragraph after block":"Ievietot paragrāfu aiz bloka","Insert paragraph before block":"Ievietot paragrāfu pirms bloka","Insert row above":"Ievietot rindu virs","Insert row below":"Ievietot rindu zem","Insert table":"Ievietot tabulu",Inset:"Ievietot / ieliktnis",Italic:"Kursīvs",Justify:"Izlīdzināt abas malas","Justify cell text":"Taisnot šūnas tekstu","Left aligned image":"Pa kreisi līdzināts attēls","Light blue":"Gaiši zils","Light green":"Gaiši zaļš","Light grey":"Gaiši pelēks",Link:"Saite","Link image":"Ievietot saiti uz attēla","Link URL":"Saites URL","List properties":"saraksta detaļas","Lower-latin":"mazie latīņu burti","Lower–roman":"mazie romiešu burti","Merge cell down":"Apvienot šūnas uz leju","Merge cell left":"Apvienot šūnas pa kreisi","Merge cell right":"Apvienot šūnas pa labi","Merge cell up":"Apvienot šūnas uz augšu","Merge cells":"Apvienot šūnas",Next:"Nākamā","No results found":"Nekas nav atrasts","No searchable items":"Nav meklējamu vienumu",None:"Bez apmales","Numbered List":"Numurēts Saraksts","Numbered list styles toolbar":"Numurēta saraksta stili","Open in a new tab":"Atvērt jaunā cilnē","Open link in new tab":"Atvērt saiti jaunā cilnē",Orange:"Oranžs",Original:"Oriģināls",Outset:"sākums",Padding:"Atstatums",Paragraph:"Paragrāfs","Press Enter to type after or press Shift + Enter to type before the widget":"Nospiediet taustiņu Enter, lai rakstītu aiz logrīka, vai nospiediet taustiņu Shift + Enter, lai rakstītu pirms logrīka",Previous:"Iepriekšējā",Purple:"Violets",Red:"Sarkans",Redo:"Uz priekšu","Remove color":"Noņemt krāsu","Remove Format":"Noņemt formatējumu","Replace from computer":"Aizvietot no datora","Replace image":"Aizstāt attēlu","Replace image from computer":"Aizstāt attēlu no datora","Resize image":"Mainīt attēla izmērus","Resize image to %0":"Mainīt attēla izmēru uz %0","Resize image to the original size":"Mainīt attēla izmēru uz oriģinālo izmēru","Restore default":"Atgriezt noklusējumu","Reversed order":"Pretēja secība","Rich Text Editor":"Bagātinātais Teksta Redaktors",Ridge:"Izcelta līnija","Right aligned image":"Pa labi līdzināts attēls",Row:"Rinda",Save:"Saglabāt","Select all":"Izvēlēties visu","Select column":"Izvēlēties kolonnu","Select row":"Izvēlēties rindu","Show more items":"Parādīt vairāk vienumus","Side image":"Sānā novietots attēls",Small:"Mazs",Solid:"Nepārtraukta līnija","Split cell horizontally":"Atdalīt šūnu horizontāli","Split cell vertically":"Atdalīt šūnu vertikāli",Square:"Kvadrāts","Start at":"Sākt no","Start index must be greater than 0.":"Indeksam jābūt lielākam par 0",Strikethrough:"Nosvītrots",Style:"Stils",Subscript:"Apakšraksts",Superscript:"Augšraksts","Table alignment toolbar":"Tabulas līdzināšana","Table cell text alignment":"Teksta novietojums šūnā","Table properties":"Tabulas īpašības","Table toolbar":"Tabulas rīkjosla","Text alignment":"Teksta izlīdzināšana","Text alignment toolbar":"Teksta līdzināšanas rīkjosla","Text alternative":"Alternatīvais teksts",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Krāsa nav korekta. Mēģiniet "#FF0000" vai "rgb(255,0,0)" vai "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'Vērtība nav korekta. Mēģiniet "10px" vai "2em" vai vienkārši "2"',"This link has no URL":"Saitei nav norādīts URL",Tiny:"Ļoti mazs","To-do List":"To-do Saraksts","Toggle caption off":"Izslēgt tabulas parakstu","Toggle caption on":"Ieslēgt tabulas parakstu","Toggle the circle list style":"Pārslēgt apļveida saraksta stilu","Toggle the decimal list style":"Pārslēgt decimālskaitļu saraksta stilu","Toggle the decimal with leading zero list style":"Pārslēgt decimālskaitļu sākot ar nulli saraksta stilu","Toggle the disc list style":"Pārslēgt diskveida saraksta stilu","Toggle the lower–latin list style":"Pārslēgt mazo latīņu burtu saraksta stilu","Toggle the lower–roman list style":"Pārslēgt mazo romiešu burtu saraksta stilu","Toggle the square list style":"Pārslēgt kvadrātveida saraksta stilu","Toggle the upper–latin list style":"Pārslēgt lielo latīņu burtu saraksta stilu","Toggle the upper–roman list style":"Pārslēgt lielo romiešu burtu saraksta stilu",Turquoise:"Tirkīza","Type or paste your content here.":"Rakstiet vai ielīmējiet saturu šeit.","Type your title":"Ievadiet virsrakstu",Underline:"Pasvītrots",Undo:"Atsaukt",Unlink:"Noņemt Saiti",Update:"Atjaunināt","Update image URL":"Labot attēla avota saiti","Upload failed":"Augšupielāde neizdevusies","Upload from computer":"Augšupielādēt no datora","Upload image from computer":"Augšupielādēt attēlu no datora","Upload in progress":"Notiek augšupielāde","Upper-latin":"lielie latīņu burti","Upper-roman":"lielie romiešu burti","Vertical text alignment toolbar":"Vertikāla teksta līdzināšana",White:"Balts","Widget toolbar":"Sīkrīku rīkjosla",Width:"Platums","Wrap text":"Aplauzt tekstu",Yellow:"Dzeltens"}),a.getPluralForm=function(t){return t%10==1&&t%100!=11?0:0!=t?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ms.js b/public/static/plugs/ckeditor5/translations/ms.js
index 4d335f373..dc48e9b87 100644
--- a/public/static/plugs/ckeditor5/translations/ms.js
+++ b/public/static/plugs/ckeditor5/translations/ms.js
@@ -1 +1 @@
-!function(a){const e=a.ms=a.ms||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 daripada %1",Accept:"Terima","Align cell text to the bottom":"Jajarkan teks sel kebawah","Align cell text to the center":"Jajarkan teks sel ketengah","Align cell text to the left":"Jajarkan teks sel kekiri","Align cell text to the middle":"Jajarkan teks sel ketengah","Align cell text to the right":"Jajarkan teks sel kekanan","Align cell text to the top":"Jajarkan teks sel keatas","Align center":"Jajarkan tengah","Align left":"Jajarkan kiri","Align right":"Jajarkan kiri","Align table to the left":"Jajarkan jadual sel kekiri","Align table to the right":"Jajarkan jadual sel kekanan",Alignment:"Jajaran",Aquamarine:"Akuamarin",Background:"Latar belakang",Big:"Besar",Black:"Hitam","Block quote":"Blok petikan",Blue:"Biru",Bold:"Tebal",Border:"Sempadan","Break text":"Potong teks","Bulleted List":"Senarai Berbulet","Bulleted list styles toolbar":"Bar capaian gaya senarai berbulet",Cancel:"Batal","Caption for image: %0":"Kapsyen untuk imej: %0","Caption for the image":"Kapsyen untuk imej","Cell properties":"Sifat sel","Center table":"Ketengahkan jadual","Centered image":"Imej berjajar tengah","Change image text alternative":"Tukar alternatif teks imej","Choose heading":"Pilih pengepala",Circle:"Bula",Clear:"Kosongkan","Click to edit block":"Klik untuk menyunting sekatan",Code:"Kod",Color:"Warna","Color picker":"Pemilih warna",Column:"Kolum",Dashed:"Garis putus-putus",Decimal:"Perpuluhan","Decimal with leading zero":"Perpuluhan dengan kosong pendahulu","Decrease indent":"Kurangkan inden",Default:"Lalai","Delete column":"Padam kolum","Delete row":"Padam baris","Dim grey":"Kelabu malap",Dimensions:"Dimensi",Disc:"Cakera","Document colors":"Warna dokumen",Dotted:"Bertitik",Double:"Dua baris",Downloadable:"Boleh dimuat turun","Drag to move":"Seret untuk menggerakkan","Dropdown toolbar":"Bar alat capaian tetingkap","Edit block":"Sunting blok","Edit link":"Sunting pautan","Editor block content toolbar":"Bar alat sekat kandungan editor","Editor contextual toolbar":"Bar alat kontekstual editor","Editor editing area: %0":"Ruang suntingan editor: %0","Editor toolbar":"Bar alat capaian suntingan","Enter image caption":"Masukkan kapsyen imej","Enter table caption":"Benarkan kapsyen jadual","Font Background Color":"Warna Latar Belakang Fon","Font Color":"Warna Fon","Font Family":"Keluarga Fon","Font Size":"Saiz fon","Full size image":"Imej bersaiz penuh",Green:"Hijau",Grey:"Kelabu",Groove:"Lurah","Header column":"Kolum pengepala","Header row":"Baris pengepala",Heading:"Pengepala","Heading 1":"Pengepala 1","Heading 2":"Pengepala 2","Heading 3":"Pengepala 3","Heading 4":"Pengepala 4","Heading 5":"Pengepala 5","Heading 6":"Pengepala 6",Height:"Ketinggian",HEX:"HEX","Horizontal line":"Baris melintang","Horizontal text alignment toolbar":"Bar alat capaian jajaran teks melintang","HTML object":"Objek HTML",Huge:"Gergasi","Image resize list":"Senarai saizkan semula imej ","Image toolbar":"Bar alat capaian imej","image widget":"widget imej","In line":"Dalam baris","Increase indent":"Tambah inden",Insert:"Masukkan","Insert column left":"Masukkan kolum kiri","Insert column right":"Masukkan kolum kanan","Insert image":"Masukkan imej","Insert image via URL":"Masukkan imej melalui URL","Insert paragraph after block":"Masukkan perenggan sebelum blok","Insert paragraph before block":"Masukkan perenggan sebelum blok","Insert row above":"Masukkan baris diatas","Insert row below":"Masukkan baris dibawah","Insert table":"Masukkan jadual",Inset:"Inset",Italic:"Italik",Justify:"Imbang","Justify cell text":"Imbang teks sel","Left aligned image":"Imej berjajar kiri","Light blue":"Biru cerah","Light green":"Hijau cerah","Light grey":"Kelabu cerah",Link:"Pautkan","Link image":"Pautkan imej","Link URL":"Pautkan URL","List properties":"Senarai sifat","Lower-latin":"Latin bawah","Lower–roman":"Roman bawah","Merge cell down":"Cantumkan sel kebawah","Merge cell left":"Cantumkan sel kekiri","Merge cell right":"Cantumkan sel kekanan","Merge cell up":"Cantumkan sel keatas","Merge cells":"Cantumkan sel ",Next:"Seterusnya","No results found":"Tiada keputusan ditemui","No searchable items":"Tiada item untuk dicari",None:"Tiada","Numbered List":"Senarai Bernombor","Numbered list styles toolbar":"Bar alat capaian gaya senarai bernombor","Open in a new tab":"Buka dalam tab baru","Open link in new tab":"Buka pautan dalam tab baru",Orange:"Oren",Original:"Asal",Outset:"Outset",Padding:"Ketebalan",Paragraph:"Perenggan","Press Enter to type after or press Shift + Enter to type before the widget":"Tekan Enter untuk menaip selepas atau tekan Shift + Enter untuk menaip sebelum widget",Previous:"Sebelumnya",Purple:"Ungu",Red:"Merah",Redo:"Buat semula","Remove color":"Buang warna","Remove Format":"Buang Format","Replace from computer":"Gantikan daripada komputer","Replace image":"Gantikan imej","Replace image from computer":"Gantikan imej daripada komputer","Resize image":"Saizkan semula imej","Resize image to %0":"Saizkan semula imej kepada %0","Resize image to the original size":"Saizkan semula imej kepada saiz asal","Restore default":"Pulihkan lalai","Reversed order":"Susunan terbalik","Rich Text Editor":"Penyunting Teks Kaya",Ridge:"Batas","Right aligned image":"Imej berjajar kanan",Row:"Baris",Save:"Simpan","Select all":"Pilih seterusnya","Select column":"Pilih kolum","Select row":"Pilih baris","Show more items":"Tunjukkan item lain","Side image":"Sisi imej",Small:"Kecil",Solid:"Pejal","Split cell horizontally":"Leraikan sel melintang","Split cell vertically":"Leraikan sel menegak",Square:"Petak","Start at":"Mula pada","Start index must be greater than 0.":"Indeks mula hendaklah lebih besar daripada 0.",Strikethrough:"Garis lorek",Style:"Gaya",Subscript:"Subskrip",Superscript:"Superskrip","Table alignment toolbar":"Bar alat capaian jajaran jadual","Table cell text alignment":"Jajaran teks sel jadual","Table properties":"Sifat jadual","Table toolbar":"Bar alat capaian jadual","Text alignment":"Jajaran teks","Text alignment toolbar":"Bar alat capaian jajaran teks","Text alternative":"Alternatif teks",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Warna tidak sah. Cuba "#FF0000" atau "rgb(255,0,0)" atau "merah".','The value is invalid. Try "10px" or "2em" or simply "2".':'Nilai tidak sah. Cuba "10px" atau "2em" atau "2" sahaja.',"This link has no URL":"Pautan ini tidak mempunyai URL",Tiny:"Halus","To-do List":"Senarai Untuk Dilakukan","Toggle caption off":"Tutup kapsyen","Toggle caption on":"Buka kapsyen","Toggle the circle list style":"Buka gaya senarai bulatan","Toggle the decimal list style":"Buka gaya senarai titik perpuluhan","Toggle the decimal with leading zero list style":"Buka titik perpuluhan dengan gaya senarai kosong pendahulu","Toggle the disc list style":"Buka gaya senarai cakera","Toggle the lower–latin list style":"Buka gaya senarai latin bawah","Toggle the lower–roman list style":"Buka gaya senarai roman bawah","Toggle the square list style":"Buka gaya senarai petak","Toggle the upper–latin list style":"Buka gaya senarai latin atas","Toggle the upper–roman list style":"Buka gaya senarai roman atas",Turquoise:"Firus","Type or paste your content here.":"Taip atau tampal kandungan anda disini.","Type your title":"Taip tajuk anda",Underline:"Garis bawah",Undo:"Buat asal",Unlink:"Buang pautan",Update:"Kemaskini","Update image URL":"Kemaskini URL imej","Upload failed":"Muat naik gagal","Upload from computer":"Muat naik daripada komputer","Upload image from computer":"Muat naik gambar daripada komputer","Upload in progress":"Muat naik sedang berlangsung","Upper-latin":"Latin atas","Upper-roman":"Roman atas","Vertical text alignment toolbar":"Bar alat capaian jajaran teks menegak",White:"Putih","Widget toolbar":"Bar alat capaian widget",Width:"Lebar","Wrap text":"Balut teks",Yellow:"Kuning"}),e.getPluralForm=function(a){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(a){const e=a.ms=a.ms||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 daripada %1",Accept:"Terima","Align cell text to the bottom":"Jajarkan teks sel kebawah","Align cell text to the center":"Jajarkan teks sel ketengah","Align cell text to the left":"Jajarkan teks sel kekiri","Align cell text to the middle":"Jajarkan teks sel ketengah","Align cell text to the right":"Jajarkan teks sel kekanan","Align cell text to the top":"Jajarkan teks sel keatas","Align center":"Jajarkan tengah","Align left":"Jajarkan kiri","Align right":"Jajarkan kiri","Align table to the left":"Jajarkan jadual sel kekiri","Align table to the right":"Jajarkan jadual sel kekanan",Alignment:"Jajaran",Aquamarine:"Akuamarin",Background:"Latar belakang",Big:"Besar",Black:"Hitam","Block quote":"Blok petikan",Blue:"Biru",Bold:"Tebal",Border:"Sempadan","Break text":"Potong teks","Bulleted List":"Senarai Berbulet","Bulleted list styles toolbar":"Bar capaian gaya senarai berbulet",Cancel:"Batal","Caption for image: %0":"Kapsyen untuk imej: %0","Caption for the image":"Kapsyen untuk imej","Cell properties":"Sifat sel","Center table":"Ketengahkan jadual","Centered image":"Imej berjajar tengah","Change image text alternative":"Tukar alternatif teks imej","Choose heading":"Pilih pengepala",Circle:"Bula",Clear:"Kosongkan","Click to edit block":"Klik untuk menyunting sekatan",Close:"Tutup",Code:"Kod",Color:"Warna","Color picker":"Pemilih warna",Column:"Kolum",Dashed:"Garis putus-putus",Decimal:"Perpuluhan","Decimal with leading zero":"Perpuluhan dengan kosong pendahulu","Decrease indent":"Kurangkan inden",Default:"Lalai","Delete column":"Padam kolum","Delete row":"Padam baris","Dim grey":"Kelabu malap",Dimensions:"Dimensi",Disc:"Cakera","Document colors":"Warna dokumen",Dotted:"Bertitik",Double:"Dua baris",Downloadable:"Boleh dimuat turun","Drag to move":"Seret untuk menggerakkan","Dropdown toolbar":"Bar alat capaian tetingkap","Edit block":"Sunting blok","Edit link":"Sunting pautan","Editor block content toolbar":"Bar alat sekat kandungan editor","Editor contextual toolbar":"Bar alat kontekstual editor","Editor dialog":"Dialog editor","Editor editing area: %0":"Ruang suntingan editor: %0","Editor toolbar":"Bar alat capaian suntingan","Enter image caption":"Masukkan kapsyen imej","Enter table caption":"Benarkan kapsyen jadual","Font Background Color":"Warna Latar Belakang Fon","Font Color":"Warna Fon","Font Family":"Keluarga Fon","Font Size":"Saiz fon","Full size image":"Imej bersaiz penuh",Green:"Hijau",Grey:"Kelabu",Groove:"Lurah","Header column":"Kolum pengepala","Header row":"Baris pengepala",Heading:"Pengepala","Heading 1":"Pengepala 1","Heading 2":"Pengepala 2","Heading 3":"Pengepala 3","Heading 4":"Pengepala 4","Heading 5":"Pengepala 5","Heading 6":"Pengepala 6",Height:"Ketinggian",HEX:"HEX","Horizontal line":"Baris melintang","Horizontal text alignment toolbar":"Bar alat capaian jajaran teks melintang","HTML object":"Objek HTML",Huge:"Gergasi","Image resize list":"Senarai saizkan semula imej ","Image toolbar":"Bar alat capaian imej","image widget":"widget imej","In line":"Dalam baris","Increase indent":"Tambah inden",Insert:"Masukkan","Insert column left":"Masukkan kolum kiri","Insert column right":"Masukkan kolum kanan","Insert image":"Masukkan imej","Insert image via URL":"Masukkan imej melalui URL","Insert paragraph after block":"Masukkan perenggan sebelum blok","Insert paragraph before block":"Masukkan perenggan sebelum blok","Insert row above":"Masukkan baris diatas","Insert row below":"Masukkan baris dibawah","Insert table":"Masukkan jadual",Inset:"Inset",Italic:"Italik",Justify:"Imbang","Justify cell text":"Imbang teks sel","Left aligned image":"Imej berjajar kiri","Light blue":"Biru cerah","Light green":"Hijau cerah","Light grey":"Kelabu cerah",Link:"Pautkan","Link image":"Pautkan imej","Link URL":"Pautkan URL","List properties":"Senarai sifat","Lower-latin":"Latin bawah","Lower–roman":"Roman bawah","Merge cell down":"Cantumkan sel kebawah","Merge cell left":"Cantumkan sel kekiri","Merge cell right":"Cantumkan sel kekanan","Merge cell up":"Cantumkan sel keatas","Merge cells":"Cantumkan sel ",Next:"Seterusnya","No results found":"Tiada keputusan ditemui","No searchable items":"Tiada item untuk dicari",None:"Tiada","Numbered List":"Senarai Bernombor","Numbered list styles toolbar":"Bar alat capaian gaya senarai bernombor","Open in a new tab":"Buka dalam tab baru","Open link in new tab":"Buka pautan dalam tab baru",Orange:"Oren",Original:"Asal",Outset:"Outset",Padding:"Ketebalan",Paragraph:"Perenggan","Press Enter to type after or press Shift + Enter to type before the widget":"Tekan Enter untuk menaip selepas atau tekan Shift + Enter untuk menaip sebelum widget",Previous:"Sebelumnya",Purple:"Ungu",Red:"Merah",Redo:"Buat semula","Remove color":"Buang warna","Remove Format":"Buang Format","Replace from computer":"Gantikan daripada komputer","Replace image":"Gantikan imej","Replace image from computer":"Gantikan imej daripada komputer","Resize image":"Saizkan semula imej","Resize image to %0":"Saizkan semula imej kepada %0","Resize image to the original size":"Saizkan semula imej kepada saiz asal","Restore default":"Pulihkan lalai","Reversed order":"Susunan terbalik","Rich Text Editor":"Penyunting Teks Kaya",Ridge:"Batas","Right aligned image":"Imej berjajar kanan",Row:"Baris",Save:"Simpan","Select all":"Pilih seterusnya","Select column":"Pilih kolum","Select row":"Pilih baris","Show more items":"Tunjukkan item lain","Side image":"Sisi imej",Small:"Kecil",Solid:"Pejal","Split cell horizontally":"Leraikan sel melintang","Split cell vertically":"Leraikan sel menegak",Square:"Petak","Start at":"Mula pada","Start index must be greater than 0.":"Indeks mula hendaklah lebih besar daripada 0.",Strikethrough:"Garis lorek",Style:"Gaya",Subscript:"Subskrip",Superscript:"Superskrip","Table alignment toolbar":"Bar alat capaian jajaran jadual","Table cell text alignment":"Jajaran teks sel jadual","Table properties":"Sifat jadual","Table toolbar":"Bar alat capaian jadual","Text alignment":"Jajaran teks","Text alignment toolbar":"Bar alat capaian jajaran teks","Text alternative":"Alternatif teks",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Warna tidak sah. Cuba "#FF0000" atau "rgb(255,0,0)" atau "merah".','The value is invalid. Try "10px" or "2em" or simply "2".':'Nilai tidak sah. Cuba "10px" atau "2em" atau "2" sahaja.',"This link has no URL":"Pautan ini tidak mempunyai URL",Tiny:"Halus","To-do List":"Senarai Untuk Dilakukan","Toggle caption off":"Tutup kapsyen","Toggle caption on":"Buka kapsyen","Toggle the circle list style":"Buka gaya senarai bulatan","Toggle the decimal list style":"Buka gaya senarai titik perpuluhan","Toggle the decimal with leading zero list style":"Buka titik perpuluhan dengan gaya senarai kosong pendahulu","Toggle the disc list style":"Buka gaya senarai cakera","Toggle the lower–latin list style":"Buka gaya senarai latin bawah","Toggle the lower–roman list style":"Buka gaya senarai roman bawah","Toggle the square list style":"Buka gaya senarai petak","Toggle the upper–latin list style":"Buka gaya senarai latin atas","Toggle the upper–roman list style":"Buka gaya senarai roman atas",Turquoise:"Firus","Type or paste your content here.":"Taip atau tampal kandungan anda disini.","Type your title":"Taip tajuk anda",Underline:"Garis bawah",Undo:"Buat asal",Unlink:"Buang pautan",Update:"Kemaskini","Update image URL":"Kemaskini URL imej","Upload failed":"Muat naik gagal","Upload from computer":"Muat naik daripada komputer","Upload image from computer":"Muat naik gambar daripada komputer","Upload in progress":"Muat naik sedang berlangsung","Upper-latin":"Latin atas","Upper-roman":"Roman atas","Vertical text alignment toolbar":"Bar alat capaian jajaran teks menegak",White:"Putih","Widget toolbar":"Bar alat capaian widget",Width:"Lebar","Wrap text":"Balut teks",Yellow:"Kuning"}),e.getPluralForm=function(a){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/nb.js b/public/static/plugs/ckeditor5/translations/nb.js
index ad881ec57..660f4dba0 100644
--- a/public/static/plugs/ckeditor5/translations/nb.js
+++ b/public/static/plugs/ckeditor5/translations/nb.js
@@ -1 +1 @@
-!function(e){const t=e.nb=e.nb||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Midstill","Align left":"Venstrejuster","Align right":"Høyrejuster","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"",Background:"",Big:"Stor",Black:"","Block quote":"Blokksitat",Blue:"",Bold:"Fet",Border:"","Break text":"","Bulleted List":"Punktmerket liste","Bulleted list styles toolbar":"",Cancel:"Avbryt","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"Midtstilt bilde","Change image text alternative":"Endre tekstalternativ for bilde","Choose heading":"Velg overskrift",Circle:"",Clear:"","Click to edit block":"",Code:"Kode",Color:"","Color picker":"",Column:"Kolonne",Dashed:"",Decimal:"","Decimal with leading zero":"",Default:"Standard","Delete column":"Slett kolonne","Delete row":"Slett rad","Dim grey":"",Dimensions:"",Disc:"","Document colors":"",Dotted:"",Double:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"Rediger lenke","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Skriv inn bildetekst","Enter table caption":"","Font Background Color":"","Font Color":"","Font Family":"Skrifttype","Font Size":"Skriftstørrelse","Full size image":"Bilde i full størrelse",Green:"",Grey:"",Groove:"","Header column":"Overskriftkolonne","Header row":"Overskriftrad",Heading:"Overskrift","Heading 1":"Overskrift 1","Heading 2":"Overskrift 2","Heading 3":"Overskrift 3","Heading 4":"","Heading 5":"","Heading 6":"",Height:"",HEX:"","Horizontal text alignment toolbar":"",Huge:"Veldig stor","Image resize list":"","Image toolbar":"","image widget":"Bilde-widget","In line":"",Insert:"","Insert column left":"","Insert column right":"","Insert image":"Sett inn bilde","Insert image via URL":"","Insert row above":"Sett inn rad over","Insert row below":"Sett inn rad under","Insert table":"Sett inn tabell",Inset:"",Italic:"Kursiv",Justify:"Blokkjuster","Justify cell text":"","Left aligned image":"Venstrejustert bilde","Light blue":"","Light green":"","Light grey":"",Link:"Lenke","Link image":"","Link URL":"URL for lenke","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Slå sammen celle ned","Merge cell left":"Slå sammen celle til venstre","Merge cell right":"Slå sammen celle til høyre","Merge cell up":"Slå sammen celle opp","Merge cells":"Slå sammen celler",Next:"","No results found":"","No searchable items":"",None:"","Numbered List":"Nummerert liste","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"Åpne lenke i ny fane",Orange:"",Original:"",Outset:"",Padding:"",Paragraph:"Avsnitt",Previous:"",Purple:"",Red:"",Redo:"Gjør om","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Rikteksteditor",Ridge:"","Right aligned image":"Høyrejustert bilde",Row:"Rad",Save:"Lagre","Select column":"","Select row":"","Show more items":"","Side image":"Sidebilde",Small:"Liten",Solid:"","Split cell horizontally":"Del celle horisontalt","Split cell vertically":"Del celle vertikalt",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Gjennomstreking",Style:"",Subscript:"",Superscript:"","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Tekstjustering","Text alignment toolbar":"","Text alternative":"Tekstalternativ for bilde",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Denne lenken har ingen URL",Tiny:"Veldig liten","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"Understreking",Undo:"Angre",Unlink:"Fjern lenke",Update:"","Update image URL":"","Upload failed":"Opplasting feilet","Upload from computer":"","Upload image from computer":"","Upload in progress":"Opplasting pågår","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"",Width:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.nb=e.nb||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Midstill","Align left":"Venstrejuster","Align right":"Høyrejuster","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"",Background:"",Big:"Stor",Black:"","Block quote":"Blokksitat",Blue:"",Bold:"Fet",Border:"","Break text":"","Bulleted List":"Punktmerket liste","Bulleted list styles toolbar":"",Cancel:"Avbryt","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"Midtstilt bilde","Change image text alternative":"Endre tekstalternativ for bilde","Choose heading":"Velg overskrift",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"Kode",Color:"","Color picker":"",Column:"Kolonne",Dashed:"",Decimal:"","Decimal with leading zero":"",Default:"Standard","Delete column":"Slett kolonne","Delete row":"Slett rad","Dim grey":"",Dimensions:"",Disc:"","Document colors":"",Dotted:"",Double:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"Rediger lenke","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"Skriv inn bildetekst","Enter table caption":"","Font Background Color":"","Font Color":"","Font Family":"Skrifttype","Font Size":"Skriftstørrelse","Full size image":"Bilde i full størrelse",Green:"",Grey:"",Groove:"","Header column":"Overskriftkolonne","Header row":"Overskriftrad",Heading:"Overskrift","Heading 1":"Overskrift 1","Heading 2":"Overskrift 2","Heading 3":"Overskrift 3","Heading 4":"","Heading 5":"","Heading 6":"",Height:"",HEX:"","Horizontal text alignment toolbar":"",Huge:"Veldig stor","Image resize list":"","Image toolbar":"","image widget":"Bilde-widget","In line":"",Insert:"","Insert column left":"","Insert column right":"","Insert image":"Sett inn bilde","Insert image via URL":"","Insert row above":"Sett inn rad over","Insert row below":"Sett inn rad under","Insert table":"Sett inn tabell",Inset:"",Italic:"Kursiv",Justify:"Blokkjuster","Justify cell text":"","Left aligned image":"Venstrejustert bilde","Light blue":"","Light green":"","Light grey":"",Link:"Lenke","Link image":"","Link URL":"URL for lenke","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Slå sammen celle ned","Merge cell left":"Slå sammen celle til venstre","Merge cell right":"Slå sammen celle til høyre","Merge cell up":"Slå sammen celle opp","Merge cells":"Slå sammen celler",Next:"","No results found":"","No searchable items":"",None:"","Numbered List":"Nummerert liste","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"Åpne lenke i ny fane",Orange:"",Original:"",Outset:"",Padding:"",Paragraph:"Avsnitt",Previous:"",Purple:"",Red:"",Redo:"Gjør om","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Rikteksteditor",Ridge:"","Right aligned image":"Høyrejustert bilde",Row:"Rad",Save:"Lagre","Select column":"","Select row":"","Show more items":"","Side image":"Sidebilde",Small:"Liten",Solid:"","Split cell horizontally":"Del celle horisontalt","Split cell vertically":"Del celle vertikalt",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Gjennomstreking",Style:"",Subscript:"",Superscript:"","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Tekstjustering","Text alignment toolbar":"","Text alternative":"Tekstalternativ for bilde",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Denne lenken har ingen URL",Tiny:"Veldig liten","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"","Type your title":"",Underline:"Understreking",Undo:"Angre",Unlink:"Fjern lenke",Update:"","Update image URL":"","Upload failed":"Opplasting feilet","Upload from computer":"","Upload image from computer":"","Upload in progress":"Opplasting pågår","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"",Width:"","Wrap text":"",Yellow:""}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ne.js b/public/static/plugs/ckeditor5/translations/ne.js
index 441ba0090..cc0ad0e15 100644
--- a/public/static/plugs/ckeditor5/translations/ne.js
+++ b/public/static/plugs/ckeditor5/translations/ne.js
@@ -1 +1 @@
-!function(e){const t=e.ne=e.ne||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 मध्ये %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"केन्द्र पङ्क्तिबद्ध गर्नुहोस्","Align left":"बायाँ पङ्क्तिबद्ध गर्नुहोस्","Align right":"दायाँ पङ्क्तिबद्ध गर्नुहोस्","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"अव्कवामरिन",Background:"",Big:"ठूलो",Black:"कालो","Block quote":"ब्लक उद्धरण",Blue:"निलो",Bold:"बोल्ड",Border:"","Break text":"","Bulleted List":"गोली चिन्ह अङ्कित सूची","Bulleted list styles toolbar":"",Cancel:"रद्द गर्नुहोस्","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"केन्द्रित तस्वीर","Change image text alternative":"तस्वीर पाठ विकल्प परिवर्तन गर्नुहोस्","Choose heading":"शीर्षक छनौट गर्नुहोस्",Circle:"",Clear:"","Click to edit block":"",Code:"कोड",Color:"","Color picker":"",Column:"स्तम्भ",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"इन्डेन्ट घटाउन",Default:"पूर्वनिर्धारित","Delete column":"स्तम्भ मेटाउनुहोस्","Delete row":"पङ्क्ति मेटाउनुहोस्","Dim grey":"धमिलो खैरो",Dimensions:"",Disc:"","Document colors":"कागजात रंग",Dotted:"",Double:"",Downloadable:"डाउनलोड योग्य","Drag to move":"","Dropdown toolbar":"","Edit block":"ब्लक सम्पादन गर्न","Edit link":"लिङ्क सम्पादन गर्नुहोस्","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"तस्वीर क्याप्शन प्रविष्ट गर्नुहोस्","Enter table caption":"","Font Background Color":"पृष्ठभूमिको फन्ट रंग","Font Color":"फन्ट रंग","Font Family":"फन्ट परिवार","Font Size":"फन्ट आकार","Full size image":"पूर्ण आकार तस्वीर",Green:"हरियो",Grey:"खैरो",Groove:"","Header column":"हेडर स्तम्भ","Header row":"हेडर पङ्क्ति",Heading:"शीर्षक","Heading 1":"शीर्षक-एक","Heading 2":"शीर्षक २","Heading 3":"शीर्षक ३","Heading 4":"शीर्षक ४","Heading 5":"शीर्षक ५","Heading 6":"शीर्षक ६",Height:"",HEX:"","Horizontal text alignment toolbar":"",Huge:"विशाल","Image resize list":"","Image toolbar":"","image widget":"तस्वीर विजेट","In line":"","Increase indent":"इन्डेन्ट बढाउन",Insert:"","Insert column left":"बायाँ स्तम्भ सम्मिलित गर्न","Insert column right":"दायाँ स्तम्भ सम्मिलित गर्न","Insert image":"तस्वीर सम्मिलित गर्नुहोस्","Insert image via URL":"","Insert row above":"माथि पंक्ति सम्मिलित गर्नुहोस्","Insert row below":"तल पंक्ति सम्मिलित गर्नुहोस्","Insert table":"तालिका सम्मिलित गर्नुहोस्",Inset:"",Italic:"इटालिक",Justify:"जस्टिफाइ गर्नुहोस्","Justify cell text":"","Left aligned image":"बायाँ पङ्क्ति तस्वीर","Light blue":"हल्का निलो","Light green":"हल्का हरियो","Light grey":"हल्का खैरो",Link:"लिङ्क","Link image":"","Link URL":"लिङ्क यूआरएल","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"कक्ष तल मर्ज गर्नुहोस्","Merge cell left":"सेल बायाँ मर्ज गर्नुहोस्","Merge cell right":"दायाँ कक्ष मर्ज गर्नुहोस्","Merge cell up":"कक्ष माथि मर्ज गर्नुहोस्","Merge cells":"कक्ष मर्ज गर्नुहोस्",Next:"अर्को","No results found":"","No searchable items":"",None:"","Numbered List":"सूचीबद्ध सूची","Numbered list styles toolbar":"","Open in a new tab":"नयाँ ट्याबमा खोल्न","Open link in new tab":"नयाँ ट्याबमा लिङ्क खोल्नुहोस्",Orange:"सुन्तला रंग",Original:"",Outset:"",Padding:"",Paragraph:"अनुच्छेद",Previous:"अघिल्लो",Purple:"बैंगनी रंग",Red:"रातो",Redo:"रिडु","Remove color":"रंग हटाउन","Remove Format":"ढाँचा हटाउनुहोस्","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"धनी पाठ सम्पादक",Ridge:"","Right aligned image":"दायाँ पङ्क्तिबद्ध तस्वीर",Row:"पङ्क्ति",Save:"सुरक्षित गर्नुहोस्","Select column":"","Select row":"","Show more items":"","Side image":"साइड तस्वीर",Small:"सानो",Solid:"","Split cell horizontally":"क्षैतिज कक्ष विभाजित गर्नुहोस्","Split cell vertically":"ठाडो कक्ष विभाजित गर्नुहोस्",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"स्ट्राइकथ्रू",Style:"",Subscript:"सबस्क्रिप्ट",Superscript:"सुपरस्क्रिप्ट","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"पाठ संरेखण","Text alignment toolbar":"","Text alternative":"पाठ विकल्प",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"यो लिङ्कसँग यूआरएल छैन",Tiny:"सानो","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"त्रकोइस","Type or paste your content here.":"","Type your title":"",Underline:"रेखांकन",Undo:"पूर्ववत",Unlink:"अनलिङ्क गर्नुहोस्",Update:"","Update image URL":"","Upload failed":"अपलोड असफल भयो","Upload from computer":"","Upload image from computer":"","Upload in progress":"अपलोड हुदैछ","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"सेतो",Width:"","Wrap text":"",Yellow:"पहेंलो"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ne=e.ne||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 मध्ये %1",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"केन्द्र पङ्क्तिबद्ध गर्नुहोस्","Align left":"बायाँ पङ्क्तिबद्ध गर्नुहोस्","Align right":"दायाँ पङ्क्तिबद्ध गर्नुहोस्","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"अव्कवामरिन",Background:"",Big:"ठूलो",Black:"कालो","Block quote":"ब्लक उद्धरण",Blue:"निलो",Bold:"बोल्ड",Border:"","Break text":"","Bulleted List":"गोली चिन्ह अङ्कित सूची","Bulleted list styles toolbar":"",Cancel:"रद्द गर्नुहोस्","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"केन्द्रित तस्वीर","Change image text alternative":"तस्वीर पाठ विकल्प परिवर्तन गर्नुहोस्","Choose heading":"शीर्षक छनौट गर्नुहोस्",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"कोड",Color:"","Color picker":"",Column:"स्तम्भ",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"इन्डेन्ट घटाउन",Default:"पूर्वनिर्धारित","Delete column":"स्तम्भ मेटाउनुहोस्","Delete row":"पङ्क्ति मेटाउनुहोस्","Dim grey":"धमिलो खैरो",Dimensions:"",Disc:"","Document colors":"कागजात रंग",Dotted:"",Double:"",Downloadable:"डाउनलोड योग्य","Drag to move":"","Dropdown toolbar":"","Edit block":"ब्लक सम्पादन गर्न","Edit link":"लिङ्क सम्पादन गर्नुहोस्","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"तस्वीर क्याप्शन प्रविष्ट गर्नुहोस्","Enter table caption":"","Font Background Color":"पृष्ठभूमिको फन्ट रंग","Font Color":"फन्ट रंग","Font Family":"फन्ट परिवार","Font Size":"फन्ट आकार","Full size image":"पूर्ण आकार तस्वीर",Green:"हरियो",Grey:"खैरो",Groove:"","Header column":"हेडर स्तम्भ","Header row":"हेडर पङ्क्ति",Heading:"शीर्षक","Heading 1":"शीर्षक-एक","Heading 2":"शीर्षक २","Heading 3":"शीर्षक ३","Heading 4":"शीर्षक ४","Heading 5":"शीर्षक ५","Heading 6":"शीर्षक ६",Height:"",HEX:"","Horizontal text alignment toolbar":"",Huge:"विशाल","Image resize list":"","Image toolbar":"","image widget":"तस्वीर विजेट","In line":"","Increase indent":"इन्डेन्ट बढाउन",Insert:"","Insert column left":"बायाँ स्तम्भ सम्मिलित गर्न","Insert column right":"दायाँ स्तम्भ सम्मिलित गर्न","Insert image":"तस्वीर सम्मिलित गर्नुहोस्","Insert image via URL":"","Insert row above":"माथि पंक्ति सम्मिलित गर्नुहोस्","Insert row below":"तल पंक्ति सम्मिलित गर्नुहोस्","Insert table":"तालिका सम्मिलित गर्नुहोस्",Inset:"",Italic:"इटालिक",Justify:"जस्टिफाइ गर्नुहोस्","Justify cell text":"","Left aligned image":"बायाँ पङ्क्ति तस्वीर","Light blue":"हल्का निलो","Light green":"हल्का हरियो","Light grey":"हल्का खैरो",Link:"लिङ्क","Link image":"","Link URL":"लिङ्क यूआरएल","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"कक्ष तल मर्ज गर्नुहोस्","Merge cell left":"सेल बायाँ मर्ज गर्नुहोस्","Merge cell right":"दायाँ कक्ष मर्ज गर्नुहोस्","Merge cell up":"कक्ष माथि मर्ज गर्नुहोस्","Merge cells":"कक्ष मर्ज गर्नुहोस्",Next:"अर्को","No results found":"","No searchable items":"",None:"","Numbered List":"सूचीबद्ध सूची","Numbered list styles toolbar":"","Open in a new tab":"नयाँ ट्याबमा खोल्न","Open link in new tab":"नयाँ ट्याबमा लिङ्क खोल्नुहोस्",Orange:"सुन्तला रंग",Original:"",Outset:"",Padding:"",Paragraph:"अनुच्छेद",Previous:"अघिल्लो",Purple:"बैंगनी रंग",Red:"रातो",Redo:"रिडु","Remove color":"रंग हटाउन","Remove Format":"ढाँचा हटाउनुहोस्","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"धनी पाठ सम्पादक",Ridge:"","Right aligned image":"दायाँ पङ्क्तिबद्ध तस्वीर",Row:"पङ्क्ति",Save:"सुरक्षित गर्नुहोस्","Select column":"","Select row":"","Show more items":"","Side image":"साइड तस्वीर",Small:"सानो",Solid:"","Split cell horizontally":"क्षैतिज कक्ष विभाजित गर्नुहोस्","Split cell vertically":"ठाडो कक्ष विभाजित गर्नुहोस्",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"स्ट्राइकथ्रू",Style:"",Subscript:"सबस्क्रिप्ट",Superscript:"सुपरस्क्रिप्ट","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"पाठ संरेखण","Text alignment toolbar":"","Text alternative":"पाठ विकल्प",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"यो लिङ्कसँग यूआरएल छैन",Tiny:"सानो","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"त्रकोइस","Type or paste your content here.":"","Type your title":"",Underline:"रेखांकन",Undo:"पूर्ववत",Unlink:"अनलिङ्क गर्नुहोस्",Update:"","Update image URL":"","Upload failed":"अपलोड असफल भयो","Upload from computer":"","Upload image from computer":"","Upload in progress":"अपलोड हुदैछ","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"सेतो",Width:"","Wrap text":"",Yellow:"पहेंलो"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/nl.js b/public/static/plugs/ckeditor5/translations/nl.js
index 4300ecc53..536e987c1 100644
--- a/public/static/plugs/ckeditor5/translations/nl.js
+++ b/public/static/plugs/ckeditor5/translations/nl.js
@@ -1 +1 @@
-!function(e){const t=e.nl=e.nl||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 van %1",Accept:"Accepteren","Align cell text to the bottom":"Celtekst onder uitlijnen","Align cell text to the center":"Tekst in de cel centreren","Align cell text to the left":"Celtekst links uitlijnen","Align cell text to the middle":"Celtekst in het midden uitlijnen","Align cell text to the right":"Celtekst rechts uitlijnen","Align cell text to the top":"Celtekst boven uitlijnen","Align center":"Midden uitlijnen","Align left":"Links uitlijnen","Align right":"Rechts uitlijnen","Align table to the left":"Tabel links uitlijnen","Align table to the right":"Tabel rechts uitlijnen",Alignment:"Uitlijning",Aquamarine:"Aquamarijn",Background:"Achtergrond",Big:"Groot",Black:"Zwart","Block quote":"Blok citaat",Blue:"Blauw",Bold:"Vet",Border:"Rand","Break text":"Tekst afbreken","Bulleted List":"Ongenummerde lijst","Bulleted list styles toolbar":"Toolbar voor stijlen van opsommingslijsten",Cancel:"Annuleren","Caption for image: %0":"Bijschrift voor afbeelding: %0","Caption for the image":"Bijschrift voor afbeelding","Cell properties":"Celeigenschappen","Center table":"Tabel centreren","Centered image":"Gecentreerde afbeelding","Change image text alternative":"Verander alt-tekst van de afbeelding","Choose heading":"Kies kop",Circle:"Cirkel",Clear:"Wissen","Click to edit block":"Klik om blok te bewerken",Code:"Code",Color:"Kleur","Color picker":"Kleurkiezer",Column:"Kolom",Dashed:"Onderbroken",Decimal:"Decimaal","Decimal with leading zero":"Decimaal voorafgegaan door een nul","Decrease indent":"Minder inspringen",Default:"Standaard","Delete column":"Verwijder kolom","Delete row":"Verwijder rij","Dim grey":"Gedimd grijs",Dimensions:"Afmetingen",Disc:"Schijf","Document colors":"Document kleur",Dotted:"Stippellijn",Double:"Dubbel",Downloadable:"Downloadbaar","Drag to move":"Sleep om te verplaatsen","Dropdown toolbar":"Drop-down werkbalk","Edit block":"Blok aanpassen","Edit link":"Bewerk link","Editor block content toolbar":"Inhoud werkbalk voor editorblok","Editor contextual toolbar":"Contextuele werkbalk van editor","Editor editing area: %0":"Bewerkingsgebied: %0","Editor toolbar":"Editor welkbalk","Enter image caption":"Typ een afbeeldingsbijschrift","Enter table caption":"Voer tabelbijschrift in","Font Background Color":"Tekst achtergrondkleur","Font Color":"Tekstkleur","Font Family":"Lettertype","Font Size":"Lettergrootte","Full size image":"Afbeelding op volledige grootte",Green:"Groen",Grey:"Grijs",Groove:"Sleuf","Header column":"Titel kolom","Header row":"Titel rij",Heading:"Koppen","Heading 1":"Kop 1","Heading 2":"Kop 2","Heading 3":"Kop 3","Heading 4":"Kop 4","Heading 5":"Kop 5","Heading 6":"Kop 6",Height:"Hoogte",HEX:"HEX","Horizontal line":"Horizontale lijn","Horizontal text alignment toolbar":"Werkbalk voor horizontale tekstuitlijning","HTML object":"HTML object",Huge:"Zeer groot","Image resize list":"Lijst voor wijzigen van afbeeldingsformaat","Image toolbar":"Afbeeldingswerkbalk","image widget":"afbeeldingswidget","In line":"In lijn","Increase indent":"Inspringen",Insert:"Invoegen","Insert column left":"Kolom links invoegen","Insert column right":"Kolom rechts invoegen","Insert image":"Afbeelding toevoegen","Insert image via URL":"Afbeelding toevoegen via URL","Insert paragraph after block":"Voeg paragraaf toe na blok","Insert paragraph before block":"Voeg paragraaf toe voor blok","Insert row above":"Rij hierboven invoegen","Insert row below":"Rij hieronder invoegen","Insert table":"Tabel invoegen",Inset:"Ingezet",Italic:"Cursief",Justify:"Volledig uitlijnen","Justify cell text":"Celtekst uitvullen","Left aligned image":"Links uitgelijnde afbeelding","Light blue":"Lichtblauw","Light green":"Lichtgroen","Light grey":"Lichtgrijs",Link:"Link","Link image":"Link afbeelding","Link URL":"Link URL","List properties":"Lijsteigenschappen","Lower-latin":"Kleine Latijnse letters","Lower–roman":"Kleine Romeinse cijfers","Merge cell down":"Cel hieronder samenvoegen","Merge cell left":"Cel hiervoor samenvoegen","Merge cell right":"Cel hierna samenvoegen","Merge cell up":"Cel hierboven samenvoegen","Merge cells":"Cellen samenvoegen",Next:"Volgende","No results found":"Geen zoekresultaten","No searchable items":"Geen zoekbare items",None:"Geen","Numbered List":"Genummerde lijst","Numbered list styles toolbar":"Toolbar voor stijlen van genummerde lijsten","Open in a new tab":"Open een nieuw tabblad","Open link in new tab":"Open link in nieuw tabblad",Orange:"Oranje",Original:"Origineel",Outset:"Opliggend",Padding:"Opvulling",Paragraph:"Paragraaf","Press Enter to type after or press Shift + Enter to type before the widget":"Druk op Enter om na de widget te typen of druk op Shift + Enter om vóór de widget te typen",Previous:"Vorige",Purple:"Paars",Red:"Rood",Redo:"Opnieuw","Remove color":"Verwijder kleur","Remove Format":"Verwijder opmaak","Replace from computer":"Vervangen vanaf de computer","Replace image":"Afbeelding vervangen","Replace image from computer":"Afbeelding vervangen vanaf computer","Resize image":"Afbeeldingsformaat wijzigen","Resize image to %0":"Afbeeldingsformaat wijzigen naar %0","Resize image to the original size":"Afbeeldingsformaat wijzigen naar originele grootte","Restore default":"Standaardinstellingen terugzetten","Reversed order":"Omgekeerde volgorde","Rich Text Editor":"Tekstbewerker",Ridge:"Rand","Right aligned image":"Rechts uitgelijnde afbeelding",Row:"Rij",Save:"Opslaan","Select all":"Selecteer alles","Select column":"Selecteer kolom","Select row":"Selecteer rij","Show more items":"Meer items weergeven","Side image":"Afbeelding naast tekst",Small:"Klein",Solid:"Ononderbroken","Split cell horizontally":"Splits cel horizontaal","Split cell vertically":"Splits cel verticaal",Square:"Vierkant","Start at":"Begin op","Start index must be greater than 0.":"Begin van index moet groter zijn dan 0.",Strikethrough:"Doorhalen",Style:"Stijl",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Werkbalk tabeluitlijning","Table cell text alignment":"Tekstuitlijning tabelcel","Table properties":"Tabeleigenschappen","Table toolbar":"Tabel werkbalk","Text alignment":"Tekst uitlijning","Text alignment toolbar":"Tekst uitlijning werkbalk","Text alternative":"Alt-tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'De kleur in niet correct, probeer "#FF0000" of "rgb(255,0,0)" of "red".','The value is invalid. Try "10px" or "2em" or simply "2".':"De waarde is ongeldig. Probeer '10px' of '2em' of gewoon '2'.","This link has no URL":"Deze link heeft geen URL",Tiny:"Zeer klein","To-do List":"To-do lijst","Toggle caption off":"Bijschrift uitzetten","Toggle caption on":"Bijschrift aanzetten","Toggle the circle list style":"Schakel de stijl van lijsten met cirkel in","Toggle the decimal list style":"Schakel de stijl van lijsten met cijfers in","Toggle the decimal with leading zero list style":"Schakel de stijl van lijsten met cijfers voorafgegaan door een nul in","Toggle the disc list style":"Schakel de stijl van lijsten met bulletpoint in","Toggle the lower–latin list style":"Schakel de stijl van lijsten met kleine Latijnse letters in","Toggle the lower–roman list style":"Schakel de stijl van lijsten met kleine Romeinse cijfers in","Toggle the square list style":"Schakel de stijl van lijsten met vierkant in","Toggle the upper–latin list style":"Schakel de stijl van lijsten met Latijnse hoofdletters in","Toggle the upper–roman list style":"Schakel de stijl van lijsten met grote Romeinse cijfers in",Turquoise:"Turquoise","Type or paste your content here.":"Voer of plak uw inhoud in.","Type your title":"Voor uw titel in",Underline:"Onderlijnen",Undo:"Ongedaan maken",Unlink:"Verwijder link",Update:"Update","Update image URL":"URL van afbeelding bijwerken","Upload failed":"Uploaden afbeelding mislukt","Upload from computer":"Uploaden vanaf computer","Upload image from computer":"Afbeelding uploaden vanaf de computer","Upload in progress":"Bezig met uploaden","Upper-latin":"Latijnse hoofdletters","Upper-roman":"Grote Romeinse cijfers","Vertical text alignment toolbar":"Werkbalk voor verticale tekstuitlijning",White:"Wit","Widget toolbar":"Widget werkbalk",Width:"Breedte","Wrap text":"Tekstterugloop",Yellow:"Geel"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.nl=e.nl||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 van %1",Accept:"Accepteren","Align cell text to the bottom":"Celtekst onder uitlijnen","Align cell text to the center":"Tekst in de cel centreren","Align cell text to the left":"Celtekst links uitlijnen","Align cell text to the middle":"Celtekst in het midden uitlijnen","Align cell text to the right":"Celtekst rechts uitlijnen","Align cell text to the top":"Celtekst boven uitlijnen","Align center":"Midden uitlijnen","Align left":"Links uitlijnen","Align right":"Rechts uitlijnen","Align table to the left":"Tabel links uitlijnen","Align table to the right":"Tabel rechts uitlijnen",Alignment:"Uitlijning",Aquamarine:"Aquamarijn",Background:"Achtergrond",Big:"Groot",Black:"Zwart","Block quote":"Blok citaat",Blue:"Blauw",Bold:"Vet",Border:"Rand","Break text":"Tekst afbreken","Bulleted List":"Ongenummerde lijst","Bulleted list styles toolbar":"Toolbar voor stijlen van opsommingslijsten",Cancel:"Annuleren","Caption for image: %0":"Bijschrift voor afbeelding: %0","Caption for the image":"Bijschrift voor afbeelding","Cell properties":"Celeigenschappen","Center table":"Tabel centreren","Centered image":"Gecentreerde afbeelding","Change image text alternative":"Verander alt-tekst van de afbeelding","Choose heading":"Kies kop",Circle:"Cirkel",Clear:"Wissen","Click to edit block":"Klik om blok te bewerken",Close:"Sluiten",Code:"Code",Color:"Kleur","Color picker":"Kleurkiezer",Column:"Kolom",Dashed:"Onderbroken",Decimal:"Decimaal","Decimal with leading zero":"Decimaal voorafgegaan door een nul","Decrease indent":"Minder inspringen",Default:"Standaard","Delete column":"Verwijder kolom","Delete row":"Verwijder rij","Dim grey":"Gedimd grijs",Dimensions:"Afmetingen",Disc:"Schijf","Document colors":"Document kleur",Dotted:"Stippellijn",Double:"Dubbel",Downloadable:"Downloadbaar","Drag to move":"Sleep om te verplaatsen","Dropdown toolbar":"Drop-down werkbalk","Edit block":"Blok aanpassen","Edit link":"Bewerk link","Editor block content toolbar":"Inhoud werkbalk voor editorblok","Editor contextual toolbar":"Contextuele werkbalk van editor","Editor dialog":"Dialoog bewerker","Editor editing area: %0":"Bewerkingsgebied: %0","Editor toolbar":"Editor welkbalk","Enter image caption":"Typ een afbeeldingsbijschrift","Enter table caption":"Voer tabelbijschrift in","Font Background Color":"Tekst achtergrondkleur","Font Color":"Tekstkleur","Font Family":"Lettertype","Font Size":"Lettergrootte","Full size image":"Afbeelding op volledige grootte",Green:"Groen",Grey:"Grijs",Groove:"Sleuf","Header column":"Titel kolom","Header row":"Titel rij",Heading:"Koppen","Heading 1":"Kop 1","Heading 2":"Kop 2","Heading 3":"Kop 3","Heading 4":"Kop 4","Heading 5":"Kop 5","Heading 6":"Kop 6",Height:"Hoogte",HEX:"HEX","Horizontal line":"Horizontale lijn","Horizontal text alignment toolbar":"Werkbalk voor horizontale tekstuitlijning","HTML object":"HTML object",Huge:"Zeer groot","Image resize list":"Lijst voor wijzigen van afbeeldingsformaat","Image toolbar":"Afbeeldingswerkbalk","image widget":"afbeeldingswidget","In line":"In lijn","Increase indent":"Inspringen",Insert:"Invoegen","Insert column left":"Kolom links invoegen","Insert column right":"Kolom rechts invoegen","Insert image":"Afbeelding toevoegen","Insert image via URL":"Afbeelding toevoegen via URL","Insert paragraph after block":"Voeg paragraaf toe na blok","Insert paragraph before block":"Voeg paragraaf toe voor blok","Insert row above":"Rij hierboven invoegen","Insert row below":"Rij hieronder invoegen","Insert table":"Tabel invoegen",Inset:"Ingezet",Italic:"Cursief",Justify:"Volledig uitlijnen","Justify cell text":"Celtekst uitvullen","Left aligned image":"Links uitgelijnde afbeelding","Light blue":"Lichtblauw","Light green":"Lichtgroen","Light grey":"Lichtgrijs",Link:"Link","Link image":"Link afbeelding","Link URL":"Link URL","List properties":"Lijsteigenschappen","Lower-latin":"Kleine Latijnse letters","Lower–roman":"Kleine Romeinse cijfers","Merge cell down":"Cel hieronder samenvoegen","Merge cell left":"Cel hiervoor samenvoegen","Merge cell right":"Cel hierna samenvoegen","Merge cell up":"Cel hierboven samenvoegen","Merge cells":"Cellen samenvoegen",Next:"Volgende","No results found":"Geen zoekresultaten","No searchable items":"Geen zoekbare items",None:"Geen","Numbered List":"Genummerde lijst","Numbered list styles toolbar":"Toolbar voor stijlen van genummerde lijsten","Open in a new tab":"Open een nieuw tabblad","Open link in new tab":"Open link in nieuw tabblad",Orange:"Oranje",Original:"Origineel",Outset:"Opliggend",Padding:"Opvulling",Paragraph:"Paragraaf","Press Enter to type after or press Shift + Enter to type before the widget":"Druk op Enter om na de widget te typen of druk op Shift + Enter om vóór de widget te typen",Previous:"Vorige",Purple:"Paars",Red:"Rood",Redo:"Opnieuw","Remove color":"Verwijder kleur","Remove Format":"Verwijder opmaak","Replace from computer":"Vervangen vanaf de computer","Replace image":"Afbeelding vervangen","Replace image from computer":"Afbeelding vervangen vanaf computer","Resize image":"Afbeeldingsformaat wijzigen","Resize image to %0":"Afbeeldingsformaat wijzigen naar %0","Resize image to the original size":"Afbeeldingsformaat wijzigen naar originele grootte","Restore default":"Standaardinstellingen terugzetten","Reversed order":"Omgekeerde volgorde","Rich Text Editor":"Tekstbewerker",Ridge:"Rand","Right aligned image":"Rechts uitgelijnde afbeelding",Row:"Rij",Save:"Opslaan","Select all":"Selecteer alles","Select column":"Selecteer kolom","Select row":"Selecteer rij","Show more items":"Meer items weergeven","Side image":"Afbeelding naast tekst",Small:"Klein",Solid:"Ononderbroken","Split cell horizontally":"Splits cel horizontaal","Split cell vertically":"Splits cel verticaal",Square:"Vierkant","Start at":"Begin op","Start index must be greater than 0.":"Begin van index moet groter zijn dan 0.",Strikethrough:"Doorhalen",Style:"Stijl",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Werkbalk tabeluitlijning","Table cell text alignment":"Tekstuitlijning tabelcel","Table properties":"Tabeleigenschappen","Table toolbar":"Tabel werkbalk","Text alignment":"Tekst uitlijning","Text alignment toolbar":"Tekst uitlijning werkbalk","Text alternative":"Alt-tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'De kleur in niet correct, probeer "#FF0000" of "rgb(255,0,0)" of "red".','The value is invalid. Try "10px" or "2em" or simply "2".':"De waarde is ongeldig. Probeer '10px' of '2em' of gewoon '2'.","This link has no URL":"Deze link heeft geen URL",Tiny:"Zeer klein","To-do List":"To-do lijst","Toggle caption off":"Bijschrift uitzetten","Toggle caption on":"Bijschrift aanzetten","Toggle the circle list style":"Schakel de stijl van lijsten met cirkel in","Toggle the decimal list style":"Schakel de stijl van lijsten met cijfers in","Toggle the decimal with leading zero list style":"Schakel de stijl van lijsten met cijfers voorafgegaan door een nul in","Toggle the disc list style":"Schakel de stijl van lijsten met bulletpoint in","Toggle the lower–latin list style":"Schakel de stijl van lijsten met kleine Latijnse letters in","Toggle the lower–roman list style":"Schakel de stijl van lijsten met kleine Romeinse cijfers in","Toggle the square list style":"Schakel de stijl van lijsten met vierkant in","Toggle the upper–latin list style":"Schakel de stijl van lijsten met Latijnse hoofdletters in","Toggle the upper–roman list style":"Schakel de stijl van lijsten met grote Romeinse cijfers in",Turquoise:"Turquoise","Type or paste your content here.":"Voer of plak uw inhoud in.","Type your title":"Voor uw titel in",Underline:"Onderlijnen",Undo:"Ongedaan maken",Unlink:"Verwijder link",Update:"Update","Update image URL":"URL van afbeelding bijwerken","Upload failed":"Uploaden afbeelding mislukt","Upload from computer":"Uploaden vanaf computer","Upload image from computer":"Afbeelding uploaden vanaf de computer","Upload in progress":"Bezig met uploaden","Upper-latin":"Latijnse hoofdletters","Upper-roman":"Grote Romeinse cijfers","Vertical text alignment toolbar":"Werkbalk voor verticale tekstuitlijning",White:"Wit","Widget toolbar":"Widget werkbalk",Width:"Breedte","Wrap text":"Tekstterugloop",Yellow:"Geel"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/no.js b/public/static/plugs/ckeditor5/translations/no.js
index ddab9c226..6eac3a04a 100644
--- a/public/static/plugs/ckeditor5/translations/no.js
+++ b/public/static/plugs/ckeditor5/translations/no.js
@@ -1 +1 @@
-!function(e){const t=e.no=e.no||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 av %1",Accept:"Godta","Align cell text to the bottom":"Juster celletekst til bunn ","Align cell text to the center":"Juster celletekst til midten ","Align cell text to the left":"Juster celletekst til venstre ","Align cell text to the middle":"Juster celletekst til midten","Align cell text to the right":"Juster celletekst til høyre ","Align cell text to the top":"Juster celletekst til topp","Align center":"Midtstill","Align left":"Venstrejuster","Align right":"Høyrejuster","Align table to the left":"Juster tabell til venstre ","Align table to the right":"Juster tabell til høyre ",Alignment:"Justering",Aquamarine:"Akvamarin",Background:"Bakgrunn ",Big:"Stor",Black:"Svart","Block quote":"Blokksitat",Blue:"Blå",Bold:"Fet",Border:"Kantlinje ","Break text":"Bryt tekst","Bulleted List":"Punktliste","Bulleted list styles toolbar":"Verktøylinje for punktlistestiler",Cancel:"Avbryt","Caption for image: %0":"Bildetekst for bilde: %0","Caption for the image":"Bildetekst","Cell properties":"Celleegenskaper ","Center table":"Sentrer tabell ","Centered image":"Midtstilt bilde","Change image text alternative":"Endre tekstalternativ til bildet","Choose heading":"Velg overskrift",Circle:"Sirkel",Clear:"Slett","Click to edit block":"Klikk for å redigere blokk",Code:"Kode",Color:"Farge","Color picker":"Fargevalg ",Column:"Kolonne",Dashed:"Stiplet",Decimal:"Nummer","Decimal with leading zero":"Nummer med foranstilt null","Decrease indent":"Reduser innrykk",Default:"Standard","Delete column":"Slett kolonne","Delete row":"Slett rad","Dim grey":"Svak grå",Dimensions:"Dimensjoner",Disc:"Disk","Document colors":"Dokumentfarger",Dotted:"Stiplede",Double:"Dobbel ",Downloadable:"Nedlastbar","Drag to move":"Dra for å flytte","Dropdown toolbar":"Verktøylinje for nedtrekksliste","Edit block":"Rediger blokk","Edit link":"Rediger lenke","Editor block content toolbar":"Verktøylinje for blokkinnhold i redigeringsverktøy","Editor contextual toolbar":"Verktøylinje for kontekst i redigeringsverktøy","Editor editing area: %0":"Redigeringsområde for redigeringsverktøyet: %0","Editor toolbar":"Verktøylinje for redigeringsverktøy","Enter image caption":"Skriv inn bildetekst","Enter table caption":"Legg inn tabelltekst","Font Background Color":"Uthevingsfarge for tekst","Font Color":"Skriftfarge","Font Family":"Skrifttypefamilie","Font Size":"Skriftstørrelse","Full size image":"Bilde i full størrelse",Green:"Grønn",Grey:"Grå",Groove:"Grov","Header column":"Overskriftkolonne","Header row":"Overskriftrad",Heading:"Overskrift","Heading 1":"Overskrift 1","Heading 2":"Overskrift 2","Heading 3":"Overskrift 3","Heading 4":"Overskrift 4","Heading 5":"Overskrift 5","Heading 6":"Overskrift 6",Height:"Høyde",HEX:"HEX","Horizontal line":"Horisontal linje","Horizontal text alignment toolbar":"Verktøylinje for justering av tekst horisontalt ","HTML object":"HTML-objekt",Huge:"Veldig stor","Image resize list":"Nedtrekksliste for bildestørrelse","Image toolbar":"Verktøylinje for bilde","image widget":"Bilde-widget","In line":"Innlemmet","Increase indent":"Øk innrykk",Insert:"Sett inn","Insert column left":"Sett inn kolonne til venstre","Insert column right":"Sett inn kolonne til høyre","Insert image":"Sett inn bilde","Insert image via URL":"Sett inn bilde via URL","Insert paragraph after block":"Sett inn paragraf etter blokk","Insert paragraph before block":"Sett inn paragraf foran blokk","Insert row above":"Sett inn rad over","Insert row below":"Sett inn rad under","Insert table":"Sett inn tabell",Inset:"Innover",Italic:"Kursiv",Justify:"Blokkjuster","Justify cell text":"Rett celletekst ","Left aligned image":"Venstrejustert bilde","Light blue":"Lyseblå","Light green":"Lysegrønn","Light grey":"Lysegrå",Link:"Lenke","Link image":"Bildelenke","Link URL":"Lenke-URL","List properties":"Listeegenskaper","Lower-latin":"Små latinske tegn","Lower–roman":"Små romertall","Merge cell down":"Slå sammen celle under","Merge cell left":"Slå sammen celle til venstre","Merge cell right":"Slå sammen celle til høyre","Merge cell up":"Slå sammen celle over","Merge cells":"Slå sammen celler",Next:"Neste","No results found":"Ingen resultater","No searchable items":"Ingen søkbare elementer",None:"Ingen","Numbered List":"Nummerert liste","Numbered list styles toolbar":"Verktøylinje for stiler for nummererte lister","Open in a new tab":"Åpne i ny fane","Open link in new tab":"Åpne lenke i ny fane",Orange:"Oransje",Original:"Original",Outset:"Utover",Padding:"Fylling",Paragraph:"Avsnitt","Press Enter to type after or press Shift + Enter to type before the widget":"Trykk Enter for å skrive etter eller trykk Shift + Enter for å skrive før widgeten",Previous:"Forrige",Purple:"Lilla",Red:"Rød",Redo:"Gjør om","Remove color":"Fjern farge","Remove Format":"Fjern formatering","Replace from computer":"Erstatt fra datamaskin","Replace image":"Erstatt bilde","Replace image from computer":"Erstatt bilde fra datamaskinen","Resize image":"Endre bildestørrelse","Resize image to %0":"Endre bildestørrelse til %0","Resize image to the original size":"Endre bildestørrelse til originalstørrelse","Restore default":"Tilbakestill til standard","Reversed order":"Motsatt rekkefølge","Rich Text Editor":"Tekstredigeringsverktøy for rik tekst",Ridge:"Kjede","Right aligned image":"Høyrejustert bilde",Row:"Rad",Save:"Lagre","Select all":"Velg alt ","Select column":"Velg kolonne ","Select row":"Velg rad","Show more items":"Vis flere elementer","Side image":"Sidestilt bilde",Small:"Liten",Solid:"Hel","Split cell horizontally":"Del opp celle horisontalt","Split cell vertically":"Del opp celle vertikalt",Square:"Firkant","Start at":"Start ved","Start index must be greater than 0.":"Startindeks må være større enn 0.",Strikethrough:"Gjennomstreket",Style:"Stil ",Subscript:"Senket skrift",Superscript:"Hevet skrift","Table alignment toolbar":"Verktøylinje for justering av tabell ","Table cell text alignment":"Celle tekstjustering ","Table properties":"Egenskaper for tabell","Table toolbar":"Tabell verktøylinje ","Text alignment":"Tekstjustering","Text alignment toolbar":"Verktøylinje for tekstjustering","Text alternative":"Tekstalternativ",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"Ugyldig farge ",'The value is invalid. Try "10px" or "2em" or simply "2".':"Ugyldig verdi ","This link has no URL":"Denne lenken mangler en URL",Tiny:"Veldig liten","To-do List":"Oppgaveliste","Toggle caption off":"Veksle tabelltekst av","Toggle caption on":"Veksle tabelltekst på","Toggle the circle list style":"Veksle sirkellistestil","Toggle the decimal list style":"Veksle nummerlistestil","Toggle the decimal with leading zero list style":"Veksle listestilen med nummer med foranstilt null","Toggle the disc list style":"Veksle disklistestil","Toggle the lower–latin list style":"Veksle listestilen med små latinske tegn","Toggle the lower–roman list style":"Veksle listestilen med små romertall","Toggle the square list style":"Veksle firkantlistestil","Toggle the upper–latin list style":"Veksle listestilen med store latinske tegn","Toggle the upper–roman list style":"Veksle listestilen med store romertall",Turquoise:"Turkis","Type or paste your content here.":"Skriv eller lim inn ditt innhold her","Type your title":"Skriv inn tittel",Underline:"Understreket",Undo:"Angre",Unlink:"Fjern lenke",Update:"Oppdater","Update image URL":"Oppdater bilde-URL","Upload failed":"Kunne ikke laste opp","Upload from computer":"Last opp fra datamaskin","Upload image from computer":"Last opp bilde fra datamaskin","Upload in progress":"Laster opp fil","Upper-latin":"Store latinske tegn","Upper-roman":"Store romertall","Vertical text alignment toolbar":"Verktøylinje for justering av tekst vertikalt ",White:"Hvit","Widget toolbar":"Widget verktøylinje ",Width:"Bredde","Wrap text":"Omslutt",Yellow:"Gul"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.no=e.no||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 av %1",Accept:"Godta","Align cell text to the bottom":"Juster celletekst til bunn ","Align cell text to the center":"Juster celletekst til midten ","Align cell text to the left":"Juster celletekst til venstre ","Align cell text to the middle":"Juster celletekst til midten","Align cell text to the right":"Juster celletekst til høyre ","Align cell text to the top":"Juster celletekst til topp","Align center":"Midtstill","Align left":"Venstrejuster","Align right":"Høyrejuster","Align table to the left":"Juster tabell til venstre ","Align table to the right":"Juster tabell til høyre ",Alignment:"Justering",Aquamarine:"Akvamarin",Background:"Bakgrunn ",Big:"Stor",Black:"Svart","Block quote":"Blokksitat",Blue:"Blå",Bold:"Fet",Border:"Kantlinje ","Break text":"Bryt tekst","Bulleted List":"Punktliste","Bulleted list styles toolbar":"Verktøylinje for punktlistestiler",Cancel:"Avbryt","Caption for image: %0":"Bildetekst for bilde: %0","Caption for the image":"Bildetekst","Cell properties":"Celleegenskaper ","Center table":"Sentrer tabell ","Centered image":"Midtstilt bilde","Change image text alternative":"Endre tekstalternativ til bildet","Choose heading":"Velg overskrift",Circle:"Sirkel",Clear:"Slett","Click to edit block":"Klikk for å redigere blokk",Close:"Lukk",Code:"Kode",Color:"Farge","Color picker":"Fargevalg ",Column:"Kolonne",Dashed:"Stiplet",Decimal:"Nummer","Decimal with leading zero":"Nummer med foranstilt null","Decrease indent":"Reduser innrykk",Default:"Standard","Delete column":"Slett kolonne","Delete row":"Slett rad","Dim grey":"Svak grå",Dimensions:"Dimensjoner",Disc:"Disk","Document colors":"Dokumentfarger",Dotted:"Stiplede",Double:"Dobbel ",Downloadable:"Nedlastbar","Drag to move":"Dra for å flytte","Dropdown toolbar":"Verktøylinje for nedtrekksliste","Edit block":"Rediger blokk","Edit link":"Rediger lenke","Editor block content toolbar":"Verktøylinje for blokkinnhold i redigeringsverktøy","Editor contextual toolbar":"Verktøylinje for kontekst i redigeringsverktøy","Editor dialog":"Dialogboks for redigering","Editor editing area: %0":"Redigeringsområde for redigeringsverktøyet: %0","Editor toolbar":"Verktøylinje for redigeringsverktøy","Enter image caption":"Skriv inn bildetekst","Enter table caption":"Legg inn tabelltekst","Font Background Color":"Uthevingsfarge for tekst","Font Color":"Skriftfarge","Font Family":"Skrifttypefamilie","Font Size":"Skriftstørrelse","Full size image":"Bilde i full størrelse",Green:"Grønn",Grey:"Grå",Groove:"Grov","Header column":"Overskriftkolonne","Header row":"Overskriftrad",Heading:"Overskrift","Heading 1":"Overskrift 1","Heading 2":"Overskrift 2","Heading 3":"Overskrift 3","Heading 4":"Overskrift 4","Heading 5":"Overskrift 5","Heading 6":"Overskrift 6",Height:"Høyde",HEX:"HEX","Horizontal line":"Horisontal linje","Horizontal text alignment toolbar":"Verktøylinje for justering av tekst horisontalt ","HTML object":"HTML-objekt",Huge:"Veldig stor","Image resize list":"Nedtrekksliste for bildestørrelse","Image toolbar":"Verktøylinje for bilde","image widget":"Bilde-widget","In line":"Innlemmet","Increase indent":"Øk innrykk",Insert:"Sett inn","Insert column left":"Sett inn kolonne til venstre","Insert column right":"Sett inn kolonne til høyre","Insert image":"Sett inn bilde","Insert image via URL":"Sett inn bilde via URL","Insert paragraph after block":"Sett inn paragraf etter blokk","Insert paragraph before block":"Sett inn paragraf foran blokk","Insert row above":"Sett inn rad over","Insert row below":"Sett inn rad under","Insert table":"Sett inn tabell",Inset:"Innover",Italic:"Kursiv",Justify:"Blokkjuster","Justify cell text":"Rett celletekst ","Left aligned image":"Venstrejustert bilde","Light blue":"Lyseblå","Light green":"Lysegrønn","Light grey":"Lysegrå",Link:"Lenke","Link image":"Bildelenke","Link URL":"Lenke-URL","List properties":"Listeegenskaper","Lower-latin":"Små latinske tegn","Lower–roman":"Små romertall","Merge cell down":"Slå sammen celle under","Merge cell left":"Slå sammen celle til venstre","Merge cell right":"Slå sammen celle til høyre","Merge cell up":"Slå sammen celle over","Merge cells":"Slå sammen celler",Next:"Neste","No results found":"Ingen resultater","No searchable items":"Ingen søkbare elementer",None:"Ingen","Numbered List":"Nummerert liste","Numbered list styles toolbar":"Verktøylinje for stiler for nummererte lister","Open in a new tab":"Åpne i ny fane","Open link in new tab":"Åpne lenke i ny fane",Orange:"Oransje",Original:"Original",Outset:"Utover",Padding:"Fylling",Paragraph:"Avsnitt","Press Enter to type after or press Shift + Enter to type before the widget":"Trykk Enter for å skrive etter eller trykk Shift + Enter for å skrive før widgeten",Previous:"Forrige",Purple:"Lilla",Red:"Rød",Redo:"Gjør om","Remove color":"Fjern farge","Remove Format":"Fjern formatering","Replace from computer":"Erstatt fra datamaskin","Replace image":"Erstatt bilde","Replace image from computer":"Erstatt bilde fra datamaskinen","Resize image":"Endre bildestørrelse","Resize image to %0":"Endre bildestørrelse til %0","Resize image to the original size":"Endre bildestørrelse til originalstørrelse","Restore default":"Tilbakestill til standard","Reversed order":"Motsatt rekkefølge","Rich Text Editor":"Tekstredigeringsverktøy for rik tekst",Ridge:"Kjede","Right aligned image":"Høyrejustert bilde",Row:"Rad",Save:"Lagre","Select all":"Velg alt ","Select column":"Velg kolonne ","Select row":"Velg rad","Show more items":"Vis flere elementer","Side image":"Sidestilt bilde",Small:"Liten",Solid:"Hel","Split cell horizontally":"Del opp celle horisontalt","Split cell vertically":"Del opp celle vertikalt",Square:"Firkant","Start at":"Start ved","Start index must be greater than 0.":"Startindeks må være større enn 0.",Strikethrough:"Gjennomstreket",Style:"Stil ",Subscript:"Senket skrift",Superscript:"Hevet skrift","Table alignment toolbar":"Verktøylinje for justering av tabell ","Table cell text alignment":"Celle tekstjustering ","Table properties":"Egenskaper for tabell","Table toolbar":"Tabell verktøylinje ","Text alignment":"Tekstjustering","Text alignment toolbar":"Verktøylinje for tekstjustering","Text alternative":"Tekstalternativ",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"Ugyldig farge ",'The value is invalid. Try "10px" or "2em" or simply "2".':"Ugyldig verdi ","This link has no URL":"Denne lenken mangler en URL",Tiny:"Veldig liten","To-do List":"Oppgaveliste","Toggle caption off":"Veksle tabelltekst av","Toggle caption on":"Veksle tabelltekst på","Toggle the circle list style":"Veksle sirkellistestil","Toggle the decimal list style":"Veksle nummerlistestil","Toggle the decimal with leading zero list style":"Veksle listestilen med nummer med foranstilt null","Toggle the disc list style":"Veksle disklistestil","Toggle the lower–latin list style":"Veksle listestilen med små latinske tegn","Toggle the lower–roman list style":"Veksle listestilen med små romertall","Toggle the square list style":"Veksle firkantlistestil","Toggle the upper–latin list style":"Veksle listestilen med store latinske tegn","Toggle the upper–roman list style":"Veksle listestilen med store romertall",Turquoise:"Turkis","Type or paste your content here.":"Skriv eller lim inn ditt innhold her","Type your title":"Skriv inn tittel",Underline:"Understreket",Undo:"Angre",Unlink:"Fjern lenke",Update:"Oppdater","Update image URL":"Oppdater bilde-URL","Upload failed":"Kunne ikke laste opp","Upload from computer":"Last opp fra datamaskin","Upload image from computer":"Last opp bilde fra datamaskin","Upload in progress":"Laster opp fil","Upper-latin":"Store latinske tegn","Upper-roman":"Store romertall","Vertical text alignment toolbar":"Verktøylinje for justering av tekst vertikalt ",White:"Hvit","Widget toolbar":"Widget verktøylinje ",Width:"Bredde","Wrap text":"Omslutt",Yellow:"Gul"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/pl.js b/public/static/plugs/ckeditor5/translations/pl.js
index 1f872600e..482bccd88 100644
--- a/public/static/plugs/ckeditor5/translations/pl.js
+++ b/public/static/plugs/ckeditor5/translations/pl.js
@@ -1 +1 @@
-!function(e){const a=e.pl=e.pl||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 z %1",Accept:"Zaakceptuj","Align cell text to the bottom":"Wyrównaj tekst w komórce do dołu","Align cell text to the center":"Wyrównaj tekst w komórce do środka","Align cell text to the left":"Wyrównaj tekst w komórce do lewej","Align cell text to the middle":"Wyrównaj tekst w komórce do środka","Align cell text to the right":"Wyrównaj tekst w komórce do prawej","Align cell text to the top":"Wyrównaj tekst w komórce do góry","Align center":"Wyrównaj do środka","Align left":"Wyrównaj do lewej","Align right":"Wyrównaj do prawej","Align table to the left":"Wyrównaj tabelę do lewej","Align table to the right":"Wyrównaj tabelę do prawej",Alignment:"Wyrównanie",Aquamarine:"Akwamaryna",Background:"Tło",Big:"Duży",Black:"Czarny","Block quote":"Cytat blokowy",Blue:"Niebieski",Bold:"Pogrubienie",Border:"Obramowanie","Break text":"Rozbijaj tekst","Bulleted List":"Lista wypunktowana","Bulleted list styles toolbar":"Pasek z narzędziami: style listy z punktorami",Cancel:"Anuluj","Caption for image: %0":"Nagłówek do obrazu: %0","Caption for the image":"Nagłówek do obrazu","Cell properties":"Właściwości komórki","Center table":"Wyrównaj tabelę do środka","Centered image":"Obraz wyrównany do środka","Change image text alternative":"Zmień tekst zastępczy obrazka","Choose heading":"Wybierz nagłówek",Circle:"Kółko",Clear:"Wyczyść","Click to edit block":"Kliknij, aby edytować blok",Code:"Kod",Color:"Kolor","Color picker":"Wybór koloru",Column:"Kolumna",Dashed:"Kreskowane",Decimal:"Dziesiętne","Decimal with leading zero":"Dziesiętne z zerem wiodącym","Decrease indent":"Zmniejsz wcięcie",Default:"Domyślny","Delete column":"Usuń kolumnę","Delete row":"Usuń wiersz","Dim grey":"Ciemnoszary",Dimensions:"Wymiary",Disc:"Dysk","Document colors":"Kolory dokumentu",Dotted:"Kropkowane",Double:"Podwójne",Downloadable:"Do pobrania","Drag to move":"Przeciągnij, aby przenieść","Dropdown toolbar":"Rozwijany pasek narzędzi","Edit block":"Edytuj blok","Edit link":"Edytuj odnośnik","Editor block content toolbar":"Pasek zadań treści blokowej edytora","Editor contextual toolbar":"Kontekstowy pasek zadań edytora","Editor editing area: %0":"Obszar edycji edytora: %0","Editor toolbar":"Pasek narzędzi edytora","Enter image caption":"Wstaw tytuł obrazka","Enter table caption":"Wprowadź podpis tabeli","Font Background Color":"Kolor tła czcionki","Font Color":"Kolor czcionki","Font Family":"Czcionka","Font Size":"Rozmiar czcionki","Full size image":"Obraz w pełnym rozmiarze",Green:"Zielony",Grey:"Szary",Groove:"Wklęsłe","Header column":"Kolumna nagłówka","Header row":"Wiersz nagłówka",Heading:"Nagłówek","Heading 1":"Nagłówek 1","Heading 2":"Nagłówek 2","Heading 3":"Nagłówek 3","Heading 4":"Nagłówek 4","Heading 5":"Nagłówek 5","Heading 6":"Nagłówek 6",Height:"Wysokość",HEX:"SZESNASTKOWY","Horizontal line":"Linia pozioma","Horizontal text alignment toolbar":"Pasek narzędzi wyrównania tekstu w poziomie","HTML object":"Obiekt HTML",Huge:"Bardzo duży","Image resize list":"Lista: zmiana wielkości obrazu","Image toolbar":"Pasek narzędzi obrazka","image widget":"Obraz","In line":"W linii","Increase indent":"Zwiększ wcięcie",Insert:"Wstaw","Insert column left":"Wstaw kolumnę z lewej","Insert column right":"Wstaw kolumnę z prawej","Insert image":"Wstaw obraz","Insert image via URL":"Wstaw obraz z adresu URL","Insert paragraph after block":"Wstaw akapit po bloku","Insert paragraph before block":"Wstaw akapit przed blokiem","Insert row above":"Wstaw wiersz ponad","Insert row below":"Wstaw wiersz poniżej","Insert table":"Wstaw tabelę",Inset:"Zapadnięte",Italic:"Kursywa",Justify:"Wyrównaj obustronnie","Justify cell text":"Wyjustuj tekst komórki","Left aligned image":"Obraz wyrównany do lewej","Light blue":"Jasnoniebieski","Light green":"Jasnozielony","Light grey":"Jasnoszary",Link:"Wstaw odnośnik","Link image":"Wstaw odnośnik do obrazka","Link URL":"Adres URL","List properties":"Właściwości listy","Lower-latin":"Alfabet łaciński – małe litery","Lower–roman":"Małe cyfry rzymskie","Merge cell down":"Scal komórkę w dół","Merge cell left":"Scal komórkę w lewo","Merge cell right":"Scal komórkę w prawo","Merge cell up":"Scal komórkę w górę","Merge cells":"Scal komórki",Next:"Następny","No results found":"Nie znaleziono wyników","No searchable items":"Brak elementów do wyszukania",None:"Brak","Numbered List":"Lista numerowana","Numbered list styles toolbar":"Pasek z narzędziami: style listy numerowanej","Open in a new tab":"Otwórz w nowej zakładce","Open link in new tab":"Otwórz odnośnik w nowej zakładce",Orange:"Pomarańczowy",Original:"Oryginalny",Outset:"Wysunięte",Padding:"Dopełnienie",Paragraph:"Akapit","Press Enter to type after or press Shift + Enter to type before the widget":"Naciśnij Enter, aby pisać po widżecie, lub Shift + Enter, aby pisać przed widżetem",Previous:"Poprzedni",Purple:"Purpurowy",Red:"Czerwony",Redo:"Ponów","Remove color":"Usuń kolor","Remove Format":"Usuń formatowanie","Replace from computer":"Zastąp z komputera","Replace image":"Zastąp obraz","Replace image from computer":"Zastąp obraz z komputera","Resize image":"Zmień rozmiar obrazka","Resize image to %0":"Zmień rozmiar do %0","Resize image to the original size":"Przywróć oryginalny rozmiar obrazu","Restore default":"Przywróć domyślne","Reversed order":"Odwrócona kolejność","Rich Text Editor":"Edytor tekstu sformatowanego",Ridge:"Wypukłe","Right aligned image":"Obraz wyrównany do prawej",Row:"Wiersz",Save:"Zapisz","Select all":"Zaznacz wszystko","Select column":"Zaznacz kolumnę","Select row":"Zaznacz wiersz","Show more items":"Pokaż więcej","Side image":"Obraz dosunięty do brzegu, oblewany tekstem",Small:"Mały",Solid:"Ciągłe","Split cell horizontally":"Podziel komórkę poziomo","Split cell vertically":"Podziel komórkę pionowo",Square:"Kwadrat","Start at":"Zacznij od","Start index must be greater than 0.":"Wartość początkowa musi być większa niż 0.",Strikethrough:"Przekreślenie",Style:"Styl",Subscript:"Indeks dolny",Superscript:"Indeks górny","Table alignment toolbar":"Pasek narzędzi wyrównania tabeli","Table cell text alignment":"Wyrównanie tekstu komórki tabeli","Table properties":"Właściwości tabeli","Table toolbar":"Pasek narzędzi tabel","Text alignment":"Wyrównanie tekstu","Text alignment toolbar":"Pasek narzędzi wyrównania tekstu","Text alternative":"Tekst zastępczy obrazka",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Kolor jest niepoprawny. Spróbuj wpisać "#FF0000", "rgb(255,0,0)" lub "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Wartość jest niepoprawna. Spróbuj  wpisać "10px", "2em" lub po prostu "2".',"This link has no URL":"Nie podano adresu URL odnośnika",Tiny:"Bardzo mały","To-do List":"Lista rzeczy do zrobienia","Toggle caption off":"Ukryj podpis tabeli","Toggle caption on":"Pokaż podpis tabeli","Toggle the circle list style":"Włącz/wyłącz listę w stylu „kółko”","Toggle the decimal list style":"Włącz/wyłącz listę w stylu „dziesiętne”","Toggle the decimal with leading zero list style":"Włącz/wyłącz listę w stylu „dziesiętne z zerem wiodącym”","Toggle the disc list style":"Włącz/wyłącz listę w stylu „dysk”","Toggle the lower–latin list style":"Włącz/wyłącz listę w stylu „alfabet łaciński – małe litery”","Toggle the lower–roman list style":"Włącz/wyłącz listę w stylu „małe cyfry rzymskie”","Toggle the square list style":"Włącz/wyłącz listę w stylu „kwadrat”","Toggle the upper–latin list style":"Włącz/wyłącz listę w stylu „alfabet łaciński – wielkie litery”","Toggle the upper–roman list style":"Włącz/wyłącz listę w stylu „wielkie cyfry rzymskie”",Turquoise:"Turkusowy","Type or paste your content here.":"Wpisz lub wklej tutaj treść dokumentu.","Type your title":"Podaj tytuł",Underline:"Podkreślenie",Undo:"Cofnij",Unlink:"Usuń odnośnik",Update:"Zaktualizuj","Update image URL":"Uaktualnij obraz z adresu URL","Upload failed":"Przesyłanie obrazu nie powiodło się","Upload from computer":"Prześlij z komputera","Upload image from computer":"Prześlij obraz z komputera","Upload in progress":"Trwa przesyłanie","Upper-latin":"Alfabet łaciński – wielkie litery","Upper-roman":"Wielkie cyfry rzymskie","Vertical text alignment toolbar":"Pasek narzędzi wyrównania tekstu w pionie",White:"Biały","Widget toolbar":"Pasek widgetów",Width:"Szerokość","Wrap text":"Zawijaj tekst",Yellow:"Żółty"}),a.getPluralForm=function(e){return 1==e?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:1!=e&&e%10>=0&&e%10<=1||e%10>=5&&e%10<=9||e%100>=12&&e%100<=14?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.pl=e.pl||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 z %1",Accept:"Zaakceptuj","Align cell text to the bottom":"Wyrównaj tekst w komórce do dołu","Align cell text to the center":"Wyrównaj tekst w komórce do środka","Align cell text to the left":"Wyrównaj tekst w komórce do lewej","Align cell text to the middle":"Wyrównaj tekst w komórce do środka","Align cell text to the right":"Wyrównaj tekst w komórce do prawej","Align cell text to the top":"Wyrównaj tekst w komórce do góry","Align center":"Wyrównaj do środka","Align left":"Wyrównaj do lewej","Align right":"Wyrównaj do prawej","Align table to the left":"Wyrównaj tabelę do lewej","Align table to the right":"Wyrównaj tabelę do prawej",Alignment:"Wyrównanie",Aquamarine:"Akwamaryna",Background:"Tło",Big:"Duży",Black:"Czarny","Block quote":"Cytat blokowy",Blue:"Niebieski",Bold:"Pogrubienie",Border:"Obramowanie","Break text":"Rozbijaj tekst","Bulleted List":"Lista wypunktowana","Bulleted list styles toolbar":"Pasek z narzędziami: style listy z punktorami",Cancel:"Anuluj","Caption for image: %0":"Nagłówek do obrazu: %0","Caption for the image":"Nagłówek do obrazu","Cell properties":"Właściwości komórki","Center table":"Wyrównaj tabelę do środka","Centered image":"Obraz wyrównany do środka","Change image text alternative":"Zmień tekst zastępczy obrazka","Choose heading":"Wybierz nagłówek",Circle:"Kółko",Clear:"Wyczyść","Click to edit block":"Kliknij, aby edytować blok",Close:"Zamknij",Code:"Kod",Color:"Kolor","Color picker":"Wybór koloru",Column:"Kolumna",Dashed:"Kreskowane",Decimal:"Dziesiętne","Decimal with leading zero":"Dziesiętne z zerem wiodącym","Decrease indent":"Zmniejsz wcięcie",Default:"Domyślny","Delete column":"Usuń kolumnę","Delete row":"Usuń wiersz","Dim grey":"Ciemnoszary",Dimensions:"Wymiary",Disc:"Dysk","Document colors":"Kolory dokumentu",Dotted:"Kropkowane",Double:"Podwójne",Downloadable:"Do pobrania","Drag to move":"Przeciągnij, aby przenieść","Dropdown toolbar":"Rozwijany pasek narzędzi","Edit block":"Edytuj blok","Edit link":"Edytuj odnośnik","Editor block content toolbar":"Pasek zadań treści blokowej edytora","Editor contextual toolbar":"Kontekstowy pasek zadań edytora","Editor dialog":"Okno edytora","Editor editing area: %0":"Obszar edycji edytora: %0","Editor toolbar":"Pasek narzędzi edytora","Enter image caption":"Wstaw tytuł obrazka","Enter table caption":"Wprowadź podpis tabeli","Font Background Color":"Kolor tła czcionki","Font Color":"Kolor czcionki","Font Family":"Czcionka","Font Size":"Rozmiar czcionki","Full size image":"Obraz w pełnym rozmiarze",Green:"Zielony",Grey:"Szary",Groove:"Wklęsłe","Header column":"Kolumna nagłówka","Header row":"Wiersz nagłówka",Heading:"Nagłówek","Heading 1":"Nagłówek 1","Heading 2":"Nagłówek 2","Heading 3":"Nagłówek 3","Heading 4":"Nagłówek 4","Heading 5":"Nagłówek 5","Heading 6":"Nagłówek 6",Height:"Wysokość",HEX:"SZESNASTKOWY","Horizontal line":"Linia pozioma","Horizontal text alignment toolbar":"Pasek narzędzi wyrównania tekstu w poziomie","HTML object":"Obiekt HTML",Huge:"Bardzo duży","Image resize list":"Lista: zmiana wielkości obrazu","Image toolbar":"Pasek narzędzi obrazka","image widget":"Obraz","In line":"W linii","Increase indent":"Zwiększ wcięcie",Insert:"Wstaw","Insert column left":"Wstaw kolumnę z lewej","Insert column right":"Wstaw kolumnę z prawej","Insert image":"Wstaw obraz","Insert image via URL":"Wstaw obraz z adresu URL","Insert paragraph after block":"Wstaw akapit po bloku","Insert paragraph before block":"Wstaw akapit przed blokiem","Insert row above":"Wstaw wiersz ponad","Insert row below":"Wstaw wiersz poniżej","Insert table":"Wstaw tabelę",Inset:"Zapadnięte",Italic:"Kursywa",Justify:"Wyrównaj obustronnie","Justify cell text":"Wyjustuj tekst komórki","Left aligned image":"Obraz wyrównany do lewej","Light blue":"Jasnoniebieski","Light green":"Jasnozielony","Light grey":"Jasnoszary",Link:"Wstaw odnośnik","Link image":"Wstaw odnośnik do obrazka","Link URL":"Adres URL","List properties":"Właściwości listy","Lower-latin":"Alfabet łaciński – małe litery","Lower–roman":"Małe cyfry rzymskie","Merge cell down":"Scal komórkę w dół","Merge cell left":"Scal komórkę w lewo","Merge cell right":"Scal komórkę w prawo","Merge cell up":"Scal komórkę w górę","Merge cells":"Scal komórki",Next:"Następny","No results found":"Nie znaleziono wyników","No searchable items":"Brak elementów do wyszukania",None:"Brak","Numbered List":"Lista numerowana","Numbered list styles toolbar":"Pasek z narzędziami: style listy numerowanej","Open in a new tab":"Otwórz w nowej zakładce","Open link in new tab":"Otwórz odnośnik w nowej zakładce",Orange:"Pomarańczowy",Original:"Oryginalny",Outset:"Wysunięte",Padding:"Dopełnienie",Paragraph:"Akapit","Press Enter to type after or press Shift + Enter to type before the widget":"Naciśnij Enter, aby pisać po widżecie, lub Shift + Enter, aby pisać przed widżetem",Previous:"Poprzedni",Purple:"Purpurowy",Red:"Czerwony",Redo:"Ponów","Remove color":"Usuń kolor","Remove Format":"Usuń formatowanie","Replace from computer":"Zastąp z komputera","Replace image":"Zastąp obraz","Replace image from computer":"Zastąp obraz z komputera","Resize image":"Zmień rozmiar obrazka","Resize image to %0":"Zmień rozmiar do %0","Resize image to the original size":"Przywróć oryginalny rozmiar obrazu","Restore default":"Przywróć domyślne","Reversed order":"Odwrócona kolejność","Rich Text Editor":"Edytor tekstu sformatowanego",Ridge:"Wypukłe","Right aligned image":"Obraz wyrównany do prawej",Row:"Wiersz",Save:"Zapisz","Select all":"Zaznacz wszystko","Select column":"Zaznacz kolumnę","Select row":"Zaznacz wiersz","Show more items":"Pokaż więcej","Side image":"Obraz dosunięty do brzegu, oblewany tekstem",Small:"Mały",Solid:"Ciągłe","Split cell horizontally":"Podziel komórkę poziomo","Split cell vertically":"Podziel komórkę pionowo",Square:"Kwadrat","Start at":"Zacznij od","Start index must be greater than 0.":"Wartość początkowa musi być większa niż 0.",Strikethrough:"Przekreślenie",Style:"Styl",Subscript:"Indeks dolny",Superscript:"Indeks górny","Table alignment toolbar":"Pasek narzędzi wyrównania tabeli","Table cell text alignment":"Wyrównanie tekstu komórki tabeli","Table properties":"Właściwości tabeli","Table toolbar":"Pasek narzędzi tabel","Text alignment":"Wyrównanie tekstu","Text alignment toolbar":"Pasek narzędzi wyrównania tekstu","Text alternative":"Tekst zastępczy obrazka",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Kolor jest niepoprawny. Spróbuj wpisać "#FF0000", "rgb(255,0,0)" lub "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Wartość jest niepoprawna. Spróbuj  wpisać "10px", "2em" lub po prostu "2".',"This link has no URL":"Nie podano adresu URL odnośnika",Tiny:"Bardzo mały","To-do List":"Lista rzeczy do zrobienia","Toggle caption off":"Ukryj podpis tabeli","Toggle caption on":"Pokaż podpis tabeli","Toggle the circle list style":"Włącz/wyłącz listę w stylu „kółko”","Toggle the decimal list style":"Włącz/wyłącz listę w stylu „dziesiętne”","Toggle the decimal with leading zero list style":"Włącz/wyłącz listę w stylu „dziesiętne z zerem wiodącym”","Toggle the disc list style":"Włącz/wyłącz listę w stylu „dysk”","Toggle the lower–latin list style":"Włącz/wyłącz listę w stylu „alfabet łaciński – małe litery”","Toggle the lower–roman list style":"Włącz/wyłącz listę w stylu „małe cyfry rzymskie”","Toggle the square list style":"Włącz/wyłącz listę w stylu „kwadrat”","Toggle the upper–latin list style":"Włącz/wyłącz listę w stylu „alfabet łaciński – wielkie litery”","Toggle the upper–roman list style":"Włącz/wyłącz listę w stylu „wielkie cyfry rzymskie”",Turquoise:"Turkusowy","Type or paste your content here.":"Wpisz lub wklej tutaj treść dokumentu.","Type your title":"Podaj tytuł",Underline:"Podkreślenie",Undo:"Cofnij",Unlink:"Usuń odnośnik",Update:"Zaktualizuj","Update image URL":"Uaktualnij obraz z adresu URL","Upload failed":"Przesyłanie obrazu nie powiodło się","Upload from computer":"Prześlij z komputera","Upload image from computer":"Prześlij obraz z komputera","Upload in progress":"Trwa przesyłanie","Upper-latin":"Alfabet łaciński – wielkie litery","Upper-roman":"Wielkie cyfry rzymskie","Vertical text alignment toolbar":"Pasek narzędzi wyrównania tekstu w pionie",White:"Biały","Widget toolbar":"Pasek widgetów",Width:"Szerokość","Wrap text":"Zawijaj tekst",Yellow:"Żółty"}),a.getPluralForm=function(e){return 1==e?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:1!=e&&e%10>=0&&e%10<=1||e%10>=5&&e%10<=9||e%100>=12&&e%100<=14?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/pt-br.js b/public/static/plugs/ckeditor5/translations/pt-br.js
index de259c489..5ed66209f 100644
--- a/public/static/plugs/ckeditor5/translations/pt-br.js
+++ b/public/static/plugs/ckeditor5/translations/pt-br.js
@@ -1 +1 @@
-!function(e){const a=e["pt-br"]=e["pt-br"]||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceitar","Align cell text to the bottom":"Alinhar texto da célula para baixo","Align cell text to the center":"Alinhar texto da célula centralizado","Align cell text to the left":"Alinhar texto da célula para a esquerda","Align cell text to the middle":"Alinhar texto da célula para o meio","Align cell text to the right":"Alinhar texto da célula para a direita","Align cell text to the top":"Alinhar texto da célula para o topo","Align center":"Centralizar","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita","Align table to the left":"Alinhar tabela para esquerda","Align table to the right":"Alinhar tabela para direita",Alignment:"Alinhamento",Aquamarine:"Água-marinha",Background:"Cor de fundo",Big:"Grande",Black:"Preto","Block quote":"Bloco de citação",Blue:"Azul",Bold:"Negrito",Border:"Borda","Break text":"Quebrar texto","Bulleted List":"Lista com marcadores","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista com marcador",Cancel:"Cancelar","Caption for image: %0":"Legenda da imagem: %0","Caption for the image":"Legenda para a imagem","Cell properties":"Propriedades da célula","Center table":"Centralizar tabela","Centered image":"Imagem centralizada","Change image text alternative":"Alterar texto alternativo da imagem","Choose heading":"Escolha o título",Circle:"Círculo",Clear:"Limpar","Click to edit block":"Clicar para editar o bloco",Code:"Código",Color:"Cor","Color picker":"Seletor de cor",Column:"Coluna",Dashed:"Tracejada",Decimal:"Decimal","Decimal with leading zero":"Decimal com zero à esquerda","Decrease indent":"Diminuir recuo",Default:"Padrão","Delete column":"Excluir coluna","Delete row":"Excluir linha","Dim grey":"Cinza escuro",Dimensions:"Dimensões",Disc:"Disco","Document colors":"Cores do documento",Dotted:"Pontilhada",Double:"Dupla",Downloadable:"Pode ser baixado","Drag to move":"Arrastar para mover","Dropdown toolbar":"Barra de Ferramentas da Lista Suspensa","Edit block":"Editor de bloco","Edit link":"Editar link","Editor block content toolbar":"Barra de ferramentas de bloco do Editor","Editor contextual toolbar":"Barra de ferramentas contextual do Editor","Editor editing area: %0":"Área de edição do editor: %0","Editor toolbar":"Ferramentas do Editor","Enter image caption":"Inserir legenda da imagem","Enter table caption":"Inserir legenda da tabela","Font Background Color":"Cor de Fundo","Font Color":"Cor da Fonte","Font Family":"Fonte","Font Size":"Tamanho da fonte","Full size image":"Imagem completa",Green:"Verde",Grey:"Cinza",Groove:"Ranhura","Header column":"Coluna de cabeçalho","Header row":"Linha de cabeçalho",Heading:"Titulo","Heading 1":"Título 1","Heading 2":"Título 2","Heading 3":"Título 3","Heading 4":"Título 4","Heading 5":"Título 5","Heading 6":"Título 6",Height:"Altura",HEX:"Hexadecimal","Horizontal line":"Linha horizontal","Horizontal text alignment toolbar":"Ferramentas de alinhamento horizontal do texto","HTML object":"Objeto HTML",Huge:"Gigante","Image resize list":"Lista de redimensionamento de imagem","Image toolbar":"Ferramentas de Imagem","image widget":"Ferramenta de imagem","In line":"Na linha","Increase indent":"Aumentar recuo",Insert:"Inserir","Insert column left":"Inserir coluna à esquerda","Insert column right":"Inserir coluna à direita","Insert image":"Inserir imagem","Insert image via URL":"Inserir imagem via URL","Insert paragraph after block":"Inserir parágrafo após o bloco","Insert paragraph before block":"Inserir parágrafo antes do bloco","Insert row above":"Inserir linha acima","Insert row below":"Inserir linha abaixo","Insert table":"Inserir tabela",Inset:"Baixo relevo",Italic:"Itálico",Justify:"Justificar","Justify cell text":"Justificar texto da célula","Left aligned image":"Imagem alinhada à esquerda","Light blue":"Azul claro","Light green":"Verde claro","Light grey":"Cinza claro",Link:"Link","Link image":"Link com imagem","Link URL":"URL do link","List properties":"Propriedades da lista","Lower-latin":"Latim minúsculo","Lower–roman":"Romano minúsculo","Merge cell down":"Mesclar abaixo","Merge cell left":"Mesclar à esquerda","Merge cell right":"Mesclar à direita","Merge cell up":"Mesclar acima","Merge cells":"Mesclar células",Next:"Próximo","No results found":"Nenhum resultado encontrado","No searchable items":"Sem itens pesquisáveis",None:"Sem borda","Numbered List":"Lista numerada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","Open in a new tab":"Abrir em nova aba","Open link in new tab":"Abrir link em nova aba",Orange:"Laranja",Original:"Original",Outset:"Alto relevo",Padding:"Margem interna",Paragraph:"Parágrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Pressione Enter para digitar depois ou pressione Shift + Enter para digitar antes do widget",Previous:"Anterior",Purple:"Púrpura",Red:"Vermelho",Redo:"Refazer","Remove color":"Remover cor","Remove Format":"Remover Formatação","Replace from computer":"Substituir do computador","Replace image":"Substituir imagem","Replace image from computer":"Substituir a imagem do computador","Resize image":"Redimensionar imagem","Resize image to %0":"Redimensionar a imagem para %0","Resize image to the original size":"Redimensionar a imagem para o tamanho original","Restore default":"Restaurar padrão","Reversed order":"Ordem inversa","Rich Text Editor":"Editor de Formatação",Ridge:"Crista","Right aligned image":"Imagem alinhada à direita",Row:"Linha",Save:"Salvar","Select all":"Selecionar tudo","Select column":"Selecionar coluna","Select row":"Selecionar linha","Show more items":"Exibir mais itens","Side image":"Imagem lateral",Small:"Pequeno",Solid:"Sólida","Split cell horizontally":"Dividir horizontalmente","Split cell vertically":"Dividir verticalmente",Square:"Quadrado","Start at":"Iniciar em","Start index must be greater than 0.":"O índice inicial deve ser maior que 0.",Strikethrough:"Tachado",Style:"Estilo",Subscript:"Subscrito",Superscript:"Sobrescrito","Table alignment toolbar":"Ferramentas de alinhamento da tabela","Table cell text alignment":"Alinhamento do texto na célula","Table properties":"Propriedades da tabela","Table toolbar":"Ferramentas de Tabela","Text alignment":"Alinhamento do texto","Text alignment toolbar":"Ferramentas de alinhamento de texto","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Cor inválida. Tente "#FF0000" ou "rgb(255,0,0)" ou "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'Valor inválido. Tente "10px" ou "2em" ou apenas "2"',"This link has no URL":"Este link não possui uma URL",Tiny:"Minúsculo","To-do List":"Lista de Tarefas","Toggle caption off":"Desabilitar legenda","Toggle caption on":"Habilitar legenda","Toggle the circle list style":"Alternar o estilo da lista de círculo","Toggle the decimal list style":"Alternar o estilo de lista decimal","Toggle the decimal with leading zero list style":"Alternar o estilo de lista decimal com zero à esquerda","Toggle the disc list style":"Alternar o estilo da lista de disco","Toggle the lower–latin list style":"Alternar o estilo de lista latina minúscula","Toggle the lower–roman list style":"Alternar o estilo de lista romana minúscula","Toggle the square list style":"Alternar o estilo de lista quadrada","Toggle the upper–latin list style":"Alternar o estilo de lista latino maiúscula","Toggle the upper–roman list style":"Alternar o estilo de lista romana maiúscula",Turquoise:"Turquesa","Type or paste your content here.":"Digite ou cole o conteúdo aqui.","Type your title":"Digite o título",Underline:"Sublinhado",Undo:"Desfazer",Unlink:"Remover link",Update:"Atualizar","Update image URL":"Atualizar URL da imagem","Upload failed":"Falha ao enviar arquivo","Upload from computer":"Carregar do computador","Upload image from computer":"Carregar imagem do computador","Upload in progress":"Enviando dados","Upper-latin":"Latim maiúsculo","Upper-roman":"Romano maiúsculo","Vertical text alignment toolbar":"Ferramentas de alinhamento vertical do texto",White:"Branco","Widget toolbar":"Ferramentas de Widgets",Width:"Largura","Wrap text":"Texto ao redor",Yellow:"Amarelo"}),a.getPluralForm=function(e){return 0==e||1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e["pt-br"]=e["pt-br"]||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceitar","Align cell text to the bottom":"Alinhar texto da célula para baixo","Align cell text to the center":"Alinhar texto da célula centralizado","Align cell text to the left":"Alinhar texto da célula para a esquerda","Align cell text to the middle":"Alinhar texto da célula para o meio","Align cell text to the right":"Alinhar texto da célula para a direita","Align cell text to the top":"Alinhar texto da célula para o topo","Align center":"Centralizar","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita","Align table to the left":"Alinhar tabela para esquerda","Align table to the right":"Alinhar tabela para direita",Alignment:"Alinhamento",Aquamarine:"Água-marinha",Background:"Cor de fundo",Big:"Grande",Black:"Preto","Block quote":"Bloco de citação",Blue:"Azul",Bold:"Negrito",Border:"Borda","Break text":"Quebrar texto","Bulleted List":"Lista com marcadores","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista com marcador",Cancel:"Cancelar","Caption for image: %0":"Legenda da imagem: %0","Caption for the image":"Legenda para a imagem","Cell properties":"Propriedades da célula","Center table":"Centralizar tabela","Centered image":"Imagem centralizada","Change image text alternative":"Alterar texto alternativo da imagem","Choose heading":"Escolha o título",Circle:"Círculo",Clear:"Limpar","Click to edit block":"Clicar para editar o bloco",Close:"Fechar",Code:"Código",Color:"Cor","Color picker":"Seletor de cor",Column:"Coluna",Dashed:"Tracejada",Decimal:"Decimal","Decimal with leading zero":"Decimal com zero à esquerda","Decrease indent":"Diminuir recuo",Default:"Padrão","Delete column":"Excluir coluna","Delete row":"Excluir linha","Dim grey":"Cinza escuro",Dimensions:"Dimensões",Disc:"Disco","Document colors":"Cores do documento",Dotted:"Pontilhada",Double:"Dupla",Downloadable:"Pode ser baixado","Drag to move":"Arrastar para mover","Dropdown toolbar":"Barra de Ferramentas da Lista Suspensa","Edit block":"Editor de bloco","Edit link":"Editar link","Editor block content toolbar":"Barra de ferramentas de bloco do Editor","Editor contextual toolbar":"Barra de ferramentas contextual do Editor","Editor dialog":"Diálogo do editor","Editor editing area: %0":"Área de edição do editor: %0","Editor toolbar":"Ferramentas do Editor","Enter image caption":"Inserir legenda da imagem","Enter table caption":"Inserir legenda da tabela","Font Background Color":"Cor de Fundo","Font Color":"Cor da Fonte","Font Family":"Fonte","Font Size":"Tamanho da fonte","Full size image":"Imagem completa",Green:"Verde",Grey:"Cinza",Groove:"Ranhura","Header column":"Coluna de cabeçalho","Header row":"Linha de cabeçalho",Heading:"Titulo","Heading 1":"Título 1","Heading 2":"Título 2","Heading 3":"Título 3","Heading 4":"Título 4","Heading 5":"Título 5","Heading 6":"Título 6",Height:"Altura",HEX:"Hexadecimal","Horizontal line":"Linha horizontal","Horizontal text alignment toolbar":"Ferramentas de alinhamento horizontal do texto","HTML object":"Objeto HTML",Huge:"Gigante","Image resize list":"Lista de redimensionamento de imagem","Image toolbar":"Ferramentas de Imagem","image widget":"Ferramenta de imagem","In line":"Na linha","Increase indent":"Aumentar recuo",Insert:"Inserir","Insert column left":"Inserir coluna à esquerda","Insert column right":"Inserir coluna à direita","Insert image":"Inserir imagem","Insert image via URL":"Inserir imagem via URL","Insert paragraph after block":"Inserir parágrafo após o bloco","Insert paragraph before block":"Inserir parágrafo antes do bloco","Insert row above":"Inserir linha acima","Insert row below":"Inserir linha abaixo","Insert table":"Inserir tabela",Inset:"Baixo relevo",Italic:"Itálico",Justify:"Justificar","Justify cell text":"Justificar texto da célula","Left aligned image":"Imagem alinhada à esquerda","Light blue":"Azul claro","Light green":"Verde claro","Light grey":"Cinza claro",Link:"Link","Link image":"Link com imagem","Link URL":"URL do link","List properties":"Propriedades da lista","Lower-latin":"Latim minúsculo","Lower–roman":"Romano minúsculo","Merge cell down":"Mesclar abaixo","Merge cell left":"Mesclar à esquerda","Merge cell right":"Mesclar à direita","Merge cell up":"Mesclar acima","Merge cells":"Mesclar células",Next:"Próximo","No results found":"Nenhum resultado encontrado","No searchable items":"Sem itens pesquisáveis",None:"Sem borda","Numbered List":"Lista numerada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","Open in a new tab":"Abrir em nova aba","Open link in new tab":"Abrir link em nova aba",Orange:"Laranja",Original:"Original",Outset:"Alto relevo",Padding:"Margem interna",Paragraph:"Parágrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Pressione Enter para digitar depois ou pressione Shift + Enter para digitar antes do widget",Previous:"Anterior",Purple:"Púrpura",Red:"Vermelho",Redo:"Refazer","Remove color":"Remover cor","Remove Format":"Remover Formatação","Replace from computer":"Substituir do computador","Replace image":"Substituir imagem","Replace image from computer":"Substituir a imagem do computador","Resize image":"Redimensionar imagem","Resize image to %0":"Redimensionar a imagem para %0","Resize image to the original size":"Redimensionar a imagem para o tamanho original","Restore default":"Restaurar padrão","Reversed order":"Ordem inversa","Rich Text Editor":"Editor de Formatação",Ridge:"Crista","Right aligned image":"Imagem alinhada à direita",Row:"Linha",Save:"Salvar","Select all":"Selecionar tudo","Select column":"Selecionar coluna","Select row":"Selecionar linha","Show more items":"Exibir mais itens","Side image":"Imagem lateral",Small:"Pequeno",Solid:"Sólida","Split cell horizontally":"Dividir horizontalmente","Split cell vertically":"Dividir verticalmente",Square:"Quadrado","Start at":"Iniciar em","Start index must be greater than 0.":"O índice inicial deve ser maior que 0.",Strikethrough:"Tachado",Style:"Estilo",Subscript:"Subscrito",Superscript:"Sobrescrito","Table alignment toolbar":"Ferramentas de alinhamento da tabela","Table cell text alignment":"Alinhamento do texto na célula","Table properties":"Propriedades da tabela","Table toolbar":"Ferramentas de Tabela","Text alignment":"Alinhamento do texto","Text alignment toolbar":"Ferramentas de alinhamento de texto","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Cor inválida. Tente "#FF0000" ou "rgb(255,0,0)" ou "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'Valor inválido. Tente "10px" ou "2em" ou apenas "2"',"This link has no URL":"Este link não possui uma URL",Tiny:"Minúsculo","To-do List":"Lista de Tarefas","Toggle caption off":"Desabilitar legenda","Toggle caption on":"Habilitar legenda","Toggle the circle list style":"Alternar o estilo da lista de círculo","Toggle the decimal list style":"Alternar o estilo de lista decimal","Toggle the decimal with leading zero list style":"Alternar o estilo de lista decimal com zero à esquerda","Toggle the disc list style":"Alternar o estilo da lista de disco","Toggle the lower–latin list style":"Alternar o estilo de lista latina minúscula","Toggle the lower–roman list style":"Alternar o estilo de lista romana minúscula","Toggle the square list style":"Alternar o estilo de lista quadrada","Toggle the upper–latin list style":"Alternar o estilo de lista latino maiúscula","Toggle the upper–roman list style":"Alternar o estilo de lista romana maiúscula",Turquoise:"Turquesa","Type or paste your content here.":"Digite ou cole o conteúdo aqui.","Type your title":"Digite o título",Underline:"Sublinhado",Undo:"Desfazer",Unlink:"Remover link",Update:"Atualizar","Update image URL":"Atualizar URL da imagem","Upload failed":"Falha ao enviar arquivo","Upload from computer":"Carregar do computador","Upload image from computer":"Carregar imagem do computador","Upload in progress":"Enviando dados","Upper-latin":"Latim maiúsculo","Upper-roman":"Romano maiúsculo","Vertical text alignment toolbar":"Ferramentas de alinhamento vertical do texto",White:"Branco","Widget toolbar":"Ferramentas de Widgets",Width:"Largura","Wrap text":"Texto ao redor",Yellow:"Amarelo"}),a.getPluralForm=function(e){return 0==e||1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/pt.js b/public/static/plugs/ckeditor5/translations/pt.js
index 86515d588..68d9dbb3d 100644
--- a/public/static/plugs/ckeditor5/translations/pt.js
+++ b/public/static/plugs/ckeditor5/translations/pt.js
@@ -1 +1 @@
-!function(e){const a=e.pt=e.pt||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceitar","Align cell text to the bottom":"Alinhar texto da célula no fundo","Align cell text to the center":"Alinhar texto da célula ao centro","Align cell text to the left":"Alinhar texto da célula à esquerda","Align cell text to the middle":"Alinhar texto da célula ao meio","Align cell text to the right":"Alinhar texto da célula à direita","Align cell text to the top":"Alinhar texto da célula no topo","Align center":"Alinhar ao centro","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita","Align table to the left":"Alinhar tabela à esquerda","Align table to the right":"Alinhar tabela à direita",Alignment:"Alinhamento",Aquamarine:"Verde-azulado",Background:"Fundo",Big:"Grande",Black:"Preto","Block quote":"Bloco de citação",Blue:"Azul",Bold:"Negrito",Border:"Limite","Break text":"Quebrar texto","Bulleted List":"Lista não ordenada","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista de itens",Cancel:"Cancelar","Caption for image: %0":"Legenda da imagem: %0","Caption for the image":"Legenda da imagem","Cell properties":"Propriedades da célula","Center table":"Centrar tabela","Centered image":"Imagem centrada","Change image text alternative":"Alterar texto alternativo da imagem","Choose heading":"Escolher cabeçalho",Circle:"Círculo",Clear:"Limpar","Click to edit block":"Clique para editar o bloco",Code:"Código",Color:"Cor","Color picker":"Selecionador de cor",Column:"Coluna",Dashed:"Tracejado",Decimal:"Decimal","Decimal with leading zero":"Decimal com zero inicial","Decrease indent":"Diminuir indentação",Default:"Padrão","Delete column":"Eliminar coluna","Delete row":"Eliminar fila","Dim grey":"Cinzento-escuro",Dimensions:"Dimensões",Disc:"Disco","Document colors":"Cores do documento",Dotted:"Pontilhado",Double:"Duplo",Downloadable:"Descarregável","Drag to move":"Arraste para mover","Dropdown toolbar":"Barra de ferramentas do dropdown","Edit block":"Editar bloco","Edit link":"Editar link","Editor block content toolbar":"Barra de ferramentas de edição do conteúdo de blocos","Editor contextual toolbar":"Barra de ferramentas contextual de edição","Editor editing area: %0":"Área de edição do editor: %0","Editor toolbar":"Barra de ferramentas do editor","Enter image caption":"Indicar legenda da imagem","Enter table caption":"Introduzir legenda da tabela","Font Background Color":"Cor de Fundo da Fonte","Font Color":"Cor da Fonte","Font Family":"Família de Fontes","Font Size":"Tamanho da Fonte","Full size image":"Imagem em tamanho completo",Green:"Verde",Grey:"Cinzento",Groove:"Sulcos","Header column":"Coluna de cabeçalho","Header row":"Filha de cabeçalho",Heading:"Cabeçalho","Heading 1":"Cabeçalho 1","Heading 2":"Cabeçalho 2","Heading 3":"Cabeçalho 3","Heading 4":"Cabeçalho 4","Heading 5":"Cabeçalho 5","Heading 6":"Cabeçalho 6",Height:"Altura",HEX:"HEX","Horizontal line":"Linha horizontal","Horizontal text alignment toolbar":"Barra de ferramentas do alinhamento horizontal de texto","HTML object":"Objeto HTML",Huge:"Enorme","Image resize list":"Lista de redimensionamento de imagem","Image toolbar":"Barra de ferramentas de imagem","image widget":"módulo de imagem","In line":"Em linha","Increase indent":"Aumentar indentação",Insert:"Inserir","Insert column left":"Inserir coluna à esquerda","Insert column right":"Inserir coluna à direita","Insert image":"Inserir imagem","Insert image via URL":"Inserir imagem através de URL","Insert paragraph after block":"Inserir parágrafo após o bloco","Insert paragraph before block":"Inserir parágrafo antes do bloco","Insert row above":"Inserir fila acima","Insert row below":"Inserir fila abaixo","Insert table":"Inserir tabela",Inset:"Interior",Italic:"Itálico",Justify:"Justificar","Justify cell text":"Justificar texto da célula","Left aligned image":"Imagem alinhada à esquerda","Light blue":"Azul-claro","Light green":"Verde-claro","Light grey":"Cinzento-claro",Link:"Hiperligação","Link image":"Adicionar link a imagem","Link URL":"URL da ligação","List properties":"Propriedades da lista","Lower-latin":"Latim minúsculo","Lower–roman":"Romano minúsculo","Merge cell down":"Unir célula abaixo","Merge cell left":"Unir célula à esquerda","Merge cell right":"Unir célula à direita","Merge cell up":"Unir célula acima","Merge cells":"Fundir células",Next:"Seguinte","No results found":"Nenhum resultado encontrado","No searchable items":"Nenhum item pesquisável",None:"Nenhum","Numbered List":"Lista ordenada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","Open in a new tab":"Abrir num novo separador","Open link in new tab":"Abrir link num novo separador",Orange:"Laranja",Original:"Original",Outset:"Exterior",Padding:"Enchimento",Paragraph:"Parágrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Prima Enter para escrever depois ou Shift + Enter para escrever antes do widget",Previous:"Anterior",Purple:"Roxo",Red:"Vermelho",Redo:"Refazer","Remove color":"Remover cor","Remove Format":"Remover formatação","Replace from computer":"Substituir a partir do computador","Replace image":"Substituir imagem","Replace image from computer":"Substituir imagem a partir do computador","Resize image":"Redimensionar imagem","Resize image to %0":"Redimensionar imagem para %0","Resize image to the original size":"Redimensionar imagem para tamanho original","Restore default":"Restaurar predefinição","Reversed order":"Ordem invertida","Rich Text Editor":"Editor de texto avançado",Ridge:"Rebordo","Right aligned image":"Imagem alinhada à direita",Row:"Fila",Save:"Guardar","Select all":"Selecionar todos","Select column":"Selecionar coluna","Select row":"Selecionar fila","Show more items":"Mostrar mais itens","Side image":"Imagem lateral",Small:"Pequena",Solid:"Sólido","Split cell horizontally":"Dividir célula horizontalmente","Split cell vertically":"Dividir célula verticalmente",Square:"Quadrado","Start at":"Começa em","Start index must be greater than 0.":"O índice inicial tem de ser superior a 0.",Strikethrough:"Riscado",Style:"Estilo",Subscript:"Subscrito",Superscript:"Sobrescrito","Table alignment toolbar":"Barra de ferramentas do alinhamento da tabela","Table cell text alignment":"Alinhamento de texto das células da tabela","Table properties":"Propriedades da tabela","Table toolbar":"Barra de ferramentas da tabela","Text alignment":"Alinhamento de texto","Text alignment toolbar":"Barra de alinhamento de texto","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'A cor é inválida. Tente "#FF0000" ou "rgb(255,0,0)" ou "vermelho".','The value is invalid. Try "10px" or "2em" or simply "2".':'O valor é inválido. Tente "10px" ou "2em" ou simplesmente "2".',"This link has no URL":"Este link não tem URL",Tiny:"Mínima","To-do List":"Lista de Afazeres","Toggle caption off":"Desativar legenda","Toggle caption on":"Ativar legenda","Toggle the circle list style":"Ativar o estilo de lista de círculos","Toggle the decimal list style":"Ativar o estilo de lista decimal","Toggle the decimal with leading zero list style":"Ativar o estilo de lista decimal com zero inicial","Toggle the disc list style":"Ativar o estilo de lista de discos","Toggle the lower–latin list style":"Ativar o estilo de lista de latim minúsculo","Toggle the lower–roman list style":"Ativar o estilo de lista de números romanos minúsculos","Toggle the square list style":"Ativar o estilo de lista de quadrados","Toggle the upper–latin list style":"Ativar o estilo de lista de latim maiúsculo","Toggle the upper–roman list style":"Ativar o estilo de lista de números romanos maiúsculos",Turquoise:"Turquesa","Type or paste your content here.":"Digite ou cole o seu conteúdo aqui.","Type your title":"Introduza o seu título",Underline:"Sublinhado",Undo:"Desfazer",Unlink:"Desligar",Update:"Atualizar","Update image URL":"Atualizar URL da imagem","Upload failed":"Falha ao carregar","Upload from computer":"Carregar a partir do computador","Upload image from computer":"Carregar imagem a partir do computador","Upload in progress":"Carregamento em progresso","Upper-latin":"Latim maiúsculo","Upper-roman":"Romano maiúsculo","Vertical text alignment toolbar":"Barra de ferramentas do alinhamento vertical de texto",White:"Branco","Widget toolbar":"Barra de ferramentas do widget",Width:"Largura","Wrap text":"Envolver texto",Yellow:"Amarelo"}),a.getPluralForm=function(e){return 0==e||1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.pt=e.pt||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 de %1",Accept:"Aceitar","Align cell text to the bottom":"Alinhar texto da célula no fundo","Align cell text to the center":"Alinhar texto da célula ao centro","Align cell text to the left":"Alinhar texto da célula à esquerda","Align cell text to the middle":"Alinhar texto da célula ao meio","Align cell text to the right":"Alinhar texto da célula à direita","Align cell text to the top":"Alinhar texto da célula no topo","Align center":"Alinhar ao centro","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita","Align table to the left":"Alinhar tabela à esquerda","Align table to the right":"Alinhar tabela à direita",Alignment:"Alinhamento",Aquamarine:"Verde-azulado",Background:"Fundo",Big:"Grande",Black:"Preto","Block quote":"Bloco de citação",Blue:"Azul",Bold:"Negrito",Border:"Limite","Break text":"Quebrar texto","Bulleted List":"Lista não ordenada","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista de itens",Cancel:"Cancelar","Caption for image: %0":"Legenda da imagem: %0","Caption for the image":"Legenda da imagem","Cell properties":"Propriedades da célula","Center table":"Centrar tabela","Centered image":"Imagem centrada","Change image text alternative":"Alterar texto alternativo da imagem","Choose heading":"Escolher cabeçalho",Circle:"Círculo",Clear:"Limpar","Click to edit block":"Clique para editar o bloco",Close:"Fechar",Code:"Código",Color:"Cor","Color picker":"Selecionador de cor",Column:"Coluna",Dashed:"Tracejado",Decimal:"Decimal","Decimal with leading zero":"Decimal com zero inicial","Decrease indent":"Diminuir indentação",Default:"Padrão","Delete column":"Eliminar coluna","Delete row":"Eliminar fila","Dim grey":"Cinzento-escuro",Dimensions:"Dimensões",Disc:"Disco","Document colors":"Cores do documento",Dotted:"Pontilhado",Double:"Duplo",Downloadable:"Descarregável","Drag to move":"Arraste para mover","Dropdown toolbar":"Barra de ferramentas do dropdown","Edit block":"Editar bloco","Edit link":"Editar link","Editor block content toolbar":"Barra de ferramentas de edição do conteúdo de blocos","Editor contextual toolbar":"Barra de ferramentas contextual de edição","Editor dialog":"Diálogo do editor","Editor editing area: %0":"Área de edição do editor: %0","Editor toolbar":"Barra de ferramentas do editor","Enter image caption":"Indicar legenda da imagem","Enter table caption":"Introduzir legenda da tabela","Font Background Color":"Cor de Fundo da Fonte","Font Color":"Cor da Fonte","Font Family":"Família de Fontes","Font Size":"Tamanho da Fonte","Full size image":"Imagem em tamanho completo",Green:"Verde",Grey:"Cinzento",Groove:"Sulcos","Header column":"Coluna de cabeçalho","Header row":"Filha de cabeçalho",Heading:"Cabeçalho","Heading 1":"Cabeçalho 1","Heading 2":"Cabeçalho 2","Heading 3":"Cabeçalho 3","Heading 4":"Cabeçalho 4","Heading 5":"Cabeçalho 5","Heading 6":"Cabeçalho 6",Height:"Altura",HEX:"HEX","Horizontal line":"Linha horizontal","Horizontal text alignment toolbar":"Barra de ferramentas do alinhamento horizontal de texto","HTML object":"Objeto HTML",Huge:"Enorme","Image resize list":"Lista de redimensionamento de imagem","Image toolbar":"Barra de ferramentas de imagem","image widget":"módulo de imagem","In line":"Em linha","Increase indent":"Aumentar indentação",Insert:"Inserir","Insert column left":"Inserir coluna à esquerda","Insert column right":"Inserir coluna à direita","Insert image":"Inserir imagem","Insert image via URL":"Inserir imagem através de URL","Insert paragraph after block":"Inserir parágrafo após o bloco","Insert paragraph before block":"Inserir parágrafo antes do bloco","Insert row above":"Inserir fila acima","Insert row below":"Inserir fila abaixo","Insert table":"Inserir tabela",Inset:"Interior",Italic:"Itálico",Justify:"Justificar","Justify cell text":"Justificar texto da célula","Left aligned image":"Imagem alinhada à esquerda","Light blue":"Azul-claro","Light green":"Verde-claro","Light grey":"Cinzento-claro",Link:"Hiperligação","Link image":"Adicionar link a imagem","Link URL":"URL da ligação","List properties":"Propriedades da lista","Lower-latin":"Latim minúsculo","Lower–roman":"Romano minúsculo","Merge cell down":"Unir célula abaixo","Merge cell left":"Unir célula à esquerda","Merge cell right":"Unir célula à direita","Merge cell up":"Unir célula acima","Merge cells":"Fundir células",Next:"Seguinte","No results found":"Nenhum resultado encontrado","No searchable items":"Nenhum item pesquisável",None:"Nenhum","Numbered List":"Lista ordenada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","Open in a new tab":"Abrir num novo separador","Open link in new tab":"Abrir link num novo separador",Orange:"Laranja",Original:"Original",Outset:"Exterior",Padding:"Enchimento",Paragraph:"Parágrafo","Press Enter to type after or press Shift + Enter to type before the widget":"Prima Enter para escrever depois ou Shift + Enter para escrever antes do widget",Previous:"Anterior",Purple:"Roxo",Red:"Vermelho",Redo:"Refazer","Remove color":"Remover cor","Remove Format":"Remover formatação","Replace from computer":"Substituir a partir do computador","Replace image":"Substituir imagem","Replace image from computer":"Substituir imagem a partir do computador","Resize image":"Redimensionar imagem","Resize image to %0":"Redimensionar imagem para %0","Resize image to the original size":"Redimensionar imagem para tamanho original","Restore default":"Restaurar predefinição","Reversed order":"Ordem invertida","Rich Text Editor":"Editor de texto avançado",Ridge:"Rebordo","Right aligned image":"Imagem alinhada à direita",Row:"Fila",Save:"Guardar","Select all":"Selecionar todos","Select column":"Selecionar coluna","Select row":"Selecionar fila","Show more items":"Mostrar mais itens","Side image":"Imagem lateral",Small:"Pequena",Solid:"Sólido","Split cell horizontally":"Dividir célula horizontalmente","Split cell vertically":"Dividir célula verticalmente",Square:"Quadrado","Start at":"Começa em","Start index must be greater than 0.":"O índice inicial tem de ser superior a 0.",Strikethrough:"Riscado",Style:"Estilo",Subscript:"Subscrito",Superscript:"Sobrescrito","Table alignment toolbar":"Barra de ferramentas do alinhamento da tabela","Table cell text alignment":"Alinhamento de texto das células da tabela","Table properties":"Propriedades da tabela","Table toolbar":"Barra de ferramentas da tabela","Text alignment":"Alinhamento de texto","Text alignment toolbar":"Barra de alinhamento de texto","Text alternative":"Texto alternativo",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'A cor é inválida. Tente "#FF0000" ou "rgb(255,0,0)" ou "vermelho".','The value is invalid. Try "10px" or "2em" or simply "2".':'O valor é inválido. Tente "10px" ou "2em" ou simplesmente "2".',"This link has no URL":"Este link não tem URL",Tiny:"Mínima","To-do List":"Lista de Afazeres","Toggle caption off":"Desativar legenda","Toggle caption on":"Ativar legenda","Toggle the circle list style":"Ativar o estilo de lista de círculos","Toggle the decimal list style":"Ativar o estilo de lista decimal","Toggle the decimal with leading zero list style":"Ativar o estilo de lista decimal com zero inicial","Toggle the disc list style":"Ativar o estilo de lista de discos","Toggle the lower–latin list style":"Ativar o estilo de lista de latim minúsculo","Toggle the lower–roman list style":"Ativar o estilo de lista de números romanos minúsculos","Toggle the square list style":"Ativar o estilo de lista de quadrados","Toggle the upper–latin list style":"Ativar o estilo de lista de latim maiúsculo","Toggle the upper–roman list style":"Ativar o estilo de lista de números romanos maiúsculos",Turquoise:"Turquesa","Type or paste your content here.":"Digite ou cole o seu conteúdo aqui.","Type your title":"Introduza o seu título",Underline:"Sublinhado",Undo:"Desfazer",Unlink:"Desligar",Update:"Atualizar","Update image URL":"Atualizar URL da imagem","Upload failed":"Falha ao carregar","Upload from computer":"Carregar a partir do computador","Upload image from computer":"Carregar imagem a partir do computador","Upload in progress":"Carregamento em progresso","Upper-latin":"Latim maiúsculo","Upper-roman":"Romano maiúsculo","Vertical text alignment toolbar":"Barra de ferramentas do alinhamento vertical de texto",White:"Branco","Widget toolbar":"Barra de ferramentas do widget",Width:"Largura","Wrap text":"Envolver texto",Yellow:"Amarelo"}),a.getPluralForm=function(e){return 0==e||1==e?0:0!=e&&e%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ro.js b/public/static/plugs/ckeditor5/translations/ro.js
index ce4026018..0b489db09 100644
--- a/public/static/plugs/ckeditor5/translations/ro.js
+++ b/public/static/plugs/ckeditor5/translations/ro.js
@@ -1 +1 @@
-!function(e){const t=e.ro=e.ro||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 din %1",Accept:"Acceptă","Align cell text to the bottom":"Alinează textul celulei jos","Align cell text to the center":"Alinează textul celulei la centru","Align cell text to the left":"Alinează textul celulei la stânga","Align cell text to the middle":"Alinează textul celulei la mijloc","Align cell text to the right":"Alinează textul celulei la dreapta","Align cell text to the top":"Alinează textul celulei sus","Align center":"Aliniază la centru","Align left":"Aliniază la stânga","Align right":"Aliniază la dreapta","Align table to the left":"Alinează tabela la stânga","Align table to the right":"Alinează tabela la dreapta",Alignment:"Aliniere",Aquamarine:"Acvamarin",Background:"Fundal",Big:"Mare",Black:"Negru","Block quote":"Bloc citat",Blue:"Albastru",Bold:"Îngroșat",Border:"Bordură","Break text":"Segmentare text","Bulleted List":"Listă cu puncte","Bulleted list styles toolbar":"Toolbar Listă cu puncte",Cancel:"Anulare","Caption for image: %0":"Captură pentru imagine: %0","Caption for the image":"Captură pentru imagine","Cell properties":"Proprietățile celulei","Center table":"Tabelă centrată","Centered image":"Imagine aliniată pe centru","Change image text alternative":"Schimbă textul alternativ al imaginii","Choose heading":"Alege titlu",Circle:"Cerc",Clear:"Ștergere","Click to edit block":"Faceți clic pentru a edita întreg blocul",Code:"Cod",Color:"Culoare","Color picker":"Alegere culoare",Column:"Coloană",Dashed:"Linii întrerupte",Decimal:"Număr","Decimal with leading zero":"Număr cu zero la început ","Decrease indent":"Micșorează indent",Default:"Implicită","Delete column":"Șterge coloană","Delete row":"Șterge rând","Dim grey":"Gri slab",Dimensions:"Dimensiuni",Disc:"Disc","Document colors":"Culorile din document",Dotted:"Punctată",Double:"Dublă",Downloadable:"Descărcabil","Drag to move":"Glisați pentru a muta","Dropdown toolbar":"Bară listă opțiuni","Edit block":"Editează bloc","Edit link":"Modifică link","Editor block content toolbar":"Bară de instrumente editor pentru blocuri de conținut","Editor contextual toolbar":"Bară contextuală de instrumente editor","Editor editing area: %0":"Zonă editare editor: %0","Editor toolbar":"Bară editor","Enter image caption":"Introdu titlul descriptiv al imaginii","Enter table caption":"Adaugă subtitlul tabelei","Font Background Color":"Culoarea de fundal a fontului","Font Color":"Culoare font","Font Family":"Familie font","Font Size":"Dimensiune font","Full size image":"Imagine mărime completă",Green:"Verde",Grey:"Gri",Groove:"Groove","Header column":"Antet coloană","Header row":"Rând antet",Heading:"Titlu","Heading 1":"Titlu 1","Heading 2":"Titlu 2","Heading 3":"Titlu 3","Heading 4":"Titlu 4","Heading 5":"Titlu 5","Heading 6":"Titlu 6",Height:"Înălțime",HEX:"HEX","Horizontal line":"Linie orizontală","Horizontal text alignment toolbar":"Toolbar aliniere text orizontală","HTML object":"Obiect HTML",Huge:"Foarte mare","Image resize list":"Lista cu mărimi de redimensionare","Image toolbar":"Bară imagine","image widget":"widget imagine","In line":"În linie","Increase indent":"Mărește indent",Insert:"Inserează","Insert column left":"Inserează coloană la stânga","Insert column right":"Inserează coloană la dreapta","Insert image":"Inserează imagine","Insert image via URL":"Inserează o imagine via URL","Insert paragraph after block":"Inserează un paragraf după bloc","Insert paragraph before block":"Inserează un paragraf înaintea blocului","Insert row above":"Inserează rând deasupra","Insert row below":"Inserează rând dedesubt","Insert table":"Inserează tabel",Inset:"Inserează",Italic:"Cursiv",Justify:"Aliniază stânga-dreapta","Justify cell text":"Textul celulei justify","Left aligned image":"Imagine aliniată la stânga","Light blue":"Albastru deschis","Light green":"Verde deschis","Light grey":"Gri deschis",Link:"Link","Link image":"Link imagine","Link URL":"Link URL","List properties":"Proprietăți listă","Lower-latin":"Litere mici latine","Lower–roman":"Litere mici romane","Merge cell down":"Îmbină celula în jos","Merge cell left":"Îmbină celula la stânga","Merge cell right":"Îmbină celula la dreapta","Merge cell up":"Îmbină celula în sus","Merge cells":"Îmbină celulele",Next:"Înainte","No results found":"Nu au fost găsite rezultate","No searchable items":"Nu există elemente ce pot fi căutate",None:"Nimic","Numbered List":"Listă numerotată","Numbered list styles toolbar":"Toolbar Listă numerotată","Open in a new tab":"Deschide în tab nou","Open link in new tab":"Deschide link în tab nou",Orange:"Portocaliu",Original:"Original",Outset:"Elimină",Padding:"Spațiere",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Apăsați Enter pentru a scrie după widget sau Shift+Enter pentru a scrie înaintea acestuia",Previous:"Înapoi",Purple:"Violet",Red:"Roșu",Redo:"Revenire","Remove color":"Șterge culoare","Remove Format":"Șterge formatare","Replace from computer":"Înlocuire din computer","Replace image":"Înlocuire imagine","Replace image from computer":"Înlocuire imagine din computer","Resize image":"Redimensionează imaginea","Resize image to %0":"Redimensionează imaginea la %0","Resize image to the original size":"Redimensionează imaginea la mărimea originală","Restore default":"Reface la default","Reversed order":"Ordine inversată","Rich Text Editor":"Editor de text",Ridge:"Crestată","Right aligned image":"Imagine aliniată la dreapta",Row:"Rând",Save:"Salvare","Select all":"Selectează-le pe toate","Select column":"Selectează coloana","Select row":"Selectează linia","Show more items":"Arată mai multe elemente","Side image":"Imagine laterală",Small:"Mică",Solid:"Solidă","Split cell horizontally":"Scindează celula pe orizontală","Split cell vertically":"Scindează celula pe verticală",Square:"Pătrat","Start at":"Începe de la","Start index must be greater than 0.":"Indexul de pornire trebuie să fie mai mare de 0.",Strikethrough:"Tăiere text cu o linie",Style:"Stil",Subscript:"Indice",Superscript:"Exponent","Table alignment toolbar":"Toolbar aliniere tabelă","Table cell text alignment":"Alinierea textului celulei tabelei","Table properties":"Proprietățile tabelei","Table toolbar":"Bară tabel","Text alignment":"Aliniere text","Text alignment toolbar":"Bara aliniere text","Text alternative":"Text alternativ",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Culoarea este invalidă. Încearcă "#FF0000" sau "rgb(255,0,0)" sau "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Valoarea este invalidă. Încearcă "10px" sau "2em" sau simplu "2".',"This link has no URL":"Acest link nu are niciun URL",Tiny:"Foarte mică","To-do List":"Listă cu activități","Toggle caption off":"Dezactivați subtitlul","Toggle caption on":"Activați subtitlul","Toggle the circle list style":"Comutați stilul la lista cu cercuri","Toggle the decimal list style":"Comutați stilul la lista cu numere","Toggle the decimal with leading zero list style":"Comutați stilul la lista cu numere cu zero la început","Toggle the disc list style":"Comutați stilul la lista cu discuri","Toggle the lower–latin list style":"Comutați stilul la lista cu litere mici latine","Toggle the lower–roman list style":"Comutați stilul la lista cu litere mici romane","Toggle the square list style":"Comutați stilul la lista cu pătrate","Toggle the upper–latin list style":"Comutați stilul la lista cu litere mari latine","Toggle the upper–roman list style":"Comutați stilul la lista cu litere mari romane",Turquoise:"Turcoaz","Type or paste your content here.":"Scrie sau inserează aici conținutul tău","Type your title":"Scrie titlul tău",Underline:"Subliniat",Undo:"Anulare",Unlink:"Șterge link",Update:"Actualizează","Update image URL":"Actualizează o imagine via URL","Upload failed":"Încărcare eșuată","Upload from computer":"Încărcare din computer","Upload image from computer":"Încărcare imagine din computer","Upload in progress":"Încărcare în curs","Upper-latin":"Litere mari latine","Upper-roman":"Litere mari romane","Vertical text alignment toolbar":"Toolbar aliniere text verticală",White:"Alb","Widget toolbar":"Bară widget",Width:"Lungime","Wrap text":"Încadrare text",Yellow:"Galben"}),t.getPluralForm=function(e){return 1==e?0:e%100>19||e%100==0&&0!=e?2:1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const i=e.ro=e.ro||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 din %1",Accept:"Acceptă","Align cell text to the bottom":"Alinează textul celulei jos","Align cell text to the center":"Alinează textul celulei la centru","Align cell text to the left":"Alinează textul celulei la stânga","Align cell text to the middle":"Alinează textul celulei la mijloc","Align cell text to the right":"Alinează textul celulei la dreapta","Align cell text to the top":"Alinează textul celulei sus","Align center":"Aliniază la centru","Align left":"Aliniază la stânga","Align right":"Aliniază la dreapta","Align table to the left":"Alinează tabela la stânga","Align table to the right":"Alinează tabela la dreapta",Alignment:"Aliniere",Aquamarine:"Acvamarin",Background:"Fundal",Big:"Mare",Black:"Negru","Block quote":"Bloc citat",Blue:"Albastru",Bold:"Îngroșat",Border:"Bordură","Break text":"Segmentare text","Bulleted List":"Listă cu puncte","Bulleted list styles toolbar":"Toolbar Listă cu puncte",Cancel:"Anulare","Caption for image: %0":"Captură pentru imagine: %0","Caption for the image":"Captură pentru imagine","Cell properties":"Proprietățile celulei","Center table":"Tabelă centrată","Centered image":"Imagine aliniată pe centru","Change image text alternative":"Schimbă textul alternativ al imaginii","Choose heading":"Alege titlu",Circle:"Cerc",Clear:"Ștergere","Click to edit block":"Faceți clic pentru a edita întreg blocul",Close:"Închideți",Code:"Cod",Color:"Culoare","Color picker":"Alegere culoare",Column:"Coloană",Dashed:"Linii întrerupte",Decimal:"Număr","Decimal with leading zero":"Număr cu zero la început ","Decrease indent":"Micșorează indent",Default:"Implicită","Delete column":"Șterge coloană","Delete row":"Șterge rând","Dim grey":"Gri slab",Dimensions:"Dimensiuni",Disc:"Disc","Document colors":"Culorile din document",Dotted:"Punctată",Double:"Dublă",Downloadable:"Descărcabil","Drag to move":"Glisați pentru a muta","Dropdown toolbar":"Bară listă opțiuni","Edit block":"Editează bloc","Edit link":"Modifică link","Editor block content toolbar":"Bară de instrumente editor pentru blocuri de conținut","Editor contextual toolbar":"Bară contextuală de instrumente editor","Editor dialog":"Dialog editor","Editor editing area: %0":"Zonă editare editor: %0","Editor toolbar":"Bară editor","Enter image caption":"Introdu titlul descriptiv al imaginii","Enter table caption":"Adaugă subtitlul tabelei","Font Background Color":"Culoarea de fundal a fontului","Font Color":"Culoare font","Font Family":"Familie font","Font Size":"Dimensiune font","Full size image":"Imagine mărime completă",Green:"Verde",Grey:"Gri",Groove:"Groove","Header column":"Antet coloană","Header row":"Rând antet",Heading:"Titlu","Heading 1":"Titlu 1","Heading 2":"Titlu 2","Heading 3":"Titlu 3","Heading 4":"Titlu 4","Heading 5":"Titlu 5","Heading 6":"Titlu 6",Height:"Înălțime",HEX:"HEX","Horizontal line":"Linie orizontală","Horizontal text alignment toolbar":"Toolbar aliniere text orizontală","HTML object":"Obiect HTML",Huge:"Foarte mare","Image resize list":"Lista cu mărimi de redimensionare","Image toolbar":"Bară imagine","image widget":"widget imagine","In line":"În linie","Increase indent":"Mărește indent",Insert:"Inserează","Insert column left":"Inserează coloană la stânga","Insert column right":"Inserează coloană la dreapta","Insert image":"Inserează imagine","Insert image via URL":"Inserează o imagine via URL","Insert paragraph after block":"Inserează un paragraf după bloc","Insert paragraph before block":"Inserează un paragraf înaintea blocului","Insert row above":"Inserează rând deasupra","Insert row below":"Inserează rând dedesubt","Insert table":"Inserează tabel",Inset:"Inserează",Italic:"Cursiv",Justify:"Aliniază stânga-dreapta","Justify cell text":"Textul celulei justify","Left aligned image":"Imagine aliniată la stânga","Light blue":"Albastru deschis","Light green":"Verde deschis","Light grey":"Gri deschis",Link:"Link","Link image":"Link imagine","Link URL":"Link URL","List properties":"Proprietăți listă","Lower-latin":"Litere mici latine","Lower–roman":"Litere mici romane","Merge cell down":"Îmbină celula în jos","Merge cell left":"Îmbină celula la stânga","Merge cell right":"Îmbină celula la dreapta","Merge cell up":"Îmbină celula în sus","Merge cells":"Îmbină celulele",Next:"Înainte","No results found":"Nu au fost găsite rezultate","No searchable items":"Nu există elemente ce pot fi căutate",None:"Nimic","Numbered List":"Listă numerotată","Numbered list styles toolbar":"Toolbar Listă numerotată","Open in a new tab":"Deschide în tab nou","Open link in new tab":"Deschide link în tab nou",Orange:"Portocaliu",Original:"Original",Outset:"Elimină",Padding:"Spațiere",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Apăsați Enter pentru a scrie după widget sau Shift+Enter pentru a scrie înaintea acestuia",Previous:"Înapoi",Purple:"Violet",Red:"Roșu",Redo:"Revenire","Remove color":"Șterge culoare","Remove Format":"Șterge formatare","Replace from computer":"Înlocuire din computer","Replace image":"Înlocuire imagine","Replace image from computer":"Înlocuire imagine din computer","Resize image":"Redimensionează imaginea","Resize image to %0":"Redimensionează imaginea la %0","Resize image to the original size":"Redimensionează imaginea la mărimea originală","Restore default":"Reface la default","Reversed order":"Ordine inversată","Rich Text Editor":"Editor de text",Ridge:"Crestată","Right aligned image":"Imagine aliniată la dreapta",Row:"Rând",Save:"Salvare","Select all":"Selectează-le pe toate","Select column":"Selectează coloana","Select row":"Selectează linia","Show more items":"Arată mai multe elemente","Side image":"Imagine laterală",Small:"Mică",Solid:"Solidă","Split cell horizontally":"Scindează celula pe orizontală","Split cell vertically":"Scindează celula pe verticală",Square:"Pătrat","Start at":"Începe de la","Start index must be greater than 0.":"Indexul de pornire trebuie să fie mai mare de 0.",Strikethrough:"Tăiere text cu o linie",Style:"Stil",Subscript:"Indice",Superscript:"Exponent","Table alignment toolbar":"Toolbar aliniere tabelă","Table cell text alignment":"Alinierea textului celulei tabelei","Table properties":"Proprietățile tabelei","Table toolbar":"Bară tabel","Text alignment":"Aliniere text","Text alignment toolbar":"Bara aliniere text","Text alternative":"Text alternativ",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Culoarea este invalidă. Încearcă "#FF0000" sau "rgb(255,0,0)" sau "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Valoarea este invalidă. Încearcă "10px" sau "2em" sau simplu "2".',"This link has no URL":"Acest link nu are niciun URL",Tiny:"Foarte mică","To-do List":"Listă cu activități","Toggle caption off":"Dezactivați subtitlul","Toggle caption on":"Activați subtitlul","Toggle the circle list style":"Comutați stilul la lista cu cercuri","Toggle the decimal list style":"Comutați stilul la lista cu numere","Toggle the decimal with leading zero list style":"Comutați stilul la lista cu numere cu zero la început","Toggle the disc list style":"Comutați stilul la lista cu discuri","Toggle the lower–latin list style":"Comutați stilul la lista cu litere mici latine","Toggle the lower–roman list style":"Comutați stilul la lista cu litere mici romane","Toggle the square list style":"Comutați stilul la lista cu pătrate","Toggle the upper–latin list style":"Comutați stilul la lista cu litere mari latine","Toggle the upper–roman list style":"Comutați stilul la lista cu litere mari romane",Turquoise:"Turcoaz","Type or paste your content here.":"Scrie sau inserează aici conținutul tău","Type your title":"Scrie titlul tău",Underline:"Subliniat",Undo:"Anulare",Unlink:"Șterge link",Update:"Actualizează","Update image URL":"Actualizează o imagine via URL","Upload failed":"Încărcare eșuată","Upload from computer":"Încărcare din computer","Upload image from computer":"Încărcare imagine din computer","Upload in progress":"Încărcare în curs","Upper-latin":"Litere mari latine","Upper-roman":"Litere mari romane","Vertical text alignment toolbar":"Toolbar aliniere text verticală",White:"Alb","Widget toolbar":"Bară widget",Width:"Lungime","Wrap text":"Încadrare text",Yellow:"Galben"}),i.getPluralForm=function(e){return 1==e?0:e%100>19||e%100==0&&0!=e?2:1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ru.js b/public/static/plugs/ckeditor5/translations/ru.js
index 086160db1..1e2d66216 100644
--- a/public/static/plugs/ckeditor5/translations/ru.js
+++ b/public/static/plugs/ckeditor5/translations/ru.js
@@ -1 +1 @@
-!function(e){const t=e.ru=e.ru||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 из %1",Accept:"Принять","Align cell text to the bottom":"Выровнять текст ячейки по нижнему краю","Align cell text to the center":"Выровнять текст по центру","Align cell text to the left":"Выровнять текст по левому краю","Align cell text to the middle":"Выровнять текст ячейки по центру","Align cell text to the right":"Выровнять текст по правому краю","Align cell text to the top":"Выровнять текст ячейки по верхнему краю","Align center":"Выравнивание по центру","Align left":"Выравнивание по левому краю","Align right":"Выравнивание по правому краю","Align table to the left":"Выровнять таблицу по левому краю","Align table to the right":"Выровнять таблицу по правому краю",Alignment:"Выравнивание",Aquamarine:"Аквамариновый",Background:"Фон",Big:"Крупный",Black:"Чёрный","Block quote":"Цитата",Blue:"Синий",Bold:"Жирный",Border:"Граница","Break text":"Разрывать текст","Bulleted List":"Маркированный список","Bulleted list styles toolbar":"Стили маркированного списка",Cancel:"Отмена","Caption for image: %0":"Подпись к изображению: %0","Caption for the image":"Подпись к изображению","Cell properties":"Свойства ячейки","Center table":"Выровнять таблицу по центру","Centered image":"Выравнивание по центру","Change image text alternative":"Редактировать альтернативный текст","Choose heading":"Выбор стиля",Circle:"Окружность",Clear:"Очистить","Click to edit block":"Нажмите, чтобы редактировать блок",Code:"Исходный код",Color:"Цвет","Color picker":"Выбор цвета",Column:"Столбец",Dashed:"Пунктирная",Decimal:"Десятичный","Decimal with leading zero":"Десятичный с ведущим нулем","Decrease indent":"Уменьшить отступ",Default:"По умолчанию","Delete column":"Удалить столбец","Delete row":"Удалить строку","Dim grey":"Тёмно-серый",Dimensions:"Размеры",Disc:"Диск","Document colors":"Цвет страницы",Dotted:"Точечная",Double:"Двойная",Downloadable:"Загружаемые","Drag to move":"Перетащить","Dropdown toolbar":"Выпадающая панель инструментов","Edit block":"Редактировать блок","Edit link":"Редактировать ссылку","Editor block content toolbar":"Панель инструментов редактора","Editor contextual toolbar":"Контекстуальная панель инструментов редактора","Editor editing area: %0":"Область редактирования редактора: %0","Editor toolbar":"Панель инструментов редактора","Enter image caption":"Подпись к изображению","Enter table caption":"Подпись таблицы","Font Background Color":"Цвет фона","Font Color":"Цвет шрифта","Font Family":"Семейство шрифтов","Font Size":"Размер шрифта","Full size image":"Оригинальный размер изображения",Green:"Зелёный",Grey:"Серый",Groove:"Желобчатая","Header column":"Столбец заголовков","Header row":"Строка заголовков",Heading:"Стиль","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4","Heading 5":"Заголовок 5","Heading 6":"Заголовок 6",Height:"Высота",HEX:"HEX","Horizontal line":"Горизонтальная линия","Horizontal text alignment toolbar":"Панель инструментов горизонтального выравнивания текста","HTML object":"HTML объект",Huge:"Очень крупный","Image resize list":"Список размеров","Image toolbar":"Панель инструментов изображения","image widget":"Виджет изображений","In line":"В тексте","Increase indent":"Увеличить отступ",Insert:"Вставить","Insert column left":"Вставить столбец слева","Insert column right":"Вставить столбец справа","Insert image":"Вставить изображение","Insert image via URL":"Вставить изображение по URL","Insert paragraph after block":"Вставить параграф после блока","Insert paragraph before block":"Вставить параграф перед блоком","Insert row above":"Вставить строку выше","Insert row below":"Вставить строку ниже","Insert table":"Вставить таблицу",Inset:"Вдавленная",Italic:"Курсив",Justify:"Выравнивание по ширине","Justify cell text":"Выровнять текст по ширине","Left aligned image":"Выравнивание по левому краю","Light blue":"Голубой","Light green":"Салатовый","Light grey":"Светло-серый",Link:"Ссылка","Link image":"Ссылка на изображение","Link URL":"Ссылка URL","List properties":"Свойства списка","Lower-latin":"Малые латинские","Lower–roman":"Малые римские","Merge cell down":"Объединить с ячейкой снизу","Merge cell left":"Объединить с ячейкой слева","Merge cell right":"Объединить с ячейкой справа","Merge cell up":"Объединить с ячейкой сверху","Merge cells":"Объединить ячейки",Next:"Следующий","No results found":"Результаты не найдены","No searchable items":"Нет элементов для поиска",None:"Нет","Numbered List":"Нумерованный список","Numbered list styles toolbar":"Стили нумерованного списка","Open in a new tab":"Открыть в новой вкладке","Open link in new tab":"Открыть ссылку в новой вкладке",Orange:"Оранжевый",Original:"Оригинальный",Outset:"Выпуклая",Padding:"Отступ",Paragraph:"Параграф","Press Enter to type after or press Shift + Enter to type before the widget":"Нажмите Enter для ввода текста после виджета или нажмите Shift + Enter для ввода текста перед виджетом",Previous:"Предыдущий",Purple:"Фиолетовый",Red:"Красный",Redo:"Повторить","Remove color":"Убрать цвет","Remove Format":"Убрать форматирование","Replace from computer":"Заменить с компьютера","Replace image":"Заменить изображение","Replace image from computer":"Заменить изображение с компьютера","Resize image":"Изменить размер изображения","Resize image to %0":"Изменить размер изображения до %0","Resize image to the original size":"Вернуть размер изображения к оригинальному","Restore default":"По умолчанию","Reversed order":"Обратный порядок","Rich Text Editor":"Редактор",Ridge:"Ребристая","Right aligned image":"Выравнивание по правому краю",Row:"Строка",Save:"Сохранить","Select all":"Выбрать все","Select column":"Выбрать столбец","Select row":"Выбрать строку","Show more items":"Другие инструменты","Side image":"Боковое изображение",Small:"Мелкий",Solid:"Сплошная","Split cell horizontally":"Разделить ячейку горизонтально","Split cell vertically":"Разделить ячейку вертикально",Square:"Квадрат","Start at":"Начать с","Start index must be greater than 0.":"Начальный индекс должен быть больше 0.",Strikethrough:"Зачеркнутый",Style:"Стиль",Subscript:"Подстрочный",Superscript:"Надстрочный","Table alignment toolbar":"Панель инструментов выравнивания таблицы","Table cell text alignment":"Выравнивание текста в ячейке таблицы","Table properties":"Свойства таблицы","Table toolbar":"Панель инструментов таблицы","Text alignment":"Выравнивание текста","Text alignment toolbar":"Выравнивание","Text alternative":"Альтернативный текст",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Неверный цвет. Попробуйте "#FF0000" или "rgb(255,0,0)" или "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Неверное значение. Попробуйте "10px" или "2em" или просто "2".',"This link has no URL":"Для этой ссылки не установлен адрес URL",Tiny:"Очень мелкий","To-do List":"Список задач","Toggle caption off":"Выключить описание","Toggle caption on":"Включить описание","Toggle the circle list style":"Переключить на стиль списка с маркерами в виде незакрашенного кружка","Toggle the decimal list style":"Переключить на стиль списка с цифровыми маркерами","Toggle the decimal with leading zero list style":"Переключить на стиль списка с маркерами в виде цифр с нулем в начале","Toggle the disc list style":"Переключить на стиль списка с маркерами в виде закрашенного кружка","Toggle the lower–latin list style":"Переключить на стиль списка с маркерами в виде строчных латинских букв","Toggle the lower–roman list style":"Переключить на стиль списка с маркерами в виде строчных римских цифр","Toggle the square list style":"Переключить на стиль списка с квадратными маркерами","Toggle the upper–latin list style":"Переключить на стиль списка с маркерами в виде заглавных латинских букв","Toggle the upper–roman list style":"Переключить на стиль списка с маркерами в виде заглавных римских цифр",Turquoise:"Бирюзовый","Type or paste your content here.":"Введите или вставьте сюда ваш текст","Type your title":"Введите заголовок",Underline:"Подчеркнутый",Undo:"Отменить",Unlink:"Убрать ссылку",Update:"Изменить","Update image URL":"Изменить URL изображения","Upload failed":"Загрузка не выполнена","Upload from computer":"Загрузить с компьютера","Upload image from computer":"Загрузить изображение с компьютера","Upload in progress":"Идёт загрузка","Upper-latin":"Большие латинские","Upper-roman":"Большие римские","Vertical text alignment toolbar":"Панель инструментов вертикального выравнивания текста",White:"Белый","Widget toolbar":"Панель инструментов виджета",Width:"Ширина","Wrap text":"Обтекать текст",Yellow:"Жёлтый"}),t.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:e%10==0||e%10>=5&&e%10<=9||e%100>=11&&e%100<=14?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ru=e.ru||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 из %1",Accept:"Принять","Align cell text to the bottom":"Выровнять текст ячейки по нижнему краю","Align cell text to the center":"Выровнять текст по центру","Align cell text to the left":"Выровнять текст по левому краю","Align cell text to the middle":"Выровнять текст ячейки по центру","Align cell text to the right":"Выровнять текст по правому краю","Align cell text to the top":"Выровнять текст ячейки по верхнему краю","Align center":"Выравнивание по центру","Align left":"Выравнивание по левому краю","Align right":"Выравнивание по правому краю","Align table to the left":"Выровнять таблицу по левому краю","Align table to the right":"Выровнять таблицу по правому краю",Alignment:"Выравнивание",Aquamarine:"Аквамариновый",Background:"Фон",Big:"Крупный",Black:"Чёрный","Block quote":"Цитата",Blue:"Синий",Bold:"Жирный",Border:"Граница","Break text":"Разрывать текст","Bulleted List":"Маркированный список","Bulleted list styles toolbar":"Стили маркированного списка",Cancel:"Отмена","Caption for image: %0":"Подпись к изображению: %0","Caption for the image":"Подпись к изображению","Cell properties":"Свойства ячейки","Center table":"Выровнять таблицу по центру","Centered image":"Выравнивание по центру","Change image text alternative":"Редактировать альтернативный текст","Choose heading":"Выбор стиля",Circle:"Окружность",Clear:"Очистить","Click to edit block":"Нажмите, чтобы редактировать блок",Close:"Закрыть",Code:"Исходный код",Color:"Цвет","Color picker":"Выбор цвета",Column:"Столбец",Dashed:"Пунктирная",Decimal:"Десятичный","Decimal with leading zero":"Десятичный с ведущим нулем","Decrease indent":"Уменьшить отступ",Default:"По умолчанию","Delete column":"Удалить столбец","Delete row":"Удалить строку","Dim grey":"Тёмно-серый",Dimensions:"Размеры",Disc:"Диск","Document colors":"Цвет страницы",Dotted:"Точечная",Double:"Двойная",Downloadable:"Загружаемые","Drag to move":"Перетащить","Dropdown toolbar":"Выпадающая панель инструментов","Edit block":"Редактировать блок","Edit link":"Редактировать ссылку","Editor block content toolbar":"Панель инструментов редактора","Editor contextual toolbar":"Контекстуальная панель инструментов редактора","Editor dialog":"Диалоговое окно редактора","Editor editing area: %0":"Область редактирования редактора: %0","Editor toolbar":"Панель инструментов редактора","Enter image caption":"Подпись к изображению","Enter table caption":"Подпись таблицы","Font Background Color":"Цвет фона","Font Color":"Цвет шрифта","Font Family":"Семейство шрифтов","Font Size":"Размер шрифта","Full size image":"Оригинальный размер изображения",Green:"Зелёный",Grey:"Серый",Groove:"Желобчатая","Header column":"Столбец заголовков","Header row":"Строка заголовков",Heading:"Стиль","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4","Heading 5":"Заголовок 5","Heading 6":"Заголовок 6",Height:"Высота",HEX:"HEX","Horizontal line":"Горизонтальная линия","Horizontal text alignment toolbar":"Панель инструментов горизонтального выравнивания текста","HTML object":"HTML объект",Huge:"Очень крупный","Image resize list":"Список размеров","Image toolbar":"Панель инструментов изображения","image widget":"Виджет изображений","In line":"В тексте","Increase indent":"Увеличить отступ",Insert:"Вставить","Insert column left":"Вставить столбец слева","Insert column right":"Вставить столбец справа","Insert image":"Вставить изображение","Insert image via URL":"Вставить изображение по URL","Insert paragraph after block":"Вставить параграф после блока","Insert paragraph before block":"Вставить параграф перед блоком","Insert row above":"Вставить строку выше","Insert row below":"Вставить строку ниже","Insert table":"Вставить таблицу",Inset:"Вдавленная",Italic:"Курсив",Justify:"Выравнивание по ширине","Justify cell text":"Выровнять текст по ширине","Left aligned image":"Выравнивание по левому краю","Light blue":"Голубой","Light green":"Салатовый","Light grey":"Светло-серый",Link:"Ссылка","Link image":"Ссылка на изображение","Link URL":"Ссылка URL","List properties":"Свойства списка","Lower-latin":"Малые латинские","Lower–roman":"Малые римские","Merge cell down":"Объединить с ячейкой снизу","Merge cell left":"Объединить с ячейкой слева","Merge cell right":"Объединить с ячейкой справа","Merge cell up":"Объединить с ячейкой сверху","Merge cells":"Объединить ячейки",Next:"Следующий","No results found":"Результаты не найдены","No searchable items":"Нет элементов для поиска",None:"Нет","Numbered List":"Нумерованный список","Numbered list styles toolbar":"Стили нумерованного списка","Open in a new tab":"Открыть в новой вкладке","Open link in new tab":"Открыть ссылку в новой вкладке",Orange:"Оранжевый",Original:"Оригинальный",Outset:"Выпуклая",Padding:"Отступ",Paragraph:"Параграф","Press Enter to type after or press Shift + Enter to type before the widget":"Нажмите Enter для ввода текста после виджета или нажмите Shift + Enter для ввода текста перед виджетом",Previous:"Предыдущий",Purple:"Фиолетовый",Red:"Красный",Redo:"Повторить","Remove color":"Убрать цвет","Remove Format":"Убрать форматирование","Replace from computer":"Заменить с компьютера","Replace image":"Заменить изображение","Replace image from computer":"Заменить изображение с компьютера","Resize image":"Изменить размер изображения","Resize image to %0":"Изменить размер изображения до %0","Resize image to the original size":"Вернуть размер изображения к оригинальному","Restore default":"По умолчанию","Reversed order":"Обратный порядок","Rich Text Editor":"Редактор",Ridge:"Ребристая","Right aligned image":"Выравнивание по правому краю",Row:"Строка",Save:"Сохранить","Select all":"Выбрать все","Select column":"Выбрать столбец","Select row":"Выбрать строку","Show more items":"Другие инструменты","Side image":"Боковое изображение",Small:"Мелкий",Solid:"Сплошная","Split cell horizontally":"Разделить ячейку горизонтально","Split cell vertically":"Разделить ячейку вертикально",Square:"Квадрат","Start at":"Начать с","Start index must be greater than 0.":"Начальный индекс должен быть больше 0.",Strikethrough:"Зачеркнутый",Style:"Стиль",Subscript:"Подстрочный",Superscript:"Надстрочный","Table alignment toolbar":"Панель инструментов выравнивания таблицы","Table cell text alignment":"Выравнивание текста в ячейке таблицы","Table properties":"Свойства таблицы","Table toolbar":"Панель инструментов таблицы","Text alignment":"Выравнивание текста","Text alignment toolbar":"Выравнивание","Text alternative":"Альтернативный текст",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Неверный цвет. Попробуйте "#FF0000" или "rgb(255,0,0)" или "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Неверное значение. Попробуйте "10px" или "2em" или просто "2".',"This link has no URL":"Для этой ссылки не установлен адрес URL",Tiny:"Очень мелкий","To-do List":"Список задач","Toggle caption off":"Выключить описание","Toggle caption on":"Включить описание","Toggle the circle list style":"Переключить на стиль списка с маркерами в виде незакрашенного кружка","Toggle the decimal list style":"Переключить на стиль списка с цифровыми маркерами","Toggle the decimal with leading zero list style":"Переключить на стиль списка с маркерами в виде цифр с нулем в начале","Toggle the disc list style":"Переключить на стиль списка с маркерами в виде закрашенного кружка","Toggle the lower–latin list style":"Переключить на стиль списка с маркерами в виде строчных латинских букв","Toggle the lower–roman list style":"Переключить на стиль списка с маркерами в виде строчных римских цифр","Toggle the square list style":"Переключить на стиль списка с квадратными маркерами","Toggle the upper–latin list style":"Переключить на стиль списка с маркерами в виде заглавных латинских букв","Toggle the upper–roman list style":"Переключить на стиль списка с маркерами в виде заглавных римских цифр",Turquoise:"Бирюзовый","Type or paste your content here.":"Введите или вставьте сюда ваш текст","Type your title":"Введите заголовок",Underline:"Подчеркнутый",Undo:"Отменить",Unlink:"Убрать ссылку",Update:"Изменить","Update image URL":"Изменить URL изображения","Upload failed":"Загрузка не выполнена","Upload from computer":"Загрузить с компьютера","Upload image from computer":"Загрузить изображение с компьютера","Upload in progress":"Идёт загрузка","Upper-latin":"Большие латинские","Upper-roman":"Большие римские","Vertical text alignment toolbar":"Панель инструментов вертикального выравнивания текста",White:"Белый","Widget toolbar":"Панель инструментов виджета",Width:"Ширина","Wrap text":"Обтекать текст",Yellow:"Жёлтый"}),t.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:e%10==0||e%10>=5&&e%10<=9||e%100>=11&&e%100<=14?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/sk.js b/public/static/plugs/ckeditor5/translations/sk.js
index 9f496a23a..4f771e493 100644
--- a/public/static/plugs/ckeditor5/translations/sk.js
+++ b/public/static/plugs/ckeditor5/translations/sk.js
@@ -1 +1 @@
-!function(e){const a=e.sk=e.sk||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 z %1",Accept:"Potvrdiť","Align cell text to the bottom":"Zarovnať text bunky nadol","Align cell text to the center":"Zarovnať text bunky na stred","Align cell text to the left":"Zarovnať text bunky doľava","Align cell text to the middle":"Zarovnať text bunky na stred","Align cell text to the right":"Zarovnať text bunky doprava","Align cell text to the top":"Zarovnať text bunky nahor","Align center":"Zarovnať na stred","Align left":"Zarovnať vľavo","Align right":"Zarovnať vpravo","Align table to the left":"Zarovnať tabuľku doľava","Align table to the right":"Zarovnať tabuľku doprava",Alignment:"Zarovnanie",Aquamarine:"Akvamarínová",Background:"Pozadie",Big:"Veľké",Black:"Čierna","Block quote":"Citát",Blue:"Modrá",Bold:"Tučné",Border:"Orámovanie","Break text":"Zalomenie textu","Bulleted List":"Zoznam s odrážkami","Bulleted list styles toolbar":"Panel zoznamu s odrážkami",Cancel:"Zrušiť","Caption for image: %0":"Popis k obrázku: %0","Caption for the image":"Popis k obrázku","Cell properties":"Vlastnosti bunky","Center table":"Centrovať tabuľku","Centered image":"Zarovnať na stred","Change image text alternative":"Zmeňte alternatívny text obrázka","Choose heading":"Vyberte nadpis",Circle:"Kruh",Clear:"Vyčistiť","Click to edit block":"Úprava bloku kliknutím",Code:"Kód",Color:"Farba","Color picker":"Vybrať farbu",Column:"Stĺpec",Dashed:"Čiarkovaná",Decimal:"Čísla","Decimal with leading zero":"Čísla s nulou na začiatku","Decrease indent":"Zmenšiť odsadenie",Default:"Predvolené","Delete column":"Odstrániť stĺpec","Delete row":"Odstrániť riadok","Dim grey":"Tmavosivá",Dimensions:"Rozmery",Disc:"Plný kruh","Document colors":"Farby dokumentu",Dotted:"Bodkovaná",Double:"Dvojitá",Downloadable:"Na stiahnutie","Drag to move":"Potiahnuť a presunúť","Dropdown toolbar":"Panel nástrojov roletového menu","Edit block":"Upraviť odsek","Edit link":"Upraviť odkaz","Editor block content toolbar":"Panel s nástrojmi obsahu bloku editora","Editor contextual toolbar":"Kontextový panel nástrojov editora","Editor editing area: %0":"Oblasť úprav editora: %0","Editor toolbar":"Panel nástrojov editora","Enter image caption":"Vložte popis obrázka","Enter table caption":"Zadajte popis tabuľky","Font Background Color":"Farba zvýraznenia textu","Font Color":"Farba písma","Font Family":"Názov písma","Font Size":"Veľkosť písma","Full size image":"Obrázok v plnej veľkosti",Green:"Zelená",Grey:"Sivá",Groove:"Drážkovaná","Header column":"Stĺpec hlavičky","Header row":"Riadok hlavičky",Heading:"Nadpis","Heading 1":"Nadpis 1","Heading 2":"Nadpis 2","Heading 3":"Nadpis 3","Heading 4":"Nadpis 4","Heading 5":"Nadpis 5","Heading 6":"Nadpis 6",Height:"Výška",HEX:"HEX","Horizontal line":"Vodorovná čiara","Horizontal text alignment toolbar":"Horizontálne zarovnanie textu v panely","HTML object":"HTML objekt",Huge:"Veľmi veľké","Image resize list":"Zoznam možností zmeny veľkosti","Image toolbar":"Panel nástrojov obrázka","image widget":"widget obrázka","In line":"V riadku","Increase indent":"Zväčšiť odsadenie",Insert:"Vložiť","Insert column left":"Vložiť stĺpec vľavo","Insert column right":"Vložiť stĺpec vpravo","Insert image":"Vložiť obrázok","Insert image via URL":"Vložiť obrázok pomocou URL","Insert paragraph after block":"Vložiť odstavec za blok","Insert paragraph before block":"Vložiť odstavec pred blok","Insert row above":"Vložiť riadok nad","Insert row below":"Vložiť riadok pod","Insert table":"Vložiť tabuľku",Inset:"Vložená z vnútra",Italic:"Kurzíva",Justify:"Do bloku","Justify cell text":"Zarovnať text bunky z oboch strán","Left aligned image":"Zarovnať vľavo","Light blue":"Bledomodrá","Light green":"Bledozelená","Light grey":"Bledosivá",Link:"Odkaz","Link image":"Adresa obrázku","Link URL":"URL adresa","List properties":"Vlastnosti zoznamu","Lower-latin":"Malé písmená","Lower–roman":"Malé rímske čísla","Merge cell down":"Zlúčiť bunku dole","Merge cell left":"Zlúčiť bunku vľavo","Merge cell right":"Zlúčiť bunku vpravo","Merge cell up":"Zlúčiť bunku hore","Merge cells":"Zlúčiť bunky",Next:"Ďalšie","No results found":"Neboli nájdené žiadne výsledky","No searchable items":"Žiadne vyhľadávateľné položky",None:"Žiadna","Numbered List":"Číslovaný zoznam","Numbered list styles toolbar":"Panel so štýlmi číslovaného zoznamu","Open in a new tab":"Otvoriť v novej záložke","Open link in new tab":"Otvoriť odkaz v novom okne",Orange:"Oranžová",Original:"Originál",Outset:"Vložená zvonku",Padding:"Vnútorný okraj",Paragraph:"Odsek","Press Enter to type after or press Shift + Enter to type before the widget":"Stlačte Enter, ak chcete písať po miniaplikácii, alebo stlačte Shift + Enter, ak chcete písať pred miniaplikáciou",Previous:"Predchádzajúce",Purple:"Fialová",Red:"Červená",Redo:"Znova","Remove color":"Zrušiť farbu","Remove Format":"Vyčistiť formátovanie","Replace from computer":"Nahradiť z počítača","Replace image":"Nahradiť obrázok","Replace image from computer":"Nahradiť obrázok z počítača","Resize image":"Zmeniť veľkosť obrázka","Resize image to %0":"Zmeniť veľkosť na %0","Resize image to the original size":"Zmeniť veľkosť na pôvodnú","Restore default":"Obnoviť predvolené","Reversed order":"Obrátene poradie","Rich Text Editor":"Editor s formátovaním",Ridge:"Rámovaná","Right aligned image":"Zarovnať vpravo",Row:"Riadok",Save:"Uložiť","Select all":"Označiť všetko","Select column":"Vybrať stĺpec","Select row":"Vybrať riadok","Show more items":"Zobraziť viac položiek","Side image":"Bočný obrázok",Small:"Malé",Solid:"Plná","Split cell horizontally":"Rozdeliť bunku vodorovne","Split cell vertically":"Rozdeliť bunku zvislo",Square:"Štvorec","Start at":"Prvá položka","Start index must be greater than 0.":"Prvá položka musí mať index väčší ako 0.",Strikethrough:"Preškrtnuté",Style:"Štýl",Subscript:"Dolný index",Superscript:"Horný index","Table alignment toolbar":"Panel zarovnania tabuľky","Table cell text alignment":"Zarovnanie textu v bunke","Table properties":"Vlastnosti tabuľky","Table toolbar":"Panel nástrojov tabuľky","Text alignment":"Zarovnanie textu","Text alignment toolbar":"Panel nástrojov zarovnania textu","Text alternative":"Alternatívny text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farba má nesprávny formát. Skúste "#FF0000", "rgb(255,0,0)" alebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávna. Skúste "10px", "2em" alebo jednoducho "2".',"This link has no URL":"Tento odkaz nemá nastavenú URL adresu",Tiny:"Veľmi malé","To-do List":"To-do zoznam","Toggle caption off":"Vypnúť titulok","Toggle caption on":"Zapnúť titulok","Toggle the circle list style":"Prepnúť na zoznam s kruhovým označením","Toggle the decimal list style":"Prepnúť na číselný zoznam","Toggle the decimal with leading zero list style":"Prepnúť na číselný zoznam s nulou na začiatku","Toggle the disc list style":"Prepnúť na zoznam s označením plného kruhu","Toggle the lower–latin list style":"Prepnúť na zoznam s malými písmenami","Toggle the lower–roman list style":"Prepnúť na zoznam s malými rímskymi číslami","Toggle the square list style":"Prepnúť na zoznam so štvorcovým označením","Toggle the upper–latin list style":"Prepnúť na zoznam s veľkými písmenami","Toggle the upper–roman list style":"Prepnúť na zoznam s veľkými rímskymi číslami",Turquoise:"Tyrkysová","Type or paste your content here.":"Vložte obsah","Type your title":"Vložte nadpis",Underline:"Podčiarknuté",Undo:"Späť",Unlink:"Zrušiť odkaz",Update:"Aktualizovať","Update image URL":"Aktualizovať URL obrázka","Upload failed":"Nahrávanie zlyhalo","Upload from computer":"Nahrať z počítača","Upload image from computer":"Nahrať obrázok z počítača","Upload in progress":"Prebieha nahrávanie","Upper-latin":"Veľké písmená","Upper-roman":"Veľké rímske čísla","Vertical text alignment toolbar":"Vertikálne zarovnanie textu v panely",White:"Biela","Widget toolbar":"Panel nástrojov ovládacieho prvku",Width:"Šírka","Wrap text":"Obtekanie textu",Yellow:"Žltá"}),a.getPluralForm=function(e){return e%1==0&&1==e?0:e%1==0&&e>=2&&e<=4?1:e%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.sk=e.sk||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 z %1",Accept:"Potvrdiť","Align cell text to the bottom":"Zarovnať text bunky nadol","Align cell text to the center":"Zarovnať text bunky na stred","Align cell text to the left":"Zarovnať text bunky doľava","Align cell text to the middle":"Zarovnať text bunky na stred","Align cell text to the right":"Zarovnať text bunky doprava","Align cell text to the top":"Zarovnať text bunky nahor","Align center":"Zarovnať na stred","Align left":"Zarovnať vľavo","Align right":"Zarovnať vpravo","Align table to the left":"Zarovnať tabuľku doľava","Align table to the right":"Zarovnať tabuľku doprava",Alignment:"Zarovnanie",Aquamarine:"Akvamarínová",Background:"Pozadie",Big:"Veľké",Black:"Čierna","Block quote":"Citát",Blue:"Modrá",Bold:"Tučné",Border:"Orámovanie","Break text":"Zalomenie textu","Bulleted List":"Zoznam s odrážkami","Bulleted list styles toolbar":"Panel zoznamu s odrážkami",Cancel:"Zrušiť","Caption for image: %0":"Popis k obrázku: %0","Caption for the image":"Popis k obrázku","Cell properties":"Vlastnosti bunky","Center table":"Centrovať tabuľku","Centered image":"Zarovnať na stred","Change image text alternative":"Zmeňte alternatívny text obrázka","Choose heading":"Vyberte nadpis",Circle:"Kruh",Clear:"Vyčistiť","Click to edit block":"Úprava bloku kliknutím",Close:"Zatvoriť",Code:"Kód",Color:"Farba","Color picker":"Vybrať farbu",Column:"Stĺpec",Dashed:"Čiarkovaná",Decimal:"Čísla","Decimal with leading zero":"Čísla s nulou na začiatku","Decrease indent":"Zmenšiť odsadenie",Default:"Predvolené","Delete column":"Odstrániť stĺpec","Delete row":"Odstrániť riadok","Dim grey":"Tmavosivá",Dimensions:"Rozmery",Disc:"Plný kruh","Document colors":"Farby dokumentu",Dotted:"Bodkovaná",Double:"Dvojitá",Downloadable:"Na stiahnutie","Drag to move":"Potiahnuť a presunúť","Dropdown toolbar":"Panel nástrojov roletového menu","Edit block":"Upraviť odsek","Edit link":"Upraviť odkaz","Editor block content toolbar":"Panel s nástrojmi obsahu bloku editora","Editor contextual toolbar":"Kontextový panel nástrojov editora","Editor dialog":"Dialóg editora","Editor editing area: %0":"Oblasť úprav editora: %0","Editor toolbar":"Panel nástrojov editora","Enter image caption":"Vložte popis obrázka","Enter table caption":"Zadajte popis tabuľky","Font Background Color":"Farba zvýraznenia textu","Font Color":"Farba písma","Font Family":"Názov písma","Font Size":"Veľkosť písma","Full size image":"Obrázok v plnej veľkosti",Green:"Zelená",Grey:"Sivá",Groove:"Drážkovaná","Header column":"Stĺpec hlavičky","Header row":"Riadok hlavičky",Heading:"Nadpis","Heading 1":"Nadpis 1","Heading 2":"Nadpis 2","Heading 3":"Nadpis 3","Heading 4":"Nadpis 4","Heading 5":"Nadpis 5","Heading 6":"Nadpis 6",Height:"Výška",HEX:"HEX","Horizontal line":"Vodorovná čiara","Horizontal text alignment toolbar":"Horizontálne zarovnanie textu v panely","HTML object":"HTML objekt",Huge:"Veľmi veľké","Image resize list":"Zoznam možností zmeny veľkosti","Image toolbar":"Panel nástrojov obrázka","image widget":"widget obrázka","In line":"V riadku","Increase indent":"Zväčšiť odsadenie",Insert:"Vložiť","Insert column left":"Vložiť stĺpec vľavo","Insert column right":"Vložiť stĺpec vpravo","Insert image":"Vložiť obrázok","Insert image via URL":"Vložiť obrázok pomocou URL","Insert paragraph after block":"Vložiť odstavec za blok","Insert paragraph before block":"Vložiť odstavec pred blok","Insert row above":"Vložiť riadok nad","Insert row below":"Vložiť riadok pod","Insert table":"Vložiť tabuľku",Inset:"Vložená z vnútra",Italic:"Kurzíva",Justify:"Do bloku","Justify cell text":"Zarovnať text bunky z oboch strán","Left aligned image":"Zarovnať vľavo","Light blue":"Bledomodrá","Light green":"Bledozelená","Light grey":"Bledosivá",Link:"Odkaz","Link image":"Adresa obrázku","Link URL":"URL adresa","List properties":"Vlastnosti zoznamu","Lower-latin":"Malé písmená","Lower–roman":"Malé rímske čísla","Merge cell down":"Zlúčiť bunku dole","Merge cell left":"Zlúčiť bunku vľavo","Merge cell right":"Zlúčiť bunku vpravo","Merge cell up":"Zlúčiť bunku hore","Merge cells":"Zlúčiť bunky",Next:"Ďalšie","No results found":"Neboli nájdené žiadne výsledky","No searchable items":"Žiadne vyhľadávateľné položky",None:"Žiadna","Numbered List":"Číslovaný zoznam","Numbered list styles toolbar":"Panel so štýlmi číslovaného zoznamu","Open in a new tab":"Otvoriť v novej záložke","Open link in new tab":"Otvoriť odkaz v novom okne",Orange:"Oranžová",Original:"Originál",Outset:"Vložená zvonku",Padding:"Vnútorný okraj",Paragraph:"Odsek","Press Enter to type after or press Shift + Enter to type before the widget":"Stlačte Enter, ak chcete písať po miniaplikácii, alebo stlačte Shift + Enter, ak chcete písať pred miniaplikáciou",Previous:"Predchádzajúce",Purple:"Fialová",Red:"Červená",Redo:"Znova","Remove color":"Zrušiť farbu","Remove Format":"Vyčistiť formátovanie","Replace from computer":"Nahradiť z počítača","Replace image":"Nahradiť obrázok","Replace image from computer":"Nahradiť obrázok z počítača","Resize image":"Zmeniť veľkosť obrázka","Resize image to %0":"Zmeniť veľkosť na %0","Resize image to the original size":"Zmeniť veľkosť na pôvodnú","Restore default":"Obnoviť predvolené","Reversed order":"Obrátene poradie","Rich Text Editor":"Editor s formátovaním",Ridge:"Rámovaná","Right aligned image":"Zarovnať vpravo",Row:"Riadok",Save:"Uložiť","Select all":"Označiť všetko","Select column":"Vybrať stĺpec","Select row":"Vybrať riadok","Show more items":"Zobraziť viac položiek","Side image":"Bočný obrázok",Small:"Malé",Solid:"Plná","Split cell horizontally":"Rozdeliť bunku vodorovne","Split cell vertically":"Rozdeliť bunku zvislo",Square:"Štvorec","Start at":"Prvá položka","Start index must be greater than 0.":"Prvá položka musí mať index väčší ako 0.",Strikethrough:"Preškrtnuté",Style:"Štýl",Subscript:"Dolný index",Superscript:"Horný index","Table alignment toolbar":"Panel zarovnania tabuľky","Table cell text alignment":"Zarovnanie textu v bunke","Table properties":"Vlastnosti tabuľky","Table toolbar":"Panel nástrojov tabuľky","Text alignment":"Zarovnanie textu","Text alignment toolbar":"Panel nástrojov zarovnania textu","Text alternative":"Alternatívny text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Farba má nesprávny formát. Skúste "#FF0000", "rgb(255,0,0)" alebo "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Hodnota je nesprávna. Skúste "10px", "2em" alebo jednoducho "2".',"This link has no URL":"Tento odkaz nemá nastavenú URL adresu",Tiny:"Veľmi malé","To-do List":"To-do zoznam","Toggle caption off":"Vypnúť titulok","Toggle caption on":"Zapnúť titulok","Toggle the circle list style":"Prepnúť na zoznam s kruhovým označením","Toggle the decimal list style":"Prepnúť na číselný zoznam","Toggle the decimal with leading zero list style":"Prepnúť na číselný zoznam s nulou na začiatku","Toggle the disc list style":"Prepnúť na zoznam s označením plného kruhu","Toggle the lower–latin list style":"Prepnúť na zoznam s malými písmenami","Toggle the lower–roman list style":"Prepnúť na zoznam s malými rímskymi číslami","Toggle the square list style":"Prepnúť na zoznam so štvorcovým označením","Toggle the upper–latin list style":"Prepnúť na zoznam s veľkými písmenami","Toggle the upper–roman list style":"Prepnúť na zoznam s veľkými rímskymi číslami",Turquoise:"Tyrkysová","Type or paste your content here.":"Vložte obsah","Type your title":"Vložte nadpis",Underline:"Podčiarknuté",Undo:"Späť",Unlink:"Zrušiť odkaz",Update:"Aktualizovať","Update image URL":"Aktualizovať URL obrázka","Upload failed":"Nahrávanie zlyhalo","Upload from computer":"Nahrať z počítača","Upload image from computer":"Nahrať obrázok z počítača","Upload in progress":"Prebieha nahrávanie","Upper-latin":"Veľké písmená","Upper-roman":"Veľké rímske čísla","Vertical text alignment toolbar":"Vertikálne zarovnanie textu v panely",White:"Biela","Widget toolbar":"Panel nástrojov ovládacieho prvku",Width:"Šírka","Wrap text":"Obtekanie textu",Yellow:"Žltá"}),a.getPluralForm=function(e){return e%1==0&&1==e?0:e%1==0&&e>=2&&e<=4?1:e%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/sl.js b/public/static/plugs/ckeditor5/translations/sl.js
index d4ce91b96..2d9e3043b 100644
--- a/public/static/plugs/ckeditor5/translations/sl.js
+++ b/public/static/plugs/ckeditor5/translations/sl.js
@@ -1 +1 @@
-!function(e){const o=e.sl=e.sl||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Sredinska poravnava","Align left":"Poravnava levo","Align right":"Poravnava desno","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Akvamarin",Background:"",Big:"Veliko",Black:"Črna","Block quote":"Blokiraj citat",Blue:"Modra",Bold:"Krepko",Border:"",Cancel:"Prekliči","Cell properties":"","Center table":"","Choose heading":"Izberi naslov",Clear:"","Click to edit block":"",Code:"Koda",Color:"","Color picker":"",Column:"",Dashed:"",Default:"Privzeto","Delete column":"","Delete row":"","Dim grey":"Temno siva",Dimensions:"","Document colors":"Barve dokumenta",Dotted:"",Double:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter table caption":"","Font Background Color":"Barva ozadja pisave","Font Color":"Barva pisave","Font Family":"Vrsta oz. tip pisave","Font Size":"Velikost pisave",Green:"Zelena",Grey:"Siva",Groove:"","Header column":"","Header row":"",Heading:"Naslov","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Height:"",HEX:"","Horizontal line":"Vodoravna črta","Horizontal text alignment toolbar":"",Huge:"Ogromno","Insert column left":"","Insert column right":"","Insert row above":"","Insert row below":"","Insert table":"Vstavi tabelo",Inset:"",Italic:"Poševno",Justify:"Postavi na sredino","Justify cell text":"","Light blue":"Svetlo modra","Light green":"Svetlo zelena","Light grey":"Svetlo siva","Merge cell down":"","Merge cell left":"","Merge cell right":"","Merge cell up":"","Merge cells":"",Next:"","No results found":"","No searchable items":"",None:"",Orange:"Oranžna",Outset:"",Padding:"",Paragraph:"Odstavek",Previous:"",Purple:"Vijolična",Red:"Rdeča","Remove color":"Odstrani barvo","Restore default":"","Rich Text Editor":"",Ridge:"",Row:"",Save:"Shrani","Select column":"","Select row":"","Show more items":"",Small:"Majhna",Solid:"","Split cell horizontally":"","Split cell vertically":"",Strikethrough:"Prečrtano",Style:"",Subscript:"Naročnik",Superscript:"Nadpis","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Poravnava besedila","Text alignment toolbar":"Orodna vrstica besedila",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"",Tiny:"Drobna","Toggle caption off":"","Toggle caption on":"",Turquoise:"Turkizna","Type or paste your content here.":"Vnesi ali prilepi vsebino","Type your title":"Vnesi naslov",Underline:"Podčrtaj","Vertical text alignment toolbar":"",White:"Bela",Width:"",Yellow:"Rumena"}),o.getPluralForm=function(e){return e%100==1?0:e%100==2?1:e%100==3||e%100==4?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const o=e.sl=e.sl||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Sredinska poravnava","Align left":"Poravnava levo","Align right":"Poravnava desno","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Akvamarin",Background:"",Big:"Veliko",Black:"Črna","Block quote":"Blokiraj citat",Blue:"Modra",Bold:"Krepko",Border:"",Cancel:"Prekliči","Cell properties":"","Center table":"","Choose heading":"Izberi naslov",Clear:"","Click to edit block":"",Close:"",Code:"Koda",Color:"","Color picker":"",Column:"",Dashed:"",Default:"Privzeto","Delete column":"","Delete row":"","Dim grey":"Temno siva",Dimensions:"","Document colors":"Barve dokumenta",Dotted:"",Double:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter table caption":"","Font Background Color":"Barva ozadja pisave","Font Color":"Barva pisave","Font Family":"Vrsta oz. tip pisave","Font Size":"Velikost pisave",Green:"Zelena",Grey:"Siva",Groove:"","Header column":"","Header row":"",Heading:"Naslov","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Height:"",HEX:"","Horizontal line":"Vodoravna črta","Horizontal text alignment toolbar":"",Huge:"Ogromno","Insert column left":"","Insert column right":"","Insert row above":"","Insert row below":"","Insert table":"Vstavi tabelo",Inset:"",Italic:"Poševno",Justify:"Postavi na sredino","Justify cell text":"","Light blue":"Svetlo modra","Light green":"Svetlo zelena","Light grey":"Svetlo siva","Merge cell down":"","Merge cell left":"","Merge cell right":"","Merge cell up":"","Merge cells":"",Next:"","No results found":"","No searchable items":"",None:"",Orange:"Oranžna",Outset:"",Padding:"",Paragraph:"Odstavek",Previous:"",Purple:"Vijolična",Red:"Rdeča","Remove color":"Odstrani barvo","Restore default":"","Rich Text Editor":"",Ridge:"",Row:"",Save:"Shrani","Select column":"","Select row":"","Show more items":"",Small:"Majhna",Solid:"","Split cell horizontally":"","Split cell vertically":"",Strikethrough:"Prečrtano",Style:"",Subscript:"Naročnik",Superscript:"Nadpis","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"Poravnava besedila","Text alignment toolbar":"Orodna vrstica besedila",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"",Tiny:"Drobna","Toggle caption off":"","Toggle caption on":"",Turquoise:"Turkizna","Type or paste your content here.":"Vnesi ali prilepi vsebino","Type your title":"Vnesi naslov",Underline:"Podčrtaj","Vertical text alignment toolbar":"",White:"Bela",Width:"",Yellow:"Rumena"}),o.getPluralForm=function(e){return e%100==1?0:e%100==2?1:e%100==3||e%100==4?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/sq.js b/public/static/plugs/ckeditor5/translations/sq.js
index 1668055ff..3e68ad8e0 100644
--- a/public/static/plugs/ckeditor5/translations/sq.js
+++ b/public/static/plugs/ckeditor5/translations/sq.js
@@ -1 +1 @@
-!function(e){const t=e.sq=e.sq||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"Radhite tesktin e qelisë në fund","Align cell text to the center":"Radhite tekstin në mes","Align cell text to the left":"Radhit tekstin e qelisë majtas","Align cell text to the middle":"Radhit tekstin e qelisë në mes","Align cell text to the right":"Radhit tekstin e qelisë në të djathtë","Align cell text to the top":"Radhit tekstin e qelisë sipër","Align center":"Radhit në mes","Align left":"Radhit majtas","Align right":"Radhit djathtas","Align table to the left":"Radhit tabelën majtas","Align table to the right":"Radhit tabelën në të djathtë",Alignment:"Radhitja",Aquamarine:"",Background:"Prapavija",Big:"I madh",Black:"E zezë","Block quote":"Thonjëzat",Blue:"E kaltër",Bold:"Trash",Border:"","Break text":"","Bulleted List":"Listë me Pika","Bulleted list styles toolbar":"",Cancel:"Anulo","Caption for image: %0":"","Caption for the image":"","Cell properties":"Karakteristikat e qelisë","Center table":"","Centered image":"Foto e vendosur në mes","Change image text alternative":"Ndrysho tekstin zgjedhor të fotos","Choose heading":"Përzgjidh nëntitullin",Circle:"",Clear:"Pastro","Click to edit block":"",Code:"Kod",Color:"Ngjyra","Color picker":"",Column:"Kolona",Dashed:"",Decimal:"","Decimal with leading zero":"",Default:"Parazgjedhur","Delete column":"Gris kolonën","Delete row":"Grish rreshtin","Dim grey":"",Dimensions:"Dimensionet",Disc:"","Document colors":"Ngjyra e dokumentit",Dotted:"Me pika",Double:"Me dy vija",Downloadable:"E shkarkueshme","Drag to move":"","Dropdown toolbar":"Zgjero kokështrirjen","Edit block":"Redakto bllokun","Edit link":"Redakto nyjën","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"Kokështrirja e redaktuesit","Enter image caption":"Shto përshkrimin e fotos","Enter table caption":"","Font Background Color":"Ngjyra e tekstit të prapavijës","Font Color":"Ngjyra e tekstit","Font Family":"Familja e fontit","Font Size":"Madhësia tekstit","Full size image":"Foto me madhësi të plotë",Green:"E gjelbër",Grey:"Ngjyrë hiri",Groove:"","Header column":"Kolona e kokës","Header row":"Rreshti i kokës",Heading:"Nëntitulli","Heading 1":"Nëntitulli 1","Heading 2":"Nëntitulli 2","Heading 3":"Nëntitulli 3","Heading 4":"Titulli 4","Heading 5":"Titulli 5","Heading 6":"Titulli 6",Height:"Lartësia",HEX:"","Horizontal line":"Vija horizontale","Horizontal text alignment toolbar":"Kokështrirja e rradhitjes së tekstit horizontalisht",Huge:"I stërmadh","Image resize list":"","Image toolbar":"Kokështrirja e fotos","image widget":"Vegla e fotos","In line":"",Insert:"","Insert column left":"Shto kolonë majtas","Insert column right":"Shto kolonë djathtas","Insert image":"Shto Foto","Insert image via URL":"","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"Shto rresht sipër","Insert row below":"Shto rresht poshtë","Insert table":"Shto tabelë",Inset:"",Italic:"Pjerrtë",Justify:"Plotësim","Justify cell text":"","Left aligned image":"Foto e vendosur majtas","Light blue":"","Light green":"","Light grey":"",Link:"Shto nyjën","Link image":"Foto e nyjes","Link URL":"Nyja e URL-së","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Bashko kutizat poshtë","Merge cell left":"Bashko kutizat majtas","Merge cell right":"Bashko kutizat djathtas","Merge cell up":"Bashko kutizat sipër","Merge cells":"Bashko kutizat",Next:"E radhës","No results found":"","No searchable items":"",None:"Asnjë","Numbered List":"Listë me Numra","Numbered list styles toolbar":"","Open in a new tab":"Hape në një fletë të re","Open link in new tab":"Hap nyjën në faqe të re",Orange:"Ngjyrë portokalli",Original:"",Outset:"",Padding:"",Paragraph:"Paragrafi","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Paraprake",Purple:"",Red:"E kuqe",Redo:"Ribëj","Remove color":"Largo ngjyrën","Remove Format":"Largo formatimin","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Redaktues i Tekstit të Pasur",Ridge:"","Right aligned image":"Foto e vendosur djathtas",Row:"Rreshti",Save:"Ruaj","Select all":"Përzgjidh të gjitha","Select column":"","Select row":"","Show more items":"","Side image":"Foto anësore",Small:"I vogël",Solid:"","Split cell horizontally":"Ndaj kutizat horizontalisht","Split cell vertically":"Ndajë kutizat vertikalisht",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Vi në mes",Style:"Stili",Subscript:"Abonohu",Superscript:"Mbishkrim","Table alignment toolbar":"Kokështrirja e radhitjes së tabelës","Table cell text alignment":"Rradhitja e tekstit të qelisë së tabelës","Table properties":"Karakteristikat e tabelës","Table toolbar":"Kokështrirja e tabelës","Text alignment":"Radhitja e tekstit","Text alignment toolbar":"Shiriti i rradhitjes së tekstit","Text alternative":"Teksti zgjedhor",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Kodi është i pavlefshëm. Provo"#FF0000" ose "rgb(255,0,0)" ose "red".','The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Kjo nyje nuk ka URL",Tiny:"I vocërr","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"Shkruaj ose kopjo përmbajtjen këtu.","Type your title":"Shkruani titullin tuaj",Underline:"Nënvizuar",Undo:"Rikthe",Unlink:"Largo nyjën",Update:"","Update image URL":"","Upload failed":"Ngarkimi dështoi","Upload from computer":"","Upload image from computer":"","Upload in progress":"Duke ngarkuar","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"Kokështrirja e rradhitjes së tekstit vertikalisht",White:"E bardhë","Widget toolbar":"Kokështrirja e shtesës",Width:"Gjerësia","Wrap text":"",Yellow:"E verdhë"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.sq=e.sq||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"Radhite tesktin e qelisë në fund","Align cell text to the center":"Radhite tekstin në mes","Align cell text to the left":"Radhit tekstin e qelisë majtas","Align cell text to the middle":"Radhit tekstin e qelisë në mes","Align cell text to the right":"Radhit tekstin e qelisë në të djathtë","Align cell text to the top":"Radhit tekstin e qelisë sipër","Align center":"Radhit në mes","Align left":"Radhit majtas","Align right":"Radhit djathtas","Align table to the left":"Radhit tabelën majtas","Align table to the right":"Radhit tabelën në të djathtë",Alignment:"Radhitja",Aquamarine:"",Background:"Prapavija",Big:"I madh",Black:"E zezë","Block quote":"Thonjëzat",Blue:"E kaltër",Bold:"Trash",Border:"","Break text":"","Bulleted List":"Listë me Pika","Bulleted list styles toolbar":"",Cancel:"Anulo","Caption for image: %0":"","Caption for the image":"","Cell properties":"Karakteristikat e qelisë","Center table":"","Centered image":"Foto e vendosur në mes","Change image text alternative":"Ndrysho tekstin zgjedhor të fotos","Choose heading":"Përzgjidh nëntitullin",Circle:"",Clear:"Pastro","Click to edit block":"",Close:"",Code:"Kod",Color:"Ngjyra","Color picker":"",Column:"Kolona",Dashed:"",Decimal:"","Decimal with leading zero":"",Default:"Parazgjedhur","Delete column":"Gris kolonën","Delete row":"Grish rreshtin","Dim grey":"",Dimensions:"Dimensionet",Disc:"","Document colors":"Ngjyra e dokumentit",Dotted:"Me pika",Double:"Me dy vija",Downloadable:"E shkarkueshme","Drag to move":"","Dropdown toolbar":"Zgjero kokështrirjen","Edit block":"Redakto bllokun","Edit link":"Redakto nyjën","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"Kokështrirja e redaktuesit","Enter image caption":"Shto përshkrimin e fotos","Enter table caption":"","Font Background Color":"Ngjyra e tekstit të prapavijës","Font Color":"Ngjyra e tekstit","Font Family":"Familja e fontit","Font Size":"Madhësia tekstit","Full size image":"Foto me madhësi të plotë",Green:"E gjelbër",Grey:"Ngjyrë hiri",Groove:"","Header column":"Kolona e kokës","Header row":"Rreshti i kokës",Heading:"Nëntitulli","Heading 1":"Nëntitulli 1","Heading 2":"Nëntitulli 2","Heading 3":"Nëntitulli 3","Heading 4":"Titulli 4","Heading 5":"Titulli 5","Heading 6":"Titulli 6",Height:"Lartësia",HEX:"","Horizontal line":"Vija horizontale","Horizontal text alignment toolbar":"Kokështrirja e rradhitjes së tekstit horizontalisht",Huge:"I stërmadh","Image resize list":"","Image toolbar":"Kokështrirja e fotos","image widget":"Vegla e fotos","In line":"",Insert:"","Insert column left":"Shto kolonë majtas","Insert column right":"Shto kolonë djathtas","Insert image":"Shto Foto","Insert image via URL":"","Insert paragraph after block":"","Insert paragraph before block":"","Insert row above":"Shto rresht sipër","Insert row below":"Shto rresht poshtë","Insert table":"Shto tabelë",Inset:"",Italic:"Pjerrtë",Justify:"Plotësim","Justify cell text":"","Left aligned image":"Foto e vendosur majtas","Light blue":"","Light green":"","Light grey":"",Link:"Shto nyjën","Link image":"Foto e nyjes","Link URL":"Nyja e URL-së","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Bashko kutizat poshtë","Merge cell left":"Bashko kutizat majtas","Merge cell right":"Bashko kutizat djathtas","Merge cell up":"Bashko kutizat sipër","Merge cells":"Bashko kutizat",Next:"E radhës","No results found":"","No searchable items":"",None:"Asnjë","Numbered List":"Listë me Numra","Numbered list styles toolbar":"","Open in a new tab":"Hape në një fletë të re","Open link in new tab":"Hap nyjën në faqe të re",Orange:"Ngjyrë portokalli",Original:"",Outset:"",Padding:"",Paragraph:"Paragrafi","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Paraprake",Purple:"",Red:"E kuqe",Redo:"Ribëj","Remove color":"Largo ngjyrën","Remove Format":"Largo formatimin","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Redaktues i Tekstit të Pasur",Ridge:"","Right aligned image":"Foto e vendosur djathtas",Row:"Rreshti",Save:"Ruaj","Select all":"Përzgjidh të gjitha","Select column":"","Select row":"","Show more items":"","Side image":"Foto anësore",Small:"I vogël",Solid:"","Split cell horizontally":"Ndaj kutizat horizontalisht","Split cell vertically":"Ndajë kutizat vertikalisht",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Vi në mes",Style:"Stili",Subscript:"Abonohu",Superscript:"Mbishkrim","Table alignment toolbar":"Kokështrirja e radhitjes së tabelës","Table cell text alignment":"Rradhitja e tekstit të qelisë së tabelës","Table properties":"Karakteristikat e tabelës","Table toolbar":"Kokështrirja e tabelës","Text alignment":"Radhitja e tekstit","Text alignment toolbar":"Shiriti i rradhitjes së tekstit","Text alternative":"Teksti zgjedhor",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Kodi është i pavlefshëm. Provo"#FF0000" ose "rgb(255,0,0)" ose "red".','The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"Kjo nyje nuk ka URL",Tiny:"I vocërr","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"Shkruaj ose kopjo përmbajtjen këtu.","Type your title":"Shkruani titullin tuaj",Underline:"Nënvizuar",Undo:"Rikthe",Unlink:"Largo nyjën",Update:"","Update image URL":"","Upload failed":"Ngarkimi dështoi","Upload from computer":"","Upload image from computer":"","Upload in progress":"Duke ngarkuar","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"Kokështrirja e rradhitjes së tekstit vertikalisht",White:"E bardhë","Widget toolbar":"Kokështrirja e shtesës",Width:"Gjerësia","Wrap text":"",Yellow:"E verdhë"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/sr-latn.js b/public/static/plugs/ckeditor5/translations/sr-latn.js
index 27eff96d4..7ad824aef 100644
--- a/public/static/plugs/ckeditor5/translations/sr-latn.js
+++ b/public/static/plugs/ckeditor5/translations/sr-latn.js
@@ -1 +1 @@
-!function(e){const a=e["sr-latn"]=e["sr-latn"]||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Prihvati","Align cell text to the bottom":"Poravnajte tekst ćelije prema dole","Align cell text to the center":"Poravnajte tekst ćelije u sredinu","Align cell text to the left":"Poravnajte tekst ćelije levo","Align cell text to the middle":"Poravnajte tekst ćelije u sredinu","Align cell text to the right":"Poravnajte tekst ćelije desno","Align cell text to the top":"Poravnajte tekst ćelije prema gore","Align center":"Centralno ravnanje","Align left":"Levo ravnanje","Align right":"Desno ravnanje","Align table to the left":"Poravnajte tabelu na levu stranu","Align table to the right":"Poravnajte tabelu na desnu stranu",Alignment:"Poravnanje",Aquamarine:"Zelenkastoplava",Background:"Pozadina",Big:"Veliko",Black:"Crna","Block quote":"Citat",Blue:"Plava",Bold:"Podebljano",Border:"Granica","Break text":"Prelom teksta","Bulleted List":"Nabrajane liste","Bulleted list styles toolbar":"Traka sa alatkama za nabrajane liste",Cancel:"Odustani","Caption for image: %0":"Natpis za sliku:%0","Caption for the image":"Natpis za sliku","Cell properties":"Svojstva ćelije","Center table":"Centar tabele","Centered image":"Slika u sredini","Change image text alternative":"Izmena alternativnog teksta","Choose heading":"Odredi stil",Circle:"Krug",Clear:"Obriši","Click to edit block":"Kliknite da biste uredili blok",Code:"Kod",Color:"Boja","Color picker":"Birač boja",Column:"Kolona",Dashed:"Razbijeno",Decimal:"Decimala","Decimal with leading zero":"Decimalni broj sa nulom na početku","Decrease indent":"Smanji uvlačenje",Default:"Оsnovni","Delete column":"Briši kolonu","Delete row":"Briši red","Dim grey":"Bledo siva",Dimensions:"Dimenzija",Disc:"Disk","Document colors":"Boje dokumenta",Dotted:"Sa tačkama",Double:"Dvostruki",Downloadable:"Moguće preuzimanje","Drag to move":"Prevucite da biste premestili","Dropdown toolbar":"Padajuća traka sa alatkama","Edit block":"Blok uređivač","Edit link":"Ispravi link","Editor block content toolbar":"Traka sa alatkama za blokiranje sadržaja uređivača","Editor contextual toolbar":"Kontekstualna traka sa alatkama Editor","Editor editing area: %0":"Oblast za uređivanje urednika: %0","Editor toolbar":"Uređivač traka sa alatkama","Enter image caption":"Odredi tekst ispod slike","Enter table caption":"Unesite naslov tabele","Font Background Color":"Boja pozadine slova","Font Color":"Boja slova","Font Family":"Font","Font Size":"Veličina fonta","Full size image":"Slika u punoj veličini",Green:"Zelena",Grey:"Siva",Groove:"Kolosek","Header column":"Kolona za zaglavlje","Header row":"Red za zaglavlje",Heading:"Stilovi","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Height:"Visina",HEX:"HEX","Horizontal line":"Horizontalna razdelna linija","Horizontal text alignment toolbar":"Horizontalna traka sa alatkama za  poravnavanje teksta","HTML object":"HTML objеkat",Huge:"Ogromno","Image resize list":"Lista veličine slike","Image toolbar":"Slika traka sa alatkama","image widget":"modul sa slikom","In line":"U redu","Increase indent":"Povećaj uclačenje",Insert:"Ubaci","Insert column left":"Dodaj kolonu levo","Insert column right":"Dodaj kolonu desno","Insert image":"Dodaj sliku","Insert image via URL":"Ubaci sliku preko URL-a","Insert paragraph after block":"Уметните одломак после блока","Insert paragraph before block":"Уметните одломак пре блока","Insert row above":"Dodaj red iznad","Insert row below":"Dodaj red ispod","Insert table":"Dodaj tabelu",Inset:"Prilog",Italic:"Kurziv",Justify:"Obostrano ravnanje","Justify cell text":"Opravdajte tekst ćelije","Left aligned image":"Leva slika","Light blue":"Svetloplava","Light green":"Svetlo zelena","Light grey":"Svetlo siva",Link:"Link","Link image":"Link slike","Link URL":"URL link","List properties":"Navedite svojstva","Lower-latin":"Donji - latinski","Lower–roman":"Donji - rimski","Merge cell down":"Spoj ćelije na dole","Merge cell left":"Spoj ćelije na levo","Merge cell right":"Spoj ćelije na desno","Merge cell up":"Spoj ćelije na gore","Merge cells":"Spoj ćelije",Next:"Sledeći","No results found":"Nije pronađen nijedan rezultat","No searchable items":"Nema stavki koje se mogu pretražiti",None:"Nijedan","Numbered List":"Lista sa brojevima","Numbered list styles toolbar":"Traka sa altakama za liste sa brojevima","Open in a new tab":"Otvori u novoj kartici","Open link in new tab":"Otvori link u novom prozoru",Orange:"Narandžasta",Original:"Original",Outset:"Početak",Padding:"Postavljanje",Paragraph:"Pasus","Press Enter to type after or press Shift + Enter to type before the widget":"Pritisnite Enter da kucate posle ili pritisnite Shift + Enter da kucate pre vidžeta",Previous:"Prethodni",Purple:"Ljubičasta",Red:"Crvena",Redo:"Ponovo","Remove color":"Otkloni boju","Remove Format":"Ukloni formatiranje","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Promenite veličinu slike","Resize image to %0":"Promenite veličinu slike na% 0","Resize image to the original size":"Promenite veličinu slike do originalne veličine","Restore default":"Vrati podrazumevano","Reversed order":"Obrnuti redosled","Rich Text Editor":"Prošireni uređivač teksta",Ridge:"Greben","Right aligned image":"Desna slika",Row:"Red",Save:"Sačuvaj","Select all":"Označi sve","Select column":"Odaberi kolonu","Select row":"Odaberi red","Show more items":"Prikaži još stavki","Side image":"Bočna slika",Small:"Malo",Solid:"Čvrst","Split cell horizontally":"Deli ćelije vodoravno","Split cell vertically":"Deli ćelije uspravno",Square:"Kvadrat","Start at":"Početi u","Start index must be greater than 0.":"Početni indeks mora biti veći od 0.",Strikethrough:"Precrtan",Style:"Stil",Subscript:"Index dole",Superscript:"Index gore","Table alignment toolbar":"Traka sa alatkama za poravnavanje tabele","Table cell text alignment":"Poravnaj tekst u tabeli","Table properties":"Svojstva tabele","Table toolbar":"Tabela traka sa alatkama","Text alignment":"Ravnanje teksta","Text alignment toolbar":"Alatke za ravnanje teksta","Text alternative":"Alternativni tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Boja je nevažeća. Pokušajte sa "# FF0000" ili "rgb (255,0,0)" ili "crvena".','The value is invalid. Try "10px" or "2em" or simply "2".':"Vrednost je nevažeća. Pokušajte sa „10pk“ ili „2em“ ili jednostavno „2“.","This link has no URL":"Link ne sadrži URL",Tiny:"Sitno","To-do List":"Lista obaveza","Toggle caption off":"Isključivanje natpisa","Toggle caption on":"Uključite naslov","Toggle the circle list style":"Uključite / isključite stil liste krugova","Toggle the decimal list style":"Uključi / isključi stil dekadne liste","Toggle the decimal with leading zero list style":"Prebaci decimalni znak sa vodećim stilom liste nula","Toggle the disc list style":"Uključite / isključite stil liste diskova","Toggle the lower–latin list style":"Uključite / isključite stil donje liste latinice","Toggle the lower–roman list style":"Uključite / isključite stil donje rimske liste","Toggle the square list style":"Uključite / isključite stil liste kvadrata","Toggle the upper–latin list style":"Uključite / isključite stil gornje liste latinice","Toggle the upper–roman list style":"Uključite / isključite stil gornje rimske liste",Turquoise:"Tirkizna","Type or paste your content here.":"Upišite ili nalepite naslov","Type your title":"Odredite naslov",Underline:"Podvučen",Undo:"Povlačenje",Unlink:"Оtkloni link",Update:"Ažuriraj","Update image URL":"Ažuriraj URL slike","Upload failed":"Postavljanje neuspešno","Upload from computer":"","Upload image from computer":"","Upload in progress":"Postavljanje u toku","Upper-latin":"Gornji - latinski","Upper-roman":"Gornji - rimski","Vertical text alignment toolbar":"Vertikalna traka sa alatkama za poravnavanje teksta",White:"Bela","Widget toolbar":"Видгет трака са алаткама",Width:"Širina","Wrap text":"Prelomiti tekst",Yellow:"Žuta"}),a.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e["sr-latn"]=e["sr-latn"]||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Prihvati","Align cell text to the bottom":"Poravnajte tekst ćelije prema dole","Align cell text to the center":"Poravnajte tekst ćelije u sredinu","Align cell text to the left":"Poravnajte tekst ćelije levo","Align cell text to the middle":"Poravnajte tekst ćelije u sredinu","Align cell text to the right":"Poravnajte tekst ćelije desno","Align cell text to the top":"Poravnajte tekst ćelije prema gore","Align center":"Centralno ravnanje","Align left":"Levo ravnanje","Align right":"Desno ravnanje","Align table to the left":"Poravnajte tabelu na levu stranu","Align table to the right":"Poravnajte tabelu na desnu stranu",Alignment:"Poravnanje",Aquamarine:"Zelenkastoplava",Background:"Pozadina",Big:"Veliko",Black:"Crna","Block quote":"Citat",Blue:"Plava",Bold:"Podebljano",Border:"Granica","Break text":"Prelom teksta","Bulleted List":"Nabrajane liste","Bulleted list styles toolbar":"Traka sa alatkama za nabrajane liste",Cancel:"Odustani","Caption for image: %0":"Natpis za sliku:%0","Caption for the image":"Natpis za sliku","Cell properties":"Svojstva ćelije","Center table":"Centar tabele","Centered image":"Slika u sredini","Change image text alternative":"Izmena alternativnog teksta","Choose heading":"Odredi stil",Circle:"Krug",Clear:"Obriši","Click to edit block":"Kliknite da biste uredili blok",Close:"",Code:"Kod",Color:"Boja","Color picker":"Birač boja",Column:"Kolona",Dashed:"Razbijeno",Decimal:"Decimala","Decimal with leading zero":"Decimalni broj sa nulom na početku","Decrease indent":"Smanji uvlačenje",Default:"Оsnovni","Delete column":"Briši kolonu","Delete row":"Briši red","Dim grey":"Bledo siva",Dimensions:"Dimenzija",Disc:"Disk","Document colors":"Boje dokumenta",Dotted:"Sa tačkama",Double:"Dvostruki",Downloadable:"Moguće preuzimanje","Drag to move":"Prevucite da biste premestili","Dropdown toolbar":"Padajuća traka sa alatkama","Edit block":"Blok uređivač","Edit link":"Ispravi link","Editor block content toolbar":"Traka sa alatkama za blokiranje sadržaja uređivača","Editor contextual toolbar":"Kontekstualna traka sa alatkama Editor","Editor dialog":"","Editor editing area: %0":"Oblast za uređivanje urednika: %0","Editor toolbar":"Uređivač traka sa alatkama","Enter image caption":"Odredi tekst ispod slike","Enter table caption":"Unesite naslov tabele","Font Background Color":"Boja pozadine slova","Font Color":"Boja slova","Font Family":"Font","Font Size":"Veličina fonta","Full size image":"Slika u punoj veličini",Green:"Zelena",Grey:"Siva",Groove:"Kolosek","Header column":"Kolona za zaglavlje","Header row":"Red za zaglavlje",Heading:"Stilovi","Heading 1":"Naslov 1","Heading 2":"Naslov 2","Heading 3":"Naslov 3","Heading 4":"Naslov 4","Heading 5":"Naslov 5","Heading 6":"Naslov 6",Height:"Visina",HEX:"HEX","Horizontal line":"Horizontalna razdelna linija","Horizontal text alignment toolbar":"Horizontalna traka sa alatkama za  poravnavanje teksta","HTML object":"HTML objеkat",Huge:"Ogromno","Image resize list":"Lista veličine slike","Image toolbar":"Slika traka sa alatkama","image widget":"modul sa slikom","In line":"U redu","Increase indent":"Povećaj uclačenje",Insert:"Ubaci","Insert column left":"Dodaj kolonu levo","Insert column right":"Dodaj kolonu desno","Insert image":"Dodaj sliku","Insert image via URL":"Ubaci sliku preko URL-a","Insert paragraph after block":"Уметните одломак после блока","Insert paragraph before block":"Уметните одломак пре блока","Insert row above":"Dodaj red iznad","Insert row below":"Dodaj red ispod","Insert table":"Dodaj tabelu",Inset:"Prilog",Italic:"Kurziv",Justify:"Obostrano ravnanje","Justify cell text":"Opravdajte tekst ćelije","Left aligned image":"Leva slika","Light blue":"Svetloplava","Light green":"Svetlo zelena","Light grey":"Svetlo siva",Link:"Link","Link image":"Link slike","Link URL":"URL link","List properties":"Navedite svojstva","Lower-latin":"Donji - latinski","Lower–roman":"Donji - rimski","Merge cell down":"Spoj ćelije na dole","Merge cell left":"Spoj ćelije na levo","Merge cell right":"Spoj ćelije na desno","Merge cell up":"Spoj ćelije na gore","Merge cells":"Spoj ćelije",Next:"Sledeći","No results found":"Nije pronađen nijedan rezultat","No searchable items":"Nema stavki koje se mogu pretražiti",None:"Nijedan","Numbered List":"Lista sa brojevima","Numbered list styles toolbar":"Traka sa altakama za liste sa brojevima","Open in a new tab":"Otvori u novoj kartici","Open link in new tab":"Otvori link u novom prozoru",Orange:"Narandžasta",Original:"Original",Outset:"Početak",Padding:"Postavljanje",Paragraph:"Pasus","Press Enter to type after or press Shift + Enter to type before the widget":"Pritisnite Enter da kucate posle ili pritisnite Shift + Enter da kucate pre vidžeta",Previous:"Prethodni",Purple:"Ljubičasta",Red:"Crvena",Redo:"Ponovo","Remove color":"Otkloni boju","Remove Format":"Ukloni formatiranje","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Promenite veličinu slike","Resize image to %0":"Promenite veličinu slike na% 0","Resize image to the original size":"Promenite veličinu slike do originalne veličine","Restore default":"Vrati podrazumevano","Reversed order":"Obrnuti redosled","Rich Text Editor":"Prošireni uređivač teksta",Ridge:"Greben","Right aligned image":"Desna slika",Row:"Red",Save:"Sačuvaj","Select all":"Označi sve","Select column":"Odaberi kolonu","Select row":"Odaberi red","Show more items":"Prikaži još stavki","Side image":"Bočna slika",Small:"Malo",Solid:"Čvrst","Split cell horizontally":"Deli ćelije vodoravno","Split cell vertically":"Deli ćelije uspravno",Square:"Kvadrat","Start at":"Početi u","Start index must be greater than 0.":"Početni indeks mora biti veći od 0.",Strikethrough:"Precrtan",Style:"Stil",Subscript:"Index dole",Superscript:"Index gore","Table alignment toolbar":"Traka sa alatkama za poravnavanje tabele","Table cell text alignment":"Poravnaj tekst u tabeli","Table properties":"Svojstva tabele","Table toolbar":"Tabela traka sa alatkama","Text alignment":"Ravnanje teksta","Text alignment toolbar":"Alatke za ravnanje teksta","Text alternative":"Alternativni tekst",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Boja je nevažeća. Pokušajte sa "# FF0000" ili "rgb (255,0,0)" ili "crvena".','The value is invalid. Try "10px" or "2em" or simply "2".':"Vrednost je nevažeća. Pokušajte sa „10pk“ ili „2em“ ili jednostavno „2“.","This link has no URL":"Link ne sadrži URL",Tiny:"Sitno","To-do List":"Lista obaveza","Toggle caption off":"Isključivanje natpisa","Toggle caption on":"Uključite naslov","Toggle the circle list style":"Uključite / isključite stil liste krugova","Toggle the decimal list style":"Uključi / isključi stil dekadne liste","Toggle the decimal with leading zero list style":"Prebaci decimalni znak sa vodećim stilom liste nula","Toggle the disc list style":"Uključite / isključite stil liste diskova","Toggle the lower–latin list style":"Uključite / isključite stil donje liste latinice","Toggle the lower–roman list style":"Uključite / isključite stil donje rimske liste","Toggle the square list style":"Uključite / isključite stil liste kvadrata","Toggle the upper–latin list style":"Uključite / isključite stil gornje liste latinice","Toggle the upper–roman list style":"Uključite / isključite stil gornje rimske liste",Turquoise:"Tirkizna","Type or paste your content here.":"Upišite ili nalepite naslov","Type your title":"Odredite naslov",Underline:"Podvučen",Undo:"Povlačenje",Unlink:"Оtkloni link",Update:"Ažuriraj","Update image URL":"Ažuriraj URL slike","Upload failed":"Postavljanje neuspešno","Upload from computer":"","Upload image from computer":"","Upload in progress":"Postavljanje u toku","Upper-latin":"Gornji - latinski","Upper-roman":"Gornji - rimski","Vertical text alignment toolbar":"Vertikalna traka sa alatkama za poravnavanje teksta",White:"Bela","Widget toolbar":"Видгет трака са алаткама",Width:"Širina","Wrap text":"Prelomiti tekst",Yellow:"Žuta"}),a.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/sr.js b/public/static/plugs/ckeditor5/translations/sr.js
index 1422ca437..f3fad6692 100644
--- a/public/static/plugs/ckeditor5/translations/sr.js
+++ b/public/static/plugs/ckeditor5/translations/sr.js
@@ -1 +1 @@
-!function(e){const t=e.sr=e.sr||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Prihvati","Align cell text to the bottom":"Поравнајте текст ћелије према доле","Align cell text to the center":"Поравнајте текст ћелије у средину","Align cell text to the left":"Поравнајте текст ћелије лево","Align cell text to the middle":"Поравнајте текст ћелије у средину","Align cell text to the right":"Поравнајте текст ћелије десно","Align cell text to the top":"Поравнајте текст ћелије према горе","Align center":"Централно равнанје","Align left":"Лево равнање","Align right":"Десно равнање","Align table to the left":"Поравнајте табелу на леву страну","Align table to the right":"Поравнајте табелу на десну страну",Alignment:"Поравнање",Aquamarine:"Зеленкастоплава",Background:"Позадина",Big:"Велико",Black:"Црна","Block quote":"Цитат",Blue:"Плава",Bold:"Подебљано",Border:"Граница","Break text":"Прелом текста","Bulleted List":"Набрајане листе","Bulleted list styles toolbar":"Трака са алаткама за набрајане листе",Cancel:"Одустани","Caption for image: %0":"Натпис за слику: %0","Caption for the image":"Натпис за слику","Cell properties":"Својства ћелије","Center table":"Центар табеле","Centered image":"Слика у средини","Change image text alternative":"Измена алтернативног текста","Choose heading":"Одреди стил",Circle:"Круг",Clear:"Obriši","Click to edit block":"Kliknite da biste uredili blok",Code:"Код",Color:"Боја","Color picker":"Бирач боја",Column:"Колона",Dashed:"Разбијено",Decimal:"Децимала","Decimal with leading zero":"Децимала са нулом на почетку","Decrease indent":"Смањи увлачење",Default:"Основни","Delete column":"Бриши колону","Delete row":"Бриши ред","Dim grey":"Бледо сива",Dimensions:"Димензија",Disc:"Диск","Document colors":"Боје документа",Dotted:"Са тачкама",Double:"Двоструко",Downloadable:"Могуће преузимање","Drag to move":"Prevucite da biste premestili","Dropdown toolbar":"Падајућа трака са алаткама","Edit block":"Блок уређивач","Edit link":"Исправи линк","Editor block content toolbar":"Трака са алаткама за блокирање садржаја уређивача","Editor contextual toolbar":"Контекстуална трака са алаткама Едитор","Editor editing area: %0":"Област за уређивање уредника: %0","Editor toolbar":"Уређивач трака са алаткама","Enter image caption":"Одреди текст испод слике","Enter table caption":"Унесите наслов табеле ","Font Background Color":"Боја позадине слова","Font Color":"Боја слова","Font Family":"Фонт","Font Size":"Величина фонта","Full size image":"Слика у пуној величини",Green:"Зелена",Grey:"Сива",Groove:"Колосек","Header column":"Колона за заглавље","Header row":"Ред за заглавлје",Heading:"Стилови","Heading 1":"Наслов 1","Heading 2":"Наслов 2","Heading 3":"Наслов 3","Heading 4":"Наслов 4","Heading 5":"Наслов 5","Heading 6":"Наслов 6",Height:"Висина",HEX:"HEX","Horizontal line":"Хоризонтална разделна линија","Horizontal text alignment toolbar":"Хоризонтална трака са алаткама за поравнање текста","HTML object":"ХТМЛ објекат ",Huge:"Огромно","Image resize list":"Листа величине слике","Image toolbar":"Слика трака са алтакама","image widget":"модул са сликом","In line":"У реду","Increase indent":"Повећај увлачење",Insert:"Убаци","Insert column left":"Додај колону лево","Insert column right":"Додај колону десно","Insert image":"Додај слику","Insert image via URL":"Убаци слику преко УРЛ-а","Insert paragraph after block":"Umetnite odlomak posle bloka","Insert paragraph before block":"Umetnite odlomak pre bloka","Insert row above":"Додај ред изнад","Insert row below":"Додај ред испод","Insert table":"Додај табелу",Inset:"Прилог",Italic:"Курзив",Justify:"Обострано равнање","Justify cell text":"Оправдајте текст ћелије","Left aligned image":"Лева слика","Light blue":"Светлоплава","Light green":"Светлозелена","Light grey":"Светло сива",Link:"Линк","Link image":"Линк слике","Link URL":"УРЛ линк","List properties":"Наведите својства ","Lower-latin":"Доњи - латински","Lower–roman":"Доњи - римски","Merge cell down":"Спој ћелије на доле","Merge cell left":"Cпој ћелије на лево","Merge cell right":"Спој ћелије на десно","Merge cell up":"Спој ћелије на горе","Merge cells":"Спој ћелије",Next:"Следећи","No results found":"Nije pronađen nijedan rezultat","No searchable items":"Nema stavki koje se mogu pretražiti",None:"Ниједан","Numbered List":"Листа са бројевима","Numbered list styles toolbar":"Трака са алаткама за листе са бројевима","Open in a new tab":"Отвори у новој картици","Open link in new tab":"Отвори линк у новом прозору",Orange:"Нараџаста",Original:"Оригинал",Outset:"Почетак",Padding:"Постављање",Paragraph:"Пасус","Press Enter to type after or press Shift + Enter to type before the widget":"Притисните Ентер да куцате после или притисните Схифт + Ентер да куцате пре виџета",Previous:"Претходни",Purple:"Љубичаста",Red:"Црвена",Redo:"Поново","Remove color":"Отклони боју","Remove Format":"Уклони форматирање","Replace from computer":"Zameni sa računara","Replace image":"Zameni sliku","Replace image from computer":"Zameni sliku sa računara","Resize image":"Промените величину слике","Resize image to %0":"Промените величину слике на% 0","Resize image to the original size":"Промените величину слике до оригиналне величине","Restore default":"Врати подразумевано","Reversed order":"Обрнути редослед ","Rich Text Editor":"Проширен уређивач текста",Ridge:"Гребен","Right aligned image":"Десна слика",Row:"Ред",Save:"Сачувај","Select all":"Означи све.","Select column":"Изабери колону","Select row":"Изабери ред","Show more items":"Прикажи још ставки","Side image":"Бочна слика",Small:"Мало",Solid:"Чврст","Split cell horizontally":"Дели ћелије водоравно","Split cell vertically":"Дели ћелије усправно",Square:"Квадрат","Start at":"Почети у","Start index must be greater than 0.":"Почетни индекс мора бити већи од 0. ",Strikethrough:"Прецртан",Style:"Стил",Subscript:"Индекс доле",Superscript:"Индекс горе","Table alignment toolbar":"Трака са алаткама за поравнање табеле","Table cell text alignment":"Поравнај тексту табели","Table properties":"Својства табеле","Table toolbar":"Табела трака са алаткама","Text alignment":"Равнање текста","Text alignment toolbar":"Алатке за равнање текста","Text alternative":"Алтернативни текст",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Боја је неважећа. Покушајте са "#FF0000" или "rgb(255,0,0)" или "црвена".','The value is invalid. Try "10px" or "2em" or simply "2".':'Вредност је неважећа. Покушајте са "10px" или "2em" или једноставно "2".',"This link has no URL":"Линк не садржи УРЛ",Tiny:"Ситно","To-do List":"Листа обавеза","Toggle caption off":"Искључивање натписа ","Toggle caption on":"Укључите наслов ","Toggle the circle list style":"Укључи / искључи стил листе кругова","Toggle the decimal list style":"Укључи / искључи стил декадне листе","Toggle the decimal with leading zero list style":"Пребаци децимални знак са водећим стилом листе нула","Toggle the disc list style":"Укључите / искључите стил листе дискова","Toggle the lower–latin list style":"Укључите / искључите стил доње листе латинице","Toggle the lower–roman list style":"Укључите/ искључите стил доње римске листе","Toggle the square list style":"Укључи / искључи стил листе квадрата","Toggle the upper–latin list style":"Укључите / искључите стил горње листе латинице","Toggle the upper–roman list style":"Укључите / искључите стил горње римске листе",Turquoise:"Тиркизна","Type or paste your content here.":"Упишите или налепите наслов","Type your title":"Одредите наслов",Underline:"Подвучен",Undo:"Повлачење",Unlink:"Отклони линк",Update:"Ажурирај","Update image URL":"Ажурирај УРЛ слике","Upload failed":"Постављање неуспешно","Upload from computer":"Otpremi sa računara","Upload image from computer":"Otpremi sliku sa računara","Upload in progress":"Постављање у току","Upper-latin":"Горњи - латински","Upper-roman":"Горњи - римски","Vertical text alignment toolbar":"Вертикална трака са алаткама за поравнање текста",White:"Бела","Widget toolbar":"Widget traka sa alatkama",Width:"Ширина","Wrap text":"Преломити текст",Yellow:"Жута"}),t.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.sr=e.sr||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Prihvati","Align cell text to the bottom":"Поравнајте текст ћелије према доле","Align cell text to the center":"Поравнајте текст ћелије у средину","Align cell text to the left":"Поравнајте текст ћелије лево","Align cell text to the middle":"Поравнајте текст ћелије у средину","Align cell text to the right":"Поравнајте текст ћелије десно","Align cell text to the top":"Поравнајте текст ћелије према горе","Align center":"Централно равнанје","Align left":"Лево равнање","Align right":"Десно равнање","Align table to the left":"Поравнајте табелу на леву страну","Align table to the right":"Поравнајте табелу на десну страну",Alignment:"Поравнање",Aquamarine:"Зеленкастоплава",Background:"Позадина",Big:"Велико",Black:"Црна","Block quote":"Цитат",Blue:"Плава",Bold:"Подебљано",Border:"Граница","Break text":"Прелом текста","Bulleted List":"Набрајане листе","Bulleted list styles toolbar":"Трака са алаткама за набрајане листе",Cancel:"Одустани","Caption for image: %0":"Натпис за слику: %0","Caption for the image":"Натпис за слику","Cell properties":"Својства ћелије","Center table":"Центар табеле","Centered image":"Слика у средини","Change image text alternative":"Измена алтернативног текста","Choose heading":"Одреди стил",Circle:"Круг",Clear:"Obriši","Click to edit block":"Kliknite da biste uredili blok",Close:"Zatvori",Code:"Код",Color:"Боја","Color picker":"Бирач боја",Column:"Колона",Dashed:"Разбијено",Decimal:"Децимала","Decimal with leading zero":"Децимала са нулом на почетку","Decrease indent":"Смањи увлачење",Default:"Основни","Delete column":"Бриши колону","Delete row":"Бриши ред","Dim grey":"Бледо сива",Dimensions:"Димензија",Disc:"Диск","Document colors":"Боје документа",Dotted:"Са тачкама",Double:"Двоструко",Downloadable:"Могуће преузимање","Drag to move":"Prevucite da biste premestili","Dropdown toolbar":"Падајућа трака са алаткама","Edit block":"Блок уређивач","Edit link":"Исправи линк","Editor block content toolbar":"Трака са алаткама за блокирање садржаја уређивача","Editor contextual toolbar":"Контекстуална трака са алаткама Едитор","Editor dialog":"Dijalog za uređivanje","Editor editing area: %0":"Област за уређивање уредника: %0","Editor toolbar":"Уређивач трака са алаткама","Enter image caption":"Одреди текст испод слике","Enter table caption":"Унесите наслов табеле ","Font Background Color":"Боја позадине слова","Font Color":"Боја слова","Font Family":"Фонт","Font Size":"Величина фонта","Full size image":"Слика у пуној величини",Green:"Зелена",Grey:"Сива",Groove:"Колосек","Header column":"Колона за заглавље","Header row":"Ред за заглавлје",Heading:"Стилови","Heading 1":"Наслов 1","Heading 2":"Наслов 2","Heading 3":"Наслов 3","Heading 4":"Наслов 4","Heading 5":"Наслов 5","Heading 6":"Наслов 6",Height:"Висина",HEX:"HEX","Horizontal line":"Хоризонтална разделна линија","Horizontal text alignment toolbar":"Хоризонтална трака са алаткама за поравнање текста","HTML object":"ХТМЛ објекат ",Huge:"Огромно","Image resize list":"Листа величине слике","Image toolbar":"Слика трака са алтакама","image widget":"модул са сликом","In line":"У реду","Increase indent":"Повећај увлачење",Insert:"Убаци","Insert column left":"Додај колону лево","Insert column right":"Додај колону десно","Insert image":"Додај слику","Insert image via URL":"Убаци слику преко УРЛ-а","Insert paragraph after block":"Umetnite odlomak posle bloka","Insert paragraph before block":"Umetnite odlomak pre bloka","Insert row above":"Додај ред изнад","Insert row below":"Додај ред испод","Insert table":"Додај табелу",Inset:"Прилог",Italic:"Курзив",Justify:"Обострано равнање","Justify cell text":"Оправдајте текст ћелије","Left aligned image":"Лева слика","Light blue":"Светлоплава","Light green":"Светлозелена","Light grey":"Светло сива",Link:"Линк","Link image":"Линк слике","Link URL":"УРЛ линк","List properties":"Наведите својства ","Lower-latin":"Доњи - латински","Lower–roman":"Доњи - римски","Merge cell down":"Спој ћелије на доле","Merge cell left":"Cпој ћелије на лево","Merge cell right":"Спој ћелије на десно","Merge cell up":"Спој ћелије на горе","Merge cells":"Спој ћелије",Next:"Следећи","No results found":"Nije pronađen nijedan rezultat","No searchable items":"Nema stavki koje se mogu pretražiti",None:"Ниједан","Numbered List":"Листа са бројевима","Numbered list styles toolbar":"Трака са алаткама за листе са бројевима","Open in a new tab":"Отвори у новој картици","Open link in new tab":"Отвори линк у новом прозору",Orange:"Нараџаста",Original:"Оригинал",Outset:"Почетак",Padding:"Постављање",Paragraph:"Пасус","Press Enter to type after or press Shift + Enter to type before the widget":"Притисните Ентер да куцате после или притисните Схифт + Ентер да куцате пре виџета",Previous:"Претходни",Purple:"Љубичаста",Red:"Црвена",Redo:"Поново","Remove color":"Отклони боју","Remove Format":"Уклони форматирање","Replace from computer":"Zameni sa računara","Replace image":"Zameni sliku","Replace image from computer":"Zameni sliku sa računara","Resize image":"Промените величину слике","Resize image to %0":"Промените величину слике на% 0","Resize image to the original size":"Промените величину слике до оригиналне величине","Restore default":"Врати подразумевано","Reversed order":"Обрнути редослед ","Rich Text Editor":"Проширен уређивач текста",Ridge:"Гребен","Right aligned image":"Десна слика",Row:"Ред",Save:"Сачувај","Select all":"Означи све.","Select column":"Изабери колону","Select row":"Изабери ред","Show more items":"Прикажи још ставки","Side image":"Бочна слика",Small:"Мало",Solid:"Чврст","Split cell horizontally":"Дели ћелије водоравно","Split cell vertically":"Дели ћелије усправно",Square:"Квадрат","Start at":"Почети у","Start index must be greater than 0.":"Почетни индекс мора бити већи од 0. ",Strikethrough:"Прецртан",Style:"Стил",Subscript:"Индекс доле",Superscript:"Индекс горе","Table alignment toolbar":"Трака са алаткама за поравнање табеле","Table cell text alignment":"Поравнај тексту табели","Table properties":"Својства табеле","Table toolbar":"Табела трака са алаткама","Text alignment":"Равнање текста","Text alignment toolbar":"Алатке за равнање текста","Text alternative":"Алтернативни текст",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Боја је неважећа. Покушајте са "#FF0000" или "rgb(255,0,0)" или "црвена".','The value is invalid. Try "10px" or "2em" or simply "2".':'Вредност је неважећа. Покушајте са "10px" или "2em" или једноставно "2".',"This link has no URL":"Линк не садржи УРЛ",Tiny:"Ситно","To-do List":"Листа обавеза","Toggle caption off":"Искључивање натписа ","Toggle caption on":"Укључите наслов ","Toggle the circle list style":"Укључи / искључи стил листе кругова","Toggle the decimal list style":"Укључи / искључи стил декадне листе","Toggle the decimal with leading zero list style":"Пребаци децимални знак са водећим стилом листе нула","Toggle the disc list style":"Укључите / искључите стил листе дискова","Toggle the lower–latin list style":"Укључите / искључите стил доње листе латинице","Toggle the lower–roman list style":"Укључите/ искључите стил доње римске листе","Toggle the square list style":"Укључи / искључи стил листе квадрата","Toggle the upper–latin list style":"Укључите / искључите стил горње листе латинице","Toggle the upper–roman list style":"Укључите / искључите стил горње римске листе",Turquoise:"Тиркизна","Type or paste your content here.":"Упишите или налепите наслов","Type your title":"Одредите наслов",Underline:"Подвучен",Undo:"Повлачење",Unlink:"Отклони линк",Update:"Ажурирај","Update image URL":"Ажурирај УРЛ слике","Upload failed":"Постављање неуспешно","Upload from computer":"Otpremi sa računara","Upload image from computer":"Otpremi sliku sa računara","Upload in progress":"Постављање у току","Upper-latin":"Горњи - латински","Upper-roman":"Горњи - римски","Vertical text alignment toolbar":"Вертикална трака са алаткама за поравнање текста",White:"Бела","Widget toolbar":"Widget traka sa alatkama",Width:"Ширина","Wrap text":"Преломити текст",Yellow:"Жута"}),t.getPluralForm=function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/sv.js b/public/static/plugs/ckeditor5/translations/sv.js
index 4eb2c4ca3..e2c3bab67 100644
--- a/public/static/plugs/ckeditor5/translations/sv.js
+++ b/public/static/plugs/ckeditor5/translations/sv.js
@@ -1 +1 @@
-!function(e){const t=e.sv=e.sv||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 av %1",Accept:"Acceptera","Align cell text to the bottom":"Bottenjustera celltext","Align cell text to the center":"Centrera celltext","Align cell text to the left":"Vänsterjustera celltext","Align cell text to the middle":"Centrera celltext","Align cell text to the right":"Högerjustera celltext","Align cell text to the top":"Toppjustera celltext","Align center":"Centrera","Align left":"Vänsterjustera","Align right":"Högerjustera","Align table to the left":"Vänsterjustera tabell","Align table to the right":"Högerjustera tabell",Alignment:"Justering",Aquamarine:"Akvamarin",Background:"Bakgrund",Big:"Stor",Black:"Svart","Block quote":"Blockcitat",Blue:"Blå",Bold:"Fet",Border:"Kant","Break text":"Bryt upp text","Bulleted List":"Punktlista","Bulleted list styles toolbar":"Verktygsfält för punktlistor",Cancel:"Avbryt","Caption for image: %0":"Bildtext till bild: %0","Caption for the image":"Bildtext till bilden","Cell properties":"Cellegenskaper","Center table":"Centrera tabell","Centered image":"Centrerad bild","Change image text alternative":"Ändra bildens alternativa text","Choose heading":"Välj rubrik",Circle:"Cirkel",Clear:"Rensa","Click to edit block":"Klicka för att redigera blocket",Code:"Kod",Color:"Färg","Color picker":"Färgväljare",Column:"Kolumn",Dashed:"Streckad",Decimal:"Decimal","Decimal with leading zero":"Decimal med inledande nolla","Decrease indent":"Minska indrag",Default:"Standard","Delete column":"Ta bort kolumn","Delete row":"Ta bort rad","Dim grey":"Dunkelgrå",Dimensions:"Mått",Disc:"Disk","Document colors":"Dokumentfärger",Dotted:"Prickig",Double:"Dubbel",Downloadable:"Nedladdningsbar","Drag to move":"Dra för att flytta","Dropdown toolbar":"Rullgardinsverktygsfält","Edit block":"Redigera block","Edit link":"Redigera länk","Editor block content toolbar":"Verktygsfält vid block av innehåll","Editor contextual toolbar":"Ordbehandlarens kontextuella verktygsfält","Editor editing area: %0":"Ordbehandlares redigeringsområde: %0","Editor toolbar":"Redigeringsverktygsfält","Enter image caption":"Fyll i bildtext","Enter table caption":"Ange tabellrubrik","Font Background Color":"Tecknens bakgrundsfärg","Font Color":"Teckenfärg","Font Family":"Typsnitt","Font Size":"Teckenstorlek","Full size image":"Bild i full storlek",Green:"Grön",Grey:"Grå",Groove:"Skåra","Header column":"Rubrikkolumn","Header row":"Rubrikrad",Heading:"Rubrik","Heading 1":"Rubrik 1","Heading 2":"Rubrik 2","Heading 3":"Rubrik 3","Heading 4":"Rubrik 4","Heading 5":"Rubrik 5","Heading 6":"Rubrik 6",Height:"Höjd",HEX:"HEX","Horizontal line":"Horisontell linje","Horizontal text alignment toolbar":"Verktygsfält för horisontell textjustering","HTML object":"HTML-objekt",Huge:"Enorm","Image resize list":"Lista för storleksändring av bild","Image toolbar":"Bildverktygsfält","image widget":"image widget","In line":"På rad","Increase indent":"Öka indrag",Insert:"Infoga","Insert column left":"Infoga kolumn till vänster","Insert column right":"Infoga kolumn till höger","Insert image":"Infoga bild","Insert image via URL":"Infoga bild via URL","Insert paragraph after block":"Infoga stycke efter block","Insert paragraph before block":"Infoga stycke före block","Insert row above":"Infoga rad ovanför","Insert row below":"Infoga rad nedanför","Insert table":"Lägg in tabell",Inset:"Infälld",Italic:"Kursiv",Justify:"Justera till marginaler","Justify cell text":"Anpassa celltext","Left aligned image":"Vänsterjusterad bild","Light blue":"Ljusblå","Light green":"Ljusgrön","Light grey":"Ljusgrå",Link:"Länk","Link image":"Länka bild","Link URL":"Länkens URL","List properties":"Listegenskaper","Lower-latin":"Latinska gemener","Lower–roman":"Romerska gemener","Merge cell down":"Sammanfoga celler neråt","Merge cell left":"Sammanfoga celler åt vänster","Merge cell right":"Sammanfoga celler åt höger","Merge cell up":"Sammanfoga celler uppåt","Merge cells":"Sammanfoga celler",Next:"Nästa","No results found":"Inga resultat hittades","No searchable items":"Inga sökbara objekt",None:"Inget","Numbered List":"Numrerad lista","Numbered list styles toolbar":"Verktygsfält för numrerade listor","Open in a new tab":"Öppna i en ny flik","Open link in new tab":"Öppna länk i ny flik",Orange:"Orange",Original:"Ursprunglig",Outset:"Utfälld",Padding:"Marginal",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Tryck på retur för att skriva efter eller på skift + retur för att skriva före widgeten.",Previous:"Föregående",Purple:"Lila",Red:"Röd",Redo:"Gör om","Remove color":"Ta bort färg","Remove Format":"Radera formatering","Replace from computer":"Ersätt från dator","Replace image":"Ersätt bild","Replace image from computer":"Ersätt bild från dator","Resize image":"Ändra storlek på bild","Resize image to %0":"Ändra bildens storlek till %0","Resize image to the original size":"Ändra bilden till dess ursprungsstorlek","Restore default":"Återställ standard","Reversed order":"Byt riktning","Rich Text Editor":"Rich Text-editor",Ridge:"Kant","Right aligned image":"Högerjusterad bild",Row:"Rad",Save:"Spara","Select all":"Välj alla","Select column":"Välj kolumn","Select row":"Välj rad","Show more items":"Visa fler objekt","Side image":"Kantbild",Small:"Liten",Solid:"Enfärgad","Split cell horizontally":"Dela cell horisontellt","Split cell vertically":"Dela cell vertikalt",Square:"Fyrkant","Start at":"Börja på","Start index must be greater than 0.":"Startindex måste vara större än 0.",Strikethrough:"Genomstruken",Style:"Stil",Subscript:"Nedsänkta tecken",Superscript:"Upphöjda tecken","Table alignment toolbar":"Verktygsfält för tabelljustering","Table cell text alignment":"Textjustering i tabellcell","Table properties":"Tabellegenskaper","Table toolbar":"Tabellverktygsfält","Text alignment":"Textjustering","Text alignment toolbar":"Verktygsfält för textjustering","Text alternative":"Alternativ text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Färgen är ogiltig. Testa "#FF0000" eller "rgb(255,0,0)" eller "röd".','The value is invalid. Try "10px" or "2em" or simply "2".':'Värdet är ogiltigt. Testa "10px" eller "2em" eller helt enkelt "2".',"This link has no URL":"Denna länk saknar URL",Tiny:"Mycket liten","To-do List":"Att-göra-lista","Toggle caption off":"Slå av rubrik","Toggle caption on":"Slå på rubrik","Toggle the circle list style":"Växla till cirkellisttypen","Toggle the decimal list style":"Växla till decimallisttypen","Toggle the decimal with leading zero list style":"Växla till listtypen decimal-med-inledande-nolla","Toggle the disc list style":"Växla till disklisttypen","Toggle the lower–latin list style":"Växla till listtypen latinska gemener","Toggle the lower–roman list style":"Växla till listtypen romerska gemener","Toggle the square list style":"Växla till fyrkantslisttypen","Toggle the upper–latin list style":"Växla till listtypen latinska versaler ","Toggle the upper–roman list style":"Växla till listtypen romerska versaler",Turquoise:"Turkos","Type or paste your content here.":"Skriv eller klistra in ditt innehåll här.","Type your title":"Skriv in rubriken",Underline:"Understrykning",Undo:"Ångra",Unlink:"Ta bort länk",Update:"Uppdatera","Update image URL":"Uppdatera bildens URL","Upload failed":"Uppladdning misslyckades","Upload from computer":"Ladda upp från dator","Upload image from computer":"Ladda upp bild från dator","Upload in progress":"Uppladdning pågår","Upper-latin":"Latinska versaler","Upper-roman":"Romerska versaler","Vertical text alignment toolbar":"Verktygsfält för vertikal textjustering",White:"Vit","Widget toolbar":"Widgetverktygsfält",Width:"Bredd","Wrap text":"Omslut med text",Yellow:"Gul"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.sv=e.sv||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 av %1",Accept:"Acceptera","Align cell text to the bottom":"Bottenjustera celltext","Align cell text to the center":"Centrera celltext","Align cell text to the left":"Vänsterjustera celltext","Align cell text to the middle":"Centrera celltext","Align cell text to the right":"Högerjustera celltext","Align cell text to the top":"Toppjustera celltext","Align center":"Centrera","Align left":"Vänsterjustera","Align right":"Högerjustera","Align table to the left":"Vänsterjustera tabell","Align table to the right":"Högerjustera tabell",Alignment:"Justering",Aquamarine:"Akvamarin",Background:"Bakgrund",Big:"Stor",Black:"Svart","Block quote":"Blockcitat",Blue:"Blå",Bold:"Fet",Border:"Kant","Break text":"Bryt upp text","Bulleted List":"Punktlista","Bulleted list styles toolbar":"Verktygsfält för punktlistor",Cancel:"Avbryt","Caption for image: %0":"Bildtext till bild: %0","Caption for the image":"Bildtext till bilden","Cell properties":"Cellegenskaper","Center table":"Centrera tabell","Centered image":"Centrerad bild","Change image text alternative":"Ändra bildens alternativa text","Choose heading":"Välj rubrik",Circle:"Cirkel",Clear:"Rensa","Click to edit block":"Klicka för att redigera blocket",Close:"Stäng",Code:"Kod",Color:"Färg","Color picker":"Färgväljare",Column:"Kolumn",Dashed:"Streckad",Decimal:"Decimal","Decimal with leading zero":"Decimal med inledande nolla","Decrease indent":"Minska indrag",Default:"Standard","Delete column":"Ta bort kolumn","Delete row":"Ta bort rad","Dim grey":"Dunkelgrå",Dimensions:"Mått",Disc:"Disk","Document colors":"Dokumentfärger",Dotted:"Prickig",Double:"Dubbel",Downloadable:"Nedladdningsbar","Drag to move":"Dra för att flytta","Dropdown toolbar":"Rullgardinsverktygsfält","Edit block":"Redigera block","Edit link":"Redigera länk","Editor block content toolbar":"Verktygsfält vid block av innehåll","Editor contextual toolbar":"Ordbehandlarens kontextuella verktygsfält","Editor dialog":"Ordbehandlardialog","Editor editing area: %0":"Ordbehandlares redigeringsområde: %0","Editor toolbar":"Redigeringsverktygsfält","Enter image caption":"Fyll i bildtext","Enter table caption":"Ange tabellrubrik","Font Background Color":"Tecknens bakgrundsfärg","Font Color":"Teckenfärg","Font Family":"Typsnitt","Font Size":"Teckenstorlek","Full size image":"Bild i full storlek",Green:"Grön",Grey:"Grå",Groove:"Skåra","Header column":"Rubrikkolumn","Header row":"Rubrikrad",Heading:"Rubrik","Heading 1":"Rubrik 1","Heading 2":"Rubrik 2","Heading 3":"Rubrik 3","Heading 4":"Rubrik 4","Heading 5":"Rubrik 5","Heading 6":"Rubrik 6",Height:"Höjd",HEX:"HEX","Horizontal line":"Horisontell linje","Horizontal text alignment toolbar":"Verktygsfält för horisontell textjustering","HTML object":"HTML-objekt",Huge:"Enorm","Image resize list":"Lista för storleksändring av bild","Image toolbar":"Bildverktygsfält","image widget":"image widget","In line":"På rad","Increase indent":"Öka indrag",Insert:"Infoga","Insert column left":"Infoga kolumn till vänster","Insert column right":"Infoga kolumn till höger","Insert image":"Infoga bild","Insert image via URL":"Infoga bild via URL","Insert paragraph after block":"Infoga stycke efter block","Insert paragraph before block":"Infoga stycke före block","Insert row above":"Infoga rad ovanför","Insert row below":"Infoga rad nedanför","Insert table":"Lägg in tabell",Inset:"Infälld",Italic:"Kursiv",Justify:"Justera till marginaler","Justify cell text":"Anpassa celltext","Left aligned image":"Vänsterjusterad bild","Light blue":"Ljusblå","Light green":"Ljusgrön","Light grey":"Ljusgrå",Link:"Länk","Link image":"Länka bild","Link URL":"Länkens URL","List properties":"Listegenskaper","Lower-latin":"Latinska gemener","Lower–roman":"Romerska gemener","Merge cell down":"Sammanfoga celler neråt","Merge cell left":"Sammanfoga celler åt vänster","Merge cell right":"Sammanfoga celler åt höger","Merge cell up":"Sammanfoga celler uppåt","Merge cells":"Sammanfoga celler",Next:"Nästa","No results found":"Inga resultat hittades","No searchable items":"Inga sökbara objekt",None:"Inget","Numbered List":"Numrerad lista","Numbered list styles toolbar":"Verktygsfält för numrerade listor","Open in a new tab":"Öppna i en ny flik","Open link in new tab":"Öppna länk i ny flik",Orange:"Orange",Original:"Ursprunglig",Outset:"Utfälld",Padding:"Marginal",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Tryck på retur för att skriva efter eller på skift + retur för att skriva före widgeten.",Previous:"Föregående",Purple:"Lila",Red:"Röd",Redo:"Gör om","Remove color":"Ta bort färg","Remove Format":"Radera formatering","Replace from computer":"Ersätt från dator","Replace image":"Ersätt bild","Replace image from computer":"Ersätt bild från dator","Resize image":"Ändra storlek på bild","Resize image to %0":"Ändra bildens storlek till %0","Resize image to the original size":"Ändra bilden till dess ursprungsstorlek","Restore default":"Återställ standard","Reversed order":"Byt riktning","Rich Text Editor":"Rich Text-editor",Ridge:"Kant","Right aligned image":"Högerjusterad bild",Row:"Rad",Save:"Spara","Select all":"Välj alla","Select column":"Välj kolumn","Select row":"Välj rad","Show more items":"Visa fler objekt","Side image":"Kantbild",Small:"Liten",Solid:"Enfärgad","Split cell horizontally":"Dela cell horisontellt","Split cell vertically":"Dela cell vertikalt",Square:"Fyrkant","Start at":"Börja på","Start index must be greater than 0.":"Startindex måste vara större än 0.",Strikethrough:"Genomstruken",Style:"Stil",Subscript:"Nedsänkta tecken",Superscript:"Upphöjda tecken","Table alignment toolbar":"Verktygsfält för tabelljustering","Table cell text alignment":"Textjustering i tabellcell","Table properties":"Tabellegenskaper","Table toolbar":"Tabellverktygsfält","Text alignment":"Textjustering","Text alignment toolbar":"Verktygsfält för textjustering","Text alternative":"Alternativ text",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Färgen är ogiltig. Testa "#FF0000" eller "rgb(255,0,0)" eller "röd".','The value is invalid. Try "10px" or "2em" or simply "2".':'Värdet är ogiltigt. Testa "10px" eller "2em" eller helt enkelt "2".',"This link has no URL":"Denna länk saknar URL",Tiny:"Mycket liten","To-do List":"Att-göra-lista","Toggle caption off":"Slå av rubrik","Toggle caption on":"Slå på rubrik","Toggle the circle list style":"Växla till cirkellisttypen","Toggle the decimal list style":"Växla till decimallisttypen","Toggle the decimal with leading zero list style":"Växla till listtypen decimal-med-inledande-nolla","Toggle the disc list style":"Växla till disklisttypen","Toggle the lower–latin list style":"Växla till listtypen latinska gemener","Toggle the lower–roman list style":"Växla till listtypen romerska gemener","Toggle the square list style":"Växla till fyrkantslisttypen","Toggle the upper–latin list style":"Växla till listtypen latinska versaler ","Toggle the upper–roman list style":"Växla till listtypen romerska versaler",Turquoise:"Turkos","Type or paste your content here.":"Skriv eller klistra in ditt innehåll här.","Type your title":"Skriv in rubriken",Underline:"Understrykning",Undo:"Ångra",Unlink:"Ta bort länk",Update:"Uppdatera","Update image URL":"Uppdatera bildens URL","Upload failed":"Uppladdning misslyckades","Upload from computer":"Ladda upp från dator","Upload image from computer":"Ladda upp bild från dator","Upload in progress":"Uppladdning pågår","Upper-latin":"Latinska versaler","Upper-roman":"Romerska versaler","Vertical text alignment toolbar":"Verktygsfält för vertikal textjustering",White:"Vit","Widget toolbar":"Widgetverktygsfält",Width:"Bredd","Wrap text":"Omslut med text",Yellow:"Gul"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/th.js b/public/static/plugs/ckeditor5/translations/th.js
index 24cb869bf..b7c38aac9 100644
--- a/public/static/plugs/ckeditor5/translations/th.js
+++ b/public/static/plugs/ckeditor5/translations/th.js
@@ -1 +1 @@
-!function(e){const t=e.th=e.th||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 จาก %1",Accept:"ยอมรับ","Align cell text to the bottom":"จัดตำแหน่งข้อความของเซลล์ชิดด้านล่าง","Align cell text to the center":"จัดตำแหน่งข้อความของเซลล์ไว้กึ่งกลาง","Align cell text to the left":"จัดตำแหน่งข้อความของเซลล์ชิดซ้าย","Align cell text to the middle":"จัดตำแหน่งข้อความของเซลล์ไว้กึ่งกลาง","Align cell text to the right":"จัดตำแหน่งข้อความของเซลล์ชิดขวา","Align cell text to the top":"จัดตำแหน่งข้อความของเซลล์ชิดด้านบน","Align center":"จัดกึ่งกลาง","Align left":"จัดชิดซ้าย","Align right":"จัดชิดขวา","Align table to the left":"จัดตำแหน่งตารางชิดด้านซ้าย","Align table to the right":"จัดตำแหน่งตารางชิดด้านขวา",Alignment:"การจัดตำแหน่ง",Aquamarine:"พลอยสีฟ้า",Background:"พื้นหลัง",Big:"ใหญ่",Black:"สีดำ","Block quote":"คำพูดบล็อก",Blue:"สีน้ำเงิน",Bold:"ตัวหนา",Border:"เส้นขอบ","Break text":"แบ่งข้อความ","Bulleted List":"รายการสัญลักษณ์แสดงหัวข้อย่อย","Bulleted list styles toolbar":"แถบเครื่องมือรูปแบบรายการสัญลักษณ์แสดงหัวข้อย่อย",Cancel:"ยกเลิก","Caption for image: %0":"คำบรรยายภาพ: %0","Caption for the image":"คำบรรยายภาพ","Cell properties":"คุณสมบัติของเซลล์","Center table":"จัดตำแหน่งตารางไว้ตรงกลาง","Centered image":"จัดแนวรูปกึ่งกลาง","Change image text alternative":"เปลี่ยนข้อความเมื่อไม่พบรูป","Choose heading":"เลือกขนาดหัวข้อ",Circle:"วงกลม",Clear:"ล้าง","Click to edit block":"คลิกเพื่อแก้ไขบล็อก",Code:"โค้ด",Color:"สี","Color picker":"เครื่องมือเลือกสี",Column:"คอลัมน์",Dashed:"เส้นประ",Decimal:"ทศนิยม","Decimal with leading zero":"ทศนิยมที่มีศูนย์นำหน้า","Decrease indent":"ลดการเยื้อง",Default:"ค่าเริ่มต้น","Delete column":"ลบคอลัมน์","Delete row":"ลบแถว","Dim grey":"สีเทาเข้ม",Dimensions:"ขนาด",Disc:"ดิสก์","Document colors":"สีเอกสาร",Dotted:"เส้นไข่ปลา",Double:"คู่",Downloadable:"ที่สามารถดาวน์โหลดได้","Drag to move":"ลากเพื่อย้าย","Dropdown toolbar":"แถบเครื่องมือแบบเลื่อนลง","Edit block":"แก้ไขบล็อก","Edit link":"แก้ไขลิงก์","Editor block content toolbar":"แถบเครื่องมือแก้ไขบล็อกเนื้อหา","Editor contextual toolbar":"แถบเครื่องมือแก้ไขข้อความ","Editor editing area: %0":"พื้นที่แก้ไขของตัวแก้ไข: %0","Editor toolbar":"แถบเครื่องมือแก้ไข","Enter image caption":"ระบุคำอธิบายภาพ","Enter table caption":"ป้อนคำบรรยายตาราง","Font Background Color":"สีพื้นหลังข้อความ","Font Color":"สีข้อความ","Font Family":"แบบอักษร","Font Size":"ขนาดข้อความ","Full size image":"รูปขนาดเต็ม",Green:"สีเขียว",Grey:"สีเทา",Groove:"ร่อง","Header column":"หัวข้อคอลัมน์","Header row":"ส่วนหัวแถว",Heading:"หัวข้อ","Heading 1":"หัวข้อขนาด 1","Heading 2":"หัวข้อ 2","Heading 3":"หัวข้อ 3","Heading 4":"หัวข้อ 4","Heading 5":"หัวข้อ 5","Heading 6":"หัวข้อ 6",Height:"ความสูง",HEX:"HEX","Horizontal line":"เส้นแนวนอน","Horizontal text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความในแนวนอน","HTML object":"วัตถุ HTML",Huge:"ใหญ่มาก","Image resize list":"รายการปรับขนาดภาพ","Image toolbar":"เครื่องมือรูปภาพ","image widget":"วิดเจ็ตรูปภาพ","In line":"ในบรรทัด","Increase indent":"เพิ่มการเยื้อง",Insert:"แทรก","Insert column left":"แทรกคอลัมน์ทางซ้าย","Insert column right":"แทรกคอลัมน์ทางขวา","Insert image":"แทรกรูป","Insert image via URL":"แทรกภาพผ่าน URL","Insert paragraph after block":"แทรกย่อหน้าหลังบล็อก","Insert paragraph before block":"แทรกย่อหน้าก่อนบล็อก","Insert row above":"แทรกส่วนหัวด้านบน","Insert row below":"แทรกส่วนหัวด้านล่าง","Insert table":"แทรกตาราง",Inset:"ยุบ",Italic:"ตัวเอียง",Justify:"จัด(ขอบ)","Justify cell text":"จัดขอบข้อความของเซลล์ให้กระจายเต็มแนว","Left aligned image":"จัดแนวภาพซ้าย","Light blue":"สีฟ้า","Light green":"สีเขียวอ่อน","Light grey":"สีเทาอ่อน",Link:"ลิงก์","Link image":"ลิงก์ภาพ","Link URL":"ลิงก์ URL","List properties":"คุณสมบัติของรายการ","Lower-latin":"อักษรลาตินตัวพิมพ์เล็ก","Lower–roman":"อักษรโรมันตัวพิมพ์เล็ก","Merge cell down":"ผสานเซลล์ด้านล่าง","Merge cell left":"ผสานเซลล์ด้านซ้าย","Merge cell right":"ผสานเซลล์ด้านขวา","Merge cell up":"ผสานเซลล์ด้านบน","Merge cells":"ผสานเซลล์",Next:"ถัดไป","No results found":"ไม่พบผลลัพธ์","No searchable items":"ไม่มีรายการที่สามารถค้นหาได้",None:"ไม่มี","Numbered List":"รายการลำดับเลข","Numbered list styles toolbar":"แถบเครื่องมือรูปแบบรายการแบบตัวเลข","Open in a new tab":"เปิดในแท็บใหม่","Open link in new tab":"เปิดลิงก์ในแท็บใหม่",Orange:"สีส้ม",Original:"ดั้งเดิม",Outset:"นูน",Padding:"การเสริมเต็ม",Paragraph:"ย่อหน้า","Press Enter to type after or press Shift + Enter to type before the widget":"กด Enter เพื่อพิมพ์หลังจาก หรือกด Shift + Enter เพื่อพิมพ์ก่อนหน้าวิดเจ็ต",Previous:"ก่อนหน้า",Purple:"สีม่วง",Red:"สีแดง",Redo:"ทำซ้ำ","Remove color":"ลบสี","Remove Format":"ลบรูปแบบ","Replace from computer":"แทนที่จากคอมพิวเตอร์","Replace image":"แทนที่ภาพ","Replace image from computer":"แทนที่ภาพจากคอมพิวเตอร์","Resize image":"ปรับขนาดภาพ","Resize image to %0":"ปรับขนาดภาพเป็น %0","Resize image to the original size":"ปรับขนาดภาพเป็นขนาดเดิม","Restore default":"คืนค่าเริ่มต้น","Reversed order":"ลำดับที่ย้อนกลับ","Rich Text Editor":"โปรแกรมแก้ไข Rich Text",Ridge:"สัน","Right aligned image":"จัดแนวภาพขวา",Row:"แถว",Save:"บันทึก","Select all":"เลือกทั้งหมด","Select column":"เลือกคอลัมน์","Select row":"เลือกแถว","Show more items":"แสดงรายการเพิ่มเติม","Side image":"รูปด้านข้าง",Small:"เล็ก",Solid:"เส้นทึบ","Split cell horizontally":"แยกเซลล์แนวนอน","Split cell vertically":"แยกเซลล์แนวตั้ง",Square:"สี่เหลี่ยม","Start at":"เริ่มต้นที่","Start index must be greater than 0.":"ดัชนีเริ่มต้นต้องมากกว่า 0",Strikethrough:"ขีดทับ",Style:"รูปแบบ",Subscript:"ตัวห้อย",Superscript:"ตัวยก","Table alignment toolbar":"แถบเครื่องมือจัดตำแหน่งตาราง","Table cell text alignment":"การจัดตำแหน่งข้อความของเซลล์ตาราง","Table properties":"คุณสมบัติของตาราง","Table toolbar":"เครื่องมือตาราง","Text alignment":"จัดตำแหน่งข้อความ","Text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความ","Text alternative":"ข้อความเมื่อไม่พบรูป",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'สีไม่ถูกต้อง ลอง "#FF0000" หรือ "rgb(255,0,0)" หรือ "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'ค่าไม่ถูกต้อง ลอง "10px" หรือ "2em" หรือแค่เพียง "2"',"This link has no URL":"ลิงก์นี้ไม่มี URL",Tiny:"เล็กมาก","To-do List":"รายการสิ่งที่จะทำ","Toggle caption off":"ปิดคำอธิบายภาพ","Toggle caption on":"เปิดคำอธิบายภาพ","Toggle the circle list style":"สลับรูปแบบรายการวงกลม","Toggle the decimal list style":"สลับรูปแบบรายการทศนิยม","Toggle the decimal with leading zero list style":"สลับทศนิยมด้วยรูปแบบรายการศูนย์นำหน้า","Toggle the disc list style":"สลับรูปแบบรายการดิสก์","Toggle the lower–latin list style":"สลับรูปแบบรายการอักษรลาตินตัวพิมพ์เล็ก","Toggle the lower–roman list style":"สลับรูปแบบรายการอักษรโรมันตัวพิมพ์เล็ก","Toggle the square list style":"สลับรูปแบบรายการสี่เหลี่ยม","Toggle the upper–latin list style":"สลับรูปแบบรายการอักษรลาตินตัวพิมพ์ใหญ่","Toggle the upper–roman list style":"สลับรูปแบบรายการอักษรโรมันตัวพิมพ์ใหญ่",Turquoise:"สีเขียวขุ่น","Type or paste your content here.":"พิมพ์หรือวางเนื้อหาของคุณที่นี่","Type your title":"พิมพ์ชื่อเรื่องของคุณ",Underline:"ขีดเส้นใต้",Undo:"ย้อนกลับ",Unlink:"ยกเลิกการลิงก์",Update:"อัปเดต","Update image URL":"อัปเดต URL ภาพ","Upload failed":"อัปโหลดไม่สำเร็จ","Upload from computer":"อัปโหลดจากคอมพิวเตอร์","Upload image from computer":"อัปโหลดภาพจากคอมพิวเตอร์","Upload in progress":"กำลังดำเนินการอัปโหลด","Upper-latin":"อักษรลาตินตัวพิมพ์ใหญ่","Upper-roman":"อักษรโรมันตัวพิมพ์ใหญ่","Vertical text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความแนวตั้ง",White:"สีขาว","Widget toolbar":"แถมเครื่องมือวิดเจ็ต",Width:"ความกว้าง","Wrap text":"ตัดคำข้อความ",Yellow:"สีเหลือง"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.th=e.th||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 จาก %1",Accept:"ยอมรับ","Align cell text to the bottom":"จัดตำแหน่งข้อความของเซลล์ชิดด้านล่าง","Align cell text to the center":"จัดตำแหน่งข้อความของเซลล์ไว้กึ่งกลาง","Align cell text to the left":"จัดตำแหน่งข้อความของเซลล์ชิดซ้าย","Align cell text to the middle":"จัดตำแหน่งข้อความของเซลล์ไว้กึ่งกลาง","Align cell text to the right":"จัดตำแหน่งข้อความของเซลล์ชิดขวา","Align cell text to the top":"จัดตำแหน่งข้อความของเซลล์ชิดด้านบน","Align center":"จัดกึ่งกลาง","Align left":"จัดชิดซ้าย","Align right":"จัดชิดขวา","Align table to the left":"จัดตำแหน่งตารางชิดด้านซ้าย","Align table to the right":"จัดตำแหน่งตารางชิดด้านขวา",Alignment:"การจัดตำแหน่ง",Aquamarine:"พลอยสีฟ้า",Background:"พื้นหลัง",Big:"ใหญ่",Black:"สีดำ","Block quote":"คำพูดบล็อก",Blue:"สีน้ำเงิน",Bold:"ตัวหนา",Border:"เส้นขอบ","Break text":"แบ่งข้อความ","Bulleted List":"รายการสัญลักษณ์แสดงหัวข้อย่อย","Bulleted list styles toolbar":"แถบเครื่องมือรูปแบบรายการสัญลักษณ์แสดงหัวข้อย่อย",Cancel:"ยกเลิก","Caption for image: %0":"คำบรรยายภาพ: %0","Caption for the image":"คำบรรยายภาพ","Cell properties":"คุณสมบัติของเซลล์","Center table":"จัดตำแหน่งตารางไว้ตรงกลาง","Centered image":"จัดแนวรูปกึ่งกลาง","Change image text alternative":"เปลี่ยนข้อความเมื่อไม่พบรูป","Choose heading":"เลือกขนาดหัวข้อ",Circle:"วงกลม",Clear:"ล้าง","Click to edit block":"คลิกเพื่อแก้ไขบล็อก",Close:"ปิด",Code:"โค้ด",Color:"สี","Color picker":"เครื่องมือเลือกสี",Column:"คอลัมน์",Dashed:"เส้นประ",Decimal:"ทศนิยม","Decimal with leading zero":"ทศนิยมที่มีศูนย์นำหน้า","Decrease indent":"ลดการเยื้อง",Default:"ค่าเริ่มต้น","Delete column":"ลบคอลัมน์","Delete row":"ลบแถว","Dim grey":"สีเทาเข้ม",Dimensions:"ขนาด",Disc:"ดิสก์","Document colors":"สีเอกสาร",Dotted:"เส้นไข่ปลา",Double:"คู่",Downloadable:"ที่สามารถดาวน์โหลดได้","Drag to move":"ลากเพื่อย้าย","Dropdown toolbar":"แถบเครื่องมือแบบเลื่อนลง","Edit block":"แก้ไขบล็อก","Edit link":"แก้ไขลิงก์","Editor block content toolbar":"แถบเครื่องมือแก้ไขบล็อกเนื้อหา","Editor contextual toolbar":"แถบเครื่องมือแก้ไขข้อความ","Editor dialog":"การสนทนาของบรรณาธิการ","Editor editing area: %0":"พื้นที่แก้ไขของตัวแก้ไข: %0","Editor toolbar":"แถบเครื่องมือแก้ไข","Enter image caption":"ระบุคำอธิบายภาพ","Enter table caption":"ป้อนคำบรรยายตาราง","Font Background Color":"สีพื้นหลังข้อความ","Font Color":"สีข้อความ","Font Family":"แบบอักษร","Font Size":"ขนาดข้อความ","Full size image":"รูปขนาดเต็ม",Green:"สีเขียว",Grey:"สีเทา",Groove:"ร่อง","Header column":"หัวข้อคอลัมน์","Header row":"ส่วนหัวแถว",Heading:"หัวข้อ","Heading 1":"หัวข้อขนาด 1","Heading 2":"หัวข้อ 2","Heading 3":"หัวข้อ 3","Heading 4":"หัวข้อ 4","Heading 5":"หัวข้อ 5","Heading 6":"หัวข้อ 6",Height:"ความสูง",HEX:"HEX","Horizontal line":"เส้นแนวนอน","Horizontal text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความในแนวนอน","HTML object":"วัตถุ HTML",Huge:"ใหญ่มาก","Image resize list":"รายการปรับขนาดภาพ","Image toolbar":"เครื่องมือรูปภาพ","image widget":"วิดเจ็ตรูปภาพ","In line":"ในบรรทัด","Increase indent":"เพิ่มการเยื้อง",Insert:"แทรก","Insert column left":"แทรกคอลัมน์ทางซ้าย","Insert column right":"แทรกคอลัมน์ทางขวา","Insert image":"แทรกรูป","Insert image via URL":"แทรกภาพผ่าน URL","Insert paragraph after block":"แทรกย่อหน้าหลังบล็อก","Insert paragraph before block":"แทรกย่อหน้าก่อนบล็อก","Insert row above":"แทรกส่วนหัวด้านบน","Insert row below":"แทรกส่วนหัวด้านล่าง","Insert table":"แทรกตาราง",Inset:"ยุบ",Italic:"ตัวเอียง",Justify:"จัด(ขอบ)","Justify cell text":"จัดขอบข้อความของเซลล์ให้กระจายเต็มแนว","Left aligned image":"จัดแนวภาพซ้าย","Light blue":"สีฟ้า","Light green":"สีเขียวอ่อน","Light grey":"สีเทาอ่อน",Link:"ลิงก์","Link image":"ลิงก์ภาพ","Link URL":"ลิงก์ URL","List properties":"คุณสมบัติของรายการ","Lower-latin":"อักษรลาตินตัวพิมพ์เล็ก","Lower–roman":"อักษรโรมันตัวพิมพ์เล็ก","Merge cell down":"ผสานเซลล์ด้านล่าง","Merge cell left":"ผสานเซลล์ด้านซ้าย","Merge cell right":"ผสานเซลล์ด้านขวา","Merge cell up":"ผสานเซลล์ด้านบน","Merge cells":"ผสานเซลล์",Next:"ถัดไป","No results found":"ไม่พบผลลัพธ์","No searchable items":"ไม่มีรายการที่สามารถค้นหาได้",None:"ไม่มี","Numbered List":"รายการลำดับเลข","Numbered list styles toolbar":"แถบเครื่องมือรูปแบบรายการแบบตัวเลข","Open in a new tab":"เปิดในแท็บใหม่","Open link in new tab":"เปิดลิงก์ในแท็บใหม่",Orange:"สีส้ม",Original:"ดั้งเดิม",Outset:"นูน",Padding:"การเสริมเต็ม",Paragraph:"ย่อหน้า","Press Enter to type after or press Shift + Enter to type before the widget":"กด Enter เพื่อพิมพ์หลังจาก หรือกด Shift + Enter เพื่อพิมพ์ก่อนหน้าวิดเจ็ต",Previous:"ก่อนหน้า",Purple:"สีม่วง",Red:"สีแดง",Redo:"ทำซ้ำ","Remove color":"ลบสี","Remove Format":"ลบรูปแบบ","Replace from computer":"แทนที่จากคอมพิวเตอร์","Replace image":"แทนที่ภาพ","Replace image from computer":"แทนที่ภาพจากคอมพิวเตอร์","Resize image":"ปรับขนาดภาพ","Resize image to %0":"ปรับขนาดภาพเป็น %0","Resize image to the original size":"ปรับขนาดภาพเป็นขนาดเดิม","Restore default":"คืนค่าเริ่มต้น","Reversed order":"ลำดับที่ย้อนกลับ","Rich Text Editor":"โปรแกรมแก้ไข Rich Text",Ridge:"สัน","Right aligned image":"จัดแนวภาพขวา",Row:"แถว",Save:"บันทึก","Select all":"เลือกทั้งหมด","Select column":"เลือกคอลัมน์","Select row":"เลือกแถว","Show more items":"แสดงรายการเพิ่มเติม","Side image":"รูปด้านข้าง",Small:"เล็ก",Solid:"เส้นทึบ","Split cell horizontally":"แยกเซลล์แนวนอน","Split cell vertically":"แยกเซลล์แนวตั้ง",Square:"สี่เหลี่ยม","Start at":"เริ่มต้นที่","Start index must be greater than 0.":"ดัชนีเริ่มต้นต้องมากกว่า 0",Strikethrough:"ขีดทับ",Style:"รูปแบบ",Subscript:"ตัวห้อย",Superscript:"ตัวยก","Table alignment toolbar":"แถบเครื่องมือจัดตำแหน่งตาราง","Table cell text alignment":"การจัดตำแหน่งข้อความของเซลล์ตาราง","Table properties":"คุณสมบัติของตาราง","Table toolbar":"เครื่องมือตาราง","Text alignment":"จัดตำแหน่งข้อความ","Text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความ","Text alternative":"ข้อความเมื่อไม่พบรูป",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'สีไม่ถูกต้อง ลอง "#FF0000" หรือ "rgb(255,0,0)" หรือ "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'ค่าไม่ถูกต้อง ลอง "10px" หรือ "2em" หรือแค่เพียง "2"',"This link has no URL":"ลิงก์นี้ไม่มี URL",Tiny:"เล็กมาก","To-do List":"รายการสิ่งที่จะทำ","Toggle caption off":"ปิดคำอธิบายภาพ","Toggle caption on":"เปิดคำอธิบายภาพ","Toggle the circle list style":"สลับรูปแบบรายการวงกลม","Toggle the decimal list style":"สลับรูปแบบรายการทศนิยม","Toggle the decimal with leading zero list style":"สลับทศนิยมด้วยรูปแบบรายการศูนย์นำหน้า","Toggle the disc list style":"สลับรูปแบบรายการดิสก์","Toggle the lower–latin list style":"สลับรูปแบบรายการอักษรลาตินตัวพิมพ์เล็ก","Toggle the lower–roman list style":"สลับรูปแบบรายการอักษรโรมันตัวพิมพ์เล็ก","Toggle the square list style":"สลับรูปแบบรายการสี่เหลี่ยม","Toggle the upper–latin list style":"สลับรูปแบบรายการอักษรลาตินตัวพิมพ์ใหญ่","Toggle the upper–roman list style":"สลับรูปแบบรายการอักษรโรมันตัวพิมพ์ใหญ่",Turquoise:"สีเขียวขุ่น","Type or paste your content here.":"พิมพ์หรือวางเนื้อหาของคุณที่นี่","Type your title":"พิมพ์ชื่อเรื่องของคุณ",Underline:"ขีดเส้นใต้",Undo:"ย้อนกลับ",Unlink:"ยกเลิกการลิงก์",Update:"อัปเดต","Update image URL":"อัปเดต URL ภาพ","Upload failed":"อัปโหลดไม่สำเร็จ","Upload from computer":"อัปโหลดจากคอมพิวเตอร์","Upload image from computer":"อัปโหลดภาพจากคอมพิวเตอร์","Upload in progress":"กำลังดำเนินการอัปโหลด","Upper-latin":"อักษรลาตินตัวพิมพ์ใหญ่","Upper-roman":"อักษรโรมันตัวพิมพ์ใหญ่","Vertical text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความแนวตั้ง",White:"สีขาว","Widget toolbar":"แถมเครื่องมือวิดเจ็ต",Width:"ความกว้าง","Wrap text":"ตัดคำข้อความ",Yellow:"สีเหลือง"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/tk.js b/public/static/plugs/ckeditor5/translations/tk.js
index 1934a705f..60ea85f2f 100644
--- a/public/static/plugs/ckeditor5/translations/tk.js
+++ b/public/static/plugs/ckeditor5/translations/tk.js
@@ -1 +1 @@
-!function(e){const a=e.tk=e.tk||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%1-iň %0-i",Accept:"","Align cell text to the bottom":"Öýjük tekstini aşagyna deňleşdiriň","Align cell text to the center":"Öýjük tekstini merkeze deňleşdiriň","Align cell text to the left":"Öýjük tekstini çepe deňleşdiriň","Align cell text to the middle":"Öýjük tekstini ortasyna deňleşdiriň","Align cell text to the right":"Öýjük tekstini saga deňleşdiriň","Align cell text to the top":"Öýjük tekstini ýokarsyna deňleşdiriň","Align center":"Merkeze deňleşdir","Align left":"Çepe deňleşdiriň","Align right":"Saga deňleşdiriň","Align table to the left":"Tablisany çepe deňleşdiriň","Align table to the right":"Tablisany sag tarapa deňleşdiriň",Alignment:"Deňleşdirmek",Aquamarine:"Akuamarin",Background:"Arka",Big:"Uly",Black:"Gara","Block quote":"Sitata blokirläň",Blue:"Gök",Bold:"Galyň",Border:"Serhet","Break text":"","Bulleted List":"Bullet sanawy","Bulleted list styles toolbar":"",Cancel:"Ýatyr","Caption for image: %0":"","Caption for the image":"","Cell properties":"Öýjük aýratynlyklary","Center table":"Tablisany merkezleşdiriň","Centered image":"Merkezleşdirilen surat","Change image text alternative":"Surat tekstiniň alternatiwasyny üýtgediň","Choose heading":"Sözbaşy saýlaň",Circle:"",Clear:"","Click to edit block":"",Code:"Kod",Color:"Reňk","Color picker":"Reňk saýlaýjy",Column:"Sütün",Dashed:"Çyzykly",Decimal:"","Decimal with leading zero":"","Decrease indent":"Indent peseltmek",Default:"Bellenen","Delete column":"Sütüni pozuň","Delete row":"Setiri poz","Dim grey":"Goýy çal",Dimensions:"Ölçegleri",Disc:"","Document colors":"Resminamanyň reňkleri",Dotted:"Nokatly",Double:"Goşa",Downloadable:"Göçürip alyp bolýar","Drag to move":"","Dropdown toolbar":"Açylýan gurallar paneli","Edit block":"Bloky redaktirläň","Edit link":"Baglanyşygy üýtget","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"Redaktor gurallar paneli","Enter image caption":"Surat ýazgysyny giriziň","Enter table caption":"","Font Background Color":"Şriftiň fon reňki","Font Color":"Şriftiň reňki","Font Family":"Şrift maşgalasy","Font Size":"Şrift ölçegi","Full size image":"Doly ululykdaky surat",Green:"Ýaşyl",Grey:"Çal",Groove:"Groove","Header column":"Sözbaşy sütüni","Header row":"Sözbaşy hatary",Heading:"Sözbaşy","Heading 1":"Sözbaşy 1","Heading 2":"Sözbaşy 2","Heading 3":"Sözbaşy 3","Heading 4":"Sözbaşy 4","Heading 5":"Sözbaşy 5","Heading 6":"Sözbaşy 6",Height:"Boý",HEX:"","Horizontal line":"Gorizontal çyzyk","Horizontal text alignment toolbar":"Kese tekst tekizlemek gurallar paneli",Huge:"Ägirt","Image resize list":"","Image toolbar":"Surat gurallar paneli","image widget":"surat widjeti","In line":"","Increase indent":"Indent köpeltmek",Insert:"","Insert column left":"Sütüni çepe goýuň","Insert column right":"Sütüni saga goýuň","Insert image":"Surat goýuň","Insert image via URL":"","Insert paragraph after block":"Blokdan soň abzas goýuň","Insert paragraph before block":"Blokdan öň abzas goýuň","Insert row above":"Hatary ýokaryk goýuň","Insert row below":"Hatary aşak goýuň","Insert table":"Tablisa goýuň",Inset:"Inset",Italic:"Italik",Justify:"Akla","Justify cell text":"Öýjük tekstini esaslandyryň","Left aligned image":"Çep deňleşdirilen surat","Light blue":"Açyk gök","Light green":"Açyk ýaşyl","Light grey":"Açyk çal",Link:"Baglanyşyk","Link image":"Surat baglanyşygy","Link URL":"URL baglanyşygy","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Öýjügi aşak birleşdiriň","Merge cell left":"Öýjügi çepe birleşdiriň","Merge cell right":"Öýjügi saga birleşdiriň","Merge cell up":"Öýjügi ýokary birleşdiriň","Merge cells":"Öýjükleri birleşdiriň",Next:"Indiki","No results found":"","No searchable items":"",None:"Hiç","Numbered List":"Sanly sanaw","Numbered list styles toolbar":"","Open in a new tab":"Täze goýmada açyň","Open link in new tab":"Täze goýmada baglanyşyk açyň",Orange:"Mämişi",Original:"",Outset:"Outset",Padding:"Padding",Paragraph:"Abzas","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Öňki",Purple:"Gyrmyzy",Red:"Gyzyl",Redo:"Öňe gaýtar","Remove color":"Reňki aýyryň","Remove Format":"Formaty aýyryň","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Baý Tekst Redaktory",Ridge:"Kertik","Right aligned image":"Sag deňleşdirilen surat",Row:"Setir",Save:"Saklaň","Select all":"Ählisini saýla","Select column":"Sütün saýlaň","Select row":"Setir saýlaň","Show more items":"Has köp zady görkeziň","Side image":"Gapdal surat",Small:"Kiçi",Solid:"Gaty","Split cell horizontally":"Öýjügi keseligine bölüň","Split cell vertically":"Öýjügi dikligine bölüň",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Üsti çyzykly",Style:"Stil",Subscript:"Aşaky ýazgy",Superscript:"Üst ýazgy","Table alignment toolbar":"Tablisa deňleşdirmek gurallar paneli","Table cell text alignment":"Tablisa öýjükleriniň tekstini deňleşdirmek","Table properties":"Tablisa aýratynlyklary","Table toolbar":"Tablisa gurallar paneli","Text alignment":"Tekstiň deňleşdirilmegi","Text alignment toolbar":"Teksti deňleşdirmek gurallar paneli","Text alternative":"Tekstiň alternatiwasy",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Reňki nädogry "#FF0000" ýa-da "rgb(255,0,0)" ýa-da "gyzyl" barlap görüň.','The value is invalid. Try "10px" or "2em" or simply "2".':'Baha nädogry "10px" ýa-da "2em" ýa-da diňe "2" barlap görüň.',"This link has no URL":"Bu baglanyşykda URL ýok",Tiny:"Kiçijik","To-do List":"Edilmeli işleriň sanawy","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Turkuaz","Type or paste your content here.":"Mazmunyňyzy şu ýere ýazyň ýa-da goýuň.","Type your title":"Sözbaşyny ýazyň",Underline:"Aşagy çyzykly",Undo:"Yza gaýtar",Unlink:"Baglanyşygy aýyr",Update:"","Update image URL":"","Upload failed":"Ýükläp bolmady","Upload from computer":"","Upload image from computer":"","Upload in progress":"Ýüklemek dowam edýär","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"Dik tekst tekizlemek gurallar paneli",White:"Ak","Widget toolbar":"Widget gurallar paneli",Width:"Ini","Wrap text":"",Yellow:"Sary"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const a=e.tk=e.tk||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"%1-iň %0-i",Accept:"","Align cell text to the bottom":"Öýjük tekstini aşagyna deňleşdiriň","Align cell text to the center":"Öýjük tekstini merkeze deňleşdiriň","Align cell text to the left":"Öýjük tekstini çepe deňleşdiriň","Align cell text to the middle":"Öýjük tekstini ortasyna deňleşdiriň","Align cell text to the right":"Öýjük tekstini saga deňleşdiriň","Align cell text to the top":"Öýjük tekstini ýokarsyna deňleşdiriň","Align center":"Merkeze deňleşdir","Align left":"Çepe deňleşdiriň","Align right":"Saga deňleşdiriň","Align table to the left":"Tablisany çepe deňleşdiriň","Align table to the right":"Tablisany sag tarapa deňleşdiriň",Alignment:"Deňleşdirmek",Aquamarine:"Akuamarin",Background:"Arka",Big:"Uly",Black:"Gara","Block quote":"Sitata blokirläň",Blue:"Gök",Bold:"Galyň",Border:"Serhet","Break text":"","Bulleted List":"Bullet sanawy","Bulleted list styles toolbar":"",Cancel:"Ýatyr","Caption for image: %0":"","Caption for the image":"","Cell properties":"Öýjük aýratynlyklary","Center table":"Tablisany merkezleşdiriň","Centered image":"Merkezleşdirilen surat","Change image text alternative":"Surat tekstiniň alternatiwasyny üýtgediň","Choose heading":"Sözbaşy saýlaň",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"Kod",Color:"Reňk","Color picker":"Reňk saýlaýjy",Column:"Sütün",Dashed:"Çyzykly",Decimal:"","Decimal with leading zero":"","Decrease indent":"Indent peseltmek",Default:"Bellenen","Delete column":"Sütüni pozuň","Delete row":"Setiri poz","Dim grey":"Goýy çal",Dimensions:"Ölçegleri",Disc:"","Document colors":"Resminamanyň reňkleri",Dotted:"Nokatly",Double:"Goşa",Downloadable:"Göçürip alyp bolýar","Drag to move":"","Dropdown toolbar":"Açylýan gurallar paneli","Edit block":"Bloky redaktirläň","Edit link":"Baglanyşygy üýtget","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"Redaktor gurallar paneli","Enter image caption":"Surat ýazgysyny giriziň","Enter table caption":"","Font Background Color":"Şriftiň fon reňki","Font Color":"Şriftiň reňki","Font Family":"Şrift maşgalasy","Font Size":"Şrift ölçegi","Full size image":"Doly ululykdaky surat",Green:"Ýaşyl",Grey:"Çal",Groove:"Groove","Header column":"Sözbaşy sütüni","Header row":"Sözbaşy hatary",Heading:"Sözbaşy","Heading 1":"Sözbaşy 1","Heading 2":"Sözbaşy 2","Heading 3":"Sözbaşy 3","Heading 4":"Sözbaşy 4","Heading 5":"Sözbaşy 5","Heading 6":"Sözbaşy 6",Height:"Boý",HEX:"","Horizontal line":"Gorizontal çyzyk","Horizontal text alignment toolbar":"Kese tekst tekizlemek gurallar paneli",Huge:"Ägirt","Image resize list":"","Image toolbar":"Surat gurallar paneli","image widget":"surat widjeti","In line":"","Increase indent":"Indent köpeltmek",Insert:"","Insert column left":"Sütüni çepe goýuň","Insert column right":"Sütüni saga goýuň","Insert image":"Surat goýuň","Insert image via URL":"","Insert paragraph after block":"Blokdan soň abzas goýuň","Insert paragraph before block":"Blokdan öň abzas goýuň","Insert row above":"Hatary ýokaryk goýuň","Insert row below":"Hatary aşak goýuň","Insert table":"Tablisa goýuň",Inset:"Inset",Italic:"Italik",Justify:"Akla","Justify cell text":"Öýjük tekstini esaslandyryň","Left aligned image":"Çep deňleşdirilen surat","Light blue":"Açyk gök","Light green":"Açyk ýaşyl","Light grey":"Açyk çal",Link:"Baglanyşyk","Link image":"Surat baglanyşygy","Link URL":"URL baglanyşygy","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"Öýjügi aşak birleşdiriň","Merge cell left":"Öýjügi çepe birleşdiriň","Merge cell right":"Öýjügi saga birleşdiriň","Merge cell up":"Öýjügi ýokary birleşdiriň","Merge cells":"Öýjükleri birleşdiriň",Next:"Indiki","No results found":"","No searchable items":"",None:"Hiç","Numbered List":"Sanly sanaw","Numbered list styles toolbar":"","Open in a new tab":"Täze goýmada açyň","Open link in new tab":"Täze goýmada baglanyşyk açyň",Orange:"Mämişi",Original:"",Outset:"Outset",Padding:"Padding",Paragraph:"Abzas","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Öňki",Purple:"Gyrmyzy",Red:"Gyzyl",Redo:"Öňe gaýtar","Remove color":"Reňki aýyryň","Remove Format":"Formaty aýyryň","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"Baý Tekst Redaktory",Ridge:"Kertik","Right aligned image":"Sag deňleşdirilen surat",Row:"Setir",Save:"Saklaň","Select all":"Ählisini saýla","Select column":"Sütün saýlaň","Select row":"Setir saýlaň","Show more items":"Has köp zady görkeziň","Side image":"Gapdal surat",Small:"Kiçi",Solid:"Gaty","Split cell horizontally":"Öýjügi keseligine bölüň","Split cell vertically":"Öýjügi dikligine bölüň",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Üsti çyzykly",Style:"Stil",Subscript:"Aşaky ýazgy",Superscript:"Üst ýazgy","Table alignment toolbar":"Tablisa deňleşdirmek gurallar paneli","Table cell text alignment":"Tablisa öýjükleriniň tekstini deňleşdirmek","Table properties":"Tablisa aýratynlyklary","Table toolbar":"Tablisa gurallar paneli","Text alignment":"Tekstiň deňleşdirilmegi","Text alignment toolbar":"Teksti deňleşdirmek gurallar paneli","Text alternative":"Tekstiň alternatiwasy",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Reňki nädogry "#FF0000" ýa-da "rgb(255,0,0)" ýa-da "gyzyl" barlap görüň.','The value is invalid. Try "10px" or "2em" or simply "2".':'Baha nädogry "10px" ýa-da "2em" ýa-da diňe "2" barlap görüň.',"This link has no URL":"Bu baglanyşykda URL ýok",Tiny:"Kiçijik","To-do List":"Edilmeli işleriň sanawy","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Turkuaz","Type or paste your content here.":"Mazmunyňyzy şu ýere ýazyň ýa-da goýuň.","Type your title":"Sözbaşyny ýazyň",Underline:"Aşagy çyzykly",Undo:"Yza gaýtar",Unlink:"Baglanyşygy aýyr",Update:"","Update image URL":"","Upload failed":"Ýükläp bolmady","Upload from computer":"","Upload image from computer":"","Upload in progress":"Ýüklemek dowam edýär","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"Dik tekst tekizlemek gurallar paneli",White:"Ak","Widget toolbar":"Widget gurallar paneli",Width:"Ini","Wrap text":"",Yellow:"Sary"}),a.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/tr.js b/public/static/plugs/ckeditor5/translations/tr.js
index 6fc532b19..8764419d0 100644
--- a/public/static/plugs/ckeditor5/translations/tr.js
+++ b/public/static/plugs/ckeditor5/translations/tr.js
@@ -1 +1 @@
-!function(e){const i=e.tr=e.tr||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0/%1",Accept:"Kabul et","Align cell text to the bottom":"Hücre içindeki metni alta hizala","Align cell text to the center":"Hücre içindeki metnini ortaya hizalama","Align cell text to the left":"Hücre içindeki metnini sola hizala","Align cell text to the middle":"Hücre içindeki metni ortaya hizala","Align cell text to the right":"Hücre içindeki metnini sağa hizala","Align cell text to the top":"Hücre içindeki metni üste hizala","Align center":"Ortala","Align left":"Sola hizala","Align right":"Sağa hizala","Align table to the left":"Tabloyu sola hizala","Align table to the right":"Tabloyu sağa hizala",Alignment:"Hizalama",Aquamarine:"Su Yeşili",Background:"Arkaplan",Big:"Büyük",Black:"Siyah","Block quote":"Alıntı",Blue:"Mavi",Bold:"Kalın",Border:"Kenar","Break text":"Metni böl","Bulleted List":"Simgeli Liste","Bulleted list styles toolbar":"Madde işaretli liste stilleri araç çubuğu",Cancel:"İptal","Caption for image: %0":"Resim için başlık: %0","Caption for the image":"Resim için başlık","Cell properties":"Hücre özellikleri","Center table":"Tabloyu ortala","Centered image":"Ortalanmış görsel","Change image text alternative":"Görsel alternatif yazısını değiştir","Choose heading":"Başlık tipi seç",Circle:"Çember",Clear:"Temizle","Click to edit block":"Bloğu düzenlemek için tıkla",Code:"Kod",Color:"Renk","Color picker":"Renk seçici",Column:"Kolon",Dashed:"Kesik çizgili",Decimal:"Ondalık","Decimal with leading zero":"0'la başlayan ondalık","Decrease indent":"Girintiyi azalt",Default:"Varsayılan","Delete column":"Kolonu sil","Delete row":"Satırı sil","Dim grey":"Koyu Gri",Dimensions:"Ölçüler",Disc:"Disk","Document colors":"Belge Rengi",Dotted:"Noktalı",Double:"Çift",Downloadable:"İndirilebilir","Drag to move":"Taşımak için sürükle","Dropdown toolbar":"Açılır araç çubuğu","Edit block":"Bloğu Düzenle","Edit link":"Bağlantıyı değiştir","Editor block content toolbar":"Düzenleyici engelleme içerik araç çubuğu","Editor contextual toolbar":"Düzenleyici içeriksel araç çubuğu","Editor editing area: %0":"Editör düzenleme alanı: %0","Editor toolbar":"Düzenleme araç çubuğu","Enter image caption":"Resim açıklaması gir","Enter table caption":"Tablo açıklaması gir","Font Background Color":"Yazı Tipi Arkaplan Rengi","Font Color":"Yazı Tipi Rengi","Font Family":"Yazı Tipi Ailesi","Font Size":"Yazı Boyutu","Full size image":"Tam Boyut Görsel",Green:"Yeşil",Grey:"Gri",Groove:"Yiv","Header column":"Başlık kolonu","Header row":"Başlık satırı",Heading:"Başlık","Heading 1":"1. Seviye Başlık","Heading 2":"2. Seviye Başlık","Heading 3":"3. Seviye Başlık","Heading 4":"4. Seviye Başlık","Heading 5":"5. Seviye Başlık","Heading 6":"6. Seviye Başlık",Height:"Yükseklik",HEX:"ONALTILIK","Horizontal line":"Yatay çiizgi","Horizontal text alignment toolbar":"Yatay metin hizalama araç çubuğu","HTML object":"HTML nesnesi",Huge:"Çok Büyük","Image resize list":"Resim yeniden boyutlandırma listesi","Image toolbar":"Resim araç çubuğu","image widget":"resim aracı","In line":"Aynı hizada","Increase indent":"Girintiyi arttır",Insert:"Ekle","Insert column left":"Sola kolon ekle","Insert column right":"Sağa kolon ekle","Insert image":"Görsel Ekle","Insert image via URL":"URL ile görüntü ekle","Insert paragraph after block":"Bloktan sonra paragraf ekle","Insert paragraph before block":"Bloktan önce paragraf ekle","Insert row above":"Üste satır ekle","Insert row below":"Alta satır ekle","Insert table":"Tablo Ekle",Inset:"İçe",Italic:"İtalik",Justify:"İki yana yasla","Justify cell text":"Hücre içindeki metini iki yana yasla","Left aligned image":"Sola hizalı görsel","Light blue":"Açık Mavi","Light green":"Açık Yeşil","Light grey":"Açık Gri",Link:"Bağlantı","Link image":"Resim bağlantısı","Link URL":"Bağlantı Adresi","List properties":"Liste özellikleri","Lower-latin":"Küçük Latin harfleri","Lower–roman":"Küçük Roma rakamları","Merge cell down":"Aşağıya doğru birleştir","Merge cell left":"Sola doğru birleştir","Merge cell right":"Sağa doğru birleştir","Merge cell up":"Yukarı doğru birleştir","Merge cells":"Hücreleri birleştir",Next:"Sonraki","No results found":"Sonuç bulunamadı","No searchable items":"Aranabilir öge yok",None:"Yok","Numbered List":"Numaralı Liste","Numbered list styles toolbar":"Numaralandırılmış liste stilleri araç çubuğu","Open in a new tab":"Yeni sekmede aç","Open link in new tab":"Yeni sekmede aç",Orange:"Turuncu",Original:"Orijinal",Outset:"Dışarıya",Padding:"İç boşluk",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Görsel bileşenden sonra yazmak için Enter'a basın ya da görsel bileşenden önce yazmak için Shift + Enter'a basın",Previous:"Önceki",Purple:"Mor",Red:"Kırmızı",Redo:"Tekrar yap","Remove color":"Rengi Sil","Remove Format":"Biçimlendirmeyi Kaldır","Replace from computer":"Bilgisayardan değiştir","Replace image":"Resmi değiştir","Replace image from computer":"Görüntüyü bilgisayardan değiştir","Resize image":"Resmi boyutlandır","Resize image to %0":"Resmi %0 ölçülerine boyutlandır","Resize image to the original size":"Resmi orijinal büyüklüğüne al","Restore default":"Varsayılanı geri yükle","Reversed order":"Ters sıralama","Rich Text Editor":"Zengin İçerik Editörü",Ridge:"Yükselti","Right aligned image":"Sağa hizalı görsel",Row:"Satır",Save:"Kaydet","Select all":"Hepsini seç","Select column":"Kolon seç","Select row":"Satır seç","Show more items":"Daha fazla öğe göster","Side image":"Yan Görsel",Small:"Küçük",Solid:"Dolu","Split cell horizontally":"Hücreyi yatay böl","Split cell vertically":"Hücreyi dikey böl",Square:"Kare","Start at":"Şununla başla","Start index must be greater than 0.":"Başlangıç dizini 0'dan büyük olmalıdır.",Strikethrough:"Üstü çizili",Style:"Stil",Subscript:"Alt Simge",Superscript:"Üst Simge","Table alignment toolbar":"Tablo hizalama araç çubuğu","Table cell text alignment":"Tablo hücresi metin hizalaması","Table properties":"Tablo özellikleri","Table toolbar":"Tablo araç çubuğu","Text alignment":"Yazı hizalama","Text alignment toolbar":"Yazı Hizlama Araç Çubuğu","Text alternative":"Yazı alternatifi",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Geçersiz renk. "#FF0000" veya "rgb(255,0,0)" veya "red" deneyin.','The value is invalid. Try "10px" or "2em" or simply "2".':'Geçersiz değer. "10px" veya "2em" veya sadece "2" deneyin.',"This link has no URL":"Bağlantı adresi yok",Tiny:"Çok Küçük","To-do List":"Yapılacaklar Listesi","Toggle caption off":"Açıklamayı kapat","Toggle caption on":"Açıklamayı aç","Toggle the circle list style":"Çember liste stilini değiştir","Toggle the decimal list style":"Ondalık liste stilini değiştir","Toggle the decimal with leading zero list style":"0'la başlayan ondalık liste stilini değiştir","Toggle the disc list style":"Disk liste stilini değiştir","Toggle the lower–latin list style":"Küçük Latin harfleri liste stilini değiştir","Toggle the lower–roman list style":"Küçük Roma rakamları liste stilini değiştir","Toggle the square list style":"Kare liste stilini değiştir","Toggle the upper–latin list style":"Büyük Latin harfleri liste stilini değiştir","Toggle the upper–roman list style":"Büyük Roma rakamları liste stilini değiştir",Turquoise:"Turkuaz","Type or paste your content here.":"İçeriğinizi buraya yapıştırın yada yazın.","Type your title":"Başlığınızı yazınız",Underline:"Altı Çizgili",Undo:"Geri al",Unlink:"Bağlantıyı kaldır",Update:"Güncelle","Update image URL":"Görüntü URL'sini güncelle","Upload failed":"Yükleme başarsız","Upload from computer":"Bilgisayardan yükle","Upload image from computer":"Bilgisayardan görüntü yükle","Upload in progress":"Yükleme işlemi devam ediyor","Upper-latin":"Büyük Latin harfleri","Upper-roman":"Büyük Roma rakamları","Vertical text alignment toolbar":"Dikey metin hizalama araç çubuğu",White:"Beyaz","Widget toolbar":"Bileşen araç çubuğu",Width:"Genişlik","Wrap text":"Metni kaydır",Yellow:"Sarı"}),i.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const i=e.tr=e.tr||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0/%1",Accept:"Kabul et","Align cell text to the bottom":"Hücre içindeki metni alta hizala","Align cell text to the center":"Hücre içindeki metnini ortaya hizalama","Align cell text to the left":"Hücre içindeki metnini sola hizala","Align cell text to the middle":"Hücre içindeki metni ortaya hizala","Align cell text to the right":"Hücre içindeki metnini sağa hizala","Align cell text to the top":"Hücre içindeki metni üste hizala","Align center":"Ortala","Align left":"Sola hizala","Align right":"Sağa hizala","Align table to the left":"Tabloyu sola hizala","Align table to the right":"Tabloyu sağa hizala",Alignment:"Hizalama",Aquamarine:"Su Yeşili",Background:"Arkaplan",Big:"Büyük",Black:"Siyah","Block quote":"Alıntı",Blue:"Mavi",Bold:"Kalın",Border:"Kenar","Break text":"Metni böl","Bulleted List":"Simgeli Liste","Bulleted list styles toolbar":"Madde işaretli liste stilleri araç çubuğu",Cancel:"İptal","Caption for image: %0":"Resim için başlık: %0","Caption for the image":"Resim için başlık","Cell properties":"Hücre özellikleri","Center table":"Tabloyu ortala","Centered image":"Ortalanmış görsel","Change image text alternative":"Görsel alternatif yazısını değiştir","Choose heading":"Başlık tipi seç",Circle:"Çember",Clear:"Temizle","Click to edit block":"Bloğu düzenlemek için tıkla",Close:"Kapat",Code:"Kod",Color:"Renk","Color picker":"Renk seçici",Column:"Kolon",Dashed:"Kesik çizgili",Decimal:"Ondalık","Decimal with leading zero":"0'la başlayan ondalık","Decrease indent":"Girintiyi azalt",Default:"Varsayılan","Delete column":"Kolonu sil","Delete row":"Satırı sil","Dim grey":"Koyu Gri",Dimensions:"Ölçüler",Disc:"Disk","Document colors":"Belge Rengi",Dotted:"Noktalı",Double:"Çift",Downloadable:"İndirilebilir","Drag to move":"Taşımak için sürükle","Dropdown toolbar":"Açılır araç çubuğu","Edit block":"Bloğu Düzenle","Edit link":"Bağlantıyı değiştir","Editor block content toolbar":"Düzenleyici engelleme içerik araç çubuğu","Editor contextual toolbar":"Düzenleyici içeriksel araç çubuğu","Editor dialog":"Düzenleyici iletişim kutusu","Editor editing area: %0":"Editör düzenleme alanı: %0","Editor toolbar":"Düzenleme araç çubuğu","Enter image caption":"Resim açıklaması gir","Enter table caption":"Tablo açıklaması gir","Font Background Color":"Yazı Tipi Arkaplan Rengi","Font Color":"Yazı Tipi Rengi","Font Family":"Yazı Tipi Ailesi","Font Size":"Yazı Boyutu","Full size image":"Tam Boyut Görsel",Green:"Yeşil",Grey:"Gri",Groove:"Yiv","Header column":"Başlık kolonu","Header row":"Başlık satırı",Heading:"Başlık","Heading 1":"1. Seviye Başlık","Heading 2":"2. Seviye Başlık","Heading 3":"3. Seviye Başlık","Heading 4":"4. Seviye Başlık","Heading 5":"5. Seviye Başlık","Heading 6":"6. Seviye Başlık",Height:"Yükseklik",HEX:"ONALTILIK","Horizontal line":"Yatay çiizgi","Horizontal text alignment toolbar":"Yatay metin hizalama araç çubuğu","HTML object":"HTML nesnesi",Huge:"Çok Büyük","Image resize list":"Resim yeniden boyutlandırma listesi","Image toolbar":"Resim araç çubuğu","image widget":"resim aracı","In line":"Aynı hizada","Increase indent":"Girintiyi arttır",Insert:"Ekle","Insert column left":"Sola kolon ekle","Insert column right":"Sağa kolon ekle","Insert image":"Görsel Ekle","Insert image via URL":"URL ile görüntü ekle","Insert paragraph after block":"Bloktan sonra paragraf ekle","Insert paragraph before block":"Bloktan önce paragraf ekle","Insert row above":"Üste satır ekle","Insert row below":"Alta satır ekle","Insert table":"Tablo Ekle",Inset:"İçe",Italic:"İtalik",Justify:"İki yana yasla","Justify cell text":"Hücre içindeki metini iki yana yasla","Left aligned image":"Sola hizalı görsel","Light blue":"Açık Mavi","Light green":"Açık Yeşil","Light grey":"Açık Gri",Link:"Bağlantı","Link image":"Resim bağlantısı","Link URL":"Bağlantı Adresi","List properties":"Liste özellikleri","Lower-latin":"Küçük Latin harfleri","Lower–roman":"Küçük Roma rakamları","Merge cell down":"Aşağıya doğru birleştir","Merge cell left":"Sola doğru birleştir","Merge cell right":"Sağa doğru birleştir","Merge cell up":"Yukarı doğru birleştir","Merge cells":"Hücreleri birleştir",Next:"Sonraki","No results found":"Sonuç bulunamadı","No searchable items":"Aranabilir öge yok",None:"Yok","Numbered List":"Numaralı Liste","Numbered list styles toolbar":"Numaralandırılmış liste stilleri araç çubuğu","Open in a new tab":"Yeni sekmede aç","Open link in new tab":"Yeni sekmede aç",Orange:"Turuncu",Original:"Orijinal",Outset:"Dışarıya",Padding:"İç boşluk",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"Görsel bileşenden sonra yazmak için Enter'a basın ya da görsel bileşenden önce yazmak için Shift + Enter'a basın",Previous:"Önceki",Purple:"Mor",Red:"Kırmızı",Redo:"Tekrar yap","Remove color":"Rengi Sil","Remove Format":"Biçimlendirmeyi Kaldır","Replace from computer":"Bilgisayardan değiştir","Replace image":"Resmi değiştir","Replace image from computer":"Görüntüyü bilgisayardan değiştir","Resize image":"Resmi boyutlandır","Resize image to %0":"Resmi %0 ölçülerine boyutlandır","Resize image to the original size":"Resmi orijinal büyüklüğüne al","Restore default":"Varsayılanı geri yükle","Reversed order":"Ters sıralama","Rich Text Editor":"Zengin İçerik Editörü",Ridge:"Yükselti","Right aligned image":"Sağa hizalı görsel",Row:"Satır",Save:"Kaydet","Select all":"Hepsini seç","Select column":"Kolon seç","Select row":"Satır seç","Show more items":"Daha fazla öğe göster","Side image":"Yan Görsel",Small:"Küçük",Solid:"Dolu","Split cell horizontally":"Hücreyi yatay böl","Split cell vertically":"Hücreyi dikey böl",Square:"Kare","Start at":"Şununla başla","Start index must be greater than 0.":"Başlangıç dizini 0'dan büyük olmalıdır.",Strikethrough:"Üstü çizili",Style:"Stil",Subscript:"Alt Simge",Superscript:"Üst Simge","Table alignment toolbar":"Tablo hizalama araç çubuğu","Table cell text alignment":"Tablo hücresi metin hizalaması","Table properties":"Tablo özellikleri","Table toolbar":"Tablo araç çubuğu","Text alignment":"Yazı hizalama","Text alignment toolbar":"Yazı Hizlama Araç Çubuğu","Text alternative":"Yazı alternatifi",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Geçersiz renk. "#FF0000" veya "rgb(255,0,0)" veya "red" deneyin.','The value is invalid. Try "10px" or "2em" or simply "2".':'Geçersiz değer. "10px" veya "2em" veya sadece "2" deneyin.',"This link has no URL":"Bağlantı adresi yok",Tiny:"Çok Küçük","To-do List":"Yapılacaklar Listesi","Toggle caption off":"Açıklamayı kapat","Toggle caption on":"Açıklamayı aç","Toggle the circle list style":"Çember liste stilini değiştir","Toggle the decimal list style":"Ondalık liste stilini değiştir","Toggle the decimal with leading zero list style":"0'la başlayan ondalık liste stilini değiştir","Toggle the disc list style":"Disk liste stilini değiştir","Toggle the lower–latin list style":"Küçük Latin harfleri liste stilini değiştir","Toggle the lower–roman list style":"Küçük Roma rakamları liste stilini değiştir","Toggle the square list style":"Kare liste stilini değiştir","Toggle the upper–latin list style":"Büyük Latin harfleri liste stilini değiştir","Toggle the upper–roman list style":"Büyük Roma rakamları liste stilini değiştir",Turquoise:"Turkuaz","Type or paste your content here.":"İçeriğinizi buraya yapıştırın yada yazın.","Type your title":"Başlığınızı yazınız",Underline:"Altı Çizgili",Undo:"Geri al",Unlink:"Bağlantıyı kaldır",Update:"Güncelle","Update image URL":"Görüntü URL'sini güncelle","Upload failed":"Yükleme başarsız","Upload from computer":"Bilgisayardan yükle","Upload image from computer":"Bilgisayardan görüntü yükle","Upload in progress":"Yükleme işlemi devam ediyor","Upper-latin":"Büyük Latin harfleri","Upper-roman":"Büyük Roma rakamları","Vertical text alignment toolbar":"Dikey metin hizalama araç çubuğu",White:"Beyaz","Widget toolbar":"Bileşen araç çubuğu",Width:"Genişlik","Wrap text":"Metni kaydır",Yellow:"Sarı"}),i.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/tt.js b/public/static/plugs/ckeditor5/translations/tt.js
index 2028e9d4a..0cff2f587 100644
--- a/public/static/plugs/ckeditor5/translations/tt.js
+++ b/public/static/plugs/ckeditor5/translations/tt.js
@@ -1 +1 @@
-!function(e){const t=e.tt=e.tt||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Аквамарин",Background:"",Black:"Кара",Blue:"Зәңгәр",Bold:"Калын",Border:"","Break text":"","Bulleted List":"","Bulleted list styles toolbar":"",Cancel:"Баш тарт","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"","Change image text alternative":"",Circle:"Түгәрәк",Clear:"","Click to edit block":"",Code:"Код",Color:"Төс","Color picker":"",Column:"",Dashed:"",Decimal:"","Decimal with leading zero":"","Delete column":"","Delete row":"","Dim grey":"",Dimensions:"",Disc:"Диск",Dotted:"",Double:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"","Enter table caption":"","Full size image":"",Green:"Яшел",Grey:"Соры",Groove:"","Header column":"","Header row":"",Height:"",HEX:"","Horizontal text alignment toolbar":"","Image resize list":"","Image toolbar":"","image widget":"","In line":"",Insert:"","Insert column left":"","Insert column right":"","Insert image":"","Insert image via URL":"","Insert row above":"","Insert row below":"","Insert table":"",Inset:"",Italic:"","Justify cell text":"","Left aligned image":"","Light blue":"Ачык зәңгәр","Light green":"Ачык яшел","Light grey":"Ачык соры",Link:"Сылтама","Link image":"","Link URL":"","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"","Merge cell left":"","Merge cell right":"","Merge cell up":"","Merge cells":"",Next:"","No results found":"","No searchable items":"",None:"","Numbered List":"","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"Кызгылт",Original:"",Outset:"",Padding:"",Previous:"",Purple:"Шәмәхә",Red:"Кызыл",Redo:"Кабатла","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"",Ridge:"","Right aligned image":"",Row:"",Save:"Сакла","Select column":"","Select row":"","Show more items":"","Side image":"",Solid:"","Split cell horizontally":"","Split cell vertically":"",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Style:"",Subscript:"",Superscript:"","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alternative":"",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Фервоз",Underline:"",Undo:"",Unlink:"",Update:"Яңарт","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"Ак",Width:"","Wrap text":"",Yellow:"Сары"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.tt=e.tt||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"Аквамарин",Background:"",Black:"Кара",Blue:"Зәңгәр",Bold:"Калын",Border:"","Break text":"","Bulleted List":"","Bulleted list styles toolbar":"",Cancel:"Баш тарт","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"","Change image text alternative":"",Circle:"Түгәрәк",Clear:"","Click to edit block":"",Close:"",Code:"Код",Color:"Төс","Color picker":"",Column:"",Dashed:"",Decimal:"","Decimal with leading zero":"","Delete column":"","Delete row":"","Dim grey":"",Dimensions:"",Disc:"Диск",Dotted:"",Double:"",Downloadable:"","Drag to move":"","Dropdown toolbar":"","Edit block":"","Edit link":"","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"","Enter image caption":"","Enter table caption":"","Full size image":"",Green:"Яшел",Grey:"Соры",Groove:"","Header column":"","Header row":"",Height:"",HEX:"","Horizontal text alignment toolbar":"","Image resize list":"","Image toolbar":"","image widget":"","In line":"",Insert:"","Insert column left":"","Insert column right":"","Insert image":"","Insert image via URL":"","Insert row above":"","Insert row below":"","Insert table":"",Inset:"",Italic:"","Justify cell text":"","Left aligned image":"","Light blue":"Ачык зәңгәр","Light green":"Ачык яшел","Light grey":"Ачык соры",Link:"Сылтама","Link image":"","Link URL":"","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"","Merge cell left":"","Merge cell right":"","Merge cell up":"","Merge cells":"",Next:"","No results found":"","No searchable items":"",None:"","Numbered List":"","Numbered list styles toolbar":"","Open in a new tab":"","Open link in new tab":"",Orange:"Кызгылт",Original:"",Outset:"",Padding:"",Previous:"",Purple:"Шәмәхә",Red:"Кызыл",Redo:"Кабатла","Remove color":"","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"","Reversed order":"","Rich Text Editor":"",Ridge:"","Right aligned image":"",Row:"",Save:"Сакла","Select column":"","Select row":"","Show more items":"","Side image":"",Solid:"","Split cell horizontally":"","Split cell vertically":"",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"",Style:"",Subscript:"",Superscript:"","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alternative":"",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Фервоз",Underline:"",Undo:"",Unlink:"",Update:"Яңарт","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"Ак",Width:"","Wrap text":"",Yellow:"Сары"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ug.js b/public/static/plugs/ckeditor5/translations/ug.js
index 2bbdb2df2..a2d53bda5 100644
--- a/public/static/plugs/ckeditor5/translations/ug.js
+++ b/public/static/plugs/ckeditor5/translations/ug.js
@@ -1 +1 @@
-!function(e){const t=e.ug=e.ug||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"قوشۇل","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"ئوتتۇرىغا توغرىلاش","Align left":"سولغا توغرىلاش","Align right":"ئوڭغا توغرىلاش","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"دېڭىز كۆكى",Background:"",Big:"چوڭ",Black:"قارا","Block quote":"نەقىل",Blue:"كۆك",Bold:"توم",Border:"","Break text":"","Bulleted List":"بەلگە تىزىملىك","Bulleted list styles toolbar":"تۈر بەلگە تىزىمى ئۇسلۇبىدىكى قورال بالداق",Cancel:"ۋاز كەچ","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"ئوتتۇردىكى رەسىم","Change image text alternative":"رەسىملىك تېكىست تاللىغۇچنى ئۆزگەرتىش","Choose heading":"ماۋزۇ تاللاش",Circle:"",Clear:"تازىلا","Click to edit block":"چېكىلسە بۆلەك تەھرىرلىنىدۇ",Code:"كود",Color:"","Color picker":"",Column:"",Dashed:"",Decimal:"","Decimal with leading zero":"","Decrease indent":"تارايتىشنى كېمەيت",Default:"سۈكۈتتىكى","Delete column":"","Delete row":"","Dim grey":"سۇس كۈلرەڭ",Dimensions:"",Disc:"","Document colors":"پۈتۈك رەڭگى",Dotted:"",Double:"",Downloadable:"چۈشۈرۈشچان","Drag to move":"يۆتكەشتە سۆرىلىدۇ","Dropdown toolbar":"سىرىلما قورال بالداق","Edit block":"بۆلەك تەھرىر","Edit link":"ئۇلانما تەھرىر","Editor block content toolbar":"تەھرىرلىگۈچ بۆلىكى مەزمۇن قورال بالداق","Editor contextual toolbar":"تەھرىرلىگۈچ مەزمۇن قورال بالداق","Editor editing area: %0":"تەھرىرلىگۈچ تەھرىرلەش رايونى: %0","Editor toolbar":"تەھرىرلىگۈچ قورال بالداق","Enter image caption":"رەسىمنىڭ تېمىسىنى كىرگۈزۈڭ","Enter table caption":"","Font Background Color":"خەت تەگلىك رەڭگى","Font Color":"خەت رەڭگى","Font Family":"خەت نۇسخىسى","Font Size":"خەت چوڭلۇقى","Full size image":"ئەسلى چوڭلۇقتىكى رەسىم",Green:"يېشىل",Grey:"كۈلرەڭ",Groove:"","Header column":"","Header row":"",Heading:"ماۋزۇ","Heading 1":"ماۋزۇ 1","Heading 2":"ماۋزۇ 2","Heading 3":"ماۋزۇ 3","Heading 4":"ماۋزۇ 4","Heading 5":"ماۋزۇ 5","Heading 6":"ماۋزۇ 6",Height:"",HEX:"","Horizontal line":"توغرىسىغا سىزىق","Horizontal text alignment toolbar":"","HTML object":"HTML جىسىم",Huge:"زور","Image resize list":"","Image toolbar":"","image widget":"رەسىمچىك","In line":"","Increase indent":"تارايتىشنى ئاشۇر",Insert:"قىستۇر","Insert column left":"","Insert column right":"","Insert image":"رەسىم قىستۇرۇش","Insert image via URL":"","Insert row above":"","Insert row below":"","Insert table":"جەدۋەل قىستۇر",Inset:"",Italic:"يانتۇ",Justify:"ئوڭ سولدىن توغرىلا","Justify cell text":"","Left aligned image":"سولغا توغۇرلانغان رەسىم","Light blue":"ئوچۇق كۆك","Light green":"ئوچۇق يېشىل","Light grey":"ئوچۇق كۈلرەڭ",Link:"ئۇلانما","Link image":"ئۇلانما سۈرەت","Link URL":"ئۇلاش ئادىرسى","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"","Merge cell left":"","Merge cell right":"","Merge cell up":"","Merge cells":"",Next:"كېيىنكى","No results found":"ھېچقانداق نەتىجە تېپىلمىدى","No searchable items":"ئىزدىگۈدەك تۈر يوق",None:"","Numbered List":"نومۇرلۇق تىزىملىك","Numbered list styles toolbar":"تۈر نومۇرى تىزىمى ئۇسلۇبىدىكى قورال بالداق","Open in a new tab":"يېڭى بەتكۈچتە ئاچ","Open link in new tab":"ئۇلانمىنى يېڭى بەتكۈچتە ئاچ",Orange:"قىزغۇچ سېرىق",Original:"",Outset:"",Padding:"",Paragraph:"ئابزاس",Previous:"ئالدىنقى",Purple:"بىنەپشە",Red:"قىزىل",Redo:"تەكرارلاش","Remove color":"رەڭنى چىقىرىۋەت","Remove Format":"پىچىمنى چىقىرىۋەت","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"كۆڭۈلدىكىگە قايتۇر","Reversed order":"","Rich Text Editor":"تېكىست تەھرىرلىگۈچ",Ridge:"","Right aligned image":"ئوڭغا توغۇرلانغان رەسىم",Row:"",Save:"ساقلا","Select all":"ھەممىنى تاللا","Select column":"","Select row":"","Show more items":"تېخىمۇ كۆپ تۈرنى كۆرسەت","Side image":"يان رەسىم",Small:"كىچىك",Solid:"","Split cell horizontally":"","Split cell vertically":"",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"ئۆچۈرۈش سىزىقى",Style:"",Subscript:"ئاستبەلگە",Superscript:"ئۈستبەلگە","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"تېكىست توغرىلاش","Text alignment toolbar":"تېكىست توغرىلاش قورالبالدىقى","Text alternative":"تېكىست ئاملاشتۇرۇش",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"بۇ ئۇلانمىنىڭ تور ئادرېسى يوق",Tiny:"ئەڭ كىچىك","To-do List":"ئىش تىزىمى","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"","Type or paste your content here.":"مەزمۇن بۇ جايغا كىرگۈزۈلىدۇ ياكى چاپلىنىدۇ.","Type your title":"ماۋزۇ كىرگۈزۈلىدۇ",Underline:"ئاستى سىزىق",Undo:"يېنىۋېلىش",Unlink:"ئۇلانمىنى ئۈزۈش",Update:"","Update image URL":"","Upload failed":"چىقىرىش مەغلۇپ بولدى","Upload from computer":"","Upload image from computer":"","Upload in progress":"يۈكلىنىۋاتىدۇ","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"ئاق",Width:"","Wrap text":"",Yellow:"سېرىق"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ug=e.ug||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 / %1",Accept:"قوشۇل","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"ئوتتۇرىغا توغرىلاش","Align left":"سولغا توغرىلاش","Align right":"ئوڭغا توغرىلاش","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"دېڭىز كۆكى",Background:"",Big:"چوڭ",Black:"قارا","Block quote":"نەقىل",Blue:"كۆك",Bold:"توم",Border:"","Break text":"","Bulleted List":"بەلگە تىزىملىك","Bulleted list styles toolbar":"تۈر بەلگە تىزىمى ئۇسلۇبىدىكى قورال بالداق",Cancel:"ۋاز كەچ","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"ئوتتۇردىكى رەسىم","Change image text alternative":"رەسىملىك تېكىست تاللىغۇچنى ئۆزگەرتىش","Choose heading":"ماۋزۇ تاللاش",Circle:"چەمبەر",Clear:"تازىلا","Click to edit block":"چېكىلسە بۆلەك تەھرىرلىنىدۇ",Close:"",Code:"كود",Color:"","Color picker":"",Column:"",Dashed:"",Decimal:"ئونلۇق كەسىر","Decimal with leading zero":"نۆل بىلەن باشلانغان ئونلۇق كەسىر","Decrease indent":"تارايتىشنى كېمەيت",Default:"سۈكۈتتىكى","Delete column":"","Delete row":"","Dim grey":"سۇس كۈلرەڭ",Dimensions:"",Disc:"ئۇيۇل چەمبەر","Document colors":"پۈتۈك رەڭگى",Dotted:"",Double:"",Downloadable:"چۈشۈرۈشچان","Drag to move":"يۆتكەشتە سۆرىلىدۇ","Dropdown toolbar":"سىرىلما قورال بالداق","Edit block":"بۆلەك تەھرىر","Edit link":"ئۇلانما تەھرىر","Editor block content toolbar":"تەھرىرلىگۈچ بۆلىكى مەزمۇن قورال بالداق","Editor contextual toolbar":"تەھرىرلىگۈچ مەزمۇن قورال بالداق","Editor dialog":"","Editor editing area: %0":"تەھرىرلىگۈچ تەھرىرلەش رايونى: %0","Editor toolbar":"تەھرىرلىگۈچ قورال بالداق","Enter image caption":"رەسىمنىڭ تېمىسىنى كىرگۈزۈڭ","Enter table caption":"","Font Background Color":"خەت تەگلىك رەڭگى","Font Color":"خەت رەڭگى","Font Family":"خەت نۇسخىسى","Font Size":"خەت چوڭلۇقى","Full size image":"ئەسلى چوڭلۇقتىكى رەسىم",Green:"يېشىل",Grey:"كۈلرەڭ",Groove:"","Header column":"","Header row":"",Heading:"ماۋزۇ","Heading 1":"ماۋزۇ 1","Heading 2":"ماۋزۇ 2","Heading 3":"ماۋزۇ 3","Heading 4":"ماۋزۇ 4","Heading 5":"ماۋزۇ 5","Heading 6":"ماۋزۇ 6",Height:"",HEX:"","Horizontal line":"توغرىسىغا سىزىق","Horizontal text alignment toolbar":"","HTML object":"HTML جىسىم",Huge:"زور","Image resize list":"","Image toolbar":"","image widget":"رەسىمچىك","In line":"","Increase indent":"تارايتىشنى ئاشۇر",Insert:"قىستۇر","Insert column left":"","Insert column right":"","Insert image":"رەسىم قىستۇرۇش","Insert image via URL":"","Insert row above":"","Insert row below":"","Insert table":"جەدۋەل قىستۇر",Inset:"",Italic:"يانتۇ",Justify:"ئوڭ سولدىن توغرىلا","Justify cell text":"","Left aligned image":"سولغا توغۇرلانغان رەسىم","Light blue":"ئوچۇق كۆك","Light green":"ئوچۇق يېشىل","Light grey":"ئوچۇق كۈلرەڭ",Link:"ئۇلانما","Link image":"ئۇلانما سۈرەت","Link URL":"ئۇلاش ئادىرسى","List properties":"تىزىم خاسلىقى","Lower-latin":"كىچىك لاتىن رەقىمى","Lower–roman":"كىچىك رىم رەقىمى","Merge cell down":"","Merge cell left":"","Merge cell right":"","Merge cell up":"","Merge cells":"",Next:"كېيىنكى","No results found":"ھېچقانداق نەتىجە تېپىلمىدى","No searchable items":"ئىزدىگۈدەك تۈر يوق",None:"","Numbered List":"نومۇرلۇق تىزىملىك","Numbered list styles toolbar":"تۈر نومۇرى تىزىمى ئۇسلۇبىدىكى قورال بالداق","Open in a new tab":"يېڭى بەتكۈچتە ئاچ","Open link in new tab":"ئۇلانمىنى يېڭى بەتكۈچتە ئاچ",Orange:"قىزغۇچ سېرىق",Original:"",Outset:"",Padding:"",Paragraph:"ئابزاس",Previous:"ئالدىنقى",Purple:"بىنەپشە",Red:"قىزىل",Redo:"تەكرارلاش","Remove color":"رەڭنى چىقىرىۋەت","Remove Format":"پىچىمنى چىقىرىۋەت","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"كۆڭۈلدىكىگە قايتۇر","Reversed order":"","Rich Text Editor":"تېكىست تەھرىرلىگۈچ",Ridge:"","Right aligned image":"ئوڭغا توغۇرلانغان رەسىم",Row:"",Save:"ساقلا","Select all":"ھەممىنى تاللا","Select column":"","Select row":"","Show more items":"تېخىمۇ كۆپ تۈرنى كۆرسەت","Side image":"يان رەسىم",Small:"كىچىك",Solid:"","Split cell horizontally":"","Split cell vertically":"",Square:"چاسا","Start at":"","Start index must be greater than 0.":"",Strikethrough:"ئۆچۈرۈش سىزىقى",Style:"",Subscript:"ئاستبەلگە",Superscript:"ئۈستبەلگە","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"","Text alignment":"تېكىست توغرىلاش","Text alignment toolbar":"تېكىست توغرىلاش قورالبالدىقى","Text alternative":"تېكىست ئاملاشتۇرۇش",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"بۇ ئۇلانمىنىڭ تور ئادرېسى يوق",Tiny:"ئەڭ كىچىك","To-do List":"ئىش تىزىمى","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"بوش چەمبەر تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the decimal list style":"ئونلۇق سان تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the decimal with leading zero list style":"نۆل بىلەن باشلانغان ئونلۇق سان تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the disc list style":"ئۇيۇل چەمبەر تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the lower–latin list style":"كىچىك لاتىن رەقىمى تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the lower–roman list style":"كىچىك رىم رەقىمى تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the square list style":"ئۇيۇل كۋادرات تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the upper–latin list style":"چوڭ لاتىن رەقىمى تىزىم ئۇسلۇبىغا ئالماشتۇر","Toggle the upper–roman list style":"چوڭ رىم رەقىمى تىزىم ئۇسلۇبىغا ئالماشتۇر",Turquoise:"","Type or paste your content here.":"مەزمۇن بۇ جايغا كىرگۈزۈلىدۇ ياكى چاپلىنىدۇ.","Type your title":"ماۋزۇ كىرگۈزۈلىدۇ",Underline:"ئاستى سىزىق",Undo:"يېنىۋېلىش",Unlink:"ئۇلانمىنى ئۈزۈش",Update:"","Update image URL":"","Upload failed":"چىقىرىش مەغلۇپ بولدى","Upload from computer":"","Upload image from computer":"","Upload in progress":"يۈكلىنىۋاتىدۇ","Upper-latin":"چوڭ لاتىن رەقىمى","Upper-roman":"چوڭ رىم رەقىمى","Vertical text alignment toolbar":"",White:"ئاق",Width:"","Wrap text":"",Yellow:"سېرىق"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/uk.js b/public/static/plugs/ckeditor5/translations/uk.js
index ed74b2c81..ec5083928 100644
--- a/public/static/plugs/ckeditor5/translations/uk.js
+++ b/public/static/plugs/ckeditor5/translations/uk.js
@@ -1 +1 @@
-!function(e){const t=e.uk=e.uk||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 із %1",Accept:"Прийняти","Align cell text to the bottom":"Вирівняти текст комірки по низу","Align cell text to the center":"Вирівняти текст по центру","Align cell text to the left":"Вирівняти текст по лівому краю","Align cell text to the middle":"Вирівняти текст комірки по середині","Align cell text to the right":"Вирівняти текст по правому краю","Align cell text to the top":"Вирівняти текст комірки по верху ","Align center":"По центру","Align left":"По лівому краю","Align right":"По правому краю","Align table to the left":"Вирівняти таблицю по лівому краю","Align table to the right":"Вирівняти таблицю по правому краю ",Alignment:"Вирівнювання",Aquamarine:"Аквамариновий",Background:"Фон",Big:"Великий",Black:"Чорний","Block quote":"Цитата",Blue:"Синій",Bold:"Жирний",Border:"Межа","Break text":"Розірвати тексту","Bulleted List":"Маркерний список","Bulleted list styles toolbar":"Панель маркерних списків",Cancel:"Відміна","Caption for image: %0":"Підпис до зображення: %0","Caption for the image":"Підпис до зображення","Cell properties":"Властивості комірок","Center table":"Відцентрувати таблицю","Centered image":"Зображення по центру","Change image text alternative":"Змінити текстову альтернативу зображення","Choose heading":"Оберіть заголовок",Circle:"Коло",Clear:"Очистити","Click to edit block":"Клацніть, щоб редагувати блок",Code:"Код",Color:"Колір","Color picker":"Вибір кольору",Column:"Стовпець",Dashed:"Пунктирна",Decimal:"Цифри","Decimal with leading zero":"Цифри із провідним нулем","Decrease indent":"Зменшити відступ",Default:"За замовчуванням","Delete column":"Видалити стовпець","Delete row":"Видалити рядок","Dim grey":"Темно-сірий",Dimensions:"Розміри",Disc:"Круг","Document colors":"Кольори документу",Dotted:"Точкова",Double:"Подвійна",Downloadable:"Завантажувальне","Drag to move":"Потягніть, щоб перемістити","Dropdown toolbar":"Випадаюча панель інструментів","Edit block":"Редагувати блок","Edit link":"Редагувати посилання","Editor block content toolbar":"Панель інструментів вмісту блоку редактора","Editor contextual toolbar":"Контекстна панель інструментів редактора","Editor editing area: %0":"Область редагування редактора: %0","Editor toolbar":"Панель інструментів редактора","Enter image caption":"Введіть підпис зображення","Enter table caption":"Введіть підпис таблиці","Font Background Color":"Колір тла шрифту","Font Color":"Колір шрифту","Font Family":"Сімейство шрифтів","Font Size":"Розмір шрифту","Full size image":"Повний розмір зображення",Green:"Зелений",Grey:"Сірий",Groove:"Жолобчаста","Header column":"Заголовок стовпця","Header row":"Заголовок рядка",Heading:"Заголовок","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4","Heading 5":"Заголовок 5","Heading 6":"Заголовок 6",Height:"Висота",HEX:"Шістнадцятковий","Horizontal line":"Горизонтальна лінія","Horizontal text alignment toolbar":"Панель інструментів вирівнювання горизонтального тексту","HTML object":"HTML об'єкт",Huge:"Величезний","Image resize list":"Перелік розмірів","Image toolbar":"Панелі інструментів зображення","image widget":"Віджет зображення","In line":"В тексті","Increase indent":"Збільшити відступ",Insert:"Вставити","Insert column left":"Вставити стовпець зліва","Insert column right":"Вставити стовпець справа","Insert image":"Вставити зображення","Insert image via URL":"Вставити зображення через посилання","Insert paragraph after block":"Додати абзац після блока","Insert paragraph before block":"Додати абзац перед блоком","Insert row above":"Вставити рядок знизу","Insert row below":"Вставити рядок зверху","Insert table":"Вставити таблицю",Inset:"Угнута",Italic:"Курсив",Justify:"По ширині","Justify cell text":"Вирівняти текст по ширині ","Left aligned image":"Зображення ліворуч","Light blue":"Світло-синій","Light green":"Світло-зелений","Light grey":"Світло-сірий",Link:"Посилання","Link image":"Посилання зображення","Link URL":"URL посилання","List properties":"Список властивостей","Lower-latin":"Нижній латинський","Lower–roman":"Нижньо-римський","Merge cell down":"Поєднати комірки внизу","Merge cell left":"Поєднати комірки ліворуч","Merge cell right":"Поєднати комірки праворуч","Merge cell up":"Поєднати комірки вгору","Merge cells":"Поєднати комірки",Next:"Наступний","No results found":"Нічого не знайдено","No searchable items":"Немає шуканих об'єктів",None:"Не вказано","Numbered List":"Нумерований список","Numbered list styles toolbar":"Панель нумерованих списків","Open in a new tab":"Вікрити у новій вкладці","Open link in new tab":"Відкрити посилання у новій вкладці",Orange:"Помаранчевий",Original:"Оригінал",Outset:"Випукла",Padding:"Заповнення",Paragraph:"Параграф","Press Enter to type after or press Shift + Enter to type before the widget":"Натисніть Enter, щоб друкувати після або натисніть Shift + Enter, щоб друкувати перед віджетом",Previous:"Попередній",Purple:"Фіолетовий",Red:"Червоний",Redo:"Повтор","Remove color":"Видалити колір","Remove Format":"Видалити форматування","Replace from computer":"Замінити з комп'ютера","Replace image":"Замінити зображення","Replace image from computer":"Замінити зображення з комп'ютера","Resize image":"Розтягнути зображення","Resize image to %0":"Розтягнути зображення до %0","Resize image to the original size":"Розтягнути зображення до оригінального розміру","Restore default":"Відновити за замовчуванням","Reversed order":"Зворотний порядок","Rich Text Editor":"Розширений текстовий редактор",Ridge:"Ребриста","Right aligned image":"Зображення праворуч",Row:"Рядок",Save:"Зберегти","Select all":"Вибрати все","Select column":"Виберіть стовпчик","Select row":"Виберіть рядок","Show more items":"Показати більше","Side image":"Бокове зображення",Small:"Маленький",Solid:"Суцільний","Split cell horizontally":"Розділити комірки горизонтально","Split cell vertically":"Розділити комірки вертикально",Square:"Квадрат","Start at":"Початок при","Start index must be greater than 0.":"Початковий індекс має бути більше 0.",Strikethrough:"Закреслений",Style:"Стиль",Subscript:"Нижній індекс",Superscript:"Верхній індекс","Table alignment toolbar":"Панель інструментів вирівнювання таблиці","Table cell text alignment":"Вирівнювання тексту комірки","Table properties":"Властивості таблиці","Table toolbar":"Панель інструментів таблиці","Text alignment":"Вирівнювання тексту","Text alignment toolbar":"Панель інструментів вирівнювання тексту","Text alternative":"Текстова альтернатива",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Колір недійсний. Спробуйте "#FF0000" або "rgb(255,0,0)" або "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'Значення недійсне. Спробуйте "10px" або "2em" або просто "2"',"This link has no URL":"Це посилання не має URL",Tiny:"Крихітний","To-do List":"Список справ","Toggle caption off":"Вимкнути підпис","Toggle caption on":"Увімкнути підпис","Toggle the circle list style":"Перемкнути круговий стиль списку","Toggle the decimal list style":"Перемкнути десятковий стиль списку","Toggle the decimal with leading zero list style":"Перемкнути десятковий стиль списку з нулем на початку","Toggle the disc list style":"Перемкнути дисковий стиль списку ","Toggle the lower–latin list style":"Перемкнути нижній латинський стиль списку","Toggle the lower–roman list style":"Перемкнути нижньо-римський стиль списку","Toggle the square list style":"Перемкнути квадратний стиль списку","Toggle the upper–latin list style":"Перемкнути верхній латинський стиль списку","Toggle the upper–roman list style":"Перемкнути верхньо-римський стиль списку",Turquoise:"Бірюзовий","Type or paste your content here.":"Введіть або вставте свій вміст тут.","Type your title":"Введіть назву",Underline:"Підкреслений",Undo:"Відміна",Unlink:"Видалити посилання",Update:"Оновити","Update image URL":"Оновити посилання на зображення","Upload failed":"Завантаження не вдалось","Upload from computer":"Завантажити з комп'ютера","Upload image from computer":"Завантажити зображення з комп'ютера","Upload in progress":"Виконується завантаження","Upper-latin":"Верхній латинський ","Upper-roman":"Верхньо-римський","Vertical text alignment toolbar":"Панель інструментів вертикального вирівнювання тексту",White:"Білий","Widget toolbar":"Панель інструментів віджетів",Width:"Ширина","Wrap text":"Обернути текст",Yellow:"Жовтий"}),t.getPluralForm=function(e){return e%1==0&&e%10==1&&e%100!=11?0:e%1==0&&e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:e%1==0&&(e%10==0||e%10>=5&&e%10<=9||e%100>=11&&e%100<=14)?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.uk=e.uk||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 із %1",Accept:"Прийняти","Align cell text to the bottom":"Вирівняти текст комірки по низу","Align cell text to the center":"Вирівняти текст по центру","Align cell text to the left":"Вирівняти текст по лівому краю","Align cell text to the middle":"Вирівняти текст комірки по середині","Align cell text to the right":"Вирівняти текст по правому краю","Align cell text to the top":"Вирівняти текст комірки по верху ","Align center":"По центру","Align left":"По лівому краю","Align right":"По правому краю","Align table to the left":"Вирівняти таблицю по лівому краю","Align table to the right":"Вирівняти таблицю по правому краю ",Alignment:"Вирівнювання",Aquamarine:"Аквамариновий",Background:"Фон",Big:"Великий",Black:"Чорний","Block quote":"Цитата",Blue:"Синій",Bold:"Жирний",Border:"Межа","Break text":"Розірвати тексту","Bulleted List":"Маркерний список","Bulleted list styles toolbar":"Панель маркерних списків",Cancel:"Відміна","Caption for image: %0":"Підпис до зображення: %0","Caption for the image":"Підпис до зображення","Cell properties":"Властивості комірок","Center table":"Відцентрувати таблицю","Centered image":"Зображення по центру","Change image text alternative":"Змінити текстову альтернативу зображення","Choose heading":"Оберіть заголовок",Circle:"Коло",Clear:"Очистити","Click to edit block":"Клацніть, щоб редагувати блок",Close:"Закрити",Code:"Код",Color:"Колір","Color picker":"Вибір кольору",Column:"Стовпець",Dashed:"Пунктирна",Decimal:"Цифри","Decimal with leading zero":"Цифри із провідним нулем","Decrease indent":"Зменшити відступ",Default:"За замовчуванням","Delete column":"Видалити стовпець","Delete row":"Видалити рядок","Dim grey":"Темно-сірий",Dimensions:"Розміри",Disc:"Круг","Document colors":"Кольори документу",Dotted:"Точкова",Double:"Подвійна",Downloadable:"Завантажувальне","Drag to move":"Потягніть, щоб перемістити","Dropdown toolbar":"Випадаюча панель інструментів","Edit block":"Редагувати блок","Edit link":"Редагувати посилання","Editor block content toolbar":"Панель інструментів вмісту блоку редактора","Editor contextual toolbar":"Контекстна панель інструментів редактора","Editor dialog":"Діалогове вікно редактора","Editor editing area: %0":"Область редагування редактора: %0","Editor toolbar":"Панель інструментів редактора","Enter image caption":"Введіть підпис зображення","Enter table caption":"Введіть підпис таблиці","Font Background Color":"Колір тла шрифту","Font Color":"Колір шрифту","Font Family":"Сімейство шрифтів","Font Size":"Розмір шрифту","Full size image":"Повний розмір зображення",Green:"Зелений",Grey:"Сірий",Groove:"Жолобчаста","Header column":"Заголовок стовпця","Header row":"Заголовок рядка",Heading:"Заголовок","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4","Heading 5":"Заголовок 5","Heading 6":"Заголовок 6",Height:"Висота",HEX:"Шістнадцятковий","Horizontal line":"Горизонтальна лінія","Horizontal text alignment toolbar":"Панель інструментів вирівнювання горизонтального тексту","HTML object":"HTML об'єкт",Huge:"Величезний","Image resize list":"Перелік розмірів","Image toolbar":"Панелі інструментів зображення","image widget":"Віджет зображення","In line":"В тексті","Increase indent":"Збільшити відступ",Insert:"Вставити","Insert column left":"Вставити стовпець зліва","Insert column right":"Вставити стовпець справа","Insert image":"Вставити зображення","Insert image via URL":"Вставити зображення через посилання","Insert paragraph after block":"Додати абзац після блока","Insert paragraph before block":"Додати абзац перед блоком","Insert row above":"Вставити рядок знизу","Insert row below":"Вставити рядок зверху","Insert table":"Вставити таблицю",Inset:"Угнута",Italic:"Курсив",Justify:"По ширині","Justify cell text":"Вирівняти текст по ширині ","Left aligned image":"Зображення ліворуч","Light blue":"Світло-синій","Light green":"Світло-зелений","Light grey":"Світло-сірий",Link:"Посилання","Link image":"Посилання зображення","Link URL":"URL посилання","List properties":"Список властивостей","Lower-latin":"Нижній латинський","Lower–roman":"Нижньо-римський","Merge cell down":"Поєднати комірки внизу","Merge cell left":"Поєднати комірки ліворуч","Merge cell right":"Поєднати комірки праворуч","Merge cell up":"Поєднати комірки вгору","Merge cells":"Поєднати комірки",Next:"Наступний","No results found":"Нічого не знайдено","No searchable items":"Немає шуканих об'єктів",None:"Не вказано","Numbered List":"Нумерований список","Numbered list styles toolbar":"Панель нумерованих списків","Open in a new tab":"Вікрити у новій вкладці","Open link in new tab":"Відкрити посилання у новій вкладці",Orange:"Помаранчевий",Original:"Оригінал",Outset:"Випукла",Padding:"Заповнення",Paragraph:"Параграф","Press Enter to type after or press Shift + Enter to type before the widget":"Натисніть Enter, щоб друкувати після або натисніть Shift + Enter, щоб друкувати перед віджетом",Previous:"Попередній",Purple:"Фіолетовий",Red:"Червоний",Redo:"Повтор","Remove color":"Видалити колір","Remove Format":"Видалити форматування","Replace from computer":"Замінити з комп'ютера","Replace image":"Замінити зображення","Replace image from computer":"Замінити зображення з комп'ютера","Resize image":"Розтягнути зображення","Resize image to %0":"Розтягнути зображення до %0","Resize image to the original size":"Розтягнути зображення до оригінального розміру","Restore default":"Відновити за замовчуванням","Reversed order":"Зворотний порядок","Rich Text Editor":"Розширений текстовий редактор",Ridge:"Ребриста","Right aligned image":"Зображення праворуч",Row:"Рядок",Save:"Зберегти","Select all":"Вибрати все","Select column":"Виберіть стовпчик","Select row":"Виберіть рядок","Show more items":"Показати більше","Side image":"Бокове зображення",Small:"Маленький",Solid:"Суцільний","Split cell horizontally":"Розділити комірки горизонтально","Split cell vertically":"Розділити комірки вертикально",Square:"Квадрат","Start at":"Початок при","Start index must be greater than 0.":"Початковий індекс має бути більше 0.",Strikethrough:"Закреслений",Style:"Стиль",Subscript:"Нижній індекс",Superscript:"Верхній індекс","Table alignment toolbar":"Панель інструментів вирівнювання таблиці","Table cell text alignment":"Вирівнювання тексту комірки","Table properties":"Властивості таблиці","Table toolbar":"Панель інструментів таблиці","Text alignment":"Вирівнювання тексту","Text alignment toolbar":"Панель інструментів вирівнювання тексту","Text alternative":"Текстова альтернатива",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Колір недійсний. Спробуйте "#FF0000" або "rgb(255,0,0)" або "red"','The value is invalid. Try "10px" or "2em" or simply "2".':'Значення недійсне. Спробуйте "10px" або "2em" або просто "2"',"This link has no URL":"Це посилання не має URL",Tiny:"Крихітний","To-do List":"Список справ","Toggle caption off":"Вимкнути підпис","Toggle caption on":"Увімкнути підпис","Toggle the circle list style":"Перемкнути круговий стиль списку","Toggle the decimal list style":"Перемкнути десятковий стиль списку","Toggle the decimal with leading zero list style":"Перемкнути десятковий стиль списку з нулем на початку","Toggle the disc list style":"Перемкнути дисковий стиль списку ","Toggle the lower–latin list style":"Перемкнути нижній латинський стиль списку","Toggle the lower–roman list style":"Перемкнути нижньо-римський стиль списку","Toggle the square list style":"Перемкнути квадратний стиль списку","Toggle the upper–latin list style":"Перемкнути верхній латинський стиль списку","Toggle the upper–roman list style":"Перемкнути верхньо-римський стиль списку",Turquoise:"Бірюзовий","Type or paste your content here.":"Введіть або вставте свій вміст тут.","Type your title":"Введіть назву",Underline:"Підкреслений",Undo:"Відміна",Unlink:"Видалити посилання",Update:"Оновити","Update image URL":"Оновити посилання на зображення","Upload failed":"Завантаження не вдалось","Upload from computer":"Завантажити з комп'ютера","Upload image from computer":"Завантажити зображення з комп'ютера","Upload in progress":"Виконується завантаження","Upper-latin":"Верхній латинський ","Upper-roman":"Верхньо-римський","Vertical text alignment toolbar":"Панель інструментів вертикального вирівнювання тексту",White:"Білий","Widget toolbar":"Панель інструментів віджетів",Width:"Ширина","Wrap text":"Обернути текст",Yellow:"Жовтий"}),t.getPluralForm=function(e){return e%1==0&&e%10==1&&e%100!=11?0:e%1==0&&e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:e%1==0&&(e%10==0||e%10>=5&&e%10<=9||e%100>=11&&e%100<=14)?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/ur.js b/public/static/plugs/ckeditor5/translations/ur.js
index 6a6e6da31..51d7b5221 100644
--- a/public/static/plugs/ckeditor5/translations/ur.js
+++ b/public/static/plugs/ckeditor5/translations/ur.js
@@ -1 +1 @@
-!function(e){const t=e.ur=e.ur||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"0% میں سے 1%",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"درمیانی سیدھ","Align left":"بائیں سیدھ","Align right":"دائیں سیدھ","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"نیلگوں بلور",Background:"",Big:"بڑا",Black:"سیاہ","Block quote":"خانہ اقتباس",Blue:"نیلا",Bold:"جلّی",Border:"حاشیہ","Break text":"متن تقسیم کریں","Bulleted List":"غیر ہندسی فہرست","Bulleted list styles toolbar":"",Cancel:"منسوخ","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"","Change image text alternative":"","Choose heading":"سرخی منتخب کریں",Circle:"",Clear:"","Click to edit block":"",Code:"کوڈ",Color:"رنگ","Color picker":"",Column:"ستون",Dashed:"قطعہ دار",Decimal:"","Decimal with leading zero":"","Decrease indent":"حاشیہ گھٹائیں",Default:"طے شدہ","Delete column":"ستون حذف کریں","Delete row":"قطار حذف کریں","Dim grey":"پھیکا سرمئی",Dimensions:"",Disc:"","Document colors":"دستاویز کے رنگ",Dotted:"نقطہ دار",Double:"دو گنا",Downloadable:"ڈاؤنلوڈ ہو سکتا ہے","Drag to move":"","Dropdown toolbar":"آلہ جات برائے فہرست ","Edit block":"خانہ کی تدوین","Edit link":"ربط کی تدوین","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"رقبہ خانۂ ترمیم: 0%","Editor toolbar":"ایڈیٹر آلہ جات","Enter image caption":"","Enter table caption":"","Font Background Color":"فانٹ کے پس منظر کا رنگ","Font Color":"فانٹ کا رنگ","Font Family":"فانٹ خاندان","Font Size":"فانٹ کا حجم","Full size image":"مکمل پہمائش کا عکس",Green:"سبز",Grey:"سرمئی",Groove:"","Header column":"سر ستون","Header row":"سر قطار",Heading:"سرخی","Heading 1":"سرخی 1","Heading 2":"سرخی 2","Heading 3":"سرخی 3","Heading 4":"سرخی 4","Heading 5":"سرخی 5","Heading 6":"سرخی 6",Height:"اونچائی",HEX:"","Horizontal line":"افقی خط","Horizontal text alignment toolbar":"","HTML object":"ایچ ٹی ایم ایل آبجیکٹ",Huge:"جسيم","Image resize list":"","Image toolbar":"آلہ جات برائے عکس","image widget":"آلۂ عکس","In line":"","Increase indent":"حاشیہ بڑھائیں",Insert:"","Insert column left":"بائیں جانب کالم بنائیں","Insert column right":"دائیں جانب کالم بنائیں","Insert image":"","Insert image via URL":"","Insert paragraph after block":"پیراگراف کے بعد کوڈ خانہ نصب کریں","Insert paragraph before block":"پیراگراف سے پہلے کوڈ خانہ نصب کریں","Insert row above":"قطار بالا نصب کریں","Insert row below":"قطار زیریں نصب کریں","Insert table":"جدول داخل کریں",Inset:"",Italic:"ترچھا",Justify:"برابر سیدھ","Justify cell text":"","Left aligned image":"","Light blue":"ہلکا نیلا","Light green":"ہلکا سبز","Light grey":"ہلکا سرمئی",Link:"ربط","Link image":"","Link URL":"ربط کا یو آر ایل","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"سیل نچلی طرف یکجا کریں","Merge cell left":"سیل بائیں طرف یکجا کریں","Merge cell right":"سیل دائیں طرف یکجا کریں","Merge cell up":"سیل اوپر یکجا کریں","Merge cells":"سیل یکجا کریں",Next:"اگلا","No results found":"","No searchable items":"",None:"","Numbered List":"ہندسی فہرست","Numbered list styles toolbar":"","Open in a new tab":"نئی ٹیب کھولیں","Open link in new tab":"نئے ٹیب میں کھولیں",Orange:"نارنجی",Original:"",Outset:"",Padding:"",Paragraph:"پیرا","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"پچھلا",Purple:"ارغوانی",Red:"سرخ",Redo:"پھر سے کریں","Remove color":"رنگ حذف کریں","Remove Format":"فارمیٹ ہٹائیں","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"طے شدہ بحال","Reversed order":"","Rich Text Editor":"خانۂ ترمیم",Ridge:"","Right aligned image":"",Row:"قطار",Save:"محفوظ","Select all":"سب منتخب کریں","Select column":"","Select row":"","Show more items":"مزید مواد کی نمائش کریں","Side image":"عکس بہ پہلو",Small:"چھوٹا",Solid:"","Split cell horizontally":"سیل کی افقی تقسیم","Split cell vertically":"سیل کی عمودی تقسیم",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"خط کشیدہ",Style:"",Subscript:"زير نوشت",Superscript:"بالا نوشت","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"آلہ جات برائے جدول","Text alignment":"متن کی سیدھ","Text alignment toolbar":"خانہ آلات برائے سیدھ","Text alternative":"",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"ربط کا کوئی یو آر ایل نہیں",Tiny:"ننھا","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"فیروزی","Type or paste your content here.":"اپنا مواد یہاں ٹایپ یا چسپاں کریں.","Type your title":"عنوان ٹایپ کریں",Underline:"ترچھا",Undo:"رد ترمیم",Unlink:"ربط حذف کریں",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upload in progress":"آپلوڈ جاری ہے","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"سفید","Widget toolbar":"آلہ جات برائے وجٹ",Width:"چوڑائی","Wrap text":"ملفوف متن",Yellow:"پیلا"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.ur=e.ur||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"0% میں سے 1%",Accept:"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"درمیانی سیدھ","Align left":"بائیں سیدھ","Align right":"دائیں سیدھ","Align table to the left":"","Align table to the right":"",Alignment:"",Aquamarine:"نیلگوں بلور",Background:"",Big:"بڑا",Black:"سیاہ","Block quote":"خانہ اقتباس",Blue:"نیلا",Bold:"جلّی",Border:"حاشیہ","Break text":"متن تقسیم کریں","Bulleted List":"غیر ہندسی فہرست","Bulleted list styles toolbar":"",Cancel:"منسوخ","Caption for image: %0":"","Caption for the image":"","Cell properties":"","Center table":"","Centered image":"","Change image text alternative":"","Choose heading":"سرخی منتخب کریں",Circle:"",Clear:"","Click to edit block":"",Close:"",Code:"کوڈ",Color:"رنگ","Color picker":"",Column:"ستون",Dashed:"قطعہ دار",Decimal:"","Decimal with leading zero":"","Decrease indent":"حاشیہ گھٹائیں",Default:"طے شدہ","Delete column":"ستون حذف کریں","Delete row":"قطار حذف کریں","Dim grey":"پھیکا سرمئی",Dimensions:"",Disc:"","Document colors":"دستاویز کے رنگ",Dotted:"نقطہ دار",Double:"دو گنا",Downloadable:"ڈاؤنلوڈ ہو سکتا ہے","Drag to move":"","Dropdown toolbar":"آلہ جات برائے فہرست ","Edit block":"خانہ کی تدوین","Edit link":"ربط کی تدوین","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"رقبہ خانۂ ترمیم: 0%","Editor toolbar":"ایڈیٹر آلہ جات","Enter image caption":"","Enter table caption":"","Font Background Color":"فانٹ کے پس منظر کا رنگ","Font Color":"فانٹ کا رنگ","Font Family":"فانٹ خاندان","Font Size":"فانٹ کا حجم","Full size image":"مکمل پہمائش کا عکس",Green:"سبز",Grey:"سرمئی",Groove:"","Header column":"سر ستون","Header row":"سر قطار",Heading:"سرخی","Heading 1":"سرخی 1","Heading 2":"سرخی 2","Heading 3":"سرخی 3","Heading 4":"سرخی 4","Heading 5":"سرخی 5","Heading 6":"سرخی 6",Height:"اونچائی",HEX:"","Horizontal line":"افقی خط","Horizontal text alignment toolbar":"","HTML object":"ایچ ٹی ایم ایل آبجیکٹ",Huge:"جسيم","Image resize list":"","Image toolbar":"آلہ جات برائے عکس","image widget":"آلۂ عکس","In line":"","Increase indent":"حاشیہ بڑھائیں",Insert:"","Insert column left":"بائیں جانب کالم بنائیں","Insert column right":"دائیں جانب کالم بنائیں","Insert image":"","Insert image via URL":"","Insert paragraph after block":"پیراگراف کے بعد کوڈ خانہ نصب کریں","Insert paragraph before block":"پیراگراف سے پہلے کوڈ خانہ نصب کریں","Insert row above":"قطار بالا نصب کریں","Insert row below":"قطار زیریں نصب کریں","Insert table":"جدول داخل کریں",Inset:"",Italic:"ترچھا",Justify:"برابر سیدھ","Justify cell text":"","Left aligned image":"","Light blue":"ہلکا نیلا","Light green":"ہلکا سبز","Light grey":"ہلکا سرمئی",Link:"ربط","Link image":"","Link URL":"ربط کا یو آر ایل","List properties":"","Lower-latin":"","Lower–roman":"","Merge cell down":"سیل نچلی طرف یکجا کریں","Merge cell left":"سیل بائیں طرف یکجا کریں","Merge cell right":"سیل دائیں طرف یکجا کریں","Merge cell up":"سیل اوپر یکجا کریں","Merge cells":"سیل یکجا کریں",Next:"اگلا","No results found":"","No searchable items":"",None:"","Numbered List":"ہندسی فہرست","Numbered list styles toolbar":"","Open in a new tab":"نئی ٹیب کھولیں","Open link in new tab":"نئے ٹیب میں کھولیں",Orange:"نارنجی",Original:"",Outset:"",Padding:"",Paragraph:"پیرا","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"پچھلا",Purple:"ارغوانی",Red:"سرخ",Redo:"پھر سے کریں","Remove color":"رنگ حذف کریں","Remove Format":"فارمیٹ ہٹائیں","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Restore default":"طے شدہ بحال","Reversed order":"","Rich Text Editor":"خانۂ ترمیم",Ridge:"","Right aligned image":"",Row:"قطار",Save:"محفوظ","Select all":"سب منتخب کریں","Select column":"","Select row":"","Show more items":"مزید مواد کی نمائش کریں","Side image":"عکس بہ پہلو",Small:"چھوٹا",Solid:"","Split cell horizontally":"سیل کی افقی تقسیم","Split cell vertically":"سیل کی عمودی تقسیم",Square:"","Start at":"","Start index must be greater than 0.":"",Strikethrough:"خط کشیدہ",Style:"",Subscript:"زير نوشت",Superscript:"بالا نوشت","Table alignment toolbar":"","Table cell text alignment":"","Table properties":"","Table toolbar":"آلہ جات برائے جدول","Text alignment":"متن کی سیدھ","Text alignment toolbar":"خانہ آلات برائے سیدھ","Text alternative":"",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':"",'The value is invalid. Try "10px" or "2em" or simply "2".':"","This link has no URL":"ربط کا کوئی یو آر ایل نہیں",Tiny:"ننھا","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"فیروزی","Type or paste your content here.":"اپنا مواد یہاں ٹایپ یا چسپاں کریں.","Type your title":"عنوان ٹایپ کریں",Underline:"ترچھا",Undo:"رد ترمیم",Unlink:"ربط حذف کریں",Update:"","Update image URL":"","Upload failed":"","Upload from computer":"","Upload image from computer":"","Upload in progress":"آپلوڈ جاری ہے","Upper-latin":"","Upper-roman":"","Vertical text alignment toolbar":"",White:"سفید","Widget toolbar":"آلہ جات برائے وجٹ",Width:"چوڑائی","Wrap text":"ملفوف متن",Yellow:"پیلا"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/uz.js b/public/static/plugs/ckeditor5/translations/uz.js
index 83d96f9c7..27fa68ad8 100644
--- a/public/static/plugs/ckeditor5/translations/uz.js
+++ b/public/static/plugs/ckeditor5/translations/uz.js
@@ -1 +1 @@
-!function(a){const i=a.uz=a.uz||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"Hujayra matnini pastga tekislash","Align cell text to the center":"Matnni markazga tekislash","Align cell text to the left":"Matnni chapga tekislash","Align cell text to the middle":"Hujayra matnini markazga tekislash","Align cell text to the right":"Matnni o'ngga tekislash","Align cell text to the top":"Hujayra matnini tepaga tekislash","Align center":"O'rtada tekislash","Align left":"Chap tomonda tekislash","Align right":"O'ng tomonda tekislash","Align table to the left":"Jadvalni chap tomonga tekislash","Align table to the right":"Jadvalni o'ngga tekislash",Alignment:"Tekislash",Aquamarine:"Akuamarin",Background:"Fon",Big:"Katta",Black:"Qora","Block quote":"Iqtibos",Blue:"Ko'k",Bold:"Qalin",Border:"Chegara","Break text":"","Bulleted List":"Belgilangan roʻyxat","Bulleted list styles toolbar":"Belgilangan ro'yxat uslublari",Cancel:"Bekor qilish","Caption for image: %0":"","Caption for the image":"","Cell properties":"Hujayra xususiyatlari","Center table":"Jadvalni markazga tekislash","Centered image":"Markazga tekislash","Change image text alternative":"Muqobil matnni tahrirlash","Choose heading":"Uslubni tanlash",Circle:"Doira",Clear:"O'chirish","Click to edit block":"",Code:"Manba kodi",Color:"Rang","Color picker":"Rang tanlash",Column:"Ustun",Dashed:"Nuqtali",Decimal:"O'nlik","Decimal with leading zero":"Boshlovchi nol bilan oʻnlik","Decrease indent":"chekinishni kamaytirish",Default:"Standart","Delete column":"Ustunni o'chirish","Delete row":"Satrni o'chirish","Dim grey":"To'q kulrang",Dimensions:"O'lchamlar",Disc:"Disk","Document colors":"Sahifa rangi",Dotted:"Nuqta",Double:"Ikkitalik",Downloadable:"Yuklab olinadigan","Drag to move":"","Dropdown toolbar":"Ochiladigan asboblar paneli","Edit block":"Blokni tahrirlash","Edit link":"Havolani tahrirlash","Editor block content toolbar":"","Editor contextual toolbar":"","Editor editing area: %0":"","Editor toolbar":"Tahrirlovchi asboblar paneli","Enter image caption":"Rasm sarlavhasi","Enter table caption":"","Font Background Color":"Fon rangi","Font Color":"Shrift rangi","Font Family":"Shriftlar oilasi","Font Size":"Shrift hajmi","Full size image":"Asl rasm hajmi",Green:"Yashil",Grey:"Kulrang",Groove:"Yivli","Header column":"Ustun sarlavhalari","Header row":"Sarlavhalar satri",Heading:"Uslub","Heading 1":"Sarlavha 1","Heading 2":"Sarlavha 2","Heading 3":"Sarlavha 3","Heading 4":"Sarlavha 4","Heading 5":"Sarlavha 5","Heading 6":"Sarlavha 6",Height:"Balandligi",HEX:"","Horizontal line":"Gorizontal chiziq","Horizontal text alignment toolbar":"Matnni gorizontal tekislash asboblar paneli",Huge:"Juda katta","Image resize list":"Hajmlar ro'yxati","Image toolbar":"Rasm asboblari paneli","image widget":"Tasvirlar vidjeti","In line":"","Increase indent":"chekinishni oshirish",Insert:"Kiritish","Insert column left":"Ustunni chapga kiritish","Insert column right":"Ustunni o'ngga kiritish","Insert image":"Rasm kiritish","Insert image via URL":"Rasmni URL orqali kiritish","Insert paragraph after block":"Вblokdan keyin paragraf qo'yish","Insert paragraph before block":"Blokdan oldin paragrafni kiritish","Insert row above":"Yuqoriga qatorni kiritish","Insert row below":"Pastga qatorni kiritish","Insert table":"Jadvalni kiritish",Inset:"Tushkunlikka tushgan",Italic:"Kursiv",Justify:"Kengligi bo'yicha tekislash","Justify cell text":"Matnni kenglikka tekislash","Left aligned image":"Chapga tekislash","Light blue":"Moviy","Light green":"Och yashil","Light grey":"Och kulrang",Link:"Havola","Link image":"Rasmga havola","Link URL":'"Havola URL',"List properties":"","Lower-latin":"Kichik lotincha","Lower–roman":"Kichik rim","Merge cell down":"Pastdagi katak bilan birlashtirish","Merge cell left":"Chapdagi katakcha bilan birlashtirish","Merge cell right":"O'ngdagi katakcha bilan birlashtirish","Merge cell up":"Yuqoridagi katak bilan birlashtirish","Merge cells":"Hujayralarni birlashtirish",Next:"Keyingi","No results found":"","No searchable items":"",None:"Yo'q","Numbered List":"Raqamlangan ro'yxat","Numbered list styles toolbar":"Raqamlangan ro'yxat uslublari","Open in a new tab":"Yangi oynada oching","Open link in new tab":"Havolani yangi oynada ochish",Orange:"To'q sariq",Original:"Asl",Outset:"Qavariq",Padding:"Chekinish",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Oldingi",Purple:"Siyohrang",Red:"Qizil",Redo:"Takrorlash","Remove color":"Rangni olib tashlash","Remove Format":"Formatlashni olib tashlash","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Rasm hajmini o'zgartirish","Resize image to %0":"Rasm hajmini %0 ga o‘zgartirish","Resize image to the original size":"Rasmning o'lchamini asl o'lchamiga o'zgartiring","Restore default":"","Reversed order":"","Rich Text Editor":"Tahrirlovchi",Ridge:"Qirrali","Right aligned image":"O'ngga tekislash",Row:"Satr",Save:"Saqlash","Select all":"Hammasini tanlash","Select column":"Ustunni tanlash","Select row":"Satrni tanlang","Show more items":"","Side image":"Yon tasvir",Small:"Kichik",Solid:"Qattiq","Split cell horizontally":"Hujayrani gorizontal ravishda ajratish","Split cell vertically":"Hujayrani vertikal ravishda ajratish",Square:"Kvadrat","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Chizilgan",Style:"Uslub",Subscript:"Pastki yozuv",Superscript:"Yuqori yozuv","Table alignment toolbar":"Jadvalni tekislash asboblar paneli","Table cell text alignment":"Jadval katakchasidagi matnni tekislash","Table properties":"Jadvalning xususiyatlari","Table toolbar":"Jadval asboblar paneli","Text alignment":"Matnni tekislash","Text alignment toolbar":"Tekislash","Text alternative":"Muqobil matn",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Noto\'g\'ri rang. \\ "# FF0000 \\" yoki \\ "rgb (255,0,0) \\" yoki \\ "red \\" ni sinab ko\'ring.','The value is invalid. Try "10px" or "2em" or simply "2".':'Noto\'g\'ri qiymat. \\ "10px \\" yoki \\ "2em \\" yoki shunchaki \\ "2 \\" ni sinab ko\'ring.',"This link has no URL":"Bu havola uchun URL oʻrnatilmagan",Tiny:"Juda kichik","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Turkuaz","Type or paste your content here.":"Matningizni shu yerga kiriting yoki joylashtiring","Type your title":"Sarlavhani kiriting",Underline:"Tagi chizilgan",Undo:"Bekor qilish",Unlink:"Havolani olib tashlash",Update:"O'zgartirish","Update image URL":"Rasm URL manzilini o'zgartirish","Upload failed":"Yuklab olinmadi","Upload from computer":"","Upload image from computer":"","Upload in progress":"Yuklanmoqda","Upper-latin":"Katta lotincha","Upper-roman":"Katta rim","Vertical text alignment toolbar":"Vertikal matnni tekislash asboblar paneli",White:"Oq","Widget toolbar":"Vidjet asboblar paneli",Width:"Kengligi","Wrap text":"",Yellow:"Sariq"}),i.getPluralForm=function(a){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(a){const i=a.uz=a.uz||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Accept:"","Align cell text to the bottom":"Hujayra matnini pastga tekislash","Align cell text to the center":"Matnni markazga tekislash","Align cell text to the left":"Matnni chapga tekislash","Align cell text to the middle":"Hujayra matnini markazga tekislash","Align cell text to the right":"Matnni o'ngga tekislash","Align cell text to the top":"Hujayra matnini tepaga tekislash","Align center":"O'rtada tekislash","Align left":"Chap tomonda tekislash","Align right":"O'ng tomonda tekislash","Align table to the left":"Jadvalni chap tomonga tekislash","Align table to the right":"Jadvalni o'ngga tekislash",Alignment:"Tekislash",Aquamarine:"Akuamarin",Background:"Fon",Big:"Katta",Black:"Qora","Block quote":"Iqtibos",Blue:"Ko'k",Bold:"Qalin",Border:"Chegara","Break text":"","Bulleted List":"Belgilangan roʻyxat","Bulleted list styles toolbar":"Belgilangan ro'yxat uslublari",Cancel:"Bekor qilish","Caption for image: %0":"","Caption for the image":"","Cell properties":"Hujayra xususiyatlari","Center table":"Jadvalni markazga tekislash","Centered image":"Markazga tekislash","Change image text alternative":"Muqobil matnni tahrirlash","Choose heading":"Uslubni tanlash",Circle:"Doira",Clear:"O'chirish","Click to edit block":"",Close:"",Code:"Manba kodi",Color:"Rang","Color picker":"Rang tanlash",Column:"Ustun",Dashed:"Nuqtali",Decimal:"O'nlik","Decimal with leading zero":"Boshlovchi nol bilan oʻnlik","Decrease indent":"chekinishni kamaytirish",Default:"Standart","Delete column":"Ustunni o'chirish","Delete row":"Satrni o'chirish","Dim grey":"To'q kulrang",Dimensions:"O'lchamlar",Disc:"Disk","Document colors":"Sahifa rangi",Dotted:"Nuqta",Double:"Ikkitalik",Downloadable:"Yuklab olinadigan","Drag to move":"","Dropdown toolbar":"Ochiladigan asboblar paneli","Edit block":"Blokni tahrirlash","Edit link":"Havolani tahrirlash","Editor block content toolbar":"","Editor contextual toolbar":"","Editor dialog":"","Editor editing area: %0":"","Editor toolbar":"Tahrirlovchi asboblar paneli","Enter image caption":"Rasm sarlavhasi","Enter table caption":"","Font Background Color":"Fon rangi","Font Color":"Shrift rangi","Font Family":"Shriftlar oilasi","Font Size":"Shrift hajmi","Full size image":"Asl rasm hajmi",Green:"Yashil",Grey:"Kulrang",Groove:"Yivli","Header column":"Ustun sarlavhalari","Header row":"Sarlavhalar satri",Heading:"Uslub","Heading 1":"Sarlavha 1","Heading 2":"Sarlavha 2","Heading 3":"Sarlavha 3","Heading 4":"Sarlavha 4","Heading 5":"Sarlavha 5","Heading 6":"Sarlavha 6",Height:"Balandligi",HEX:"","Horizontal line":"Gorizontal chiziq","Horizontal text alignment toolbar":"Matnni gorizontal tekislash asboblar paneli",Huge:"Juda katta","Image resize list":"Hajmlar ro'yxati","Image toolbar":"Rasm asboblari paneli","image widget":"Tasvirlar vidjeti","In line":"","Increase indent":"chekinishni oshirish",Insert:"Kiritish","Insert column left":"Ustunni chapga kiritish","Insert column right":"Ustunni o'ngga kiritish","Insert image":"Rasm kiritish","Insert image via URL":"Rasmni URL orqali kiritish","Insert paragraph after block":"Вblokdan keyin paragraf qo'yish","Insert paragraph before block":"Blokdan oldin paragrafni kiritish","Insert row above":"Yuqoriga qatorni kiritish","Insert row below":"Pastga qatorni kiritish","Insert table":"Jadvalni kiritish",Inset:"Tushkunlikka tushgan",Italic:"Kursiv",Justify:"Kengligi bo'yicha tekislash","Justify cell text":"Matnni kenglikka tekislash","Left aligned image":"Chapga tekislash","Light blue":"Moviy","Light green":"Och yashil","Light grey":"Och kulrang",Link:"Havola","Link image":"Rasmga havola","Link URL":'"Havola URL',"List properties":"","Lower-latin":"Kichik lotincha","Lower–roman":"Kichik rim","Merge cell down":"Pastdagi katak bilan birlashtirish","Merge cell left":"Chapdagi katakcha bilan birlashtirish","Merge cell right":"O'ngdagi katakcha bilan birlashtirish","Merge cell up":"Yuqoridagi katak bilan birlashtirish","Merge cells":"Hujayralarni birlashtirish",Next:"Keyingi","No results found":"","No searchable items":"",None:"Yo'q","Numbered List":"Raqamlangan ro'yxat","Numbered list styles toolbar":"Raqamlangan ro'yxat uslublari","Open in a new tab":"Yangi oynada oching","Open link in new tab":"Havolani yangi oynada ochish",Orange:"To'q sariq",Original:"Asl",Outset:"Qavariq",Padding:"Chekinish",Paragraph:"Paragraf","Press Enter to type after or press Shift + Enter to type before the widget":"",Previous:"Oldingi",Purple:"Siyohrang",Red:"Qizil",Redo:"Takrorlash","Remove color":"Rangni olib tashlash","Remove Format":"Formatlashni olib tashlash","Replace from computer":"","Replace image":"","Replace image from computer":"","Resize image":"Rasm hajmini o'zgartirish","Resize image to %0":"Rasm hajmini %0 ga o‘zgartirish","Resize image to the original size":"Rasmning o'lchamini asl o'lchamiga o'zgartiring","Restore default":"","Reversed order":"","Rich Text Editor":"Tahrirlovchi",Ridge:"Qirrali","Right aligned image":"O'ngga tekislash",Row:"Satr",Save:"Saqlash","Select all":"Hammasini tanlash","Select column":"Ustunni tanlash","Select row":"Satrni tanlang","Show more items":"","Side image":"Yon tasvir",Small:"Kichik",Solid:"Qattiq","Split cell horizontally":"Hujayrani gorizontal ravishda ajratish","Split cell vertically":"Hujayrani vertikal ravishda ajratish",Square:"Kvadrat","Start at":"","Start index must be greater than 0.":"",Strikethrough:"Chizilgan",Style:"Uslub",Subscript:"Pastki yozuv",Superscript:"Yuqori yozuv","Table alignment toolbar":"Jadvalni tekislash asboblar paneli","Table cell text alignment":"Jadval katakchasidagi matnni tekislash","Table properties":"Jadvalning xususiyatlari","Table toolbar":"Jadval asboblar paneli","Text alignment":"Matnni tekislash","Text alignment toolbar":"Tekislash","Text alternative":"Muqobil matn",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Noto\'g\'ri rang. \\ "# FF0000 \\" yoki \\ "rgb (255,0,0) \\" yoki \\ "red \\" ni sinab ko\'ring.','The value is invalid. Try "10px" or "2em" or simply "2".':'Noto\'g\'ri qiymat. \\ "10px \\" yoki \\ "2em \\" yoki shunchaki \\ "2 \\" ni sinab ko\'ring.',"This link has no URL":"Bu havola uchun URL oʻrnatilmagan",Tiny:"Juda kichik","To-do List":"","Toggle caption off":"","Toggle caption on":"","Toggle the circle list style":"","Toggle the decimal list style":"","Toggle the decimal with leading zero list style":"","Toggle the disc list style":"","Toggle the lower–latin list style":"","Toggle the lower–roman list style":"","Toggle the square list style":"","Toggle the upper–latin list style":"","Toggle the upper–roman list style":"",Turquoise:"Turkuaz","Type or paste your content here.":"Matningizni shu yerga kiriting yoki joylashtiring","Type your title":"Sarlavhani kiriting",Underline:"Tagi chizilgan",Undo:"Bekor qilish",Unlink:"Havolani olib tashlash",Update:"O'zgartirish","Update image URL":"Rasm URL manzilini o'zgartirish","Upload failed":"Yuklab olinmadi","Upload from computer":"","Upload image from computer":"","Upload in progress":"Yuklanmoqda","Upper-latin":"Katta lotincha","Upper-roman":"Katta rim","Vertical text alignment toolbar":"Vertikal matnni tekislash asboblar paneli",White:"Oq","Widget toolbar":"Vidjet asboblar paneli",Width:"Kengligi","Wrap text":"",Yellow:"Sariq"}),i.getPluralForm=function(a){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/vi.js b/public/static/plugs/ckeditor5/translations/vi.js
index bf6787891..d5c4646e9 100644
--- a/public/static/plugs/ckeditor5/translations/vi.js
+++ b/public/static/plugs/ckeditor5/translations/vi.js
@@ -1 +1 @@
-!function(n){const t=n.vi=n.vi||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 đến %1",Accept:"Chấp nhận","Align cell text to the bottom":"Căn chỉnh văn bản trong ô xuống dưới cùng","Align cell text to the center":"Căn chỉnh văn bản trong ô vào chính giữa","Align cell text to the left":"Căn chỉnh văn bản trong ô về bên trái","Align cell text to the middle":"Căn chỉnh văn bản trong ô vào giữa","Align cell text to the right":"Căn chỉnh văn bản trong ô về bên phải","Align cell text to the top":"Căn chỉnh văn bản trong ô lên trên cùng","Align center":"Canh giữa","Align left":"Canh trái","Align right":"Canh phải","Align table to the left":"Căn chỉnh bảng về phía bên trái","Align table to the right":"Căn chỉnh bảng về phía bên phải",Alignment:"Căn lề",Aquamarine:"Xanh ngọc biển",Background:"Màu nền",Big:"Lớn",Black:"Đen","Block quote":"Trích dẫn",Blue:"Xanh biển",Bold:"Đậm",Border:"Viền","Break text":"Ngắt văn bản","Bulleted List":"Danh sách đánh ký hiệu","Bulleted list styles toolbar":"Thanh công cụ kiểu danh sách có dấu đầu dòng",Cancel:"Hủy","Caption for image: %0":"Chú thích cho hình ảnh: %0","Caption for the image":"Chú thích cho hình ảnh","Cell properties":"Thuộc tính của ô","Center table":"Căn chỉnh bảng vào chính giữa","Centered image":"Ảnh canh giữa","Change image text alternative":"Đổi chữ alt của ảnh","Choose heading":"Chọn tiêu đề",Circle:"Tròn",Clear:"Xóa","Click to edit block":"Nhấp để sửa khối",Code:"Code",Color:"Màu","Color picker":"Bộ chọn màu",Column:"Cột",Dashed:"Dạng đường đứt nét",Decimal:"Thập phân","Decimal with leading zero":"Thập phân bắt đầu bằng số 0","Decrease indent":"Giảm lề",Default:"Mặc định","Delete column":"Xoá cột","Delete row":"Xoá hàng","Dim grey":"Xám mờ",Dimensions:"Kích thước",Disc:"Đĩa","Document colors":"Màu văn bản",Dotted:"Dạng chấm",Double:"Dạng nét đôi",Downloadable:"Có thể tải về","Drag to move":"Kéo để di chuyển","Dropdown toolbar":"Thanh công cụ danh mục","Edit block":"Chỉnh sửa đoạn","Edit link":"Sửa liên kết","Editor block content toolbar":"Thanh công cụ chỉnh sửa khối nội dung","Editor contextual toolbar":"Thanh công cụ chỉnh sửa theo ngữ cảnh","Editor editing area: %0":"Vùng chỉnh sửa của trình chỉnh sửa: %0","Editor toolbar":"Thanh công cụ biên tập","Enter image caption":"Nhập mô tả ảnh","Enter table caption":"Nhập chú thích cho bảng","Font Background Color":"Màu nền chữ","Font Color":"Màu chữ","Font Family":"Họ chữ","Font Size":"Cỡ chữ","Full size image":"Ảnh đầy đủ",Green:"Xanh lá",Grey:"Xám",Groove:"Dạng đường rãnh","Header column":"Tiêu đề cột","Header row":"Tiêu đề hàng",Heading:"Tiêu đề","Heading 1":"Tiêu đề 1","Heading 2":"Tiêu đề 2","Heading 3":"Tiêu đề 3","Heading 4":"Tiêu đề 4","Heading 5":"Tiêu đề 5","Heading 6":"Tiêu đề 6",Height:"Cao",HEX:"HEX","Horizontal line":"Đường ngang","Horizontal text alignment toolbar":"Thanh công cụ căn chỉnh văn bản theo chiều ngang","HTML object":"Đối tượng HTML",Huge:"Khổng lồ","Image resize list":"Danh sách ảnh đã chỉnh kích thước","Image toolbar":"Thanh công cụ hình ảnh","image widget":"tiện ích ảnh","In line":"Nội dòng","Increase indent":"Tăng lề",Insert:"Chèn","Insert column left":"Thêm cột vào bên trái","Insert column right":"Thêm cột vào bên phải","Insert image":"Chèn ảnh","Insert image via URL":"Chèn ảnh từ URL","Insert paragraph after block":"Chèn đoạn sau khối","Insert paragraph before block":"Chèn đoạn trước khối","Insert row above":"Thêm hàng phía trên","Insert row below":"Thêm hàng ở dưới","Insert table":"Tạo bảng",Inset:"Dạng chìm",Italic:"Nghiêng",Justify:"Canh đều","Justify cell text":"Căn đều văn bản trong ô","Left aligned image":"Ảnh canh trái","Light blue":"Xanh dương","Light green":"Xanh lá nhạt","Light grey":"Xám nhạt",Link:"Chèn liên kết","Link image":"Liên kết của ảnh","Link URL":"Đường dẫn liên kết","List properties":"Thuộc tính danh sách","Lower-latin":"Chữ cái Latinh viết thường","Lower–roman":"Chữ số La Mã viết thường","Merge cell down":"Sát nhập ô xuống dưới","Merge cell left":"Sát nhập ô qua trái","Merge cell right":"Sát nhập ô qua phải","Merge cell up":"Sát nhập ô lên trên","Merge cells":"Sát nhập ô",Next:"Tiếp theo","No results found":"Không tìm thấy kết quả","No searchable items":"Không có mục nào tìm kiếm được",None:"Không có kiểu nào","Numbered List":"Danh sách đánh số","Numbered list styles toolbar":"Thanh công cụ kiểu danh sách được đánh số","Open in a new tab":"Mở trên tab mới","Open link in new tab":"Mở liên kết",Orange:"Cam",Original:"Nguyên bản",Outset:"Dạng nổi",Padding:"Cách lề",Paragraph:"Đoạn văn","Press Enter to type after or press Shift + Enter to type before the widget":"Nhấn Enter để nhập vào sau hoặc nhấn Shift + Enter để nhập vào trước tiện ích",Previous:"Quay lại",Purple:"Tím",Red:"Đỏ",Redo:"Tiếp tục","Remove color":"Xóa màu","Remove Format":"Xóa định dang","Replace from computer":"Thay thế từ máy tính","Replace image":"Thay thế hình ảnh","Replace image from computer":"Thay thế hình ảnh từ máy tính","Resize image":"Chỉnh kích cỡ ảnh","Resize image to %0":"Chỉnh kích cỡ ảnh về %0","Resize image to the original size":"Chỉnh về ảnh kích cỡ nguyên gốc","Restore default":"Khôi phục giá trị mặc định","Reversed order":"Thứ tự đảo ngược","Rich Text Editor":"Trình soạn thảo văn bản",Ridge:"Dạng gờ","Right aligned image":"Ảnh canh phải",Row:"Hàng",Save:"Lưu","Select all":"Chọn tất cả","Select column":"Chọn cột","Select row":"Chọn hàng","Show more items":"Xem thêm","Side image":"Ảnh một bên",Small:"Nhỏ",Solid:"Dạng nét liền","Split cell horizontally":"Tách ô theo chiều ngang","Split cell vertically":"Tách ô theo chiều dọc",Square:"Vuông","Start at":"Bắt đầu tại","Start index must be greater than 0.":"Chỉ mục bắt đầu phải lớn hơn 0.",Strikethrough:"Gạch ngang",Style:"Kiểu",Subscript:"Chữ nhỏ dưới",Superscript:"Chữ nhỏ trên","Table alignment toolbar":"Thanh công cụ căn chỉnh bảng","Table cell text alignment":"Căn lề văn bản trong ô","Table properties":"Thuộc tính của bảng","Table toolbar":"Thanh công cụ bảng","Text alignment":"Căn chỉnh văn bản","Text alignment toolbar":"Thanh công cụ canh chữ","Text alternative":"Chữ alt",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Màu này không hợp lệ. Hãy thử "#FF0000" hoặc "rgb(255,0,0)" hoặc "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Giá trị này không hợp lệ. Hãy thử "10px" hoặc "2em" hoặc chỉ "2".',"This link has no URL":"Liên kết không có đường dẫn",Tiny:"Bé","To-do List":"Danh sách cần làm","Toggle caption off":"Ẩn chú thích","Toggle caption on":"Hiện chú thích","Toggle the circle list style":"Bật/tắt kiểu danh sách dạng vòng tròn","Toggle the decimal list style":"Bật/tắt kiểu danh sách dạng thập phân","Toggle the decimal with leading zero list style":"Bật/tắt kiểu danh sách dạng thập phân bắt đầu bằng số 0","Toggle the disc list style":"Bật/tắt kiểu danh sách dạng đĩa","Toggle the lower–latin list style":"Bật/tắt kiểu danh sách chữ cái Latinh viết thường","Toggle the lower–roman list style":"Bật/tắt kiểu danh sách chữ số La Mã viết thường","Toggle the square list style":"Bật/tắt kiểu danh sách dạng vuông","Toggle the upper–latin list style":"Bật/tắt kiểu danh sách chữ cái Latinh viết hoa","Toggle the upper–roman list style":"Bật/tắt kiểu danh sách chữ số La Mã viết hoa",Turquoise:"Xanh ngọc bích","Type or paste your content here.":"Nhập hoặc dán nội dung tại đây","Type your title":"Nhập tựa đề",Underline:"Gạch dưới",Undo:"Hoàn tác",Unlink:"Bỏ liên kết",Update:"Cập nhật","Update image URL":"Cập nhật ảnh từ URL","Upload failed":"Tải thất bại","Upload from computer":"Tải lên từ máy tính","Upload image from computer":"Tải hình ảnh lên từ máy tính","Upload in progress":"Đang tải lên","Upper-latin":"Chữ cái Latinh viết hoa","Upper-roman":"Chữ số La Mã viết hoa","Vertical text alignment toolbar":"Thanh công cụ căn chỉnh văn bản theo chiều dọc",White:"Trắng","Widget toolbar":"Thanh công cụ tiện ích",Width:"Rộng","Wrap text":"Bọc văn bản",Yellow:"Vàng"}),t.getPluralForm=function(n){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(n){const t=n.vi=n.vi||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 đến %1",Accept:"Chấp nhận","Align cell text to the bottom":"Căn chỉnh văn bản trong ô xuống dưới cùng","Align cell text to the center":"Căn chỉnh văn bản trong ô vào chính giữa","Align cell text to the left":"Căn chỉnh văn bản trong ô về bên trái","Align cell text to the middle":"Căn chỉnh văn bản trong ô vào giữa","Align cell text to the right":"Căn chỉnh văn bản trong ô về bên phải","Align cell text to the top":"Căn chỉnh văn bản trong ô lên trên cùng","Align center":"Canh giữa","Align left":"Canh trái","Align right":"Canh phải","Align table to the left":"Căn chỉnh bảng về phía bên trái","Align table to the right":"Căn chỉnh bảng về phía bên phải",Alignment:"Căn lề",Aquamarine:"Xanh ngọc biển",Background:"Màu nền",Big:"Lớn",Black:"Đen","Block quote":"Trích dẫn",Blue:"Xanh biển",Bold:"Đậm",Border:"Viền","Break text":"Ngắt văn bản","Bulleted List":"Danh sách đánh ký hiệu","Bulleted list styles toolbar":"Thanh công cụ kiểu danh sách có dấu đầu dòng",Cancel:"Hủy","Caption for image: %0":"Chú thích cho hình ảnh: %0","Caption for the image":"Chú thích cho hình ảnh","Cell properties":"Thuộc tính của ô","Center table":"Căn chỉnh bảng vào chính giữa","Centered image":"Ảnh canh giữa","Change image text alternative":"Đổi chữ alt của ảnh","Choose heading":"Chọn tiêu đề",Circle:"Tròn",Clear:"Xóa","Click to edit block":"Nhấp để sửa khối",Close:"Đóng",Code:"Code",Color:"Màu","Color picker":"Bộ chọn màu",Column:"Cột",Dashed:"Dạng đường đứt nét",Decimal:"Thập phân","Decimal with leading zero":"Thập phân bắt đầu bằng số 0","Decrease indent":"Giảm lề",Default:"Mặc định","Delete column":"Xoá cột","Delete row":"Xoá hàng","Dim grey":"Xám mờ",Dimensions:"Kích thước",Disc:"Đĩa","Document colors":"Màu văn bản",Dotted:"Dạng chấm",Double:"Dạng nét đôi",Downloadable:"Có thể tải về","Drag to move":"Kéo để di chuyển","Dropdown toolbar":"Thanh công cụ danh mục","Edit block":"Chỉnh sửa đoạn","Edit link":"Sửa liên kết","Editor block content toolbar":"Thanh công cụ chỉnh sửa khối nội dung","Editor contextual toolbar":"Thanh công cụ chỉnh sửa theo ngữ cảnh","Editor dialog":"Hộp thoại trình biên tập","Editor editing area: %0":"Vùng chỉnh sửa của trình chỉnh sửa: %0","Editor toolbar":"Thanh công cụ biên tập","Enter image caption":"Nhập mô tả ảnh","Enter table caption":"Nhập chú thích cho bảng","Font Background Color":"Màu nền chữ","Font Color":"Màu chữ","Font Family":"Họ chữ","Font Size":"Cỡ chữ","Full size image":"Ảnh đầy đủ",Green:"Xanh lá",Grey:"Xám",Groove:"Dạng đường rãnh","Header column":"Tiêu đề cột","Header row":"Tiêu đề hàng",Heading:"Tiêu đề","Heading 1":"Tiêu đề 1","Heading 2":"Tiêu đề 2","Heading 3":"Tiêu đề 3","Heading 4":"Tiêu đề 4","Heading 5":"Tiêu đề 5","Heading 6":"Tiêu đề 6",Height:"Cao",HEX:"HEX","Horizontal line":"Đường ngang","Horizontal text alignment toolbar":"Thanh công cụ căn chỉnh văn bản theo chiều ngang","HTML object":"Đối tượng HTML",Huge:"Khổng lồ","Image resize list":"Danh sách ảnh đã chỉnh kích thước","Image toolbar":"Thanh công cụ hình ảnh","image widget":"tiện ích ảnh","In line":"Nội dòng","Increase indent":"Tăng lề",Insert:"Chèn","Insert column left":"Thêm cột vào bên trái","Insert column right":"Thêm cột vào bên phải","Insert image":"Chèn ảnh","Insert image via URL":"Chèn ảnh từ URL","Insert paragraph after block":"Chèn đoạn sau khối","Insert paragraph before block":"Chèn đoạn trước khối","Insert row above":"Thêm hàng phía trên","Insert row below":"Thêm hàng ở dưới","Insert table":"Tạo bảng",Inset:"Dạng chìm",Italic:"Nghiêng",Justify:"Canh đều","Justify cell text":"Căn đều văn bản trong ô","Left aligned image":"Ảnh canh trái","Light blue":"Xanh dương","Light green":"Xanh lá nhạt","Light grey":"Xám nhạt",Link:"Chèn liên kết","Link image":"Liên kết của ảnh","Link URL":"Đường dẫn liên kết","List properties":"Thuộc tính danh sách","Lower-latin":"Chữ cái Latinh viết thường","Lower–roman":"Chữ số La Mã viết thường","Merge cell down":"Sát nhập ô xuống dưới","Merge cell left":"Sát nhập ô qua trái","Merge cell right":"Sát nhập ô qua phải","Merge cell up":"Sát nhập ô lên trên","Merge cells":"Sát nhập ô",Next:"Tiếp theo","No results found":"Không tìm thấy kết quả","No searchable items":"Không có mục nào tìm kiếm được",None:"Không có kiểu nào","Numbered List":"Danh sách đánh số","Numbered list styles toolbar":"Thanh công cụ kiểu danh sách được đánh số","Open in a new tab":"Mở trên tab mới","Open link in new tab":"Mở liên kết",Orange:"Cam",Original:"Nguyên bản",Outset:"Dạng nổi",Padding:"Cách lề",Paragraph:"Đoạn văn","Press Enter to type after or press Shift + Enter to type before the widget":"Nhấn Enter để nhập vào sau hoặc nhấn Shift + Enter để nhập vào trước tiện ích",Previous:"Quay lại",Purple:"Tím",Red:"Đỏ",Redo:"Tiếp tục","Remove color":"Xóa màu","Remove Format":"Xóa định dang","Replace from computer":"Thay thế từ máy tính","Replace image":"Thay thế hình ảnh","Replace image from computer":"Thay thế hình ảnh từ máy tính","Resize image":"Chỉnh kích cỡ ảnh","Resize image to %0":"Chỉnh kích cỡ ảnh về %0","Resize image to the original size":"Chỉnh về ảnh kích cỡ nguyên gốc","Restore default":"Khôi phục giá trị mặc định","Reversed order":"Thứ tự đảo ngược","Rich Text Editor":"Trình soạn thảo văn bản",Ridge:"Dạng gờ","Right aligned image":"Ảnh canh phải",Row:"Hàng",Save:"Lưu","Select all":"Chọn tất cả","Select column":"Chọn cột","Select row":"Chọn hàng","Show more items":"Xem thêm","Side image":"Ảnh một bên",Small:"Nhỏ",Solid:"Dạng nét liền","Split cell horizontally":"Tách ô theo chiều ngang","Split cell vertically":"Tách ô theo chiều dọc",Square:"Vuông","Start at":"Bắt đầu tại","Start index must be greater than 0.":"Chỉ mục bắt đầu phải lớn hơn 0.",Strikethrough:"Gạch ngang",Style:"Kiểu",Subscript:"Chữ nhỏ dưới",Superscript:"Chữ nhỏ trên","Table alignment toolbar":"Thanh công cụ căn chỉnh bảng","Table cell text alignment":"Căn lề văn bản trong ô","Table properties":"Thuộc tính của bảng","Table toolbar":"Thanh công cụ bảng","Text alignment":"Căn chỉnh văn bản","Text alignment toolbar":"Thanh công cụ canh chữ","Text alternative":"Chữ alt",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Màu này không hợp lệ. Hãy thử "#FF0000" hoặc "rgb(255,0,0)" hoặc "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'Giá trị này không hợp lệ. Hãy thử "10px" hoặc "2em" hoặc chỉ "2".',"This link has no URL":"Liên kết không có đường dẫn",Tiny:"Bé","To-do List":"Danh sách cần làm","Toggle caption off":"Ẩn chú thích","Toggle caption on":"Hiện chú thích","Toggle the circle list style":"Bật/tắt kiểu danh sách dạng vòng tròn","Toggle the decimal list style":"Bật/tắt kiểu danh sách dạng thập phân","Toggle the decimal with leading zero list style":"Bật/tắt kiểu danh sách dạng thập phân bắt đầu bằng số 0","Toggle the disc list style":"Bật/tắt kiểu danh sách dạng đĩa","Toggle the lower–latin list style":"Bật/tắt kiểu danh sách chữ cái Latinh viết thường","Toggle the lower–roman list style":"Bật/tắt kiểu danh sách chữ số La Mã viết thường","Toggle the square list style":"Bật/tắt kiểu danh sách dạng vuông","Toggle the upper–latin list style":"Bật/tắt kiểu danh sách chữ cái Latinh viết hoa","Toggle the upper–roman list style":"Bật/tắt kiểu danh sách chữ số La Mã viết hoa",Turquoise:"Xanh ngọc bích","Type or paste your content here.":"Nhập hoặc dán nội dung tại đây","Type your title":"Nhập tựa đề",Underline:"Gạch dưới",Undo:"Hoàn tác",Unlink:"Bỏ liên kết",Update:"Cập nhật","Update image URL":"Cập nhật ảnh từ URL","Upload failed":"Tải thất bại","Upload from computer":"Tải lên từ máy tính","Upload image from computer":"Tải hình ảnh lên từ máy tính","Upload in progress":"Đang tải lên","Upper-latin":"Chữ cái Latinh viết hoa","Upper-roman":"Chữ số La Mã viết hoa","Vertical text alignment toolbar":"Thanh công cụ căn chỉnh văn bản theo chiều dọc",White:"Trắng","Widget toolbar":"Thanh công cụ tiện ích",Width:"Rộng","Wrap text":"Bọc văn bản",Yellow:"Vàng"}),t.getPluralForm=function(n){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/ckeditor5/translations/zh.js b/public/static/plugs/ckeditor5/translations/zh.js
index d1b054478..a0e35c70e 100644
--- a/public/static/plugs/ckeditor5/translations/zh.js
+++ b/public/static/plugs/ckeditor5/translations/zh.js
@@ -1 +1 @@
-!function(e){const t=e.zh=e.zh||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0/%1",Accept:"接受","Align cell text to the bottom":"向下對齊","Align cell text to the center":"置中對齊","Align cell text to the left":"靠左對齊","Align cell text to the middle":"置中對齊","Align cell text to the right":"靠右對齊","Align cell text to the top":"向上對齊","Align center":"置中對齊","Align left":"靠左對齊","Align right":"靠右對齊","Align table to the left":"靠左對齊","Align table to the right":"靠右對齊",Alignment:"對齊",Aquamarine:"淺綠色",Background:"背景顏色",Big:"大",Black:"黑色","Block quote":"段落引用",Blue:"藍色",Bold:"粗體",Border:"邊框","Break text":"上及下","Bulleted List":"符號清單","Bulleted list styles toolbar":"無序清單工具列",Cancel:"取消","Caption for image: %0":"影像標題:%0","Caption for the image":"影像的標題","Cell properties":"儲存格屬性","Center table":"置中對齊","Centered image":"置中圖片","Change image text alternative":"修改圖片的替代文字","Choose heading":"選取標題",Circle:"空心圓點",Clear:"清除","Click to edit block":"點擊來編輯區塊",Code:"代碼",Color:"文字顏色","Color picker":"顏色選擇",Column:"欄",Dashed:"虛線",Decimal:"數字","Decimal with leading zero":"0開頭的數字","Decrease indent":"減少縮排",Default:"預設","Delete column":"刪除欄","Delete row":"刪除列","Dim grey":"淡灰色",Dimensions:"尺寸",Disc:"實心圓點","Document colors":"文件顏色",Dotted:"點線",Double:"雙線",Downloadable:"可下載","Drag to move":"拖曳來移動","Dropdown toolbar":"下拉選單","Edit block":"編輯區塊","Edit link":"編輯連結","Editor block content toolbar":"編輯器區塊內容工具列","Editor contextual toolbar":"編輯器關聯式工具列","Editor editing area: %0":"編輯器編輯區:%0","Editor toolbar":"編輯器工具","Enter image caption":"輸入圖片說明","Enter table caption":"輸入表標題","Font Background Color":"前景顏色","Font Color":"字體顏色","Font Family":"字型","Font Size":"字體大小","Full size image":"完整尺寸圖片",Green:"綠色",Grey:"灰色",Groove:"內凹線","Header column":"標題欄","Header row":"標題列",Heading:"標題","Heading 1":"標題 1","Heading 2":"標題 2","Heading 3":"標題 3","Heading 4":"標題 4","Heading 5":"標題 5","Heading 6":"標題 6",Height:"高度",HEX:"十六進位","Horizontal line":"水平線","Horizontal text alignment toolbar":"水平對齊","HTML object":"HTML 物件",Huge:"特大","Image resize list":"圖片縮放清單","Image toolbar":"圖片工具","image widget":"圖片小工具","In line":"行中","Increase indent":"增加縮排",Insert:"插入","Insert column left":"插入左方欄","Insert column right":"插入右方欄","Insert image":"插入圖片","Insert image via URL":"使用連結插入圖片","Insert paragraph after block":"在這個區塊後面插入一個段落","Insert paragraph before block":"在這個區塊前面插入一個段落","Insert row above":"插入上方列","Insert row below":"插入下方列","Insert table":"插入表格",Inset:"內邊線",Italic:"斜體",Justify:"左右對齊","Justify cell text":"分散對齊","Left aligned image":"向左對齊圖片","Light blue":"亮藍色","Light green":"亮綠色","Light grey":"亮灰色",Link:"連結","Link image":"圖片連結","Link URL":"連結˙ URL","List properties":"清單屬性","Lower-latin":"小寫拉丁字母","Lower–roman":"小寫羅馬數字","Merge cell down":"合併下方儲存格","Merge cell left":"合併左方儲存格","Merge cell right":"合併右方儲存格","Merge cell up":"合併上方儲存格","Merge cells":"合併儲存格",Next:"下一","No results found":"找不到結果","No searchable items":"沒有可搜尋的項目",None:"無","Numbered List":"有序清單","Numbered list styles toolbar":"有序清單工具列","Open in a new tab":"在新視窗開啟","Open link in new tab":"在新視窗開啟連結",Orange:"橘色",Original:"原始圖片",Outset:"外框線",Padding:"儲存格留白",Paragraph:"段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下 Enter 在小工具後輸入,或按下 Shift + Enter 在小工具前輸入",Previous:"上一",Purple:"紫色",Red:"紅色",Redo:"重做","Remove color":"移除顏色","Remove Format":"移除格式","Replace from computer":"從電腦替換","Replace image":"替換圖片","Replace image from computer":"從電腦替換圖片","Resize image":"縮放圖片","Resize image to %0":"縮放圖片到 %0","Resize image to the original size":"縮放圖片到原始尺寸","Restore default":"重設至預設值","Reversed order":"反轉順序","Rich Text Editor":"富文本編輯器",Ridge:"凸起線","Right aligned image":"向右對齊圖片",Row:"列",Save:"儲存","Select all":"選取全部","Select column":"選擇欄","Select row":"選擇列","Show more items":"顯示更多","Side image":"側邊圖片",Small:"小",Solid:"實線","Split cell horizontally":"水平分割儲存格","Split cell vertically":"垂直分割儲存格",Square:"方形","Start at":"起始於","Start index must be greater than 0.":"起始索引須大於 0。",Strikethrough:"刪除線",Style:"樣式",Subscript:"下標",Superscript:"上標","Table alignment toolbar":"表格對齊","Table cell text alignment":"儲存格文字對齊","Table properties":"表格屬性","Table toolbar":"表格工具","Text alignment":"文字對齊","Text alignment toolbar":"文字對齊","Text alternative":"替代文字",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'顏色代碼錯誤。試試看 "#FF0000" 或 "rgb(255, 0, 0)" 或 "red"。','The value is invalid. Try "10px" or "2em" or simply "2".':'尺寸代碼錯誤。試試看 "10px" 或 "2em" 或簡單寫 "2"。',"This link has no URL":"此連結沒有URL",Tiny:"特小","To-do List":"代辦清單","Toggle caption off":"關閉表標題","Toggle caption on":"開啟表標題","Toggle the circle list style":"切換為空心圓點標示","Toggle the decimal list style":"切換為數字標示","Toggle the decimal with leading zero list style":"切換為0開頭的數字標示","Toggle the disc list style":"切換為實心圓點標示","Toggle the lower–latin list style":"切換為小寫拉丁文字標示","Toggle the lower–roman list style":"切換為小寫羅馬數字標示","Toggle the square list style":"切換為方形標示","Toggle the upper–latin list style":"切換為大寫拉丁文字標示","Toggle the upper–roman list style":"切換為大寫羅馬數字標示",Turquoise:"藍綠色","Type or paste your content here.":"在此輸入或貼上你的內容。","Type your title":"輸入你的標題",Underline:"底線",Undo:"取消",Unlink:"移除連結",Update:"更新","Update image URL":"更新圖片連結","Upload failed":"上傳失敗","Upload from computer":"從電腦上傳","Upload image from computer":"從電腦上傳圖片","Upload in progress":"正在上傳","Upper-latin":"大寫拉丁字母","Upper-roman":"大寫羅馬數字","Vertical text alignment toolbar":"垂直對齊",White:"白色","Widget toolbar":"小工具",Width:"寬度","Wrap text":"文繞圖",Yellow:"黃色"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
+!function(e){const t=e.zh=e.zh||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0/%1",Accept:"接受","Align cell text to the bottom":"向下對齊","Align cell text to the center":"置中對齊","Align cell text to the left":"靠左對齊","Align cell text to the middle":"置中對齊","Align cell text to the right":"靠右對齊","Align cell text to the top":"向上對齊","Align center":"置中對齊","Align left":"靠左對齊","Align right":"靠右對齊","Align table to the left":"靠左對齊","Align table to the right":"靠右對齊",Alignment:"對齊",Aquamarine:"淺綠色",Background:"背景顏色",Big:"大",Black:"黑色","Block quote":"段落引用",Blue:"藍色",Bold:"粗體",Border:"邊框","Break text":"上及下","Bulleted List":"符號清單","Bulleted list styles toolbar":"無序清單工具列",Cancel:"取消","Caption for image: %0":"影像標題:%0","Caption for the image":"影像的標題","Cell properties":"儲存格屬性","Center table":"置中對齊","Centered image":"置中圖片","Change image text alternative":"修改圖片的替代文字","Choose heading":"選取標題",Circle:"空心圓點",Clear:"清除","Click to edit block":"點擊來編輯區塊",Close:"關閉",Code:"代碼",Color:"文字顏色","Color picker":"顏色選擇",Column:"欄",Dashed:"虛線",Decimal:"數字","Decimal with leading zero":"0開頭的數字","Decrease indent":"減少縮排",Default:"預設","Delete column":"刪除欄","Delete row":"刪除列","Dim grey":"淡灰色",Dimensions:"尺寸",Disc:"實心圓點","Document colors":"文件顏色",Dotted:"點線",Double:"雙線",Downloadable:"可下載","Drag to move":"拖曳來移動","Dropdown toolbar":"下拉選單","Edit block":"編輯區塊","Edit link":"編輯連結","Editor block content toolbar":"編輯器區塊內容工具列","Editor contextual toolbar":"編輯器關聯式工具列","Editor dialog":"編輯工具對話框","Editor editing area: %0":"編輯器編輯區:%0","Editor toolbar":"編輯器工具","Enter image caption":"輸入圖片說明","Enter table caption":"輸入表標題","Font Background Color":"前景顏色","Font Color":"字體顏色","Font Family":"字型","Font Size":"字體大小","Full size image":"完整尺寸圖片",Green:"綠色",Grey:"灰色",Groove:"內凹線","Header column":"標題欄","Header row":"標題列",Heading:"標題","Heading 1":"標題 1","Heading 2":"標題 2","Heading 3":"標題 3","Heading 4":"標題 4","Heading 5":"標題 5","Heading 6":"標題 6",Height:"高度",HEX:"十六進位","Horizontal line":"水平線","Horizontal text alignment toolbar":"水平對齊","HTML object":"HTML 物件",Huge:"特大","Image resize list":"圖片縮放清單","Image toolbar":"圖片工具","image widget":"圖片小工具","In line":"行中","Increase indent":"增加縮排",Insert:"插入","Insert column left":"插入左方欄","Insert column right":"插入右方欄","Insert image":"插入圖片","Insert image via URL":"使用連結插入圖片","Insert paragraph after block":"在這個區塊後面插入一個段落","Insert paragraph before block":"在這個區塊前面插入一個段落","Insert row above":"插入上方列","Insert row below":"插入下方列","Insert table":"插入表格",Inset:"內邊線",Italic:"斜體",Justify:"左右對齊","Justify cell text":"分散對齊","Left aligned image":"向左對齊圖片","Light blue":"亮藍色","Light green":"亮綠色","Light grey":"亮灰色",Link:"連結","Link image":"圖片連結","Link URL":"連結˙ URL","List properties":"清單屬性","Lower-latin":"小寫拉丁字母","Lower–roman":"小寫羅馬數字","Merge cell down":"合併下方儲存格","Merge cell left":"合併左方儲存格","Merge cell right":"合併右方儲存格","Merge cell up":"合併上方儲存格","Merge cells":"合併儲存格",Next:"下一","No results found":"找不到結果","No searchable items":"沒有可搜尋的項目",None:"無","Numbered List":"有序清單","Numbered list styles toolbar":"有序清單工具列","Open in a new tab":"在新視窗開啟","Open link in new tab":"在新視窗開啟連結",Orange:"橘色",Original:"原始圖片",Outset:"外框線",Padding:"儲存格留白",Paragraph:"段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下 Enter 在小工具後輸入,或按下 Shift + Enter 在小工具前輸入",Previous:"上一",Purple:"紫色",Red:"紅色",Redo:"重做","Remove color":"移除顏色","Remove Format":"移除格式","Replace from computer":"從電腦替換","Replace image":"替換圖片","Replace image from computer":"從電腦替換圖片","Resize image":"縮放圖片","Resize image to %0":"縮放圖片到 %0","Resize image to the original size":"縮放圖片到原始尺寸","Restore default":"重設至預設值","Reversed order":"反轉順序","Rich Text Editor":"富文本編輯器",Ridge:"凸起線","Right aligned image":"向右對齊圖片",Row:"列",Save:"儲存","Select all":"選取全部","Select column":"選擇欄","Select row":"選擇列","Show more items":"顯示更多","Side image":"側邊圖片",Small:"小",Solid:"實線","Split cell horizontally":"水平分割儲存格","Split cell vertically":"垂直分割儲存格",Square:"方形","Start at":"起始於","Start index must be greater than 0.":"起始索引須大於 0。",Strikethrough:"刪除線",Style:"樣式",Subscript:"下標",Superscript:"上標","Table alignment toolbar":"表格對齊","Table cell text alignment":"儲存格文字對齊","Table properties":"表格屬性","Table toolbar":"表格工具","Text alignment":"文字對齊","Text alignment toolbar":"文字對齊","Text alternative":"替代文字",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'顏色代碼錯誤。試試看 "#FF0000" 或 "rgb(255, 0, 0)" 或 "red"。','The value is invalid. Try "10px" or "2em" or simply "2".':'尺寸代碼錯誤。試試看 "10px" 或 "2em" 或簡單寫 "2"。',"This link has no URL":"此連結沒有URL",Tiny:"特小","To-do List":"代辦清單","Toggle caption off":"關閉表標題","Toggle caption on":"開啟表標題","Toggle the circle list style":"切換為空心圓點標示","Toggle the decimal list style":"切換為數字標示","Toggle the decimal with leading zero list style":"切換為0開頭的數字標示","Toggle the disc list style":"切換為實心圓點標示","Toggle the lower–latin list style":"切換為小寫拉丁文字標示","Toggle the lower–roman list style":"切換為小寫羅馬數字標示","Toggle the square list style":"切換為方形標示","Toggle the upper–latin list style":"切換為大寫拉丁文字標示","Toggle the upper–roman list style":"切換為大寫羅馬數字標示",Turquoise:"藍綠色","Type or paste your content here.":"在此輸入或貼上你的內容。","Type your title":"輸入你的標題",Underline:"底線",Undo:"取消",Unlink:"移除連結",Update:"更新","Update image URL":"更新圖片連結","Upload failed":"上傳失敗","Upload from computer":"從電腦上傳","Upload image from computer":"從電腦上傳圖片","Upload in progress":"正在上傳","Upper-latin":"大寫拉丁字母","Upper-roman":"大寫羅馬數字","Vertical text alignment toolbar":"垂直對齊",White:"白色","Widget toolbar":"小工具",Width:"寬度","Wrap text":"文繞圖",Yellow:"黃色"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
\ No newline at end of file
diff --git a/public/static/plugs/vue/vue.min.js b/public/static/plugs/vue/vue.min.js
index d285e55a1..041602017 100644
--- a/public/static/plugs/vue/vue.min.js
+++ b/public/static/plugs/vue/vue.min.js
@@ -1,6 +1,6 @@
 /*!
- * Vue.js v2.7.14
- * (c) 2014-2022 Evan You
+ * Vue.js v2.7.16
+ * (c) 2014-2023 Evan You
  * Released under the MIT License.
  */
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vue=e()}(this,(function(){"use strict";var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function i(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return"function"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,null,2):String(t)}function p(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var h=v("slot,component",!0),m=v("key,ref,slot,slot-scope,is");function g(t,e){var n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}var y=Object.prototype.hasOwnProperty;function _(t,e){return y.call(t,e)}function b(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var $=/-(\w)/g,w=b((function(t){return t.replace($,(function(t,e){return e?e.toUpperCase():""}))})),x=b((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,k=b((function(t){return t.replace(C,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function A(t){for(var e={},n=0;n<t.length;n++)t[n]&&T(e,t[n]);return e}function j(t,e,n){}var E=function(t,e,n){return!1},N=function(t){return t};function P(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return P(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),c=Object.keys(e);return a.length===c.length&&a.every((function(n){return P(t[n],e[n])}))}catch(t){return!1}}function D(t,e){for(var n=0;n<t.length;n++)if(P(t[n],e))return n;return-1}function M(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function I(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}var L="data-server-rendered",R=["component","directive","filter"],F=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],H={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:E,isReservedAttr:E,isUnknownElement:E,getTagNamespace:j,parsePlatformTagName:N,mustUseProp:E,async:!0,_lifecycleHooks:F},B=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function U(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function z(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var V=new RegExp("[^".concat(B.source,".$_\\d]"));var K="__proto__"in{},J="undefined"!=typeof window,q=J&&window.navigator.userAgent.toLowerCase(),W=q&&/msie|trident/.test(q),Z=q&&q.indexOf("msie 9.0")>0,G=q&&q.indexOf("edge/")>0;q&&q.indexOf("android");var X=q&&/iphone|ipad|ipod|ios/.test(q);q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q);var Y,Q=q&&q.match(/firefox\/(\d+)/),tt={}.watch,et=!1;if(J)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===Y&&(Y=!J&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Y},ot=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,st="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);at="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ct=null;function ut(t){void 0===t&&(t=null),t||ct&&ct._scope.off(),ct=t,t&&t._scope.on()}var lt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),ft=function(t){void 0===t&&(t="");var e=new lt;return e.text=t,e.isComment=!0,e};function dt(t){return new lt(void 0,void 0,void 0,String(t))}function pt(t){var e=new lt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var vt=0,ht=[],mt=function(){function t(){this._pending=!1,this.id=vt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,ht.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.filter((function(t){return t})),n=0,r=e.length;n<r;n++){e[n].update()}},t}();mt.target=null;var gt=[];function yt(t){gt.push(t),mt.target=t}function _t(){gt.pop(),mt.target=gt[gt.length-1]}var bt=Array.prototype,$t=Object.create(bt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=bt[t];z($t,t,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i}))}));var wt=Object.getOwnPropertyNames($t),xt={},Ct=!0;function kt(t){Ct=t}var St={notify:j,depend:j,addSub:j,removeSub:j},Ot=function(){function t(t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.value=t,this.shallow=n,this.mock=r,this.dep=r?St:new mt,this.vmCount=0,z(t,"__ob__",this),e(t)){if(!r)if(K)t.__proto__=$t;else for(var o=0,i=wt.length;o<i;o++){z(t,s=wt[o],$t[s])}n||this.observeArray(t)}else{var a=Object.keys(t);for(o=0;o<a.length;o++){var s;At(t,s=a[o],xt,void 0,n,r)}}}return t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Tt(t[e],!1,this.mock)},t}();function Tt(t,n,r){return t&&_(t,"__ob__")&&t.__ob__ instanceof Ot?t.__ob__:!Ct||!r&&rt()||!e(t)&&!u(t)||!Object.isExtensible(t)||t.__v_skip||Ft(t)||t instanceof lt?void 0:new Ot(t,n,r)}function At(t,n,r,o,i,a){var s=new mt,c=Object.getOwnPropertyDescriptor(t,n);if(!c||!1!==c.configurable){var u=c&&c.get,l=c&&c.set;u&&!l||r!==xt&&2!==arguments.length||(r=t[n]);var f=!i&&Tt(r,!1,a);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var n=u?u.call(t):r;return mt.target&&(s.depend(),f&&(f.dep.depend(),e(n)&&Nt(n))),Ft(n)&&!i?n.value:n},set:function(e){var n=u?u.call(t):r;if(I(n,e)){if(l)l.call(t,e);else{if(u)return;if(!i&&Ft(n)&&!Ft(e))return void(n.value=e);r=e}f=!i&&Tt(e,!1,a),s.notify()}}}),s}}function jt(t,n,r){if(!Lt(t)){var o=t.__ob__;return e(t)&&l(n)?(t.length=Math.max(t.length,n),t.splice(n,1,r),o&&!o.shallow&&o.mock&&Tt(r,!1,!0),r):n in t&&!(n in Object.prototype)?(t[n]=r,r):t._isVue||o&&o.vmCount?r:o?(At(o.value,n,r,void 0,o.shallow,o.mock),o.dep.notify(),r):(t[n]=r,r)}}function Et(t,n){if(e(t)&&l(n))t.splice(n,1);else{var r=t.__ob__;t._isVue||r&&r.vmCount||Lt(t)||_(t,n)&&(delete t[n],r&&r.dep.notify())}}function Nt(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Nt(n)}function Pt(t){return Dt(t,!0),z(t,"__v_isShallow",!0),t}function Dt(t,e){Lt(t)||Tt(t,e,rt())}function Mt(t){return Lt(t)?Mt(t.__v_raw):!(!t||!t.__ob__)}function It(t){return!(!t||!t.__v_isShallow)}function Lt(t){return!(!t||!t.__v_isReadonly)}var Rt="__v_isRef";function Ft(t){return!(!t||!0!==t.__v_isRef)}function Ht(t,e){if(Ft(t))return t;var n={};return z(n,Rt,!0),z(n,"__v_isShallow",e),z(n,"dep",At(n,"value",t,null,e,rt())),n}function Bt(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];if(Ft(t))return t.value;var r=t&&t.__ob__;return r&&r.dep.depend(),t},set:function(t){var r=e[n];Ft(r)&&!Ft(t)?r.value=t:e[n]=t}})}function Ut(t,e,n){var r=t[e];if(Ft(r))return r;var o={get value(){var r=t[e];return void 0===r?n:r},set value(n){t[e]=n}};return z(o,Rt,!0),o}function zt(t){return Vt(t,!1)}function Vt(t,e){if(!u(t))return t;if(Lt(t))return t;var n=e?"__v_rawToShallowReadonly":"__v_rawToReadonly",r=t[n];if(r)return r;var o=Object.create(Object.getPrototypeOf(t));z(t,n,o),z(o,"__v_isReadonly",!0),z(o,"__v_raw",t),Ft(t)&&z(o,Rt,!0),(e||It(t))&&z(o,"__v_isShallow",!0);for(var i=Object.keys(t),a=0;a<i.length;a++)Kt(o,t,i[a],e);return o}function Kt(t,e,n,r){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];return r||!u(t)?t:zt(t)},set:function(){}})}var Jt=b((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function qt(t,n){function r(){var t=r.fns;if(!e(t))return dn(t,null,arguments,n,"v-on handler");for(var o=t.slice(),i=0;i<o.length;i++)dn(o[i],null,arguments,n,"v-on handler")}return r.fns=t,r}function Wt(t,e,r,i,a,s){var c,u,l,f;for(c in t)u=t[c],l=e[c],f=Jt(c),n(u)||(n(l)?(n(u.fns)&&(u=t[c]=qt(u,s)),o(f.once)&&(u=t[c]=a(f.name,u,f.capture)),r(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)n(t[c])&&i((f=Jt(c)).name,e[c],f.capture)}function Zt(t,e,i){var a;t instanceof lt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){i.apply(this,arguments),g(a.fns,c)}n(s)?a=qt([c]):r(s.fns)&&o(s.merged)?(a=s).fns.push(c):a=qt([s,c]),a.merged=!0,t[e]=a}function Gt(t,e,n,o,i){if(r(e)){if(_(e,n))return t[n]=e[n],i||delete e[n],!0;if(_(e,o))return t[n]=e[o],i||delete e[o],!0}return!1}function Xt(t){return i(t)?[dt(t)]:e(t)?Qt(t):void 0}function Yt(t){return r(t)&&r(t.text)&&!1===t.isComment}function Qt(t,a){var s,c,u,l,f=[];for(s=0;s<t.length;s++)n(c=t[s])||"boolean"==typeof c||(l=f[u=f.length-1],e(c)?c.length>0&&(Yt((c=Qt(c,"".concat(a||"","_").concat(s)))[0])&&Yt(l)&&(f[u]=dt(l.text+c[0].text),c.shift()),f.push.apply(f,c)):i(c)?Yt(l)?f[u]=dt(l.text+c):""!==c&&f.push(dt(c)):Yt(c)&&Yt(l)?f[u]=dt(l.text+c.text):(o(t._isVList)&&r(c.tag)&&n(c.key)&&r(a)&&(c.key="__vlist".concat(a,"_").concat(s,"__")),f.push(c)));return f}function te(t,n,c,u,l,f){return(e(c)||i(c))&&(l=u,u=c,c=void 0),o(f)&&(l=2),function(t,n,o,i,c){if(r(o)&&r(o.__ob__))return ft();r(o)&&r(o.is)&&(n=o.is);if(!n)return ft();e(i)&&a(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);2===c?i=Xt(i):1===c&&(i=function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(i));var u,l;if("string"==typeof n){var f=void 0;l=t.$vnode&&t.$vnode.ns||H.getTagNamespace(n),u=H.isReservedTag(n)?new lt(H.parsePlatformTagName(n),o,i,void 0,void 0,t):o&&o.pre||!r(f=yr(t.$options,"components",n))?new lt(n,o,i,void 0,void 0,t):cr(f,o,t,i,n)}else u=cr(n,o,t,i);return e(u)?u:r(u)?(r(l)&&ee(u,l),r(o)&&function(t){s(t.style)&&Bn(t.style);s(t.class)&&Bn(t.class)}(o),u):ft()}(t,n,c,u,l)}function ee(t,e,i){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,i=!0),r(t.children))for(var a=0,s=t.children.length;a<s;a++){var c=t.children[a];r(c.tag)&&(n(c.ns)||o(i)&&"svg"!==c.tag)&&ee(c,e,i)}}function ne(t,n){var o,i,a,c,u=null;if(e(t)||"string"==typeof t)for(u=new Array(t.length),o=0,i=t.length;o<i;o++)u[o]=n(t[o],o);else if("number"==typeof t)for(u=new Array(t),o=0;o<t;o++)u[o]=n(o+1,o);else if(s(t))if(st&&t[Symbol.iterator]){u=[];for(var l=t[Symbol.iterator](),f=l.next();!f.done;)u.push(n(f.value,u.length)),f=l.next()}else for(a=Object.keys(t),u=new Array(a.length),o=0,i=a.length;o<i;o++)c=a[o],u[o]=n(t[c],c,o);return r(u)||(u=[]),u._isVList=!0,u}function re(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=T(T({},r),n)),o=i(n)||(a(e)?e():e)):o=this.$slots[t]||(a(e)?e():e);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function oe(t){return yr(this.$options,"filters",t)||N}function ie(t,n){return e(t)?-1===t.indexOf(n):t!==n}function ae(t,e,n,r,o){var i=H.keyCodes[e]||n;return o&&r&&!H.keyCodes[e]?ie(o,r):i?ie(i,t):r?k(r)!==e:void 0===t}function se(t,n,r,o,i){if(r)if(s(r)){e(r)&&(r=A(r));var a=void 0,c=function(e){if("class"===e||"style"===e||m(e))a=t;else{var s=t.attrs&&t.attrs.type;a=o||H.mustUseProp(n,s,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=w(e),u=k(e);c in a||u in a||(a[e]=r[e],i&&((t.on||(t.on={}))["update:".concat(e)]=function(t){r[e]=t}))};for(var u in r)c(u)}else;return t}function ce(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||le(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),"__static__".concat(t),!1),r}function ue(t,e,n){return le(t,"__once__".concat(e).concat(n?"_".concat(n):""),!0),t}function le(t,n,r){if(e(t))for(var o=0;o<t.length;o++)t[o]&&"string"!=typeof t[o]&&fe(t[o],"".concat(n,"_").concat(o),r);else fe(t,n,r)}function fe(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function de(t,e){if(e)if(u(e)){var n=t.on=t.on?T({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function pe(t,n,r,o){n=n||{$stable:!r};for(var i=0;i<t.length;i++){var a=t[i];e(a)?pe(a,n,r):a&&(a.proxy&&(a.fn.proxy=!0),n[a.key]=a.fn)}return o&&(n.$key=o),n}function ve(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function he(t,e){return"string"==typeof t?e+t:t}function me(t){t._o=ue,t._n=p,t._s=d,t._l=ne,t._t=re,t._q=P,t._i=D,t._m=ce,t._f=oe,t._k=ae,t._b=se,t._v=dt,t._e=ft,t._u=pe,t._g=de,t._d=ve,t._p=he}function ge(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==e&&i.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(ye)&&delete n[u];return n}function ye(t){return t.isComment&&!t.asyncFactory||" "===t.text}function _e(t){return t.isComment&&t.asyncFactory}function be(e,n,r,o){var i,a=Object.keys(r).length>0,s=n?!!n.$stable:!a,c=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(s&&o&&o!==t&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},n)n[u]&&"$"!==u[0]&&(i[u]=$e(e,r,u,n[u]))}else i={};for(var l in r)l in i||(i[l]=we(r,l));return n&&Object.isExtensible(n)&&(n._normalized=i),z(i,"$stable",s),z(i,"$key",c),z(i,"$hasNormal",a),i}function $e(t,n,r,o){var i=function(){var n=ct;ut(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:Xt(r))&&r[0];return ut(n),r&&(!i||1===r.length&&i.isComment&&!_e(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function we(t,e){return function(){return t[e]}}function xe(e){return{get attrs(){if(!e._attrsProxy){var n=e._attrsProxy={};z(n,"_v_attr_proxy",!0),Ce(n,e.$attrs,t,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||Ce(e._listenersProxy={},e.$listeners,t,e,"$listeners");return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Se(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:S(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return Bt(e,t,n)}))}}}function Ce(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,ke(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function ke(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function Se(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function Oe(){var t=ct;return t._setupContext||(t._setupContext=xe(t))}var Te,Ae=null;function je(t,e){return(t.__esModule||st&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function Ee(t){if(e(t))for(var n=0;n<t.length;n++){var o=t[n];if(r(o)&&(r(o.componentOptions)||_e(o)))return o}}function Ne(t,e){Te.$on(t,e)}function Pe(t,e){Te.$off(t,e)}function De(t,e){var n=Te;return function r(){var o=e.apply(null,arguments);null!==o&&n.$off(t,r)}}function Me(t,e,n){Te=t,Wt(e,n||{},Ne,Pe,De,t),Te=void 0}var Ie=null;function Le(t){var e=Ie;return Ie=t,function(){Ie=e}}function Re(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Fe(t,e){if(e){if(t._directInactive=!1,Re(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Fe(t.$children[n]);Be(t,"activated")}}function He(t,e){if(!(e&&(t._directInactive=!0,Re(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)He(t.$children[n]);Be(t,"deactivated")}}function Be(t,e,n,r){void 0===r&&(r=!0),yt();var o=ct;r&&ut(t);var i=t.$options[e],a="".concat(e," hook");if(i)for(var s=0,c=i.length;s<c;s++)dn(i[s],t,n||null,t,a);t._hasHookEvent&&t.$emit("hook:"+e),r&&ut(o),_t()}var Ue=[],ze=[],Ve={},Ke=!1,Je=!1,qe=0;var We=0,Ze=Date.now;if(J&&!W){var Ge=window.performance;Ge&&"function"==typeof Ge.now&&Ze()>document.createEvent("Event").timeStamp&&(Ze=function(){return Ge.now()})}var Xe=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Ye(){var t,e;for(We=Ze(),Je=!0,Ue.sort(Xe),qe=0;qe<Ue.length;qe++)(t=Ue[qe]).before&&t.before(),e=t.id,Ve[e]=null,t.run();var n=ze.slice(),r=Ue.slice();qe=Ue.length=ze.length=0,Ve={},Ke=Je=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Fe(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Be(r,"updated")}}(r),function(){for(var t=0;t<ht.length;t++){var e=ht[t];e.subs=e.subs.filter((function(t){return t})),e._pending=!1}ht.length=0}(),ot&&H.devtools&&ot.emit("flush")}function Qe(t){var e=t.id;if(null==Ve[e]&&(t!==mt.target||!t.noRecurse)){if(Ve[e]=!0,Je){for(var n=Ue.length-1;n>qe&&Ue[n].id>t.id;)n--;Ue.splice(n+1,0,t)}else Ue.push(t);Ke||(Ke=!0,Cn(Ye))}}var tn="watcher",en="".concat(tn," callback"),nn="".concat(tn," getter"),rn="".concat(tn," cleanup");function on(t,e){return cn(t,null,{flush:"post"})}var an,sn={};function cn(n,r,o){var i=void 0===o?t:o,s=i.immediate,c=i.deep,u=i.flush,l=void 0===u?"pre":u;i.onTrack,i.onTrigger;var f,d,p=ct,v=function(t,e,n){return void 0===n&&(n=null),dn(t,null,n,p,e)},h=!1,m=!1;if(Ft(n)?(f=function(){return n.value},h=It(n)):Mt(n)?(f=function(){return n.__ob__.dep.depend(),n},c=!0):e(n)?(m=!0,h=n.some((function(t){return Mt(t)||It(t)})),f=function(){return n.map((function(t){return Ft(t)?t.value:Mt(t)?Bn(t):a(t)?v(t,nn):void 0}))}):f=a(n)?r?function(){return v(n,nn)}:function(){if(!p||!p._isDestroyed)return d&&d(),v(n,tn,[y])}:j,r&&c){var g=f;f=function(){return Bn(g())}}var y=function(t){d=_.onStop=function(){v(t,rn)}};if(rt())return y=j,r?s&&v(r,en,[f(),m?[]:void 0,y]):f(),j;var _=new Vn(ct,f,j,{lazy:!0});_.noRecurse=!r;var b=m?[]:sn;return _.run=function(){if(_.active)if(r){var t=_.get();(c||h||(m?t.some((function(t,e){return I(t,b[e])})):I(t,b)))&&(d&&d(),v(r,en,[t,b===sn?void 0:b,y]),b=t)}else _.get()},"sync"===l?_.update=_.run:"post"===l?(_.post=!0,_.update=function(){return Qe(_)}):_.update=function(){if(p&&p===ct&&!p._isMounted){var t=p._preWatchers||(p._preWatchers=[]);t.indexOf(_)<0&&t.push(_)}else Qe(_)},r?s?_.run():b=_.get():"post"===l&&p?p.$once("hook:mounted",(function(){return _.get()})):_.get(),function(){_.teardown()}}var un=function(){function t(t){void 0===t&&(t=!1),this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=an,!t&&an&&(this.index=(an.scopes||(an.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=an;try{return an=this,t()}finally{an=e}}},t.prototype.on=function(){an=this},t.prototype.off=function(){an=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},t}();function ln(t){var e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}function fn(t,e,n){yt();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,t,e,n))return}catch(t){pn(t,r,"errorCaptured hook")}}pn(t,e,n)}finally{_t()}}function dn(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue&&f(i)&&!i._handled&&(i.catch((function(t){return fn(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(t){fn(t,r,o)}return i}function pn(t,e,n){if(H.errorHandler)try{return H.errorHandler.call(null,t,e,n)}catch(e){e!==t&&vn(e)}vn(t)}function vn(t,e,n){if(!J||"undefined"==typeof console)throw t;console.error(t)}var hn,mn=!1,gn=[],yn=!1;function _n(){yn=!1;var t=gn.slice(0);gn.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&it(Promise)){var bn=Promise.resolve();hn=function(){bn.then(_n),X&&setTimeout(j)},mn=!0}else if(W||"undefined"==typeof MutationObserver||!it(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())hn="undefined"!=typeof setImmediate&&it(setImmediate)?function(){setImmediate(_n)}:function(){setTimeout(_n,0)};else{var $n=1,wn=new MutationObserver(_n),xn=document.createTextNode(String($n));wn.observe(xn,{characterData:!0}),hn=function(){$n=($n+1)%2,xn.data=String($n)},mn=!0}function Cn(t,e){var n;if(gn.push((function(){if(t)try{t.call(e)}catch(t){fn(t,e,"nextTick")}else n&&n(e)})),yn||(yn=!0,hn()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}function kn(t){return function(e,n){if(void 0===n&&(n=ct),n)return function(t,e,n){var r=t.$options;r[e]=vr(r[e],n)}(n,t,e)}}var Sn=kn("beforeMount"),On=kn("mounted"),Tn=kn("beforeUpdate"),An=kn("updated"),jn=kn("beforeDestroy"),En=kn("destroyed"),Nn=kn("activated"),Pn=kn("deactivated"),Dn=kn("serverPrefetch"),Mn=kn("renderTracked"),In=kn("renderTriggered"),Ln=kn("errorCaptured");var Rn="2.7.14";var Fn=Object.freeze({__proto__:null,version:Rn,defineComponent:function(t){return t},ref:function(t){return Ht(t,!1)},shallowRef:function(t){return Ht(t,!0)},isRef:Ft,toRef:Ut,toRefs:function(t){var n=e(t)?new Array(t.length):{};for(var r in t)n[r]=Ut(t,r);return n},unref:function(t){return Ft(t)?t.value:t},proxyRefs:function(t){if(Mt(t))return t;for(var e={},n=Object.keys(t),r=0;r<n.length;r++)Bt(e,t,n[r]);return e},customRef:function(t){var e=new mt,n=t((function(){e.depend()}),(function(){e.notify()})),r=n.get,o=n.set,i={get value(){return r()},set value(t){o(t)}};return z(i,Rt,!0),i},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return Dt(t,!1),t},isReactive:Mt,isReadonly:Lt,isShallow:It,isProxy:function(t){return Mt(t)||Lt(t)},shallowReactive:Pt,markRaw:function(t){return Object.isExtensible(t)&&z(t,"__v_skip",!0),t},toRaw:function t(e){var n=e&&e.__v_raw;return n?t(n):e},readonly:zt,shallowReadonly:function(t){return Vt(t,!0)},computed:function(t,e){var n,r,o=a(t);o?(n=t,r=j):(n=t.get,r=t.set);var i=rt()?null:new Vn(ct,n,j,{lazy:!0}),s={effect:i,get value(){return i?(i.dirty&&i.evaluate(),mt.target&&i.depend(),i.value):n()},set value(t){r(t)}};return z(s,Rt,!0),z(s,"__v_isReadonly",o),s},watch:function(t,e,n){return cn(t,e,n)},watchEffect:function(t,e){return cn(t,null,e)},watchPostEffect:on,watchSyncEffect:function(t,e){return cn(t,null,{flush:"sync"})},EffectScope:un,effectScope:function(t){return new un(t)},onScopeDispose:function(t){an&&an.cleanups.push(t)},getCurrentScope:function(){return an},provide:function(t,e){ct&&(ln(ct)[t]=e)},inject:function(t,e,n){void 0===n&&(n=!1);var r=ct;if(r){var o=r.$parent&&r.$parent._provided;if(o&&t in o)return o[t];if(arguments.length>1)return n&&a(e)?e.call(r):e}},h:function(t,e,n){return te(ct,t,e,n,2,!0)},getCurrentInstance:function(){return ct&&{proxy:ct}},useSlots:function(){return Oe().slots},useAttrs:function(){return Oe().attrs},useListeners:function(){return Oe().listeners},mergeDefaults:function(t,n){var r=e(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var o in n){var i=r[o];i?e(i)||a(i)?r[o]={type:i,default:n[o]}:i.default=n[o]:null===i&&(r[o]={default:n[o]})}return r},nextTick:Cn,set:jt,del:Et,useCssModule:function(e){return t},useCssVars:function(t){if(J){var e=ct;e&&on((function(){var n=e.$el,r=t(e,e._setupProxy);if(n&&1===n.nodeType){var o=n.style;for(var i in r)o.setProperty("--".concat(i),r[i])}}))}},defineAsyncComponent:function(t){a(t)&&(t={loader:t});var e=t.loader,n=t.loadingComponent,r=t.errorComponent,o=t.delay,i=void 0===o?200:o,s=t.timeout;t.suspensible;var c=t.onError,u=null,l=0,f=function(){var t;return u||(t=u=e().catch((function(t){if(t=t instanceof Error?t:new Error(String(t)),c)return new Promise((function(e,n){c(t,(function(){return e((l++,u=null,f()))}),(function(){return n(t)}),l+1)}));throw t})).then((function(e){return t!==u&&u?u:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e)})))};return function(){return{component:f(),delay:i,timeout:s,error:r,loading:n}}},onBeforeMount:Sn,onMounted:On,onBeforeUpdate:Tn,onUpdated:An,onBeforeUnmount:jn,onUnmounted:En,onActivated:Nn,onDeactivated:Pn,onServerPrefetch:Dn,onRenderTracked:Mn,onRenderTriggered:In,onErrorCaptured:function(t,e){void 0===e&&(e=ct),Ln(t,e)}}),Hn=new at;function Bn(t){return Un(t,Hn),Hn.clear(),t}function Un(t,n){var r,o,i=e(t);if(!(!i&&!s(t)||t.__v_skip||Object.isFrozen(t)||t instanceof lt)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)Un(t[r],n);else if(Ft(t))Un(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)Un(t[o[r]],n)}}var zn=0,Vn=function(){function t(t,e,n,r,o){!function(t,e){void 0===e&&(e=an),e&&e.active&&e.effects.push(t)}(this,an&&!an._vm?an:t?t._scope:void 0),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++zn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new at,this.newDepIds=new at,this.expression="",a(e)?this.getter=e:(this.getter=function(t){if(!V.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=j)),this.value=this.lazy?void 0:this.get()}return t.prototype.get=function(){var t;yt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;fn(t,e,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&Bn(t),_t(),this.cleanupDeps()}return t},t.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},t.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},t.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Qe(this)},t.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'.concat(this.expression,'"');dn(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},t.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},t.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&g(this.vm._scope.effects,this),this.active){for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},t}(),Kn={enumerable:!0,configurable:!0,get:j,set:j};function Jn(t,e,n){Kn.get=function(){return this[e][n]},Kn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Kn)}function qn(t){var n=t.$options;if(n.props&&function(t,e){var n=t.$options.propsData||{},r=t._props=Pt({}),o=t.$options._propKeys=[];t.$parent&&kt(!1);var i=function(i){o.push(i);var a=_r(i,e,n,t);At(r,i,a),i in t||Jn(t,"_props",i)};for(var a in e)i(a);kt(!0)}(t,n.props),function(t){var e=t.$options,n=e.setup;if(n){var r=t._setupContext=xe(t);ut(t),yt();var o=dn(n,null,[t._props||Pt({}),r],t,"setup");if(_t(),ut(),a(o))e.render=o;else if(s(o))if(t._setupState=o,o.__sfc){var i=t._setupProxy={};for(var c in o)"__sfc"!==c&&Bt(i,o,c)}else for(var c in o)U(c)||Bt(t,o,c)}}(t),n.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?j:S(e[n],t)}(t,n.methods),n.data)!function(t){var e=t.$options.data;u(e=t._data=a(e)?function(t,e){yt();try{return t.call(e,e)}catch(t){return fn(t,e,"data()"),{}}finally{_t()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&_(r,i)||U(i)||Jn(t,"_data",i)}var s=Tt(e);s&&s.vmCount++}(t);else{var r=Tt(t._data={});r&&r.vmCount++}n.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=rt();for(var o in e){var i=e[o],s=a(i)?i:i.get;r||(n[o]=new Vn(t,s||j,j,Wn)),o in t||Zn(t,o,i)}}(t,n.computed),n.watch&&n.watch!==tt&&function(t,n){for(var r in n){var o=n[r];if(e(o))for(var i=0;i<o.length;i++)Yn(t,r,o[i]);else Yn(t,r,o)}}(t,n.watch)}var Wn={lazy:!0};function Zn(t,e,n){var r=!rt();a(n)?(Kn.get=r?Gn(e):Xn(n),Kn.set=j):(Kn.get=n.get?r&&!1!==n.cache?Gn(e):Xn(n.get):j,Kn.set=n.set||j),Object.defineProperty(t,e,Kn)}function Gn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function Xn(t){return function(){return t.call(this,this)}}function Yn(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function Qn(t,e){if(t){for(var n=Object.create(null),r=st?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=t[i].from;if(s in e._provided)n[i]=e._provided[s];else if("default"in t[i]){var c=t[i].default;n[i]=a(c)?c.call(e):c}}}return n}}var tr=0;function er(t){var e=t.options;if(t.super){var n=er(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}(t);r&&T(t.extendOptions,r),(e=t.options=gr(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function nr(n,r,i,a,s){var c,u=this,l=s.options;_(a,"_uid")?(c=Object.create(a))._original=a:(c=a,a=a._original);var f=o(l._compiled),d=!f;this.data=n,this.props=r,this.children=i,this.parent=a,this.listeners=n.on||t,this.injections=Qn(l.inject,a),this.slots=function(){return u.$slots||be(a,n.scopedSlots,u.$slots=ge(i,a)),u.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return be(a,n.scopedSlots,this.slots())}}),f&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=be(a,n.scopedSlots,this.$slots)),l._scopeId?this._c=function(t,n,r,o){var i=te(c,t,n,r,o,d);return i&&!e(i)&&(i.fnScopeId=l._scopeId,i.fnContext=a),i}:this._c=function(t,e,n,r){return te(c,t,e,n,r,d)}}function rr(t,e,n,r,o){var i=pt(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function or(t,e){for(var n in e)t[w(n)]=e[n]}function ir(t){return t.name||t.__name||t._componentTag}me(nr.prototype);var ar={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;ar.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},o=t.data.inlineTemplate;r(o)&&(n.render=o.render,n.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Ie)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,o,i){var a=o.data.scopedSlots,s=e.$scopedSlots,c=!!(a&&!a.$stable||s!==t&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key||!a&&e.$scopedSlots.$key),u=!!(i||e.$options._renderChildren||c),l=e.$vnode;e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o),e.$options._renderChildren=i;var f=o.data.attrs||t;e._attrsProxy&&Ce(e._attrsProxy,f,l.data&&l.data.attrs||t,e,"$attrs")&&(u=!0),e.$attrs=f,r=r||t;var d=e.$options._parentListeners;if(e._listenersProxy&&Ce(e._listenersProxy,r,d||t,e,"$listeners"),e.$listeners=e.$options._parentListeners=r,Me(e,r,d),n&&e.$options.props){kt(!1);for(var p=e._props,v=e.$options._propKeys||[],h=0;h<v.length;h++){var m=v[h],g=e.$options.props;p[m]=_r(m,g,n,e)}kt(!0),e.$options.propsData=n}u&&(e.$slots=ge(i,o.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Be(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,ze.push(e)):Fe(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?He(e,!0):e.$destroy())}},sr=Object.keys(ar);function cr(i,a,c,u,l){if(!n(i)){var d=c.$options._base;if(s(i)&&(i=d.extend(i)),"function"==typeof i){var p;if(n(i.cid)&&(i=function(t,e){if(o(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;var i=Ae;if(i&&r(t.owners)&&-1===t.owners.indexOf(i)&&t.owners.push(i),o(t.loading)&&r(t.loadingComp))return t.loadingComp;if(i&&!r(t.owners)){var a=t.owners=[i],c=!0,u=null,l=null;i.$on("hook:destroyed",(function(){return g(a,i)}));var d=function(t){for(var e=0,n=a.length;e<n;e++)a[e].$forceUpdate();t&&(a.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},p=M((function(n){t.resolved=je(n,e),c?a.length=0:d(!0)})),v=M((function(e){r(t.errorComp)&&(t.error=!0,d(!0))})),h=t(p,v);return s(h)&&(f(h)?n(t.resolved)&&h.then(p,v):f(h.component)&&(h.component.then(p,v),r(h.error)&&(t.errorComp=je(h.error,e)),r(h.loading)&&(t.loadingComp=je(h.loading,e),0===h.delay?t.loading=!0:u=setTimeout((function(){u=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,d(!1))}),h.delay||200)),r(h.timeout)&&(l=setTimeout((function(){l=null,n(t.resolved)&&v(null)}),h.timeout)))),c=!1,t.loading?t.loadingComp:t.resolved}}(p=i,d),void 0===i))return function(t,e,n,r,o){var i=ft();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}(p,a,c,u,l);a=a||{},er(i),r(a.model)&&function(t,n){var o=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[o]=n.model.value;var a=n.on||(n.on={}),s=a[i],c=n.model.callback;r(s)?(e(s)?-1===s.indexOf(c):s!==c)&&(a[i]=[c].concat(s)):a[i]=c}(i.options,a);var v=function(t,e,o){var i=e.options.props;if(!n(i)){var a={},s=t.attrs,c=t.props;if(r(s)||r(c))for(var u in i){var l=k(u);Gt(a,c,u,l,!0)||Gt(a,s,u,l,!1)}return a}}(a,i);if(o(i.options.functional))return function(n,o,i,a,s){var c=n.options,u={},l=c.props;if(r(l))for(var f in l)u[f]=_r(f,l,o||t);else r(i.attrs)&&or(u,i.attrs),r(i.props)&&or(u,i.props);var d=new nr(i,u,s,a,n),p=c.render.call(null,d._c,d);if(p instanceof lt)return rr(p,i,d.parent,c);if(e(p)){for(var v=Xt(p)||[],h=new Array(v.length),m=0;m<v.length;m++)h[m]=rr(v[m],i,d.parent,c);return h}}(i,v,a,c,u);var h=a.on;if(a.on=a.nativeOn,o(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<sr.length;n++){var r=sr[n],o=e[r],i=ar[r];o===i||o&&o._merged||(e[r]=o?ur(i,o):i)}}(a);var y=ir(i.options)||l;return new lt("vue-component-".concat(i.cid).concat(y?"-".concat(y):""),a,void 0,void 0,void 0,c,{Ctor:i,propsData:v,listeners:h,tag:l,children:u},p)}}}function ur(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var lr=j,fr=H.optionMergeStrategies;function dr(t,e,n){if(void 0===n&&(n=!0),!e)return t;for(var r,o,i,a=st?Reflect.ownKeys(e):Object.keys(e),s=0;s<a.length;s++)"__ob__"!==(r=a[s])&&(o=t[r],i=e[r],n&&_(t,r)?o!==i&&u(o)&&u(i)&&dr(o,i):jt(t,r,i));return t}function pr(t,e,n){return n?function(){var r=a(e)?e.call(n,n):e,o=a(t)?t.call(n,n):t;return r?dr(r,o):o}:e?t?function(){return dr(a(e)?e.call(this,this):e,a(t)?t.call(this,this):t)}:e:t}function vr(t,n){var r=n?t?t.concat(n):e(n)?n:[n]:t;return r?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r):r}function hr(t,e,n,r){var o=Object.create(t||null);return e?T(o,e):o}fr.data=function(t,e,n){return n?pr(t,e,n):e&&"function"!=typeof e?t:pr(t,e)},F.forEach((function(t){fr[t]=vr})),R.forEach((function(t){fr[t+"s"]=hr})),fr.watch=function(t,n,r,o){if(t===tt&&(t=void 0),n===tt&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;var i={};for(var a in T(i,t),n){var s=i[a],c=n[a];s&&!e(s)&&(s=[s]),i[a]=s?s.concat(c):e(c)?c:[c]}return i},fr.props=fr.methods=fr.inject=fr.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return T(o,t),e&&T(o,e),o},fr.provide=function(t,e){return t?function(){var n=Object.create(null);return dr(n,a(t)?t.call(this):t),e&&dr(n,a(e)?e.call(this):e,!1),n}:e};var mr=function(t,e){return void 0===e?t:e};function gr(t,n,r){if(a(n)&&(n=n.options),function(t,n){var r=t.props;if(r){var o,i,a={};if(e(r))for(o=r.length;o--;)"string"==typeof(i=r[o])&&(a[w(i)]={type:null});else if(u(r))for(var s in r)i=r[s],a[w(s)]=u(i)?i:{type:i};t.props=a}}(n),function(t,n){var r=t.inject;if(r){var o=t.inject={};if(e(r))for(var i=0;i<r.length;i++)o[r[i]]={from:r[i]};else if(u(r))for(var a in r){var s=r[a];o[a]=u(s)?T({from:a},s):{from:s}}}}(n),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];a(r)&&(e[n]={bind:r,update:r})}}(n),!n._base&&(n.extends&&(t=gr(t,n.extends,r)),n.mixins))for(var o=0,i=n.mixins.length;o<i;o++)t=gr(t,n.mixins[o],r);var s,c={};for(s in t)l(s);for(s in n)_(t,s)||l(s);function l(e){var o=fr[e]||mr;c[e]=o(t[e],n[e],r,e)}return c}function yr(t,e,n,r){if("string"==typeof n){var o=t[e];if(_(o,n))return o[n];var i=w(n);if(_(o,i))return o[i];var a=x(i);return _(o,a)?o[a]:o[n]||o[i]||o[a]}}function _r(t,e,n,r){var o=e[t],i=!_(n,t),s=n[t],c=xr(Boolean,o.type);if(c>-1)if(i&&!_(o,"default"))s=!1;else if(""===s||s===k(t)){var u=xr(String,o.type);(u<0||c<u)&&(s=!0)}if(void 0===s){s=function(t,e,n){if(!_(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return a(r)&&"Function"!==$r(e.type)?r.call(t):r}(r,o,t);var l=Ct;kt(!0),Tt(s),kt(l)}return s}var br=/^\s*function (\w+)/;function $r(t){var e=t&&t.toString().match(br);return e?e[1]:""}function wr(t,e){return $r(t)===$r(e)}function xr(t,n){if(!e(n))return wr(n,t)?0:-1;for(var r=0,o=n.length;r<o;r++)if(wr(n[r],t))return r;return-1}function Cr(t){this._init(t)}function kr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=ir(t)||ir(n.options),a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=gr(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)Jn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)Zn(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,R.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=T({},a.options),o[r]=a,a}}function Sr(t){return t&&(ir(t.Ctor.options)||t.tag)}function Or(t,n){return e(t)?t.indexOf(n)>-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===c.call(r)&&t.test(n));var r}function Tr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Ar(n,i,r,o)}}}function Ar(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,g(n,e)}!function(e){e.prototype._init=function(e){var n=this;n._uid=tr++,n._isVue=!0,n.__v_skip=!0,n._scope=new un(!0),n._scope._vm=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=gr(er(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Me(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=ge(n._renderChildren,o),e.$scopedSlots=r?be(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,o){return te(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return te(e,t,n,r,o,!0)};var i=r&&r.data;At(e,"$attrs",i&&i.attrs||t,null,!0),At(e,"$listeners",n._parentListeners||t,null,!0)}(n),Be(n,"beforeCreate",void 0,!1),function(t){var e=Qn(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),kt(!0))}(n),qn(n),function(t){var e=t.$options.provide;if(e){var n=a(e)?e.call(t):e;if(!s(n))return;for(var r=ln(t),o=st?Reflect.ownKeys(n):Object.keys(n),i=0;i<o.length;i++){var c=o[i];Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(n,c))}}}(n),Be(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(Cr),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=jt,t.prototype.$delete=Et,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return Yn(r,t,e,n);(n=n||{}).user=!0;var o=new Vn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');yt(),dn(e,r,[o.value],r,i),_t()}return function(){o.teardown()}}}(Cr),function(t){var n=/^hook:/;t.prototype.$on=function(t,r){var o=this;if(e(t))for(var i=0,a=t.length;i<a;i++)o.$on(t[i],r);else(o._events[t]||(o._events[t]=[])).push(r),n.test(t)&&(o._hasHookEvent=!0);return o},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,n){var r=this;if(!arguments.length)return r._events=Object.create(null),r;if(e(t)){for(var o=0,i=t.length;o<i;o++)r.$off(t[o],n);return r}var a,s=r._events[t];if(!s)return r;if(!n)return r._events[t]=null,r;for(var c=s.length;c--;)if((a=s[c])===n||a.fn===n){s.splice(c,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?O(n):n;for(var r=O(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;i<a;i++)dn(n[i],e,r,e,o)}return e}}(Cr),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Le(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var a=n;a&&a.$vnode&&a.$parent&&a.$vnode===a.$parent._vnode;)a.$parent.$el=a.$el,a=a.$parent},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Be(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||g(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Be(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Cr),function(t){me(t.prototype),t.prototype.$nextTick=function(t){return Cn(t,this)},t.prototype._render=function(){var t,n=this,r=n.$options,o=r.render,i=r._parentVnode;i&&n._isMounted&&(n.$scopedSlots=be(n.$parent,i.data.scopedSlots,n.$slots,n.$scopedSlots),n._slotsProxy&&Se(n._slotsProxy,n.$scopedSlots)),n.$vnode=i;try{ut(n),Ae=n,t=o.call(n._renderProxy,n.$createElement)}catch(e){fn(e,n,"render"),t=n._vnode}finally{Ae=null,ut()}return e(t)&&1===t.length&&(t=t[0]),t instanceof lt||(t=ft()),t.parent=i,t}}(Cr);var jr=[String,RegExp,Array],Er={name:"keep-alive",abstract:!0,props:{include:jr,exclude:jr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:Sr(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&Ar(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ar(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Tr(t,(function(t){return Or(e,t)}))})),this.$watch("exclude",(function(e){Tr(t,(function(t){return!Or(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Ee(t),n=e&&e.componentOptions;if(n){var r=Sr(n),o=this.include,i=this.exclude;if(o&&(!r||!Or(o,r))||i&&r&&Or(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,g(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Nr={KeepAlive:Er};!function(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:lr,extend:T,mergeOptions:gr,defineReactive:At},t.set=jt,t.delete=Et,t.nextTick=Cn,t.observable=function(t){return Tt(t),t},t.options=Object.create(null),R.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,T(t.options.components,Nr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),a(t.install)?t.install.apply(t,n):a(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=gr(this.options,t),this}}(t),kr(t),function(t){R.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&a(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Cr),Object.defineProperty(Cr.prototype,"$isServer",{get:rt}),Object.defineProperty(Cr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cr,"FunctionalRenderContext",{value:nr}),Cr.version=Rn;var Pr=v("style,class"),Dr=v("input,textarea,option,select,progress"),Mr=function(t,e,n){return"value"===n&&Dr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Ir=v("contenteditable,draggable,spellcheck"),Lr=v("events,caret,typing,plaintext-only"),Rr=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Fr="http://www.w3.org/1999/xlink",Hr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Br=function(t){return Hr(t)?t.slice(6,t.length):""},Ur=function(t){return null==t||!1===t};function zr(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Vr(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Vr(e,n.data));return function(t,e){if(r(t)||r(e))return Kr(t,Jr(e));return""}(e.staticClass,e.class)}function Vr(t,e){return{staticClass:Kr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Kr(t,e){return t?e?t+" "+e:t:e||""}function Jr(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o<i;o++)r(e=Jr(t[o]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):s(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var qr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Wr=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Zr=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Gr=function(t){return Wr(t)||Zr(t)};function Xr(t){return Zr(t)?"svg":"math"===t?"math":void 0}var Yr=Object.create(null);var Qr=v("text,number,password,search,email,tel,url");function to(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var eo=Object.freeze({__proto__:null,createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(qr[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),no={create:function(t,e){ro(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ro(t,!0),ro(e))},destroy:function(t){ro(t,!0)}};function ro(t,n){var o=t.data.ref;if(r(o)){var i=t.context,s=t.componentInstance||t.elm,c=n?null:s,u=n?void 0:s;if(a(o))dn(o,i,[c],i,"template ref function");else{var l=t.data.refInFor,f="string"==typeof o||"number"==typeof o,d=Ft(o),p=i.$refs;if(f||d)if(l){var v=f?p[o]:o.value;n?e(v)&&g(v,s):e(v)?v.includes(s)||v.push(s):f?(p[o]=[s],oo(i,o,p[o])):o.value=[s]}else if(f){if(n&&p[o]!==s)return;p[o]=u,oo(i,o,c)}else if(d){if(n&&o.value!==s)return;o.value=c}}}}function oo(t,e,n){var r=t._setupState;r&&_(r,e)&&(Ft(r[e])?r[e].value=n:r[e]=n)}var io=new lt("",{},[]),ao=["create","activate","update","remove","destroy"];function so(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,o=r(n=t.data)&&r(n=n.attrs)&&n.type,i=r(n=e.data)&&r(n=n.attrs)&&n.type;return o===i||Qr(o)&&Qr(i)}(t,e)||o(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function co(t,e,n){var o,i,a={};for(o=e;o<=n;++o)r(i=t[o].key)&&(a[i]=o);return a}var uo={create:lo,update:lo,destroy:function(t){lo(t,io)}};function lo(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,o,i=t===io,a=e===io,s=po(t.data.directives,t.context),c=po(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,ho(o,"update",e,t),o.def&&o.def.componentUpdated&&l.push(o)):(ho(o,"bind",e,t),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n<u.length;n++)ho(u[n],"inserted",e,t)};i?Zt(e,"insert",f):f()}l.length&&Zt(e,"postpatch",(function(){for(var n=0;n<l.length;n++)ho(l[n],"componentUpdated",e,t)}));if(!i)for(n in s)c[n]||ho(s[n],"unbind",t,t,a)}(t,e)}var fo=Object.create(null);function po(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++){if((r=t[n]).modifiers||(r.modifiers=fo),o[vo(r)]=r,e._setupState&&e._setupState.__sfc){var i=r.def||yr(e,"_setupState","v-"+r.name);r.def="function"==typeof i?{bind:i,update:i}:i}r.def=r.def||yr(e.$options,"directives",r.name)}return o}function vo(t){return t.rawName||"".concat(t.name,".").concat(Object.keys(t.modifiers||{}).join("."))}function ho(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(r){fn(r,n.context,"directive ".concat(t.name," ").concat(e," hook"))}}var mo=[no,uo];function go(t,e){var i=e.componentOptions;if(!(r(i)&&!1===i.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var a,s,c=e.elm,u=t.data.attrs||{},l=e.data.attrs||{};for(a in(r(l.__ob__)||o(l._v_attr_proxy))&&(l=e.data.attrs=T({},l)),l)s=l[a],u[a]!==s&&yo(c,a,s,e.data.pre);for(a in(W||G)&&l.value!==u.value&&yo(c,"value",l.value),u)n(l[a])&&(Hr(a)?c.removeAttributeNS(Fr,Br(a)):Ir(a)||c.removeAttribute(a))}}function yo(t,e,n,r){r||t.tagName.indexOf("-")>-1?_o(t,e,n):Rr(e)?Ur(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Ir(e)?t.setAttribute(e,function(t,e){return Ur(e)||"false"===e?"false":"contenteditable"===t&&Lr(e)?e:"true"}(e,n)):Hr(e)?Ur(n)?t.removeAttributeNS(Fr,Br(e)):t.setAttributeNS(Fr,e,n):_o(t,e,n)}function _o(t,e,n){if(Ur(n))t.removeAttribute(e);else{if(W&&!Z&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var bo={create:go,update:go};function $o(t,e){var o=e.elm,i=e.data,a=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=zr(e),c=o._transitionClasses;r(c)&&(s=Kr(s,Jr(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var wo,xo,Co,ko,So,Oo,To={create:$o,update:$o},Ao=/[\w).+\-_$\]]/;function jo(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),a)39===e&&92!==n&&(a=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(u)47===e&&92!==n&&(u=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||l||f||d){switch(e){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===e){for(var v=r-1,h=void 0;v>=0&&" "===(h=t.charAt(v));v--);h&&Ao.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==p&&m(),i)for(r=0;r<i.length;r++)o=Eo(o,i[r]);return o}function Eo(t,e){var n=e.indexOf("(");if(n<0)return'_f("'.concat(e,'")(').concat(t,")");var r=e.slice(0,n),o=e.slice(n+1);return'_f("'.concat(r,'")(').concat(t).concat(")"!==o?","+o:o)}function No(t,e){console.error("[Vue compiler]: ".concat(t))}function Po(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Do(t,e,n,r,o){(t.props||(t.props=[])).push(zo({name:e,value:n,dynamic:o},r)),t.plain=!1}function Mo(t,e,n,r,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(zo({name:e,value:n,dynamic:o},r)),t.plain=!1}function Io(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(zo({name:e,value:n},r))}function Lo(t,e,n,r,o,i,a,s){(t.directives||(t.directives=[])).push(zo({name:e,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),t.plain=!1}function Ro(t,e,n){return n?"_p(".concat(e,',"').concat(t,'")'):t+e}function Fo(e,n,r,o,i,a,s,c){var u;(o=o||t).right?c?n="(".concat(n,")==='click'?'contextmenu':(").concat(n,")"):"click"===n&&(n="contextmenu",delete o.right):o.middle&&(c?n="(".concat(n,")==='click'?'mouseup':(").concat(n,")"):"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=Ro("!",n,c)),o.once&&(delete o.once,n=Ro("~",n,c)),o.passive&&(delete o.passive,n=Ro("&",n,c)),o.native?(delete o.native,u=e.nativeEvents||(e.nativeEvents={})):u=e.events||(e.events={});var l=zo({value:r.trim(),dynamic:c},s);o!==t&&(l.modifiers=o);var f=u[n];Array.isArray(f)?i?f.unshift(l):f.push(l):u[n]=f?i?[l,f]:[f,l]:l,e.plain=!1}function Ho(t,e,n){var r=Bo(t,":"+e)||Bo(t,"v-bind:"+e);if(null!=r)return jo(r);if(!1!==n){var o=Bo(t,e);if(null!=o)return JSON.stringify(o)}}function Bo(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var o=t.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===e){o.splice(i,1);break}return n&&delete t.attrsMap[e],r}function Uo(t,e){for(var n=t.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(e.test(i.name))return n.splice(r,1),i}}function zo(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Vo(t,e,n){var r=n||{},o=r.number,i="$$v",a=i;r.trim&&(a="(typeof ".concat(i," === 'string'")+"? ".concat(i,".trim()")+": ".concat(i,")")),o&&(a="_n(".concat(a,")"));var s=Ko(e,a);t.model={value:"(".concat(e,")"),expression:JSON.stringify(e),callback:"function (".concat(i,") {").concat(s,"}")}}function Ko(t,e){var n=function(t){if(t=t.trim(),wo=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<wo-1)return(ko=t.lastIndexOf("."))>-1?{exp:t.slice(0,ko),key:'"'+t.slice(ko+1)+'"'}:{exp:t,key:null};xo=t,ko=So=Oo=0;for(;!qo();)Wo(Co=Jo())?Go(Co):91===Co&&Zo(Co);return{exp:t.slice(0,So),key:t.slice(So+1,Oo)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function Jo(){return xo.charCodeAt(++ko)}function qo(){return ko>=wo}function Wo(t){return 34===t||39===t}function Zo(t){var e=1;for(So=ko;!qo();)if(Wo(t=Jo()))Go(t);else if(91===t&&e++,93===t&&e--,0===e){Oo=ko;break}}function Go(t){for(var e=t;!qo()&&(t=Jo())!==e;);}var Xo,Yo="__r";function Qo(t,e,n){var r=Xo;return function o(){var i=e.apply(null,arguments);null!==i&&ni(t,o,n,r)}}var ti=mn&&!(Q&&Number(Q[1])<=53);function ei(t,e,n,r){if(ti){var o=We,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Xo.addEventListener(t,e,et?{capture:n,passive:r}:n)}function ni(t,e,n,r){(r||Xo).removeEventListener(t,e._wrapper||e,n)}function ri(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};Xo=e.elm||t.elm,function(t){if(r(t.__r)){var e=W?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}r(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),Wt(o,i,ei,ni,Qo,e.context),Xo=void 0}}var oi,ii={create:ri,update:ri,destroy:function(t){return ri(t,io)}};function ai(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,a,s=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(i in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.domProps=T({},u)),c)i in u||(s[i]="");for(i in u){if(a=u[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),a===c[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=a;var l=n(a)?"":String(a);si(s,l)&&(s.value=l)}else if("innerHTML"===i&&Zr(s.tagName)&&n(s.innerHTML)){(oi=oi||document.createElement("div")).innerHTML="<svg>".concat(a,"</svg>");for(var f=oi.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}else if(a!==c[i])try{s[i]=a}catch(t){}}}}function si(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return p(n)!==p(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var ci={create:ai,update:ai},ui=b((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function li(t){var e=fi(t.style);return t.staticStyle?T(t.staticStyle,e):e}function fi(t){return Array.isArray(t)?A(t):"string"==typeof t?ui(t):t}var di,pi=/^--/,vi=/\s*!important$/,hi=function(t,e,n){if(pi.test(e))t.style.setProperty(e,n);else if(vi.test(n))t.style.setProperty(k(e),n.replace(vi,""),"important");else{var r=gi(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},mi=["Webkit","Moz","ms"],gi=b((function(t){if(di=di||document.createElement("div").style,"filter"!==(t=w(t))&&t in di)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<mi.length;n++){var r=mi[n]+e;if(r in di)return r}}));function yi(t,e){var o=e.data,i=t.data;if(!(n(o.staticStyle)&&n(o.style)&&n(i.staticStyle)&&n(i.style))){var a,s,c=e.elm,u=i.staticStyle,l=i.normalizedStyle||i.style||{},f=u||l,d=fi(e.data.style)||{};e.data.normalizedStyle=r(d.__ob__)?T({},d):d;var p=function(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=li(o.data))&&T(r,n);(n=li(t.data))&&T(r,n);for(var i=t;i=i.parent;)i.data&&(n=li(i.data))&&T(r,n);return r}(e,!0);for(s in f)n(p[s])&&hi(c,s,"");for(s in p)(a=p[s])!==f[s]&&hi(c,s,null==a?"":a)}}var _i={create:yi,update:yi},bi=/\s+/;function $i(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(bi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function wi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(bi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function xi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&T(e,Ci(t.name||"v")),T(e,t),e}return"string"==typeof t?Ci(t):void 0}}var Ci=b((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),ki=J&&!Z,Si="transition",Oi="animation",Ti="transition",Ai="transitionend",ji="animation",Ei="animationend";ki&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ti="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ji="WebkitAnimation",Ei="webkitAnimationEnd"));var Ni=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Pi(t){Ni((function(){Ni(t)}))}function Di(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),$i(t,e))}function Mi(t,e){t._transitionClasses&&g(t._transitionClasses,e),wi(t,e)}function Ii(t,e,n){var r=Ri(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Si?Ai:Ei,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c<a&&u()}),i+1),t.addEventListener(s,l)}var Li=/\b(transform|all)(,|$)/;function Ri(t,e){var n,r=window.getComputedStyle(t),o=(r[Ti+"Delay"]||"").split(", "),i=(r[Ti+"Duration"]||"").split(", "),a=Fi(o,i),s=(r[ji+"Delay"]||"").split(", "),c=(r[ji+"Duration"]||"").split(", "),u=Fi(s,c),l=0,f=0;return e===Si?a>0&&(n=Si,l=a,f=i.length):e===Oi?u>0&&(n=Oi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Si:Oi:null)?n===Si?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Si&&Li.test(r[Ti+"Property"])}}function Fi(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return Hi(e)+Hi(t[n])})))}function Hi(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Bi(t,e){var o=t.elm;r(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var i=xi(t.data.transition);if(!n(i)&&!r(o._enterCb)&&1===o.nodeType){for(var c=i.css,u=i.type,l=i.enterClass,f=i.enterToClass,d=i.enterActiveClass,v=i.appearClass,h=i.appearToClass,m=i.appearActiveClass,g=i.beforeEnter,y=i.enter,_=i.afterEnter,b=i.enterCancelled,$=i.beforeAppear,w=i.appear,x=i.afterAppear,C=i.appearCancelled,k=i.duration,S=Ie,O=Ie.$vnode;O&&O.parent;)S=O.context,O=O.parent;var T=!S._isMounted||!t.isRootInsert;if(!T||w||""===w){var A=T&&v?v:l,j=T&&m?m:d,E=T&&h?h:f,N=T&&$||g,P=T&&a(w)?w:y,D=T&&x||_,I=T&&C||b,L=p(s(k)?k.enter:k),R=!1!==c&&!Z,F=Vi(P),H=o._enterCb=M((function(){R&&(Mi(o,E),Mi(o,j)),H.cancelled?(R&&Mi(o,A),I&&I(o)):D&&D(o),o._enterCb=null}));t.data.show||Zt(t,"insert",(function(){var e=o.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),P&&P(o,H)})),N&&N(o),R&&(Di(o,A),Di(o,j),Pi((function(){Mi(o,A),H.cancelled||(Di(o,E),F||(zi(L)?setTimeout(H,L):Ii(o,u,H)))}))),t.data.show&&(e&&e(),P&&P(o,H)),R||F||H()}}}function Ui(t,e){var o=t.elm;r(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var i=xi(t.data.transition);if(n(i)||1!==o.nodeType)return e();if(!r(o._leaveCb)){var a=i.css,c=i.type,u=i.leaveClass,l=i.leaveToClass,f=i.leaveActiveClass,d=i.beforeLeave,v=i.leave,h=i.afterLeave,m=i.leaveCancelled,g=i.delayLeave,y=i.duration,_=!1!==a&&!Z,b=Vi(v),$=p(s(y)?y.leave:y),w=o._leaveCb=M((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),_&&(Mi(o,l),Mi(o,f)),w.cancelled?(_&&Mi(o,u),m&&m(o)):(e(),h&&h(o)),o._leaveCb=null}));g?g(x):x()}function x(){w.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),_&&(Di(o,u),Di(o,f),Pi((function(){Mi(o,u),w.cancelled||(Di(o,l),b||(zi($)?setTimeout(w,$):Ii(o,c,w)))}))),v&&v(o,w),_||b||w())}}function zi(t){return"number"==typeof t&&!isNaN(t)}function Vi(t){if(n(t))return!1;var e=t.fns;return r(e)?Vi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Ki(t,e){!0!==e.data.show&&Bi(e)}var Ji=function(t){var a,s,c={},u=t.modules,l=t.nodeOps;for(a=0;a<ao.length;++a)for(c[ao[a]]=[],s=0;s<u.length;++s)r(u[s][ao[a]])&&c[ao[a]].push(u[s][ao[a]]);function f(t){var e=l.parentNode(t);r(e)&&l.removeChild(e,t)}function d(t,e,n,i,a,s,u){if(r(t.elm)&&r(s)&&(t=s[u]=pt(t)),t.isRootInsert=!a,!function(t,e,n,i){var a=t.data;if(r(a)){var s=r(t.componentInstance)&&a.keepAlive;if(r(a=a.hook)&&r(a=a.init)&&a(t,!1),r(t.componentInstance))return p(t,e),h(n,t.elm,i),o(s)&&function(t,e,n,o){var i,a=t;for(;a.componentInstance;)if(r(i=(a=a.componentInstance._vnode).data)&&r(i=i.transition)){for(i=0;i<c.activate.length;++i)c.activate[i](io,a);e.push(a);break}h(n,t.elm,o)}(t,e,n,i),!0}}(t,e,n,i)){var f=t.data,d=t.children,v=t.tag;r(v)?(t.elm=t.ns?l.createElementNS(t.ns,v):l.createElement(v,t),_(t),m(t,d,e),r(f)&&y(t,e),h(n,t.elm,i)):o(t.isComment)?(t.elm=l.createComment(t.text),h(n,t.elm,i)):(t.elm=l.createTextNode(t.text),h(n,t.elm,i))}}function p(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,g(t)?(y(t,e),_(t)):(ro(t),e.push(t))}function h(t,e,n){r(t)&&(r(n)?l.parentNode(n)===t&&l.insertBefore(t,e,n):l.appendChild(t,e))}function m(t,n,r){if(e(n))for(var o=0;o<n.length;++o)d(n[o],r,t.elm,null,!0,n,o);else i(t.text)&&l.appendChild(t.elm,l.createTextNode(String(t.text)))}function g(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function y(t,e){for(var n=0;n<c.create.length;++n)c.create[n](io,t);r(a=t.data.hook)&&(r(a.create)&&a.create(io,t),r(a.insert)&&e.push(t))}function _(t){var e;if(r(e=t.fnScopeId))l.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e),n=n.parent;r(e=Ie)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e)}function b(t,e,n,r,o,i){for(;r<=o;++r)d(n[r],i,t,e,!1,n,r)}function $(t){var e,n,o=t.data;if(r(o))for(r(e=o.hook)&&r(e=e.destroy)&&e(t),e=0;e<c.destroy.length;++e)c.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)$(t.children[n])}function w(t,e,n){for(;e<=n;++e){var o=t[e];r(o)&&(r(o.tag)?(x(o),$(o)):f(o.elm))}}function x(t,e){if(r(e)||r(t.data)){var n,o=c.remove.length+1;for(r(e)?e.listeners+=o:e=function(t,e){function n(){0==--n.listeners&&f(t)}return n.listeners=e,n}(t.elm,o),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&x(n,e),n=0;n<c.remove.length;++n)c.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else f(t.elm)}function C(t,e,n,o){for(var i=n;i<o;i++){var a=e[i];if(r(a)&&so(t,a))return i}}function k(t,e,i,a,s,u){if(t!==e){r(e.elm)&&r(a)&&(e=a[s]=pt(e));var f=e.elm=t.elm;if(o(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?T(t.elm,e,i):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var p,v=e.data;r(v)&&r(p=v.hook)&&r(p=p.prepatch)&&p(t,e);var h=t.children,m=e.children;if(r(v)&&g(e)){for(p=0;p<c.update.length;++p)c.update[p](t,e);r(p=v.hook)&&r(p=p.update)&&p(t,e)}n(e.text)?r(h)&&r(m)?h!==m&&function(t,e,o,i,a){for(var s,c,u,f=0,p=0,v=e.length-1,h=e[0],m=e[v],g=o.length-1,y=o[0],_=o[g],$=!a;f<=v&&p<=g;)n(h)?h=e[++f]:n(m)?m=e[--v]:so(h,y)?(k(h,y,i,o,p),h=e[++f],y=o[++p]):so(m,_)?(k(m,_,i,o,g),m=e[--v],_=o[--g]):so(h,_)?(k(h,_,i,o,g),$&&l.insertBefore(t,h.elm,l.nextSibling(m.elm)),h=e[++f],_=o[--g]):so(m,y)?(k(m,y,i,o,p),$&&l.insertBefore(t,m.elm,h.elm),m=e[--v],y=o[++p]):(n(s)&&(s=co(e,f,v)),n(c=r(y.key)?s[y.key]:C(y,e,f,v))?d(y,i,t,h.elm,!1,o,p):so(u=e[c],y)?(k(u,y,i,o,p),e[c]=void 0,$&&l.insertBefore(t,u.elm,h.elm)):d(y,i,t,h.elm,!1,o,p),y=o[++p]);f>v?b(t,n(o[g+1])?null:o[g+1].elm,o,p,g,i):p>g&&w(e,f,v)}(f,h,m,i,u):r(m)?(r(t.text)&&l.setTextContent(f,""),b(f,null,m,0,m.length-1,i)):r(h)?w(h,0,h.length-1):r(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),r(v)&&r(p=v.hook)&&r(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var O=v("attrs,class,staticClass,staticStyle,key");function T(t,e,n,i){var a,s=e.tag,c=e.data,u=e.children;if(i=i||c&&c.pre,e.elm=t,o(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(c)&&(r(a=c.hook)&&r(a=a.init)&&a(e,!0),r(a=e.componentInstance)))return p(e,n),!0;if(r(s)){if(r(u))if(t.hasChildNodes())if(r(a=c)&&r(a=a.domProps)&&r(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var l=!0,f=t.firstChild,d=0;d<u.length;d++){if(!f||!T(f,u[d],n,i)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else m(e,u,n);if(r(c)){var v=!1;for(var h in c)if(!O(h)){v=!0,y(e,n);break}!v&&c.class&&Bn(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,i,a){if(!n(e)){var s,u=!1,f=[];if(n(t))u=!0,d(e,f);else{var p=r(t.nodeType);if(!p&&so(t,e))k(t,e,f,null,null,a);else{if(p){if(1===t.nodeType&&t.hasAttribute(L)&&(t.removeAttribute(L),i=!0),o(i)&&T(t,e,f))return S(e,f,!0),t;s=t,t=new lt(l.tagName(s).toLowerCase(),{},[],void 0,s)}var v=t.elm,h=l.parentNode(v);if(d(e,f,v._leaveCb?null:h,l.nextSibling(v)),r(e.parent))for(var m=e.parent,y=g(e);m;){for(var _=0;_<c.destroy.length;++_)c.destroy[_](m);if(m.elm=e.elm,y){for(var b=0;b<c.create.length;++b)c.create[b](io,m);var x=m.data.hook.insert;if(x.merged)for(var C=1;C<x.fns.length;C++)x.fns[C]()}else ro(m);m=m.parent}r(h)?w([t],0,0):r(t.tag)&&$(t)}}return S(e,f,u),e.elm}r(t)&&$(t)}}({nodeOps:eo,modules:[bo,To,ii,ci,_i,J?{create:Ki,activate:Ki,remove:function(t,e){!0!==t.data.show?Ui(t,e):e()}}:{}].concat(mo)});Z&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ta(t,"input")}));var qi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Zt(n,"postpatch",(function(){qi.componentUpdated(t,e,n)})):Wi(t,e,n.context),t._vOptions=[].map.call(t.options,Xi)):("textarea"===n.tag||Qr(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Yi),t.addEventListener("compositionend",Qi),t.addEventListener("change",Qi),Z&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Wi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Xi);if(o.some((function(t,e){return!P(t,r[e])})))(t.multiple?e.value.some((function(t){return Gi(t,o)})):e.value!==e.oldValue&&Gi(e.value,o))&&ta(t,"change")}}};function Wi(t,e,n){Zi(t,e),(W||G)&&setTimeout((function(){Zi(t,e)}),0)}function Zi(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],o)i=D(r,Xi(a))>-1,a.selected!==i&&(a.selected=i);else if(P(Xi(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Gi(t,e){return e.every((function(e){return!P(e,t)}))}function Xi(t){return"_value"in t?t._value:t.value}function Yi(t){t.target.composing=!0}function Qi(t){t.target.composing&&(t.target.composing=!1,ta(t.target,"input"))}function ta(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function ea(t){return!t.componentInstance||t.data&&t.data.transition?t:ea(t.componentInstance._vnode)}var na={bind:function(t,e,n){var r=e.value,o=(n=ea(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Bi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=ea(n)).data&&n.data.transition?(n.data.show=!0,r?Bi(n,(function(){t.style.display=t.__vOriginalDisplay})):Ui(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},ra={model:qi,show:na},oa={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ia(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ia(Ee(e.children)):t}function aa(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[w(r)]=o[r];return e}function sa(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ca=function(t){return t.tag||_e(t)},ua=function(t){return"show"===t.name},la={name:"transition",props:oa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ca)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var a=ia(o);if(!a)return o;if(this._leaving)return sa(t,o);var s="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=aa(this),u=this._vnode,l=ia(u);if(a.data.directives&&a.data.directives.some(ua)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!_e(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,Zt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),sa(t,o);if("in-out"===r){if(_e(a))return u;var d,p=function(){d()};Zt(c,"afterEnter",p),Zt(c,"enterCancelled",p),Zt(f,"delayLeave",(function(t){d=t}))}}return o}}},fa=T({tag:String,moveClass:String},oa);delete fa.mode;var da={props:fa,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Le(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=aa(this),s=0;s<o.length;s++){(l=o[s]).tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(i.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(r){var c=[],u=[];for(s=0;s<r.length;s++){var l;(l=r[s]).data.transition=a,l.data.pos=l.elm.getBoundingClientRect(),n[l.key]?c.push(l):u.push(l)}this.kept=t(e,null,c),this.removed=u}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(pa),t.forEach(va),t.forEach(ha),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;Di(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ai,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ai,t),n._moveCb=null,Mi(n,e))})}})))},methods:{hasMove:function(t,e){if(!ki)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){wi(n,t)})),$i(n,e),n.style.display="none",this.$el.appendChild(n);var r=Ri(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function pa(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function va(t){t.data.newPos=t.elm.getBoundingClientRect()}function ha(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var ma={Transition:la,TransitionGroup:da};Cr.config.mustUseProp=Mr,Cr.config.isReservedTag=Gr,Cr.config.isReservedAttr=Pr,Cr.config.getTagNamespace=Xr,Cr.config.isUnknownElement=function(t){if(!J)return!0;if(Gr(t))return!1;if(t=t.toLowerCase(),null!=Yr[t])return Yr[t];var e=document.createElement(t);return t.indexOf("-")>-1?Yr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Yr[t]=/HTMLUnknownElement/.test(e.toString())},T(Cr.options.directives,ra),T(Cr.options.components,ma),Cr.prototype.__patch__=J?Ji:j,Cr.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=ft),Be(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Vn(t,r,j,{before:function(){t._isMounted&&!t._isDestroyed&&Be(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i<o.length;i++)o[i].run();return null==t.$vnode&&(t._isMounted=!0,Be(t,"mounted")),t}(this,t=t&&J?to(t):void 0,e)},J&&setTimeout((function(){H.devtools&&ot&&ot.emit("init",Cr)}),0);var ga=/\{\{((?:.|\r?\n)+?)\}\}/g,ya=/[-.*+?^${}()|[\]\/\\]/g,_a=b((function(t){var e=t[0].replace(ya,"\\$&"),n=t[1].replace(ya,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var ba={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Bo(t,"class");n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));var r=Ho(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:".concat(t.staticClass,",")),t.classBinding&&(e+="class:".concat(t.classBinding,",")),e}};var $a,wa={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Bo(t,"style");n&&(t.staticStyle=JSON.stringify(ui(n)));var r=Ho(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:".concat(t.staticStyle,",")),t.styleBinding&&(e+="style:(".concat(t.styleBinding,"),")),e}},xa=function(t){return($a=$a||document.createElement("div")).innerHTML=t,$a.textContent},Ca=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ka=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Sa=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Oa=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ta=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Aa="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(B.source,"]*"),ja="((?:".concat(Aa,"\\:)?").concat(Aa,")"),Ea=new RegExp("^<".concat(ja)),Na=/^\s*(\/?)>/,Pa=new RegExp("^<\\/".concat(ja,"[^>]*>")),Da=/^<!DOCTYPE [^>]+>/i,Ma=/^<!\--/,Ia=/^<!\[/,La=v("script,style,textarea",!0),Ra={},Fa={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Ha=/&(?:lt|gt|quot|amp|#39);/g,Ba=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Ua=v("pre,textarea",!0),za=function(t,e){return t&&Ua(t)&&"\n"===e[0]};function Va(t,e){var n=e?Ba:Ha;return t.replace(n,(function(t){return Fa[t]}))}function Ka(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||E,s=e.canBeLeftOpenTag||E,c=0,u=function(){if(n=t,r&&La(r)){var u=0,d=r.toLowerCase(),p=Ra[d]||(Ra[d]=new RegExp("([\\s\\S]*?)(</"+d+"[^>]*>)","i"));w=t.replace(p,(function(t,n,r){return u=r.length,La(d)||"noscript"===d||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),za(d,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-w.length,t=w,f(d,c-u,c)}else{var v=t.indexOf("<");if(0===v){if(Ma.test(t)){var h=t.indexOf("--\x3e");if(h>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,h),c,c+h+3),l(h+3),"continue"}if(Ia.test(t)){var m=t.indexOf("]>");if(m>=0)return l(m+2),"continue"}var g=t.match(Da);if(g)return l(g[0].length),"continue";var y=t.match(Pa);if(y){var _=c;return l(y[0].length),f(y[1],_,c),"continue"}var b=function(){var e=t.match(Ea);if(e){var n={tagName:e[1],attrs:[],start:c};l(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Na))&&(o=t.match(Ta)||t.match(Oa));)o.start=c,l(o[0].length),o.end=c,n.attrs.push(o);if(r)return n.unarySlash=r[1],l(r[0].length),n.end=c,n}}();if(b)return function(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&Sa(n)&&f(r),s(n)&&r===n&&f(n));for(var u=a(n)||!!c,l=t.attrs.length,d=new Array(l),p=0;p<l;p++){var v=t.attrs[p],h=v[3]||v[4]||v[5]||"",m="a"===n&&"href"===v[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;d[p]={name:v[1],value:Va(h,m)}}u||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:t.start,end:t.end}),r=n);e.start&&e.start(n,d,u,t.start,t.end)}(b),za(b.tagName,t)&&l(1),"continue"}var $=void 0,w=void 0,x=void 0;if(v>=0){for(w=t.slice(v);!(Pa.test(w)||Ea.test(w)||Ma.test(w)||Ia.test(w)||(x=w.indexOf("<",1))<0);)v+=x,w=t.slice(v);$=t.substring(0,v)}v<0&&($=t),$&&l($.length),e.chars&&$&&e.chars($,c-$.length,c)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===u())break}function l(e){c+=e,t=t.substring(e)}function f(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}f()}var Ja,qa,Wa,Za,Ga,Xa,Ya,Qa,ts=/^@|^v-on:/,es=/^v-|^@|^:|^#/,ns=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,rs=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,os=/^\(|\)$/g,is=/^\[.*\]$/,as=/:(.*)$/,ss=/^:|^\.|^v-bind:/,cs=/\.[^.\]]+(?=[^\]]*$)/g,us=/^v-slot(:|$)|^#/,ls=/[\r\n]/,fs=/[ \f\t\r\n]+/g,ds=b(xa),ps="_empty_";function vs(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:$s(e),rawAttrsMap:{},parent:n,children:[]}}function hs(t,e){Ja=e.warn||No,Xa=e.isPreTag||E,Ya=e.mustUseProp||E,Qa=e.getTagNamespace||E,e.isReservedTag,Wa=Po(e.modules,"transformNode"),Za=Po(e.modules,"preTransformNode"),Ga=Po(e.modules,"postTransformNode"),qa=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=ms(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&ys(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),u&&u.if&&ys(u,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,u;t.children=t.children.filter((function(t){return!t.slotScope})),l(t),t.pre&&(s=!1),Xa(t.tag)&&(c=!1);for(var f=0;f<Ga.length;f++)Ga[f](t,e)}function l(t){if(!c)for(var e=void 0;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return Ka(t,{warn:Ja,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,l,f){var d=r&&r.ns||Qa(t);W&&"svg"===d&&(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];ws.test(r.name)||(r.name=r.name.replace(xs,""),e.push(r))}return e}(i));var p,v=vs(t,i,r);d&&(v.ns=d),"style"!==(p=v).tag&&("script"!==p.tag||p.attrsMap.type&&"text/javascript"!==p.attrsMap.type)||rt()||(v.forbidden=!0);for(var h=0;h<Za.length;h++)v=Za[h](v,e)||v;s||(!function(t){null!=Bo(t,"v-pre")&&(t.pre=!0)}(v),v.pre&&(s=!0)),Xa(v.tag)&&(c=!0),s?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),o=0;o<n;o++)r[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(r[o].start=e[o].start,r[o].end=e[o].end);else t.pre||(t.plain=!0)}(v):v.processed||(gs(v),function(t){var e=Bo(t,"v-if");if(e)t.if=e,ys(t,{exp:e,block:t});else{null!=Bo(t,"v-else")&&(t.else=!0);var n=Bo(t,"v-else-if");n&&(t.elseif=n)}}(v),function(t){null!=Bo(t,"v-once")&&(t.once=!0)}(v)),n||(n=v),a?u(v):(r=v,o.push(v))},end:function(t,e,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],u(i)},chars:function(t,e,n){if(r&&(!W||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var o,u=r.children;if(t=c||t.trim()?"script"===(o=r).tag||"style"===o.tag?t:ds(t):u.length?a?"condense"===a&&ls.test(t)?"":" ":i?" ":"":""){c||"condense"!==a||(t=t.replace(fs," "));var l=void 0,f=void 0;!s&&" "!==t&&(l=function(t,e){var n=e?_a(e):ga;if(n.test(t)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(o=r.index)>c&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=jo(r[1].trim());a.push("_s(".concat(u,")")),s.push({"@binding":u}),c=o+r[0].length}return c<t.length&&(s.push(i=t.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}(t,qa))?f={type:2,expression:l.expression,tokens:l.tokens,text:t}:" "===t&&u.length&&" "===u[u.length-1].text||(f={type:3,text:t}),f&&u.push(f)}}},comment:function(t,e,n){if(r){var o={type:3,text:t,isComment:!0};r.children.push(o)}}}),n}function ms(t,e){var n,r;(r=Ho(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Ho(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Bo(t,"scope"),t.slotScope=e||Bo(t,"slot-scope")):(e=Bo(t,"slot-scope"))&&(t.slotScope=e);var n=Ho(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Mo(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){if(a=Uo(t,us)){var r=_s(a),o=r.name,i=r.dynamic;t.slotTarget=o,t.slotTargetDynamic=i,t.slotScope=a.value||ps}}else{var a;if(a=Uo(t,us)){var s=t.scopedSlots||(t.scopedSlots={}),c=_s(a),u=c.name,l=(i=c.dynamic,s[u]=vs("template",[],t));l.slotTarget=u,l.slotTargetDynamic=i,l.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=l,!0})),l.slotScope=a.value||ps,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Ho(t,"name"))}(t),function(t){var e;(e=Ho(t,"is"))&&(t.component=e);null!=Bo(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<Wa.length;o++)t=Wa[o](t,e)||t;return function(t){var e,n,r,o,i,a,s,c,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=o=u[e].name,i=u[e].value,es.test(r))if(t.hasBindings=!0,(a=bs(r.replace(es,"")))&&(r=r.replace(cs,"")),ss.test(r))r=r.replace(ss,""),i=jo(i),(c=is.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=w(r))&&(r="innerHTML"),a.camel&&!c&&(r=w(r)),a.sync&&(s=Ko(i,"$event"),c?Fo(t,'"update:"+('.concat(r,")"),s,null,!1,0,u[e],!0):(Fo(t,"update:".concat(w(r)),s,null,!1,0,u[e]),k(r)!==w(r)&&Fo(t,"update:".concat(k(r)),s,null,!1,0,u[e])))),a&&a.prop||!t.component&&Ya(t.tag,t.attrsMap.type,r)?Do(t,r,i,u[e],c):Mo(t,r,i,u[e],c);else if(ts.test(r))r=r.replace(ts,""),(c=is.test(r))&&(r=r.slice(1,-1)),Fo(t,r,i,a,!1,0,u[e],c);else{var l=(r=r.replace(es,"")).match(as),f=l&&l[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),is.test(f)&&(f=f.slice(1,-1),c=!0)),Lo(t,r,o,i,f,c,a,u[e])}else Mo(t,r,JSON.stringify(i),u[e]),!t.component&&"muted"===r&&Ya(t.tag,t.attrsMap.type,r)&&Do(t,r,"true",u[e])}(t),t}function gs(t){var e;if(e=Bo(t,"v-for")){var n=function(t){var e=t.match(ns);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(os,""),o=r.match(rs);o?(n.alias=r.replace(rs,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(e);n&&T(t,n)}}function ys(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function _s(t){var e=t.name.replace(us,"");return e||"#"!==t.name[0]&&(e="default"),is.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'.concat(e,'"'),dynamic:!1}}function bs(t){var e=t.match(cs);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function $s(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var ws=/^xmlns:NS\d+/,xs=/^NS\d+:/;function Cs(t){return vs(t.tag,t.attrsList.slice(),t.parent)}var ks=[ba,wa,{preTransformNode:function(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r=void 0;if((n[":type"]||n["v-bind:type"])&&(r=Ho(t,"type")),n.type||r||!n["v-bind"]||(r="(".concat(n["v-bind"],").type")),r){var o=Bo(t,"v-if",!0),i=o?"&&(".concat(o,")"):"",a=null!=Bo(t,"v-else",!0),s=Bo(t,"v-else-if",!0),c=Cs(t);gs(c),Io(c,"type","checkbox"),ms(c,e),c.processed=!0,c.if="(".concat(r,")==='checkbox'")+i,ys(c,{exp:c.if,block:c});var u=Cs(t);Bo(u,"v-for",!0),Io(u,"type","radio"),ms(u,e),ys(c,{exp:"(".concat(r,")==='radio'")+i,block:u});var l=Cs(t);return Bo(l,"v-for",!0),Io(l,":type",r),ms(l,e),ys(c,{exp:o,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Ss,Os,Ts={model:function(t,e,n){var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return Vo(t,r,o),!1;if("select"===i)!function(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(r?"_n(val)":"val","})"),i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = ".concat(o,";");a="".concat(a," ").concat(Ko(e,i)),Fo(t,"change",a,null,!0)}(t,r,o);else if("input"===i&&"checkbox"===a)!function(t,e,n){var r=n&&n.number,o=Ho(t,"value")||"null",i=Ho(t,"true-value")||"true",a=Ho(t,"false-value")||"false";Do(t,"checked","Array.isArray(".concat(e,")")+"?_i(".concat(e,",").concat(o,")>-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),Fo(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(a,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Ko(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Ko(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Ko(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Ho(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Do(t,"checked","_q(".concat(e,",").concat(o,")")),Fo(t,"change",Ko(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?Yo:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n(".concat(l,")"));var f=Ko(e,l);c&&(f="if($event.target.composing)return;".concat(f));Do(t,"value","(".concat(e,")")),Fo(t,u,f,null,!0),(s||a)&&Fo(t,"blur","$forceUpdate()")}(t,r,o);else if(!H.isReservedTag(i))return Vo(t,r,o),!1;return!0},text:function(t,e){e.value&&Do(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Do(t,"innerHTML","_s(".concat(e.value,")"),e)}},As={expectHTML:!0,modules:ks,directives:Ts,isPreTag:function(t){return"pre"===t},isUnaryTag:Ca,mustUseProp:Mr,canBeLeftOpenTag:ka,isReservedTag:Gr,getTagNamespace:Xr,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(ks)},js=b((function(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Es(t,e){t&&(Ss=js(e.staticKeys||""),Os=e.isReservedTag||E,Ns(t),Ps(t,!1))}function Ns(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||h(t.tag)||!Os(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Ss)))}(t),1===t.type){if(!Os(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Ns(r),r.static||(t.static=!1)}if(t.ifConditions)for(e=1,n=t.ifConditions.length;e<n;e++){var o=t.ifConditions[e].block;Ns(o),o.static||(t.static=!1)}}}function Ps(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ps(t.children[n],e||!!t.for);if(t.ifConditions)for(n=1,r=t.ifConditions.length;n<r;n++)Ps(t.ifConditions[n].block,e)}}var Ds=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Ms=/\([^)]*?\);*$/,Is=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ls={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Rs={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Fs=function(t){return"if(".concat(t,")return null;")},Hs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Fs("$event.target !== $event.currentTarget"),ctrl:Fs("!$event.ctrlKey"),shift:Fs("!$event.shiftKey"),alt:Fs("!$event.altKey"),meta:Fs("!$event.metaKey"),left:Fs("'button' in $event && $event.button !== 0"),middle:Fs("'button' in $event && $event.button !== 1"),right:Fs("'button' in $event && $event.button !== 2")};function Bs(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=Us(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(a,","):r+='"'.concat(i,'":').concat(a,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function Us(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return Us(t)})).join(","),"]");var e=Is.test(t.value),n=Ds.test(t.value),r=Is.test(t.value.replace(Ms,""));if(t.modifiers){var o="",i="",a=[],s=function(e){if(Hs[e])i+=Hs[e],Ls[e]&&a.push(e);else if("exact"===e){var n=t.modifiers;i+=Fs(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else a.push(e)};for(var c in t.modifiers)s(c);a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(zs).join("&&"),")return null;")}(a)),i&&(o+=i);var u=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(u,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function zs(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Ls[t],r=Rs[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var Vs={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:j},Ks=function(t){this.options=t,this.warn=t.warn||No,this.transforms=Po(t.modules,"transformCode"),this.dataGenFns=Po(t.modules,"genData"),this.directives=T(T({},Vs),t.directives);var e=t.isReservedTag||E;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Js(t,e){var n=new Ks(e),r=t?"script"===t.tag?"null":qs(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function qs(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Ws(t,e);if(t.once&&!t.onceProcessed)return Zs(t,e);if(t.for&&!t.forProcessed)return Ys(t,e);if(t.if&&!t.ifProcessed)return Gs(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=nc(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?ic((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=",".concat(i));a&&(o+="".concat(i?"":",null",",").concat(a));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:nc(e,n,!0);return"_c(".concat(t,",").concat(Qs(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,o=e.maybeComponent(t);(!t.plain||t.pre&&o)&&(r=Qs(t,e));var i=void 0,a=e.options.bindings;o&&a&&!1!==a.__isScriptSetup&&(i=function(t,e){var n=w(e),r=x(n),o=function(o){return t[e]===o?e:t[n]===o?n:t[r]===o?r:void 0},i=o("setup-const")||o("setup-reactive-const");if(i)return i;var a=o("setup-let")||o("setup-ref")||o("setup-maybe-ref");if(a)return a}(a,t.tag)),i||(i="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:nc(t,e,!0);n="_c(".concat(i).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var c=0;c<e.transforms.length;c++)n=e.transforms[c](t,n);return n}return nc(t,e)||"void 0"}function Ws(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return ".concat(qs(t,e),"}")),e.pre=n,"_m(".concat(e.staticRenderFns.length-1).concat(t.staticInFor?",true":"",")")}function Zs(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Gs(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o(".concat(qs(t,e),",").concat(e.onceId++,",").concat(n,")"):qs(t,e)}return Ws(t,e)}function Gs(t,e,n,r){return t.ifProcessed=!0,Xs(t.ifConditions.slice(),e,n,r)}function Xs(t,e,n,r){if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"(".concat(o.exp,")?").concat(i(o.block),":").concat(Xs(t,e,n,r)):"".concat(i(o.block));function i(t){return n?n(t,e):t.once?Zs(t,e):qs(t,e)}}function Ys(t,e,n,r){var o=t.for,i=t.alias,a=t.iterator1?",".concat(t.iterator1):"",s=t.iterator2?",".concat(t.iterator2):"";return t.forProcessed=!0,"".concat(r||"_l","((").concat(o,"),")+"function(".concat(i).concat(a).concat(s,"){")+"return ".concat((n||qs)(t,e))+"})"}function Qs(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=e.directives[i.name];u&&(a=!!u(t,i,e.warn)),a&&(c=!0,s+='{name:"'.concat(i.name,'",rawName:"').concat(i.rawName,'"').concat(i.value?",value:(".concat(i.value,"),expression:").concat(JSON.stringify(i.value)):"").concat(i.arg?",arg:".concat(i.isDynamicArg?i.arg:'"'.concat(i.arg,'"')):"").concat(i.modifiers?",modifiers:".concat(JSON.stringify(i.modifiers)):"","},"))}if(c)return s.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:".concat(t.key,",")),t.ref&&(n+="ref:".concat(t.ref,",")),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'.concat(t.tag,'",'));for(var o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+="attrs:".concat(ic(t.attrs),",")),t.props&&(n+="domProps:".concat(ic(t.props),",")),t.events&&(n+="".concat(Bs(t.events,!1),",")),t.nativeEvents&&(n+="".concat(Bs(t.nativeEvents,!0),",")),t.slotTarget&&!t.slotScope&&(n+="slot:".concat(t.slotTarget,",")),t.scopedSlots&&(n+="".concat(function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||tc(n)})),o=!!t.if;if(!r)for(var i=t.parent;i;){if(i.slotScope&&i.slotScope!==ps||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}var a=Object.keys(e).map((function(t){return ec(e[t],n)})).join(",");return"scopedSlots:_u([".concat(a,"]").concat(r?",null,true":"").concat(!r&&o?",null,false,".concat(function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(a)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Js(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(ic(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function tc(t){return 1===t.type&&("slot"===t.tag||t.children.some(tc))}function ec(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Gs(t,e,ec,"null");if(t.for&&!t.forProcessed)return Ys(t,e,ec);var r=t.slotScope===ps?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(nc(t,e)||"undefined",":undefined"):nc(t,e)||"undefined":qs(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function nc(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return"".concat((r||qs)(a,e)).concat(s)}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var o=t[r];if(1===o.type){if(rc(o)||o.ifConditions&&o.ifConditions.some((function(t){return rc(t.block)}))){n=2;break}(e(o)||o.ifConditions&&o.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(i,e.maybeComponent):0,u=o||oc;return"[".concat(i.map((function(t){return u(t,e)})).join(","),"]").concat(c?",".concat(c):"")}}function rc(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function oc(t,e){return 1===t.type?qs(t,e):3===t.type&&t.isComment?function(t){return"_e(".concat(JSON.stringify(t.text),")")}(t):function(t){return"_v(".concat(2===t.type?t.expression:ac(JSON.stringify(t.text)),")")}(t)}function ic(t){for(var e="",n="",r=0;r<t.length;r++){var o=t[r],i=ac(o.value);o.dynamic?n+="".concat(o.name,",").concat(i,","):e+='"'.concat(o.name,'":').concat(i,",")}return e="{".concat(e.slice(0,-1),"}"),n?"_d(".concat(e,",[").concat(n.slice(0,-1),"])"):e}function ac(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function sc(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),j}}function cc(t){var e=Object.create(null);return function(n,r,o){(r=T({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(e[i])return e[i];var a=t(n,r),s={},c=[];return s.render=sc(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(t){return sc(t,c)})),e[i]=s}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var uc,lc,fc=(uc=function(t,e){var n=hs(t.trim(),e);!1!==e.optimize&&Es(n,e);var r=Js(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),o=[],i=[];if(n)for(var a in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=T(Object.create(t.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(t,e,n){(n?i:o).push(t)};var s=uc(e.trim(),r);return s.errors=o,s.tips=i,s}return{compile:e,compileToFunctions:cc(e)}}),dc=fc(As).compileToFunctions;function pc(t){return(lc=lc||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',lc.innerHTML.indexOf("&#10;")>0}var vc=!!J&&pc(!1),hc=!!J&&pc(!0),mc=b((function(t){var e=to(t);return e&&e.innerHTML})),gc=Cr.prototype.$mount;return Cr.prototype.$mount=function(t,e){if((t=t&&to(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=mc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=dc(r,{outputSourceRange:!1,shouldDecodeNewlines:vc,shouldDecodeNewlinesForHref:hc,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return gc.call(this,t,e)},Cr.compile=dc,T(Cr,Fn),Cr.effect=function(t,e){var n=new Vn(ct,t,j,{sync:!0});e&&(n.update=function(){e((function(){return n.run()}))})},Cr}));
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vue=e()}(this,(function(){"use strict";var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function i(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return"function"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,p,2):String(t)}function p(t,e){return e&&e.__v_isRef?e.value:e}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var m=h("slot,component",!0),g=h("key,ref,slot,slot-scope,is");function y(t,e){var n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function $(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,x=$((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),C=$((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),k=/\B([A-Z])/g,S=$((function(t){return t.replace(k,"-$1").toLowerCase()}));var O=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function T(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function j(t){for(var e={},n=0;n<t.length;n++)t[n]&&A(e,t[n]);return e}function E(t,e,n){}var N=function(t,e,n){return!1},P=function(t){return t};function D(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return D(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),c=Object.keys(e);return a.length===c.length&&a.every((function(n){return D(t[n],e[n])}))}catch(t){return!1}}function M(t,e){for(var n=0;n<t.length;n++)if(D(t[n],e))return n;return-1}function I(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function L(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}var R="data-server-rendered",F=["component","directive","filter"],H=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],B={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:N,isReservedAttr:N,isUnknownElement:N,getTagNamespace:E,parsePlatformTagName:P,mustUseProp:N,async:!0,_lifecycleHooks:H},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function V(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var K=new RegExp("[^".concat(U.source,".$_\\d]"));var J="__proto__"in{},q="undefined"!=typeof window,W=q&&window.navigator.userAgent.toLowerCase(),Z=W&&/msie|trident/.test(W),G=W&&W.indexOf("msie 9.0")>0,X=W&&W.indexOf("edge/")>0;W&&W.indexOf("android");var Y=W&&/iphone|ipad|ipod|ios/.test(W);W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W);var Q,tt=W&&W.match(/firefox\/(\d+)/),et={}.watch,nt=!1;if(q)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(t){}var ot=function(){return void 0===Q&&(Q=!q&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Q},it=q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var st,ct="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);st="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ut=null;function lt(t){void 0===t&&(t=null),t||ut&&ut._scope.off(),ut=t,t&&t._scope.on()}var ft=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),dt=function(t){void 0===t&&(t="");var e=new ft;return e.text=t,e.isComment=!0,e};function pt(t){return new ft(void 0,void 0,void 0,String(t))}function vt(t){var e=new ft(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}"function"==typeof SuppressedError&&SuppressedError;var ht=0,mt=[],gt=function(){for(var t=0;t<mt.length;t++){var e=mt[t];e.subs=e.subs.filter((function(t){return t})),e._pending=!1}mt.length=0},yt=function(){function t(){this._pending=!1,this.id=ht++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,mt.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.filter((function(t){return t})),n=0,r=e.length;n<r;n++){e[n].update()}},t}();yt.target=null;var _t=[];function bt(t){_t.push(t),yt.target=t}function $t(){_t.pop(),yt.target=_t[_t.length-1]}var wt=Array.prototype,xt=Object.create(wt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=wt[t];V(xt,t,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i}))}));var Ct=Object.getOwnPropertyNames(xt),kt={},St=!0;function Ot(t){St=t}var Tt={notify:E,depend:E,addSub:E,removeSub:E},At=function(){function t(t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.value=t,this.shallow=n,this.mock=r,this.dep=r?Tt:new yt,this.vmCount=0,V(t,"__ob__",this),e(t)){if(!r)if(J)t.__proto__=xt;else for(var o=0,i=Ct.length;o<i;o++){V(t,s=Ct[o],xt[s])}n||this.observeArray(t)}else{var a=Object.keys(t);for(o=0;o<a.length;o++){var s;Et(t,s=a[o],kt,void 0,n,r)}}}return t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)jt(t[e],!1,this.mock)},t}();function jt(t,n,r){return t&&b(t,"__ob__")&&t.__ob__ instanceof At?t.__ob__:!St||!r&&ot()||!e(t)&&!u(t)||!Object.isExtensible(t)||t.__v_skip||Bt(t)||t instanceof ft?void 0:new At(t,n,r)}function Et(t,n,r,o,i,a,s){void 0===s&&(s=!1);var c=new yt,u=Object.getOwnPropertyDescriptor(t,n);if(!u||!1!==u.configurable){var l=u&&u.get,f=u&&u.set;l&&!f||r!==kt&&2!==arguments.length||(r=t[n]);var d=i?r&&r.__ob__:jt(r,!1,a);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var n=l?l.call(t):r;return yt.target&&(c.depend(),d&&(d.dep.depend(),e(n)&&Dt(n))),Bt(n)&&!i?n.value:n},set:function(e){var n=l?l.call(t):r;if(L(n,e)){if(f)f.call(t,e);else{if(l)return;if(!i&&Bt(n)&&!Bt(e))return void(n.value=e);r=e}d=i?e&&e.__ob__:jt(e,!1,a),c.notify()}}}),c}}function Nt(t,n,r){if(!Ft(t)){var o=t.__ob__;return e(t)&&l(n)?(t.length=Math.max(t.length,n),t.splice(n,1,r),o&&!o.shallow&&o.mock&&jt(r,!1,!0),r):n in t&&!(n in Object.prototype)?(t[n]=r,r):t._isVue||o&&o.vmCount?r:o?(Et(o.value,n,r,void 0,o.shallow,o.mock),o.dep.notify(),r):(t[n]=r,r)}}function Pt(t,n){if(e(t)&&l(n))t.splice(n,1);else{var r=t.__ob__;t._isVue||r&&r.vmCount||Ft(t)||b(t,n)&&(delete t[n],r&&r.dep.notify())}}function Dt(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Dt(n)}function Mt(t){return It(t,!0),V(t,"__v_isShallow",!0),t}function It(t,e){Ft(t)||jt(t,e,ot())}function Lt(t){return Ft(t)?Lt(t.__v_raw):!(!t||!t.__ob__)}function Rt(t){return!(!t||!t.__v_isShallow)}function Ft(t){return!(!t||!t.__v_isReadonly)}var Ht="__v_isRef";function Bt(t){return!(!t||!0!==t.__v_isRef)}function Ut(t,e){if(Bt(t))return t;var n={};return V(n,Ht,!0),V(n,"__v_isShallow",e),V(n,"dep",Et(n,"value",t,null,e,ot())),n}function zt(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];if(Bt(t))return t.value;var r=t&&t.__ob__;return r&&r.dep.depend(),t},set:function(t){var r=e[n];Bt(r)&&!Bt(t)?r.value=t:e[n]=t}})}function Vt(t,e,n){var r=t[e];if(Bt(r))return r;var o={get value(){var r=t[e];return void 0===r?n:r},set value(n){t[e]=n}};return V(o,Ht,!0),o}var Kt="__v_rawToReadonly",Jt="__v_rawToShallowReadonly";function qt(t){return Wt(t,!1)}function Wt(t,e){if(!u(t))return t;if(Ft(t))return t;var n=e?Jt:Kt,r=t[n];if(r)return r;var o=Object.create(Object.getPrototypeOf(t));V(t,n,o),V(o,"__v_isReadonly",!0),V(o,"__v_raw",t),Bt(t)&&V(o,Ht,!0),(e||Rt(t))&&V(o,"__v_isShallow",!0);for(var i=Object.keys(t),a=0;a<i.length;a++)Zt(o,t,i[a],e);return o}function Zt(t,e,n,r){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];return r||!u(t)?t:qt(t)},set:function(){}})}var Gt=$((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function Xt(t,n){function r(){var t=r.fns;if(!e(t))return _n(t,null,arguments,n,"v-on handler");for(var o=t.slice(),i=0;i<o.length;i++)_n(o[i],null,arguments,n,"v-on handler")}return r.fns=t,r}function Yt(t,e,r,i,a,s){var c,u,l,f;for(c in t)u=t[c],l=e[c],f=Gt(c),n(u)||(n(l)?(n(u.fns)&&(u=t[c]=Xt(u,s)),o(f.once)&&(u=t[c]=a(f.name,u,f.capture)),r(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)n(t[c])&&i((f=Gt(c)).name,e[c],f.capture)}function Qt(t,e,i){var a;t instanceof ft&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){i.apply(this,arguments),y(a.fns,c)}n(s)?a=Xt([c]):r(s.fns)&&o(s.merged)?(a=s).fns.push(c):a=Xt([s,c]),a.merged=!0,t[e]=a}function te(t,e,n,o,i){if(r(e)){if(b(e,n))return t[n]=e[n],i||delete e[n],!0;if(b(e,o))return t[n]=e[o],i||delete e[o],!0}return!1}function ee(t){return i(t)?[pt(t)]:e(t)?re(t):void 0}function ne(t){return r(t)&&r(t.text)&&!1===t.isComment}function re(t,a){var s,c,u,l,f=[];for(s=0;s<t.length;s++)n(c=t[s])||"boolean"==typeof c||(l=f[u=f.length-1],e(c)?c.length>0&&(ne((c=re(c,"".concat(a||"","_").concat(s)))[0])&&ne(l)&&(f[u]=pt(l.text+c[0].text),c.shift()),f.push.apply(f,c)):i(c)?ne(l)?f[u]=pt(l.text+c):""!==c&&f.push(pt(c)):ne(c)&&ne(l)?f[u]=pt(l.text+c.text):(o(t._isVList)&&r(c.tag)&&n(c.key)&&r(a)&&(c.key="__vlist".concat(a,"_").concat(s,"__")),f.push(c)));return f}var oe=1,ie=2;function ae(t,n,c,u,l,f){return(e(c)||i(c))&&(l=u,u=c,c=void 0),o(f)&&(l=ie),function(t,n,o,i,c){if(r(o)&&r(o.__ob__))return dt();r(o)&&r(o.is)&&(n=o.is);if(!n)return dt();e(i)&&a(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);c===ie?i=ee(i):c===oe&&(i=function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(i));var u,l;if("string"==typeof n){var f=void 0;l=t.$vnode&&t.$vnode.ns||B.getTagNamespace(n),u=B.isReservedTag(n)?new ft(B.parsePlatformTagName(n),o,i,void 0,void 0,t):o&&o.pre||!r(f=kr(t.$options,"components",n))?new ft(n,o,i,void 0,void 0,t):hr(f,o,t,i,n)}else u=hr(n,o,t,i);return e(u)?u:r(u)?(r(l)&&se(u,l),r(o)&&function(t){s(t.style)&&Wn(t.style);s(t.class)&&Wn(t.class)}(o),u):dt()}(t,n,c,u,l)}function se(t,e,i){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,i=!0),r(t.children))for(var a=0,s=t.children.length;a<s;a++){var c=t.children[a];r(c.tag)&&(n(c.ns)||o(i)&&"svg"!==c.tag)&&se(c,e,i)}}function ce(t,n){var o,i,a,c,u=null;if(e(t)||"string"==typeof t)for(u=new Array(t.length),o=0,i=t.length;o<i;o++)u[o]=n(t[o],o);else if("number"==typeof t)for(u=new Array(t),o=0;o<t;o++)u[o]=n(o+1,o);else if(s(t))if(ct&&t[Symbol.iterator]){u=[];for(var l=t[Symbol.iterator](),f=l.next();!f.done;)u.push(n(f.value,u.length)),f=l.next()}else for(a=Object.keys(t),u=new Array(a.length),o=0,i=a.length;o<i;o++)c=a[o],u[o]=n(t[c],c,o);return r(u)||(u=[]),u._isVList=!0,u}function ue(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=A(A({},r),n)),o=i(n)||(a(e)?e():e)):o=this.$slots[t]||(a(e)?e():e);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function le(t){return kr(this.$options,"filters",t)||P}function fe(t,n){return e(t)?-1===t.indexOf(n):t!==n}function de(t,e,n,r,o){var i=B.keyCodes[e]||n;return o&&r&&!B.keyCodes[e]?fe(o,r):i?fe(i,t):r?S(r)!==e:void 0===t}function pe(t,n,r,o,i){if(r)if(s(r)){e(r)&&(r=j(r));var a=void 0,c=function(e){if("class"===e||"style"===e||g(e))a=t;else{var s=t.attrs&&t.attrs.type;a=o||B.mustUseProp(n,s,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=x(e),u=S(e);c in a||u in a||(a[e]=r[e],i&&((t.on||(t.on={}))["update:".concat(e)]=function(t){r[e]=t}))};for(var u in r)c(u)}else;return t}function ve(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||me(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),"__static__".concat(t),!1),r}function he(t,e,n){return me(t,"__once__".concat(e).concat(n?"_".concat(n):""),!0),t}function me(t,n,r){if(e(t))for(var o=0;o<t.length;o++)t[o]&&"string"!=typeof t[o]&&ge(t[o],"".concat(n,"_").concat(o),r);else ge(t,n,r)}function ge(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function ye(t,e){if(e)if(u(e)){var n=t.on=t.on?A({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function _e(t,n,r,o){n=n||{$stable:!r};for(var i=0;i<t.length;i++){var a=t[i];e(a)?_e(a,n,r):a&&(a.proxy&&(a.fn.proxy=!0),n[a.key]=a.fn)}return o&&(n.$key=o),n}function be(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function $e(t,e){return"string"==typeof t?e+t:t}function we(t){t._o=he,t._n=v,t._s=d,t._l=ce,t._t=ue,t._q=D,t._i=M,t._m=ve,t._f=le,t._k=de,t._b=pe,t._v=pt,t._e=dt,t._u=_e,t._g=ye,t._d=be,t._p=$e}function xe(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==e&&i.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(Ce)&&delete n[u];return n}function Ce(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ke(t){return t.isComment&&t.asyncFactory}function Se(e,n,r,o){var i,a=Object.keys(r).length>0,s=n?!!n.$stable:!a,c=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(s&&o&&o!==t&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},n)n[u]&&"$"!==u[0]&&(i[u]=Oe(e,r,u,n[u]))}else i={};for(var l in r)l in i||(i[l]=Te(r,l));return n&&Object.isExtensible(n)&&(n._normalized=i),V(i,"$stable",s),V(i,"$key",c),V(i,"$hasNormal",a),i}function Oe(t,n,r,o){var i=function(){var n=ut;lt(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:ee(r))&&r[0];return lt(n),r&&(!i||1===r.length&&i.isComment&&!ke(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function Te(t,e){return function(){return t[e]}}function Ae(e){return{get attrs(){if(!e._attrsProxy){var n=e._attrsProxy={};V(n,"_v_attr_proxy",!0),je(n,e.$attrs,t,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||je(e._listenersProxy={},e.$listeners,t,e,"$listeners");return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Ne(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:O(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return zt(e,t,n)}))}}}function je(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,Ee(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function Ee(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function Ne(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function Pe(){var t=ut;return t._setupContext||(t._setupContext=Ae(t))}var De,Me,Ie=null;function Le(t,e){return(t.__esModule||ct&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function Re(t){if(e(t))for(var n=0;n<t.length;n++){var o=t[n];if(r(o)&&(r(o.componentOptions)||ke(o)))return o}}function Fe(t,e){De.$on(t,e)}function He(t,e){De.$off(t,e)}function Be(t,e){var n=De;return function r(){null!==e.apply(null,arguments)&&n.$off(t,r)}}function Ue(t,e,n){De=t,Yt(e,n||{},Fe,He,Be,t),De=void 0}var ze=function(){function t(t){void 0===t&&(t=!1),this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Me,!t&&Me&&(this.index=(Me.scopes||(Me.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=Me;try{return Me=this,t()}finally{Me=e}}},t.prototype.on=function(){Me=this},t.prototype.off=function(){Me=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},t}();function Ve(){return Me}var Ke=null;function Je(t){var e=Ke;return Ke=t,function(){Ke=e}}function qe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function We(t,e){if(e){if(t._directInactive=!1,qe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)We(t.$children[n]);Ge(t,"activated")}}function Ze(t,e){if(!(e&&(t._directInactive=!0,qe(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)Ze(t.$children[n]);Ge(t,"deactivated")}}function Ge(t,e,n,r){void 0===r&&(r=!0),bt();var o=ut,i=Ve();r&&lt(t);var a=t.$options[e],s="".concat(e," hook");if(a)for(var c=0,u=a.length;c<u;c++)_n(a[c],t,n||null,t,s);t._hasHookEvent&&t.$emit("hook:"+e),r&&(lt(o),i&&i.on()),$t()}var Xe=[],Ye=[],Qe={},tn=!1,en=!1,nn=0;var rn=0,on=Date.now;if(q&&!Z){var an=window.performance;an&&"function"==typeof an.now&&on()>document.createEvent("Event").timeStamp&&(on=function(){return an.now()})}var sn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function cn(){var t,e;for(rn=on(),en=!0,Xe.sort(sn),nn=0;nn<Xe.length;nn++)(t=Xe[nn]).before&&t.before(),e=t.id,Qe[e]=null,t.run();var n=Ye.slice(),r=Xe.slice();nn=Xe.length=Ye.length=0,Qe={},tn=en=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,We(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ge(r,"updated")}}(r),gt(),it&&B.devtools&&it.emit("flush")}function un(t){var e=t.id;if(null==Qe[e]&&(t!==yt.target||!t.noRecurse)){if(Qe[e]=!0,en){for(var n=Xe.length-1;n>nn&&Xe[n].id>t.id;)n--;Xe.splice(n+1,0,t)}else Xe.push(t);tn||(tn=!0,En(cn))}}var ln="watcher",fn="".concat(ln," callback"),dn="".concat(ln," getter"),pn="".concat(ln," cleanup");function vn(t,e){return mn(t,null,{flush:"post"})}var hn={};function mn(n,r,o){var i=void 0===o?t:o,s=i.immediate,c=i.deep,u=i.flush,l=void 0===u?"pre":u;i.onTrack,i.onTrigger;var f,d,p=ut,v=function(t,e,n){void 0===n&&(n=null);var r=_n(t,null,n,p,e);return c&&r&&r.__ob__&&r.__ob__.dep.depend(),r},h=!1,m=!1;if(Bt(n)?(f=function(){return n.value},h=Rt(n)):Lt(n)?(f=function(){return n.__ob__.dep.depend(),n},c=!0):e(n)?(m=!0,h=n.some((function(t){return Lt(t)||Rt(t)})),f=function(){return n.map((function(t){return Bt(t)?t.value:Lt(t)?(t.__ob__.dep.depend(),Wn(t)):a(t)?v(t,dn):void 0}))}):f=a(n)?r?function(){return v(n,dn)}:function(){if(!p||!p._isDestroyed)return d&&d(),v(n,ln,[y])}:E,r&&c){var g=f;f=function(){return Wn(g())}}var y=function(t){d=_.onStop=function(){v(t,pn)}};if(ot())return y=E,r?s&&v(r,fn,[f(),m?[]:void 0,y]):f(),E;var _=new Xn(ut,f,E,{lazy:!0});_.noRecurse=!r;var b=m?[]:hn;return _.run=function(){if(_.active)if(r){var t=_.get();(c||h||(m?t.some((function(t,e){return L(t,b[e])})):L(t,b)))&&(d&&d(),v(r,fn,[t,b===hn?void 0:b,y]),b=t)}else _.get()},"sync"===l?_.update=_.run:"post"===l?(_.post=!0,_.update=function(){return un(_)}):_.update=function(){if(p&&p===ut&&!p._isMounted){var t=p._preWatchers||(p._preWatchers=[]);t.indexOf(_)<0&&t.push(_)}else un(_)},r?s?_.run():b=_.get():"post"===l&&p?p.$once("hook:mounted",(function(){return _.get()})):_.get(),function(){_.teardown()}}function gn(t){var e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}function yn(t,e,n){bt();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,t,e,n))return}catch(t){bn(t,r,"errorCaptured hook")}}bn(t,e,n)}finally{$t()}}function _n(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue&&f(i)&&!i._handled&&(i.catch((function(t){return yn(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(t){yn(t,r,o)}return i}function bn(t,e,n){if(B.errorHandler)try{return B.errorHandler.call(null,t,e,n)}catch(e){e!==t&&$n(e)}$n(t)}function $n(t,e,n){if(!q||"undefined"==typeof console)throw t;console.error(t)}var wn,xn=!1,Cn=[],kn=!1;function Sn(){kn=!1;var t=Cn.slice(0);Cn.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&at(Promise)){var On=Promise.resolve();wn=function(){On.then(Sn),Y&&setTimeout(E)},xn=!0}else if(Z||"undefined"==typeof MutationObserver||!at(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())wn="undefined"!=typeof setImmediate&&at(setImmediate)?function(){setImmediate(Sn)}:function(){setTimeout(Sn,0)};else{var Tn=1,An=new MutationObserver(Sn),jn=document.createTextNode(String(Tn));An.observe(jn,{characterData:!0}),wn=function(){Tn=(Tn+1)%2,jn.data=String(Tn)},xn=!0}function En(t,e){var n;if(Cn.push((function(){if(t)try{t.call(e)}catch(t){yn(t,e,"nextTick")}else n&&n(e)})),kn||(kn=!0,wn()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}function Nn(t){return function(e,n){if(void 0===n&&(n=ut),n)return function(t,e,n){var r=t.$options;r[e]=$r(r[e],n)}(n,t,e)}}var Pn=Nn("beforeMount"),Dn=Nn("mounted"),Mn=Nn("beforeUpdate"),In=Nn("updated"),Ln=Nn("beforeDestroy"),Rn=Nn("destroyed"),Fn=Nn("activated"),Hn=Nn("deactivated"),Bn=Nn("serverPrefetch"),Un=Nn("renderTracked"),zn=Nn("renderTriggered"),Vn=Nn("errorCaptured");var Kn="2.7.16";var Jn=Object.freeze({__proto__:null,version:Kn,defineComponent:function(t){return t},ref:function(t){return Ut(t,!1)},shallowRef:function(t){return Ut(t,!0)},isRef:Bt,toRef:Vt,toRefs:function(t){var n=e(t)?new Array(t.length):{};for(var r in t)n[r]=Vt(t,r);return n},unref:function(t){return Bt(t)?t.value:t},proxyRefs:function(t){if(Lt(t))return t;for(var e={},n=Object.keys(t),r=0;r<n.length;r++)zt(e,t,n[r]);return e},customRef:function(t){var e=new yt,n=t((function(){e.depend()}),(function(){e.notify()})),r=n.get,o=n.set,i={get value(){return r()},set value(t){o(t)}};return V(i,Ht,!0),i},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return It(t,!1),t},isReactive:Lt,isReadonly:Ft,isShallow:Rt,isProxy:function(t){return Lt(t)||Ft(t)},shallowReactive:Mt,markRaw:function(t){return Object.isExtensible(t)&&V(t,"__v_skip",!0),t},toRaw:function t(e){var n=e&&e.__v_raw;return n?t(n):e},readonly:qt,shallowReadonly:function(t){return Wt(t,!0)},computed:function(t,e){var n,r,o=a(t);o?(n=t,r=E):(n=t.get,r=t.set);var i=ot()?null:new Xn(ut,n,E,{lazy:!0}),s={effect:i,get value(){return i?(i.dirty&&i.evaluate(),yt.target&&i.depend(),i.value):n()},set value(t){r(t)}};return V(s,Ht,!0),V(s,"__v_isReadonly",o),s},watch:function(t,e,n){return mn(t,e,n)},watchEffect:function(t,e){return mn(t,null,e)},watchPostEffect:vn,watchSyncEffect:function(t,e){return mn(t,null,{flush:"sync"})},EffectScope:ze,effectScope:function(t){return new ze(t)},onScopeDispose:function(t){Me&&Me.cleanups.push(t)},getCurrentScope:Ve,provide:function(t,e){ut&&(gn(ut)[t]=e)},inject:function(t,e,n){void 0===n&&(n=!1);var r=ut;if(r){var o=r.$parent&&r.$parent._provided;if(o&&t in o)return o[t];if(arguments.length>1)return n&&a(e)?e.call(r):e}},h:function(t,e,n){return ae(ut,t,e,n,2,!0)},getCurrentInstance:function(){return ut&&{proxy:ut}},useSlots:function(){return Pe().slots},useAttrs:function(){return Pe().attrs},useListeners:function(){return Pe().listeners},mergeDefaults:function(t,n){var r=e(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var o in n){var i=r[o];i?e(i)||a(i)?r[o]={type:i,default:n[o]}:i.default=n[o]:null===i&&(r[o]={default:n[o]})}return r},nextTick:En,set:Nt,del:Pt,useCssModule:function(e){return t},useCssVars:function(t){if(q){var e=ut;e&&vn((function(){var n=e.$el,r=t(e,e._setupProxy);if(n&&1===n.nodeType){var o=n.style;for(var i in r)o.setProperty("--".concat(i),r[i])}}))}},defineAsyncComponent:function(t){a(t)&&(t={loader:t});var e=t.loader,n=t.loadingComponent,r=t.errorComponent,o=t.delay,i=void 0===o?200:o,s=t.timeout;t.suspensible;var c=t.onError,u=null,l=0,f=function(){var t;return u||(t=u=e().catch((function(t){if(t=t instanceof Error?t:new Error(String(t)),c)return new Promise((function(e,n){c(t,(function(){return e((l++,u=null,f()))}),(function(){return n(t)}),l+1)}));throw t})).then((function(e){return t!==u&&u?u:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e)})))};return function(){return{component:f(),delay:i,timeout:s,error:r,loading:n}}},onBeforeMount:Pn,onMounted:Dn,onBeforeUpdate:Mn,onUpdated:In,onBeforeUnmount:Ln,onUnmounted:Rn,onActivated:Fn,onDeactivated:Hn,onServerPrefetch:Bn,onRenderTracked:Un,onRenderTriggered:zn,onErrorCaptured:function(t,e){void 0===e&&(e=ut),Vn(t,e)}}),qn=new st;function Wn(t){return Zn(t,qn),qn.clear(),t}function Zn(t,n){var r,o,i=e(t);if(!(!i&&!s(t)||t.__v_skip||Object.isFrozen(t)||t instanceof ft)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)Zn(t[r],n);else if(Bt(t))Zn(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)Zn(t[o[r]],n)}}var Gn=0,Xn=function(){function t(t,e,n,r,o){!function(t,e){void 0===e&&(e=Me),e&&e.active&&e.effects.push(t)}(this,Me&&!Me._vm?Me:t?t._scope:void 0),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Gn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="",a(e)?this.getter=e:(this.getter=function(t){if(!K.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=E)),this.value=this.lazy?void 0:this.get()}return t.prototype.get=function(){var t;bt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;yn(t,e,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&Wn(t),$t(),this.cleanupDeps()}return t},t.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},t.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},t.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():un(this)},t.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'.concat(this.expression,'"');_n(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},t.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},t.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&y(this.vm._scope.effects,this),this.active){for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},t}(),Yn={enumerable:!0,configurable:!0,get:E,set:E};function Qn(t,e,n){Yn.get=function(){return this[e][n]},Yn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Yn)}function tr(t){var n=t.$options;if(n.props&&function(t,e){var n=t.$options.propsData||{},r=t._props=Mt({}),o=t.$options._propKeys=[],i=!t.$parent;i||Ot(!1);var a=function(i){o.push(i);var a=Sr(i,e,n,t);Et(r,i,a,void 0,!0),i in t||Qn(t,"_props",i)};for(var s in e)a(s);Ot(!0)}(t,n.props),function(t){var e=t.$options,n=e.setup;if(n){var r=t._setupContext=Ae(t);lt(t),bt();var o=_n(n,null,[t._props||Mt({}),r],t,"setup");if($t(),lt(),a(o))e.render=o;else if(s(o))if(t._setupState=o,o.__sfc){var i=t._setupProxy={};for(var c in o)"__sfc"!==c&&zt(i,o,c)}else for(var c in o)z(c)||zt(t,o,c)}}(t),n.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?E:O(e[n],t)}(t,n.methods),n.data)!function(t){var e=t.$options.data;e=t._data=a(e)?function(t,e){bt();try{return t.call(e,e)}catch(t){return yn(t,e,"data()"),{}}finally{$t()}}(e,t):e||{},u(e)||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&b(r,i)||z(i)||Qn(t,"_data",i)}var s=jt(e);s&&s.vmCount++}(t);else{var r=jt(t._data={});r&&r.vmCount++}n.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=ot();for(var o in e){var i=e[o],s=a(i)?i:i.get;r||(n[o]=new Xn(t,s||E,E,er)),o in t||nr(t,o,i)}}(t,n.computed),n.watch&&n.watch!==et&&function(t,n){for(var r in n){var o=n[r];if(e(o))for(var i=0;i<o.length;i++)ir(t,r,o[i]);else ir(t,r,o)}}(t,n.watch)}var er={lazy:!0};function nr(t,e,n){var r=!ot();a(n)?(Yn.get=r?rr(e):or(n),Yn.set=E):(Yn.get=n.get?r&&!1!==n.cache?rr(e):or(n.get):E,Yn.set=n.set||E),Object.defineProperty(t,e,Yn)}function rr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),yt.target&&e.depend(),e.value}}function or(t){return function(){return t.call(this,this)}}function ir(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function ar(t,e){if(t){for(var n=Object.create(null),r=ct?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=t[i].from;if(s in e._provided)n[i]=e._provided[s];else if("default"in t[i]){var c=t[i].default;n[i]=a(c)?c.call(e):c}}}return n}}var sr=0;function cr(t){var e=t.options;if(t.super){var n=cr(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}(t);r&&A(t.extendOptions,r),(e=t.options=Cr(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function ur(n,r,i,a,s){var c,u=this,l=s.options;b(a,"_uid")?(c=Object.create(a))._original=a:(c=a,a=a._original);var f=o(l._compiled),d=!f;this.data=n,this.props=r,this.children=i,this.parent=a,this.listeners=n.on||t,this.injections=ar(l.inject,a),this.slots=function(){return u.$slots||Se(a,n.scopedSlots,u.$slots=xe(i,a)),u.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Se(a,n.scopedSlots,this.slots())}}),f&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=Se(a,n.scopedSlots,this.$slots)),l._scopeId?this._c=function(t,n,r,o){var i=ae(c,t,n,r,o,d);return i&&!e(i)&&(i.fnScopeId=l._scopeId,i.fnContext=a),i}:this._c=function(t,e,n,r){return ae(c,t,e,n,r,d)}}function lr(t,e,n,r,o){var i=vt(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function fr(t,e){for(var n in e)t[x(n)]=e[n]}function dr(t){return t.name||t.__name||t._componentTag}we(ur.prototype);var pr={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;pr.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},o=t.data.inlineTemplate;r(o)&&(n.render=o.render,n.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Ke)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,o,i){var a=o.data.scopedSlots,s=e.$scopedSlots,c=!!(a&&!a.$stable||s!==t&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key||!a&&e.$scopedSlots.$key),u=!!(i||e.$options._renderChildren||c),l=e.$vnode;e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o),e.$options._renderChildren=i;var f=o.data.attrs||t;e._attrsProxy&&je(e._attrsProxy,f,l.data&&l.data.attrs||t,e,"$attrs")&&(u=!0),e.$attrs=f,r=r||t;var d=e.$options._parentListeners;if(e._listenersProxy&&je(e._listenersProxy,r,d||t,e,"$listeners"),e.$listeners=e.$options._parentListeners=r,Ue(e,r,d),n&&e.$options.props){Ot(!1);for(var p=e._props,v=e.$options._propKeys||[],h=0;h<v.length;h++){var m=v[h],g=e.$options.props;p[m]=Sr(m,g,n,e)}Ot(!0),e.$options.propsData=n}u&&(e.$slots=xe(i,o.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Ge(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,Ye.push(e)):We(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Ze(e,!0):e.$destroy())}},vr=Object.keys(pr);function hr(i,a,c,u,l){if(!n(i)){var d=c.$options._base;if(s(i)&&(i=d.extend(i)),"function"==typeof i){var p;if(n(i.cid)&&(i=function(t,e){if(o(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;var i=Ie;if(i&&r(t.owners)&&-1===t.owners.indexOf(i)&&t.owners.push(i),o(t.loading)&&r(t.loadingComp))return t.loadingComp;if(i&&!r(t.owners)){var a=t.owners=[i],c=!0,u=null,l=null;i.$on("hook:destroyed",(function(){return y(a,i)}));var d=function(t){for(var e=0,n=a.length;e<n;e++)a[e].$forceUpdate();t&&(a.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},p=I((function(n){t.resolved=Le(n,e),c?a.length=0:d(!0)})),v=I((function(e){r(t.errorComp)&&(t.error=!0,d(!0))})),h=t(p,v);return s(h)&&(f(h)?n(t.resolved)&&h.then(p,v):f(h.component)&&(h.component.then(p,v),r(h.error)&&(t.errorComp=Le(h.error,e)),r(h.loading)&&(t.loadingComp=Le(h.loading,e),0===h.delay?t.loading=!0:u=setTimeout((function(){u=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,d(!1))}),h.delay||200)),r(h.timeout)&&(l=setTimeout((function(){l=null,n(t.resolved)&&v(null)}),h.timeout)))),c=!1,t.loading?t.loadingComp:t.resolved}}(p=i,d),void 0===i))return function(t,e,n,r,o){var i=dt();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}(p,a,c,u,l);a=a||{},cr(i),r(a.model)&&function(t,n){var o=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[o]=n.model.value;var a=n.on||(n.on={}),s=a[i],c=n.model.callback;r(s)?(e(s)?-1===s.indexOf(c):s!==c)&&(a[i]=[c].concat(s)):a[i]=c}(i.options,a);var v=function(t,e,o){var i=e.options.props;if(!n(i)){var a={},s=t.attrs,c=t.props;if(r(s)||r(c))for(var u in i){var l=S(u);te(a,c,u,l,!0)||te(a,s,u,l,!1)}return a}}(a,i);if(o(i.options.functional))return function(n,o,i,a,s){var c=n.options,u={},l=c.props;if(r(l))for(var f in l)u[f]=Sr(f,l,o||t);else r(i.attrs)&&fr(u,i.attrs),r(i.props)&&fr(u,i.props);var d=new ur(i,u,s,a,n),p=c.render.call(null,d._c,d);if(p instanceof ft)return lr(p,i,d.parent,c);if(e(p)){for(var v=ee(p)||[],h=new Array(v.length),m=0;m<v.length;m++)h[m]=lr(v[m],i,d.parent,c);return h}}(i,v,a,c,u);var h=a.on;if(a.on=a.nativeOn,o(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<vr.length;n++){var r=vr[n],o=e[r],i=pr[r];o===i||o&&o._merged||(e[r]=o?mr(i,o):i)}}(a);var g=dr(i.options)||l;return new ft("vue-component-".concat(i.cid).concat(g?"-".concat(g):""),a,void 0,void 0,void 0,c,{Ctor:i,propsData:v,listeners:h,tag:l,children:u},p)}}}function mr(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var gr=E,yr=B.optionMergeStrategies;function _r(t,e,n){if(void 0===n&&(n=!0),!e)return t;for(var r,o,i,a=ct?Reflect.ownKeys(e):Object.keys(e),s=0;s<a.length;s++)"__ob__"!==(r=a[s])&&(o=t[r],i=e[r],n&&b(t,r)?o!==i&&u(o)&&u(i)&&_r(o,i):Nt(t,r,i));return t}function br(t,e,n){return n?function(){var r=a(e)?e.call(n,n):e,o=a(t)?t.call(n,n):t;return r?_r(r,o):o}:e?t?function(){return _r(a(e)?e.call(this,this):e,a(t)?t.call(this,this):t)}:e:t}function $r(t,n){var r=n?t?t.concat(n):e(n)?n:[n]:t;return r?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r):r}function wr(t,e,n,r){var o=Object.create(t||null);return e?A(o,e):o}yr.data=function(t,e,n){return n?br(t,e,n):e&&"function"!=typeof e?t:br(t,e)},H.forEach((function(t){yr[t]=$r})),F.forEach((function(t){yr[t+"s"]=wr})),yr.watch=function(t,n,r,o){if(t===et&&(t=void 0),n===et&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;var i={};for(var a in A(i,t),n){var s=i[a],c=n[a];s&&!e(s)&&(s=[s]),i[a]=s?s.concat(c):e(c)?c:[c]}return i},yr.props=yr.methods=yr.inject=yr.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return A(o,t),e&&A(o,e),o},yr.provide=function(t,e){return t?function(){var n=Object.create(null);return _r(n,a(t)?t.call(this):t),e&&_r(n,a(e)?e.call(this):e,!1),n}:e};var xr=function(t,e){return void 0===e?t:e};function Cr(t,n,r){if(a(n)&&(n=n.options),function(t,n){var r=t.props;if(r){var o,i,a={};if(e(r))for(o=r.length;o--;)"string"==typeof(i=r[o])&&(a[x(i)]={type:null});else if(u(r))for(var s in r)i=r[s],a[x(s)]=u(i)?i:{type:i};t.props=a}}(n),function(t,n){var r=t.inject;if(r){var o=t.inject={};if(e(r))for(var i=0;i<r.length;i++)o[r[i]]={from:r[i]};else if(u(r))for(var a in r){var s=r[a];o[a]=u(s)?A({from:a},s):{from:s}}}}(n),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];a(r)&&(e[n]={bind:r,update:r})}}(n),!n._base&&(n.extends&&(t=Cr(t,n.extends,r)),n.mixins))for(var o=0,i=n.mixins.length;o<i;o++)t=Cr(t,n.mixins[o],r);var s,c={};for(s in t)l(s);for(s in n)b(t,s)||l(s);function l(e){var o=yr[e]||xr;c[e]=o(t[e],n[e],r,e)}return c}function kr(t,e,n,r){if("string"==typeof n){var o=t[e];if(b(o,n))return o[n];var i=x(n);if(b(o,i))return o[i];var a=C(i);return b(o,a)?o[a]:o[n]||o[i]||o[a]}}function Sr(t,e,n,r){var o=e[t],i=!b(n,t),s=n[t],c=jr(Boolean,o.type);if(c>-1)if(i&&!b(o,"default"))s=!1;else if(""===s||s===S(t)){var u=jr(String,o.type);(u<0||c<u)&&(s=!0)}if(void 0===s){s=function(t,e,n){if(!b(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return a(r)&&"Function"!==Tr(e.type)?r.call(t):r}(r,o,t);var l=St;Ot(!0),jt(s),Ot(l)}return s}var Or=/^\s*function (\w+)/;function Tr(t){var e=t&&t.toString().match(Or);return e?e[1]:""}function Ar(t,e){return Tr(t)===Tr(e)}function jr(t,n){if(!e(n))return Ar(n,t)?0:-1;for(var r=0,o=n.length;r<o;r++)if(Ar(n[r],t))return r;return-1}function Er(t){this._init(t)}function Nr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=dr(t)||dr(n.options),a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Cr(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)Qn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)nr(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,F.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=A({},a.options),o[r]=a,a}}function Pr(t){return t&&(dr(t.Ctor.options)||t.tag)}function Dr(t,n){return e(t)?t.indexOf(n)>-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===c.call(r)&&t.test(n));var r}function Mr(t,e){var n=t.cache,r=t.keys,o=t._vnode,i=t.$vnode;for(var a in n){var s=n[a];if(s){var c=s.name;c&&!e(c)&&Ir(n,a,r,o)}}i.componentOptions.children=void 0}function Ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(e){e.prototype._init=function(e){var n=this;n._uid=sr++,n._isVue=!0,n.__v_skip=!0,n._scope=new ze(!0),n._scope.parent=void 0,n._scope._vm=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=Cr(cr(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ue(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=xe(n._renderChildren,o),e.$scopedSlots=r?Se(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,o){return ae(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return ae(e,t,n,r,o,!0)};var i=r&&r.data;Et(e,"$attrs",i&&i.attrs||t,null,!0),Et(e,"$listeners",n._parentListeners||t,null,!0)}(n),Ge(n,"beforeCreate",void 0,!1),function(t){var e=ar(t.$options.inject,t);e&&(Ot(!1),Object.keys(e).forEach((function(n){Et(t,n,e[n])})),Ot(!0))}(n),tr(n),function(t){var e=t.$options.provide;if(e){var n=a(e)?e.call(t):e;if(!s(n))return;for(var r=gn(t),o=ct?Reflect.ownKeys(n):Object.keys(n),i=0;i<o.length;i++){var c=o[i];Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(n,c))}}}(n),Ge(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(Er),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Nt,t.prototype.$delete=Pt,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return ir(r,t,e,n);(n=n||{}).user=!0;var o=new Xn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');bt(),_n(e,r,[o.value],r,i),$t()}return function(){o.teardown()}}}(Er),function(t){var n=/^hook:/;t.prototype.$on=function(t,r){var o=this;if(e(t))for(var i=0,a=t.length;i<a;i++)o.$on(t[i],r);else(o._events[t]||(o._events[t]=[])).push(r),n.test(t)&&(o._hasHookEvent=!0);return o},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,n){var r=this;if(!arguments.length)return r._events=Object.create(null),r;if(e(t)){for(var o=0,i=t.length;o<i;o++)r.$off(t[o],n);return r}var a,s=r._events[t];if(!s)return r;if(!n)return r._events[t]=null,r;for(var c=s.length;c--;)if((a=s[c])===n||a.fn===n){s.splice(c,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?T(n):n;for(var r=T(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;i<a;i++)_n(n[i],e,r,e,o)}return e}}(Er),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Je(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var a=n;a&&a.$vnode&&a.$parent&&a.$vnode===a.$parent._vnode;)a.$parent.$el=a.$el,a=a.$parent},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Ge(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||y(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Ge(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Er),function(t){we(t.prototype),t.prototype.$nextTick=function(t){return En(t,this)},t.prototype._render=function(){var t=this,n=t.$options,r=n.render,o=n._parentVnode;o&&t._isMounted&&(t.$scopedSlots=Se(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Ne(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;var i,a=ut,s=Ie;try{lt(t),Ie=t,i=r.call(t._renderProxy,t.$createElement)}catch(e){yn(e,t,"render"),i=t._vnode}finally{Ie=s,lt(a)}return e(i)&&1===i.length&&(i=i[0]),i instanceof ft||(i=dt()),i.parent=o,i}}(Er);var Lr=[String,RegExp,Array],Rr={name:"keep-alive",abstract:!0,props:{include:Lr,exclude:Lr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:Pr(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&Ir(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Mr(t,(function(t){return Dr(e,t)}))})),this.$watch("exclude",(function(e){Mr(t,(function(t){return!Dr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Re(t),n=e&&e.componentOptions;if(n){var r=Pr(n),o=this.include,i=this.exclude;if(o&&(!r||!Dr(o,r))||i&&r&&Dr(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,y(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Fr={KeepAlive:Rr};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:gr,extend:A,mergeOptions:Cr,defineReactive:Et},t.set=Nt,t.delete=Pt,t.nextTick=En,t.observable=function(t){return jt(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,Fr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=T(arguments,1);return n.unshift(this),a(t.install)?t.install.apply(t,n):a(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Cr(this.options,t),this}}(t),Nr(t),function(t){F.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&a(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Er),Object.defineProperty(Er.prototype,"$isServer",{get:ot}),Object.defineProperty(Er.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Er,"FunctionalRenderContext",{value:ur}),Er.version=Kn;var Hr=h("style,class"),Br=h("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Br(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zr=h("contenteditable,draggable,spellcheck"),Vr=h("events,caret,typing,plaintext-only"),Kr=function(t,e){return Gr(e)||"false"===e?"false":"contenteditable"===t&&Vr(e)?e:"true"},Jr=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),qr="http://www.w3.org/1999/xlink",Wr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Zr=function(t){return Wr(t)?t.slice(6,t.length):""},Gr=function(t){return null==t||!1===t};function Xr(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Yr(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Yr(e,n.data));return function(t,e){if(r(t)||r(e))return Qr(t,to(e));return""}(e.staticClass,e.class)}function Yr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return t?e?t+" "+e:t:e||""}function to(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o<i;o++)r(e=to(t[o]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):s(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var eo={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},no=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ro=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),oo=function(t){return no(t)||ro(t)};function io(t){return ro(t)?"svg":"math"===t?"math":void 0}var ao=Object.create(null);var so=h("text,number,password,search,email,tel,url");function co(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var uo=Object.freeze({__proto__:null,createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(eo[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),lo={create:function(t,e){fo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(fo(t,!0),fo(e))},destroy:function(t){fo(t,!0)}};function fo(t,n){var o=t.data.ref;if(r(o)){var i=t.context,s=t.componentInstance||t.elm,c=n?null:s,u=n?void 0:s;if(a(o))_n(o,i,[c],i,"template ref function");else{var l=t.data.refInFor,f="string"==typeof o||"number"==typeof o,d=Bt(o),p=i.$refs;if(f||d)if(l){var v=f?p[o]:o.value;n?e(v)&&y(v,s):e(v)?v.includes(s)||v.push(s):f?(p[o]=[s],po(i,o,p[o])):o.value=[s]}else if(f){if(n&&p[o]!==s)return;p[o]=u,po(i,o,c)}else if(d){if(n&&o.value!==s)return;o.value=c}}}}function po(t,e,n){var r=t._setupState;r&&b(r,e)&&(Bt(r[e])?r[e].value=n:r[e]=n)}var vo=new ft("",{},[]),ho=["create","activate","update","remove","destroy"];function mo(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,o=r(n=t.data)&&r(n=n.attrs)&&n.type,i=r(n=e.data)&&r(n=n.attrs)&&n.type;return o===i||so(o)&&so(i)}(t,e)||o(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function go(t,e,n){var o,i,a={};for(o=e;o<=n;++o)r(i=t[o].key)&&(a[i]=o);return a}var yo={create:_o,update:_o,destroy:function(t){_o(t,vo)}};function _o(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,o,i=t===vo,a=e===vo,s=$o(t.data.directives,t.context),c=$o(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,xo(o,"update",e,t),o.def&&o.def.componentUpdated&&l.push(o)):(xo(o,"bind",e,t),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n<u.length;n++)xo(u[n],"inserted",e,t)};i?Qt(e,"insert",f):f()}l.length&&Qt(e,"postpatch",(function(){for(var n=0;n<l.length;n++)xo(l[n],"componentUpdated",e,t)}));if(!i)for(n in s)c[n]||xo(s[n],"unbind",t,t,a)}(t,e)}var bo=Object.create(null);function $o(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++){if((r=t[n]).modifiers||(r.modifiers=bo),o[wo(r)]=r,e._setupState&&e._setupState.__sfc){var i=r.def||kr(e,"_setupState","v-"+r.name);r.def="function"==typeof i?{bind:i,update:i}:i}r.def=r.def||kr(e.$options,"directives",r.name)}return o}function wo(t){return t.rawName||"".concat(t.name,".").concat(Object.keys(t.modifiers||{}).join("."))}function xo(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(r){yn(r,n.context,"directive ".concat(t.name," ").concat(e," hook"))}}var Co=[lo,yo];function ko(t,e){var i=e.componentOptions;if(!(r(i)&&!1===i.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var a,s,c=e.elm,u=t.data.attrs||{},l=e.data.attrs||{};for(a in(r(l.__ob__)||o(l._v_attr_proxy))&&(l=e.data.attrs=A({},l)),l)s=l[a],u[a]!==s&&So(c,a,s,e.data.pre);for(a in(Z||X)&&l.value!==u.value&&So(c,"value",l.value),u)n(l[a])&&(Wr(a)?c.removeAttributeNS(qr,Zr(a)):zr(a)||c.removeAttribute(a))}}function So(t,e,n,r){r||t.tagName.indexOf("-")>-1?Oo(t,e,n):Jr(e)?Gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zr(e)?t.setAttribute(e,Kr(e,n)):Wr(e)?Gr(n)?t.removeAttributeNS(qr,Zr(e)):t.setAttributeNS(qr,e,n):Oo(t,e,n)}function Oo(t,e,n){if(Gr(n))t.removeAttribute(e);else{if(Z&&!G&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var To={create:ko,update:ko};function Ao(t,e){var o=e.elm,i=e.data,a=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=Xr(e),c=o._transitionClasses;r(c)&&(s=Qr(s,to(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var jo,Eo,No,Po,Do,Mo,Io={create:Ao,update:Ao},Lo=/[\w).+\-_$\]]/;function Ro(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),a)39===e&&92!==n&&(a=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(u)47===e&&92!==n&&(u=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||l||f||d){switch(e){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===e){for(var v=r-1,h=void 0;v>=0&&" "===(h=t.charAt(v));v--);h&&Lo.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==p&&m(),i)for(r=0;r<i.length;r++)o=Fo(o,i[r]);return o}function Fo(t,e){var n=e.indexOf("(");if(n<0)return'_f("'.concat(e,'")(').concat(t,")");var r=e.slice(0,n),o=e.slice(n+1);return'_f("'.concat(r,'")(').concat(t).concat(")"!==o?","+o:o)}function Ho(t,e){console.error("[Vue compiler]: ".concat(t))}function Bo(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Uo(t,e,n,r,o){(t.props||(t.props=[])).push(Xo({name:e,value:n,dynamic:o},r)),t.plain=!1}function zo(t,e,n,r,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(Xo({name:e,value:n,dynamic:o},r)),t.plain=!1}function Vo(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(Xo({name:e,value:n},r))}function Ko(t,e,n,r,o,i,a,s){(t.directives||(t.directives=[])).push(Xo({name:e,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),t.plain=!1}function Jo(t,e,n){return n?"_p(".concat(e,',"').concat(t,'")'):t+e}function qo(e,n,r,o,i,a,s,c){var u;(o=o||t).right?c?n="(".concat(n,")==='click'?'contextmenu':(").concat(n,")"):"click"===n&&(n="contextmenu",delete o.right):o.middle&&(c?n="(".concat(n,")==='click'?'mouseup':(").concat(n,")"):"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=Jo("!",n,c)),o.once&&(delete o.once,n=Jo("~",n,c)),o.passive&&(delete o.passive,n=Jo("&",n,c)),o.native?(delete o.native,u=e.nativeEvents||(e.nativeEvents={})):u=e.events||(e.events={});var l=Xo({value:r.trim(),dynamic:c},s);o!==t&&(l.modifiers=o);var f=u[n];Array.isArray(f)?i?f.unshift(l):f.push(l):u[n]=f?i?[l,f]:[f,l]:l,e.plain=!1}function Wo(t,e,n){var r=Zo(t,":"+e)||Zo(t,"v-bind:"+e);if(null!=r)return Ro(r);if(!1!==n){var o=Zo(t,e);if(null!=o)return JSON.stringify(o)}}function Zo(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var o=t.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===e){o.splice(i,1);break}return n&&delete t.attrsMap[e],r}function Go(t,e){for(var n=t.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(e.test(i.name))return n.splice(r,1),i}}function Xo(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Yo(t,e,n){var r=n||{},o=r.number,i="$$v",a=i;r.trim&&(a="(typeof ".concat(i," === 'string'")+"? ".concat(i,".trim()")+": ".concat(i,")")),o&&(a="_n(".concat(a,")"));var s=Qo(e,a);t.model={value:"(".concat(e,")"),expression:JSON.stringify(e),callback:"function (".concat(i,") {").concat(s,"}")}}function Qo(t,e){var n=function(t){if(t=t.trim(),jo=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<jo-1)return(Po=t.lastIndexOf("."))>-1?{exp:t.slice(0,Po),key:'"'+t.slice(Po+1)+'"'}:{exp:t,key:null};Eo=t,Po=Do=Mo=0;for(;!ei();)ni(No=ti())?oi(No):91===No&&ri(No);return{exp:t.slice(0,Do),key:t.slice(Do+1,Mo)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function ti(){return Eo.charCodeAt(++Po)}function ei(){return Po>=jo}function ni(t){return 34===t||39===t}function ri(t){var e=1;for(Do=Po;!ei();)if(ni(t=ti()))oi(t);else if(91===t&&e++,93===t&&e--,0===e){Mo=Po;break}}function oi(t){for(var e=t;!ei()&&(t=ti())!==e;);}var ii,ai="__r",si="__c";function ci(t,e,n){var r=ii;return function o(){null!==e.apply(null,arguments)&&fi(t,o,n,r)}}var ui=xn&&!(tt&&Number(tt[1])<=53);function li(t,e,n,r){if(ui){var o=rn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}ii.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function fi(t,e,n,r){(r||ii).removeEventListener(t,e._wrapper||e,n)}function di(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};ii=e.elm||t.elm,function(t){if(r(t[ai])){var e=Z?"change":"input";t[e]=[].concat(t[ai],t[e]||[]),delete t[ai]}r(t[si])&&(t.change=[].concat(t[si],t.change||[]),delete t[si])}(o),Yt(o,i,li,fi,ci,e.context),ii=void 0}}var pi,vi={create:di,update:di,destroy:function(t){return di(t,vo)}};function hi(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,a,s=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(i in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.domProps=A({},u)),c)i in u||(s[i]="");for(i in u){if(a=u[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),a===c[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=a;var l=n(a)?"":String(a);mi(s,l)&&(s.value=l)}else if("innerHTML"===i&&ro(s.tagName)&&n(s.innerHTML)){(pi=pi||document.createElement("div")).innerHTML="<svg>".concat(a,"</svg>");for(var f=pi.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}else if(a!==c[i])try{s[i]=a}catch(t){}}}}function mi(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return v(n)!==v(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var gi={create:hi,update:hi},yi=$((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function _i(t){var e=bi(t.style);return t.staticStyle?A(t.staticStyle,e):e}function bi(t){return Array.isArray(t)?j(t):"string"==typeof t?yi(t):t}var $i,wi=/^--/,xi=/\s*!important$/,Ci=function(t,e,n){if(wi.test(e))t.style.setProperty(e,n);else if(xi.test(n))t.style.setProperty(S(e),n.replace(xi,""),"important");else{var r=Si(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},ki=["Webkit","Moz","ms"],Si=$((function(t){if($i=$i||document.createElement("div").style,"filter"!==(t=x(t))&&t in $i)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<ki.length;n++){var r=ki[n]+e;if(r in $i)return r}}));function Oi(t,e){var o=e.data,i=t.data;if(!(n(o.staticStyle)&&n(o.style)&&n(i.staticStyle)&&n(i.style))){var a,s,c=e.elm,u=i.staticStyle,l=i.normalizedStyle||i.style||{},f=u||l,d=bi(e.data.style)||{};e.data.normalizedStyle=r(d.__ob__)?A({},d):d;var p=function(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=_i(o.data))&&A(r,n);(n=_i(t.data))&&A(r,n);for(var i=t;i=i.parent;)i.data&&(n=_i(i.data))&&A(r,n);return r}(e,!0);for(s in f)n(p[s])&&Ci(c,s,"");for(s in p)a=p[s],Ci(c,s,null==a?"":a)}}var Ti={create:Oi,update:Oi},Ai=/\s+/;function ji(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ai).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ei(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ai).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Ni(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,Pi(t.name||"v")),A(e,t),e}return"string"==typeof t?Pi(t):void 0}}var Pi=$((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),Di=q&&!G,Mi="transition",Ii="animation",Li="transition",Ri="transitionend",Fi="animation",Hi="animationend";Di&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Li="WebkitTransition",Ri="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Fi="WebkitAnimation",Hi="webkitAnimationEnd"));var Bi=q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ui(t){Bi((function(){Bi(t)}))}function zi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ji(t,e))}function Vi(t,e){t._transitionClasses&&y(t._transitionClasses,e),Ei(t,e)}function Ki(t,e,n){var r=qi(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Mi?Ri:Hi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c<a&&u()}),i+1),t.addEventListener(s,l)}var Ji=/\b(transform|all)(,|$)/;function qi(t,e){var n,r=window.getComputedStyle(t),o=(r[Li+"Delay"]||"").split(", "),i=(r[Li+"Duration"]||"").split(", "),a=Wi(o,i),s=(r[Fi+"Delay"]||"").split(", "),c=(r[Fi+"Duration"]||"").split(", "),u=Wi(s,c),l=0,f=0;return e===Mi?a>0&&(n=Mi,l=a,f=i.length):e===Ii?u>0&&(n=Ii,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Mi:Ii:null)?n===Mi?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Mi&&Ji.test(r[Li+"Property"])}}function Wi(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return Zi(e)+Zi(t[n])})))}function Zi(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Gi(t,e){var o=t.elm;r(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var i=Ni(t.data.transition);if(!n(i)&&!r(o._enterCb)&&1===o.nodeType){for(var c=i.css,u=i.type,l=i.enterClass,f=i.enterToClass,d=i.enterActiveClass,p=i.appearClass,h=i.appearToClass,m=i.appearActiveClass,g=i.beforeEnter,y=i.enter,_=i.afterEnter,b=i.enterCancelled,$=i.beforeAppear,w=i.appear,x=i.afterAppear,C=i.appearCancelled,k=i.duration,S=Ke,O=Ke.$vnode;O&&O.parent;)S=O.context,O=O.parent;var T=!S._isMounted||!t.isRootInsert;if(!T||w||""===w){var A=T&&p?p:l,j=T&&m?m:d,E=T&&h?h:f,N=T&&$||g,P=T&&a(w)?w:y,D=T&&x||_,M=T&&C||b,L=v(s(k)?k.enter:k),R=!1!==c&&!G,F=Qi(P),H=o._enterCb=I((function(){R&&(Vi(o,E),Vi(o,j)),H.cancelled?(R&&Vi(o,A),M&&M(o)):D&&D(o),o._enterCb=null}));t.data.show||Qt(t,"insert",(function(){var e=o.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),P&&P(o,H)})),N&&N(o),R&&(zi(o,A),zi(o,j),Ui((function(){Vi(o,A),H.cancelled||(zi(o,E),F||(Yi(L)?setTimeout(H,L):Ki(o,u,H)))}))),t.data.show&&(e&&e(),P&&P(o,H)),R||F||H()}}}function Xi(t,e){var o=t.elm;r(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var i=Ni(t.data.transition);if(n(i)||1!==o.nodeType)return e();if(!r(o._leaveCb)){var a=i.css,c=i.type,u=i.leaveClass,l=i.leaveToClass,f=i.leaveActiveClass,d=i.beforeLeave,p=i.leave,h=i.afterLeave,m=i.leaveCancelled,g=i.delayLeave,y=i.duration,_=!1!==a&&!G,b=Qi(p),$=v(s(y)?y.leave:y),w=o._leaveCb=I((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),_&&(Vi(o,l),Vi(o,f)),w.cancelled?(_&&Vi(o,u),m&&m(o)):(e(),h&&h(o)),o._leaveCb=null}));g?g(x):x()}function x(){w.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),_&&(zi(o,u),zi(o,f),Ui((function(){Vi(o,u),w.cancelled||(zi(o,l),b||(Yi($)?setTimeout(w,$):Ki(o,c,w)))}))),p&&p(o,w),_||b||w())}}function Yi(t){return"number"==typeof t&&!isNaN(t)}function Qi(t){if(n(t))return!1;var e=t.fns;return r(e)?Qi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function ta(t,e){!0!==e.data.show&&Gi(e)}var ea=function(t){var a,s,c={},u=t.modules,l=t.nodeOps;for(a=0;a<ho.length;++a)for(c[ho[a]]=[],s=0;s<u.length;++s)r(u[s][ho[a]])&&c[ho[a]].push(u[s][ho[a]]);function f(t){var e=l.parentNode(t);r(e)&&l.removeChild(e,t)}function d(t,e,n,i,a,s,u){if(r(t.elm)&&r(s)&&(t=s[u]=vt(t)),t.isRootInsert=!a,!function(t,e,n,i){var a=t.data;if(r(a)){var s=r(t.componentInstance)&&a.keepAlive;if(r(a=a.hook)&&r(a=a.init)&&a(t,!1),r(t.componentInstance))return p(t,e),v(n,t.elm,i),o(s)&&function(t,e,n,o){var i,a=t;for(;a.componentInstance;)if(r(i=(a=a.componentInstance._vnode).data)&&r(i=i.transition)){for(i=0;i<c.activate.length;++i)c.activate[i](vo,a);e.push(a);break}v(n,t.elm,o)}(t,e,n,i),!0}}(t,e,n,i)){var f=t.data,d=t.children,h=t.tag;r(h)?(t.elm=t.ns?l.createElementNS(t.ns,h):l.createElement(h,t),_(t),m(t,d,e),r(f)&&y(t,e),v(n,t.elm,i)):o(t.isComment)?(t.elm=l.createComment(t.text),v(n,t.elm,i)):(t.elm=l.createTextNode(t.text),v(n,t.elm,i))}}function p(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,g(t)?(y(t,e),_(t)):(fo(t),e.push(t))}function v(t,e,n){r(t)&&(r(n)?l.parentNode(n)===t&&l.insertBefore(t,e,n):l.appendChild(t,e))}function m(t,n,r){if(e(n))for(var o=0;o<n.length;++o)d(n[o],r,t.elm,null,!0,n,o);else i(t.text)&&l.appendChild(t.elm,l.createTextNode(String(t.text)))}function g(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function y(t,e){for(var n=0;n<c.create.length;++n)c.create[n](vo,t);r(a=t.data.hook)&&(r(a.create)&&a.create(vo,t),r(a.insert)&&e.push(t))}function _(t){var e;if(r(e=t.fnScopeId))l.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e),n=n.parent;r(e=Ke)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e)}function b(t,e,n,r,o,i){for(;r<=o;++r)d(n[r],i,t,e,!1,n,r)}function $(t){var e,n,o=t.data;if(r(o))for(r(e=o.hook)&&r(e=e.destroy)&&e(t),e=0;e<c.destroy.length;++e)c.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)$(t.children[n])}function w(t,e,n){for(;e<=n;++e){var o=t[e];r(o)&&(r(o.tag)?(x(o),$(o)):f(o.elm))}}function x(t,e){if(r(e)||r(t.data)){var n,o=c.remove.length+1;for(r(e)?e.listeners+=o:e=function(t,e){function n(){0==--n.listeners&&f(t)}return n.listeners=e,n}(t.elm,o),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&x(n,e),n=0;n<c.remove.length;++n)c.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else f(t.elm)}function C(t,e,n,o){for(var i=n;i<o;i++){var a=e[i];if(r(a)&&mo(t,a))return i}}function k(t,e,i,a,s,u){if(t!==e){r(e.elm)&&r(a)&&(e=a[s]=vt(e));var f=e.elm=t.elm;if(o(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?T(t.elm,e,i):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var p,v=e.data;r(v)&&r(p=v.hook)&&r(p=p.prepatch)&&p(t,e);var h=t.children,m=e.children;if(r(v)&&g(e)){for(p=0;p<c.update.length;++p)c.update[p](t,e);r(p=v.hook)&&r(p=p.update)&&p(t,e)}n(e.text)?r(h)&&r(m)?h!==m&&function(t,e,o,i,a){for(var s,c,u,f=0,p=0,v=e.length-1,h=e[0],m=e[v],g=o.length-1,y=o[0],_=o[g],$=!a;f<=v&&p<=g;)n(h)?h=e[++f]:n(m)?m=e[--v]:mo(h,y)?(k(h,y,i,o,p),h=e[++f],y=o[++p]):mo(m,_)?(k(m,_,i,o,g),m=e[--v],_=o[--g]):mo(h,_)?(k(h,_,i,o,g),$&&l.insertBefore(t,h.elm,l.nextSibling(m.elm)),h=e[++f],_=o[--g]):mo(m,y)?(k(m,y,i,o,p),$&&l.insertBefore(t,m.elm,h.elm),m=e[--v],y=o[++p]):(n(s)&&(s=go(e,f,v)),n(c=r(y.key)?s[y.key]:C(y,e,f,v))?d(y,i,t,h.elm,!1,o,p):mo(u=e[c],y)?(k(u,y,i,o,p),e[c]=void 0,$&&l.insertBefore(t,u.elm,h.elm)):d(y,i,t,h.elm,!1,o,p),y=o[++p]);f>v?b(t,n(o[g+1])?null:o[g+1].elm,o,p,g,i):p>g&&w(e,f,v)}(f,h,m,i,u):r(m)?(r(t.text)&&l.setTextContent(f,""),b(f,null,m,0,m.length-1,i)):r(h)?w(h,0,h.length-1):r(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),r(v)&&r(p=v.hook)&&r(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var O=h("attrs,class,staticClass,staticStyle,key");function T(t,e,n,i){var a,s=e.tag,c=e.data,u=e.children;if(i=i||c&&c.pre,e.elm=t,o(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(c)&&(r(a=c.hook)&&r(a=a.init)&&a(e,!0),r(a=e.componentInstance)))return p(e,n),!0;if(r(s)){if(r(u))if(t.hasChildNodes())if(r(a=c)&&r(a=a.domProps)&&r(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var l=!0,f=t.firstChild,d=0;d<u.length;d++){if(!f||!T(f,u[d],n,i)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else m(e,u,n);if(r(c)){var v=!1;for(var h in c)if(!O(h)){v=!0,y(e,n);break}!v&&c.class&&Wn(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,i,a){if(!n(e)){var s,u=!1,f=[];if(n(t))u=!0,d(e,f);else{var p=r(t.nodeType);if(!p&&mo(t,e))k(t,e,f,null,null,a);else{if(p){if(1===t.nodeType&&t.hasAttribute(R)&&(t.removeAttribute(R),i=!0),o(i)&&T(t,e,f))return S(e,f,!0),t;s=t,t=new ft(l.tagName(s).toLowerCase(),{},[],void 0,s)}var v=t.elm,h=l.parentNode(v);if(d(e,f,v._leaveCb?null:h,l.nextSibling(v)),r(e.parent))for(var m=e.parent,y=g(e);m;){for(var _=0;_<c.destroy.length;++_)c.destroy[_](m);if(m.elm=e.elm,y){for(var b=0;b<c.create.length;++b)c.create[b](vo,m);var x=m.data.hook.insert;if(x.merged)for(var C=x.fns.slice(1),O=0;O<C.length;O++)C[O]()}else fo(m);m=m.parent}r(h)?w([t],0,0):r(t.tag)&&$(t)}}return S(e,f,u),e.elm}r(t)&&$(t)}}({nodeOps:uo,modules:[To,Io,vi,gi,Ti,q?{create:ta,activate:ta,remove:function(t,e){!0!==t.data.show?Xi(t,e):e()}}:{}].concat(Co)});G&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ua(t,"input")}));var na={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Qt(n,"postpatch",(function(){na.componentUpdated(t,e,n)})):ra(t,e,n.context),t._vOptions=[].map.call(t.options,aa)):("textarea"===n.tag||so(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",sa),t.addEventListener("compositionend",ca),t.addEventListener("change",ca),G&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){ra(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,aa);if(o.some((function(t,e){return!D(t,r[e])})))(t.multiple?e.value.some((function(t){return ia(t,o)})):e.value!==e.oldValue&&ia(e.value,o))&&ua(t,"change")}}};function ra(t,e,n){oa(t,e),(Z||X)&&setTimeout((function(){oa(t,e)}),0)}function oa(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],o)i=M(r,aa(a))>-1,a.selected!==i&&(a.selected=i);else if(D(aa(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ia(t,e){return e.every((function(e){return!D(e,t)}))}function aa(t){return"_value"in t?t._value:t.value}function sa(t){t.target.composing=!0}function ca(t){t.target.composing&&(t.target.composing=!1,ua(t.target,"input"))}function ua(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function la(t){return!t.componentInstance||t.data&&t.data.transition?t:la(t.componentInstance._vnode)}var fa={bind:function(t,e,n){var r=e.value,o=(n=la(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Gi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=la(n)).data&&n.data.transition?(n.data.show=!0,r?Gi(n,(function(){t.style.display=t.__vOriginalDisplay})):Xi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},da={model:na,show:fa},pa={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function va(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?va(Re(e.children)):t}function ha(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[x(r)]=o[r];return e}function ma(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ga=function(t){return t.tag||ke(t)},ya=function(t){return"show"===t.name},_a={name:"transition",props:pa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ga)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var a=va(o);if(!a)return o;if(this._leaving)return ma(t,o);var s="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ha(this),u=this._vnode,l=va(u);if(a.data.directives&&a.data.directives.some(ya)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!ke(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,Qt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ma(t,o);if("in-out"===r){if(ke(a))return u;var d,p=function(){d()};Qt(c,"afterEnter",p),Qt(c,"enterCancelled",p),Qt(f,"delayLeave",(function(t){d=t}))}}return o}}},ba=A({tag:String,moveClass:String},pa);delete ba.mode;var $a={props:ba,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ha(this),s=0;s<o.length;s++){(l=o[s]).tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(i.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(r){var c=[],u=[];for(s=0;s<r.length;s++){var l;(l=r[s]).data.transition=a,l.data.pos=l.elm.getBoundingClientRect(),n[l.key]?c.push(l):u.push(l)}this.kept=t(e,null,c),this.removed=u}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(wa),t.forEach(xa),t.forEach(Ca),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;zi(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ri,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ri,t),n._moveCb=null,Vi(n,e))})}})))},methods:{hasMove:function(t,e){if(!Di)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){Ei(n,t)})),ji(n,e),n.style.display="none",this.$el.appendChild(n);var r=qi(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function wa(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function xa(t){t.data.newPos=t.elm.getBoundingClientRect()}function Ca(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var ka={Transition:_a,TransitionGroup:$a};Er.config.mustUseProp=Ur,Er.config.isReservedTag=oo,Er.config.isReservedAttr=Hr,Er.config.getTagNamespace=io,Er.config.isUnknownElement=function(t){if(!q)return!0;if(oo(t))return!1;if(t=t.toLowerCase(),null!=ao[t])return ao[t];var e=document.createElement(t);return t.indexOf("-")>-1?ao[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ao[t]=/HTMLUnknownElement/.test(e.toString())},A(Er.options.directives,da),A(Er.options.components,ka),Er.prototype.__patch__=q?ea:E,Er.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=dt),Ge(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Xn(t,r,E,{before:function(){t._isMounted&&!t._isDestroyed&&Ge(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i<o.length;i++)o[i].run();return null==t.$vnode&&(t._isMounted=!0,Ge(t,"mounted")),t}(this,t=t&&q?co(t):void 0,e)},q&&setTimeout((function(){B.devtools&&it&&it.emit("init",Er)}),0);var Sa=/\{\{((?:.|\r?\n)+?)\}\}/g,Oa=/[-.*+?^${}()|[\]\/\\]/g,Ta=$((function(t){var e=t[0].replace(Oa,"\\$&"),n=t[1].replace(Oa,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var Aa={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Zo(t,"class");n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));var r=Wo(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:".concat(t.staticClass,",")),t.classBinding&&(e+="class:".concat(t.classBinding,",")),e}};var ja,Ea={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Zo(t,"style");n&&(t.staticStyle=JSON.stringify(yi(n)));var r=Wo(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:".concat(t.staticStyle,",")),t.styleBinding&&(e+="style:(".concat(t.styleBinding,"),")),e}},Na=function(t){return(ja=ja||document.createElement("div")).innerHTML=t,ja.textContent},Pa=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Da=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ma=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Ia=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,La=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ra="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(U.source,"]*"),Fa="((?:".concat(Ra,"\\:)?").concat(Ra,")"),Ha=new RegExp("^<".concat(Fa)),Ba=/^\s*(\/?)>/,Ua=new RegExp("^<\\/".concat(Fa,"[^>]*>")),za=/^<!DOCTYPE [^>]+>/i,Va=/^<!\--/,Ka=/^<!\[/,Ja=h("script,style,textarea",!0),qa={},Wa={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Za=/&(?:lt|gt|quot|amp|#39);/g,Ga=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Xa=h("pre,textarea",!0),Ya=function(t,e){return t&&Xa(t)&&"\n"===e[0]};function Qa(t,e){var n=e?Ga:Za;return t.replace(n,(function(t){return Wa[t]}))}function ts(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||N,s=e.canBeLeftOpenTag||N,c=0,u=function(){if(n=t,r&&Ja(r)){var u=0,d=r.toLowerCase(),p=qa[d]||(qa[d]=new RegExp("([\\s\\S]*?)(</"+d+"[^>]*>)","i"));w=t.replace(p,(function(t,n,r){return u=r.length,Ja(d)||"noscript"===d||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Ya(d,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-w.length,t=w,f(d,c-u,c)}else{var v=t.indexOf("<");if(0===v){if(Va.test(t)){var h=t.indexOf("--\x3e");if(h>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,h),c,c+h+3),l(h+3),"continue"}if(Ka.test(t)){var m=t.indexOf("]>");if(m>=0)return l(m+2),"continue"}var g=t.match(za);if(g)return l(g[0].length),"continue";var y=t.match(Ua);if(y){var _=c;return l(y[0].length),f(y[1],_,c),"continue"}var b=function(){var e=t.match(Ha);if(e){var n={tagName:e[1],attrs:[],start:c};l(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Ba))&&(o=t.match(La)||t.match(Ia));)o.start=c,l(o[0].length),o.end=c,n.attrs.push(o);if(r)return n.unarySlash=r[1],l(r[0].length),n.end=c,n}}();if(b)return function(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&Ma(n)&&f(r),s(n)&&r===n&&f(n));for(var u=a(n)||!!c,l=t.attrs.length,d=new Array(l),p=0;p<l;p++){var v=t.attrs[p],h=v[3]||v[4]||v[5]||"",m="a"===n&&"href"===v[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;d[p]={name:v[1],value:Qa(h,m)}}u||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:t.start,end:t.end}),r=n);e.start&&e.start(n,d,u,t.start,t.end)}(b),Ya(b.tagName,t)&&l(1),"continue"}var $=void 0,w=void 0,x=void 0;if(v>=0){for(w=t.slice(v);!(Ua.test(w)||Ha.test(w)||Va.test(w)||Ka.test(w)||(x=w.indexOf("<",1))<0);)v+=x,w=t.slice(v);$=t.substring(0,v)}v<0&&($=t),$&&l($.length),e.chars&&$&&e.chars($,c-$.length,c)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===u())break}function l(e){c+=e,t=t.substring(e)}function f(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}f()}var es,ns,rs,os,is,as,ss,cs,us=/^@|^v-on:/,ls=/^v-|^@|^:|^#/,fs=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ds=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ps=/^\(|\)$/g,vs=/^\[.*\]$/,hs=/:(.*)$/,ms=/^:|^\.|^v-bind:/,gs=/\.[^.\]]+(?=[^\]]*$)/g,ys=/^v-slot(:|$)|^#/,_s=/[\r\n]/,bs=/[ \f\t\r\n]+/g,$s=$(Na),ws="_empty_";function xs(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:js(e),rawAttrsMap:{},parent:n,children:[]}}function Cs(t,e){es=e.warn||Ho,as=e.isPreTag||N,ss=e.mustUseProp||N,cs=e.getTagNamespace||N,e.isReservedTag,rs=Bo(e.modules,"transformNode"),os=Bo(e.modules,"preTransformNode"),is=Bo(e.modules,"postTransformNode"),ns=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=ks(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&Os(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),u&&u.if&&Os(u,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,u;t.children=t.children.filter((function(t){return!t.slotScope})),l(t),t.pre&&(s=!1),as(t.tag)&&(c=!1);for(var f=0;f<is.length;f++)is[f](t,e)}function l(t){if(!c)for(var e=void 0;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return ts(t,{warn:es,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,l,f){var d=r&&r.ns||cs(t);Z&&"svg"===d&&(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Es.test(r.name)||(r.name=r.name.replace(Ns,""),e.push(r))}return e}(i));var p,v=xs(t,i,r);d&&(v.ns=d),"style"!==(p=v).tag&&("script"!==p.tag||p.attrsMap.type&&"text/javascript"!==p.attrsMap.type)||ot()||(v.forbidden=!0);for(var h=0;h<os.length;h++)v=os[h](v,e)||v;s||(!function(t){null!=Zo(t,"v-pre")&&(t.pre=!0)}(v),v.pre&&(s=!0)),as(v.tag)&&(c=!0),s?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),o=0;o<n;o++)r[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(r[o].start=e[o].start,r[o].end=e[o].end);else t.pre||(t.plain=!0)}(v):v.processed||(Ss(v),function(t){var e=Zo(t,"v-if");if(e)t.if=e,Os(t,{exp:e,block:t});else{null!=Zo(t,"v-else")&&(t.else=!0);var n=Zo(t,"v-else-if");n&&(t.elseif=n)}}(v),function(t){var e=Zo(t,"v-once");null!=e&&(t.once=!0)}(v)),n||(n=v),a?u(v):(r=v,o.push(v))},end:function(t,e,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],u(i)},chars:function(t,e,n){if(r&&(!Z||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var o,u=r.children;if(t=c||t.trim()?"script"===(o=r).tag||"style"===o.tag?t:$s(t):u.length?a?"condense"===a&&_s.test(t)?"":" ":i?" ":"":""){c||"condense"!==a||(t=t.replace(bs," "));var l=void 0,f=void 0;!s&&" "!==t&&(l=function(t,e){var n=e?Ta(e):Sa;if(n.test(t)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(o=r.index)>c&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=Ro(r[1].trim());a.push("_s(".concat(u,")")),s.push({"@binding":u}),c=o+r[0].length}return c<t.length&&(s.push(i=t.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}(t,ns))?f={type:2,expression:l.expression,tokens:l.tokens,text:t}:" "===t&&u.length&&" "===u[u.length-1].text||(f={type:3,text:t}),f&&u.push(f)}}},comment:function(t,e,n){if(r){var o={type:3,text:t,isComment:!0};r.children.push(o)}}}),n}function ks(t,e){var n,r;(r=Wo(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Wo(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Zo(t,"scope"),t.slotScope=e||Zo(t,"slot-scope")):(e=Zo(t,"slot-scope"))&&(t.slotScope=e);var n=Wo(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||zo(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){if(a=Go(t,ys)){var r=Ts(a),o=r.name,i=r.dynamic;t.slotTarget=o,t.slotTargetDynamic=i,t.slotScope=a.value||ws}}else{var a;if(a=Go(t,ys)){var s=t.scopedSlots||(t.scopedSlots={}),c=Ts(a),u=c.name,l=(i=c.dynamic,s[u]=xs("template",[],t));l.slotTarget=u,l.slotTargetDynamic=i,l.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=l,!0})),l.slotScope=a.value||ws,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Wo(t,"name"))}(t),function(t){var e;(e=Wo(t,"is"))&&(t.component=e);null!=Zo(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<rs.length;o++)t=rs[o](t,e)||t;return function(t){var e,n,r,o,i,a,s,c,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=o=u[e].name,i=u[e].value,ls.test(r))if(t.hasBindings=!0,(a=As(r.replace(ls,"")))&&(r=r.replace(gs,"")),ms.test(r))r=r.replace(ms,""),i=Ro(i),(c=vs.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=x(r))&&(r="innerHTML"),a.camel&&!c&&(r=x(r)),a.sync&&(s=Qo(i,"$event"),c?qo(t,'"update:"+('.concat(r,")"),s,null,!1,0,u[e],!0):(qo(t,"update:".concat(x(r)),s,null,!1,0,u[e]),S(r)!==x(r)&&qo(t,"update:".concat(S(r)),s,null,!1,0,u[e])))),a&&a.prop||!t.component&&ss(t.tag,t.attrsMap.type,r)?Uo(t,r,i,u[e],c):zo(t,r,i,u[e],c);else if(us.test(r))r=r.replace(us,""),(c=vs.test(r))&&(r=r.slice(1,-1)),qo(t,r,i,a,!1,0,u[e],c);else{var l=(r=r.replace(ls,"")).match(hs),f=l&&l[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),vs.test(f)&&(f=f.slice(1,-1),c=!0)),Ko(t,r,o,i,f,c,a,u[e])}else zo(t,r,JSON.stringify(i),u[e]),!t.component&&"muted"===r&&ss(t.tag,t.attrsMap.type,r)&&Uo(t,r,"true",u[e])}(t),t}function Ss(t){var e;if(e=Zo(t,"v-for")){var n=function(t){var e=t.match(fs);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(ps,""),o=r.match(ds);o?(n.alias=r.replace(ds,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(e);n&&A(t,n)}}function Os(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function Ts(t){var e=t.name.replace(ys,"");return e||"#"!==t.name[0]&&(e="default"),vs.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'.concat(e,'"'),dynamic:!1}}function As(t){var e=t.match(gs);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function js(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var Es=/^xmlns:NS\d+/,Ns=/^NS\d+:/;function Ps(t){return xs(t.tag,t.attrsList.slice(),t.parent)}var Ds=[Aa,Ea,{preTransformNode:function(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r=void 0;if((n[":type"]||n["v-bind:type"])&&(r=Wo(t,"type")),n.type||r||!n["v-bind"]||(r="(".concat(n["v-bind"],").type")),r){var o=Zo(t,"v-if",!0),i=o?"&&(".concat(o,")"):"",a=null!=Zo(t,"v-else",!0),s=Zo(t,"v-else-if",!0),c=Ps(t);Ss(c),Vo(c,"type","checkbox"),ks(c,e),c.processed=!0,c.if="(".concat(r,")==='checkbox'")+i,Os(c,{exp:c.if,block:c});var u=Ps(t);Zo(u,"v-for",!0),Vo(u,"type","radio"),ks(u,e),Os(c,{exp:"(".concat(r,")==='radio'")+i,block:u});var l=Ps(t);return Zo(l,"v-for",!0),Vo(l,":type",r),ks(l,e),Os(c,{exp:o,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Ms,Is,Ls={model:function(t,e,n){var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return Yo(t,r,o),!1;if("select"===i)!function(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(r?"_n(val)":"val","})"),i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = ".concat(o,";");a="".concat(a," ").concat(Qo(e,i)),qo(t,"change",a,null,!0)}(t,r,o);else if("input"===i&&"checkbox"===a)!function(t,e,n){var r=n&&n.number,o=Wo(t,"value")||"null",i=Wo(t,"true-value")||"true",a=Wo(t,"false-value")||"false";Uo(t,"checked","Array.isArray(".concat(e,")")+"?_i(".concat(e,",").concat(o,")>-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),qo(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(a,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Qo(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Qo(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Qo(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Wo(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Uo(t,"checked","_q(".concat(e,",").concat(o,")")),qo(t,"change",Qo(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?ai:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n(".concat(l,")"));var f=Qo(e,l);c&&(f="if($event.target.composing)return;".concat(f));Uo(t,"value","(".concat(e,")")),qo(t,u,f,null,!0),(s||a)&&qo(t,"blur","$forceUpdate()")}(t,r,o);else if(!B.isReservedTag(i))return Yo(t,r,o),!1;return!0},text:function(t,e){e.value&&Uo(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Uo(t,"innerHTML","_s(".concat(e.value,")"),e)}},Rs={expectHTML:!0,modules:Ds,directives:Ls,isPreTag:function(t){return"pre"===t},isUnaryTag:Pa,mustUseProp:Ur,canBeLeftOpenTag:Da,isReservedTag:oo,getTagNamespace:io,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(Ds)},Fs=$((function(t){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Hs(t,e){t&&(Ms=Fs(e.staticKeys||""),Is=e.isReservedTag||N,Bs(t),Us(t,!1))}function Bs(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!Is(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Ms)))}(t),1===t.type){if(!Is(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Bs(r),r.static||(t.static=!1)}if(t.ifConditions)for(e=1,n=t.ifConditions.length;e<n;e++){var o=t.ifConditions[e].block;Bs(o),o.static||(t.static=!1)}}}function Us(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Us(t.children[n],e||!!t.for);if(t.ifConditions)for(n=1,r=t.ifConditions.length;n<r;n++)Us(t.ifConditions[n].block,e)}}var zs=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Vs=/\([^)]*?\);*$/,Ks=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Js={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},qs={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ws=function(t){return"if(".concat(t,")return null;")},Zs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ws("$event.target !== $event.currentTarget"),ctrl:Ws("!$event.ctrlKey"),shift:Ws("!$event.shiftKey"),alt:Ws("!$event.altKey"),meta:Ws("!$event.metaKey"),left:Ws("'button' in $event && $event.button !== 0"),middle:Ws("'button' in $event && $event.button !== 1"),right:Ws("'button' in $event && $event.button !== 2")};function Gs(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=Xs(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(a,","):r+='"'.concat(i,'":').concat(a,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function Xs(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return Xs(t)})).join(","),"]");var e=Ks.test(t.value),n=zs.test(t.value),r=Ks.test(t.value.replace(Vs,""));if(t.modifiers){var o="",i="",a=[],s=function(e){if(Zs[e])i+=Zs[e],Js[e]&&a.push(e);else if("exact"===e){var n=t.modifiers;i+=Ws(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else a.push(e)};for(var c in t.modifiers)s(c);a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(Ys).join("&&"),")return null;")}(a)),i&&(o+=i);var u=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(u,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function Ys(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Js[t],r=qs[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var Qs={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:E},tc=function(t){this.options=t,this.warn=t.warn||Ho,this.transforms=Bo(t.modules,"transformCode"),this.dataGenFns=Bo(t.modules,"genData"),this.directives=A(A({},Qs),t.directives);var e=t.isReservedTag||N;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function ec(t,e){var n=new tc(e),r=t?"script"===t.tag?"null":nc(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function nc(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return rc(t,e);if(t.once&&!t.onceProcessed)return oc(t,e);if(t.for&&!t.forProcessed)return sc(t,e);if(t.if&&!t.ifProcessed)return ic(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=fc(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?vc((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:x(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=",".concat(i));a&&(o+="".concat(i?"":",null",",").concat(a));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:fc(e,n,!0);return"_c(".concat(t,",").concat(cc(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,o=e.maybeComponent(t);(!t.plain||t.pre&&o)&&(r=cc(t,e));var i=void 0,a=e.options.bindings;o&&a&&!1!==a.__isScriptSetup&&(i=function(t,e){var n=x(e),r=C(n),o=function(o){return t[e]===o?e:t[n]===o?n:t[r]===o?r:void 0},i=o("setup-const")||o("setup-reactive-const");if(i)return i;var a=o("setup-let")||o("setup-ref")||o("setup-maybe-ref");if(a)return a}(a,t.tag)),i||(i="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:fc(t,e,!0);n="_c(".concat(i).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var c=0;c<e.transforms.length;c++)n=e.transforms[c](t,n);return n}return fc(t,e)||"void 0"}function rc(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return ".concat(nc(t,e),"}")),e.pre=n,"_m(".concat(e.staticRenderFns.length-1).concat(t.staticInFor?",true":"",")")}function oc(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return ic(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o(".concat(nc(t,e),",").concat(e.onceId++,",").concat(n,")"):nc(t,e)}return rc(t,e)}function ic(t,e,n,r){return t.ifProcessed=!0,ac(t.ifConditions.slice(),e,n,r)}function ac(t,e,n,r){if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"(".concat(o.exp,")?").concat(i(o.block),":").concat(ac(t,e,n,r)):"".concat(i(o.block));function i(t){return n?n(t,e):t.once?oc(t,e):nc(t,e)}}function sc(t,e,n,r){var o=t.for,i=t.alias,a=t.iterator1?",".concat(t.iterator1):"",s=t.iterator2?",".concat(t.iterator2):"";return t.forProcessed=!0,"".concat(r||"_l","((").concat(o,"),")+"function(".concat(i).concat(a).concat(s,"){")+"return ".concat((n||nc)(t,e))+"})"}function cc(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=e.directives[i.name];u&&(a=!!u(t,i,e.warn)),a&&(c=!0,s+='{name:"'.concat(i.name,'",rawName:"').concat(i.rawName,'"').concat(i.value?",value:(".concat(i.value,"),expression:").concat(JSON.stringify(i.value)):"").concat(i.arg?",arg:".concat(i.isDynamicArg?i.arg:'"'.concat(i.arg,'"')):"").concat(i.modifiers?",modifiers:".concat(JSON.stringify(i.modifiers)):"","},"))}if(c)return s.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:".concat(t.key,",")),t.ref&&(n+="ref:".concat(t.ref,",")),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'.concat(t.tag,'",'));for(var o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+="attrs:".concat(vc(t.attrs),",")),t.props&&(n+="domProps:".concat(vc(t.props),",")),t.events&&(n+="".concat(Gs(t.events,!1),",")),t.nativeEvents&&(n+="".concat(Gs(t.nativeEvents,!0),",")),t.slotTarget&&!t.slotScope&&(n+="slot:".concat(t.slotTarget,",")),t.scopedSlots&&(n+="".concat(function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||uc(n)})),o=!!t.if;if(!r)for(var i=t.parent;i;){if(i.slotScope&&i.slotScope!==ws||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}var a=Object.keys(e).map((function(t){return lc(e[t],n)})).join(",");return"scopedSlots:_u([".concat(a,"]").concat(r?",null,true":"").concat(!r&&o?",null,false,".concat(function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(a)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=ec(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(vc(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function uc(t){return 1===t.type&&("slot"===t.tag||t.children.some(uc))}function lc(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return ic(t,e,lc,"null");if(t.for&&!t.forProcessed)return sc(t,e,lc);var r=t.slotScope===ws?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(fc(t,e)||"undefined",":undefined"):fc(t,e)||"undefined":nc(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function fc(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return"".concat((r||nc)(a,e)).concat(s)}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var o=t[r];if(1===o.type){if(dc(o)||o.ifConditions&&o.ifConditions.some((function(t){return dc(t.block)}))){n=2;break}(e(o)||o.ifConditions&&o.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(i,e.maybeComponent):0,u=o||pc;return"[".concat(i.map((function(t){return u(t,e)})).join(","),"]").concat(c?",".concat(c):"")}}function dc(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function pc(t,e){return 1===t.type?nc(t,e):3===t.type&&t.isComment?function(t){return"_e(".concat(JSON.stringify(t.text),")")}(t):function(t){return"_v(".concat(2===t.type?t.expression:hc(JSON.stringify(t.text)),")")}(t)}function vc(t){for(var e="",n="",r=0;r<t.length;r++){var o=t[r],i=hc(o.value);o.dynamic?n+="".concat(o.name,",").concat(i,","):e+='"'.concat(o.name,'":').concat(i,",")}return e="{".concat(e.slice(0,-1),"}"),n?"_d(".concat(e,",[").concat(n.slice(0,-1),"])"):e}function hc(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function mc(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),E}}function gc(t){var e=Object.create(null);return function(n,r,o){(r=A({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(e[i])return e[i];var a=t(n,r),s={},c=[];return s.render=mc(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(t){return mc(t,c)})),e[i]=s}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var yc,_c,bc=(yc=function(t,e){var n=Cs(t.trim(),e);!1!==e.optimize&&Hs(n,e);var r=ec(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),o=[],i=[];if(n)for(var a in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=A(Object.create(t.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(t,e,n){(n?i:o).push(t)};var s=yc(e.trim(),r);return s.errors=o,s.tips=i,s}return{compile:e,compileToFunctions:gc(e)}}),$c=bc(Rs).compileToFunctions;function wc(t){return(_c=_c||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',_c.innerHTML.indexOf("&#10;")>0}var xc=!!q&&wc(!1),Cc=!!q&&wc(!0),kc=$((function(t){var e=co(t);return e&&e.innerHTML})),Sc=Er.prototype.$mount;return Er.prototype.$mount=function(t,e){if((t=t&&co(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=kc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=$c(r,{outputSourceRange:!1,shouldDecodeNewlines:xc,shouldDecodeNewlinesForHref:Cc,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Sc.call(this,t,e)},Er.compile=$c,A(Er,Jn),Er.effect=function(t,e){var n=new Xn(ut,t,E,{sync:!0});e&&(n.update=function(){e((function(){return n.run()}))})},Er}));
\ No newline at end of file