diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a7cca4..6e7e73f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Improved accessibility for screen readers. ([#74](https://github.com/craftcms/ckeditor/issues/74), [#166](https://github.com/craftcms/ckeditor/pull/166)) - Fixed a bug where resized images weren’t getting updated `width` and `height` attributes. ([#165](https://github.com/craftcms/ckeditor/pull/165)) ## 3.7.3 - 2024-02-08 diff --git a/src/Field.php b/src/Field.php index fa694d4..b5740ba 100644 --- a/src/Field.php +++ b/src/Field.php @@ -317,6 +317,8 @@ protected function inputHtml(mixed $value, ElementInterface $element = null): st $baseConfig = [ 'defaultTransform' => $defaultTransform?->handle, 'elementSiteId' => $element?->siteId, + 'accessibleFieldName' => $this->_accessibleFieldName($element), + 'describedBy' => $this->_describedBy($view), 'findAndReplace' => [ 'uiType' => 'dropdown', ], @@ -910,4 +912,38 @@ private function _adjustPurifierConfig(HTMLPurifier_Config $purifierConfig): HTM return $purifierConfig; } + + /** + * Returns an accessible name for the field (to be plugged into CKEditor's main editing area aria-label). + * + * @param ElementInterface|null $element + * @return string + */ + private function _accessibleFieldName(?ElementInterface $element = null): string + { + return Craft::t('site', $this->name) . + ($element?->getFieldLayout()?->getField($this->handle)?->required ? ' ' . Craft::t('site', 'Required') : '') . + ($this->getIsTranslatable($element) ? ' ' . $this->getTranslationDescription($element) : ''); + } + + /** + * Namespaces field's $describedBy value to be passed to the field. + * + * @param View $view + * @return string + */ + private function _describedBy(View $view): string + { + if (!empty($this->describedBy)) { + $describedByArray = explode(' ', $this->describedBy); + $namespace = trim(preg_replace('/\[|\]/', '-', $view->getNamespace()), '-'); + foreach ($describedByArray as $key => $item) { + $describedByArray[$key] = "$namespace-$item"; + } + + return implode(' ', $describedByArray); + } + + return ''; + } } diff --git a/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js b/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js index b887b20..67d730b 100644 --- a/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js +++ b/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js @@ -1,3 +1,3 @@ /*! For license information please see ckeditor5-craftcms.js.LICENSE.txt */ -!function(){var e={3665:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content code {\n\tbackground-color: hsla(0, 0%, 78%, 0.3);\n\tpadding: .15em;\n\tborder-radius: 2px;\n}\n\n.ck.ck-editor__editable .ck-code_selected {\n\tbackground-color: hsla(0, 0%, 78%, 0.5);\n}\n"],sourceRoot:""}]),t.Z=s},3541:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]),t.Z=s},8137:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content pre{background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;color:#353535;direction:ltr;font-style:normal;min-width:200px;padding:1em;tab-size:4;text-align:left;white-space:pre-wrap}.ck-content pre code{background:unset;border-radius:0;padding:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{background:var(--ck-color-code-block-label-background);color:#fff;font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);right:10px;top:-1px;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-code-block/theme/codeblock.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-code-block/codeblock.css"],names:[],mappings:"AAKA,gBAGC,4BAAiC,CACjC,wBAAiC,CACjC,iBAAkB,CAHlB,aAAwB,CAOxB,aAAc,CAMd,iBAAkB,CAGlB,eAAgB,CAjBhB,WAAY,CAUZ,UAAW,CAHX,eAAgB,CAIhB,oBAaD,CALC,qBACC,gBAAiB,CAEjB,eAAgB,CADhB,SAED,CAGD,4BACC,iBAMD,CAJC,iDACC,2BAA4B,CAC5B,iBACD,CCjCD,MACC,8CACD,CAEA,iDAGC,sDAAuD,CAMvD,UAAuB,CAHvB,+BAAgC,CADhC,cAAe,CAEf,gBAAiB,CACjB,uDAAwD,CANxD,UAAW,CADX,QAAS,CAST,kBACD,CAEA,+CAEC,gBAAiB,CAEjB,iBAAkB,CADlB,eAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content pre {\n\tpadding: 1em;\n\tcolor: hsl(0, 0%, 20.8%);\n\tbackground: hsla(0, 0%, 78%, 0.3);\n\tborder: 1px solid hsl(0, 0%, 77%);\n\tborder-radius: 2px;\n\n\t/* Code block are language direction–agnostic. */\n\ttext-align: left;\n\tdirection: ltr;\n\n\ttab-size: 4;\n\twhite-space: pre-wrap;\n\n\t/* Don't inherit the style, e.g. when in a block quote. */\n\tfont-style: normal;\n\n\t/* Don't let the code be squashed e.g. when in a table cell. */\n\tmin-width: 200px;\n\n\t& code {\n\t\tbackground: unset;\n\t\tpadding: 0;\n\t\tborder-radius: 0;\n\t}\n}\n\n.ck.ck-editor__editable pre {\n\tposition: relative;\n\n\t&[data-language]::after {\n\t\tcontent: attr(data-language);\n\t\tposition: absolute;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-code-block-label-background: hsl(0, 0%, 46%);\n}\n\n.ck.ck-editor__editable pre[data-language]::after {\n\ttop: -1px;\n\tright: 10px;\n\tbackground: var(--ck-color-code-block-label-background);\n\n\tfont-size: 10px;\n\tfont-family: var(--ck-font-face);\n\tline-height: 16px;\n\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-medium);\n\tcolor: hsl(0, 0%, 100%);\n\twhite-space: nowrap;\n}\n\n.ck.ck-code-block-dropdown .ck-dropdown__panel {\n\t/* There could be dozens of languages available. Use scroll to prevent a 10e6px dropdown. */\n\tmax-height: 250px;\n\toverflow-y: auto;\n\toverflow-x: hidden;\n}\n"],sourceRoot:""}]),t.Z=s},4659:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-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)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-editor-classic/classiceditor.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,cAIC,iBAMD,CAJC,2DAEC,yBACD,CCLC,gDCED,eDKC,CAPA,uICMA,qCAAsC,CDJpC,2BAA4B,CAC5B,4BAIF,CAPA,gDAMC,qBACD,CAEA,iFACC,uBAAwB,CCR1B,eDaC,CANA,yMCHA,qCAAsC,CDOpC,eAEF,CAKF,yCAEC,0CAA2C,CCpB3C,eD8BD,CAZA,yHCdE,qCAAsC,CDmBtC,wBAAyB,CACzB,yBAMF,CAHC,0DACC,wCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor {\n\t/* All the elements within `.ck-editor` are positioned relatively to it.\n\t If any element needs to be positioned with respect to the , etc.,\n\t it must land outside of the `.ck-editor` in DOM. */\n\tposition: relative;\n\n\t& .ck-editor__top .ck-sticky-panel .ck-toolbar {\n\t\t/* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */\n\t\tz-index: var(--ck-z-panel);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n.ck.ck-editor__top {\n\t& .ck-sticky-panel {\n\t\t& .ck-toolbar {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\n\t\t\tborder-bottom-width: 0;\n\t\t}\n\n\t\t& .ck-sticky-panel__content_sticky .ck-toolbar {\n\t\t\tborder-bottom-width: 1px;\n\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* Note: Use ck-editor__main to make sure these styles don\'t apply to other editor types */\n.ck.ck-editor__main > .ck-editor__editable {\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/113 */\n\tbackground: var(--ck-color-base-background);\n\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&:not(.ck-focused) {\n\t\tborder-color: var(--ck-color-base-border);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},6108:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-find-result{background:var(--ck-color-highlight-background);color:var(--ck-color-text)}.ck-find-result_selected{background:#ff9633}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplace.css"],names:[],mappings:"AAKA,gBACC,+CAAgD,CAChD,0BACD,CAEA,yBACC,kBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-find-result {\n\tbackground: var(--ck-color-highlight-background);\n\tcolor: var(--ck-color-text);\n}\n\n.ck-find-result_selected {\n\tbackground: hsl(29, 100%, 60%);\n}\n"],sourceRoot:""}]),t.Z=s},1199:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-find-and-replace-form{max-width:100%;& .ck-find-and-replace-form__inputs,.ck-find-and-replace-form__actions{display:flex}& .ck-find-and-replace-form__inputs.ck-find-and-replace-form__inputs .ck-results-counter,.ck-find-and-replace-form__actions.ck-find-and-replace-form__inputs .ck-results-counter{position:absolute}}.ck.ck-find-and-replace-form{width:400px}.ck.ck-find-and-replace-form:focus{outline:none}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions,.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs{align-content:stretch;align-items:center;flex:1 1 auto;flex-direction:row;flex-wrap:wrap;margin:0;padding:var(--ck-spacing-large)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions>.ck-button,.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>.ck-button{flex:0 0 auto}[dir=ltr] .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions>*+*,[dir=ltr] .ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>*+*{margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions>*+*,[dir=rtl] .ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>*+*{margin-right:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions .ck-labeled-field-view,.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs .ck-labeled-field-view{flex:1 1 auto}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions .ck-labeled-field-view .ck-input,.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs .ck-labeled-field-view .ck-input{min-width:50px;width:100%}.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs{align-items:flex-start}.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>.ck-button-prev>.ck-icon{transform:rotate(90deg)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>.ck-button-next>.ck-icon{transform:rotate(-90deg)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs .ck-results-counter{top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs .ck-results-counter{right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs .ck-results-counter{left:var(--ck-spacing-standard)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs .ck-results-counter{color:var(--ck-color-base-border)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>.ck-labeled-field-replace{flex:0 0 100%;padding-top:var(--ck-spacing-standard)}[dir=ltr] .ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>.ck-labeled-field-replace{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs>.ck-labeled-field-replace{margin-right:0}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions{flex-wrap:wrap;justify-content:flex-end;margin-top:calc(var(--ck-spacing-large)*-1)}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions>.ck-button-find{font-weight:700}.ck.ck-find-and-replace-form .ck-find-and-replace-form__actions>.ck-button-find .ck-button__label{padding-left:var(--ck-spacing-large);padding-right:var(--ck-spacing-large)}.ck.ck-find-and-replace-form .ck-switchbutton{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%}@media screen and (max-width:600px){.ck.ck-find-and-replace-form{max-width:100%;width:300px}.ck.ck-find-and-replace-form.ck-find-and-replace-form__input{flex-wrap:wrap}.ck.ck-find-and-replace-form.ck-find-and-replace-form__input .ck-labeled-field-view{flex:1 0 auto;margin-bottom:var(--ck-spacing-standard);width:100%}.ck.ck-find-and-replace-form.ck-find-and-replace-form__input>.ck-button{text-align:center}.ck.ck-find-and-replace-form.ck-find-and-replace-form__input>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form.ck-find-and-replace-form__input>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form.ck-find-and-replace-form__input>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form.ck-find-and-replace-form__input>.ck-button:first-of-type .ck-button__label{text-align:center;width:100%}.ck.ck-find-and-replace-form.ck-find-and-replace-form__actions>:not(.ck-labeled-field-view){flex:1 1 auto;flex-wrap:wrap}.ck.ck-find-and-replace-form.ck-find-and-replace-form__actions>:not(.ck-labeled-field-view)>.ck-button{text-align:center}.ck.ck-find-and-replace-form.ck-find-and-replace-form__actions>:not(.ck-labeled-field-view)>.ck-button:first-of-type{flex:1 1 auto}[dir=ltr] .ck.ck-find-and-replace-form.ck-find-and-replace-form__actions>:not(.ck-labeled-field-view)>.ck-button:first-of-type{margin-left:0}[dir=rtl] .ck.ck-find-and-replace-form.ck-find-and-replace-form__actions>:not(.ck-labeled-field-view)>.ck-button:first-of-type{margin-right:0}.ck.ck-find-and-replace-form.ck-find-and-replace-form__actions>:not(.ck-labeled-field-view)>.ck-button .ck-button__label{text-align:center;width:100%}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-find-and-replace/theme/findandreplaceform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-find-and-replace/findandreplaceform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAKA,6BACC,cAAe,CAEf,uEACC,YAMD,CAHC,iLACC,iBACD,CAEF,CCRA,6BACC,WAoHD,CA9GC,mCACC,YACD,CAGA,+HAMC,qBAAsB,CADtB,kBAAmB,CAHnB,aAAc,CACd,kBAAmB,CACnB,cAAe,CAKf,QAAS,CADT,+BA4BD,CAzBC,qJACC,aACD,CAGC,2JACC,sCACD,CAIA,2JACC,uCACD,CAGD,6KACC,aAMD,CAJC,iMAEC,cAAe,CADf,UAED,CAMF,+DAEC,sBAqCD,CAnCC,wFACC,uBACD,CAEA,wFACC,wBACD,CAEA,mFACC,OAAQ,CACR,0BAWD,CAbA,6FAKE,gCAQF,CAbA,6FASE,+BAIF,CAbA,mFAYC,iCACD,CAEA,yFACC,aAAc,CACd,sCASD,CAXA,mGAKE,aAMF,CAXA,mGASE,cAEF,CAID,gEACC,cAAe,CACf,wBAAyB,CACzB,2CAWD,CATC,gFACC,eAOD,CAJC,kGACC,oCAAqC,CACrC,qCACD,CAIF,8CAMC,kBAAmB,CAJnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAA8B,CAJ9B,UAMD,CCtHA,oCD0HA,6BAIC,cAAe,CAHf,WA+DD,CAzDC,6DACC,cA4BD,CA1BC,oFACC,aAAc,CAEd,wCAAyC,CADzC,UAED,CAEA,wEACC,iBAkBD,CAhBC,sFACC,aAcD,CAfA,gGAIE,aAWF,CAfA,gGAQE,cAOF,CAJC,wGAEC,iBAAkB,CADlB,UAED,CAMH,4FAEC,aAAc,CADd,cAuBD,CApBC,uGACC,iBAkBD,CAhBC,qHACC,aASD,CAVA,+HAIE,aAMF,CAVA,+HAQE,cAEF,CAEA,yHAEC,iBAAkB,CADlB,UAED,CCrLH",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-find-and-replace-form {\n\tmax-width: 100%;\n\n\t& .ck-find-and-replace-form__inputs, .ck-find-and-replace-form__actions {\n\t\tdisplay: flex;\n\n\t\t/* The inputs area styles */\n\t\t&.ck-find-and-replace-form__inputs .ck-results-counter {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-find-and-replace-form {\n\twidth: 400px;\n\n\t/*\n\t * The
needs tabindex="-1" for proper Esc handling after being clicked\n\t * but the side effect is that this creates a nasty focus outline in some browsers.\n\t */\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t/* Generic styles for the form inputs and actions. */\n\t& .ck-find-and-replace-form__inputs,\n\t& .ck-find-and-replace-form__actions {\n\t\tflex: 1 1 auto;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\talign-content: stretch;\n\n\t\tpadding: var(--ck-spacing-large);\n\t\tmargin: 0;\n\n\t\t& > .ck-button {\n\t\t\tflex: 0 0 auto;\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\t& > * + * {\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t& > * + * {\n\t\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex: 1 1 auto;\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\t\t\t\tmin-width: 50px;\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/* Styles specific for inputs area. */\n\t& .ck-find-and-replace-form__inputs {\n\t\t/* To display all controls in line when there\'s an error under the input */\n\t\talign-items: flex-start;\n\n\t\t& > .ck-button-prev > .ck-icon {\n\t\t\ttransform: rotate(90deg);\n\t\t}\n\n\t\t& > .ck-button-next > .ck-icon {\n\t\t\ttransform: rotate(-90deg);\n\t\t}\n\n\t\t& .ck-results-counter {\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tright: var(--ck-spacing-standard);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tleft: var(--ck-spacing-standard);\n\t\t\t}\n\n\t\t\tcolor: var(--ck-color-base-border);\n\t\t}\n\n\t\t& > .ck-labeled-field-replace {\n\t\t\tflex: 0 0 100%;\n\t\t\tpadding-top: var(--ck-spacing-standard);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Styles specific for actions area. */\n\t& .ck-find-and-replace-form__actions {\n\t\tflex-wrap: wrap;\n\t\tjustify-content: flex-end;\n\t\tmargin-top: calc( -1 * var(--ck-spacing-large) );\n\n\t\t& > .ck-button-find {\n\t\t\tfont-weight: bold;\n\n\t\t\t/* Beef the find button up a little. It\'s the main action button in the form */\n\t\t\t& .ck-button__label {\n\t\t\t\tpadding-left: var(--ck-spacing-large);\n\t\t\t\tpadding-right: var(--ck-spacing-large);\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck-switchbutton {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: nowrap;\n\t\tjustify-content: space-between;\n\t\talign-items: center;\n\t}\n}\n\n@mixin ck-media-phone {\n\t.ck.ck-find-and-replace-form {\n\t\twidth: 300px;\n\n\t\t/* Don\'t let the form overflow from the dialog (https://github.com/cksource/ckeditor5-commercial/issues/5913) */\n\t\tmax-width: 100%;\n\n\t\t/* Styles specific for inputs area. */\n\t\t&.ck-find-and-replace-form__input {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\tflex: 1 0 auto;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-bottom: var(--ck-spacing-standard);\n\t\t\t}\n\n\t\t\t& > .ck-button {\n\t\t\t\ttext-align: center;\n\n\t\t\t\t&:first-of-type {\n\t\t\t\t\tflex: 1 1 auto;\n\n\t\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\t\tmargin-right: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t& .ck-button__label {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Styles specific for actions area. */\n\t\t&.ck-find-and-replace-form__actions > :not(.ck-labeled-field-view) {\n\t\t\tflex-wrap: wrap;\n\t\t\tflex: 1 1 auto;\n\n\t\t\t& > .ck-button {\n\t\t\t\ttext-align: center;\n\n\t\t\t\t&:first-of-type {\n\t\t\t\t\tflex: 1 1 auto;\n\n\t\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\t\tmargin-right: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t& .ck-button__label {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},9759:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-font/theme/fontsize.css"],names:[],mappings:"AAUC,uBACC,cACD,CAEA,wBACC,eACD,CAEA,sBACC,eACD,CAEA,uBACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* The values should be synchronized with the "FONT_SIZE_PRESET_UNITS" object in the "/src/fontsize/utils.js" file. */\n\n/* Styles should be prefixed with the `.ck-content` class.\nSee https://github.com/ckeditor/ckeditor5/issues/6636 */\n.ck-content {\n\t& .text-tiny {\n\t\tfont-size: .7em;\n\t}\n\n\t& .text-small {\n\t\tfont-size: .85em;\n\t}\n\n\t& .text-big {\n\t\tfont-size: 1.4em;\n\t}\n\n\t& .text-huge {\n\t\tfont-size: 1.8em;\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},6826:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-heading/theme/heading.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},4422:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{background:#dedede;border:0;height:4px;margin:15px 0}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-horizontal-line/theme/horizontalline.css"],names:[],mappings:"AAMA,yCAEC,iBACD,CAEA,eAGC,kBAA2B,CAC3B,QAAS,CAFT,UAAW,CADX,aAID",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n\n.ck-editor__editable .ck-horizontal-line {\n\t/* Necessary to render properly next to floated objects, e.g. side image case. */\n\tdisplay: flow-root;\n}\n\n.ck-content hr {\n\tmargin: 15px 0;\n\theight: 4px;\n\tbackground: hsl(0, 0%, 87%);\n\tborder: 0;\n}\n"],sourceRoot:""}]),t.Z=s},846:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-widget.raw-html-embed{display:flow-root;font-style:normal;margin:.9em auto;min-width:15em;position:relative}.ck-widget.raw-html-embed:before{position:absolute;z-index:1}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{display:flex;flex-direction:column;position:absolute}.ck-widget.raw-html-embed .raw-html-embed__preview{display:flex;overflow:hidden;position:relative}.ck-widget.raw-html-embed .raw-html-embed__preview-content{border-collapse:separate;border-spacing:7px;display:table;margin:auto;position:relative;width:100%}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}:root{--ck-html-embed-content-width:calc(100% - var(--ck-icon-size)*1.5);--ck-html-embed-source-height:10em;--ck-html-embed-unfocused-outline-width:1px;--ck-html-embed-content-min-height:calc(var(--ck-icon-size) + var(--ck-spacing-standard));--ck-html-embed-source-disabled-background:var(--ck-color-base-foreground);--ck-html-embed-source-disabled-color:#737373}.ck-widget.raw-html-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base)}.ck-widget.raw-html-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.raw-html-embed[dir=ltr]{text-align:left}.ck-widget.raw-html-embed[dir=rtl]{text-align:right}.ck-widget.raw-html-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);top:calc(var(--ck-html-embed-unfocused-outline-width)*-1);transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.raw-html-embed[dir=rtl]:before{left:auto;right:var(--ck-spacing-standard)}.ck-widget.raw-html-embed[dir=ltr] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck.ck-editor__editable.ck-blurred .ck-widget.raw-html-embed.ck-widget_selected:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable:not(.ck-blurred) .ck-widget.raw-html-embed.ck-widget_selected:before{background:var(--ck-color-focus-border);padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable .ck-widget.raw-html-embed:not(.ck-widget_selected):hover:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck-widget.raw-html-embed .raw-html-embed__content-wrapper{padding:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{right:var(--ck-spacing-standard);top:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__save-button{color:var(--ck-color-button-save)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__cancel-button{color:var(--ck-color-button-cancel)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button:not(:first-child){margin-top:var(--ck-spacing-small)}.ck-widget.raw-html-embed[dir=rtl] .raw-html-embed__buttons-wrapper{left:var(--ck-spacing-standard);right:auto}.ck-widget.raw-html-embed .raw-html-embed__source{box-sizing:border-box;direction:ltr;font-family:monospace;font-size:var(--ck-font-size-base);height:var(--ck-html-embed-source-height);min-width:0;padding:var(--ck-spacing-standard);resize:none;tab-size:4;text-align:left;white-space:pre-wrap;width:var(--ck-html-embed-content-width)}.ck-widget.raw-html-embed .raw-html-embed__source[disabled]{-webkit-text-fill-color:var(--ck-html-embed-source-disabled-color);background:var(--ck-html-embed-source-disabled-background);color:var(--ck-html-embed-source-disabled-color);opacity:1}.ck-widget.raw-html-embed .raw-html-embed__preview{min-height:var(--ck-html-embed-content-min-height);width:var(--ck-html-embed-content-width)}.ck-editor__editable:not(.ck-read-only) .ck-widget.raw-html-embed .raw-html-embed__preview{pointer-events:none}.ck-widget.raw-html-embed .raw-html-embed__preview-content{background-color:var(--ck-color-base-foreground);box-sizing:border-box}.ck-widget.raw-html-embed .raw-html-embed__preview-content>*{margin-left:auto;margin-right:auto}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{color:var(--ck-html-embed-source-disabled-color)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-html-embed/theme/htmlembed.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-html-embed/htmlembed.css"],names:[],mappings:"AAMA,0BAMC,iBAAkB,CAOlB,iBAAkB,CATlB,gBAAkB,CAMlB,cAAe,CALf,iBAwDD,CA5CC,iCACC,iBAAkB,CAGlB,SACD,CAKA,2DAEC,YAAa,CACb,qBAAsB,CAFtB,iBAGD,CAEA,mDAGC,YAAa,CADb,eAAgB,CADhB,iBAGD,CAEA,2DAOC,wBAAyB,CACzB,kBAAmB,CAFnB,aAAc,CAHd,WAAY,CADZ,iBAAkB,CADlB,UAQD,CAEA,+DAQC,kBAAmB,CAHnB,QAAS,CAET,YAAa,CAEb,sBAAuB,CAPvB,MAAO,CADP,iBAAkB,CAGlB,OAAQ,CADR,KAOD,CC7DD,MACC,kEAAqE,CACrE,kCAAmC,CACnC,2CAA4C,CAC5C,yFAA0F,CAE1F,0EAA2E,CAC3E,6CACD,CAGA,0BAEC,gDAAiD,CADjD,kCA0ID,CAvIC,+DACC,iGACD,CAGA,mCACC,eACD,CAEA,mCACC,gBACD,CAIA,iCAIC,eAA4B,CAG5B,iEAAkE,CAClE,qCAAsC,CAPtC,mCAAoC,CASpC,+BAAgC,CADhC,kCAAmC,CANnC,+BAAgC,CAGhC,kIAAmI,CAJnI,yDAA4D,CAG5D,0GAMD,CAEA,0CACC,SAAU,CACV,gCACD,CAGA,iIACC,gBACD,CAxCD,uFA4CE,sDAAuD,CADvD,KAgGF,CA3IA,6FAkDE,uCAAwC,CADxC,sDAAuD,CADvD,KA2FF,CA3IA,wFAuDE,sDAAuD,CADvD,KAqFF,CA/EC,2DACC,kCACD,CAGA,2DAEC,gCAAiC,CADjC,8BAcD,CAXC,kGACC,iCACD,CAEA,oGACC,mCACD,CAEA,wFACC,kCACD,CAGD,oEACC,+BAAgC,CAChC,UACD,CAGA,kDACC,qBAAsB,CActB,aAAc,CAPd,qBAAsB,CAGtB,kCAAmC,CATnC,yCAA0C,CAG1C,WAAY,CACZ,kCAAmC,CAFnC,WAAY,CAKZ,UAAW,CAKX,eAAgB,CAJhB,oBAAqB,CAPrB,wCAsBD,CARC,4DAKC,kEAAmE,CAJnE,0DAA2D,CAC3D,gDAAiD,CAIjD,SACD,CAID,mDACC,kDAAmD,CACnD,wCAMD,CARA,2FAME,mBAEF,CAEA,2DAEC,gDAAiD,CADjD,qBAOD,CAJC,6DACC,gBAAiB,CACjB,iBACD,CAGD,+DACC,gDACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* The feature container. */\n.ck-widget.raw-html-embed {\n\t/* Give the embed some air. */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tposition: relative;\n\tdisplay: flow-root;\n\n\t/* Give the html embed some minimal width in the content to prevent them\n\tfrom being "squashed" in tight spaces, e.g. in table cells (https://github.com/ckeditor/ckeditor5/issues/8331) */\n\tmin-width: 15em;\n\n\t/* Don\'t inherit the style, e.g. when in a block quote. */\n\tfont-style: normal;\n\n\t/* ----- Emebed label in the upper left corner ----------------------------------------------- */\n\n\t&::before {\n\t\tposition: absolute;\n\n\t\t/* Make sure the content does not cover the label. */\n\t\tz-index: 1;\n\t}\n\n\t/* ----- Emebed internals --------------------------------------------------------------------- */\n\n\t/* The switch mode button wrapper. */\n\t& .raw-html-embed__buttons-wrapper {\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t& .raw-html-embed__preview {\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t}\n\n\t& .raw-html-embed__preview-content {\n\t\twidth: 100%;\n\t\tposition: relative;\n\t\tmargin: auto;\n\n\t\t/* Gives spacing to the small renderable elements, so they always cover the placeholder. */\n\t\tdisplay: table;\n\t\tborder-collapse: separate;\n\t\tborder-spacing: 7px;\n\t}\n\n\t& .raw-html-embed__preview-placeholder {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-html-embed-content-width: calc(100% - 1.5 * var(--ck-icon-size));\n\t--ck-html-embed-source-height: 10em;\n\t--ck-html-embed-unfocused-outline-width: 1px;\n\t--ck-html-embed-content-min-height: calc(var(--ck-icon-size) + var(--ck-spacing-standard));\n\n\t--ck-html-embed-source-disabled-background: var(--ck-color-base-foreground);\n\t--ck-html-embed-source-disabled-color: hsl(0deg 0% 45%);\n}\n\n/* The feature container. */\n.ck-widget.raw-html-embed {\n\tfont-size: var(--ck-font-size-base);\n\tbackground-color: var(--ck-color-base-foreground);\n\n\t&:not(.ck-widget_selected):not(:hover) {\n\t\toutline: var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border);\n\t}\n\n\t/* HTML embed widget itself should respect UI language direction */\n\t&[dir="ltr"] {\n\t\ttext-align: left;\n\t}\n\n\t&[dir="rtl"] {\n\t\ttext-align: right;\n\t}\n\n\t/* ----- Embed label in the upper left corner ----------------------------------------------- */\n\n\t&::before {\n\t\tcontent: attr(data-html-embed-label);\n\t\ttop: calc(-1 * var(--ck-html-embed-unfocused-outline-width));\n\t\tleft: var(--ck-spacing-standard);\n\t\tbackground: hsl(0deg 0% 60%);\n\t\ttransition: background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\t\tpadding: calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);\n\t\tborder-radius: 0 0 var(--ck-border-radius) var(--ck-border-radius);\n\t\tcolor: var(--ck-color-base-background);\n\t\tfont-size: var(--ck-font-size-tiny);\n\t\tfont-family: var(--ck-font-face);\n\t}\n\n\t&[dir="rtl"]::before {\n\t\tleft: auto;\n\t\tright: var(--ck-spacing-standard);\n\t}\n\n\t/* Make space for label but it only collides in LTR languages */\n\t&[dir="ltr"] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before {\n\t\tmargin-left: 50px;\n\t}\n\n\t@nest .ck.ck-editor__editable.ck-blurred &.ck-widget_selected::before {\n\t\ttop: 0px;\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-small);\n\t}\n\n\t@nest .ck.ck-editor__editable:not(.ck-blurred) &.ck-widget_selected::before {\n\t\ttop: 0;\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-small);\n\t\tbackground: var(--ck-color-focus-border);\n\t}\n\n\t@nest .ck.ck-editor__editable &:not(.ck-widget_selected):hover::before {\n\t\ttop: 0px;\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-small);\n\t}\n\n\t/* ----- Emebed internals --------------------------------------------------------------------- */\n\n\t& .raw-html-embed__content-wrapper {\n\t\tpadding: var(--ck-spacing-standard);\n\t}\n\n\t/* The switch mode button wrapper. */\n\t& .raw-html-embed__buttons-wrapper {\n\t\ttop: var(--ck-spacing-standard);\n\t\tright: var(--ck-spacing-standard);\n\n\t\t& .ck-button.raw-html-embed__save-button {\n\t\t\tcolor: var(--ck-color-button-save);\n\t\t}\n\n\t\t& .ck-button.raw-html-embed__cancel-button {\n\t\t\tcolor: var(--ck-color-button-cancel);\n\t\t}\n\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-top: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&[dir="rtl"] .raw-html-embed__buttons-wrapper {\n\t\tleft: var(--ck-spacing-standard);\n\t\tright: auto;\n\t}\n\n\t/* The edit source element. */\n\t& .raw-html-embed__source {\n\t\tbox-sizing: border-box;\n\t\theight: var(--ck-html-embed-source-height);\n\t\twidth: var(--ck-html-embed-content-width);\n\t\tresize: none;\n\t\tmin-width: 0;\n\t\tpadding: var(--ck-spacing-standard);\n\n\t\tfont-family: monospace;\n\t\ttab-size: 4;\n\t\twhite-space: pre-wrap;\n\t\tfont-size: var(--ck-font-size-base); /* Safari needs this. */\n\n\t\t/* HTML code is direction–agnostic. */\n\t\ttext-align: left;\n\t\tdirection: ltr;\n\n\t\t&[disabled] {\n\t\t\tbackground: var(--ck-html-embed-source-disabled-background);\n\t\t\tcolor: var(--ck-html-embed-source-disabled-color);\n\n\t\t\t/* Safari needs this for the proper text color in disabled input (https://github.com/ckeditor/ckeditor5/issues/8320). */\n\t\t\t-webkit-text-fill-color: var(--ck-html-embed-source-disabled-color);\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* The preview data container. */\n\t& .raw-html-embed__preview {\n\t\tmin-height: var(--ck-html-embed-content-min-height);\n\t\twidth: var(--ck-html-embed-content-width);\n\n\t\t/* Disable all mouse interaction as long as the editor is not read–only. */\n\t\t@nest .ck-editor__editable:not(.ck-read-only) & {\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t& .raw-html-embed__preview-content {\n\t\tbox-sizing: border-box;\n\t\tbackground-color: var(--ck-color-base-foreground);\n\n\t\t& > * {\n\t\t\tmargin-left: auto;\n\t\t\tmargin-right: auto;\n\t\t}\n\t}\n\n\t& .raw-html-embed__preview-placeholder {\n\t\tcolor: var(--ck-html-embed-source-disabled-color)\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},9945:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":root{--ck-html-object-embed-unfocused-outline-width:1px}.ck-widget.html-object-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base);min-width:calc(76px + var(--ck-spacing-standard));padding:var(--ck-spacing-small);padding-top:calc(var(--ck-font-size-tiny) + var(--ck-spacing-large))}.ck-widget.html-object-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-object-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.html-object-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-object-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);font-style:normal;font-weight:400;left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-object-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);position:absolute;top:0;transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.html-object-embed .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck-widget.html-object-embed .html-object-embed__content{pointer-events:none}div.ck-widget.html-object-embed{margin:1em auto}span.ck-widget.html-object-embed{display:inline-block}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-html-support/theme/datafilter.css"],names:[],mappings:"AAKA,MACC,kDACD,CAEA,6BAEC,gDAAiD,CADjD,kCAAmC,CAKnC,iDAAkD,CAHlD,+BAAgC,CAEhC,oEAgCD,CA7BC,kEACC,wGACD,CAEA,oCAOC,eAA4B,CAG5B,iEAAkE,CAClE,qCAAsC,CAPtC,0CAA2C,CAS3C,+BAAgC,CADhC,kCAAmC,CAVnC,iBAAkB,CADlB,eAAmB,CAKnB,+BAAgC,CAGhC,yIAA0I,CAN1I,iBAAkB,CAElB,KAAM,CAGN,0GAMD,CAGA,2HACC,gBACD,CAEA,yDAEC,mBACD,CAGD,gCACC,eACD,CAEA,iCACC,oBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-html-object-embed-unfocused-outline-width: 1px;\n}\n\n.ck-widget.html-object-embed {\n\tfont-size: var(--ck-font-size-base);\n\tbackground-color: var(--ck-color-base-foreground);\n\tpadding: var(--ck-spacing-small);\n\t/* Leave space for label */\n\tpadding-top: calc(var(--ck-font-size-tiny) + var(--ck-spacing-large));\n\tmin-width: calc(76px + var(--ck-spacing-standard));\n\n\t&:not(.ck-widget_selected):not(:hover) {\n\t\toutline: var(--ck-html-object-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border);\n\t}\n\n\t&::before {\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t\tposition: absolute;\n\t\tcontent: attr(data-html-object-embed-label);\n\t\ttop: 0;\n\t\tleft: var(--ck-spacing-standard);\n\t\tbackground: hsl(0deg 0% 60%);\n\t\ttransition: background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\t\tpadding: calc(var(--ck-spacing-tiny) + var(--ck-html-object-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);\n\t\tborder-radius: 0 0 var(--ck-border-radius) var(--ck-border-radius);\n\t\tcolor: var(--ck-color-base-background);\n\t\tfont-size: var(--ck-font-size-tiny);\n\t\tfont-family: var(--ck-font-face);\n\t}\n\n\t/* Make space for label. */\n\t& .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before {\n\t\tmargin-left: 50px;\n\t}\n\n\t& .html-object-embed__content {\n\t\t/* Disable user interaction with embed content */\n\t\tpointer-events: none;\n\t}\n}\n\ndiv.ck-widget.html-object-embed {\n\tmargin: 1em auto;\n}\n\nspan.ck-widget.html-object-embed {\n\tdisplay: inline-block;\n}\n\n"],sourceRoot:""}]),t.Z=s},1999:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;height:auto;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image{z-index:1}.ck.ck-editor__editable .image.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable .image-inline img{height:auto}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBA2BD,CAjBC,uBAEC,aAAc,CAad,WAAY,CAVZ,aAAc,CAGd,cAAe,CAGf,cAKD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAKA,+BACC,SASD,CAHC,kDACC,SACD,CAMD,sCACC,SAkBD,CAZC,yDACC,SAUD,CAHC,qEACC,YACD,CAMF,0CACC,WACD,CAMC,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%;\n\n\t\t\t/* Keep proportions of the block image if the height is set and the image is wider than the editor width.\n\t\t\tSee https://github.com/ckeditor/ckeditor5/issues/14542. */\n\t\t\theight: auto;\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the
in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of
.\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t/*\n\t * See https://github.com/ckeditor/ckeditor5/issues/15115.\n\t */\n\t& .image {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the selected image always stays on top of its siblings.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t\t */\n\t\t&.ck-widget_selected {\n\t\t\tz-index: 2;\n\t\t}\n\t}\n\n\t/*\n\t * See https://github.com/ckeditor/ckeditor5/issues/15115.\n\t */\n\t& .image-inline {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the selected inline image always stays on top of its siblings.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t\t */\n\t\t&.ck-widget_selected {\n\t\t\tz-index: 2;\n\n\t\t\t/*\n\t\t\t * Make sure the native browser selection style is not displayed.\n\t\t\t * Inline image widgets have their own styles for the selected state and\n\t\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t\t */\n\t\t\t& ::selection {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Keep proportions of the inline image if the height is set and the image is wider than the editor width.\n\tSee https://github.com/ckeditor/ckeditor5/issues/14542. */\n\t& .image-inline img {\n\t\theight: auto;\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},3764:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highligted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: bottom;\n\tword-break: break-word;\n\tcolor: var(--ck-color-image-caption-text);\n\tbackground-color: var(--ck-color-image-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\tanimation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highligted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},1998:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-image-insert-url .ck-image-insert-url__action-row{display:grid;grid-template-columns:repeat(2,1fr)}:root{--ck-image-insert-insert-by-url-width:250px}.ck.ck-image-insert-url{--ck-input-width:100%}.ck.ck-image-insert-url .ck-image-insert-url__action-row{grid-column-gap:var(--ck-spacing-large);margin-top:var(--ck-spacing-large)}.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button-cancel,.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button-save{justify-content:center;min-width:auto}.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}.ck.ck-image-insert-form>.ck.ck-button{display:block;padding:var(--ck-list-button-padding);width:100%}[dir=ltr] .ck.ck-image-insert-form>.ck.ck-button{text-align:left}[dir=rtl] .ck.ck-image-insert-form>.ck.ck-button{text-align:right}.ck.ck-image-insert-form>.ck.ck-collapsible:not(:first-child){border-top:1px solid var(--ck-color-base-border)}.ck.ck-image-insert-form>.ck.ck-collapsible:not(:last-child){border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-image-insert-form>.ck.ck-collapsible,.ck.ck-image-insert-form>.ck.ck-image-insert-url{min-width:var(--ck-image-insert-insert-by-url-width)}.ck.ck-image-insert-form>.ck.ck-image-insert-url{padding:var(--ck-spacing-large)}.ck.ck-image-insert-form:focus{outline:none}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imageinsert.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageinsert.css"],names:[],mappings:"AAMC,yDACC,YAAa,CACb,mCACD,CCFD,MACC,2CACD,CAEA,wBACC,qBAgBD,CAdC,yDACC,uCAAwC,CACxC,kCAWD,CATC,oJAEC,sBAAuB,CACvB,cACD,CAEA,sFACC,0BACD,CAKD,uCACC,aAAc,CAEd,qCAAsC,CADtC,UAUD,CAZA,iDAME,eAMF,CAZA,iDAUE,gBAEF,CAGC,8DACC,gDACD,CAEA,6DACC,mDACD,CAMD,6FAJC,oDAOD,CAHA,iDAEC,+BACD,CAEA,+BACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-image-insert-url {\n\t& .ck-image-insert-url__action-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(2, 1fr);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-image-insert-insert-by-url-width: 250px;\n}\n\n.ck.ck-image-insert-url {\n\t--ck-input-width: 100%;\n\n\t& .ck-image-insert-url__action-row {\n\t\tgrid-column-gap: var(--ck-spacing-large);\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t\tmin-width: auto;\n\t\t}\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n\n.ck.ck-image-insert-form {\n\t& > .ck.ck-button {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tpadding: var(--ck-list-button-padding);\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& > .ck.ck-collapsible {\n\t\t&:not(:first-child) {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t&:not(:last-child) {\n\t\t\tborder-bottom: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\tmin-width: var(--ck-image-insert-insert-by-url-width);\n\t}\n\n\t/* This is the case when there are no other integrations configured than insert by URL */\n\t& > .ck.ck-image-insert-url {\n\t\tmin-width: var(--ck-image-insert-insert-by-url-width);\n\t\tpadding: var(--ck-spacing-large);\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},9542:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor__editable img.image_placeholder{background-size:100% 100%}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imageplaceholder.css"],names:[],mappings:"AAMC,8CACC,yBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& img.image_placeholder {\n\t\tbackground-size: 100% 100%;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},579:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content img.image_resized{height:auto}.ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAMA,8BACC,WACD,CAEA,iCAQC,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Preserve aspect ratio of the resized image after introducing image height attribute. */\n.ck-content img.image_resized {\n\theight: auto;\n}\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `
` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `
` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `
` element uses `display:block`, so `
` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]),t.Z=s},812:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAGC,kDAAmD,CADnD,+CAED,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-image-style-spacing: 1.5em;\n\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\tconfirming successful application of the style if image width exceeds the editor's size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t& .image-style-block-align-left,\n\t& .image-style-block-align-right {\n\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t}\n\n\t/* Allows displaying multiple floating images in the same line.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t& .image-style-align-left,\n\t& .image-style-align-right {\n\t\tclear: none;\n\t}\n\n\t& .image-style-side {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t\tmax-width: 50%;\n\t}\n\n\t& .image-style-align-left {\n\t\tfloat: left;\n\t\tmargin-right: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-align-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\t& .image-style-align-right {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-block-align-right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\n\t& .image-style-block-align-left {\n\t\tmargin-left: 0;\n\t\tmargin-right: auto;\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image-style-align-left,\n\t& p + .image-style-align-right,\n\t& p + .image-style-side {\n\t\tmargin-top: 0;\n\t}\n\n\t& .image-inline {\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tmargin-top: var(--ck-inline-image-style-spacing);\n\t\t\tmargin-bottom: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tmargin-right: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tmargin-left: var(--ck-inline-image-style-spacing);\n\t\t}\n\t}\n}\n\n.ck.ck-splitbutton {\n\t/* The button should display as a regular drop-down if the action button\n\tis forced to fire the same action as the arrow button. */\n\t&.ck-splitbutton_flatten {\n\t\t&:hover,\n\t\t&.ck-splitbutton_open {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-background);\n\n\t\t\t\t&::after {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-splitbutton_open:hover {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-hover-background);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},6232:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imageuploadicon.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFA0BD,CAtBC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\n\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n\t/* Match the icon size with the linked image indicator brought by the link image feature. */\n\t--ck-image-upload-icon-size: 20;\n\t--ck-image-upload-icon-width: 2px;\n\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n\topacity: 0;\n\tbackground: var(--ck-color-image-upload-icon-background);\n\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n\tanimation-fill-mode: forwards, forwards;\n\tanimation-duration: 500ms, 500ms;\n\n\t/* To make animation scalable. */\n\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\n\n\t/* Hide completed upload icon after 3 seconds. */\n\tanimation-delay: 0ms, 3000ms;\n\n\t/*\n\t * Use CSS math to simulate container queries.\n\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t */\n\toverflow: hidden;\n\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n\t/* This is check icon element made from border-width mixed with animations. */\n\t&::after {\n\t\t/* Because of border transformation we need to "hard code" left position. */\n\t\tleft: 25%;\n\n\t\ttop: 50%;\n\t\topacity: 0;\n\t\theight: 0;\n\t\twidth: 0;\n\n\t\ttransform: scaleX(-1) rotate(135deg);\n\t\ttransform-origin: left top;\n\t\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\t\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n\t\tanimation-name: ck-upload-complete-icon-check;\n\t\tanimation-duration: 500ms;\n\t\tanimation-delay: 500ms;\n\t\tanimation-fill-mode: forwards;\n\n\t\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n\t\tbox-sizing: border-box;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-show {\n\tfrom {\n\t\topacity: 0;\n\t}\n\n\tto {\n\t\topacity: 1;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-hide {\n\tfrom {\n\t\topacity: 1;\n\t}\n\n\tto {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-check {\n\t0% {\n\t\topacity: 1;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\t33% {\n\t\twidth: 0.3em;\n\t\theight: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t\twidth: 0.3em;\n\t\theight: 0.45em;\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},6999:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imageuploadloader.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n\t--ck-upload-placeholder-loader-size: 32px;\n\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n\t/* We need to control the full width of the SVG gray background. */\n\twidth: 100%;\n\tmargin: 0;\n\n\t&.image-inline {\n\t\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n\t}\n\n\t& img {\n\t\t/*\n\t\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n\t\t * There's nothing special about this number except that it should make the image placeholder look like\n\t\t * a real image during this short period after the upload started and before the image was read from the\n\t\t * file system (and a rich preview was loaded).\n\t\t */\n\t\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n\t}\n}\n\n.ck .ck-upload-placeholder-loader {\n\twidth: 100%;\n\theight: 100%;\n\n\t&::before {\n\t\twidth: var(--ck-upload-placeholder-loader-size);\n\t\theight: var(--ck-upload-placeholder-loader-size);\n\t\tborder-radius: 50%;\n\t\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\n\t\tborder-right: 2px solid transparent;\n\t\tanimation: ck-upload-placeholder-loader 1s linear infinite;\n\t}\n}\n\n@keyframes ck-upload-placeholder-loader {\n\tto {\n\t\ttransform: rotate( 360deg );\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},2296:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/imageuploadprogress.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBACD,CAID,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\t/* Showing animation. */\n\t\t&.ck-appear {\n\t\t\tanimation: fadeIn 700ms;\n\t\t}\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\theight: 2px;\n\t\twidth: 0;\n\t\tbackground: var(--ck-color-upload-bar-background);\n\t\ttransition: width 100ms;\n\t}\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n"],sourceRoot:""}]),t.Z=s},379:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-image/theme/textalternativeform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},1365:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n\tbackground: var(--ck-color-link-selected-background);\n\n\t/* Give linked inline images some outline to let the user know they are also part of the link. */\n\t& span.image-inline {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n\t}\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n\tbackground: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n\theight: 100%;\n\tborder-right: 1px solid var(--ck-color-base-text);\n\tmargin-right: -1px;\n\toutline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]),t.Z=s},9526:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child){margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCIA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAKD,2DACC,sCACD,CAIA,0DACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,wEAEE,aAMF,CARA,wEAME,aAEF,CDzED",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\t& .ck-button.ck-link-actions__preview {\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\n\t\t& .ck-button__label {\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\tcolor: var(--ck-color-link-default);\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcursor: pointer;\n\n\t\t\t/* Match the box model of the link editor form\'s input so the balloon\n\t\t\tdoes not change width when moving between actions and the form. */\n\t\t\tmax-width: var(--ck-input-width);\n\t\t\tmin-width: 3em;\n\t\t\ttext-align: center;\n\n\t\t\t&:hover {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\n\t\t&,\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t& .ck-button__label {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-button:not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\t& .ck-button.ck-link-actions__preview {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-button__label {\n\t\t\t\tmin-width: 0;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},9250:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-link/theme/linkform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCAEC,+BAAgC,CADhC,SAgDD,CA7CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,eAAgB,CAFhB,QAAS,CADT,kCAAmC,CAEnC,SAkBD,CAfC,wDACC,gDACD,CARD,4GAeE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tpadding: 0;\n\tmin-width: var(--ck-input-width);\n\n\t& .ck-labeled-field-view {\n\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n\t\t& .ck-input-text {\n\t\t\tmin-width: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\t& > .ck-button {\n\t\tpadding: var(--ck-spacing-standard);\n\t\tmargin: 0;\n\t\twidth: 50%;\n\t\tborder-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: 0;\n\n\t\t\t&:last-of-type {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n\t& .ck.ck-list {\n\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-large);\n\n\t\t& .ck-button.ck-switchbutton {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},9719:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-link/theme/linkimage.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkimage.css"],names:[],mappings:"AASE,+FACC,aAAc,CACd,iBACD,CCPF,MAEC,sCAAuC,CACvC,oEACD,CAME,+FAUC,+BAAqC,CACrC,83BAA+3B,CAG/3B,uBAA2B,CAD3B,2BAA4B,CAD5B,oBAAqB,CAGrB,kBAAmB,CAdnB,UAAW,CAsBX,oGAAuG,CAFvG,eAAgB,CAbhB,sCAAwC,CADxC,oCAAsC,CAetC,mGAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Match the icon size with the upload indicator brought by the image upload feature. */\n\t--ck-link-image-indicator-icon-size: 20;\n\t--ck-link-image-indicator-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tcontent: "";\n\n\t\t\t/*\n\t\t\t * Smaller images should have the icon closer to the border.\n\t\t\t * Match the icon position with the upload indicator brought by the image upload feature.\n\t\t\t */\n\t\t\ttop: min(var(--ck-spacing-medium), 6%);\n\t\t\tright: min(var(--ck-spacing-medium), 6%);\n\n\t\t\tbackground-color: hsla(0, 0%, 0%, .4);\n\t\t\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");\n\t\t\tbackground-size: 14px;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tborder-radius: 100%;\n\n\t\t\t/*\n\t\t\t* Use CSS math to simulate container queries.\n\t\t\t* https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t\t\t*/\n\t\t\toverflow: hidden;\n\t\t\twidth: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size));\n\t\t\theight: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size));\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]),t.Z=s},4963:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-list/theme/documentlist.css"],names:[],mappings:"AAKA,8CACC,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-editor__editable .ck-list-bogus-paragraph {\n\tdisplay: block;\n}\n"],sourceRoot:""}]),t.Z=s},1584:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-list/theme/list.css"],names:[],mappings:"AAKA,eACC,uBAiBD,CAfC,kBACC,2BAaD,CAXC,qBACC,2BASD,CAPC,wBACC,2BAKD,CAHC,2BACC,2BACD,CAMJ,eACC,oBAaD,CAXC,kBACC,sBASD,CAJE,6CACC,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content ol {\n\tlist-style-type: decimal;\n\n\t& ol {\n\t\tlist-style-type: lower-latin;\n\n\t\t& ol {\n\t\t\tlist-style-type: lower-roman;\n\n\t\t\t& ol {\n\t\t\t\tlist-style-type: upper-latin;\n\n\t\t\t\t& ol {\n\t\t\t\t\tlist-style-type: upper-roman;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck-content ul {\n\tlist-style-type: disc;\n\n\t& ul {\n\t\tlist-style-type: circle;\n\n\t\t& ul {\n\t\t\tlist-style-type: square;\n\n\t\t\t& ul {\n\t\t\t\tlist-style-type: square;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},8840:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css"],names:[],mappings:"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CAGvB,6CAAgD,CAFhD,cAAe,CACf,eAQD,CALC,2JAGC,eAAgB,CADhB,wBAAyB,CADzB,eAGD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-properties {\n\t/* When there are no list styles and there is no collapsible. */\n\t&.ck-list-properties_without-styles {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * {\n\t\t\tmin-width: 14em;\n\n\t\t\t& + * {\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * When the numbered list property fields (start at, reversed) should be displayed,\n\t * more horizontal space is needed. Reconfigure the style grid to create that space.\n\t */\n\t&.ck-list-properties_with-numbered-properties {\n\t\t& > .ck-list-styles-list {\n\t\t\tgrid-template-columns: repeat( 4, auto );\n\t\t}\n\n\t\t/* When list styles are rendered and property fields are in a collapsible. */\n\t\t& > .ck-collapsible {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t& > .ck-collapsible__children {\n\t\t\t\t& > * {\n\t\t\t\t\twidth: 100%;\n\n\t\t\t\t\t& + * {\n\t\t\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-numbered-list-properties__start-index .ck-input {\n\t\tmin-width: auto;\n\t\twidth: 100%;\n\t}\n\n\t& .ck.ck-numbered-list-properties__reversed-order {\n\t\tbackground: transparent;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t\tmargin-bottom: calc(-1 * var(--ck-spacing-tiny));\n\n\t\t&:active, &:hover {\n\t\t\tbox-shadow: none;\n\t\t\tborder-color: transparent;\n\t\t\tbackground: none;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},4017:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-list/theme/liststyles.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBAGC,mCAAoC,CAFpC,oCAAwC,CAGxC,+BAAgC,CAFhC,gCA4BD,CAxBC,mCAiBC,sBAAuB,CAPvB,QAAS,CANT,SAmBD,CAJC,+EAhBA,uCAAwC,CADxC,sCAoBA",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-styles-list {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-list-style-button-size: 44px;\n}\n\n.ck.ck-list-styles-list {\n\tgrid-template-columns: repeat( 3, auto );\n\trow-gap: var(--ck-spacing-medium);\n\tcolumn-gap: var(--ck-spacing-medium);\n\tpadding: var(--ck-spacing-large);\n\n\t& .ck-button {\n\t\t/* Make the button look like a thumbnail (the icon "takes it all"). */\n\t\twidth: var(--ck-list-style-button-size);\n\t\theight: var(--ck-list-style-button-size);\n\t\tpadding: 0;\n\n\t\t/*\n\t\t * Buttons are aligned by the grid so disable default button margins to not collide with the\n\t\t * gaps in the grid.\n\t\t */\n\t\tmargin: 0;\n\n\t\t/*\n\t\t * Make sure the button border (which is displayed on focus, BTW) does not steal pixels\n\t\t * from the button dimensions and, as a result, decrease the size of the icon\n\t\t * (which becomes blurry as it scales down).\n\t\t */\n\t\tbox-sizing: content-box;\n\n\t\t& .ck-icon {\n\t\t\twidth: var(--ck-list-style-button-size);\n\t\t\theight: var(--ck-list-style-button-size);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},2961:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px;position:relative}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}.ck-editor__editable.ck-content .todo-list .todo-list__label>input,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{cursor:pointer}.ck-editor__editable.ck-content .todo-list .todo-list__label>input:hover:before,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label>span[contenteditable=false]>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:after{border-color:#fff}.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CAwEA,uBACC,eAwBD,CAtBC,0BAEC,iBAAkB,CADlB,iBAMD,CAHC,qCACC,cACD,CAIA,+CAlFD,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAiFC,CAFA,wDAhEA,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAgEA,CA5DD,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,sCAAwC,CAJxC,UAKD,CAEA,qDAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAwBA,wEACC,qBACD,CAEA,mGACC,iBACD,CAYD,kKAEC,cAKD,CAHC,4LACC,mCACD,CAMD,+FApHA,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAmHA,CAFA,wGAlGC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAkGD,CA9FA,sGAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,sCAAwC,CAJxC,UAKD,CAEA,qGAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+GACC,kBAA8B,CAC9B,oBACD,CAEA,8GACC,iBACD,CA2DA,uHACC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-todo-list-checkmark-size: 16px;\n}\n\n@define-mixin todo-list-checkbox {\n\t-webkit-appearance: none;\n\tdisplay: inline-block;\n\tposition: relative;\n\twidth: var(--ck-todo-list-checkmark-size);\n\theight: var(--ck-todo-list-checkmark-size);\n\tvertical-align: middle;\n\n\t/* Needed on iOS */\n\tborder: 0;\n\n\t/* LTR styles */\n\tleft: -25px;\n\tmargin-right: -15px;\n\tright: 0;\n\tmargin-left: 0;\n\n\t/* RTL styles */\n\t@nest [dir=rtl]& {\n\t\tleft: 0;\n\t\tmargin-right: 0;\n\t\tright: -25px;\n\t\tmargin-left: -15px;\n\t}\n\n\t&::before {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tbox-sizing: border-box;\n\t\tcontent: '';\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\tborder-radius: 2px;\n\t\ttransition: 250ms ease-in-out box-shadow;\n\t}\n\n\t&::after {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tbox-sizing: content-box;\n\t\tpointer-events: none;\n\t\tcontent: '';\n\n\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\tborder-style: solid;\n\t\tborder-color: transparent;\n\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\ttransform: rotate(45deg);\n\t}\n\n\t&[checked] {\n\t\t&::before {\n\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t}\n\t}\n}\n\n/*\n * To-do list content styles.\n */\n.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\n\t\tposition: relative;\n\t\tmargin-bottom: 5px;\n\n\t\t& .todo-list {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n\n\t& .todo-list__label {\n\t\t& > input {\n\t\t\t@mixin todo-list-checkbox;\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&.todo-list__label_without-description input[type=checkbox] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n/*\n * To-do list editing view styles.\n */\n.ck-editor__editable.ck-content .todo-list .todo-list__label {\n\t/*\n\t * To-do list should be interactive only during the editing\n\t * (https://github.com/ckeditor/ckeditor5/issues/2090).\n\t */\n\t& > input,\n\t& > span[contenteditable=false] > input {\n\t\tcursor: pointer;\n\n\t\t&:hover::before {\n\t\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t\t}\n\t}\n\n\t/*\n\t * Document Lists - editing view has an additional span around checkbox.\n\t */\n\t& > span[contenteditable=false] > input {\n\t\t@mixin todo-list-checkbox;\n\t}\n\n\t&.todo-list__label_without-description {\n\t\t& input[type=checkbox] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},2146:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content .media{clear:both;display:block;margin:.9em 0;min-width:15em}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembed.css"],names:[],mappings:"AAKA,mBAGC,UAAW,CASX,aAAc,CAJd,aAAe,CAQf,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .media {\n\t/* Don\'t allow floated content overlap the media.\n\thttps://github.com/ckeditor/ckeditor5-media-embed/issues/53 */\n\tclear: both;\n\n\t/* Make sure there is some space between the content and the media. */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em 0;\n\n\t/* Make sure media is not overriden with Bootstrap default `flex` value.\n\tSee: https://github.com/ckeditor/ckeditor5/issues/1373. */\n\tdisplay: block;\n\n\t/* Give the media some minimal width in the content to prevent them\n\tfrom being "squashed" in tight spaces, e.g. in table cells (#44) */\n\tmin-width: 15em;\n}\n'],sourceRoot:""}]),t.Z=s},4801:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck-media__wrapper .ck-media__placeholder{align-items:center;display:flex;flex-direction:column}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{display:block;overflow:hidden}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder){pointer-events:none}.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{background:var(--ck-color-base-foreground);padding:calc(var(--ck-spacing-standard)*3)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{background-position:50%;background-size:cover;height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);min-width:var(--ck-media-embed-placeholder-icon-size)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{height:100%;width:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);font-style:italic;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-height:380px;max-width:300px}.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Im0yMDYuNDc3IDI2MC45LTI4Ljk4NyAyOC45ODdhNS4yMTggNS4yMTggMCAwIDAgMy43OCAxLjYxaDQ5LjYyMWMxLjY5NCAwIDMuMTktLjc5OCA0LjE0Ni0yLjAzN3oiIGZpbGw9IiM1Yzg4YzUiLz48cGF0aCBkPSJNMjI2Ljc0MiAyMjIuOTg4Yy05LjI2NiAwLTE2Ljc3NyA3LjE3LTE2Ljc3NyAxNi4wMTQuMDA3IDIuNzYyLjY2MyA1LjQ3NCAyLjA5MyA3Ljg3NS40My43MDMuODMgMS40MDggMS4xOSAyLjEwNy4zMzMuNTAyLjY1IDEuMDA1Ljk1IDEuNTA4LjM0My40NzcuNjczLjk1Ny45ODggMS40NCAxLjMxIDEuNzY5IDIuNSAzLjUwMiAzLjYzNyA1LjE2OC43OTMgMS4yNzUgMS42ODMgMi42NCAyLjQ2NiAzLjk5IDIuMzYzIDQuMDk0IDQuMDA3IDguMDkyIDQuNiAxMy45MTR2LjAxMmMuMTgyLjQxMi41MTYuNjY2Ljg3OS42NjcuNDAzLS4wMDEuNzY4LS4zMTQuOTMtLjc5OS42MDMtNS43NTYgMi4yMzgtOS43MjkgNC41ODUtMTMuNzk0Ljc4Mi0xLjM1IDEuNjczLTIuNzE1IDIuNDY1LTMuOTkgMS4xMzctMS42NjYgMi4zMjgtMy40IDMuNjM4LTUuMTY5LjMxNS0uNDgyLjY0NS0uOTYyLjk4OC0xLjQzOS4zLS41MDMuNjE3LTEuMDA2Ljk1LTEuNTA4LjM1OS0uNy43Ni0xLjQwNCAxLjE5LTIuMTA3IDEuNDI2LTIuNDAyIDItNS4xMTQgMi4wMDQtNy44NzUgMC04Ljg0NC03LjUxMS0xNi4wMTQtMTYuNzc2LTE2LjAxNHoiIGZpbGw9IiNkZDRiM2UiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PGVsbGlwc2Ugcnk9IjUuNTY0IiByeD0iNS44MjgiIGN5PSIyMzkuMDAyIiBjeD0iMjI2Ljc0MiIgZmlsbD0iIzgwMmQyNyIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMTkwLjMwMSAyMzcuMjgzYy00LjY3IDAtOC40NTcgMy44NTMtOC40NTcgOC42MDZzMy43ODYgOC42MDcgOC40NTcgOC42MDdjMy4wNDMgMCA0LjgwNi0uOTU4IDYuMzM3LTIuNTE2IDEuNTMtMS41NTcgMi4wODctMy45MTMgMi4wODctNi4yOSAwLS4zNjItLjAyMy0uNzIyLS4wNjQtMS4wNzloLTguMjU3djMuMDQzaDQuODVjLS4xOTcuNzU5LS41MzEgMS40NS0xLjA1OCAxLjk4Ni0uOTQyLjk1OC0yLjAyOCAxLjU0OC0zLjkwMSAxLjU0OC0yLjg3NiAwLTUuMjA4LTIuMzcyLTUuMjA4LTUuMjk5IDAtMi45MjYgMi4zMzItNS4yOTkgNS4yMDgtNS4yOTkgMS4zOTkgMCAyLjYxOC40MDcgMy41ODQgMS4yOTNsMi4zODEtMi4zOGMwLS4wMDItLjAwMy0uMDA0LS4wMDQtLjAwNS0xLjU4OC0xLjUyNC0zLjYyLTIuMjE1LTUuOTU1LTIuMjE1em00LjQzIDUuNjYuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0ibTIxNS4xODQgMjUxLjkyOS03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVhNS4yMzMgNS4yMzMgMCAwIDAgLjQ0OS0yLjEyM3YtMzEuMTY1Yy0uNDY5LjY3NS0uOTM0IDEuMzQ5LTEuMzgyIDIuMDA1LS43OTIgMS4yNzUtMS42ODIgMi42NC0yLjQ2NSAzLjk5LTIuMzQ3IDQuMDY1LTMuOTgyIDguMDM4LTQuNTg1IDEzLjc5NC0uMTYyLjQ4NS0uNTI3Ljc5OC0uOTMuNzk5LS4zNjMtLjAwMS0uNjk3LS4yNTUtLjg3OS0uNjY3di0uMDEyYy0uNTkzLTUuODIyLTIuMjM3LTkuODItNC42LTEzLjkxNC0uNzgzLTEuMzUtMS42NzMtMi43MTUtMi40NjYtMy45OS0xLjEzNy0xLjY2Ni0yLjMyNy0zLjQtMy42MzctNS4xNjlsLS4wMDItLjAwM3oiIGZpbGw9IiNjM2MzYzMiLz48cGF0aCBkPSJtMjEyLjk4MyAyNDguNDk1LTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOCA1LjIzOGgxLjAxNWwzNS42NjYtMzUuNjY2YTEzNi4yNzUgMTM2LjI3NSAwIDAgMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAgMC0uOTg5LTEuNDQgMzUuMTI3IDM1LjEyNyAwIDAgMC0uOTUtMS41MDhjLS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJtMjExLjk5OCAyNjEuMDgzLTYuMTUyIDYuMTUxIDI0LjI2NCAyNC4yNjRoLjc4MWE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OVptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OVoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzNabTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1Wk00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MDAgNDAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIHN0eWxlPSJmaWxsOiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembedediting.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-media-embed/mediaembedediting.css"],names:[],mappings:"AAMC,0CAGC,kBAAmB,CAFnB,YAAa,CACb,qBAcD,CAXC,sEAEC,cAAe,CAEf,iBAMD,CAJC,wGAEC,aAAc,CADd,eAED,CAWD,6kBACC,YACD,CAMF,wFACC,mBACD,CAIA,mGACC,mBACD,CC1CA,MACC,0CAA2C,CAE3C,mDAA4D,CAC5D,2EACD,CAEA,mBACC,aA+FD,CA7FC,0CAEC,0CAA2C,CAD3C,0CA6BD,CA1BC,uEAIC,uBAA2B,CAC3B,qBAAsB,CAHtB,kDAAmD,CACnD,qCAAsC,CAFtC,qDAUD,CAJC,gFAEC,WAAY,CADZ,UAED,CAGD,4EACC,sDAAuD,CAGvD,iBAAkB,CADlB,iBAAkB,CAElB,sBAAuB,CAHvB,kBAUD,CALC,kFACC,4DAA6D,CAC7D,cAAe,CACf,yBACD,CAIF,wDAEC,gBAAiB,CADjB,eAED,CAEA,4UAIC,wvGACD,CAEA,2EACC,kBAaD,CAXC,wGACC,orBACD,CAEA,6GACC,UAKD,CAHC,mHACC,UACD,CAIF,4EACC,2DAcD,CAZC,yGACC,4jHACD,CAGA,8GACC,aAKD,CAHC,oHACC,UACD,CAIF,6EAEC,iDAaD,CAXC,0GACC,wiCACD,CAEA,+GACC,aAKD,CAHC,qHACC,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-media__wrapper {\n\t& .ck-media__placeholder {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\n\t\t& .ck-media__placeholder__url {\n\t\t\t/* Otherwise the URL will overflow when the content is very narrow. */\n\t\t\tmax-width: 100%;\n\n\t\t\tposition: relative;\n\n\t\t\t& .ck-media__placeholder__url__text {\n\t\t\t\toverflow: hidden;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="twitter.com"],\n\t&[data-oembed-url*="google.com/maps"],\n\t&[data-oembed-url*="goo.gl/maps"],\n\t&[data-oembed-url*="maps.google.com"],\n\t&[data-oembed-url*="maps.app.goo.gl"],\n\t&[data-oembed-url*="facebook.com"],\n\t&[data-oembed-url*="instagram.com"] {\n\t\t& .ck-media__placeholder__icon * {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/* Disable all mouse interaction as long as the editor is not read–only.\n https://github.com/ckeditor/ckeditor5-media-embed/issues/58 */\n.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper > *:not(.ck-media__placeholder) {\n\tpointer-events: none;\n}\n\n/* Disable all mouse interaction when the widget is not selected (e.g. to avoid opening links by accident).\n https://github.com/ckeditor/ckeditor5-media-embed/issues/18 */\n.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder {\n\tpointer-events: none;\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-media-embed-placeholder-icon-size: 3em;\n\n\t--ck-color-media-embed-placeholder-url-text: hsl(0, 0%, 46%);\n\t--ck-color-media-embed-placeholder-url-text-hover: var(--ck-color-base-text);\n}\n\n.ck-media__wrapper {\n\tmargin: 0 auto;\n\n\t& .ck-media__placeholder {\n\t\tpadding: calc( 3 * var(--ck-spacing-standard) );\n\t\tbackground: var(--ck-color-base-foreground);\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tmin-width: var(--ck-media-embed-placeholder-icon-size);\n\t\t\theight: var(--ck-media-embed-placeholder-icon-size);\n\t\t\tmargin-bottom: var(--ck-spacing-large);\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: cover;\n\n\t\t\t& .ck-icon {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: var(--ck-color-media-embed-placeholder-url-text);\n\t\t\twhite-space: nowrap;\n\t\t\ttext-align: center;\n\t\t\tfont-style: italic;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\t&:hover {\n\t\t\t\tcolor: var(--ck-color-media-embed-placeholder-url-text-hover);\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="open.spotify.com"] {\n\t\tmax-width: 300px;\n\t\tmax-height: 380px;\n\t}\n\n\t&[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,\n\t&[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,\n\t&[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon,\n\t&[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon {\n\t\tbackground-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+);\n\t}\n\n\t&[data-oembed-url*="facebook.com"] .ck-media__placeholder {\n\t\tbackground: hsl(220, 46%, 48%);\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tbackground-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+);\n\t\t}\n\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: hsl(220, 100%, 90%);\n\n\t\t\t&:hover {\n\t\t\t\tcolor: hsl(0, 0%, 100%);\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="instagram.com"] .ck-media__placeholder {\n\t\tbackground: linear-gradient(-135deg,hsl(246, 100%, 39%),hsl(302, 100%, 36%),hsl(0, 100%, 48%));\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tbackground-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMuNTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4=);\n\t\t}\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: hsl(302, 100%, 94%);\n\n\t\t\t&:hover {\n\t\t\t\tcolor: hsl(0, 0%, 100%);\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder {\n\t\t/* Use gradient to contrast with focused widget (ckeditor/ckeditor5-media-embed#22). */\n\t\tbackground: linear-gradient( to right, hsl(201, 85%, 70%), hsl(201, 85%, 35%) );\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tbackground-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+);\n\t\t}\n\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: hsl(201, 100%, 86%);\n\n\t\t\t&:hover {\n\t\t\t\tcolor: hsl(0, 0%, 100%);\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},4615:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-media-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,kBAEC,sBAAuB,CADvB,YAAa,CAEb,kBAAmB,CACnB,gBAqBD,CAnBC,yCACC,oBACD,CAEA,4BACC,YACD,CCbA,oCDCD,kBAeE,cAUF,CARE,yCACC,eACD,CAEA,6BACC,cACD,CCtBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-media-form {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},8577:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck-content .page-break{align-items:center;clear:both;display:flex;justify-content:center;padding:5px 0;position:relative}.ck-content .page-break:after{border-bottom:2px dashed #c4c4c4;content:"";position:absolute;width:100%}.ck-content .page-break__label{background:#fff;border:1px solid #c4c4c4;border-radius:2px;box-shadow:2px 2px 1px rgba(0,0,0,.15);color:#333;display:block;font-family:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;font-size:.75em;font-weight:700;padding:.3em .6em;position:relative;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}@media print{.ck-content .page-break{padding:0}.ck-content .page-break:after{display:none}}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-page-break/theme/pagebreak.css"],names:[],mappings:"AAKA,wBAKC,kBAAmB,CAHnB,UAAW,CAEX,YAAa,CAEb,sBAAuB,CAHvB,aAAc,CAFd,iBAaD,CANC,8BAGC,gCAAyC,CAFzC,UAAW,CACX,iBAAkB,CAElB,UACD,CAGD,+BAYC,eAA4B,CAN5B,wBAAiC,CACjC,iBAAkB,CAMlB,sCAA6C,CAF7C,UAAsB,CAPtB,aAAc,CAId,qDAA0D,CAC1D,eAAiB,CACjB,eAAiB,CAPjB,iBAAkB,CAFlB,iBAAkB,CAIlB,wBAAyB,CAWzB,wBAAyB,CACzB,qBAAsB,CACtB,oBAAqB,CACrB,gBAAiB,CAjBjB,SAkBD,CAGA,aACC,wBACC,SAKD,CAHC,8BACC,YACD,CAEF",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .page-break {\n\tposition: relative;\n\tclear: both;\n\tpadding: 5px 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\n\t&::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tborder-bottom: 2px dashed hsl(0, 0%, 77%);\n\t\twidth: 100%;\n\t}\n}\n\n.ck-content .page-break__label {\n\tposition: relative;\n\tz-index: 1;\n\tpadding: .3em .6em;\n\tdisplay: block;\n\ttext-transform: uppercase;\n\tborder: 1px solid hsl(0, 0%, 77%);\n\tborder-radius: 2px;\n\tfont-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\tfont-size: 0.75em;\n\tfont-weight: bold;\n\tcolor: hsl(0, 0%, 20%);\n\tbackground: hsl(0, 0%, 100%);\n\tbox-shadow: 2px 2px 1px hsla(0, 0%, 0%, 0.15);\n\n\t/* Disable the possibility to select the label text by the user. */\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n\n/* Do not show the page break element inside the print preview window. */\n@media print {\n\t.ck-content .page-break {\n\t\tpadding: 0;\n\n\t\t&::after {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},5542:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck-source-editing-area{overflow:hidden;position:relative}.ck-source-editing-area textarea,.ck-source-editing-area:after{border:1px solid transparent;font-family:monospace;font-size:var(--ck-font-size-normal);line-height:var(--ck-line-height-base);margin:0;padding:var(--ck-spacing-large);white-space:pre-wrap}.ck-source-editing-area:after{content:attr(data-value) " ";display:block;visibility:hidden}.ck-source-editing-area textarea{border-color:var(--ck-color-base-border);border-radius:0;box-sizing:border-box;height:100%;outline:none;overflow:hidden;position:absolute;resize:none;width:100%}.ck-rounded-corners .ck-source-editing-area textarea,.ck-source-editing-area textarea.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck-source-editing-area textarea:not([readonly]):focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-source-editing/theme/sourceediting.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,wBAEC,eAAgB,CADhB,iBAED,CAEA,+DAIC,4BAA6B,CAG7B,qBAAsB,CADtB,oCAAqC,CADrC,sCAAuC,CAFvC,QAAS,CADT,+BAAgC,CAMhC,oBACD,CAEA,8BACC,4BAA6B,CAE7B,aAAc,CADd,iBAED,CAEA,iCASC,wCAAyC,CC7BzC,eAAgB,CD2BhB,qBAAsB,CAJtB,WAAY,CAEZ,YAAa,CACb,eAAgB,CALhB,iBAAkB,CAGlB,WAAY,CAFZ,UAkBD,CApBA,yGChBE,qCAAsC,CD4BtC,wBAAyB,CACzB,yBAOF,CAJC,uDEpCA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFwCA",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css";\n@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css";\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) " ";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&:not([readonly]):focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]),t.Z=s},6408:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-dropdown.ck-style-dropdown.ck-style-dropdown_multiple-active>.ck-button>.ck-button__label{font-style:italic}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-style/style.css"],names:[],mappings:"AAKA,iGACC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-dropdown.ck-style-dropdown.ck-style-dropdown_multiple-active > .ck-button > .ck-button__label {\n\tfont-style: italic;\n}\n"],sourceRoot:""}]),t.Z=s},9722:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":root{--ck-style-panel-columns:3}.ck.ck-style-panel .ck-style-grid{display:grid;grid-template-columns:repeat(var(--ck-style-panel-columns),auto);justify-content:start}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button{display:flex;flex-direction:column;justify-content:space-between}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-style-grid__button__preview{align-content:center;align-items:center;display:flex;flex-basis:100%;flex-grow:1;justify-content:flex-start}:root{--ck-style-panel-button-width:120px;--ck-style-panel-button-height:80px;--ck-style-panel-button-label-background:#f0f0f0;--ck-style-panel-button-hover-label-background:#ebebeb;--ck-style-panel-button-hover-border-color:#b3b3b3}.ck.ck-style-panel .ck-style-grid{column-gap:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button{--ck-color-button-default-hover-background:var(--ck-color-base-background);--ck-color-button-default-active-background:var(--ck-color-base-background);height:var(--ck-style-panel-button-height);padding:0;width:var(--ck-style-panel-button-width)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-button__label{flex-shrink:0;height:22px;line-height:22px;overflow:hidden;padding:0 var(--ck-spacing-medium);text-overflow:ellipsis;width:100%}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-style-grid__button__preview{background:var(--ck-color-base-background);border:2px solid var(--ck-color-base-background);opacity:.9;overflow:hidden;padding:var(--ck-spacing-medium);width:100%}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled{--ck-color-button-default-disabled-background:var(--ck-color-base-foreground)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled:not(:focus){border-color:var(--ck-style-panel-button-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled .ck-style-grid__button__preview{border-color:var(--ck-color-base-foreground);filter:saturate(.3);opacity:.4}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on{border-color:var(--ck-color-base-active)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on .ck-button__label{box-shadow:0 -1px 0 var(--ck-color-base-active);z-index:1}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on:hover{border-color:var(--ck-color-base-active-focus)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(.ck-on) .ck-button__label{background:var(--ck-style-panel-button-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(.ck-on):hover .ck-button__label{background:var(--ck-style-panel-button-hover-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on){border-color:var(--ck-style-panel-button-hover-border-color)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on) .ck-style-grid__button__preview{opacity:1}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-style/theme/stylegrid.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-style/stylegrid.css"],names:[],mappings:"AAKA,MACC,0BACD,CAEA,kCACC,YAAa,CACb,gEAAiE,CACjE,qBAgBD,CAdC,yDACC,YAAa,CAEb,qBAAsB,CADtB,6BAWD,CARC,yFAEC,oBAAqB,CAErB,kBAAmB,CAHnB,YAAa,CAKb,eAAgB,CADhB,WAAY,CAFZ,0BAID,CCrBF,MACC,mCAAoC,CACpC,mCAAoC,CACpC,gDAA2D,CAC3D,sDAAiE,CACjE,kDACD,CAEA,kCAEC,kCAAmC,CADnC,+BAmFD,CAhFC,yDACC,0EAA2E,CAC3E,2EAA4E,CAI5E,0CAA2C,CAF3C,SAAU,CACV,wCA0ED,CAtEC,qEACC,4CACD,CAEA,2EAOC,aAAc,CANd,WAAY,CACZ,gBAAiB,CAGjB,eAAgB,CADhB,kCAAmC,CAEnC,sBAAuB,CAHvB,UAKD,CAEA,yFAMC,0CAA2C,CAC3C,gDAAiD,CAJjD,UAAW,CADX,eAAgB,CAGhB,gCAAiC,CAJjC,UAOD,CAEA,qEACC,6EAaD,CAVC,iFACC,0DACD,CAEA,qGAGC,4CAA6C,CAC7C,mBAAoB,CAHpB,UAID,CAGD,+DACC,wCAUD,CARC,iFACC,+CAAgD,CAChD,SACD,CAEA,qEACC,8CACD,CAIA,uFACC,wDACD,CAEA,6FACC,8DACD,CAGD,6FACC,4DAKD,CAHC,6HACC,SACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-style-panel-columns: 3;\n}\n\n.ck.ck-style-panel .ck-style-grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(var(--ck-style-panel-columns),auto);\n\tjustify-content: start;\n\n\t& .ck-style-grid__button {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tflex-direction: column;\n\n\t\t& .ck-style-grid__button__preview {\n\t\t\tdisplay: flex;\n\t\t\talign-content: center;\n\t\t\tjustify-content: flex-start;\n\t\t\talign-items: center;\n\t\t\tflex-grow: 1;\n\t\t\tflex-basis: 100%;\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-style-panel-button-width: 120px;\n\t--ck-style-panel-button-height: 80px;\n\t--ck-style-panel-button-label-background: hsl(0, 0%, 94.1%);\n\t--ck-style-panel-button-hover-label-background: hsl(0, 0%, 92.1%);\n\t--ck-style-panel-button-hover-border-color: hsl(0, 0%, 70%);\n}\n\n.ck.ck-style-panel .ck-style-grid {\n\trow-gap: var(--ck-spacing-large);\n\tcolumn-gap: var(--ck-spacing-large);\n\n\t& .ck-style-grid__button {\n\t\t--ck-color-button-default-hover-background: var(--ck-color-base-background);\n\t\t--ck-color-button-default-active-background: var(--ck-color-base-background);\n\n\t\tpadding: 0;\n\t\twidth: var(--ck-style-panel-button-width);\n\t\theight: var(--ck-style-panel-button-height);\n\n\t\t/* Let default .ck-button :focus styles apply */\n\t\t&:not(:focus) {\n\t\t\tborder: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t& .ck-button__label {\n\t\t\theight: 22px;\n\t\t\tline-height: 22px;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t& .ck-style-grid__button__preview {\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\topacity: .9;\n\n\t\t\tpadding: var(--ck-spacing-medium);\n\t\t\tbackground: var(--ck-color-base-background);\n\t\t\tborder: 2px solid var(--ck-color-base-background);\n\t\t}\n\n\t\t&.ck-disabled {\n\t\t\t--ck-color-button-default-disabled-background: var(--ck-color-base-foreground);\n\n\t\t\t/* Let default .ck-button :focus styles apply */\n\t\t\t&:not(:focus) {\n\t\t\t\tborder-color: var(--ck-style-panel-button-label-background);\n\t\t\t}\n\n\t\t\t& .ck-style-grid__button__preview {\n\t\t\t\topacity: .4;\n\n\t\t\t\tborder-color: var(--ck-color-base-foreground);\n\t\t\t\tfilter: saturate(.3);\n\t\t\t}\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tborder-color: var(--ck-color-base-active);\n\n\t\t\t& .ck-button__label {\n\t\t\t\tbox-shadow: 0 -1px 0 var(--ck-color-base-active);\n\t\t\t\tz-index: 1; /* Stay on top of the preview with the shadow. */\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\tborder-color: var(--ck-color-base-active-focus);\n\t\t\t}\n\t\t}\n\n\t\t&:not(.ck-on) {\n\t\t\t& .ck-button__label {\n\t\t\t\tbackground: var(--ck-style-panel-button-label-background);\n\t\t\t}\n\n\t\t\t&:hover .ck-button__label {\n\t\t\t\tbackground: var(--ck-style-panel-button-hover-label-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled):not(.ck-on) {\n\t\t\tborder-color: var(--ck-style-panel-button-hover-border-color);\n\n\t\t\t& .ck-style-grid__button__preview {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},1218:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-style-panel .ck-style-panel__style-group>.ck-label{margin:var(--ck-spacing-large) 0}.ck.ck-style-panel .ck-style-panel__style-group:first-child>.ck-label{margin-top:0}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-style/stylegroup.css"],names:[],mappings:"AAMC,0DACC,gCACD,CAGC,sEACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-style-panel .ck-style-panel__style-group {\n\t& > .ck-label {\n\t\tmargin: var(--ck-spacing-large) 0;\n\t}\n\n\t&:first-child {\n\t\t& > .ck-label {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},19:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":root{--ck-style-panel-max-height:470px}.ck.ck-style-panel{max-height:var(--ck-style-panel-max-height);overflow-y:auto;padding:var(--ck-spacing-large)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-style/stylepanel.css"],names:[],mappings:"AAKA,MACC,iCACD,CAEA,mBAGC,2CAA4C,CAD5C,eAAgB,CADhB,+BAGD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-style-panel-max-height: 470px;\n}\n\n.ck.ck-style-panel {\n\tpadding: var(--ck-spacing-large);\n\toverflow-y: auto;\n\tmax-height: var(--ck-style-panel-max-height);\n}\n"],sourceRoot:""}]),t.Z=s},3994:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/colorinput.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,YAAa,CACb,0BAA2B,CAF3B,UAgCD,CA5BC,0CAEC,WAAY,CADZ,cAED,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFAEC,eAAgB,CADhB,iBAOD,CAJC,0IAEC,aAAc,CADd,iBAED,CC1BF,+CAGE,4BAA6B,CAD7B,yBAcF,CAhBA,+CAQE,2BAA4B,CAD5B,wBASF,CAHC,2CACC,SACD,CAIA,wEACC,SA0CD,CA3CA,kFAKE,2BAA4B,CAD5B,wBAuCF,CApCE,8FACC,iCACD,CATF,kFAcE,4BAA6B,CAD7B,yBA8BF,CA3BE,8FACC,kCACD,CAGD,oFACC,oDACD,CAEA,4GC1CF,eD2DE,CAjBA,+PCtCD,qCDuDC,CAjBA,4GAKC,6CAA8C,CAD9C,WAAY,CADZ,UAcD,CAVC,oKAKC,cAA6B,CAC7B,iBAAkB,CAHlB,WAAY,CADZ,QAAS,CADT,QAAS,CAMT,uBAAwB,CACxB,oBAAqB,CAJrB,QAKD,CAKH,oDAIC,2BAA4B,CAC5B,4BAA6B,CAH7B,qEAAwE,CADxE,UA0BD,CApBC,gEACC,oDACD,CATD,8DAYE,yBAeF,CA3BA,8DAgBE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAKE,sCAAuC,CADvC,cAGF",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-input-color {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row-reverse;\n\n\t& > input.ck.ck-input-text {\n\t\tmin-width: auto;\n\t\tflex-grow: 1;\n\t}\n\n\t& > div.ck.ck-dropdown {\n\t\tmin-width: auto;\n\n\t\t/* This dropdown has no arrow but a color preview instead. */\n\t\t& > .ck-input-color__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__button {\n\t\t/* Resolving issue with misaligned buttons on Safari (see #10589) */\n\t\tdisplay: flex;\n\n\t\t& .ck.ck-input-color__button__preview {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\n\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_rounded.css";\n\n.ck.ck-input-color {\n\t& > .ck.ck-input-text {\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* Make sure the focused input is always on top of the dropdown button so its\n\t\t outline and border are never cropped (also when the input is read-only). */\n\t\t&:focus {\n\t\t\tz-index: 0;\n\t\t}\n\t}\n\n\t& > .ck.ck-dropdown {\n\t\t& > .ck.ck-button.ck-input-color__button {\n\t\t\tpadding: 0;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\n\t\t\t\t&:not(:focus) {\n\t\t\t\t\tborder-left: 1px solid transparent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\n\t\t\t\t&:not(:focus) {\n\t\t\t\t\tborder-right: 1px solid transparent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.ck-disabled {\n\t\t\t\tbackground: var(--ck-color-input-disabled-background);\n\t\t\t}\n\n\t\t\t& > .ck.ck-input-color__button__preview {\n\t\t\t\t@mixin ck-rounded-corners;\n\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder: 1px solid var(--ck-color-input-border);\n\n\t\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\t\ttop: -30%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\theight: 150%;\n\t\t\t\t\twidth: 8%;\n\t\t\t\t\tbackground: hsl(0, 100%, 50%);\n\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\ttransform-origin: 50%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__remove-color {\n\t\twidth: 100%;\n\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\n\t\tborder-bottom-left-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-bottom: 1px solid var(--ck-color-input-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t}\n\n\t\t& .ck.ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: 0;\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},4973:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/form.css"],names:[],mappings:"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form {\n\tpadding: 0 0 var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t& .ck.ck-input-text {\n\t\tmin-width: 100%;\n\t\twidth: 0;\n\t}\n\n\t& .ck.ck-dropdown {\n\t\tmin-width: 100%;\n\n\t\t& .ck-dropdown__button {\n\t\t\t&:not(:focus) {\n\t\t\t\tborder: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t& .ck-button__label {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},6158:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/formrow.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css"],names:[],mappings:"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BAEC,cAAe,CADf,UAED,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\tflex-grow: 1;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-form__row {\n\tpadding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\t& + * {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-label {\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},1393:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/inserttable.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAGC,yFAA0F,CAD1F,oJAED,CAEA,mFAEC,iBACD,CAEA,uCAIC,4CAA6C,CAC7C,iBAAkB,CAFlB,iDAAkD,CADlD,qDAAsD,CADtD,mDAAoD,CAKpD,YAAa,CACb,eAUD,CARC,6CACC,eACD,CAEA,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-insert-table-dropdown__grid {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-insert-table-dropdown-padding: 10px;\n\t--ck-insert-table-dropdown-box-height: 11px;\n\t--ck-insert-table-dropdown-box-width: 12px;\n\t--ck-insert-table-dropdown-box-margin: 1px;\n}\n\n.ck .ck-insert-table-dropdown__grid {\n\t/* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\n\twidth: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\n\tpadding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\n}\n\n.ck .ck-insert-table-dropdown__label,\n.ck[dir=rtl] .ck-insert-table-dropdown__label {\n\ttext-align: center;\n}\n\n.ck .ck-insert-table-dropdown-grid-box {\n\tmin-width: var(--ck-insert-table-dropdown-box-width);\n\tmin-height: var(--ck-insert-table-dropdown-box-height);\n\tmargin: var(--ck-insert-table-dropdown-box-margin);\n\tborder: 1px solid var(--ck-color-base-border);\n\tborder-radius: 1px;\n\toutline: none;\n\ttransition: none;\n\n\t&:focus {\n\t\tbox-shadow: none;\n\t}\n\n\t&.ck-on {\n\t\tborder-color: var(--ck-color-focus-border);\n\t\tbackground: var(--ck-color-focus-outer-shadow);\n\t}\n}\n\n"],sourceRoot:""}]),t.Z=s},6845:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAKC,aAAc,CADd,gBAiCD,CA9BC,yBAYC,yBAAkC,CAVlC,wBAAyB,CACzB,gBAAiB,CAKjB,WAAY,CADZ,UAsBD,CAfC,wDAQC,wBAAiC,CANjC,aAAc,CACd,YAMD,CAEA,4BAEC,0BAA+B,CAD/B,eAED,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .table {\n\t/* Give the table widget some air and center it horizontally */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tdisplay: table;\n\n\t& table {\n\t\t/* The table cells should have slight borders */\n\t\tborder-collapse: collapse;\n\t\tborder-spacing: 0;\n\n\t\t/* Table width and height are set on the parent
. Make sure the table inside stretches\n\t\tto the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t/* The outer border of the table should be slightly darker than the inner lines.\n\t\tAlso see https://github.com/ckeditor/ckeditor5-table/issues/50. */\n\t\tborder: 1px double hsl(0, 0%, 70%);\n\n\t\t& td,\n\t\t& th {\n\t\t\tmin-width: 2em;\n\t\t\tpadding: .4em;\n\n\t\t\t/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it\'s not necessary here.\n\t\t\tHowever, the border is a content style, so it should use .ck-content (so it works outside the editor).\n\t\t\tHence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\n\t\t\tborder: 1px solid hsl(0, 0%, 75%);\n\t\t}\n\n\t\t& th {\n\t\t\tfont-weight: bold;\n\t\t\tbackground: hsla(0, 0%, 0%, 5%);\n\t\t}\n\t}\n}\n\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\n.ck-content[dir="rtl"] .table th {\n\ttext-align: right;\n}\n\n.ck-content[dir="ltr"] .table th {\n\ttext-align: left;\n}\n\n.ck-editor__editable .ck-table-bogus-paragraph {\n\t/*\n\t * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\n\t * See https://github.com/ckeditor/ckeditor5/issues/6062.\n\t */\n\tdisplay: inline-block;\n\n\t/*\n\t * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9117.\n\t */\n\twidth: 100%;\n}\n'],sourceRoot:""}]),t.Z=s},4989:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":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)}}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/tablecaption.css"],names:[],mappings:"AAKA,MACC,8CAAuD,CACvD,qCAAiD,CACjD,uDACD,CAGA,8BAMC,4DAA6D,CAJ7D,gBAAiB,CAGjB,2CAA4C,CAJ5C,qBAAsB,CAOtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,iBAAkB,CADlB,qBAOD,CAIC,qEACC,iDACD,CAEA,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAGD,sCACC,GACC,wEACD,CAEA,GACC,4DACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-selector-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-selector-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-selector-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .table > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: top;\n\tword-break: break-word;\n\ttext-align: center;\n\tcolor: var(--ck-color-selector-caption-text);\n\tbackground-color: var(--ck-color-selector-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .table > figcaption {\n\t&.table__caption_highlighted {\n\t\tanimation: ck-table-caption-highlight .6s ease-out;\n\t}\n\n\t&.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the table caption placeholder doesn't overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n@keyframes ck-table-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-selector-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-selector-caption-background);\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},3656:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/tablecellproperties.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css"],names:[],mappings:"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\t&:first-of-type {\n\t\t\t\t\t/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */\n\t\t\t\t\tflex-grow: 0.57;\n\t\t\t\t}\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\t/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */\n\t\t\t\t\tflex-grow: 0.43;\n\t\t\t\t}\n\n\t\t\t\t& .ck-button {\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__padding-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},152:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":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}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/tablecolumnresize.css"],names:[],mappings:"AAKA,MACC,oEAAqE,CACrE,mCAAoC,CAIpC,iGACD,CAEA,qCACC,kBACD,CAEA,yBACC,eACD,CAEA,4CAIC,wBAAyB,CACzB,iBACD,CAEA,wDAGC,QAAS,CAGT,iBAAkB,CALlB,iBAAkB,CAGlB,oDAAqD,CAFrD,KAAM,CAKN,gBAAiB,CAFjB,0CAA2C,CAG3C,2BACD,CAQA,qJACC,YACD,CAEA,8HAEC,8DAA+D,CAO/D,gBAAiB,CANjB,WAAa,CAKb,aAED,CAEA,iEACC,mDAAoD,CACpD,WACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-selector-column-resizer-hover: var(--ck-color-base-active);\n\t--ck-table-column-resizer-width: 7px;\n\n\t/* The offset used for absolute positioning of the resizer element, so that it is placed exactly above the cell border.\n\t The value is: minus half the width of the resizer decreased additionaly by the half the width of the border (0.5px). */\n\t--ck-table-column-resizer-position-offset: calc(var(--ck-table-column-resizer-width) * -0.5 - 0.5px);\n}\n\n.ck-content .table .ck-table-resized {\n\ttable-layout: fixed;\n}\n\n.ck-content .table table {\n\toverflow: hidden;\n}\n\n.ck-content .table td,\n.ck-content .table th {\n\t/* To prevent text overflowing beyond its cell when columns are resized by resize handler\n\t(https://github.com/ckeditor/ckeditor5/pull/14379#issuecomment-1589460978). */\n\toverflow-wrap: break-word;\n\tposition: relative;\n}\n\n.ck.ck-editor__editable .table .ck-table-column-resizer {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tright: var(--ck-table-column-resizer-position-offset);\n\twidth: var(--ck-table-column-resizer-width);\n\tcursor: col-resize;\n\tuser-select: none;\n\tz-index: var(--ck-z-default);\n}\n\n.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer {\n\tdisplay: none;\n}\n\n/* The resizer elements, which are extended to an extremely high height, break the drag & drop feature in Chrome. To make it work again,\n all resizers must be hidden while the table is dragged. */\n.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer {\n\tdisplay: none;\n}\n\n.ck.ck-editor__editable .table .ck-table-column-resizer:hover,\n.ck.ck-editor__editable .table .ck-table-column-resizer__active {\n\tbackground-color: var(--ck-color-selector-column-resizer-hover);\n\topacity: 0.25;\n\t/* The resizer element resides in each cell so to occupy the entire height of the table, which is unknown from a CSS point of view,\n\t it is extended to an extremely high height. Even for screens with a very high pixel density, the resizer will fulfill its role as\n\t it should, i.e. for a screen of 476 ppi the total height of the resizer will take over 350 sheets of A4 format, which is totally\n\t unrealistic height for a single table. */\n\ttop: -999999px;\n\tbottom: -999999px;\n}\n\n.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer {\n\tleft: var(--ck-table-column-resizer-position-offset);\n\tright: unset;\n}\n"],sourceRoot:""}]),t.Z=s},9779:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-selector-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-selector-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,gEACD,CAKE,8QAGC,2DAA4D,CAK5D,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-selector-focused-cell-background: hsla(212, 90%, 80%, .3);\n}\n\n.ck-widget.table {\n\t& td,\n\t& th {\n\t\t&.ck-editor__nested-editable.ck-editor__nested-editable_focused,\n\t\t&.ck-editor__nested-editable:focus {\n\t\t\t/* A very slight background to highlight the focused cell */\n\t\t\tbackground: var(--ck-color-selector-focused-cell-background);\n\n\t\t\t/* Fixes the problem where surrounding cells cover the focused cell's border.\n\t\t\tIt does not fix the problem in all places but the UX is improved.\n\t\t\tSee https://github.com/ckeditor/ckeditor5-table/issues/29. */\n\t\t\tborder-style: none;\n\t\t\toutline: 1px solid var(--ck-color-focus-border);\n\t\t\toutline-offset: -1px; /* progressive enhancement - no IE support */\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},7293:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/tableform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAWE,wHACC,cACD,CAEA,8DAEC,kBAAmB,CADnB,cAgBD,CAbC,qFAGC,kBAAmB,CAFnB,YAAa,CACb,6BAMD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EAGC,2DAAgE,CADhE,QAAS,CADT,iBAAkB,CAGlB,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CAGX,QAAS,CAFT,iBAAkB,CAClB,wDAA6D,CAE7D,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAIC,cAAe,CADf,cAAe,CADf,UAGD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCAyBD,CAvBC,8ECxCD,eDyDC,CAjBA,mMCpCA,qCDqDA,CAjBA,8EAGC,qCAAsC,CACtC,qCAAsC,CAEtC,oDAAqD,CADrD,wDAAyD,CAEzD,iBAUD,CAPC,oFACC,2EAA4E,CAE5E,kBAAmB,CADnB,kJAED,CAdD,8EAgBC,iEACD,CAGA,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__background-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tflex-wrap: wrap;\n\t\t\talign-items: center;\n\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t\talign-items: center;\n\n\t\t\t\t& .ck.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\tflex-grow: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\t/* Allow absolute positioning of the status (error) balloons. */\n\t\tposition: relative;\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\tbottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\ttransform: translate(-50%,100%);\n\n\t\t\t/* Make sure the balloon status stays on top of other form elements. */\n\t\t\tz-index: 1;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX( -50% );\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n:root {\n\t--ck-table-properties-error-arrow-size: 6px;\n\t--ck-table-properties-min-error-width: 150px;\n}\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\t& > .ck-label {\n\t\t\t\t\tfont-size: var(--ck-font-size-tiny);\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__border-style,\n\t\t\t& .ck-table-form__border-width {\n\t\t\t\twidth: 80px;\n\t\t\t\tmin-width: 80px;\n\t\t\t\tmax-width: 80px;\n\t\t\t}\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tpadding: 0;\n\n\t\t\t& .ck-table-form__dimensions-row__width,\n\t\t\t& .ck-table-form__dimensions-row__height {\n\t\t\t\tmargin: 0\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\talign-self: flex-end;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\theight: var(--ck-ui-component-min-height);\n\t\t\t\tline-height: var(--ck-ui-component-min-height);\n\t\t\t\tmargin: 0 var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: var(--ck-spacing-standard);\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\t@mixin ck-rounded-corners;\n\n\t\t\tbackground: var(--ck-color-base-error);\n\t\t\tcolor: var(--ck-color-base-background);\n\t\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\t\tmin-width: var(--ck-table-properties-min-error-width);\n\t\t\ttext-align: center;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tborder-color: transparent transparent var(--ck-color-base-error) transparent;\n\t\t\t\tborder-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\tanimation: ck-table-form-labeled-view-status-appear .15s ease both;\n\t\t}\n\n\t\t/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */\n\t\t& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n@keyframes ck-table-form-labeled-view-status-appear {\n\t0% {\n\t\topacity: 0;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},5883:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}","",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-table/theme/tableproperties.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css"],names:[],mappings:"AAOE,mFAGC,sBAAuB,CADvB,YAAa,CADb,cAOD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\t\t\tflex-basis: 0;\n\t\t\talign-content: baseline;\n\n\t\t\t& .ck.ck-toolbar .ck-toolbar__items {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\t\t& .ck-toolbar__items > * {\n\t\t\t\t\twidth: 40px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},2315:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,wDACD,CAGC,0IAKC,gBAAiB,CAFjB,uBAAwB,CACxB,aAAc,CAFd,iBAiCD,CA3BC,sJAGC,yDAA0D,CAK1D,QAAS,CAPT,UAAW,CAKX,MAAO,CAJP,mBAAoB,CAEpB,iBAAkB,CAGlB,OAAQ,CAFR,KAID,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck.ck-editor__editable .table table {\n\t& td.ck-editor__editable_selected,\n\t& th.ck-editor__editable_selected {\n\t\tposition: relative;\n\t\tcaret-color: transparent;\n\t\toutline: unset;\n\t\tbox-shadow: unset;\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/6446 */\n\t\t&:after {\n\t\t\tcontent: '';\n\t\t\tpointer-events: none;\n\t\t\tbackground-color: var(--ck-table-selected-cell-background);\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t& ::selection,\n\t\t&:focus {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t/*\n\t\t * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9491.\n\t\t */\n\t\t& .ck-widget {\n\t\t\toutline: unset;\n\n\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.Z=s},4371:function(e,t,n){"use strict";var i=n(4574),o=n.n(i),r=n(9070),s=n.n(r)()(o());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../../../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF,CCAD,qDACC,kDACD,CAEA,uBACC,+BAmED,CAjEC,6BAEC,YACD,CAGC,oDACC,sCACD,CAIA,mDACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA8CF,CA5CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAKA,0DACC,kDACD,CAGD,iGAIC,eAAgB,CADhB,kCAAmC,CADnC,kCAmBD,CAfC,yHACC,gDACD,CARD,qHAWE,aAUF,CArBA,qHAeE,aAMF,CAJE,+IACC,kDACD,CDpEH",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button {\n\t&::after {\n\t\tcontent: "";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n\t&:focus::after {\n\t\tdisplay: none;\n\t}\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button {\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t&:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n\tborder-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n\tpadding: var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\t\twidth: calc(.8 * var(--ck-input-width));\n\n\t\t& .ck-labeled-field-view {\n\t\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t/* Let the long error messages wrap in the narrow form. */\n\t\t\t& .ck-labeled-field-view__error {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\t\t}\n\n\t\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\t&::after {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button:nth-last-child(1),\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-large);\n\t\t\tborder-radius: 0;\n\n\t\t\t&:not(:focus) {\n\t\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),t.Z=s},9070:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;re.length)&&(t=e.length);for(var n=0,i=new Array(t);nn.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(o=0;o{let t;return t="string"==typeof e?{name:e}:e,t})).filter((e=>{const n=o.includes(e.name);return n||(0,t.logWarning)("alignment-config-name-not-recognized",{option:e}),n})),i=n.filter((e=>Boolean(e.className))).length;if(i&&i{const r=o.slice(i+1);if(r.some((e=>e.name==n.name)))throw new t.CKEditorError("alignment-config-name-already-defined",{option:n,configuredOptions:e});if(n.className&&r.some((e=>e.className==n.className)))throw new t.CKEditorError("alignment-config-classname-already-defined",{option:n,configuredOptions:e})})),n}const a="alignment";class c extends e.Command{refresh(){const e=this.editor.locale,n=(0,t.first)(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(n)&&this._canBeAligned(n),this.isEnabled&&n.hasAttribute("alignment")?this.value=n.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,n=t.locale,i=t.model,o=i.document,r=e.value;i.change((e=>{const t=Array.from(o.selection.getSelectedBlocks()).filter((e=>this._canBeAligned(e))),i=t[0].getAttribute("alignment");s(r,n)||i===r||!r?function(e,t){for(const n of e)t.removeAttribute(a,n)}(t,e):function(e,t,n){for(const i of e)t.setAttribute(a,n,i)}(t,e,r)}))}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,a)}}class d extends e.Plugin{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:o.map((e=>({name:e})))})}init(){const e=this.editor,t=e.locale,n=e.model.schema,i=l(e.config.get("alignment.options")).filter((e=>r(e.name)&&!s(e.name,t))),o=i.some((e=>!!e.className));n.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),o?e.conversion.attributeToAttribute(function(e){const t={};for(const n of e)t[n.name]={key:"class",value:n.className};return{model:{key:"alignment",values:e.map((e=>e.name))},view:t}}(i)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:n}of e)t[n]={key:"style",value:{"text-align":n}};return{model:{key:"alignment",values:e.map((e=>e.name))},view:t}}(i));const a=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return t}(i);for(const t of a)e.conversion.for("upcast").attributeToAttribute(t);const d=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return t}(i);for(const t of d)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new c(e))}}var u=n(9273);const m=new Map([["left",e.icons.alignLeft],["right",e.icons.alignRight],["center",e.icons.alignCenter],["justify",e.icons.alignJustify]]);class g extends e.Plugin{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t,i=l(e.config.get("alignment.options"));i.map((e=>e.name)).filter(r).forEach((e=>this._addButton(e))),t.add("alignment",(o=>{const r=(0,u.createDropdown)(o);(0,u.addToolbarToDropdown)(r,(()=>i.map((e=>t.create(`alignment:${e.name}`)))),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:n("Text alignment toolbar")}),r.buttonView.set({label:n("Text alignment"),tooltip:!0}),r.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===o.contentLanguageDirection?m.get("right"):m.get("left"),l=e.commands.get("alignment");return r.buttonView.bind("icon").to(l,"value",(e=>m.get(e)||s)),r.bind("isEnabled").to(l,"isEnabled"),this.listenTo(r,"execute",(()=>{e.editing.view.focus()})),r}))}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,(n=>{const i=t.commands.get("alignment"),o=new u.ButtonView(n);return o.set({label:this.localizedOptionTitles[e],icon:m.get(e),tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value",(t=>t===e)),this.listenTo(o,"execute",(()=>{t.execute("alignment",{value:e}),t.editing.view.focus()})),o}))}}class h extends e.Plugin{static get requires(){return[d,g]}static get pluginName(){return"Alignment"}}var p=n(8945),b=n(1492),f=n(2254),k=n(4181),A=n(2995);function w(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function C(e,t){const n=e.plugins.get("ImageUtils"),i=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>n.isInlineImageView(e)?i&&("block"==e.getStyle("display")||e.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==t?null:o(e):null;function o(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function v(e,n){const i=(0,t.first)(n.getSelectedBlocks());return!i||e.isObject(i)||i.isEmpty&&"listItem"!=i.name?"imageBlock":"imageInline"}function y(e){return e&&e.endsWith("px")?parseInt(e):null}function _(e){const t=y(e.getStyle("width")),n=y(e.getStyle("height"));return!(!t||!n)}const x=/^(image|image-inline)$/;class I extends e.Plugin{constructor(){super(...arguments),this._domEmitter=new((0,t.DomEmitterMixin)())}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,n=null,i={}){const o=this.editor,r=o.model,s=r.document.selection,l=D(o,t||s,n);e={...Object.fromEntries(s.getAttributes()),...e};for(const t in e)r.schema.checkAttribute(l,t)||delete e[t];return r.change((n=>{const{setImageSizes:o=!0}=i,s=n.createElement(l,e);return r.insertObject(s,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==l?void 0:"auto"}),s.parent?(o&&this.setImageNaturalSizeAttributes(s),s):null}))}setImageNaturalSizeAttributes(e){const n=e.getAttribute("src");n&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change((i=>{const o=new t.global.window.Image;this._domEmitter.listenTo(o,"load",(()=>{e.getAttribute("width")||e.getAttribute("height")||this.editor.model.enqueueChange(i.batch,(t=>{t.setAttribute("width",o.naturalWidth,e),t.setAttribute("height",o.naturalHeight,e)})),this._domEmitter.stopListening(o,"load")})),o.src=n})))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const n=e.getSelectedElement();if(n&&this.isImageWidget(n))return n;let i=t.parent;for(;i;){if(i.is("element")&&this.isImageWidget(i))return i;i=i.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:x})}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==D(e,t,null)){const n=function(e,t){const n=(0,A.findOptimalInsertionRange)(e,t).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(t,e.model);if(e.model.schema.checkChild(n,"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,n){return t.setCustomProperty("image",!0,e),(0,A.toWidget)(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${n}`:n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&(0,A.isWidget)(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:n}of t.createRangeIn(e))if(this.isInlineImageView(n))return n}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function D(e,t,n){const i=e.model.schema,o=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?n||("inline"===o?"imageInline":"auto"!==o?"imageBlock":t.is("selection")?v(i,t):i.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const E=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 S extends e.Plugin{static get requires(){return[p.Clipboard,I,f.Undo,k.Delete]}static get pluginName(){return"AutoImage"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,n=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",(()=>{const e=n.selection.getFirstRange(),t=b.LivePosition.fromPosition(e.start);t.stickiness="toPrevious";const i=b.LivePosition.fromPosition(e.end);i.stickiness="toNext",n.once("change:data",(()=>{this._embedImageBetweenPositions(t,i),t.detach(),i.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(t.global.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedImageBetweenPositions(e,t){const n=this.editor,i=new b.LiveRange(e,t),o=i.getWalker({ignoreElementEnd:!0}),r=Object.fromEntries(n.model.document.selection.getAttributes()),s=this.editor.plugins.get("ImageUtils");let l="";for(const e of o)e.item.is("$textProxy")&&(l+=e.item.data);l=l.trim(),l.match(E)?(this._positionToInsert=b.LivePosition.fromPosition(e),this._timeoutId=setTimeout((()=>{n.commands.get("insertImage").isEnabled?(n.model.change((e=>{let t;this._timeoutId=null,e.remove(i),i.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),s.insertImage({...r,src:l},t),this._positionToInsert.detach(),this._positionToInsert=null})),n.plugins.get("Delete").requestUndoOnBackspace()):i.detach()}),100)):i.detach()}}class T extends e.Command{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,n=t.plugins.get("ImageUtils"),i=t.model,o=n.getClosestSelectedImageElement(i.document.selection);i.change((t=>{t.setAttribute("alt",e.newValue,o)}))}}class M extends e.Plugin{static get requires(){return[I]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new T(this.editor))}}var B=n(4191),L=n.n(B),N=n(379),j=(L()(N.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),N.Z.locals,n(4371));L()(j.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),j.Z.locals;class z extends u.View{constructor(n){super(n);const i=this.locale.t;this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(i("Save"),e.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),e.icons.cancel,"ck-button-cancel","cancel"),this._focusables=new u.ViewCollection,this._focusCycler=new u.FocusCycler({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),(0,u.submitHandler)({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,n,i){const o=new u.ButtonView(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createLabeledInputView(){const e=this.locale.t,t=new u.LabeledFieldView(this.locale,u.createLabeledInputText);return t.label=e("Text alternative"),t}}function V(e){const t=e.editing.view,n=u.BalloonPanelView.defaultPositions,i=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(i.getClosestSelectedImageWidget(t.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class O extends e.Plugin{static get requires(){return[u.ContextualBalloon]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const t=this.editor,n=t.t;t.ui.componentFactory.add("imageTextAlternative",(i=>{const o=t.commands.get("imageTextAlternative"),r=new u.ButtonView(i);return r.set({label:n("Change image text alternative"),icon:e.icons.textAlternative,tooltip:!0}),r.bind("isEnabled").to(o,"isEnabled"),r.bind("isOn").to(o,"value",(e=>!!e)),this.listenTo(r,"execute",(()=>{this._showForm()})),r}))}_createForm(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new((0,u.CssTransitionDisablerMixin)(z))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.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(e.ui,"update",(()=>{n.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const n=V(e);t.updatePosition(n)}}(e):this._hideForm(!0)})),(0,u.clickOutsideHandler)({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"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:V(e)}),n.fieldView.value=n.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 P extends e.Plugin{static get requires(){return[M,O]}static get pluginName(){return"ImageTextAlternative"}}function F(e,t){const n=(t,n,i)=>{if(!i.consumable.consume(n.item,t.name))return;const o=i.writer,r=i.mapper.toViewElement(n.item),s=e.findViewImgElement(r);null===n.attributeNewValue?(o.removeAttribute("srcset",s),o.removeAttribute("sizes",s)):n.attributeNewValue&&(o.setAttribute("srcset",n.attributeNewValue,s),o.setAttribute("sizes","100vw",s))};return e=>{e.on(`attribute:srcset:${t}`,n)}}function R(e,t,n){const i=(t,n,i)=>{if(!i.consumable.consume(n.item,t.name))return;const o=i.writer,r=i.mapper.toViewElement(n.item),s=e.findViewImgElement(r);o.setAttribute(n.attributeKey,n.attributeNewValue||"",s)};return e=>{e.on(`attribute:${n}:${t}`,i)}}class U extends b.Observer{observe(e){this.listenTo(e,"load",((e,t)=>{const n=t.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.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 H extends e.Command{constructor(e){super(e);const n=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===n&&(0,t.logWarning)("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===n&&(0,t.logWarning)("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const n=(0,t.toArray)(e.source),i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(i.getAttributes());n.forEach(((e,t)=>{const n=i.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&n&&o.isImage(n)){const t=this.editor.model.createPositionAfter(n);o.insertImage({...e,...r},t)}else o.insertImage({...e,...r})}))}}class G extends e.Command{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(),n=this.editor.plugins.get("ImageUtils");this.editor.model.change((i=>{i.setAttribute("src",e.source,t),this.cleanupImage(i,t),n.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 W extends e.Plugin{static get requires(){return[I]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(U),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const n=new H(e),i=new G(e);e.commands.add("insertImage",n),e.commands.add("replaceImageSource",i),e.commands.add("imageInsert",n)}}class Y extends e.Plugin{static get requires(){return[I]}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,n=t.plugins.get("ImageUtils"),i="imageBlock"===e?"figure":"img";function o(t,i,o,r){t.on(`attribute:${i}:${e}`,((t,i,s)=>{if(!s.consumable.consume(i.item,t.name))return;const l=s.writer,a=s.mapper.toViewElement(i.item),c=n.findViewImgElement(a);if(null!==i.attributeNewValue?l.setAttribute(o,i.attributeNewValue,c):l.removeAttribute(o,c),i.item.hasAttribute("sources"))return;const d=i.item.hasAttribute("resizedWidth");if("imageInline"===e&&!d&&!r)return;const u=i.item.getAttribute("width"),m=i.item.getAttribute("height");u&&m&&l.setStyle("aspect-ratio",`${u}/${m}`,c)}))}t.conversion.for("upcast").attributeToAttribute({view:{name:i,styles:{width:/.+/}},model:{key:"width",value:e=>_(e)?y(e.getStyle("width")):null}}).attributeToAttribute({view:{name:i,key:"width"},model:"width"}).attributeToAttribute({view:{name:i,styles:{height:/.+/}},model:{key:"height",value:e=>_(e)?y(e.getStyle("height")):null}}).attributeToAttribute({view:{name:i,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add((e=>{o(e,"width","width",!0),o(e,"height","height",!0)})),t.conversion.for("dataDowncast").add((e=>{o(e,"width","width",!1),o(e,"height","height",!1)}))}}class Z extends e.Command{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,n=this.editor.model,i=t.plugins.get("ImageUtils"),o=i.getClosestSelectedImageElement(n.document.selection),r=Object.fromEntries(o.getAttributes());return r.src||r.uploadId?n.change((t=>{const{setImageSizes:s=!0}=e,l=Array.from(n.markers).filter((e=>e.getRange().containsItem(o))),a=i.insertImage(r,n.createSelection(o,"on"),this._modelElementName,{setImageSizes:s});if(!a)return null;const c=t.createRangeOn(a);for(const e of l){const n=e.getRange(),i="$graveyard"!=n.root.rootName?n.getJoined(c,!0):c;t.updateMarker(e,{range:i})}return{oldElement:o,newElement:a}})):null}}var Q=n(9542);L()(Q.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Q.Z.locals;class q extends e.Plugin{static get requires(){return[I]}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,n=e.plugins.get("ImageUtils");t.for("editingDowncast").add((e=>{e.on("attribute:placeholder",((e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;if(!t.item.is("element","imageBlock")&&!t.item.is("element","imageInline"))return;i.consumable.consume(t.item,e.name);const o=i.writer,r=i.mapper.toViewElement(t.item),s=n.findViewImgElement(r);t.attributeNewValue?(o.addClass("image_placeholder",s),o.setStyle("background-image",`url(${t.attributeNewValue})`,s),o.setCustomProperty("editingPipeline:doNotReuseOnce",!0,s)):(o.removeClass("image_placeholder",s),o.removeStyle("background-image",s))}))}))}_setupLoadListener(){const e=this.editor,t=e.model,n=e.editing,i=n.view,o=e.plugins.get("ImageUtils");i.addObserver(U),this.listenTo(i.document,"imageLoaded",((e,r)=>{const s=i.domConverter.mapDomToView(r.target);if(!s)return;const l=o.getImageWidgetFromImageView(s);if(!l)return;const a=n.mapper.toModelElement(l);a&&a.hasAttribute("placeholder")&&t.enqueueChange({isUndoable:!1},(e=>{e.removeAttribute("placeholder",a)}))}))}}class K extends e.Plugin{static get requires(){return[W,Y,I,q,p.ClipboardPipeline]}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 Z(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,n=e.t,i=e.conversion,o=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>w(t)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>o.toImageWidget(w(t),t,n("image widget"))}),i.for("downcast").add(R(o,"imageBlock","src")).add(R(o,"imageBlock","alt")).add(F(o,"imageBlock")),i.for("upcast").elementToElement({view:C(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const n=(n,i,o)=>{if(!o.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const r=e.findViewImgElement(i.viewItem);if(!r||!o.consumable.test(r,{name:!0}))return;o.consumable.consume(i.viewItem,{name:!0,classes:"image"});const s=o.convertItem(r,i.modelCursor),l=(0,t.first)(s.modelRange.getItems());l?(o.convertChildren(i.viewItem,l),o.updateConversionResult(l,i)):o.consumable.revert(i.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",n)}}(o))}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline");this.listenTo(o,"inputTransformation",((o,r)=>{const s=Array.from(r.content.getChildren());let l;if(!s.every(i.isInlineImageView))return;l=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();const a=t.createSelection(l);if("imageBlock"===v(t.schema,a)){const e=new b.UpcastWriter(n.document),t=s.map((t=>e.createElement("figure",{class:"image"},t)));r.content=e.createDocumentFragment(t)}})),this.listenTo(o,"contentInsertion",((e,n)=>{"paste"===n.method&&t.change((e=>{const t=e.createRangeIn(n.content);for(const e of t.getItems())e.is("element","imageBlock")&&i.setImageNaturalSizeAttributes(e)}))}))}}var J=n(1998);L()(J.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),J.Z.locals;class X extends u.View{constructor(e,n=[]){super(e),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this._focusables=new u.ViewCollection,this.children=this.createCollection(),this._focusCycler=new u.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const e of n)this.children.add(e),this._focusables.add(e),e instanceof u.CollapsibleView&&this._focusables.addMany(e.children);if(this._focusables.length>1)for(const e of this._focusables)ee(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(),(0,u.submitHandler)({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 ee(e){return"focusCycler"in e}class te extends e.Plugin{static get pluginName(){return"ImageInsertUI"}static get requires(){return[I]}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,n=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",(()=>{this.isImageSelected=n.isImage(t.getSelectedElement())}));const i=e=>this._createToolbarComponent(e);e.ui.componentFactory.add("insertImage",i),e.ui.componentFactory.add("imageInsert",i)}registerIntegration({name:e,observable:n,buttonViewCreator:i,formViewCreator:o,requiresForm:r}){this._integrations.has(e)&&(0,t.logWarning)("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:n,buttonViewCreator:i,formViewCreator:o,requiresForm:!!r})}_createToolbarComponent(e){const t=this.editor,n=e.t,i=this._prepareIntegrations();if(!i.length)return null;let o;const r=i[0];if(1==i.length){if(!r.requiresForm)return r.buttonViewCreator(!0);o=r.buttonViewCreator(!0)}else{const t=r.buttonViewCreator(!1);o=new u.SplitButtonView(e,t),o.tooltip=!0,o.bind("label").to(this,"isImageSelected",(e=>n(e?"Replace image":"Insert image")))}const s=this.dropdownView=(0,u.createDropdown)(e,o),l=i.map((({observable:e})=>e));return s.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some((e=>e)))),s.once("change:isOpen",(()=>{const e=i.map((({formViewCreator:e})=>e(1==i.length))),n=new X(t.locale,e);s.panelView.children.add(n)})),s}_prepareIntegrations(){const e=this.editor.config.get("image.insert.integrations"),n=[];if(!e.length)return(0,t.logWarning)("image-insert-integrations-not-specified"),n;for(const i of e)this._integrations.has(i)?n.push(this._integrations.get(i)):["upload","assetManager","url"].includes(i)||(0,t.logWarning)("image-insert-unknown-integration",{item:i});return n.length||(0,t.logWarning)("image-insert-integrations-not-registered"),n}}var ne=n(1999);L()(ne.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ne.Z.locals;class ie extends e.Plugin{static get requires(){return[K,A.Widget,P,te]}static get pluginName(){return"ImageBlock"}}class oe extends e.Plugin{static get requires(){return[W,Y,I,q,p.ClipboardPipeline]}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 Z(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:n})=>i.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(n),n,t("image widget"))}),n.for("downcast").add(R(i,"imageInline","src")).add(R(i,"imageInline","alt")).add(F(i,"imageInline")),n.for("upcast").elementToElement({view:C(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,n=e.editing.view,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline");this.listenTo(o,"inputTransformation",((o,r)=>{const s=Array.from(r.content.getChildren());let l;if(!s.every(i.isBlockImageView))return;l=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();const a=t.createSelection(l);if("imageInline"===v(t.schema,a)){const e=new b.UpcastWriter(n.document),t=s.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((n=>e.setAttribute(...n,i.findViewImgElement(t)))),t.getChild(0)):t));r.content=e.createDocumentFragment(t)}})),this.listenTo(o,"contentInsertion",((e,n)=>{"paste"===n.method&&t.change((e=>{const t=e.createRangeIn(n.content);for(const e of t.getItems())e.is("element","imageInline")&&i.setImageNaturalSizeAttributes(e)}))}))}}class re extends e.Plugin{static get requires(){return[oe,A.Widget,P,te]}static get pluginName(){return"ImageInline"}}class se extends e.Plugin{static get requires(){return[ie,re]}static get pluginName(){return"Image"}}class le extends e.Plugin{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[I]}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"),n=e.getFirstPosition().findAncestor("caption");return n&&t.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class ae extends e.Command{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),n=e.plugins.get("ImageUtils");if(!e.plugins.has(K))return this.isEnabled=!1,void(this.value=!1);const i=e.model.document.selection,o=i.getSelectedElement();if(!o){const e=t.getCaptionFromModelSelection(i);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=n.isImage(o),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(o):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 n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageCaptionEditing"),o=this.editor.plugins.get("ImageUtils");let r=n.getSelectedElement();const s=i._getSavedCaption(r);o.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=n.getSelectedElement());const l=s||e.createElement("caption");e.append(l,r),t&&e.setSelection(l,"in")}_hideImageCaption(e){const t=this.editor,n=t.model.document.selection,i=t.plugins.get("ImageCaptionEditing"),o=t.plugins.get("ImageCaptionUtils");let r,s=n.getSelectedElement();s?r=o.getCaptionFromImageModelElement(s):(r=o.getCaptionFromModelSelection(n),s=r.parent),i._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class ce extends e.Plugin{static get requires(){return[I,le]}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 ae(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),o=e.t;e.conversion.for("upcast").elementToElement({view:e=>i.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>n.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:i})=>{if(!n.isBlockImage(e.parent))return null;const r=i.createEditableElement("figcaption");i.setCustomProperty("imageCaption",!0,r),r.placeholder=o("Enter image caption"),(0,b.enablePlaceholder)({view:t,element:r,keepOnFocus:!0});const s=e.parent.getAttribute("alt"),l=s?o("Caption for image: %0",[s]):o("Caption for the image");return(0,A.toWidgetEditable)(r,i,{label:l})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),i=e.commands.get("imageTypeInline"),o=e.commands.get("imageTypeBlock"),r=e=>{if(!e.return)return;const{oldElement:i,newElement:o}=e.return;if(!i)return;if(t.isBlockImage(i)){const e=n.getCaptionFromImageModelElement(i);if(e)return void this._saveCaption(o,e)}const r=this._getSavedCaption(i);r&&this._saveCaption(o,r)};i&&this.listenTo(i,"execute",r,{priority:"low"}),o&&this.listenTo(o,"execute",r,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?b.Element.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const o=t.document.differ.getChanges();for(const t of o){if("alt"!==t.attributeKey)continue;const o=t.range.start.nodeAfter;if(n.isBlockImage(o)){const t=i.getCaptionFromImageModelElement(o);if(!t)return;e.editing.reconvertItem(t)}}}))}}class de extends e.Plugin{static get requires(){return[le]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,n=t.editing.view,i=t.plugins.get("ImageCaptionUtils"),o=t.t;t.ui.componentFactory.add("toggleImageCaption",(r=>{const s=t.commands.get("toggleImageCaption"),l=new u.ButtonView(r);return l.set({icon:e.icons.caption,tooltip:!0,isToggleable:!0}),l.bind("isOn","isEnabled").to(s,"value","isEnabled"),l.bind("label").to(s,"value",(e=>o(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(l,"execute",(()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const e=i.getCaptionFromModelSelection(t.model.document.selection);if(e){const i=t.editing.mapper.toViewElement(e);n.scrollToTheSelection(),n.change((e=>{e.addClass("image__caption_highlighted",i)}))}t.editing.view.focus()})),l}))}}var ue=n(3764);L()(ue.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ue.Z.locals;class me extends e.Plugin{static get requires(){return[ce,de]}static get pluginName(){return"ImageCaption"}}n(5448);var ge=n(2296),he=(L()(ge.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ge.Z.locals,n(6232)),pe=(L()(he.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),he.Z.locals,n(6999));L()(pe.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pe.Z.locals,e.icons.objectSizeSmall,e.icons.objectSizeMedium,e.icons.objectSizeLarge,e.icons.objectSizeFull;var be=n(579);L()(be.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),be.Z.locals;class fe extends e.Command{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,n=t.model,i=t.plugins.get("ImageUtils");n.change((t=>{const o=e.value,{setImageSizes:r=!0}=e;let s=i.getClosestSelectedImageElement(n.document.selection);o&&this.shouldConvertImageType(o,s)&&(this.editor.execute(i.isBlockImage(s)?"imageTypeInline":"imageTypeBlock",{setImageSizes:r}),s=i.getClosestSelectedImageElement(n.document.selection)),!o||this._styles.get(o).isDefault?t.removeAttribute("imageStyle",s):t.setAttribute("imageStyle",o,s),r&&i.setImageNaturalSizeAttributes(s)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:ke,objectInline:Ae,objectLeft:we,objectRight:Ce,objectCenter:ve,objectBlockLeft:ye,objectBlockRight:_e}=e.icons,xe={get inline(){return{name:"inline",title:"In line",icon:Ae,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:we,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:ye,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:ve,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Ce,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:_e,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:ve,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Ce,modelElements:["imageBlock"],className:"image-style-side"}}},Ie={full:ke,left:ye,right:_e,center:ve,inlineLeft:we,inlineRight:Ce,inline:Ae},De=[{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 Ee(e){(0,t.logWarning)("image-style-configuration-definition-invalid",e)}var Se={normalizeStyles:function(e){const n=(e.configuredStyles.options||[]).map((e=>{return t="string"==typeof(t=e)?xe[t]?{...xe[t]}:{name:t}:function(e,t){const n={...t};for(const i in e)Object.prototype.hasOwnProperty.call(t,i)||(n[i]=e[i]);return n}(xe[t.name],t),"string"==typeof t.icon&&(t.icon=Ie[t.icon]||t.icon),t;var t})).filter((n=>function(e,{isBlockPluginLoaded:n,isInlinePluginLoaded:i}){const{modelElements:o,name:r}=e;if(!(o&&o.length&&r))return Ee({style:e}),!1;{const r=[n?"imageBlock":null,i?"imageInline":null];if(!o.some((e=>r.includes(e))))return(0,t.logWarning)("image-style-missing-dependency",{style:e,missingPlugins:o.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(n,e)));return n},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")?[...De]:[]},warnInvalidStyle:Ee,DEFAULT_OPTIONS:xe,DEFAULT_ICONS:Ie,DEFAULT_DROPDOWN_DEFINITIONS:De};function Te(e,t){for(const n of t)if(n.name===e)return n}class Me extends e.Plugin{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[I]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=Se,n=this.editor,i=n.plugins.has("ImageBlockEditing"),o=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",t(i,o)),this.normalizedStyles=e({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:i,isInlinePluginLoaded:o}),this._setupConversion(i,o),this._setupPostFixer(),n.commands.add("imageStyle",new fe(n,this.normalizedStyles))}_setupConversion(e,n){const i=this.editor,o=i.model.schema,r=(s=this.normalizedStyles,(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const i=Te(t.attributeNewValue,s),o=Te(t.attributeOldValue,s),r=n.mapper.toViewElement(t.item),l=n.writer;o&&l.removeClass(o.className,r),i&&l.addClass(i.className,r)});var s;const l=function(e){const n={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,i,o)=>{if(!i.modelRange)return;const r=i.viewItem,s=(0,t.first)(i.modelRange.getItems());if(s&&o.schema.checkAttribute(s,"imageStyle"))for(const e of n[s.name])o.consumable.consume(r,{classes:e.className})&&o.writer.setAttribute("imageStyle",e.name,s)}}(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",r),i.data.downcastDispatcher.on("attribute:imageStyle",r),e&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:figure",l,{priority:"low"})),n&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:img",l,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,n=e.plugins.get(I),i=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let o=!1;for(const r of t.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let t="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!n.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const l=i.get(s);l&&l.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),o=!0)}return o}))}}var Be=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Le=function(e){return e},Ne=n(812);L()(Ne.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ne.Z.locals;class je extends e.Plugin{static get requires(){return[Me]}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")||[],n=ze(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of n)this._createButton(e);const i=ze([...t.filter(Be),...Se.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of i)this._createDropdown(e,n)}_createDropdown(e,t){const n=this.editor.ui.componentFactory;n.add(e.name,(i=>{let o;const{defaultItem:r,items:s,title:l}=e,a=s.filter((e=>t.find((({name:t})=>Ve(t)===e)))).map((e=>{const t=n.create(e);return e===r&&(o=t),t}));s.length!==a.length&&Se.warnInvalidStyle({dropdown:e});const c=(0,u.createDropdown)(i,u.SplitButtonView),d=c.buttonView,m=d.arrowView;return(0,u.addToolbarToDropdown)(c,a,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:Oe(l,o.label),class:null,tooltip:!0}),m.unbind("label"),m.set({label:l}),d.bind("icon").toMany(a,"isOn",((...e)=>{const t=e.findIndex(Le);return t<0?o.icon:a[t].icon})),d.bind("label").toMany(a,"isOn",((...e)=>{const t=e.findIndex(Le);return Oe(l,t<0?o.label:a[t].label)})),d.bind("isOn").toMany(a,"isOn",((...e)=>e.some(Le))),d.bind("class").toMany(a,"isOn",((...e)=>e.some(Le)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{a.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:o.fire("execute")})),c.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some(Le))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(Ve(t),(n=>{const i=this.editor.commands.get("imageStyle"),o=new u.ButtonView(n);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i,"isEnabled"),o.bind("isOn").to(i,"value",(e=>e===t)),o.on("execute",this._executeCommand.bind(this,t)),o}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function ze(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}function Ve(e){return`imageStyle:${e}`}function Oe(e,t){return(e?e+": ":"")+t}class Pe extends e.Plugin{static get requires(){return[Me,je]}static get pluginName(){return"ImageStyle"}}class Fe extends e.Plugin{static get requires(){return[A.WidgetToolbarRepository,I]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(A.WidgetToolbarRepository),i=e.plugins.get("ImageUtils");var o;n.register("image",{ariaLabel:t("Image toolbar"),items:(o=e.config.get("image.toolbar")||[],o.map((e=>Be(e)?e.name:e))),getRelatedElement:e=>i.getClosestSelectedImageWidget(e)})}}function Re(e,n,i,o){let r,s=null;"function"==typeof o?r=o:(s=e.commands.get(o),r=()=>{e.execute(o)}),e.model.document.on("change:data",((l,a)=>{if(s&&!s.isEnabled||!n.isEnabled)return;const c=(0,t.first)(e.model.document.selection.getRanges());if(!c.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const d=Array.from(e.model.document.differ.getChanges()),u=d[0];if(1!=d.length||"insert"!==u.type||"$text"!=u.name||1!=u.length)return;const m=u.position.parent;if(m.is("element","codeBlock"))return;if(m.is("element","listItem")&&"function"!=typeof o&&!["numberedList","bulletedList","todoList"].includes(o))return;if(s&&!0===s.value)return;const g=m.getChild(0),h=e.model.createRangeOn(g);if(!h.containsRange(c)&&!c.end.isEqual(h.end))return;const p=i.exec(g.data.substr(0,c.end.offset));p&&e.model.enqueueChange((t=>{const n=t.createPositionAt(m,0),i=t.createPositionAt(m,p[0].length),o=new b.LiveRange(n,i);if(!1!==r({match:p})){t.remove(o);const n=e.model.document.selection.getFirstRange(),i=t.createRangeIn(m);!m.isEmpty||i.isEqual(n)||i.containsRange(n,!0)||t.remove(m)}o.detach(),e.model.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Ue(e,t,n,i){let o,r;n instanceof RegExp?o=n:r=n,r=r||(e=>{let t;const n=[],i=[];for(;null!==(t=o.exec(e))&&!(t&&t.length<4);){let{index:e,1:o,2:r,3:s}=t;const l=o+r+s;e+=t[0].length-l.length;const a=[e,e+o.length],c=[e+o.length+r.length,e+o.length+r.length+s.length];n.push(a),n.push(c),i.push([e+o.length,e+o.length+r.length])}return{remove:n,format:i}}),e.model.document.on("change:data",((n,o)=>{if(o.isUndo||!o.isLocal||!t.isEnabled)return;const s=e.model,l=s.document.selection;if(!l.isCollapsed)return;const a=Array.from(s.document.differ.getChanges()),c=a[0];if(1!=a.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=l.focus,u=d.parent,{text:m,range:g}=function(e,t){let n=e.start;return{text:Array.from(e.getItems()).reduce(((e,i)=>!i.is("$text")&&!i.is("$textProxy")||i.getAttribute("code")?(n=t.createPositionAfter(i),""):e+i.data),""),range:t.createRange(n,e.end)}}(s.createRange(s.createPositionAt(u,0),d),s),h=r(m),p=He(g.start,h.format,s),b=He(g.start,h.remove,s);p.length&&b.length&&s.enqueueChange((t=>{if(!1!==i(t,p)){for(const e of b.reverse())t.remove(e);s.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function He(e,t,n){return t.filter((e=>void 0!==e[0]&&void 0!==e[1])).map((t=>n.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1]))))}class Ge extends e.Plugin{static get requires(){return[k.Delete]}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")&&Re(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&Re(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&Re(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&Re(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=We(this.editor,"bold");Ue(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),Ue(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(e.get("italic")){const e=We(this.editor,"italic");Ue(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),Ue(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(e.get("code")){const e=We(this.editor,"code");Ue(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(e.get("strikethrough")){const e=We(this.editor,"strikethrough");Ue(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 n=t[7],i=new RegExp(`^(#{${n}})\\s$`);Re(this.editor,this,i,(()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&Re(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&Re(e,this,/^```$/,(()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&Re(this.editor,this,/^---$/,"horizontalLine")}}function We(e,t){return(n,i)=>{if(!e.commands.get(t).isEnabled)return!1;const o=e.model.schema.getValidRanges(i,t);for(const e of o)n.setAttribute(t,!0,e);n.removeSelectionAttribute(t)}}var Ye=n(1331);class Ze extends e.Command{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,i=t.document.selection,o=Array.from(i.getSelectedBlocks()),r=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(r){const t=o.filter((e=>Qe(e)||qe(n,e)));this._applyQuote(e,t)}else this._removeQuote(e,o.filter(Qe))}))}_getValue(){const e=this.editor.model.document.selection,n=(0,t.first)(e.getSelectedBlocks());return!(!n||!Qe(n))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,n=this.editor.model.schema,i=(0,t.first)(e.getSelectedBlocks());return!!i&&qe(n,i)}_removeQuote(e,t){$e(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=e.createPositionAfter(t.end.parent);e.move(t,n)}))}_applyQuote(e,t){const n=[];$e(e,t).reverse().forEach((t=>{let i=Qe(t.start);i||(i=e.createElement("blockQuote"),e.wrap(t,i)),n.push(i)})),n.reverse().reduce(((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n))}}function Qe(e){return"blockQuote"==e.parent.name?e.parent:null}function $e(e,t){let n,i=0;const o=[];for(;i{const i=e.model.document.differ.getChanges();for(const e of i)if("insert"==e.type){const i=e.position.nodeAfter;if(!i)continue;if(i.is("element","blockQuote")&&i.isEmpty)return n.remove(i),!0;if(i.is("element","blockQuote")&&!t.checkChild(e.position,i))return n.unwrap(i),!0;if(i.is("element")){const e=n.createRangeIn(i);for(const i of e.getItems())if(i.is("element","blockQuote")&&!t.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return n.remove(t),!0}return!1}));const n=this.editor.editing.view.document,i=e.model.document.selection,o=e.commands.get("blockQuote");this.listenTo(n,"enter",((t,n)=>{i.isCollapsed&&o.value&&i.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((t,n)=>{if("backward"!=n.direction||!i.isCollapsed||!o.value)return;const r=i.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())}),{context:"blockquote"})}}var Je=n(3541);L()(Je.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Je.Z.locals;class Xe extends e.Plugin{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,n=t.t;t.ui.componentFactory.add("blockQuote",(i=>{const o=t.commands.get("blockQuote"),r=new u.ButtonView(i);return r.set({label:n("Block quote"),icon:e.icons.quote,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(r,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),r}))}}class et extends e.Plugin{static get requires(){return[Ke,Xe]}static get pluginName(){return"BlockQuote"}}class tt extends e.Command{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,n=t.document.selection,i=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(n.isCollapsed)i?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)i?e.setAttribute(this.attributeKey,i,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const nt="bold";class it extends e.Plugin{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:nt}),e.model.schema.setAttributeProperties(nt,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:nt,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(nt,new tt(e,nt)),e.keystrokes.set("CTRL+B",nt)}}const ot="bold";class rt extends e.Plugin{static get pluginName(){return"BoldUI"}init(){const t=this.editor,n=t.t;t.ui.componentFactory.add(ot,(i=>{const o=t.commands.get(ot),r=new u.ButtonView(i);return r.set({label:n("Bold"),icon:e.icons.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(r,"execute",(()=>{t.execute(ot),t.editing.view.focus()})),r}))}}class st extends e.Plugin{static get requires(){return[it,rt]}static get pluginName(){return"Bold"}}const lt="code";class at extends e.Plugin{static get pluginName(){return"CodeEditing"}static get requires(){return[k.TwoStepCaretMovement]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:lt}),e.model.schema.setAttributeProperties(lt,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:lt,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(lt,new tt(e,lt)),e.plugins.get(k.TwoStepCaretMovement).registerAttribute(lt),(0,k.inlineHighlight)(e,lt,"code","ck-code_selected")}}var ct=n(3665);L()(ct.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ct.Z.locals;const dt="code";class ut extends e.Plugin{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(dt,(n=>{const i=e.commands.get(dt),o=new u.ButtonView(n);return o.set({label:t("Code"),icon:'',tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute(dt),e.editing.view.focus()})),o}))}}class mt extends e.Plugin{static get requires(){return[at,ut]}static get pluginName(){return"Code"}}const gt="italic";class ht extends e.Plugin{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:gt}),e.model.schema.setAttributeProperties(gt,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:gt,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(gt,new tt(e,gt)),e.keystrokes.set("CTRL+I",gt)}}const pt="italic";class bt extends e.Plugin{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(pt,(n=>{const i=e.commands.get(pt),o=new u.ButtonView(n);return o.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute(pt),e.editing.view.focus()})),o}))}}class ft extends e.Plugin{static get requires(){return[ht,bt]}static get pluginName(){return"Italic"}}const kt="strikethrough";class At extends e.Plugin{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:kt}),e.model.schema.setAttributeProperties(kt,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:kt,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(kt,new tt(e,kt)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const wt="strikethrough";class Ct extends e.Plugin{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(wt,(n=>{const i=e.commands.get(wt),o=new u.ButtonView(n);return o.set({label:t("Strikethrough"),icon:'',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute(wt),e.editing.view.focus()})),o}))}}class vt extends e.Plugin{static get requires(){return[At,Ct]}static get pluginName(){return"Strikethrough"}}const yt="subscript";class _t extends e.Plugin{static get pluginName(){return"SubscriptEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:yt}),e.model.schema.setAttributeProperties(yt,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:yt,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),e.commands.add(yt,new tt(e,yt))}}const xt="subscript";class It extends e.Plugin{static get pluginName(){return"SubscriptUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(xt,(n=>{const i=e.commands.get(xt),o=new u.ButtonView(n);return o.set({label:t("Subscript"),icon:'',tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute(xt),e.editing.view.focus()})),o}))}}class Dt extends e.Plugin{static get requires(){return[_t,It]}static get pluginName(){return"Subscript"}}const Et="superscript";class St extends e.Plugin{static get pluginName(){return"SuperscriptEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Et}),e.model.schema.setAttributeProperties(Et,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Et,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),e.commands.add(Et,new tt(e,Et))}}const Tt="superscript";class Mt extends e.Plugin{static get pluginName(){return"SuperscriptUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Tt,(n=>{const i=e.commands.get(Tt),o=new u.ButtonView(n);return o.set({label:t("Superscript"),icon:'',tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute(Tt),e.editing.view.focus()})),o}))}}class Bt extends e.Plugin{static get requires(){return[St,Mt]}static get pluginName(){return"Superscript"}}const Lt="underline";class Nt extends e.Plugin{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Lt}),e.model.schema.setAttributeProperties(Lt,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Lt,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(Lt,new tt(e,Lt)),e.keystrokes.set("CTRL+U","underline")}}const jt="underline";class zt extends e.Plugin{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(jt,(n=>{const i=e.commands.get(jt),o=new u.ButtonView(n);return o.set({label:t("Underline"),icon:'',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute(jt),e.editing.view.focus()})),o}))}}class Vt extends e.Plugin{static get requires(){return[Nt,zt]}static get pluginName(){return"Underline"}}class Ot extends u.EditorUI{constructor(e,n){super(e),this.view=n,this._toolbarConfig=(0,u.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,n=this.view,i=t.editing.view,o=n.editable,r=i.document.getRoot();o.name=r.rootName,n.render();const s=o.element;this.setEditableElement(o.name,s),n.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(s),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,n=t.document.getRoot(),i=e.sourceElement;let o;const r=e.config.get("placeholder");r&&(o="string"==typeof r?r:r[this.view.editable.name]),!o&&i&&"textarea"===i.tagName.toLowerCase()&&(o=i.getAttribute("placeholder")),o&&(n.placeholder=o),(0,b.enablePlaceholder)({view:t,element:n,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(e,n,i){const o=this.view.stickyPanel;if(o.isSticky){const e=new t.Rect(o.element).height;n.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(o,"change:isSticky",e),setTimeout((()=>{this.stopListening(o,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,n=this.editor.plugins.get("Dialog");n.on("show",(()=>{const i=n.view;i.on("moveTo",((n,o)=>{if(!e.isSticky||i.wasMoved)return;const r=new t.Rect(e.contentPanelElement);o[1]{const i=new this(e,t);n(i.initPlugins().then((()=>i.ui.init(mn(e)?e:null))).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}dn.Context=e.Context,dn.EditorWatchdog=Rt.EditorWatchdog,dn.ContextWatchdog=Rt.ContextWatchdog;var un=dn;function mn(e){return cn(e)}function gn(e){const t=e.t,n=e.config.get("codeBlock.languages");for(const e of n)"Plain text"===e.label&&(e.label=t("Plain text")),void 0===e.class&&(e.class=`language-${e.language}`);return n}function hn(e,t,n){const i={};for(const o of e)"class"===t?i[o[t].split(" ").shift()]=o[n]:i[o[t]]=o[n];return i}function pn(e){return e.data.match(/^(\s*)/)[0]}function bn(e){const t=e.document.selection,n=[];if(t.isCollapsed)return[t.anchor];const i=t.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(const{item:t}of i){if(!t.is("$textProxy"))continue;const{parent:i,startOffset:o}=t.textNode;if(!i.is("element","codeBlock"))continue;const r=pn(t.textNode),s=e.createPositionAt(i,o+r.length);n.push(s)}return n}function fn(e){const n=(0,t.first)(e.getSelectedBlocks());return!!n&&n.is("element","codeBlock")}function kn(e,t){return!t.is("rootElement")&&!e.isLimit(t)&&e.checkChild(t.parent,"codeBlock")}class An extends e.Command{constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor,n=t.model,i=n.document.selection,o=gn(t)[0],r=Array.from(i.getSelectedBlocks()),s=null==e.forceValue?!this.value:e.forceValue,l=function(e,t,n){return e.language?e.language:e.usePreviousLanguageChoice&&t?t:n}(e,this._lastLanguage,o.language);n.change((e=>{s?this._applyCodeBlock(e,r,l):this._removeCodeBlock(e,r)}))}_getValue(){const e=this.editor.model.document.selection,n=(0,t.first)(e.getSelectedBlocks());return!(!n||!n.is("element","codeBlock"))&&n.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,n=this.editor.model.schema,i=(0,t.first)(e.getSelectedBlocks());return!!i&&kn(n,i)}_applyCodeBlock(e,t,n){this._lastLanguage=n;const i=this.editor.model.schema,o=t.filter((e=>kn(i,e)));for(const t of o)e.rename(t,"codeBlock"),e.setAttribute("language",n,t),i.removeDisallowedAttributes([t],e),Array.from(t.getChildren()).filter((e=>!i.checkChild(t,e))).forEach((t=>e.remove(t)));o.reverse().forEach(((t,n)=>{const i=o[n+1];t.previousSibling===i&&(e.appendElement("softBreak",i),e.merge(e.createPositionBefore(t)))}))}_removeCodeBlock(e,t){const n=t.filter((e=>e.is("element","codeBlock")));for(const t of n){const n=e.createRangeOn(t);for(const t of Array.from(n.getItems()).reverse())if(t.is("element","softBreak")&&t.parent.is("element","codeBlock")){const{position:n}=e.split(e.createPositionBefore(t)),i=n.nodeAfter;e.rename(i,"paragraph"),e.removeAttribute("language",i),e.remove(t)}e.rename(t,"paragraph"),e.removeAttribute("language",t)}}}class wn extends e.Command{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change((t=>{const n=bn(e);for(const i of n){const n=t.createText(this._indentSequence);e.insertContent(n,i)}}))}_checkEnabled(){return!!this._indentSequence&&fn(this.editor.model.document.selection)}}class Cn extends e.Command{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change((()=>{const t=bn(e);for(const n of t){const t=vn(e,n,this._indentSequence);t&&e.deleteContent(e.createSelection(t))}}))}_checkEnabled(){if(!this._indentSequence)return!1;const e=this.editor.model;return!!fn(e.document.selection)&&bn(e).some((t=>vn(e,t,this._indentSequence)))}}function vn(e,t,n){const i=function(e){let t=e.parent.getChild(e.index);return t&&!t.is("element","softBreak")||(t=e.nodeBefore),!t||t.is("element","softBreak")?null:t}(t);if(!i)return null;const o=pn(i),r=o.lastIndexOf(n);if(r+n.length!==o.length)return null;if(-1===r)return null;const{parent:s,startOffset:l}=i;return e.createRange(e.createPositionAt(s,l+r),e.createPositionAt(s,l+r+n.length))}function yn(e,t,n=!1){const i=hn(t,"language","class"),o=hn(t,"language","label");return(t,r,s)=>{const{writer:l,mapper:a,consumable:c}=s;if(!c.consume(r.item,"insert"))return;const d=r.item.getAttribute("language"),u=a.toViewPosition(e.createPositionBefore(r.item)),m={};n&&(m["data-language"]=o[d],m.spellcheck="false");const g=i[d]?{class:i[d]}:void 0,h=l.createContainerElement("code",g),p=l.createContainerElement("pre",m,h);l.insert(u,p),a.bindElements(r.item,h)}}const _n="paragraph";class xn extends e.Plugin{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[Ye.ShiftEnter]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const e=this.editor,t=e.model.schema,n=e.model,i=e.editing.view,o=e.plugins.has("ListEditing")?e.plugins.get("ListEditing"):null,r=gn(e);e.commands.add("codeBlock",new An(e)),e.commands.add("indentCodeBlock",new wn(e)),e.commands.add("outdentCodeBlock",new Cn(e)),this.listenTo(i.document,"tab",((t,n)=>{const i=n.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(i).isEnabled&&(e.execute(i),n.stopPropagation(),n.preventDefault(),t.stop())}),{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),t.addAttributeCheck(((e,t)=>!!(e.endsWith("codeBlock")&&o&&o.getListAttributeNames().includes(t))||!e.endsWith("codeBlock $text")&&void 0)),e.model.schema.addChildCheck(((e,t)=>{if(e.endsWith("codeBlock")&&t.isObject)return!1})),e.editing.downcastDispatcher.on("insert:codeBlock",yn(n,r,!0)),e.data.downcastDispatcher.on("insert:codeBlock",yn(n,r)),e.data.downcastDispatcher.on("insert:softBreak",function(e){return(t,n,i)=>{if("codeBlock"!==n.item.parent.name)return;const{writer:o,mapper:r,consumable:s}=i;if(!s.consume(n.item,"insert"))return;const l=r.toViewPosition(e.createPositionBefore(n.item));o.insert(l,o.createText("\n"))}}(n),{priority:"high"}),e.data.upcastDispatcher.on("element:code",function(e,t){const n=hn(t,"class","language"),i=t[0].language;return(e,t,o)=>{const r=t.viewItem,s=r.parent;if(!s||!s.is("element","pre"))return;if(t.modelCursor.findAncestor("codeBlock"))return;const{consumable:l,writer:a}=o;if(!l.test(r,{name:!0}))return;const c=a.createElement("codeBlock"),d=[...r.getClassNames()];d.length||d.push("");for(const e of d){const t=n[e];if(t){a.setAttribute("language",t,c);break}}c.hasAttribute("language")||a.setAttribute("language",i,c),o.convertChildren(r,c),o.safeInsert(c,t.modelCursor)&&(l.consume(r,{name:!0}),o.updateConversionResult(c,t))}}(0,r)),e.data.upcastDispatcher.on("text",((e,t,{consumable:n,writer:i})=>{let o=t.modelCursor;if(!n.test(t.viewItem))return;if(!o.findAncestor("codeBlock"))return;n.consume(t.viewItem);const r=t.viewItem.data.split("\n").map((e=>i.createText(e))),s=r[r.length-1];for(const e of r)if(i.insert(e,o),o=o.getShiftedBy(e.offsetSize),e!==s){const e=i.createElement("softBreak");i.insert(e,o),o=i.createPositionAfter(e)}t.modelRange=i.createRange(t.modelCursor,o),t.modelCursor=o})),e.data.upcastDispatcher.on("element:pre",((e,t,{consumable:n})=>{const i=t.viewItem;if(i.findAncestor("pre"))return;const o=Array.from(i.getChildren()),r=o.find((e=>e.is("element","code")));if(r)for(const e of o)e!==r&&e.is("$text")&&n.consume(e,{name:!0})}),{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,i)=>{let o=n.createRange(n.document.selection.anchor);if(i.targetRanges&&(o=e.editing.mapper.toModelRange(i.targetRanges[0])),!o.start.parent.is("element","codeBlock"))return;const r=i.dataTransfer.getData("text/plain"),s=new b.UpcastWriter(e.editing.view.document);i.content=function(e,t){const n=e.createDocumentFragment(),i=t.split("\n"),o=i.reduce(((t,n,o)=>(t.push(n),o{const o=i.anchor;!i.isCollapsed&&o.parent.is("element","codeBlock")&&o.hasSameParentAs(i.focus)&&n.change((n=>{const r=e.return;if(o.parent.is("element")&&(r.childCount>1||i.containsEntireContent(o.parent))){const t=n.createElement("codeBlock",o.parent.getAttributes());n.append(r,t);const i=n.createDocumentFragment();return n.append(t,i),void(e.return=i)}const s=r.getChild(0);t.checkAttribute(s,"code")&&n.setAttribute("code",!0,s)}))}))}afterInit(){const e=this.editor,t=e.commands,n=t.get("indent"),i=t.get("outdent");n&&n.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),i&&i.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",((t,n)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(e,t){const n=e.model.document,i=e.editing.view,o=n.selection.getLastPosition(),r=o.nodeAfter;return!(t||!n.selection.isCollapsed||!o.isAtStart)&&(!!Dn(r)&&(e.model.change((t=>{e.execute("enter");const i=n.selection.anchor.parent.previousSibling;t.rename(i,_n),t.setSelection(i,"in"),e.model.schema.removeDisallowedAttributes([i],t),t.remove(r)})),i.scrollToTheSelection(),!0))}(e,n.isSoft)||function(e,t){const n=e.model,i=n.document,o=e.editing.view,r=i.selection.getLastPosition(),s=r.nodeBefore;let l;if(t||!i.selection.isCollapsed||!r.isAtEnd||!s||!s.previousSibling)return!1;if(Dn(s)&&Dn(s.previousSibling))l=n.createRange(n.createPositionBefore(s.previousSibling),n.createPositionAfter(s));else if(In(s)&&Dn(s.previousSibling)&&Dn(s.previousSibling.previousSibling))l=n.createRange(n.createPositionBefore(s.previousSibling.previousSibling),n.createPositionAfter(s));else{if(!(In(s)&&Dn(s.previousSibling)&&In(s.previousSibling.previousSibling)&&s.previousSibling.previousSibling&&Dn(s.previousSibling.previousSibling.previousSibling)))return!1;l=n.createRange(n.createPositionBefore(s.previousSibling.previousSibling.previousSibling),n.createPositionAfter(s))}return e.model.change((t=>{t.remove(l),e.execute("enter");const n=i.selection.anchor.parent;t.rename(n,_n),e.model.schema.removeDisallowedAttributes([n],t)})),o.scrollToTheSelection(),!0}(e,n.isSoft)||function(e){const t=e.model.document,n=t.selection.getLastPosition(),i=n.nodeBefore||n.textNode;let o;i&&i.is("$text")&&(o=pn(i)),e.model.change((n=>{e.execute("shiftEnter"),o&&n.insertText(o,t.selection.anchor)}))}(e),n.preventDefault(),t.stop())}),{context:"pre"})}}function In(e){return e&&e.is("$text")&&!e.data.match(/\S/)}function Dn(e){return e&&e.is("element","softBreak")}var En=n(8137);L()(En.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),En.Z.locals;class Sn extends e.Plugin{static get pluginName(){return"CodeBlockUI"}init(){const t=this.editor,n=t.t,i=t.ui.componentFactory,o=gn(t);i.add("codeBlock",(i=>{const r=t.commands.get("codeBlock"),s=(0,u.createDropdown)(i,u.SplitButtonView),l=s.buttonView,a=n("Insert code block");return l.set({label:a,tooltip:!0,icon:e.icons.codeBlock,isToggleable:!0}),l.bind("isOn").to(r,"value",(e=>!!e)),l.on("execute",(()=>{t.execute("codeBlock",{usePreviousLanguageChoice:!0}),t.editing.view.focus()})),s.on("execute",(e=>{t.execute("codeBlock",{language:e.source._codeBlockLanguage,forceValue:!0}),t.editing.view.focus()})),s.class="ck-code-block-dropdown",s.bind("isEnabled").to(r),(0,u.addListToDropdown)(s,(()=>this._getLanguageListItemDefinitions(o)),{role:"menu",ariaLabel:a}),s}))}_getLanguageListItemDefinitions(e){const n=this.editor.commands.get("codeBlock"),i=new t.Collection;for(const t of e){const e={type:"button",model:new u.ViewModel({_codeBlockLanguage:t.language,label:t.label,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(n,"value",(t=>t===e.model._codeBlockLanguage)),i.add(e)}return i}}class Tn extends e.Plugin{static get requires(){return[xn,Sn]}static get pluginName(){return"CodeBlock"}}var Mn=n(2468);class Bn extends e.Plugin{static get requires(){return[p.Clipboard,Ye.Enter,Mn.SelectAll,Ye.ShiftEnter,k.Typing,f.Undo]}static get pluginName(){return"Essentials"}}var Ln=n(1199);L()(Ln.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ln.Z.locals;class Nn extends u.View{constructor(n){super(n);const i=n.t;this.children=this.createCollection(),this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",((e,t)=>e>0&&!t)),this._findInputView=this._createInputField(i("Find in text…")),this._findPrevButtonView=this._createButton({label:i("Previous result"),class:"ck-button-prev",icon:e.icons.previousArrow,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:i("Next result"),class:"ck-button-next",icon:e.icons.previousArrow,keystroke:"F3",tooltip:!0}),this._replaceInputView=this._createInputField(i("Replace with…"),"ck-labeled-field-replace"),this._inputsDivView=this._createInputsDiv(),this._matchCaseSwitchView=this._createMatchCaseSwitch(),this._wholeWordsOnlySwitchView=this._createWholeWordsOnlySwitch(),this._advancedOptionsCollapsibleView=this._createAdvancedOptionsCollapsible(),this._replaceAllButtonView=this._createButton({label:i("Replace all"),class:"ck-button-replaceall",withText:!0}),this._replaceButtonView=this._createButton({label:i("Replace"),class:"ck-button-replace",withText:!0}),this._findButtonView=this._createButton({label:i("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._actionButtonsDivView=this._createActionButtonsDiv(),this._focusTracker=new t.FocusTracker,this._keystrokes=new t.KeystrokeHandler,this._focusables=new u.ViewCollection,this.focusCycler=new u.FocusCycler({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.addMany([this._inputsDivView,this._advancedOptionsCollapsibleView,this._actionButtonsDivView]),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,u.submitHandler)({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createInputsDiv(){const e=this.locale,t=e.t,n=new u.View(e);return this._findInputView.fieldView.on("input",(()=>{this.isDirty=!0})),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findPrevious:e})=>e)),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findNext:e})=>e)),this._injectFindResultsCounter(),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:e},t)=>e&&t)),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",((e,n)=>e||!n?"":t("Tip: Find some text first in order to replace it."))),n.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__inputs"]},children:[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView]}),n}_onFindButtonExecute(){if(this._textToFind)this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly});else{const e=this.t;this._findInputView.errorText=e("Text to find must not be empty.")}}_injectFindResultsCounter(){const e=this.locale,n=e.t,i=this.bindTemplate,o=new u.View(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",((e,t)=>n("%0 of %1",[e,t]))),o.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",i.if("isDirty","ck-hidden")]},children:[{text:i.to("_resultsCounterText")}]});const r=()=>{const n=this._findInputView.fieldView.element;if(!n||!(0,t.isVisible)(n))return;const i=new t.Rect(o.element).width,r="ltr"===e.uiLanguageDirection?"paddingRight":"paddingLeft";n.style[r]=i?`calc( 2 * var(--ck-spacing-standard) + ${i}px )`:""};this.on("change:_resultsCounterText",r,{priority:"low"}),this.on("change:isDirty",r,{priority:"low"}),this._findInputView.template.children[0].children.push(o)}_createAdvancedOptionsCollapsible(){const e=this.locale.t,t=new u.CollapsibleView(this.locale,[this._matchCaseSwitchView,this._wholeWordsOnlySwitchView]);return t.set({label:e("Advanced options"),isCollapsed:!0}),t}_createActionButtonsDiv(){const e=new u.View(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:e},t)=>e&&t)),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replaceAll:e},t)=>e&&t)),this._replaceButtonView.on("execute",(()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})})),this._replaceAllButtonView.on("execute",(()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()})),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),e.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__actions"]},children:[this._replaceAllButtonView,this._replaceButtonView,this._findButtonView]}),e}_createMatchCaseSwitch(){const e=this.locale.t,t=new u.SwitchButtonView(this.locale);return t.set({label:e("Match case"),withText:!0}),t.bind("isOn").to(this,"_matchCase"),t.on("execute",(()=>{this._matchCase=!this._matchCase,this.isDirty=!0})),t}_createWholeWordsOnlySwitch(){const e=this.locale.t,t=new u.SwitchButtonView(this.locale);return t.set({label:e("Whole words only"),withText:!0}),t.bind("isOn").to(this,"_wholeWordsOnly"),t.on("execute",(()=>{this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0})),t}_initFocusCycling(){[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._advancedOptionsCollapsibleView.buttonView,this._matchCaseSwitchView,this._wholeWordsOnlySwitchView,this._replaceAllButtonView,this._replaceButtonView,this._findButtonView].forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}_initKeystrokeHandling(){const e=e=>e.stopPropagation(),t=e=>{e.stopPropagation(),e.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",(e=>{t(e),this._findNextButtonView.fire("execute")})),this._keystrokes.set("shift+f3",(e=>{t(e),this._findPrevButtonView.fire("execute")})),this._keystrokes.set("enter",(e=>{const n=e.target;n===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e)):n!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),t(e))})),this._keystrokes.set("shift+enter",(e=>{e.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),t(e))})),this._keystrokes.set("arrowright",e),this._keystrokes.set("arrowleft",e),this._keystrokes.set("arrowup",e),this._keystrokes.set("arrowdown",e)}_createButton(e){const t=new u.ButtonView(this.locale);return t.set(e),t}_createInputField(e,t){const n=new u.LabeledFieldView(this.locale,u.createLabeledInputText);return n.label=e,n.class=t,n}}var jn='';class zn extends e.Plugin{static get requires(){return[u.Dialog]}static get pluginName(){return"FindAndReplaceUI"}constructor(e){super(e),e.config.define("findAndReplace.uiType","dialog"),this.formView=null}init(){const e=this.editor,t="dropdown"===e.config.get("findAndReplace.uiType"),n=e.commands.get("find");e.ui.componentFactory.add("findAndReplace",(()=>{let i;return t?(i=this._createDropdown(),i.bind("isEnabled").to(n)):(i=this._createDialogButton(),i.bind("isEnabled").to(n)),e.keystrokes.set("Ctrl+F",((t,o)=>{if(n.isEnabled){if(i instanceof u.DropdownView){const e=i.buttonView;e.isOn||e.fire("execute")}else i.isOn?e.plugins.get("Dialog").view.focus():i.fire("execute");o()}})),i}))}_createDropdown(){const e=this.editor,t=e.locale.t,n=(0,u.createDropdown)(e.locale);return n.once("change:isOpen",(()=>{this.formView=this._createFormView(),this.formView.children.add(new u.FormHeaderView(e.locale,{label:t("Find and replace")}),0),n.panelView.children.add(this.formView)})),n.on("change:isOpen",((e,t,n)=>{n?this._setupFormView():this.fire("searchReseted")}),{priority:"low"}),n.buttonView.set({icon:jn,label:t("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),n}_createDialogButton(){const e=this.editor,t=new u.ButtonView(e.locale),n=e.plugins.get("Dialog"),i=e.locale.t;return t.set({icon:jn,label:i("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),t.bind("isOn").to(n,"id",(e=>"findAndReplace"===e)),t.on("execute",(()=>{this.formView||(this.formView=this._createFormView()),t.isOn?n.hide():n.show({id:"findAndReplace",title:i("Find and replace"),content:this.formView,position:u.DialogViewPosition.EDITOR_TOP_SIDE,onShow:()=>{this._setupFormView()},onHide:()=>{this.fire("searchReseted")}})})),t}_createFormView(){const e=this.editor,t=new((0,u.CssTransitionDisablerMixin)(Nn))(e.locale),n=e.commands,i=this.editor.plugins.get("FindAndReplaceEditing").state,o={before:-1,same:0,after:1,different:1};t.bind("highlightOffset").to(i,"highlightedResult",(e=>e?Array.from(i.results).sort(((e,t)=>o[e.marker.getStart().compareWith(t.marker.getStart())])).indexOf(e)+1:0)),t.listenTo(i.results,"change",(()=>{t.matchCount=i.results.length}));const r=n.get("findNext"),s=n.get("findPrevious"),l=n.get("replace"),a=n.get("replaceAll");return t.bind("_areCommandsEnabled").to(r,"isEnabled",s,"isEnabled",l,"isEnabled",a,"isEnabled",((e,t,n,i)=>({findNext:e,findPrevious:t,replace:n,replaceAll:i}))),t.delegate("findNext","findPrevious","replace","replaceAll").to(this),t.on("change:isDirty",((e,t,n)=>{n&&this.fire("searchReseted")})),t}_setupFormView(){this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputView.fieldView.select(),this.formView.enableCssTransitions()}}class Vn extends e.Command{constructor(e,t){super(e),this.isEnabled=!0,this.affectsData=!1,this._state=t}execute(e,{matchCase:t,wholeWords:n}={}){const{editor:i}=this,{model:o}=i,r=i.plugins.get("FindAndReplaceUtils");let s;"string"==typeof e?(s=r.findByTextCallback(e,{matchCase:t,wholeWords:n}),this._state.searchText=e):s=e;const l=o.document.getRootNames().reduce(((e,t)=>r.updateFindResultFromRange(o.createRangeIn(o.document.getRoot(t)),o,s,e)),null);return this._state.clear(o),this._state.results.addMany(l),this._state.highlightedResult=l.get(0),"string"==typeof e&&(this._state.searchText=e),this._state.matchCase=!!t,this._state.matchWholeWords=!!n,{results:l,findCallback:s}}}class On extends e.Command{constructor(e,t){super(e),this.isEnabled=!0,this._state=t,this._isEnabledBasedOnSelection=!1}_replace(e,t){const{model:n}=this.editor,i=t.marker.getRange();n.canEditAt(i)&&n.change((o=>{if("$graveyard"===i.root.rootName)return void this._state.results.remove(t);let r={};for(const e of i.getItems())if(e.is("$text")||e.is("$textProxy")){r=e.getAttributes();break}n.insertContent(o.createText(e,r),i),this._state.results.has(t)&&this._state.results.remove(t)}))}}class Pn extends On{execute(e,t){this._replace(e,t)}}class Fn extends On{execute(e,n){const{editor:i}=this,{model:o}=i,r=i.plugins.get("FindAndReplaceUtils"),s=n instanceof t.Collection?n:o.document.getRootNames().reduce(((e,t)=>r.updateFindResultFromRange(o.createRangeIn(o.document.getRoot(t)),o,r.findByTextCallback(n,this._state),e)),null);s.length&&o.change((()=>{[...s].forEach((t=>{this._replace(e,t)}))}))}}class Rn extends e.Command{constructor(e,t){super(e),this.affectsData=!1,this._state=t,this.isEnabled=!1,this.listenTo(this._state.results,"change",(()=>{this.isEnabled=this._state.results.length>1}))}refresh(){this.isEnabled=this._state.results.length>1}execute(){const e=this._state.results,t=e.getIndex(this._state.highlightedResult),n=t+1>=e.length?0:t+1;this._state.highlightedResult=this._state.results.get(n)}}class Un extends Rn{execute(){const e=this._state.results.getIndex(this._state.highlightedResult),t=e-1<0?this._state.results.length-1:e-1;this._state.highlightedResult=this._state.results.get(t)}}class Hn extends((0,t.ObservableMixin)()){constructor(e){super(),this.set("results",new t.Collection),this.set("highlightedResult",null),this.set("searchText",""),this.set("replaceText",""),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",((t,{removed:n,index:i})=>{if(Array.from(n).length){let t=!1;if(e.change((i=>{for(const o of n)this.highlightedResult===o&&(t=!0),e.markers.has(o.marker.name)&&i.removeMarker(o.marker)})),t){const e=i>=this.results.length?0:i;this.highlightedResult=this.results.get(e)}}}))}clear(e){this.searchText="",e.change((t=>{if(this.highlightedResult){const n=this.highlightedResult.marker.name.split(":")[1],i=e.markers.get(`findResultHighlighted:${n}`);i&&t.removeMarker(i)}[...this.results].forEach((({marker:e})=>{t.removeMarker(e)}))})),this.results.clear()}}var Gn=function(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n{[...e].forEach((({type:e,item:s})=>{if("elementStart"===e&&n.schema.checkChild(s,"$text")){const e=i({item:s,text:this.rangeToText(n.createRangeIn(s))});if(!e)return;e.forEach((e=>{const n=`findResult:${(0,t.uid)()}`,i=o.addMarker(n,{usingOperation:!1,affectsData:!1,range:o.createRange(o.createPositionAt(s,e.start),o.createPositionAt(s,e.end))}),l=function(e,t){const n=e.find((({marker:e})=>t.getStart().isBefore(e.getStart())));return n?e.getIndex(n):e.length}(r,i);r.add({id:n,label:e.label,marker:i},l)}))}}))})),r}rangeToText(e){return Array.from(e.getItems()).reduce(((e,t)=>t.is("$text")||t.is("$textProxy")?e+t.data:`${e}\n`),"")}findByTextCallback(e,t){let n="gu";t.matchCase||(n+="i");let i=`(${o=e,(o=qn(o))&&Jn.test(o)?o.replace(Kn,"\\$&"):o})`;var o;if(t.wholeWords){const t="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+t).test(e)||(i=`(^|${t}|_)${i}`),new RegExp(t+"$").test(e)||(i=`${i}(?=_|${t}|$)`)}const r=new RegExp(i,n);return function({text:e}){return[...e.matchAll(r)].map(ei)}}}function ei(e){const t=e.length-1;let n=e.index;return 3===e.length&&(n+=e[1].length),{label:e[t],start:n,end:n+e[t].length}}var ti=function(){return Wt.Date.now()},ni=/\s/,ii=/^\s+/,oi=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&ni.test(e.charAt(t)););return t}(e)+1).replace(ii,""):e},ri=/^[-+]0x[0-9a-f]+$/i,si=/^0b[01]+$/i,li=/^0o[0-7]+$/i,ai=parseInt,ci=function(e){if("number"==typeof e)return e;if(Yn(e))return NaN;if(Be(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Be(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=oi(e);var n=si.test(e);return n||li.test(e)?ai(e.slice(2),n?2:8):ri.test(e)?NaN:+e},di=Math.max,ui=Math.min,mi=function(e,t,n){var i,o,r,s,l,a,c=0,d=!1,u=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=i,r=o;return i=o=void 0,c=t,s=e.apply(r,n)}function h(e){var n=e-a;return void 0===a||n>=t||n<0||u&&e-c>=r}function p(){var e=ti();if(h(e))return b(e);l=setTimeout(p,function(e){var n=t-(e-a);return u?ui(n,r-(e-c)):n}(e))}function b(e){return l=void 0,m&&i?g(e):(i=o=void 0,s)}function f(){var e=ti(),n=h(e);if(i=arguments,o=this,a=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(p,t),d?g(e):s}(a);if(u)return clearTimeout(l),l=setTimeout(p,t),g(a)}return void 0===l&&(l=setTimeout(p,t)),s}return t=ci(t)||0,Be(n)&&(d=!!n.leading,r=(u="maxWait"in n)?di(ci(n.maxWait)||0,t):r,m="trailing"in n?!!n.trailing:m),f.cancel=function(){void 0!==l&&clearTimeout(l),c=0,i=a=o=l=void 0},f.flush=function(){return void 0===l?s:b(ti())},f},gi=n(6108);L()(gi.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gi.Z.locals;class hi extends e.Plugin{static get requires(){return[Xn]}static get pluginName(){return"FindAndReplaceEditing"}init(){this._activeResults=null,this.state=new Hn(this.editor.model),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",((e,t,n,i)=>{const{model:o}=this.editor;o.change((e=>{if(i){const t=i.marker.name.split(":")[1],n=o.markers.get(`findResultHighlighted:${t}`);n&&e.removeMarker(n)}if(n){const t=n.marker.name.split(":")[1];e.addMarker(`findResultHighlighted:${t}`,{usingOperation:!1,affectsData:!1,range:n.marker.getRange()})}}))}));const e=mi(((e,n,i)=>{if(i){const e=this.editor.editing.view.domConverter,n=this.editor.editing.mapper.toViewRange(i.marker.getRange());(0,t.scrollViewportToShowTarget)({target:e.viewRangeToDom(n),viewportOffset:40})}}).bind(this),32);this.listenTo(this.state,"change:highlightedResult",e,{priority:"low"}),this.listenTo(this.editor,"destroy",e.cancel)}find(e){const{editor:t}=this,{model:n}=t,{findCallback:i,results:o}=t.execute("find",e);return this._activeResults=o,this.listenTo(n.document,"change:data",(()=>function(e,t,n){const i=new Set,o=new Set,r=t.model;r.document.differ.getChanges().forEach((e=>{"$text"===e.name||r.schema.isInline(e.position.nodeAfter)?(i.add(e.position.parent),[...r.markers.getMarkersAtPosition(e.position)].forEach((e=>{o.add(e.name)}))):"insert"===e.type&&i.add(e.position.nodeAfter)})),r.document.differ.getChangedMarkers().forEach((({name:e,data:{newRange:t}})=>{t&&"$graveyard"===t.start.root.rootName&&o.add(e)})),i.forEach((e=>{[...r.markers.getMarkersIntersectingRange(r.createRangeIn(e))].forEach((e=>o.add(e.name)))})),r.change((t=>{o.forEach((n=>{e.has(n)&&e.remove(n),t.removeMarker(n)}))})),i.forEach((i=>{t.plugins.get("FindAndReplaceUtils").updateFindResultFromRange(r.createRangeOn(i),r,n,e)}))}(this._activeResults,t,i))),this._activeResults}stop(){this._activeResults&&(this.stopListening(this.editor.model.document),this.state.clear(this.editor.model),this._activeResults=null)}_defineCommands(){this.editor.commands.add("find",new Vn(this.editor,this.state)),this.editor.commands.add("findNext",new Rn(this.editor,this.state)),this.editor.commands.add("findPrevious",new Un(this.editor,this.state)),this.editor.commands.add("replace",new Pn(this.editor,this.state)),this.editor.commands.add("replaceAll",new Fn(this.editor,this.state))}_defineConverters(){const{editor:e}=this;e.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:e})=>{const[,t]=e.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":t}}}}),e.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:e})=>{const[,t]=e.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":t}}}})}}class pi extends e.Plugin{static get requires(){return[hi,zn]}static get pluginName(){return"FindAndReplace"}init(){const e=this.editor.plugins.get("FindAndReplaceUI"),t=this.editor.plugins.get("FindAndReplaceEditing"),n=t.state;e.on("findNext",((e,t)=>{t?(n.searchText=t.searchText,this.editor.execute("find",t.searchText,t)):this.editor.execute("findNext")})),e.on("findPrevious",((e,t)=>{t&&n.searchText!==t.searchText?this.editor.execute("find",t.searchText):this.editor.execute("findPrevious")})),e.on("replace",((e,t)=>{n.searchText!==t.searchText&&this.editor.execute("find",t.searchText);const i=n.highlightedResult;i&&this.editor.execute("replace",t.replaceText,i)})),e.on("replaceAll",((e,t)=>{n.searchText!==t.searchText&&this.editor.execute("find",t.searchText),this.editor.execute("replaceAll",t.replaceText,n.results)})),e.on("searchReseted",(()=>{n.clear(this.editor.model),t.stop()}))}}class bi extends e.Command{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,n=t.document.selection,i=e.value,o=e.batch,r=e=>{if(n.isCollapsed)i?e.setSelectionAttribute(this.attributeKey,i):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)i?e.setAttribute(this.attributeKey,i,t):e.removeAttribute(this.attributeKey,t)}};o?t.enqueueChange(o,(e=>{r(e)})):t.change((e=>{r(e)}))}}const fi="fontSize",ki="fontFamily",Ai="fontColor",wi="fontBackgroundColor";function Ci(e,t){const n={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)n.model.values.push(e.model),n.view[e.model]=e.view,e.upcastAlso&&(n.upcastAlso[e.model]=e.upcastAlso);return n}function vi(e){return t=>t.getStyle(e).replace(/\s/g,"")}function yi(e){return(t,{writer:n})=>n.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class _i extends bi{constructor(e){super(e,ki)}}function xi(e){return e.map(Ii).filter((e=>void 0!==e))}function Ii(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),n=t[0],i=t.map(Di).join(", ");return{title:n,model:i,view:{name:"span",styles:{"font-family":i},priority:7}}}(e):void 0}function Di(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class Ei extends e.Plugin{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define(ki,{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:ki}),e.model.schema.setAttributeProperties(ki,{isFormatting:!0,copyOnEnter:!0});const t=xi(e.config.get("fontFamily.options")).filter((e=>e.model)),n=Ci(ki,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add(ki,new _i(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:ki,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:ki,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:ki,value:e=>e.getAttribute("face")}})}}class Si extends e.Plugin{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,n=e.t,i=this._getLocalizedOptions(),o=e.commands.get(ki),r=n("Font Family");e.ui.componentFactory.add(ki,(n=>{const s=(0,u.createDropdown)(n);return(0,u.addListToDropdown)(s,(()=>function(e,n){const i=new t.Collection;for(const t of e){const e={type:"button",model:new u.ViewModel({commandName:ki,commandParam:t.model,label:t.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(n,"value",(e=>e===t.model||!(!e||!t.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===t.model.toLowerCase())),t.view&&"string"!=typeof t.view&&t.view.styles&&e.model.set("labelStyle",`font-family: ${t.view.styles["font-family"]}`),i.add(e)}return i}(i,o)),{role:"menu",ariaLabel:r}),s.buttonView.set({label:r,icon:'',tooltip:!0}),s.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),s.bind("isEnabled").to(o),this.listenTo(s,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),s}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return xi(e.config.get(ki).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class Ti extends e.Plugin{static get requires(){return[Ei,Si]}static get pluginName(){return"FontFamily"}}class Mi extends bi{constructor(e){super(e,fi)}}function Bi(e){return e.map((e=>function(e){if("number"==typeof e&&(e=String(e)),"object"==typeof e&&((n=e).title&&n.model&&n.view))return Ni(e);var n;const i=function(e){return"string"==typeof e?Li[e]:Li[e.model]}(e);return i?Ni(i):"default"===e?{model:void 0,title:"Default"}:function(e){let n;if("object"==typeof e){if(!e.model)throw new t.CKEditorError("font-size-invalid-definition",null,e);n=parseFloat(e.model)}else n=parseFloat(e);return isNaN(n)}(e)?void 0:function(e){return"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`}),e.view={name:"span",styles:{"font-size":e.model}},Ni(e)}(e)}(e))).filter((e=>void 0!==e))}const Li={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 Ni(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const ji=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class zi extends e.Plugin{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(fi,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:fi}),e.model.schema.setAttributeProperties(fi,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),n=Bi(this.editor.config.get("fontSize.options")).filter((e=>e.model)),i=Ci(fi,n);t?(this._prepareAnyValueConverters(i),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(i),e.commands.add(fi,new Mi(e))}_prepareAnyValueConverters(e){const n=this.editor,i=e.model.values.filter((e=>!(0,b.isLength)(String(e))&&!(0,b.isPercentage)(String(e))));if(i.length)throw new t.CKEditorError("font-size-invalid-use-of-named-presets",null,{presets:i});n.conversion.for("downcast").attributeToElement({model:fi,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),n.conversion.for("upcast").elementToAttribute({model:{key:fi,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:fi,value:e=>{const t=e.getAttribute("size"),n="-"===t[0]||"+"===t[0];let i=parseInt(t,10);n&&(i=3+i);const o=ji.length-1,r=Math.min(Math.max(i,0),o);return ji[r]}}})}}var Vi=n(9759);L()(Vi.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Vi.Z.locals;class Oi extends e.Plugin{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,n=e.t,i=this._getLocalizedOptions(),o=e.commands.get(fi),r=n("Font Size");e.ui.componentFactory.add(fi,(n=>{const s=(0,u.createDropdown)(n);return(0,u.addListToDropdown)(s,(()=>function(e,n){const i=new t.Collection;for(const t of e){const e={type:"button",model:new u.ViewModel({commandName:fi,commandParam:t.model,label:t.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};t.view&&"string"!=typeof t.view&&(t.view.styles&&e.model.set("labelStyle",`font-size:${t.view.styles["font-size"]}`),t.view.classes&&e.model.set("class",`${e.model.class} ${t.view.classes}`)),e.model.bind("isOn").to(n,"value",(e=>e===t.model)),i.add(e)}return i}(i,o)),{role:"menu",ariaLabel:r}),s.buttonView.set({label:r,icon:'',tooltip:!0}),s.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),s.bind("isEnabled").to(o),this.listenTo(s,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),s}))}_getLocalizedOptions(){const e=this.editor,t=e.t,n={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return Bi(e.config.get(fi).options).map((e=>{const t=n[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class Pi extends e.Plugin{static get requires(){return[zi,Oi]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return Bi(e)}}class Fi extends bi{constructor(e){super(e,Ai)}}class Ri extends e.Plugin{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(Ai,{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:Ai,value:vi("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Ai,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:Ai,view:yi("color")}),e.commands.add(Ai,new Fi(e)),e.model.schema.extend("$text",{allowAttributes:Ai}),e.model.schema.setAttributeProperties(Ai,{isFormatting:!0,copyOnEnter:!0})}}class Ui extends e.Plugin{constructor(e,{commandName:t,componentName:n,icon:i,dropdownLabel:o}){super(e),this.commandName=t,this.componentName=n,this.icon=i,this.dropdownLabel=o,this.columns=e.config.get(`${this.componentName}.columns`),this.colorSelectorView=void 0}init(){const e=this.editor,t=e.locale,n=t.t,i=e.commands.get(this.commandName),o=e.config.get(this.componentName),r=(0,u.normalizeColorOptions)(o.colors),s=(0,u.getLocalizedColorOptions)(t,r),l=o.documentColors,a=!1!==o.colorPicker;e.ui.componentFactory.add(this.componentName,(t=>{const r=(0,u.createDropdown)(t);let c=!1;return this.colorSelectorView=function({dropdownView:e,colors:t,columns:n,removeButtonLabel:i,colorPickerLabel:o,documentColorsLabel:r,documentColorsCount:s,colorPickerViewConfig:l}){const a=e.locale,c=new u.ColorSelectorView(a,{colors:t,columns:n,removeButtonLabel:i,colorPickerLabel:o,documentColorsLabel:r,documentColorsCount:s,colorPickerViewConfig:l});return e.colorSelectorView=c,e.panelView.children.add(c),c}({dropdownView:r,colors:s.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:n("Remove color"),colorPickerLabel:n("Color picker"),documentColorsLabel:0!==l?n("Document colors"):"",documentColorsCount:void 0===l?this.columns:l,colorPickerViewConfig:!!a&&(o.colorPicker||{})}),this.colorSelectorView.bind("selectedColor").to(i,"value"),r.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),r.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),r.bind("isEnabled").to(i),this.colorSelectorView.on("execute",((t,n)=>{r.isOpen&&e.execute(this.commandName,{value:n.value,batch:this._undoStepBatch}),"colorPicker"!==n.source&&e.editing.view.focus(),"colorPickerSaveButton"===n.source&&(r.isOpen=!1)})),this.colorSelectorView.on("colorPicker:show",(()=>{this._undoStepBatch=e.model.createBatch()})),this.colorSelectorView.on("colorPicker:cancel",(()=>{this._undoStepBatch.operations.length&&(r.isOpen=!1,e.execute("undo",this._undoStepBatch)),e.editing.view.focus()})),r.on("change:isOpen",((t,n,i)=>{c||(c=!0,r.colorSelectorView.appendUI()),i&&(0!==l&&this.colorSelectorView.updateDocumentColors(e.model,this.componentName),this.colorSelectorView.updateSelectedColors(),this.colorSelectorView.showColorGridsFragment())})),(0,u.focusChildOnDropdownOpen)(r,(()=>r.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find((e=>e.isOn)))),r}))}}class Hi extends Ui{constructor(e){const t=e.locale.t;super(e,{commandName:Ai,componentName:Ai,icon:'',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class Gi extends e.Plugin{static get requires(){return[Ri,Hi]}static get pluginName(){return"FontColor"}}class Wi extends bi{constructor(e){super(e,wi)}}class Yi extends e.Plugin{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(wi,{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(b.addBackgroundRules),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:wi,value:vi("background-color")}}),e.conversion.for("downcast").attributeToElement({model:wi,view:yi("background-color")}),e.commands.add(wi,new Wi(e)),e.model.schema.extend("$text",{allowAttributes:wi}),e.model.schema.setAttributeProperties(wi,{isFormatting:!0,copyOnEnter:!0})}}class Zi extends Ui{constructor(e){const t=e.locale.t;super(e,{commandName:wi,componentName:wi,icon:'',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class Qi extends e.Plugin{static get requires(){return[Yi,Zi]}static get pluginName(){return"FontBackgroundColor"}}class $i extends e.Plugin{static get requires(){return[Ti,Pi,Gi,Qi]}static get pluginName(){return"Font"}}var qi=function(e,t){return e===t||e!=e&&t!=t},Ki=function(e,t){for(var n=e.length;n--;)if(qi(e[n][0],t))return n;return-1},Ji=Array.prototype.splice;function Xi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Xi.prototype.set=function(e,t){var n=this.__data__,i=Ki(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var eo,to=Xi,no=function(e){if(!Be(e))return!1;var t=Xt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},io=Wt["__core-js_shared__"],oo=(eo=/[^.]+$/.exec(io&&io.keys&&io.keys.IE_PROTO||""))?"Symbol(src)_1."+eo:"",ro=Function.prototype.toString,so=function(e){if(null!=e){try{return ro.call(e)}catch(e){}try{return e+""}catch(e){}}return""},lo=/^\[object .+?Constructor\]$/,ao=Function.prototype,co=Object.prototype,uo=ao.toString,mo=co.hasOwnProperty,go=RegExp("^"+uo.call(mo).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ho=function(e){return!(!Be(e)||(t=e,oo&&oo in t))&&(no(e)?go:lo).test(so(e));var t},po=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ho(n)?n:void 0},bo=po(Wt,"Map"),fo=po(Object,"create"),ko=Object.prototype.hasOwnProperty,Ao=Object.prototype.hasOwnProperty;function wo(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Wo={};Wo["[object Float32Array]"]=Wo["[object Float64Array]"]=Wo["[object Int8Array]"]=Wo["[object Int16Array]"]=Wo["[object Int32Array]"]=Wo["[object Uint8Array]"]=Wo["[object Uint8ClampedArray]"]=Wo["[object Uint16Array]"]=Wo["[object Uint32Array]"]=!0,Wo["[object Arguments]"]=Wo["[object Array]"]=Wo["[object ArrayBuffer]"]=Wo["[object Boolean]"]=Wo["[object DataView]"]=Wo["[object Date]"]=Wo["[object Error]"]=Wo["[object Function]"]=Wo["[object Map]"]=Wo["[object Number]"]=Wo["[object Object]"]=Wo["[object RegExp]"]=Wo["[object Set]"]=Wo["[object String]"]=Wo["[object WeakMap]"]=!1;var Yo=function(e){return function(t){return e(t)}},Zo="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qo=Zo&&"object"==typeof module&&module&&!module.nodeType&&module,$o=Qo&&Qo.exports===Zo&&Ht.process,qo=function(){try{return Qo&&Qo.require&&Qo.require("util").types||$o&&$o.binding&&$o.binding("util")}catch(e){}}(),Ko=qo&&qo.isTypedArray,Jo=Ko?Yo(Ko):function(e){return Ut(e)&&Go(e.length)&&!!Wo[Xt(e)]},Xo=Object.prototype.hasOwnProperty,er=function(e,t){var n=Wn(e),i=!n&&Vo(e),o=!n&&!i&&Ro(e),r=!n&&!i&&!o&&Jo(e),s=n||i||o||r,l=s?function(e,t){for(var n=-1,i=Array(e);++n=i?e:function(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++in.writer.createElement(e,{htmlContent:t.getCustomProperty("$rawContent")})}function ll(e,{view:t,isInline:n}){const i=e.t;return(e,{writer:o})=>{const r=i("HTML object"),s=al(t,e,o),l=e.getAttribute(rl(t));o.addClass("html-object-embed__content",s),l&&il(o,l,s);const a=o.createContainerElement(n?"span":"div",{class:"html-object-embed","data-html-object-embed-label":r},s);return(0,A.toWidget)(a,o,{label:r})}}function al(e,t,n){return n.createRawElement(e,null,((e,n)=>{n.setContentOf(e,t.getAttribute("htmlContent"))}))}function cl({view:e,model:t,allowEmpty:n},i){return t=>{t.on(`element:${e}`,((e,t,r)=>{let s=i.processViewAttributes(t.viewItem,r);if(s||r.consumable.test(t.viewItem,{name:!0})){if(s=s||{},r.consumable.consume(t.viewItem,{name:!0}),t.modelRange||(t=Object.assign(t,r.convertChildren(t.viewItem,t.modelCursor))),n&&t.modelRange.isCollapsed&&Object.keys(s).length){const e=r.writer.createElement("htmlEmptyElement");if(!r.safeInsert(e,t.modelCursor))return;const n=r.getSplitParts(e);return t.modelRange=r.writer.createRange(t.modelRange.start,r.writer.createPositionAfter(n[n.length-1])),r.updateConversionResult(e,t),void o(e,s,r)}for(const e of t.modelRange.getItems())o(e,s,r)}}),{priority:"low"})};function o(e,n,i){if(i.schema.checkAttribute(e,t)){const o=function(e,t){const n=as(e,5);let i="attributes";for(i in t)n[i]="classes"==i?Array.from(new Set([...e[i]||[],...t[i]])):{...e[i],...t[i]};return n}(n,e.getAttribute(t)||{});i.writer.setAttribute(t,o,e)}}}function dl({model:e,view:t},n){return(i,{writer:o,consumable:r})=>{if(!i.hasAttribute(e))return null;const s=o.createContainerElement(t),l=i.getAttribute(e);return r.consume(i,`attribute:${e}`),il(o,l,s),s.getFillerOffset=()=>null,n?(0,A.toWidget)(s,o):s}}function ul({priority:e,view:t}){return(n,i)=>{if(!n)return;const{writer:o}=i,r=o.createAttributeElement(t,null,{priority:e});return il(o,n,r),r}}function ml({view:e},t){return n=>{n.on(`element:${e}`,((e,n,i)=>{if(!n.modelRange||n.modelRange.isCollapsed)return;const o=t.processViewAttributes(n.viewItem,i);o&&i.writer.setAttribute(rl(n.viewItem.name),o,n.modelRange)}),{priority:"low"})}}function gl({view:e,model:t}){return n=>{n.on(`attribute:${rl(e)}:${t}`,((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:i,attributeNewValue:o}=t;nl(n.writer,i,o,n.mapper.toViewElement(t.item))}))}}var hl,pl,bl,fl,kl=[{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}}],Al=[{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}}],wl=function(e,t,n){(void 0!==n&&!qi(e[t],n)||void 0===n&&!(t in e))&&Eo(e,t,n)},Cl=function(e,t,n){for(var i=-1,o=Object(e),r=n(e),s=r.length;s--;){var l=r[++i];if(!1===t(o[l],l,o))break}return e},vl=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},yl=function(e,t,n,i,o,r,s){var l,a=vl(e,n),c=vl(t,n),d=s.get(c);if(d)wl(e,n,d);else{var u=r?r(a,c,n+"",e,t,s):void 0,m=void 0===u;if(m){var g=Wn(c),h=!g&&Ro(c),p=!g&&!h&&Jo(c);u=c,g||h||p?Wn(a)?u=a:Ut(l=a)&&rr(l)?u=pr(a):h?(m=!1,u=hr(c,!0)):p?(m=!1,u=Zr(c,!0)):u=[]:an(c)||Vo(c)?(u=a,Vo(a)?u=function(e){return Mo(e,cr(e))}(a):Be(a)&&!no(a)||(u=Kr(c))):m=!1}m&&(s.set(c,u),o(u,c,i,r,s),s.delete(c)),wl(e,n,u)}},_l=function e(t,n,i,o,r){t!==n&&Cl(n,(function(s,l){if(r||(r=new Io),Be(s))yl(t,n,l,i,e,o,r);else{var a=o?o(vl(t,l),s,l+"",t,n,r):void 0;void 0===a&&(a=s),wl(t,l,a)}}),cr)},xl=Math.max,Il=Do?function(e,t){return Do(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Le,Dl=Date.now,El=(hl=Il,pl=0,bl=0,function(){var e=Dl(),t=16-(e-bl);if(bl=e,t>0){if(++pl>=800)return arguments[0]}else pl=0;return hl.apply(void 0,arguments)}),Sl=function(e,t){return El(function(e,t,n){return t=xl(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,r=xl(i.length-t,0),s=Array(r);++o1?t[i-1]:void 0,r=i>2?t[2]:void 0;for(o=fl.length>3&&"function"==typeof o?(i--,o):void 0,r&&function(e,t,n){if(!Be(n))return!1;var i=typeof t;return!!("number"==i?rr(n)&&Ho(t,n.length):"string"==i&&t in n)&&qi(n[t],e)}(t[0],t[1],r)&&(o=i<3?void 0:o,i=1),e=Object(e);++nt.model==e))}_getMatchingViewDefinitions(e){return this._definitions.filter((t=>t.view&&function(e,t){return"string"==typeof e?e===t:e instanceof RegExp&&e.test(t)}(e,t.view)))}*_getReferences(e){const n=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter((t=>t.model==e));for(const{modelSchema:o}of i)if(o)for(const i of n)for(const n of(0,t.toArray)(o[i]||[])){const t=this._definitions.filter((e=>e.model==n));for(const i of t)n!==e&&(yield*this._getReferences(i.model),yield i)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter((([,t])=>t.model==e.model));if(0!=t.length)for(const[n,i]of t)this._definitions[n]=Tl({},i,e,((e,t)=>Array.isArray(e)?e.concat(t):void 0));else this._definitions.push(e)}}var Bl=function(e){return e!=e},Ll=function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,o=e.length;++i-1;)l!==e&&jl.call(l,a,1),jl.call(e,a,1);return e}(e,t):e})),Vl=n(9945);L()(Vl.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Vl.Z.locals;class Ol extends e.Plugin{constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new b.Matcher,this._disallowedAttributes=new b.Matcher,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get requires(){return[Ml,A.Widget]}loadAllowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,n=Hl(t);this.allowElement(e),n.forEach((e=>this.allowAttributes(e)))}}loadDisallowedConfig(e){for(const t of e){const e=t.name||/[\s\S]+/,n=Hl(t);0==n.length?this.disallowElement(e):n.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 Pl(e,t,this._disallowedAttributes),Pl(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:t.priorities.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",(()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)}),{priority:t.priorities.highest+1})}_registerElementHandlers(){this.on("register",((e,n)=>{const i=this.editor.model.schema;if(n.isObject&&!i.isRegistered(n.model))this._registerObjectElement(n);else if(n.isBlock)this._registerBlockElement(n);else{if(!n.isInline)throw new t.CKEditorError("data-filter-invalid-definition",null,n);this._registerInlineElement(n)}e.stop()}),{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer((t=>{const n=e.document.differ.getChanges();let i=!1;const o=this._getCoupledAttributesMap();for(const e of n){if("attribute"!=e.type||null!==e.attributeNewValue)continue;const n=o.get(e.attributeKey);if(n)for(const{item:o}of e.range.getWalker())for(const e of n)o.hasAttribute(e)&&(t.removeAttribute(e,o),i=!0)}return i})),this.listenTo(t,"change:attribute",((n,{attributeKeys:i})=>{const o=new Set,r=this._getCoupledAttributesMap();for(const e of i){if(t.hasAttribute(e))continue;const n=r.get(e);if(n)for(const e of n)t.hasAttribute(e)&&o.add(e)}0!=o.size&&e.change((e=>{for(const t of o)e.removeSelectionAttribute(t)}))}))}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer((t=>{const n=e.document.differ.getChanges();let i=!1;for(const o of n)if("insert"===o.type&&"$text"!==o.name)for(const n of o.attributes.keys())n.startsWith("html")&&n.endsWith("Attributes")&&(e.schema.checkAttribute(o.name,n)||(t.removeAttribute(n,o.position.nodeAfter),i=!0));return i}))}_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 n=this.editor,i=n.model.schema,o=n.conversion,{view:r,model:s}=e;i.register(s,e.modelSchema),r&&(i.extend(e.model,{allowAttributes:[rl(r),"htmlContent"]}),n.data.registerRawContentMatcher({name:r}),o.for("upcast").elementToElement({view:r,model:sl(e),converterPriority:t.priorities.low+2}),o.for("upcast").add(ml(e,this)),o.for("editingDowncast").elementToStructure({model:{name:s,attributes:[rl(r)]},view:ll(n,e)}),o.for("dataDowncast").elementToElement({model:s,view:(e,{writer:t})=>al(r,e,t)}),o.for("dataDowncast").add(gl(e)))}_registerBlockElement(e){const n=this.editor,i=n.model.schema,o=n.conversion,{view:r,model:s}=e;if(!i.isRegistered(e.model)){if(i.register(e.model,e.modelSchema),!r)return;o.for("upcast").elementToElement({model:s,view:r,converterPriority:t.priorities.low+2}),o.for("downcast").elementToElement({model:s,view:r})}r&&(i.extend(e.model,{allowAttributes:rl(r)}),o.for("upcast").add(ml(e,this)),o.for("downcast").add(gl(e)))}_registerInlineElement(e){const t=this.editor,n=t.model.schema,i=t.conversion,o=e.model;e.appliesToBlock||(n.extend("$text",{allowAttributes:o}),e.attributeProperties&&n.setAttributeProperties(o,e.attributeProperties),i.for("upcast").add(cl(e,this)),i.for("downcast").attributeToElement({model:o,view:ul(e)}),e.allowEmpty&&(n.setAttributeProperties(o,{copyFromObject:!1}),n.isRegistered("htmlEmptyElement")||n.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"}),t.data.htmlProcessor.domConverter.registerInlineObjectMatcher((t=>t.name==e.view&&t.isEmpty&&Array.from(t.getAttributeKeys()).length?{name:!0}:null)),i.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:dl(e,!0)}),i.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:dl(e)})))}}function Pl(e,n,i){const o=function(e,{consumable:t},n){const i=n.matchAll(e)||[],o=[];for(const n of i)Fl(t,e,n),delete n.match.name,t.consume(e,n.match),o.push(n);return o}(e,n,i),{attributes:r,styles:s,classes:l}=function(e){const t={attributes:new Set,classes:new Set,styles:new Set};for(const n of e)for(const e in t)(n.match[e]||[]).forEach((n=>t[e].add(n)));return t}(o),a={};if(r.size)for(const e of r)(0,t.isValidAttributeName)(e)||r.delete(e);return r.size&&(a.attributes=Rl(r,(t=>e.getAttribute(t)))),s.size&&(a.styles=Rl(s,(t=>e.getStyle(t)))),l.size&&(a.classes=Array.from(l)),Object.keys(a).length?a:null}function Fl(e,t,n){for(const i of["attributes","classes","styles"]){const o=n.match[i];if(o)for(const n of Array.from(o))e.test(t,{[i]:[n]})||zl(o,n)}}function Rl(e,t){const n={};for(const i of e)void 0!==t(i)&&(n[i]=t(i));return n}function Ul(e,t){const{name:n}=e,i=e[t];return an(i)?Object.entries(i).map((([e,i])=>({name:n,[t]:{[e]:i}}))):Array.isArray(i)?i.map((e=>({name:n,[t]:[e]}))):[e]}function Hl(e){const{name:t,attributes:n,classes:i,styles:o}=e,r=[];return n&&r.push(...Ul({name:t,attributes:n},"attributes")),i&&r.push(...Ul({name:t,classes:i},"classes")),o&&r.push(...Ul({name:t,styles:o},"styles")),r}class Gl extends e.Plugin{static get requires(){return[Ol]}static get pluginName(){return"CodeBlockElementSupport"}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(Ol);e.on("register:pre",((t,n)=>{if("codeBlock"!==n.model)return;const i=this.editor,o=i.model.schema,r=i.conversion;o.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),r.for("upcast").add(function(e){return t=>{t.on("element:code",((t,n,i)=>{const o=n.viewItem,r=o.parent;function s(t,o){const r=e.processViewAttributes(t,i);r&&i.writer.setAttribute(o,r,n.modelRange)}r&&r.is("element","pre")&&(s(r,"htmlPreAttributes"),s(o,"htmlContentAttributes"))}),{priority:"low"})}}(e)),r.for("downcast").add((e=>{e.on("attribute:htmlPreAttributes:codeBlock",((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:i,attributeNewValue:o}=t,r=n.mapper.toViewElement(t.item).parent;nl(n.writer,i,o,r)})),e.on("attribute:htmlContentAttributes:codeBlock",((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:i,attributeNewValue:o}=t,r=n.mapper.toViewElement(t.item);nl(n.writer,i,o,r)}))})),t.stop()}))}}class Wl extends e.Plugin{static get requires(){return[Ol]}static get pluginName(){return"DualContentModelElementSupport"}init(){this.editor.plugins.get(Ol).on("register",((e,n)=>{const i=n,o=this.editor,r=o.model.schema,s=o.conversion;if(!i.paragraphLikeModel)return;if(r.isRegistered(i.model)||r.isRegistered(i.paragraphLikeModel))return;const l={model:i.paragraphLikeModel,view:i.view};r.register(i.model,i.modelSchema),r.register(l.model,{inheritAllFrom:"$block"}),s.for("upcast").elementToElement({view:i.view,model:(e,{writer:t})=>this._hasBlockContent(e)?t.createElement(i.model):t.createElement(l.model),converterPriority:t.priorities.low+.5}),s.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),s.for("downcast").elementToElement({view:l.view,model:l.model}),this._addAttributeConversion(l),e.stop()}))}_hasBlockContent(e){const t=this.editor.editing.view,n=t.domConverter.blockElements;for(const i of t.createRangeIn(e).getItems())if(i.is("element")&&n.includes(i.name))return!0;return!1}_addAttributeConversion(e){const t=this.editor,n=t.conversion,i=t.plugins.get(Ol);t.model.schema.extend(e.model,{allowAttributes:rl(e.view)}),n.for("upcast").add(ml(e,i)),n.for("downcast").add(gl(e))}}class Yl extends e.Plugin{static get requires(){return[Ml,Ye.Enter]}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 n=e.plugins.get(Ml),i=[];for(const e of t)"model"in e&&"view"in e&&(n.registerBlockElement({view:e.view,model:e.model}),i.push(e.model));n.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:i}})}}function Zl(e,t,n){const i=e.createRangeOn(t);for(const{item:e}of i.getWalker())if(e.is("element",n))return e}class Ql extends e.Plugin{static get requires(){return[Ol]}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,n=e.conversion,i=e.plugins.get(Ol);i.on("register:figure",(()=>{n.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,n,i)=>{const o=n.viewItem;if(!n.modelRange||!o.hasClass("image"))return;const r=e.processViewAttributes(o,i);r&&i.writer.setAttribute("htmlFigureAttributes",r,n.modelRange)}),{priority:"low"})}}(i))})),i.on("register:img",((o,r)=>{"imageBlock"!==r.model&&"imageInline"!==r.model||(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),n.for("upcast").add(function(e){return t=>{t.on("element:img",((t,n,i)=>{if(!n.modelRange)return;const o=n.viewItem,r=e.processViewAttributes(o,i);r&&i.writer.setAttribute("htmlImgAttributes",r,n.modelRange)}),{priority:"low"})}}(i)),n.for("downcast").add((e=>{function t(t,n){e.on(`attribute:${n}:imageBlock`,((e,n,i)=>{if(!i.consumable.test(n.item,e.name))return;const{attributeOldValue:o,attributeNewValue:r}=n,s=i.mapper.toViewElement(n.item),l=Zl(i.writer,s,t);l&&(nl(i.writer,o,r,l),i.consumable.consume(n.item,e.name))}),{priority:"low"}),"a"===t&&e.on("attribute:linkHref:imageBlock",((e,t,n)=>{if(!n.consumable.consume(t.item,"attribute:htmlLinkAttributes:imageBlock"))return;const i=n.mapper.toViewElement(t.item),o=Zl(n.writer,i,"a");il(n.writer,t.item.getAttribute("htmlLinkAttributes"),o)}),{priority:"low"})}var n;n="htmlImgAttributes",e.on(`attribute:${n}:imageInline`,((e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:i,attributeNewValue:o}=t,r=n.mapper.toViewElement(t.item);nl(n.writer,i,o,r)}),{priority:"low"}),t("img","htmlImgAttributes"),t("figure","htmlFigureAttributes"),t("a","htmlLinkAttributes")})),e.plugins.has("LinkImage")&&n.for("upcast").add(function(e,t){const n=t.plugins.get("ImageUtils");return t=>{t.on("element:a",((t,i,o)=>{const r=i.viewItem;if(!n.findViewImgElement(r))return;const s=i.modelCursor.parent;if(!s.is("element","imageBlock"))return;const l=e.processViewAttributes(r,o);l&&o.writer.setAttribute("htmlLinkAttributes",l,s)}),{priority:"low"})}}(i,e)),o.stop())}))}}class $l extends e.Plugin{static get requires(){return[Ol]}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,n=e.conversion,i=this.editor.plugins.get(Ol),o=this.editor.plugins.get(Ml),r=e.config.get("mediaEmbed.elementName");o.registerBlockElement({model:"media",view:r}),i.on("register:figure",(()=>{n.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,n,i)=>{const o=n.viewItem;if(!n.modelRange||!o.hasClass("media"))return;const r=e.processViewAttributes(o,i);r&&i.writer.setAttribute("htmlFigureAttributes",r,n.modelRange)}),{priority:"low"})}}(i))})),i.on(`register:${r}`,((e,o)=>{"media"===o.model&&(t.extend("media",{allowAttributes:[rl(r),"htmlFigureAttributes"]}),n.for("upcast").add(function(e,t){const n=(n,i,o)=>{!function(t,n){const r=e.processViewAttributes(t,o);r&&o.writer.setAttribute(n,r,i.modelRange)}(i.viewItem,rl(t))};return e=>{e.on(`element:${t}`,n,{priority:"low"})}}(i,r)),n.for("dataDowncast").add(function(e){return t=>{function n(e,n){t.on(`attribute:${n}:media`,((t,n,i)=>{if(!i.consumable.consume(n.item,t.name))return;const{attributeOldValue:o,attributeNewValue:r}=n,s=i.mapper.toViewElement(n.item),l=Zl(i.writer,s,e);nl(i.writer,o,r,l)}))}n(e,rl(e)),n("figure","htmlFigureAttributes")}}(r)),e.stop())}))}}class ql extends e.Plugin{static get requires(){return[Ol]}static get pluginName(){return"ScriptElementSupport"}init(){const e=this.editor.plugins.get(Ol);e.on("register:script",((t,n)=>{const i=this.editor,o=i.model.schema,r=i.conversion;o.register("htmlScript",n.modelSchema),o.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"script"}),r.for("upcast").elementToElement({view:"script",model:sl(n)}),r.for("upcast").add(ml(n,e)),r.for("downcast").elementToElement({model:"htmlScript",view:(e,{writer:t})=>al("script",e,t)}),r.for("downcast").add(gl(n)),t.stop()}))}}class Kl extends e.Plugin{static get requires(){return[Ol]}static get pluginName(){return"TableElementSupport"}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,n=e.conversion,i=e.plugins.get(Ol),o=e.plugins.get("TableUtils");i.on("register:figure",(()=>{n.for("upcast").add(function(e){return t=>{t.on("element:figure",((t,n,i)=>{const o=n.viewItem;if(!n.modelRange||!o.hasClass("table"))return;const r=e.processViewAttributes(o,i);r&&i.writer.setAttribute("htmlFigureAttributes",r,n.modelRange)}),{priority:"low"})}}(i))})),i.on("register:table",((r,s)=>{"table"===s.model&&(t.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),n.for("upcast").add(function(e){return t=>{t.on("element:table",((t,n,i)=>{if(!n.modelRange)return;const o=n.viewItem;r(o,"htmlTableAttributes");for(const e of o.getChildren())e.is("element","thead")&&r(e,"htmlTheadAttributes"),e.is("element","tbody")&&r(e,"htmlTbodyAttributes");function r(t,o){const r=e.processViewAttributes(t,i);r&&i.writer.setAttribute(o,r,n.modelRange)}}),{priority:"low"})}}(i)),n.for("downcast").add((e=>{function t(t,n){e.on(`attribute:${n}:table`,((e,n,i)=>{if(!i.consumable.test(n.item,e.name))return;const o=i.mapper.toViewElement(n.item),r=Zl(i.writer,o,t);r&&(i.consumable.consume(n.item,e.name),nl(i.writer,n.attributeOldValue,n.attributeNewValue,r))}))}t("table","htmlTableAttributes"),t("figure","htmlFigureAttributes"),t("thead","htmlTheadAttributes"),t("tbody","htmlTbodyAttributes")})),e.model.document.registerPostFixer(function(e,t){return n=>{const i=e.document.differ.getChanges();let o=!1;for(const e of i){if("attribute"!=e.type||"headingRows"!=e.attributeKey)continue;const i=e.range.start.nodeAfter,r=i.getAttribute("htmlTheadAttributes"),s=i.getAttribute("htmlTbodyAttributes");r&&!e.attributeNewValue?(n.removeAttribute("htmlTheadAttributes",i),o=!0):s&&e.attributeNewValue==t.getRows(i)&&(n.removeAttribute("htmlTbodyAttributes",i),o=!0)}return o}}(e.model,o)),r.stop())}))}}class Jl extends e.Plugin{static get requires(){return[Ol]}static get pluginName(){return"StyleElementSupport"}init(){const e=this.editor.plugins.get(Ol);e.on("register:style",((t,n)=>{const i=this.editor,o=i.model.schema,r=i.conversion;o.register("htmlStyle",n.modelSchema),o.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"style"}),r.for("upcast").elementToElement({view:"style",model:sl(n)}),r.for("upcast").add(ml(n,e)),r.for("downcast").elementToElement({model:"htmlStyle",view:(e,{writer:t})=>al("style",e,t)}),r.for("downcast").add(gl(n)),t.stop()}))}}function Xl(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _o;++tl))return!1;var c=r.get(e),d=r.get(t);if(c&&d)return c==t&&d==e;var u=-1,m=!0,g=2&n?new ea:void 0;for(r.set(e,t),r.set(t,e);++u{if(!r.includes(o.view))return;if(e.stop(),t.checkAttribute("$block","htmlLiAttributes"))return;const s=r.map((e=>rl(e)));t.extend("$listItem",{allowAttributes:s}),n.for("upcast").add((e=>{e.on("element:ul",ba("htmlUlAttributes",i),{priority:"low"}),e.on("element:ol",ba("htmlOlAttributes",i),{priority:"low"}),e.on("element:li",ba("htmlLiAttributes",i),{priority:"low"})}))})),o.on("postFixer",((e,{listNodes:t,writer:n})=>{for(const{node:i,previousNodeInList:o}of t)if(o){if(o.getAttribute("listType")==i.getAttribute("listType")){const t=fa(o.getAttribute("listType")),r=o.getAttribute(t);!ha(i.getAttribute(t),r)&&n.model.schema.checkAttribute(i,t)&&(n.setAttribute(t,r,i),e.return=!0)}if(o.getAttribute("listItemId")==i.getAttribute("listItemId")){const t=o.getAttribute("htmlLiAttributes");!ha(i.getAttribute("htmlLiAttributes"),t)&&n.model.schema.checkAttribute(i,"htmlLiAttributes")&&(n.setAttribute("htmlLiAttributes",t,i),e.return=!0)}}})),o.on("postFixer",((e,{listNodes:t,writer:n})=>{for(const{node:i}of t){const t=i.getAttribute("listType");"numbered"!==t&&i.getAttribute("htmlOlAttributes")&&(n.removeAttribute("htmlOlAttributes",i),e.return=!0),"numbered"===t&&i.getAttribute("htmlUlAttributes")&&(n.removeAttribute("htmlUlAttributes",i),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,n)=>{e.model.change((t=>{for(const i of n){const n=fa(i.getAttribute("listType"));e.model.schema.checkAttribute(i,n)&&t.setAttribute(n,{},i)}}))}))}}function ba(e,t){return(n,i,o)=>{const r=i.viewItem;i.modelRange||Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor));const s=t.processViewAttributes(r,o);for(const t of i.modelRange.getItems({shallow:!0}))t.hasAttribute("listItemId")&&(t.hasAttribute(e)||o.writer.model.schema.checkAttribute(t,e)&&o.writer.setAttribute(e,s||{},t))}}function fa(e){return"numbered"===e?"htmlOlAttributes":"htmlUlAttributes"}class ka extends e.Plugin{static get requires(){return[Ol,Ml]}static get pluginName(){return"CustomElementSupport"}init(){const e=this.editor.plugins.get(Ol),t=this.editor.plugins.get(Ml);e.on("register:$customElement",((n,i)=>{n.stop();const o=this.editor,r=o.model.schema,s=o.conversion,l=o.editing.view.domConverter.unsafeElements,a=o.data.htmlProcessor.domConverter.preElements;r.register(i.model,i.modelSchema),r.extend(i.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),o.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),s.for("upcast").elementToElement({view:/.*/,model:(n,r)=>{if("$comment"==n.name)return null;if(!function(e){try{document.createElement(e)}catch(e){return!1}return!0}(n.name))return null;if(t.getDefinitionsForView(n.name).size)return null;l.includes(n.name)||l.push(n.name),a.includes(n.name)||a.push(n.name);const s=r.writer.createElement(i.model,{htmlElementName:n.name}),c=e.processViewAttributes(n,r);let d;if(c&&r.writer.setAttribute("htmlCustomElementAttributes",c,s),n.is("element","template")&&n.getCustomProperty("$rawContent"))d=n.getCustomProperty("$rawContent");else{const e=new b.UpcastWriter(n.document).createDocumentFragment(n),t=o.data.htmlProcessor.domConverter.viewToDom(e),i=t.firstChild;for(;i.firstChild;)t.appendChild(i.firstChild);i.remove(),d=o.data.htmlProcessor.htmlWriter.getHtml(t)}r.writer.setAttribute("htmlContent",d,s);for(const{item:e}of o.editing.view.createRangeIn(n))r.consumable.consume(e,{name:!0});return s},converterPriority:"low"}),s.for("editingDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{const n=e.getAttribute("htmlElementName"),i=t.createRawElement(n);return e.hasAttribute("htmlCustomElementAttributes")&&il(t,e.getAttribute("htmlCustomElementAttributes"),i),i}}),s.for("dataDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(e,{writer:t})=>{const n=e.getAttribute("htmlElementName"),i=e.getAttribute("htmlContent"),o=t.createRawElement(n,null,((e,t)=>{t.setContentOf(e,i)}));return e.hasAttribute("htmlCustomElementAttributes")&&il(t,e.getAttribute("htmlCustomElementAttributes"),o),o}})}))}}class Aa extends e.Plugin{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[Ol,Gl,Wl,Yl,Ql,$l,ql,Kl,Jl,pa,ka]}init(){const e=this.editor,t=e.plugins.get(Ol);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"),n=Array.from(t.getDefinitionsForView(e,!1)),i=n.find((e=>e.isInline&&!n[0].isObject));return i?i.model:rl(e)}addModelHtmlClass(e,n,i){const o=this.editor.model,r=this.getGhsAttributeNameForElement(e);o.change((e=>{for(const s of wa(o,i,r))ol(e,s,r,"classes",(e=>{for(const i of(0,t.toArray)(n))e.add(i)}))}))}removeModelHtmlClass(e,n,i){const o=this.editor.model,r=this.getGhsAttributeNameForElement(e);o.change((e=>{for(const s of wa(o,i,r))ol(e,s,r,"classes",(e=>{for(const i of(0,t.toArray)(n))e.delete(i)}))}))}setModelHtmlAttributes(e,t,n){const i=this.editor.model,o=this.getGhsAttributeNameForElement(e);i.change((e=>{for(const r of wa(i,n,o))ol(e,r,o,"attributes",(e=>{for(const[n,i]of Object.entries(t))e.set(n,i)}))}))}removeModelHtmlAttributes(e,n,i){const o=this.editor.model,r=this.getGhsAttributeNameForElement(e);o.change((e=>{for(const s of wa(o,i,r))ol(e,s,r,"attributes",(e=>{for(const i of(0,t.toArray)(n))e.delete(i)}))}))}setModelHtmlStyles(e,t,n){const i=this.editor.model,o=this.getGhsAttributeNameForElement(e);i.change((e=>{for(const r of wa(i,n,o))ol(e,r,o,"styles",(e=>{for(const[n,i]of Object.entries(t))e.set(n,i)}))}))}removeModelHtmlStyles(e,n,i){const o=this.editor.model,r=this.getGhsAttributeNameForElement(e);o.change((e=>{for(const s of wa(o,i,r))ol(e,s,r,"styles",(e=>{for(const i of(0,t.toArray)(n))e.delete(i)}))}))}}function*wa(e,t,n){if(t)if(!(Symbol.iterator in t)&&t.is("documentSelection")&&t.isCollapsed)e.schema.checkAttributeInSelection(t,n)&&(yield t);else for(const i of function(e,t,n){return!(Symbol.iterator in t)&&(t.is("node")||t.is("$text")||t.is("$textProxy"))?e.schema.checkAttribute(t,n)?[e.createRangeOn(t)]:[]:e.schema.getValidRanges(e.createSelection(t).getRanges(),n)}(e,t,n))yield*i.getItems({shallow:!0})}class Ca extends e.Plugin{static get pluginName(){return"HtmlComment"}init(){const e=this.editor,n=new Map;e.data.processor.skipComments=!1,e.model.schema.addAttributeCheck(((e,t)=>{if(e.endsWith("$root")&&t.startsWith("$comment"))return!0})),e.conversion.for("upcast").elementToMarker({view:"$comment",model:e=>{const i=`$comment:${(0,t.uid)()}`,o=e.getCustomProperty("$rawContent");return n.set(i,o),i}}),e.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(e,{writer:t})=>{let n;for(const t of this.editor.model.document.getRootNames())if(n=this.editor.model.document.getRoot(t),n.hasAttribute(e.markerName))break;const i=e.markerName,o=n.getAttribute(i),r=t.createUIElement("$comment");return t.setCustomProperty("$rawContent",o,r),r}}),e.model.document.registerPostFixer((t=>{let i=!1;const o=e.model.document.differ.getChangedMarkers().filter((e=>e.name.startsWith("$comment:")));for(const e of o){const{oldRange:o,newRange:r}=e.data;if(!o||!r||o.root!=r.root){if(o){const n=o.root;n.hasAttribute(e.name)&&(t.removeAttribute(e.name,n),i=!0)}if(r){const o=r.root;"$graveyard"==o.rootName?(t.removeMarker(e.name),i=!0):o.hasAttribute(e.name)||(t.setAttribute(e.name,n.get(e.name)||"",o),i=!0)}}}return i})),e.data.on("set",(()=>{for(const t of e.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)}),{priority:"high"}),e.model.on("deleteContent",((t,[n])=>{for(const t of n.getRanges()){const n=e.model.schema.getLimitElement(t),i=e.model.createPositionAt(n,0),o=e.model.createPositionAt(n,"end");let r;r=i.isTouching(t.start)&&o.isTouching(t.end)?this.getHtmlCommentsInRange(e.model.createRange(i,o)):this.getHtmlCommentsInRange(t,{skipBoundaries:!0});for(const e of r)this.removeHtmlComment(e)}}),{priority:"high"})}createHtmlComment(e,n){const i=(0,t.uid)(),o=this.editor.model,r=o.document.getRoot(e.root.rootName),s=`$comment:${i}`;return o.change((t=>{const i=t.createRange(e);return t.addMarker(s,{usingOperation:!0,affectsData:!0,range:i}),t.setAttribute(s,n,r),s}))}removeHtmlComment(e){const t=this.editor,n=t.model.markers.get(e);return!!n&&(t.model.change((e=>{e.removeMarker(n)})),!0)}getHtmlCommentData(e){const t=this.editor.model.markers.get(e);if(!t)return null;let n="";for(const t of this.editor.model.document.getRoots())if(t.hasAttribute(e)){n=t.getAttribute(e);break}return{content:n,position:t.getStart()}}getHtmlCommentsInRange(e,{skipBoundaries:t=!1}={}){const n=!t;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter((t=>function(e,t){const i=e.getRange().start;return(i.isAfter(t.start)||n&&i.isEqual(t.start))&&(i.isBefore(t.end)||n&&i.isEqual(t.end))}(t,e))).map((e=>e.name))}}var va=n(2747);class ya extends e.Command{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=(0,t.first)(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>_a(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,n=t.document,i=e.value;t.change((e=>{const o=Array.from(n.selection.getSelectedBlocks()).filter((e=>_a(e,i,t.schema)));for(const t of o)t.is("element",i)||e.rename(t,i)}))}}function _a(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}const xa="paragraph";class Ia extends e.Plugin{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[va.Paragraph]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const i of t)"paragraph"!==i.model&&(e.model.schema.register(i.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(i),n.push(i.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new ya(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,i)=>{const o=e.model.document.selection.getFirstPosition().parent;n.some((e=>o.is("element",e.model)))&&!o.is("element",xa)&&0===o.childCount&&i.writer.rename(o,xa)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:t.priorities.low+1})}}var Da=n(6826);L()(Da.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Da.Z.locals;class Ea extends e.Plugin{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,n=e.t,i=function(e){const t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e}))}(e),o=n("Choose heading"),r=n("Heading");e.ui.componentFactory.add("heading",(n=>{const s={},l=new t.Collection,a=e.commands.get("heading"),c=e.commands.get("paragraph"),d=[a];for(const e of i){const t={type:"button",model:new u.ViewModel({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(c,"value"),t.model.set("commandName","paragraph"),d.push(c)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),l.add(t),s[e.model]=e.title}const m=(0,u.createDropdown)(n);return(0,u.addListToDropdown)(m,l,{ariaLabel:r,role:"menu"}),m.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),m.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),m.bind("isEnabled").toMany(d,"isEnabled",((...e)=>e.some((e=>e)))),m.buttonView.bind("label").to(a,"value",c,"value",((e,t)=>{const n=e||t&&"paragraph";return"boolean"==typeof n?o:s[n]?s[n]:o})),this.listenTo(m,"execute",(t=>{const{commandName:n,commandValue:i}=t.source;e.execute(n,i?{value:i}:void 0),e.editing.view.focus()})),m}))}}class Sa extends e.Plugin{static get requires(){return[Ia,Ea]}static get pluginName(){return"Heading"}}e.icons.heading1,e.icons.heading2,e.icons.heading3,e.icons.heading4,e.icons.heading5,e.icons.heading6,new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class Ta extends e.Command{refresh(){const e=this.editor.model,t=e.schema,n=e.document.selection;this.isEnabled=function(e,t,n){const i=function(e,t){const n=(0,A.findOptimalInsertionRange)(e,t).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(e,n);return t.checkChild(i,"horizontalLine")}(n,t,e)}execute(){const e=this.editor.model;e.change((t=>{const n=t.createElement("horizontalLine");e.insertObject(n,null,null,{setSelection:"after"})}))}}var Ma=n(4422);L()(Ma.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ma.Z.locals;class Ba extends e.Plugin{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,n=e.t,i=e.conversion;t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),i.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),i.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:t})=>{const i=n("Horizontal line"),o=t.createContainerElement("div",null,t.createEmptyElement("hr"));return t.addClass("ck-horizontal-line",o),t.setCustomProperty("hr",!0,o),function(e,t,n){return t.setCustomProperty("horizontalLine",!0,e),(0,A.toWidget)(e,t,{label:n})}(o,t,i)}}),i.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new Ta(e))}}class La extends e.Plugin{static get pluginName(){return"HorizontalLineUI"}init(){const t=this.editor,n=t.t;t.ui.componentFactory.add("horizontalLine",(i=>{const o=t.commands.get("horizontalLine"),r=new u.ButtonView(i);return r.set({label:n("Horizontal line"),icon:e.icons.horizontalLine,tooltip:!0}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{t.execute("horizontalLine"),t.editing.view.focus()})),r}))}}class Na extends e.Plugin{static get requires(){return[Ba,La,A.Widget]}static get pluginName(){return"HorizontalLine"}}class ja extends e.Command{refresh(){const e=this.editor.model,t=e.schema,n=e.document.selection,i=za(n);this.isEnabled=function(e,t,n){const i=function(e,t){const n=(0,A.findOptimalInsertionRange)(e,t).start.parent;return n.isEmpty&&!n.is("rootElement")?n.parent:n}(e,n);return t.checkChild(i,"rawHtml")}(n,t,e),this.value=i?i.getAttribute("value")||"":null}execute(e){const t=this.editor.model,n=t.document.selection;t.change((i=>{let o;null!==this.value?o=za(n):(o=i.createElement("rawHtml"),t.insertObject(o,null,null,{setSelection:"on"})),i.setAttribute("value",e,o)}))}}function za(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}var Va=n(846);L()(Va.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Va.Z.locals;class Oa extends e.Plugin{static get pluginName(){return"HtmlEmbedEditing"}constructor(e){super(e),this._widgetButtonViewReferences=new Set,e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>((0,t.logWarning)("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})})}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new ja(e)),this._setupConversion()}_setupConversion(){const e=this.editor,n=e.t,i=e.editing.view,o=this._widgetButtonViewReferences,r=e.config.get("htmlEmbed");function s({editor:e,domElement:i,state:r,props:s}){i.textContent="";const a=i.ownerDocument;let c;if(r.isEditable){const e={isDisabled:!1,placeholder:s.textareaPlaceholder};c=l({domDocument:a,state:r,props:e}),i.append(c)}else if(r.showPreviews){const o={sanitizeHtml:s.sanitizeHtml};i.append(function({editor:e,domDocument:i,state:o,props:r}){const s=r.sanitizeHtml(o.getRawHtmlValue()),l=o.getRawHtmlValue().length>0?n("No preview available"):n("Empty snippet content"),a=(0,t.createElement)(i,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},l),c=(0,t.createElement)(i,"div",{class:"raw-html-embed__preview-content",dir:e.locale.contentLanguageDirection}),d=i.createRange().createContextualFragment(s.html);c.appendChild(d);return(0,t.createElement)(i,"div",{class:"raw-html-embed__preview"},[a,c])}({domDocument:a,state:r,props:o,editor:e}))}else{const e={isDisabled:!0,placeholder:s.textareaPlaceholder};i.append(l({domDocument:a,state:r,props:e}))}const d={onEditClick:s.onEditClick,onSaveClick:()=>{s.onSaveClick(c.value)},onCancelClick:s.onCancelClick};i.prepend(function({editor:e,domDocument:n,state:i,props:r}){const s=(0,t.createElement)(n,"div",{class:"raw-html-embed__buttons-wrapper"});if(i.isEditable){const t=Pa(e,"save",r.onSaveClick),n=Pa(e,"cancel",r.onCancelClick);s.append(t.element,n.element),o.add(t).add(n)}else{const t=Pa(e,"edit",r.onEditClick);s.append(t.element),o.add(t)}return s}({editor:e,domDocument:a,state:r,props:d}))}function l({domDocument:e,state:n,props:i}){const o=(0,t.createElement)(e,"textarea",{placeholder:i.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return o.disabled=i.isDisabled,o.value=n.getRawHtmlValue(),o}this.editor.editing.view.on("render",(()=>{for(const e of o){if(e.element&&e.element.isConnected)return;e.destroy(),o.delete(e)}}),{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,{writer:t})=>t.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,{writer:t})=>t.createRawElement("div",{class:"raw-html-embed"},(function(t){t.innerHTML=e.getAttribute("value")||""}))}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(t,{writer:o})=>{let l,a,c;const d=o.createRawElement("div",{class:"raw-html-embed__content-wrapper"},(function(n){l=n,s({editor:e,domElement:n,state:a,props:c}),l.addEventListener("mousedown",(()=>{if(a.isEditable){const n=e.model;n.document.selection.getSelectedElement()!==t&&n.change((e=>e.setSelection(t,"on")))}}),!0)})),u={makeEditable(){a=Object.assign({},a,{isEditable:!0}),s({domElement:l,editor:e,state:a,props:c}),i.change((e=>{e.setAttribute("data-cke-ignore-events","true",d)})),l.querySelector("textarea").focus()},save(t){t!==a.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){a=Object.assign({},a,{isEditable:!1}),s({domElement:l,editor:e,state:a,props:c}),e.editing.view.focus(),i.change((e=>{e.removeAttribute("data-cke-ignore-events",d)}))}};a={showPreviews:r.showPreviews,isEditable:!1,getRawHtmlValue:()=>t.getAttribute("value")||""},c={sanitizeHtml:r.sanitizeHtml,textareaPlaceholder:n("Paste raw HTML here..."),onEditClick(){u.makeEditable()},onSaveClick(e){u.save(e)},onCancelClick(){u.cancel()}};const m=o.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":n("HTML snippet"),dir:e.locale.uiLanguageDirection},d);return o.setCustomProperty("rawHtmlApi",u,m),o.setCustomProperty("rawHtml",!0,m),(0,A.toWidget)(m,o,{label:n("HTML snippet"),hasSelectionHandle:!0})}})}}function Pa(t,n,i){const{t:o}=t.locale,r=new u.ButtonView(t.locale),s=t.commands.get("htmlEmbed");return r.set({class:`raw-html-embed__${n}-button`,icon:e.icons.pencil,tooltip:!0,tooltipPosition:"rtl"===t.locale.uiLanguageDirection?"e":"w"}),r.render(),"edit"===n?(r.set({icon:e.icons.pencil,label:o("Edit source")}),r.bind("isEnabled").to(s)):"save"===n?(r.set({icon:e.icons.check,label:o("Save changes")}),r.bind("isEnabled").to(s)):r.set({icon:e.icons.cancel,label:o("Cancel")}),r.on("execute",i),r}class Fa extends e.Plugin{static get pluginName(){return"HtmlEmbedUI"}init(){const t=this.editor,n=t.t;t.ui.componentFactory.add("htmlEmbed",(i=>{const o=t.commands.get("htmlEmbed"),r=new u.ButtonView(i);return r.set({label:n("Insert HTML"),icon:e.icons.html,tooltip:!0}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{t.execute("htmlEmbed"),t.editing.view.focus(),t.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()})),r}))}}class Ra extends e.Plugin{static get requires(){return[Oa,Fa,A.Widget]}static get pluginName(){return"HtmlEmbed"}}class Ua extends e.Plugin{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new e.MultiCommand(t)),t.commands.add("outdent",new e.MultiCommand(t))}}class Ha extends e.Plugin{static get pluginName(){return"IndentUI"}init(){const t=this.editor,n=t.locale,i=t.t,o="ltr"==n.uiLanguageDirection?e.icons.indent:e.icons.outdent,r="ltr"==n.uiLanguageDirection?e.icons.outdent:e.icons.indent;this._defineButton("indent",i("Increase indent"),o),this._defineButton("outdent",i("Decrease indent"),r)}_defineButton(e,t,n){const i=this.editor;i.ui.componentFactory.add(e,(o=>{const r=i.commands.get(e),s=new u.ButtonView(o);return s.set({label:t,icon:n,tooltip:!0}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",(()=>{i.execute(e),i.editing.view.focus()})),s}))}}class Ga extends e.Plugin{static get pluginName(){return"Indent"}static get requires(){return[Ua,Ha]}}class Wa extends e.Command{constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=this.editor.model,n=(0,t.first)(e.document.selection.getSelectedBlocks());n&&this._isIndentationChangeAllowed(n)?this.isEnabled=this._indentBehavior.checkEnabled(n.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=this._getBlocksToChange();e.change((e=>{for(const n of t){const t=n.getAttribute("blockIndent"),i=this._indentBehavior.getNextIndent(t);i?e.setAttribute("blockIndent",i,n):e.removeAttribute("blockIndent",n)}}))}_getBlocksToChange(){const e=this.editor.model.document.selection;return Array.from(e.getSelectedBlocks()).filter((e=>this._isIndentationChangeAllowed(e)))}_isIndentationChangeAllowed(e){const t=this.editor;return!!t.model.schema.checkAttribute(e,"blockIndent")&&(!t.plugins.has("ListUtils")||(!this._indentBehavior.isForward||!t.plugins.get("ListUtils").isListItemBlock(e)))}}class Ya{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 n=t+(this.isForward?this.offset:-this.offset);return n>0?n+this.unit:void 0}}class Za{constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t=0}getNextIndent(e){const t=this.classes.indexOf(e),n=this.isForward?1:-1;return this.classes[t+n]}}const Qa=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class $a extends e.Plugin{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 Wa(e,new Za({direction:"forward",classes:t.classes}))),e.commands.add("outdentBlock",new Wa(e,new Za({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(b.addMarginRules),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new Wa(e,new Ya({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new Wa(e,new Ya({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,n=e.commands.get("indent"),i=e.commands.get("outdent"),o=e.config.get("heading.options");(o&&o.map((e=>e.model))||Qa).forEach((e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})})),t.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(e.commands.get("indentBlock")),i.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 n of e)t.model.values.push(n),t.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(t)}}class qa{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,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!n.schema.isInline(t.item))return;const i=n.writer,o=i.document.selection;for(const e of this._definitions){const r=i.createAttributeElement("a",e.attributes,{priority:5});e.classes&&i.addClass(e.classes,r);for(const t in e.styles)i.setStyle(t,e.styles[t],r);i.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?i.wrap(o.getFirstRange(),r):i.wrap(n.mapper.toViewRange(t.range),r):i.unwrap(n.mapper.toViewRange(t.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,n,{writer:i,mapper:o})=>{const r=o.toViewElement(n.item),s=Array.from(r.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const o=(0,t.toMap)(e.attributes);if(e.callback(n.attributeNewValue)){for(const[e,t]of o)"class"===e?i.addClass(t,s):i.setAttribute(e,t,s);e.classes&&i.addClass(e.classes,s);for(const t in e.styles)i.setStyle(t,e.styles[t],s)}else{for(const[e,t]of o)"class"===e?i.removeClass(t,s):i.removeAttribute(e,s);e.classes&&i.removeClass(e.classes,s);for(const t in e.styles)i.removeStyle(t,s)}}}))}}}const Ka=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Ja=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Xa=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,ec=/^((\w+:(\/{2,})?)|(\W))/i,tc="Ctrl+K";function nc(e,{writer:t}){const n=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,n),n}function ic(e){const t=String(e);return function(e){return!!e.replace(Ka,"").match(Ja)}(t)?t:"#"}function oc(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function rc(e,t){const n=(i=e,Xa.test(i)?"mailto:":t);var i;const o=!!n&&!sc(e);return e&&o?n+e:e}function sc(e){return ec.test(e)}function lc(e){window.open(e,"_blank","noopener")}class ac extends e.Command{constructor(){super(...arguments),this.manualDecorators=new t.Collection,this.automaticDecorators=new qa}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,n=e.document.selection,i=n.getSelectedElement()||(0,t.first)(n.getSelectedBlocks());oc(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(n,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,n={}){const i=this.editor.model,o=i.document.selection,r=[],s=[];for(const e in n)n[e]?r.push(e):s.push(e);i.change((n=>{if(o.isCollapsed){const l=o.getFirstPosition();if(o.hasAttribute("linkHref")){const t=cc(o);let a=(0,k.findAttributeRange)(l,"linkHref",o.getAttribute("linkHref"),i);o.getAttribute("linkHref")===t&&(a=this._updateLinkContent(i,n,a,e)),n.setAttribute("linkHref",e,a),r.forEach((e=>{n.setAttribute(e,!0,a)})),s.forEach((e=>{n.removeAttribute(e,a)})),n.setSelection(n.createPositionAfter(a.end.nodeBefore))}else if(""!==e){const s=(0,t.toMap)(o.getAttributes());s.set("linkHref",e),r.forEach((e=>{s.set(e,!0)}));const{end:a}=i.insertContent(n.createText(e,s),l);n.setSelection(a)}["linkHref",...r,...s].forEach((e=>{n.removeSelectionAttribute(e)}))}else{const t=i.schema.getValidRanges(o.getRanges(),"linkHref"),l=[];for(const e of o.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&l.push(n.createRangeOn(e));const a=l.slice();for(const e of t)this._isRangeToUpdate(e,l)&&a.push(e);for(const t of a){let l=t;if(1===a.length){const r=cc(o);o.getAttribute("linkHref")===r&&(l=this._updateLinkContent(i,n,t,e),n.setSelection(n.createSelection(l)))}n.setAttribute("linkHref",e,l),r.forEach((e=>{n.setAttribute(e,!0,l)})),s.forEach((e=>{n.removeAttribute(e,l)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,n=t.document.selection,i=n.getSelectedElement();return oc(i,t.schema)?i.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(const n of t)if(n.containsRange(e))return!1;return!0}_updateLinkContent(e,t,n,i){const o=t.createText(i,{linkHref:i});return e.insertContent(o,n)}}function cc(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 n=t[0];return n.is("$text")||n.is("$textProxy")?n.data:null}}class dc extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();oc(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,i=e.commands.get("link");t.change((e=>{const o=n.isCollapsed?[(0,k.findAttributeRange)(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref");for(const t of o)if(e.removeAttribute("linkHref",t),i)for(const n of i.manualDecorators)e.removeAttribute(n.id,t)}))}}class uc extends((0,t.ObservableMixin)()){constructor({id:e,label:t,attributes:n,classes:i,styles:o,defaultValue:r}){super(),this.id=e,this.set("value",void 0),this.defaultValue=r,this.label=t,this.attributes=n,this.classes=i,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var mc=n(1365);L()(mc.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),mc.Z.locals;const gc="automatic",hc=/^(https?:)?\/\//;class pc extends e.Plugin{static get pluginName(){return"LinkEditing"}static get requires(){return[k.TwoStepCaretMovement,k.Input,p.ClipboardPipeline]}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:nc}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>nc(ic(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 ac(e)),e.commands.add("unlink",new dc(e));const t=function(e,t){const n={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&n[e.label]&&(e.label=n[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[n,i]of Object.entries(e)){const e=Object.assign({},i,{id:`link${el(n)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===gc))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode))),e.plugins.get(k.TwoStepCaretMovement).registerAttribute("linkHref"),(0,k.inlineHighlight)(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,n=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:gc,callback:e=>!!e&&hc.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const i=new uc(e);n.add(i),t.conversion.for("downcast").attributeToElement({model:i.id,view:(e,{writer:t,schema:n},{item:o})=>{if((o.is("selection")||n.isInline(o))&&e){const e=t.createAttributeElement("a",i.attributes,{priority:5});i.classes&&t.addClass(i.classes,e);for(const n in i.styles)t.setStyle(n,i.styles[n],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...i._createPattern()},model:{key:i.id}})}))}_enableLinkOpen(){const e=this.editor,n=e.editing.view.document;this.listenTo(n,"click",((e,n)=>{if(!(t.env.isMac?n.domEvent.metaKey:n.domEvent.ctrlKey))return;let i=n.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const o=i.getAttribute("href");o&&(e.stop(),n.preventDefault(),lc(o))}),{context:"$capture"}),this.listenTo(n,"keydown",((n,i)=>{const o=e.commands.get("link").value;o&&i.keyCode===t.keyCodes.enter&&i.altKey&&(n.stop(),lc(o))}))}_enableSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(t,"change:attribute",((n,{attributeKeys:i})=>{i.includes("linkHref")&&!t.hasAttribute("linkHref")&&e.change((t=>{var n;!function(e,t){e.removeSelectionAttribute("linkHref");for(const n of t)e.removeSelectionAttribute(n)}(t,(n=e.schema,n.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))))}))}))}_enableClipboardIntegration(){const e=this.editor,t=e.model,n=this.editor.config.get("link.defaultProtocol");n&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,i)=>{t.change((e=>{const t=e.createRangeIn(i.content);for(const i of t.getItems())if(i.hasAttribute("linkHref")){const t=rc(i.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,i)}}))}))}}var bc=n(9250);L()(bc.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),bc.Z.locals;class fc extends u.View{constructor(n,i){super(n),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this._focusables=new u.ViewCollection;const o=n.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(o("Save"),e.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(o("Cancel"),e.icons.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(i),this.children=this._createFormChildren(i.manualDecorators),this._focusCycler=new u.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const r=["ck","ck-link-form","ck-responsive-form"];i.manualDecorators.length&&r.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:r,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),(0,u.submitHandler)({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 u.LabeledFieldView(this.locale,u.createLabeledInputText);return t.label=e("Link URL"),t}_createButton(e,t,n,i){const o=new u.ButtonView(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const n of e.manualDecorators){const i=new u.SwitchButtonView(this.locale);i.set({name:n.id,label:n.label,withText:!0}),i.bind("isOn").toMany([n,e],"value",((e,t)=>void 0===t&&void 0===e?!!n.defaultValue:!!e)),i.on("execute",(()=>{n.set("value",!i.isOn)})),t.add(i)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new u.View;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}}var kc=n(9526);L()(kc.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),kc.Z.locals;class Ac extends u.View{constructor(n){super(n),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this._focusables=new u.ViewCollection;const i=n.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(i("Unlink"),'',"unlink"),this.editButtonView=this._createButton(i("Edit link"),e.icons.pencil,"edit"),this.set("href",void 0),this._focusCycler=new u.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-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,n){const i=new u.ButtonView(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){const e=new u.ButtonView(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&ic(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||n("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}var wc='';const Cc="link-ui";class vc extends e.Plugin{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[u.ContextualBalloon]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(b.ClickObserver),this._balloon=e.plugins.get(u.ContextualBalloon),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:Cc,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Cc,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 Ac(e.locale),n=e.commands.get("link"),i=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(i),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(tc,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),i=e.config.get("link.allowCreatingEmptyLinks"),o=new((0,u.CssTransitionDisablerMixin)(fc))(e.locale,t);return o.urlInputView.fieldView.bind("value").to(t,"value"),o.urlInputView.bind("isEnabled").to(t,"isEnabled"),o.saveButtonView.bind("isEnabled").to(t,"isEnabled",o.urlInputView,"isEmpty",((e,t)=>e&&(i||!t))),this.listenTo(o,"submit",(()=>{const{value:t}=o.urlInputView.fieldView.element,i=rc(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"),n=e.t;e.ui.componentFactory.add("link",(e=>{const i=new u.ButtonView(e);return i.isEnabled=!0,i.label=n("Link"),i.icon=wc,i.keystroke=tc,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(t,"isEnabled"),i.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(i,"execute",(()=>this._showUI(!0))),i}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(tc,((t,n)=>{n(),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())})),(0,u.clickOutsideHandler)({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 n=this._getSelectedLinkElement(),i=r();const o=()=>{const e=this._getSelectedLinkElement(),t=r();n&&!e||!n&&t!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=e,i=t};function r(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}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,n=e.document;let i;if(t.markers.has(Cc)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(Cc)),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));i=e.domConverter.viewRangeToDom(n)}else i=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:i}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&(0,A.isWidget)(n))return yc(t.getFirstPosition());{const n=t.getFirstRange().getTrimmed(),i=yc(n.start),o=yc(n.end);return i&&i==o&&e.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const n=e.document.selection.getFirstRange();if(e.markers.has(Cc))t.updateMarker(Cc,{range:n});else if(n.start.isAtEnd){const i=n.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:n});t.addMarker(Cc,{usingOperation:!1,affectsData:!1,range:t.createRange(i,n.end)})}else t.addMarker(Cc,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Cc)&&e.change((e=>{e.removeMarker(Cc)}))}}function yc(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const _c=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 e.Plugin{static get requires(){return[k.Delete,pc]}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")?(0,k.findAttributeRange)(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const n=this.editor.model,i=n.document.selection,o=i.getFirstPosition(),r=i.getLastPosition();let s=t.getJoined(this._expandLinkRange(n,o)||t);s&&(s=s.getJoined(this._expandLinkRange(n,r)||t)),s&&(s.start.isBefore(o)||s.end.isAfter(r))&&e.setSelection(s)}_enablePasteLinking(){const e=this.editor,t=e.model,n=t.document.selection,i=e.plugins.get("ClipboardPipeline"),o=e.commands.get("link");i.on("inputTransformation",((e,i)=>{if(!this.isEnabled||!o.isEnabled||n.isCollapsed)return;if(n.rangeCount>1)return;const r=n.getFirstRange(),s=i.dataTransfer.getData("text/plain");if(!s)return;const l=s.match(_c);l&&l[2]===s&&(t.change((e=>{this._selectEntireLinks(e,r),o.execute(s)})),e.stop())}),{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new k.TextWatcher(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Ic(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,n)=>{const{batch:i,range:o,url:r}=n;if(!i.isTyping)return;const s=o.end.getShiftedBy(-1),l=s.getShiftedBy(-r.length),a=e.model.createRange(l,s);this._applyAutoLink(r,a)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const n=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:n,range:i}=(0,k.getLastTextLine)(e,t),o=Ic(n);if(o){const e=t.createRange(i.end.getShiftedBy(-o.length),i.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){const n=this.editor.model,i=rc(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,n)&&sc(i)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(i,t)}_persistAutoLink(e,t){const n=this.editor.model,i=this.editor.plugins.get("Delete");n.enqueueChange((o=>{o.setAttribute("linkHref",e,t),n.enqueueChange((()=>{i.requestUndoOnBackspace()}))}))}}function Ic(e){const t=_c.exec(e);return t?t[2]:null}class Dc extends e.Plugin{static get requires(){return["ImageEditing","ImageUtils",pc]}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"),n=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,i,o)=>{const r=i.viewItem,s=n.findViewImgElement(r);if(!s)return;const l=s.findAncestor((e=>n.isBlockImageView(e)));if(t&&!l)return;if(!o.consumable.consume(r,{attributes:["href"]}))return;const a=r.getAttribute("href");if(!a)return;let c=i.modelCursor.parent;if(!c.is("element","imageBlock")){const e=o.convertItem(s,i.modelCursor);i.modelRange=e.modelRange,i.modelCursor=e.modelCursor,c=i.modelCursor.nodeBefore}c&&c.is("element","imageBlock")&&o.writer.setAttribute("linkHref",a,c)}),{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",((e,n,i)=>{if(!i.consumable.consume(n.item,e.name))return;const o=i.mapper.toViewElement(n.item),r=i.writer,s=Array.from(o.getChildren()).find((e=>e.is("element","a"))),l=t.findViewImgElement(o),a=l.parent.is("element","picture")?l.parent:l;if(s)n.attributeNewValue?r.setAttribute("href",n.attributeNewValue,s):(r.move(r.createRangeOn(a),r.createPositionAt(o,0)),r.remove(s));else{const e=r.createContainerElement("a",{href:n.attributeNewValue});r.insert(r.createPositionAt(o,0),e),r.move(r.createRangeOn(a),r.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 n of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:n.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:n.id}),e.conversion.for("downcast").add(Ec(n)),e.conversion.for("upcast").add(Sc(e,n))}}function Ec(e){return n=>{n.on(`attribute:${e.id}:imageBlock`,((n,i,o)=>{const r=o.mapper.toViewElement(i.item),s=Array.from(r.getChildren()).find((e=>e.is("element","a")));if(s){for(const[n,i]of(0,t.toMap)(e.attributes))o.writer.setAttribute(n,i,s);e.classes&&o.writer.addClass(e.classes,s);for(const t in e.styles)o.writer.setStyle(t,e.styles[t],s)}}))}}function Sc(e,t){const n=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,o,r)=>{const s=o.viewItem,l=i.findViewImgElement(s);if(!l)return;const a=l.findAncestor((e=>i.isBlockImageView(e)));if(n&&!a)return;const c=new b.Matcher(t._createPattern()).match(s);if(!c)return;if(!r.consumable.consume(s,c.match))return;const d=o.modelCursor.nodeBefore||o.modelCursor.parent;r.writer.setAttribute(t.id,!0,d)}),{priority:"high"})}}class Tc extends e.Plugin{static get requires(){return[pc,vc,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((t,n)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(n.preventDefault(),t.stop())}),{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",(n=>{const i=new u.ButtonView(n),o=e.plugins.get("LinkUI"),r=e.commands.get("link");return i.set({isEnabled:!0,label:t("Link image"),icon:wc,keystroke:tc,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(r,"isEnabled"),i.bind("isOn").to(r,"value",(e=>!!e)),this.listenTo(i,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?o._addActionsView():o._showUI(!0)})),i}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}var Mc=n(9719);L()(Mc.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Mc.Z.locals;class Bc extends e.Plugin{static get requires(){return[Dc,Tc]}static get pluginName(){return"LinkImage"}}class Lc{constructor(e,n){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==n.direction,this._includeSelf=!!n.includeSelf,this._sameAttributes=(0,t.toArray)(n.sameAttributes||[]),this._sameIndent=!!n.sameIndent,this._lowerIndent=!!n.lowerIndent,this._higherIndent=!!n.higherIndent}static first(e,n){const i=new this(e,n)[Symbol.iterator]();return(0,t.first)(i)}*[Symbol.iterator](){const e=[];for(const{node:t}of Nc(this._getStartNode(),this._isForward?"forward":"backward")){const n=t.getAttribute("listIndent");if(nthis._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*Nc(e,t="forward"){const n="forward"==t,i=[];let o=null;for(;Vc(e);){let t=null;if(o){const n=e.getAttribute("listIndent"),r=o.getAttribute("listIndent");n>r?i[r]=o:ne.getAttribute("listItemId")!=t))}function qc(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 Xc(e,t,n){return Pc(t,{direction:"forward"}).pop().index>e.index?Yc(e,t,n):[]}class ed extends e.Command{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,n=td(e.document.selection);e.change((e=>{const i=[];$c(n)&&!Rc(n[0])?("forward"==this._direction&&i.push(...Zc(n,e)),i.push(...Wc(n[0],e))):"forward"==this._direction?i.push(...Zc(n,e,{expand:!0})):i.push(...function(e,n){const i=Hc(e=(0,t.toArray)(e)),o=new Set,r=Math.min(...i.map((e=>e.getAttribute("listIndent")))),s=new Map;for(const e of i)s.set(e,Lc.first(e,{lowerIndent:!0}));for(const e of i){if(o.has(e))continue;o.add(e);const t=e.getAttribute("listIndent")-1;if(t<0)Qc(e,n);else{if(e.getAttribute("listIndent")==r){const t=Xc(e,s.get(e),n);for(const e of t)o.add(e);if(t.length)continue}n.setAttribute("listIndent",t,e)}}return qc(o)}(n,e));for(const t of i){if(!t.hasAttribute("listType"))continue;const n=Lc.first(t,{sameIndent:!0});n&&e.setAttribute("listType",n.getAttribute("listType"),t)}this._fireAfterExecute(i)}))}_fireAfterExecute(e){this.fire("afterExecute",qc(new Set(e)))}_checkEnabled(){let e=td(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if($c(e)&&!Rc(e[0]))return!0;e=Hc(e),t=e[0];const n=Lc.first(t,{sameIndent:!0});return!!n&&n.getAttribute("listType")==t.getAttribute("listType")}}function td(e){const t=Array.from(e.getSelectedBlocks()),n=t.findIndex((e=>!Vc(e)));return-1!=n&&(t.length=n),t}class nd extends e.Command{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document,i=Kc(t),o=Array.from(n.selection.getSelectedBlocks()).filter((e=>t.schema.checkAttribute(e,"listType")||Jc(e,t.schema))),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(r){const t=o[o.length-1],n=Pc(t,{direction:"forward"}),i=[];n.length>1&&i.push(...Wc(n[1],e)),i.push(...Qc(o,e)),i.push(...function(e,t){const n=[];let i=Number.POSITIVE_INFINITY;for(const{node:o}of Nc(e.nextSibling,"forward")){const e=o.getAttribute("listIndent");if(0==e)break;e{const{firstElement:r,lastElement:s}=this._getMergeSubjectElements(n,e),l=r.getAttribute("listIndent")||0,a=s.getAttribute("listIndent"),c=s.getAttribute("listItemId");if(l!=a){const e=(d=s,Array.from(new Lc(d,{direction:"forward",higherIndent:!0})));i.push(...Zc([s,...e],o,{indentBy:l-a,expand:l{const t=Wc(this._getStartBlock(),e);this._fireAfterExecute(t)}))}_fireAfterExecute(e){this.fire("afterExecute",qc(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&Vc(t)&&!Rc(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class rd extends e.Plugin{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(e){return Gc(e)}isFirstBlockOfListItem(e){return Rc(e)}isListItemBlock(e){return Vc(e)}expandListBlocksToCompleteItems(e,t={}){return Hc(e,t)}}function sd(e){return e.is("element","ol")||e.is("element","ul")}function ld(e){return e.is("element","li")}function ad(e,t,n,i=ud(n,t)){return e.createAttributeElement(dd(n),null,{priority:2*t/100-100,id:i})}function cd(e,t,n){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:n})}function dd(e){return"numbered"==e?"ol":"ul"}function ud(e,t){return`list-${e}-${t}`}function md(e,t){const n=e.nodeBefore;if(Vc(n)){let e=n;for(const{node:n}of Nc(e,"backward"))if(e=n,t.has(e))return;t.set(n,e)}else{const n=e.nodeAfter;Vc(n)&&t.set(n,n)}}function gd(){return(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0}))return;const i=new b.UpcastWriter(t.viewItem.document);for(const e of Array.from(t.viewItem.getChildren()))ld(e)||sd(e)||i.remove(e)}}function hd(e,t,n,{dataPipeline:i}={}){const o=function(e){return(t,n)=>{const i=[];for(const n of e)t.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every((e=>!1!==n.test(t,e)))&&(i.forEach((e=>n.consume(t,e))),!0)}}(e);return(r,s,l)=>{const{writer:a,mapper:c,consumable:d}=l,u=s.item;if(!e.includes(s.attributeKey))return;if(!o(u,d))return;const m=function(e,t,n){const i=n.createRangeOn(e);return t.toViewRange(i).getTrimmed().end.nodeBefore}(u,c,n);!function(e,t,n){for(;e.parent.is("attributeElement")&&e.parent.getCustomProperty("listItemWrapper");)t.unwrap(t.createRangeIn(e.parent),e.parent);const i=t.createPositionBefore(e).getWalker({direction:"backward"}),o=[];for(const{item:e}of i){if(e.is("element")&&n.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&o.push(e)}for(const e of o)t.remove(e)}(m,a,c),function(e,t){let n=e.parent;for(;n.is("attributeElement")&&["ul","ol","li"].includes(n.name);){const i=n.parent;t.unwrap(t.createRangeOn(e),n),n=i}}(m,a);const g=function(e,t,n,i,{dataPipeline:o}){let r=i.createRangeOn(t);if(!Rc(e))return r;for(const s of n){if("itemMarker"!=s.scope)continue;const n=s.createElement(i,e,{dataPipeline:o});if(!n)continue;if(i.setCustomProperty("listItemMarker",!0,n),i.insert(r.start,n),r=i.createRange(i.createPositionBefore(n),i.createPositionAfter(t)),!s.createWrapperElement||!s.canWrapElement)continue;const l=s.createWrapperElement(i,e,{dataPipeline:o});i.setCustomProperty("listItemWrapper",!0,l),s.canWrapElement(e)?r=i.wrap(r,l):(r=i.wrap(i.createRangeOn(n),l),r=i.createRange(r.start,i.createPositionAfter(t)))}return r}(u,m,t,a,{dataPipeline:i});!function(e,t,n,i){if(!e.hasAttribute("listIndent"))return;const o=e.getAttribute("listIndent");let r=e;for(let e=o;e>=0;e--){const o=cd(i,e,r.getAttribute("listItemId")),s=ad(i,e,r.getAttribute("listType"));for(const e of n)"list"!=e.scope&&"item"!=e.scope||!r.hasAttribute(e.attributeName)||e.setAttributeOnDowncast(i,r.getAttribute(e.attributeName),"list"==e.scope?s:o);if(t=i.wrap(t,o),t=i.wrap(t,s),0==e)break;if(r=Lc.first(r,{lowerIndent:!0}),!r)break}}(u,g,t,a)}}function pd(e,{dataPipeline:t}={}){return(n,{writer:i})=>{if(!bd(n,e))return null;if(!t)return i.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const o=i.createContainerElement("p");return i.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function bd(e,t,n=Oc(e)){if(!Vc(e))return!1;for(const n of e.getAttributeKeys())if(!n.startsWith("selection:")&&!t.includes(n))return!1;return n.length<2}var fd=n(4963),kd=(L()(fd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),fd.Z.locals,n(1584));L()(kd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),kd.Z.locals;const Ad=["listType","listIndent","listItemId"];class wd extends e.Plugin{static get pluginName(){return"ListEditing"}static get requires(){return[Ye.Enter,k.Delete,rd,p.ClipboardPipeline]}constructor(e){super(e),this._downcastStrategies=[],e.config.define("list.multiBlock",!0)}init(){const e=this.editor,n=e.model,i=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new t.CKEditorError("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});n.schema.register("$listItem",{allowAttributes:Ad}),i?(n.schema.extend("$container",{allowAttributesOf:"$listItem"}),n.schema.extend("$block",{allowAttributesOf:"$listItem"}),n.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):n.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const e of Ad)n.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new nd(e,"numbered")),e.commands.add("bulletedList",new nd(e,"bulleted")),e.commands.add("indentList",new ed(e,"forward")),e.commands.add("outdentList",new ed(e,"backward")),e.commands.add("splitListItemBefore",new od(e,"before")),e.commands.add("splitListItemAfter",new od(e,"after")),i&&(e.commands.add("mergeListItemBackward",new id(e,"backward")),e.commands.add("mergeListItemForward",new id(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),n&&n.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...Ad,...this._downcastStrategies.map((e=>e.attributeName))]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),n=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",((i,o)=>{const r=e.model.document.selection;Kc(e.model)||e.model.change((()=>{const s=r.getFirstPosition();if(r.isCollapsed&&"backward"==o.direction){if(!s.isAtStart)return;const n=s.parent;if(!Vc(n))return;if(Lc.first(n,{sameAttributes:"listType",sameIndent:!0})||0!==n.getAttribute("listIndent")){if(!t||!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:Cd(e.model,"backward")})}else Uc(n)||e.execute("splitListItemAfter"),e.execute("outdentList");o.preventDefault(),i.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!n||!n.isEnabled)return;n.execute({shouldMergeOnBlocksContentLevel:Cd(e.model,"forward")}),o.preventDefault(),i.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,n=e.commands,i=n.get("enter");this.listenTo(e.editing.view.document,"enter",((n,i)=>{const o=t.document,r=o.selection.getFirstPosition().parent;if(o.selection.isCollapsed&&Vc(r)&&r.isEmpty&&!i.isSoft){const t=Rc(r),o=Uc(r);t&&o?(e.execute("outdentList"),i.preventDefault(),n.stop()):t&&!o?(e.execute("splitListItemAfter"),i.preventDefault(),n.stop()):o&&(e.execute("splitListItemBefore"),i.preventDefault(),n.stop())}}),{context:"li"}),this.listenTo(i,"afterExecute",(()=>{const t=n.get("splitListItemBefore");t.refresh(),t.isEnabled&&2===Oc(e.model.document.selection.getLastPosition().parent).length&&t.execute()}))}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",((t,n)=>{const i=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(i).isEnabled&&(e.execute(i),n.stopPropagation(),n.preventDefault(),t.stop())}),{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,n=this.getListAttributeNames(),i=e.config.get("list.multiBlock"),o=i?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(e,{writer:t})=>t.createElement(o,{listType:""})}).elementToElement({view:"p",model:(e,{writer:t})=>e.parent&&e.parent.is("element","li")?t.createElement(o,{listType:""}):null,converterPriority:"high"}).add((e=>{e.on("element:li",((e,t,n)=>{const{writer:i,schema:o}=n;if(!t.modelRange)return;const r=Array.from(t.modelRange.getItems({shallow:!0})).filter((e=>o.checkAttribute(e,"listItemId")));if(!r.length)return;const s=zc.next(),l=function(e){let t=0,n=e.parent;for(;n;){if(ld(n))t++;else{const e=n.previousSibling;e&&ld(e)&&t++}n=n.parent}return t}(t.viewItem);let a=t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted";const c=r[0].getAttribute("listType");c&&(a=c);const d={listItemId:s,listIndent:l,listType:a};for(const e of r)e.hasAttribute("listItemId")||i.setAttributes(d,e);r.length>1&&r[1].getAttribute("listItemId")!=d.listItemId&&n.keepEmptyElement(r[0])})),e.on("element:ul",gd(),{priority:"high"}),e.on("element:ol",gd(),{priority:"high"})})),i||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:o,view:pd(n),converterPriority:"high"}).add((e=>{e.on("attribute",hd(n,this._downcastStrategies,t))})),e.conversion.for("dataDowncast").elementToElement({model:o,view:pd(n,{dataPipeline:!0}),converterPriority:"high"}).add((e=>{e.on("attribute",hd(n,this._downcastStrategies,t,{dataPipeline:!0}))})),this.listenTo(t.document,"change:data",function(e,t,n,i){return()=>{const i=e.document.differ.getChanges(),s=[],l=new Map,a=new Set;for(const e of i)if("insert"==e.type&&"$text"!=e.name)md(e.position,l),e.attributes.has("listItemId")?a.add(e.position.nodeAfter):md(e.position.getShiftedBy(e.length),l);else if("remove"==e.type&&e.attributes.has("listItemId"))md(e.position,l);else if("attribute"==e.type){const t=e.range.start.nodeAfter;n.includes(e.attributeKey)?(md(e.range.start,l),null===e.attributeNewValue?(md(e.range.start.getShiftedBy(1),l),r(t)&&s.push(t)):a.add(t)):Vc(t)&&r(t)&&s.push(t)}for(const e of l.values())s.push(...o(e,a));for(const e of new Set(s))t.reconvertItem(e)};function o(e,t){const i=[],o=new Set,l=[];for(const{node:a,previous:c}of Nc(e,"forward")){if(o.has(a))continue;const e=a.getAttribute("listIndent");c&&en.includes(e))));const d=Pc(a,{direction:"forward"});for(const e of d)o.add(e),(r(e,d)||s(e,l,t))&&i.push(e)}return i}function r(e,o){const r=t.mapper.toViewElement(e);if(!r)return!1;if(i.fire("checkElement",{modelElement:e,viewElement:r}))return!0;if(!e.is("element","paragraph")&&!e.is("element","listItem"))return!1;const s=bd(e,n,o);return!(!s||!r.is("element","p"))||!(s||!r.is("element","span"))}function s(e,n,o){if(o.has(e))return!1;const r=t.mapper.toViewElement(e);let s=n.length-1;for(let e=r.parent;!e.is("editableElement");e=e.parent){const t=ld(e),o=sd(e);if(!o&&!t)continue;const r="checkAttributes:"+(t?"item":"list");if(i.fire(r,{viewElement:e,modelAttributes:n[s]}))break;if(o&&(s--,s<0))return!1}return!0}}(t,e.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",((e,{viewElement:t,modelAttributes:n})=>{t.id!=n.listItemId&&(e.return=!0,e.stop())})),this.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:n})=>{t.name==dd(n.listType)&&t.id==ud(n.listType,n.listIndent)||(e.return=!0,e.stop())}))}_setupModelPostFixing(){const e=this.editor.model,t=this.getListAttributeNames();e.document.registerPostFixer((n=>function(e,t,n,i){const o=e.document.differ.getChanges(),r=new Map,s=i.editor.config.get("list.multiBlock");let l=!1;for(const i of o){if("insert"==i.type&&"$text"!=i.name){const o=i.position.nodeAfter;if(!e.schema.checkAttribute(o,"listItemId"))for(const e of Array.from(o.getAttributeKeys()))n.includes(e)&&(t.removeAttribute(e,o),l=!0);md(i.position,r),i.attributes.has("listItemId")||md(i.position.getShiftedBy(i.length),r);for(const{item:t,previousPosition:n}of e.createRangeIn(o))Vc(t)&&md(n,r)}else"remove"==i.type?md(i.position,r):"attribute"==i.type&&n.includes(i.attributeKey)&&(md(i.range.start,r),null===i.attributeNewValue&&md(i.range.start.getShiftedBy(1),r));if(!s&&"attribute"==i.type&&Ad.includes(i.attributeKey)){const e=i.range.start.nodeAfter;null===i.attributeNewValue&&e&&e.is("element","listItem")?(t.rename(e,"paragraph"),l=!0):null===i.attributeOldValue&&e&&e.is("element")&&"listItem"!=e.name&&(t.rename(e,"listItem"),l=!0)}}const a=new Set;for(const e of r.values())l=i.fire("postFixer",{listNodes:new jc(e),listHead:e,writer:t,seenIds:a})||l;return l}(e,n,t,this))),this.on("postFixer",((e,{listNodes:t,writer:n})=>{e.return=function(e,t){let n=0,i=-1,o=null,r=!1;for(const{node:s}of e){const e=s.getAttribute("listIndent");if(e>n){let l;null===o?(o=e-n,l=n):(o>e&&(o=e),l=e-o),l>i+1&&(l=i+1),t.setAttribute("listIndent",l,s),r=!0,i=l}else o=null,n=e+1,i=e}return r}(t,n)||e.return}),{priority:"high"}),this.on("postFixer",((e,{listNodes:t,writer:n,seenIds:i})=>{e.return=function(e,t,n){const i=new Set;let o=!1;for(const{node:r}of e){if(i.has(r))continue;let e=r.getAttribute("listType"),s=r.getAttribute("listItemId");if(t.has(s)&&(s=zc.next()),t.add(s),r.is("element","listItem"))r.getAttribute("listItemId")!=s&&(n.setAttribute("listItemId",s,r),o=!0);else for(const t of Pc(r,{direction:"forward"}))i.add(t),t.getAttribute("listType")!=e&&(s=zc.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=s&&(n.setAttribute("listItemId",s,t),o=!0)}return o}(t,i,n)||e.return}),{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",function(e){return(t,[n,i])=>{const o=n.is("documentFragment")?Array.from(n.getChildren()):[n];if(!o.length)return;const r=(i?e.createSelection(i):e.document.selection).getFirstPosition();let s;if(Vc(r.parent))s=r.parent;else{if(!Vc(r.nodeBefore))return;s=r.nodeBefore}e.change((e=>{const t=s.getAttribute("listType"),n=s.getAttribute("listIndent"),i=o[0].getAttribute("listIndent")||0,r=Math.max(n-i,0);for(const n of o){const i=Vc(n);s.is("element","listItem")&&n.is("element","paragraph")&&e.rename(n,"listItem"),e.setAttributes({listIndent:(i?n.getAttribute("listIndent"):0)+r,listItemId:i?n.getAttribute("listItemId"):zc.next(),listType:t},n)}}))}}(e),{priority:"high"}),this.listenTo(t,"outputTransformation",((t,n)=>{e.change((e=>{const t=Array.from(n.content.getChildren()),i=t[t.length-1];if(t.length>1&&i.is("element")&&i.isEmpty&&t.slice(0,-1).every(Vc)&&e.remove(i),"copy"==n.method||"cut"==n.method){const t=Array.from(n.content.getChildren());$c(t)&&Qc(t,e)}}))}))}}function Cd(e,t){const n=e.document.selection;if(!n.isCollapsed)return!Kc(e);if("forward"===t)return!0;const i=n.getFirstPosition().parent,o=i.previousSibling;return!e.schema.isObject(o)&&(!!o.isEmpty||$c([i,o]))}function vd(e,t,n,i){e.ui.componentFactory.add(t,(o=>{const r=e.commands.get(t),s=new u.ButtonView(o);return s.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),s}))}class yd extends e.Plugin{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;vd(this.editor,"numberedList",t("Numbered List"),e.icons.numberedList),vd(this.editor,"bulletedList",t("Bulleted List"),e.icons.bulletedList)}}class _d extends e.Plugin{static get requires(){return[wd,yd]}static get pluginName(){return"List"}}class xd extends e.Command{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,n=t.document;let i=Array.from(n.selection.getSelectedBlocks()).filter((e=>Vc(e)&&"numbered"==e.getAttribute("listType")));i=Gc(i),t.change((t=>{for(const n of i)t.setAttribute("listStart",e>=0?e:1,n)}))}_getValue(){const e=this.editor.model.document,n=(0,t.first)(e.selection.getSelectedBlocks());return n&&Vc(n)&&"numbered"==n.getAttribute("listType")?n.getAttribute("listStart"):null}}const Id={},Dd={},Ed={},Sd=[{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:n}of Sd)Id[e]=n,Dd[e]=t,t&&(Ed[t]=e);function Td(){return Sd.map((e=>e.listStyle))}function Md(e){return Id[e]||null}function Bd(e){return Ed[e]||null}function Ld(e){return Dd[e]||null}class Nd extends e.Command{constructor(e,t,n){super(e),this.defaultType=t,this._supportedTypes=n}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document;t.change((t=>{this._tryToConvertItemsToList(e);let i=Array.from(n.selection.getSelectedBlocks()).filter((e=>e.hasAttribute("listType")));if(i.length){i=Gc(i);for(const n of i)t.setAttribute("listStyle",e.type||this.defaultType,n)}}))}isStyleTypeSupported(e){return!this._supportedTypes||this._supportedTypes.includes(e)}_getValue(){const e=(0,t.first)(this.editor.model.document.selection.getSelectedBlocks());return Vc(e)?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),n=e.commands.get("bulletedList");return t.isEnabled||n.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=Md(e.type);if(!t)return;const n=this.editor,i=`${t}List`;n.commands.get(i).value||n.execute(i)}}class jd extends e.Command{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,n=t.document;let i=Array.from(n.selection.getSelectedBlocks()).filter((e=>Vc(e)&&"numbered"==e.getAttribute("listType")));i=Gc(i),t.change((t=>{for(const n of i)t.setAttribute("listReversed",!!e.reversed,n)}))}_getValue(){const e=this.editor.model.document,n=(0,t.first)(e.selection.getSelectedBlocks());return Vc(n)&&"numbered"==n.getAttribute("listType")?n.getAttribute("listReversed"):null}}function zd(e){return(t,n,i)=>{const{writer:o,schema:r,consumable:s}=i;if(!1===s.test(n.viewItem,e.viewConsumables))return;n.modelRange||Object.assign(n,i.convertChildren(n.viewItem,n.modelCursor));let l=!1;for(const t of n.modelRange.getItems({shallow:!0}))r.checkAttribute(t,e.attributeName)&&e.appliesToListItem(t)&&(t.hasAttribute(e.attributeName)||(o.setAttribute(e.attributeName,e.getAttributeOnUpcast(n.viewItem),t),l=!0));l&&s.consume(n.viewItem,e.viewConsumables)}}class Vd extends e.Plugin{static get pluginName(){return"ListPropertiesUtils"}getAllSupportedStyleTypes(){return Td()}getListTypeFromListStyleType(e){return Md(e)}getListStyleTypeFromTypeAttribute(e){return Bd(e)}getTypeAttributeFromListStyleType(e){return Ld(e)}}const Od="default";class Pd extends e.Plugin{static get requires(){return[wd,Vd]}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,n=e.plugins.get(wd),i=function(e){const t=[];if(e.styles){const n="object"==typeof e.styles&&e.styles.useAttribute;t.push({attributeName:"listStyle",defaultValue:Od,viewConsumables:{styles:"list-style-type"},addCommand(e){let t=Td();n&&(t=t.filter((e=>!!Ld(e)))),e.commands.add("listStyle",new Nd(e,Od,t))},appliesToListItem(e){return"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==Od||Md(t)==e.getAttribute("listType")},setAttributeOnDowncast(e,t,i){if(t&&t!==Od){if(!n)return void e.setStyle("list-style-type",t,i);{const n=Ld(t);if(n)return void e.setAttribute("type",n,i)}}e.removeStyle("list-style-type",i),e.removeAttribute("type",i)},getAttributeOnUpcast(e){const t=e.getStyle("list-style-type");if(t)return t;const n=e.getAttribute("type");return n?Bd(n):Od}})}return e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(e){e.commands.add("listReversed",new jd(e))},appliesToListItem(e){return"numbered"==e.getAttribute("listType")},hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listReversed")},setAttributeOnDowncast(e,t,n){t?e.setAttribute("reversed","reversed",n):e.removeAttribute("reversed",n)},getAttributeOnUpcast(e){return e.hasAttribute("reversed")}}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(e){e.commands.add("listStart",new xd(e))},appliesToListItem(e){return"numbered"==e.getAttribute("listType")},hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listStart")},setAttributeOnDowncast(e,t,n){0==t||t>1?e.setAttribute("start",t,n):e.removeAttribute("start",n)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));for(const o of i)o.addCommand(e),t.schema.extend("$listItem",{allowAttributes:o.attributeName}),n.registerDowncastStrategy({scope:"list",attributeName:o.attributeName,setAttributeOnDowncast(e,t,n){o.setAttributeOnDowncast(e,t,n)}});e.conversion.for("upcast").add((e=>{for(const t of i)e.on("element:ol",zd(t)),e.on("element:ul",zd(t))})),n.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:n})=>{for(const o of i)o.getAttributeOnUpcast(t)!=n[o.attributeName]&&(e.return=!0,e.stop())})),this.listenTo(e.commands.get("indentList"),"afterExecute",((e,n)=>{t.change((e=>{for(const t of n)for(const n of i)n.appliesToListItem(t)&&e.setAttribute(n.attributeName,n.defaultValue,t)}))})),n.on("postFixer",((e,{listNodes:t,writer:n})=>{for(const{node:o}of t)for(const t of i)t.hasValidAttribute(o)||(t.appliesToListItem(o)?n.setAttribute(t.attributeName,t.defaultValue,o):n.removeAttribute(t.attributeName,o),e.return=!0)})),n.on("postFixer",((e,{listNodes:t,writer:n})=>{for(const{node:o,previousNodeInList:r}of t)if(r&&r.getAttribute("listType")==o.getAttribute("listType"))for(const t of i){const{attributeName:i}=t;if(!t.appliesToListItem(o))continue;const s=r.getAttribute(i);o.getAttribute(i)!=s&&(n.setAttribute(i,s,o),e.return=!0)}}))}}var Fd=n(8840);L()(Fd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Fd.Z.locals;class Rd extends u.View{constructor(e,{enabledProperties:n,styleButtonViews:i,styleGridAriaLabel:o}){super(e),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.focusables=new u.ViewCollection;const r=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new u.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),n.styles?(this.stylesView=this._createStylesView(i,o),this.children.add(this.stylesView)):r.push("ck-list-properties_without-styles"),(n.startIndex||n.reversed)&&(this._addNumberedListPropertyViews(n),r.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:r},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);(0,u.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>t.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const 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,n){const i=new u.View(this.locale);return i.children=i.createCollection(),i.children.addMany(e),i.setTemplate({tag:"div",attributes:{"aria-label":n,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 t.FocusTracker,i.keystrokes=new t.KeystrokeHandler,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(e){const t=this.locale.t,n=[];e.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),n.push(this.startIndexFieldView)),e.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),n.push(this.reversedSwitchButtonView)),e.styles?(this.additionalPropertiesCollapsibleView=new u.CollapsibleView(this.locale,n),this.additionalPropertiesCollapsibleView.set({label:t("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(n,"isEnabled",((...e)=>e.some((e=>e)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((e,t,n)=>{n||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(n)}_createStartIndexField(){const e=this.locale.t,t=new u.LabeledFieldView(this.locale,u.createLabeledInputNumber);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 n=t.fieldView.element,i=n.valueAsNumber;Number.isNaN(i)||(n.checkValidity()?this.fire("listStart",{startIndex:i}):t.errorText=e("Start index must be greater than 0."))})),t}_createReversedSwitchButton(){const e=this.locale.t,t=new u.SwitchButtonView(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}}var Ud=n(4017);L()(Ud.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ud.Z.locals;class Hd extends e.Plugin{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,n=t.locale.t,i=t.config.get("list.properties");i.styles&&t.ui.componentFactory.add("bulletedList",Gd({editor:t,parentCommandName:"bulletedList",buttonLabel:n("Bulleted List"),buttonIcon:e.icons.bulletedList,styleGridAriaLabel:n("Bulleted list styles toolbar"),styleDefinitions:[{label:n("Toggle the disc list style"),tooltip:n("Disc"),type:"disc",icon:''},{label:n("Toggle the circle list style"),tooltip:n("Circle"),type:"circle",icon:''},{label:n("Toggle the square list style"),tooltip:n("Square"),type:"square",icon:''}]})),(i.styles||i.startIndex||i.reversed)&&t.ui.componentFactory.add("numberedList",Gd({editor:t,parentCommandName:"numberedList",buttonLabel:n("Numbered List"),buttonIcon:e.icons.numberedList,styleGridAriaLabel:n("Numbered list styles toolbar"),styleDefinitions:[{label:n("Toggle the decimal list style"),tooltip:n("Decimal"),type:"decimal",icon:''},{label:n("Toggle the decimal with leading zero list style"),tooltip:n("Decimal with leading zero"),type:"decimal-leading-zero",icon:''},{label:n("Toggle the lower–roman list style"),tooltip:n("Lower–roman"),type:"lower-roman",icon:''},{label:n("Toggle the upper–roman list style"),tooltip:n("Upper-roman"),type:"upper-roman",icon:''},{label:n("Toggle the lower–latin list style"),tooltip:n("Lower-latin"),type:"lower-latin",icon:''},{label:n("Toggle the upper–latin list style"),tooltip:n("Upper-latin"),type:"upper-latin",icon:''}]}))}}function Gd({editor:e,parentCommandName:t,buttonLabel:n,buttonIcon:i,styleGridAriaLabel:o,styleDefinitions:r}){const s=e.commands.get(t);return l=>{const a=(0,u.createDropdown)(l,u.SplitButtonView),c=a.buttonView;return a.bind("isEnabled").to(s),a.class="ck-list-styles-dropdown",c.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),c.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(s,"value",(e=>!!e)),a.once("change:isOpen",(()=>{const n=function({editor:e,dropdownView:t,parentCommandName:n,styleDefinitions:i,styleGridAriaLabel:o}){const r=e.locale,s=e.config.get("list.properties");let l=null;if("numberedList"!=n&&(s.startIndex=!1,s.reversed=!1),s.styles){const t=e.commands.get("listStyle"),o=function({editor:e,listStyleCommand:t,parentCommandName:n}){const i=e.locale,o=e.commands.get(n);return({label:n,type:r,icon:s,tooltip:l})=>{const a=new u.ButtonView(i);return a.set({label:n,icon:s,tooltip:l}),t.on("change:value",(()=>{a.isOn=t.value===r})),a.on("execute",(()=>{o.value?t.value!==r?e.execute("listStyle",{type:r}):e.execute("listStyle",{type:t.defaultType}):e.model.change((()=>{e.execute("listStyle",{type:r})}))})),a}}({editor:e,parentCommandName:n,listStyleCommand:t}),r="function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0;l=i.filter(r).map(o)}const a=new Rd(r,{styleGridAriaLabel:o,enabledProperties:s,styleButtonViews:l});if(s.styles&&(0,u.focusChildOnDropdownOpen)(t,(()=>a.stylesView.children.find((e=>e.isOn)))),s.startIndex){const t=e.commands.get("listStart");a.startIndexFieldView.bind("isEnabled").to(t),a.startIndexFieldView.fieldView.bind("value").to(t),a.on("listStart",((t,n)=>e.execute("listStart",n)))}if(s.reversed){const t=e.commands.get("listReversed");a.reversedSwitchButtonView.bind("isEnabled").to(t),a.reversedSwitchButtonView.bind("isOn").to(t,"value",(e=>!!e)),a.on("listReversed",(()=>{const n=t.value;e.execute("listReversed",{reversed:!n})}))}return a.delegate("execute").to(t),a}({editor:e,dropdownView:a,parentCommandName:t,styleGridAriaLabel:o,styleDefinitions:r});a.panelView.children.add(n)})),a.on("execute",(()=>{e.editing.view.focus()})),a}}class Wd extends e.Plugin{static get requires(){return[Pd,Hd]}static get pluginName(){return"ListProperties"}}class Yd extends e.Command{constructor(e){super(e),this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){const e=this._getSelectedItems();this.value=this._getValue(e),this.isEnabled=!!e.length}execute(e={}){this.editor.model.change((t=>{const n=this._getSelectedItems(),i=void 0===e.forceValue?!this._getValue(n):e.forceValue;for(const e of n)i?t.setAttribute("todoListChecked",!0,e):t.removeAttribute("todoListChecked",e)}))}_getValue(e){return e.every((e=>e.getAttribute("todoListChecked")))}_getSelectedItems(){const e=this.editor.model,t=e.schema,n=e.document.selection.getFirstRange(),i=n.start.parent,o=[];t.checkAttribute(i,"todoListChecked")&&o.push(...Oc(i));for(const e of n.getItems({shallow:!0}))t.checkAttribute(e,"todoListChecked")&&!o.includes(e)&&o.push(...Oc(e));return o}}class Zd extends b.DomEventObserver{constructor(){super(...arguments),this.domEventType=["change"]}onDomEvent(e){if(e.target){const t=this.view.domConverter.mapDomToView(e.target);t&&t.is("element","input")&&"checkbox"==t.getAttribute("type")&&t.findAncestor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",e)}}}const Qd=(0,t.parseKeystroke)("Ctrl+Enter");class $d extends e.Plugin{static get pluginName(){return"TodoListEditing"}static get requires(){return[wd]}init(){const e=this.editor,n=e.model,i=e.editing,o=e.plugins.get(wd),r=e.config.get("list.multiBlock")?"paragraph":"listItem";e.commands.add("todoList",new nd(e,"todo")),e.commands.add("checkTodoList",new Yd(e)),i.view.addObserver(Zd),n.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),n.schema.addAttributeCheck(((e,t)=>{const n=e.last;if("todoListChecked"==t)return!(!n.getAttribute("listItemId")||"todo"!=n.getAttribute("listType"))&&void 0})),e.conversion.for("upcast").add((e=>{e.on("element:input",((e,t,n)=>{const i=t.modelCursor,o=i.parent,r=t.viewItem;if(!n.consumable.test(r,{name:!0}))return;if("checkbox"!=r.getAttribute("type")||!i.isAtStart||!o.hasAttribute("listType"))return;n.consumable.consume(r,{name:!0});const s=n.writer;s.setAttribute("listType","todo",o),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,o),t.modelRange=s.createRange(i)})),e.on("element:label",qd({name:"label",classes:"todo-list__label"})),e.on("element:label",qd({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),e.on("element:span",qd({name:"span",classes:"todo-list__label__description"})),e.on("element:ul",function(e){const t=new b.Matcher({name:"ul",classes:"todo-list"});return(e,n,i)=>{const o=t.match(n.viewItem);if(!o)return;const r=o.match;r.name=!1,i.consumable.consume(n.viewItem,r)}}())})),e.conversion.for("downcast").elementToElement({model:r,view:(e,{writer:t})=>{if(Kd(e,o.getListAttributeNames()))return t.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),o.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(e,t,n){"todo"==t?e.addClass("todo-list",n):e.removeClass("todo-list",n)}}),o.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(e,t,{dataPipeline:n}){if("todo"!=t.getAttribute("listType"))return null;const i=e.createEmptyElement("input",{type:"checkbox",...t.getAttribute("todoListChecked")?{checked:"checked"}:null,...n?{disabled:"disabled"}:{tabindex:"-1"}});return n?i:e.createContainerElement("span",{contenteditable:"false"},i)},canWrapElement(e){return Kd(e,o.getListAttributeNames())},createWrapperElement(e,t,{dataPipeline:n}){const i=["todo-list__label"];return Kd(t,o.getListAttributeNames())||i.push("todo-list__label_without-description"),e.createAttributeElement(n?"label":"span",{class:i.join(" ")})}}),i.mapper.registerViewToModelLength("input",(e=>"checkbox"==e.getAttribute("type")&&e.findAncestor({classes:"todo-list__label"})?0:i.mapper.toModelElement(e)?1:0)),o.on("checkElement",((e,{modelElement:t,viewElement:n})=>{const i=Kd(t,o.getListAttributeNames());n.hasClass("todo-list__label__description")!=i&&(e.return=!0,e.stop())})),o.on("checkElement",((t,{modelElement:n,viewElement:i})=>{const o="todo"==n.getAttribute("listType")&&Rc(n);let r=!1;const s=e.editing.view.createPositionBefore(i).getWalker({direction:"backward"});for(const{item:t}of s){if(t.is("element")&&e.editing.mapper.toModelElement(t))break;t.is("element","input")&&"checkbox"==t.getAttribute("type")&&(r=!0)}r!=o&&(t.return=!0,t.stop())})),o.on("postFixer",((e,{listNodes:t,writer:n})=>{for(const{node:i,previousNodeInList:o}of t){if(!o)continue;if(o.getAttribute("listItemId")!=i.getAttribute("listItemId"))continue;const t=o.hasAttribute("todoListChecked"),r=i.hasAttribute("todoListChecked");r&&!t?(n.removeAttribute("todoListChecked",i),e.return=!0):!r&&t&&(n.setAttribute("todoListChecked",!0,i),e.return=!0)}})),n.document.registerPostFixer((e=>{const t=n.document.differ.getChanges();let i=!1;for(const n of t)if("attribute"==n.type&&"listType"==n.attributeKey){const t=n.range.start.nodeAfter;"todo"==n.attributeOldValue&&t.hasAttribute("todoListChecked")&&(e.removeAttribute("todoListChecked",t),i=!0)}else if("insert"==n.type&&"$text"!=n.name)for(const{item:t}of e.createRangeOn(n.position.nodeAfter))t.is("element")&&"todo"!=t.getAttribute("listType")&&t.hasAttribute("todoListChecked")&&(e.removeAttribute("todoListChecked",t),i=!0);return i})),this.listenTo(i.view.document,"keydown",((n,i)=>{(0,t.getCode)(i)===Qd&&(e.execute("checkTodoList"),n.stop())}),{priority:"high"}),this.listenTo(i.view.document,"todoCheckboxChange",((e,t)=>{const n=t.target;if(!n||!n.is("element","input"))return;const o=i.view.createPositionAfter(n),r=i.mapper.toModelPosition(o).parent;r&&Vc(r)&&"todo"==r.getAttribute("listType")&&this._handleCheckmarkChange(r)})),this.listenTo(i.view.document,"arrowKey",function(e,n){return(i,o)=>{const r=(0,t.getLocalizedArrowKeyCodeDirection)(o.keyCode,n.contentLanguageDirection),s=e.schema,l=e.document.selection;if(!l.isCollapsed)return;const a=l.getFirstPosition(),c=a.parent;if("right"==r&&a.isAtEnd){const t=s.getNearestSelectionRange(e.createPositionAfter(c),"forward");if(!t)return;const n=t.start.parent;n&&Vc(n)&&"todo"==n.getAttribute("listType")&&(e.change((e=>e.setSelection(t))),o.preventDefault(),o.stopPropagation(),i.stop())}else if("left"==r&&a.isAtStart&&Vc(c)&&"todo"==c.getAttribute("listType")){const t=s.getNearestSelectionRange(e.createPositionBefore(c),"backward");if(!t)return;e.change((e=>e.setSelection(t))),o.preventDefault(),o.stopPropagation(),i.stop()}}}(n,e.locale),{context:"$text"}),this.listenTo(i.mapper,"viewToModelPosition",((e,t)=>{const i=t.viewPosition.parent,o=i.is("attributeElement","li")&&0==t.viewPosition.offset,r=Jd(i)&&t.viewPosition.offset<=1,s=i.is("element","span")&&"false"==i.getAttribute("contenteditable")&&Jd(i.parent);if(!o&&!r&&!s)return;const l=t.modelPosition.nodeAfter;l&&"todo"==l.getAttribute("listType")&&(t.modelPosition=n.createPositionAt(l,0))}),{priority:"low"})}_handleCheckmarkChange(e){const t=this.editor,n=t.model,i=Array.from(n.document.selection.getRanges());n.change((n=>{n.setSelection(e,"end"),t.execute("checkTodoList"),n.setSelection(i)}))}}function qd(e){const t=new b.Matcher(e);return(e,n,i)=>{const o=t.match(n.viewItem);o&&i.consumable.consume(n.viewItem,o.match)&&Object.assign(n,i.convertChildren(n.viewItem,n.modelCursor))}}function Kd(e,t){return(e.is("element","paragraph")||e.is("element","listItem"))&&"todo"==e.getAttribute("listType")&&Rc(e)&&function(e,t){for(const n of e.getAttributeKeys())if(!n.startsWith("selection:")&&!t.includes(n))return!1;return!0}(e,t)}function Jd(e){return!!e&&e.is("attributeElement")&&e.hasClass("todo-list__label")}class Xd extends e.Plugin{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;vd(this.editor,"todoList",t("To-do List"),e.icons.todoList)}}var eu=n(2961);L()(eu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),eu.Z.locals;class tu extends e.Plugin{static get requires(){return[$d,Xd]}static get pluginName(){return"TodoList"}}(0,t.parseKeystroke)("Ctrl+Enter");class nu extends e.Plugin{static get requires(){return[_d]}static get pluginName(){return"DocumentList"}constructor(e){super(e),(0,t.logWarning)("plugin-obsolete-documentlist",{pluginName:"DocumentList"})}}class iu extends e.Plugin{static get requires(){return[Wd]}static get pluginName(){return"DocumentListProperties"}constructor(e){super(e),(0,t.logWarning)("plugin-obsolete-documentlistproperties",{pluginName:"DocumentListProperties"})}}class ou extends e.Plugin{static get requires(){return[tu]}static get pluginName(){return"TodoDocumentList"}constructor(e){super(e),(0,t.logWarning)("plugin-obsolete-tododocumentlist",{pluginName:"TodoDocumentList"})}}function ru(e,t){const n=(n,i,o)=>{if(!o.consumable.consume(i.item,n.name))return;const r=i.attributeNewValue,s=o.writer,l=o.mapper.toViewElement(i.item),a=[...l.getChildren()].find((e=>e.getCustomProperty("media-content")));s.remove(a);const c=e.getMediaViewElement(s,r,t);s.insert(s.createPositionAt(l,0),c)};return e=>{e.on("attribute:url:media",n)}}function su(e){const t=e.getSelectedElement();return t&&function(e){return!!e.getCustomProperty("media")&&(0,A.isWidget)(e)}(t)?t:null}function lu(e,t,n,i){return e.createContainerElement("figure",{class:"media"},[t.getMediaViewElement(e,n,i),e.createSlot()])}function au(e){const t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function cu(e,t,n,i){e.change((o=>{const r=o.createElement("media",{url:t});e.insertObject(r,n,null,{setSelection:"on",findOptimalPosition:i?"auto":void 0})}))}class du extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,n=au(t);this.value=n?n.getAttribute("url"):void 0,this.isEnabled=function(e){const t=e.getSelectedElement();return!!t&&"media"===t.name}(t)||function(e,t){let n=(0,A.findOptimalInsertionRange)(e,t).start.parent;return n.isEmpty&&!t.schema.isLimit(n)&&(n=n.parent),t.schema.checkChild(n,"media")}(t,e)}execute(e){const t=this.editor.model,n=t.document.selection,i=au(n);i?t.change((t=>{t.setAttribute("url",e,i)})):cu(t,e,n,!0)}}class uu{constructor(e,n){const i=n.providers,o=n.extraProviders||[],r=new Set(n.removeProviders),s=i.concat(o).filter((e=>{const n=e.name;return n?!r.has(n):((0,t.logWarning)("media-embed-no-provider-name",{provider:e}),!1)}));this.locale=e,this.providerDefinitions=s}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,n){return this._getMedia(t).getViewElement(e,n)}_getMedia(e){if(!e)return new mu(this.locale);e=e.trim();for(const n of this.providerDefinitions){const i=n.html,o=(0,t.toArray)(n.url);for(const t of o){const n=this._getUrlMatches(e,t);if(n)return new mu(this.locale,e,n,i)}}return null}_getUrlMatches(e,t){let n=e.match(t);if(n)return n;let i=e.replace(/^https?:\/\//,"");return n=i.match(t),n||(i=i.replace(/^www\./,""),n=i.match(t),n||null)}}class mu{constructor(e,t,n,i){this.url=this._getValidUrl(t),this._locale=e,this._match=n,this._previewRenderer=i}getViewElement(e,t){const n={};let i;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),t.renderForEditingView&&(n.class="ck-media__wrapper");const o=this._getPreviewHtml(t);i=e.createRawElement("div",n,((e,t)=>{t.setContentOf(e,o)}))}else this.url&&(n.url=this.url),i=e.createEmptyElement(t.elementName,n);return e.setCustomProperty("media-content",!0,i),i}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new u.IconView,t=this._locale.t;return e.content='',e.viewBox="0 0 64 42",new u.Template({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":t("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}var gu=n(4801);L()(gu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gu.Z.locals;class hu extends e.Plugin{static get pluginName(){return"MediaEmbedEditing"}constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:e=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>`
`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:e=>{const t=e[1],n=e[2];return`
`}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>`
`},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new uu(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,n=e.model.schema,i=e.t,o=e.conversion,r=e.config.get("mediaEmbed.previewsInData"),s=e.config.get("mediaEmbed.elementName"),l=this.registry;e.commands.add("mediaEmbed",new du(e)),n.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),o.for("dataDowncast").elementToStructure({model:"media",view:(e,{writer:t})=>{const n=e.getAttribute("url");return lu(t,l,n,{elementName:s,renderMediaPreview:!!n&&r})}}),o.for("dataDowncast").add(ru(l,{elementName:s,renderMediaPreview:r})),o.for("editingDowncast").elementToStructure({model:"media",view:(e,{writer:t})=>{const n=e.getAttribute("url");return function(e,t,n){return t.setCustomProperty("media",!0,e),(0,A.toWidget)(e,t,{label:n})}(lu(t,l,n,{elementName:s,renderForEditingView:!0}),t,i("media widget"))}}),o.for("editingDowncast").add(ru(l,{elementName:s,renderForEditingView:!0})),o.for("upcast").elementToElement({view:e=>["oembed",s].includes(e.name)&&e.getAttribute("url")?{name:!0}:null,model:(e,{writer:t})=>{const n=e.getAttribute("url");return l.hasMedia(n)?t.createElement("media",{url:n}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,{writer:t})=>{const n=e.getAttribute("data-oembed-url");return l.hasMedia(n)?t.createElement("media",{url:n}):null}}).add((e=>{e.on("element:figure",((e,n,i)=>{if(!i.consumable.consume(n.viewItem,{name:!0,classes:"media"}))return;const{modelRange:o,modelCursor:r}=i.convertChildren(n.viewItem,n.modelCursor);n.modelRange=o,n.modelCursor=r,(0,t.first)(o.getItems())||i.consumable.revert(n.viewItem,{name:!0,classes:"media"})}))}))}}const pu=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class bu extends e.Plugin{static get requires(){return[p.Clipboard,k.Delete,f.Undo]}static get pluginName(){return"AutoMediaEmbed"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,n=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",(()=>{const e=n.selection.getFirstRange(),t=b.LivePosition.fromPosition(e.start);t.stickiness="toPrevious";const i=b.LivePosition.fromPosition(e.end);i.stickiness="toNext",n.once("change:data",(()=>{this._embedMediaBetweenPositions(t,i),t.detach(),i.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(t.global.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedMediaBetweenPositions(e,n){const i=this.editor,o=i.plugins.get(hu).registry,r=new b.LiveRange(e,n),s=r.getWalker({ignoreElementEnd:!0});let l="";for(const e of s)e.item.is("$textProxy")&&(l+=e.item.data);l=l.trim(),l.match(pu)&&o.hasMedia(l)&&i.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=b.LivePosition.fromPosition(e),this._timeoutId=t.global.window.setTimeout((()=>{i.model.change((e=>{this._timeoutId=null,e.remove(r),r.detach();let t=null;"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),cu(i.model,l,t,!1),this._positionToInsert.detach(),this._positionToInsert=null})),i.plugins.get(k.Delete).requestUndoOnBackspace()}),100)):r.detach()}}var fu=n(4615);L()(fu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),fu.Z.locals;class ku extends u.View{constructor(n,i){super(i);const o=i.t;this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(o("Save"),e.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.saveButtonView.bind("isEnabled").to(this,"mediaURLInputValue",(e=>!!e)),this.cancelButtonView=this._createButton(o("Cancel"),e.icons.cancel,"ck-button-cancel","cancel"),this._focusables=new u.ViewCollection,this._focusCycler=new u.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=n,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),(0,u.submitHandler)({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),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()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.element.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new u.LabeledFieldView(this.locale,u.createLabeledInputText),n=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,n.on("input",(()=>{t.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()})),t}_createButton(e,t,n,i){const o=new u.ButtonView(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}}class Au extends e.Plugin{static get requires(){return[hu]}static get pluginName(){return"MediaEmbedUI"}init(){const e=this.editor,t=e.commands.get("mediaEmbed");e.ui.componentFactory.add("mediaEmbed",(e=>{const n=(0,u.createDropdown)(e);return this._setUpDropdown(n,t),n}))}_setUpDropdown(e,t){const n=this.editor,i=n.t,o=e.buttonView,r=n.plugins.get(hu).registry;e.once("change:isOpen",(()=>{const i=new((0,u.CssTransitionDisablerMixin)(ku))(function(e,t){return[t=>{if(!t.url.length)return e("The URL must not be empty.")},n=>{if(!t.hasMedia(n.url))return e("This media URL is not supported.")}]}(n.t,r),n.locale);e.panelView.children.add(i),o.on("open",(()=>{i.disableCssTransitions(),i.url=t.value||"",i.urlInputView.fieldView.select(),i.enableCssTransitions()}),{priority:"low"}),e.on("submit",(()=>{i.isValid()&&(n.execute("mediaEmbed",i.url),n.editing.view.focus())})),e.on("change:isOpen",(()=>i.resetFormStatus())),e.on("cancel",(()=>{n.editing.view.focus()})),i.delegate("submit","cancel").to(e),i.urlInputView.fieldView.bind("value").to(t,"value"),i.urlInputView.bind("isEnabled").to(t,"isEnabled")})),e.bind("isEnabled").to(t),o.set({label:i("Insert media"),icon:'',tooltip:!0})}}var wu=n(2146);L()(wu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),wu.Z.locals;class Cu extends e.Plugin{static get requires(){return[hu,Au,bu,A.Widget]}static get pluginName(){return"MediaEmbed"}}class vu extends e.Plugin{static get requires(){return[A.WidgetToolbarRepository]}static get pluginName(){return"MediaEmbedToolbar"}afterInit(){const e=this.editor,t=e.t;e.plugins.get(A.WidgetToolbarRepository).register("mediaEmbed",{ariaLabel:t("Media toolbar"),items:e.config.get("mediaEmbed.toolbar")||[],getRelatedElement:su})}}class yu extends e.Command{refresh(){const e=this.editor.model,t=e.schema,n=e.document.selection;this.isEnabled=function(e,t,n){const i=function(e,t){const n=(0,A.findOptimalInsertionRange)(e,t).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}(e,n);return t.checkChild(i,"pageBreak")}(n,t,e)}execute(){const e=this.editor.model;e.change((t=>{const n=t.createElement("pageBreak");e.insertObject(n,null,null,{setSelection:"after"})}))}}var _u=n(8577);L()(_u.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),_u.Z.locals;class xu extends e.Plugin{static get pluginName(){return"PageBreakEditing"}init(){const e=this.editor,t=e.model.schema,n=e.t,i=e.conversion;t.register("pageBreak",{inheritAllFrom:"$blockObject"}),i.for("dataDowncast").elementToStructure({model:"pageBreak",view:(e,{writer:t})=>t.createContainerElement("div",{class:"page-break",style:"page-break-after: always"},t.createContainerElement("span",{style:"display: none"}))}),i.for("editingDowncast").elementToStructure({model:"pageBreak",view:(e,{writer:t})=>{const i=n("Page break"),o=t.createContainerElement("div"),r=t.createRawElement("span",{class:"page-break__label"},(function(e){e.innerText=n("Page break")}));return t.addClass("page-break",o),t.insert(t.createPositionAt(o,0),r),function(e,t,n){return t.setCustomProperty("pageBreak",!0,e),(0,A.toWidget)(e,t,{label:n})}(o,t,i)}}),i.for("upcast").elementToElement({view:e=>{const t="always"==e.getStyle("page-break-before"),n="always"==e.getStyle("page-break-after");if(!t&&!n)return null;if(1==e.childCount){const t=e.getChild(0);if(!t.is("element","span")||"none"!=t.getStyle("display"))return null}else if(e.childCount>1)return null;return{name:!0}},model:"pageBreak",converterPriority:"high"}),e.commands.add("pageBreak",new yu(e))}}class Iu extends e.Plugin{static get pluginName(){return"PageBreakUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("pageBreak",(n=>{const i=e.commands.get("pageBreak"),o=new u.ButtonView(n);return o.set({label:t("Page break"),icon:'',tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{e.execute("pageBreak"),e.editing.view.focus()})),o}))}}class Du extends e.Plugin{static get requires(){return[xu,Iu,A.Widget]}static get pluginName(){return"PageBreak"}}function Eu(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 Su(e,t,n){const i=t.parent,o=n.createElement(e.type),r=i.getChildIndex(t)+1;return n.insertChild(r,o,i),e.style&&n.setStyle("list-style-type",e.style,o),e.startIndex&&e.startIndex>1&&n.setAttribute("start",e.startIndex,o),o}function Tu(e){const t={},n=e.getStyle("mso-list");if(n){const e=n.match(/(^|\s{1,100})l(\d+)/i),i=n.match(/\s{0,100}lfo(\d+)/i),o=n.match(/\s{0,100}level(\d+)/i);e&&i&&o&&(t.id=e[2],t.order=i[1],t.indent=parseInt(o[1]))}return t}const Mu=//i,Bu=/xmlns:o="urn:schemas-microsoft-com/i;class Lu{constructor(e){this.document=e}isActive(e){return Mu.test(e)||Bu.test(e)}execute(e){const{body:t,stylesString:n}=e._parsedData;(function(e,t){if(!e.childCount)return;const n=new b.UpcastWriter(e.document),i=function(e,t){const n=t.createRangeIn(e),i=new b.Matcher({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),o=[];for(const e of n)if("elementStart"===e.type&&i.match(e.item)){const t=Tu(e.item);o.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return o}(e,n);if(!i.length)return;let o=null,r=1;i.forEach(((e,s)=>{const l=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const n=t.element.previousSibling;return!n||!((i=n).is("element","ol")||i.is("element","ul"));var i}(i[s-1],e),a=(d=e,(c=l?null:i[s-1])?d.indent-c.indent:d.indent-1);var c,d;if(l&&(o=null,r=1),!o||0!==a){const i=function(e,t){const n=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,o=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi").exec(t);let r="decimal",s="ol",l=null;if(o&&o[1]){const t=n.exec(o[1]);if(t&&t[1]&&(r=t[1].trim(),s="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 n=t._data;return"o"===n?"circle":"·"===n?"disc":"§"===n?"square":null}(e.element);t&&(r=t)}else{const e=i.exec(o[1]);e&&e[1]&&(l=parseInt(e[1]))}}return{type:s,startIndex:l,style:Eu(r)}}(e,t);if(o){if(e.indent>r){const e=o.getChild(o.childCount-1),t=e.getChild(e.childCount-1);o=Su(i,t,n),r+=1}else if(e.indente.indexOf(t)>-1))?r.push(n):n.getAttribute("src")||r.push(n)}for(const e of r)n.remove(e)}(i,e,n),function(e,t,n){const i=n.createRangeIn(t),o=[];for(const t of i)if("elementStart"==t.type&&t.item.is("element","v:shape")){const n=t.item.getAttribute("id");if(e.includes(n))continue;r(t.item.parent.getChildren(),n)||o.push(t.item)}for(const e of o){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const i=n.createElement("img",t);n.insertChild(e.index+1,i,e.parent)}function r(e,t){for(const n of e)if(n.is("element")){if("img"==n.name&&n.getAttribute("v:shapes")==t)return!0;if(r(n.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(i,e,n),function(e,t){const n=t.createRangeIn(e),i=new b.Matcher({name:/v:(.+)/}),o=[];for(const e of n)"elementStart"==e.type&&i.match(e.item)&&o.push(e.item);for(const e of o)t.remove(e)}(e,n);const o=function(e,t){const n=t.createRangeIn(e),i=new b.Matcher({name:"img"}),o=[];for(const e of n)e.item.is("element")&&i.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&o.push(e.item);return o}(e,n);o.length&&function(e,t,n){if(e.length===t.length)for(let o=0;oString.fromCharCode(parseInt(e,16)))).join(""))}`;n.setAttribute("src",r,e[o])}var i}(o,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),i=e.match(n),o=[];if(i)for(const e of i){let n=!1;e.includes("\\pngblip")?n="image/png":e.includes("\\jpegblip")&&(n="image/jpeg"),n&&o.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:n})}return o}(t),n)}(t,e.dataTransfer.getData("text/rtf")),function(e){const t=[],n=new b.UpcastWriter(e.document);for(const{item:i}of n.createRangeIn(e))if(i.is("element")){for(const e of i.getClassNames())/\bmso/gi.exec(e)&&n.removeClass(e,i);for(const e of i.getStyleNames())/\bmso/gi.exec(e)&&n.removeStyle(e,i);i.is("element","w:sdt")&&t.push(i)}for(const e of t){const t=e.parent,i=t.getChildIndex(e);n.insertChild(i,e.getChildren(),t),n.remove(e)}}(t),e.content=t}}function Nu(e,t,n,{blockElements:i,inlineObjectElements:o}){let r=n.createPositionAt(e,"forward"==t?"after":"before");return r=r.getLastMatchingPosition((({item:e})=>e.is("element")&&!i.includes(e.name)&&!o.includes(e.name)),{direction:t}),"forward"==t?r.nodeAfter:r.nodeBefore}function ju(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const zu=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class Vu{constructor(e){this.document=e}isActive(e){return zu.test(e)}execute(e){const t=new b.UpcastWriter(this.document),{body:n}=e._parsedData;!function(e,t){for(const n of e.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const i=e.getChildIndex(n);t.remove(n),t.insertChild(i,n.getChildren(),e)}}(n,t),function(e,t){for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("element","li")){const n=e.getChild(0);n&&n.is("element","p")&&t.unwrapElement(n)}}}(n,t),function(e,t){const n=new b.ViewDocument(t.document.stylesProcessor),i=new b.DomConverter(n,{renderingMode:"data"}),o=i.blockElements,r=i.inlineObjectElements,s=[];for(const n of t.createRangeIn(e)){const e=n.item;if(e.is("element","br")){const n=Nu(e,"forward",t,{blockElements:o,inlineObjectElements:r}),i=Nu(e,"backward",t,{blockElements:o,inlineObjectElements:r}),l=ju(n,o);(ju(i,o)||l)&&s.push(e)}}for(const e of s)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(n,t),e.content=n}}const Ou=/(\s+)<\/span>/g,((e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length)))}class Ru extends e.Plugin{static get pluginName(){return"PasteFromOffice"}static get requires(){return[p.ClipboardPipeline]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),n=e.editing.view.document,i=[];i.push(new Lu(n)),i.push(new Vu(n)),i.push(new Pu(n)),t.on("inputTransformation",((t,o)=>{if(o._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const r=o.dataTransfer.getData("text/html"),s=i.find((e=>e.isActive(r)));s&&(o._parsedData||(o._parsedData=function(e,t){const n=new DOMParser,i=function(e){return Fu(Fu(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/()[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t="",n=e.indexOf(t);if(n<0)return e;const i=e.indexOf("",n+7);return e.substring(0,n+7)+(i>=0?e.substring(i):"")}(e=(e=e.replace(/`) in the editor data.\n *\n * For a detailed overview, check the {@glink features/html/html-comments HTML comment feature documentation}.\n */\nexport default class HtmlComment extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlComment';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const loadedCommentsContent = new Map();\n editor.data.processor.skipComments = false;\n // Allow storing comment's content as the $root attribute with the name `$comment:`.\n editor.model.schema.addAttributeCheck((context, attributeName) => {\n if (context.endsWith('$root') && attributeName.startsWith('$comment')) {\n return true;\n }\n });\n // Convert the `$comment` view element to `$comment:` marker and store its content (the comment itself) as a $root\n // attribute. The comment content is needed in the `dataDowncast` pipeline to re-create the comment node.\n editor.conversion.for('upcast').elementToMarker({\n view: '$comment',\n model: viewElement => {\n const markerUid = uid();\n const markerName = `$comment:${markerUid}`;\n const commentContent = viewElement.getCustomProperty('$rawContent');\n loadedCommentsContent.set(markerName, commentContent);\n return markerName;\n }\n });\n // Convert the `$comment` marker to `$comment` UI element with `$rawContent` custom property containing the comment content.\n editor.conversion.for('dataDowncast').markerToElement({\n model: '$comment',\n view: (modelElement, { writer }) => {\n let root = undefined;\n for (const rootName of this.editor.model.document.getRootNames()) {\n root = this.editor.model.document.getRoot(rootName);\n if (root.hasAttribute(modelElement.markerName)) {\n break;\n }\n }\n const markerName = modelElement.markerName;\n const commentContent = root.getAttribute(markerName);\n const comment = writer.createUIElement('$comment');\n writer.setCustomProperty('$rawContent', commentContent, comment);\n return comment;\n }\n });\n // Remove comments' markers and their corresponding $root attributes, which are moved to the graveyard.\n editor.model.document.registerPostFixer(writer => {\n let changed = false;\n const markers = editor.model.document.differ.getChangedMarkers().filter(marker => marker.name.startsWith('$comment:'));\n for (const marker of markers) {\n const { oldRange, newRange } = marker.data;\n if (oldRange && newRange && oldRange.root == newRange.root) {\n // The marker was moved in the same root. Don't do anything.\n continue;\n }\n if (oldRange) {\n // The comment marker was moved from one root to another (most probably to the graveyard).\n // Remove the related attribute from the previous root.\n const oldRoot = oldRange.root;\n if (oldRoot.hasAttribute(marker.name)) {\n writer.removeAttribute(marker.name, oldRoot);\n changed = true;\n }\n }\n if (newRange) {\n const newRoot = newRange.root;\n if (newRoot.rootName == '$graveyard') {\n // Comment marker was moved to the graveyard -- remove it entirely.\n writer.removeMarker(marker.name);\n changed = true;\n }\n else if (!newRoot.hasAttribute(marker.name)) {\n // Comment marker was just added or was moved to another root - updated roots attributes.\n //\n // Added fallback to `''` for the comment content in case if someone incorrectly added just the marker \"by hand\"\n // and forgot to add the root attribute or add them in different change blocks.\n //\n // It caused an infinite loop in one of the unit tests.\n writer.setAttribute(marker.name, loadedCommentsContent.get(marker.name) || '', newRoot);\n changed = true;\n }\n }\n }\n return changed;\n });\n // Delete all comment markers from the document before setting new data.\n editor.data.on('set', () => {\n for (const commentMarker of editor.model.markers.getMarkersGroup('$comment')) {\n this.removeHtmlComment(commentMarker.name);\n }\n }, { priority: 'high' });\n // Delete all comment markers that are within a removed range.\n // Delete all comment markers at the limit element boundaries if the whole content of the limit element is removed.\n editor.model.on('deleteContent', (evt, [selection]) => {\n for (const range of selection.getRanges()) {\n const limitElement = editor.model.schema.getLimitElement(range);\n const firstPosition = editor.model.createPositionAt(limitElement, 0);\n const lastPosition = editor.model.createPositionAt(limitElement, 'end');\n let affectedCommentIDs;\n if (firstPosition.isTouching(range.start) && lastPosition.isTouching(range.end)) {\n affectedCommentIDs = this.getHtmlCommentsInRange(editor.model.createRange(firstPosition, lastPosition));\n }\n else {\n affectedCommentIDs = this.getHtmlCommentsInRange(range, { skipBoundaries: true });\n }\n for (const commentMarkerID of affectedCommentIDs) {\n this.removeHtmlComment(commentMarkerID);\n }\n }\n }, { priority: 'high' });\n }\n /**\n * Creates an HTML comment on the specified position and returns its ID.\n *\n * *Note*: If two comments are created at the same position, the second comment will be inserted before the first one.\n *\n * @returns Comment ID. This ID can be later used to e.g. remove the comment from the content.\n */\n createHtmlComment(position, content) {\n const id = uid();\n const editor = this.editor;\n const model = editor.model;\n const root = model.document.getRoot(position.root.rootName);\n const markerName = `$comment:${id}`;\n return model.change(writer => {\n const range = writer.createRange(position);\n writer.addMarker(markerName, {\n usingOperation: true,\n affectsData: true,\n range\n });\n writer.setAttribute(markerName, content, root);\n return markerName;\n });\n }\n /**\n * Removes an HTML comment with the given comment ID.\n *\n * It does nothing and returns `false` if the comment with the given ID does not exist.\n * Otherwise it removes the comment and returns `true`.\n *\n * Note that a comment can be removed also by removing the content around the comment.\n *\n * @param commentID The ID of the comment to be removed.\n * @returns `true` when the comment with the given ID was removed, `false` otherwise.\n */\n removeHtmlComment(commentID) {\n const editor = this.editor;\n const marker = editor.model.markers.get(commentID);\n if (!marker) {\n return false;\n }\n editor.model.change(writer => {\n writer.removeMarker(marker);\n });\n return true;\n }\n /**\n * Gets the HTML comment data for the comment with a given ID.\n *\n * Returns `null` if the comment does not exist.\n */\n getHtmlCommentData(commentID) {\n const editor = this.editor;\n const marker = editor.model.markers.get(commentID);\n if (!marker) {\n return null;\n }\n let content = '';\n for (const root of this.editor.model.document.getRoots()) {\n if (root.hasAttribute(commentID)) {\n content = root.getAttribute(commentID);\n break;\n }\n }\n return {\n content,\n position: marker.getStart()\n };\n }\n /**\n * Gets all HTML comments in the given range.\n *\n * By default, it includes comments at the range boundaries.\n *\n * @param range\n * @param options.skipBoundaries When set to `true` the range boundaries will be skipped.\n * @returns HTML comment IDs\n */\n getHtmlCommentsInRange(range, { skipBoundaries = false } = {}) {\n const includeBoundaries = !skipBoundaries;\n // Unfortunately, MarkerCollection#getMarkersAtPosition() filters out collapsed markers.\n return Array.from(this.editor.model.markers.getMarkersGroup('$comment'))\n .filter(marker => isCommentMarkerInRange(marker, range))\n .map(marker => marker.name);\n function isCommentMarkerInRange(commentMarker, range) {\n const position = commentMarker.getRange().start;\n return ((position.isAfter(range.start) || (includeBoundaries && position.isEqual(range.start))) &&\n (position.isBefore(range.end) || (includeBoundaries && position.isEqual(range.end))));\n }\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module heading/headingcommand\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\n/**\n * The heading command. It is used by the {@link module:heading/heading~Heading heading feature} to apply headings.\n */\nexport default class HeadingCommand extends Command {\n /**\n * Creates an instance of the command.\n *\n * @param editor Editor instance.\n * @param modelElements Names of the element which this command can apply in the model.\n */\n constructor(editor, modelElements) {\n super(editor);\n this.modelElements = modelElements;\n }\n /**\n * @inheritDoc\n */\n refresh() {\n const block = first(this.editor.model.document.selection.getSelectedBlocks());\n this.value = !!block && this.modelElements.includes(block.name) && block.name;\n this.isEnabled = !!block && this.modelElements.some(heading => checkCanBecomeHeading(block, heading, this.editor.model.schema));\n }\n /**\n * Executes the command. Applies the heading to the selected blocks or, if the first selected\n * block is a heading already, turns selected headings (of this level only) to paragraphs.\n *\n * @param options.value Name of the element which this command will apply in the model.\n * @fires execute\n */\n execute(options) {\n const model = this.editor.model;\n const document = model.document;\n const modelElement = options.value;\n model.change(writer => {\n const blocks = Array.from(document.selection.getSelectedBlocks())\n .filter(block => {\n return checkCanBecomeHeading(block, modelElement, model.schema);\n });\n for (const block of blocks) {\n if (!block.is('element', modelElement)) {\n writer.rename(block, modelElement);\n }\n }\n });\n }\n}\n/**\n * Checks whether the given block can be replaced by a specific heading.\n *\n * @param block A block to be tested.\n * @param heading Command element name in the model.\n * @param schema The schema of the document.\n */\nfunction checkCanBecomeHeading(block, heading, schema) {\n return schema.checkChild(block.parent, heading) && !schema.isObject(block);\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module heading/headingediting\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Paragraph } from 'ckeditor5/src/paragraph.js';\nimport { priorities } from 'ckeditor5/src/utils.js';\nimport HeadingCommand from './headingcommand.js';\nconst defaultModelElement = 'paragraph';\n/**\n * The headings engine feature. It handles switching between block formats – headings and paragraph.\n * This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.\n * It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.\n */\nexport default class HeadingEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HeadingEditing';\n }\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n editor.config.define('heading', {\n options: [\n { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },\n { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },\n { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },\n { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }\n ]\n });\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n return [Paragraph];\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const options = editor.config.get('heading.options');\n const modelElements = [];\n for (const option of options) {\n // Skip paragraph - it is defined in required Paragraph feature.\n if (option.model === 'paragraph') {\n continue;\n }\n // Schema.\n editor.model.schema.register(option.model, {\n inheritAllFrom: '$block'\n });\n editor.conversion.elementToElement(option);\n modelElements.push(option.model);\n }\n this._addDefaultH1Conversion(editor);\n // Register the heading command for this option.\n editor.commands.add('heading', new HeadingCommand(editor, modelElements));\n }\n /**\n * @inheritDoc\n */\n afterInit() {\n // If the enter command is added to the editor, alter its behavior.\n // Enter at the end of a heading element should create a paragraph.\n const editor = this.editor;\n const enterCommand = editor.commands.get('enter');\n const options = editor.config.get('heading.options');\n if (enterCommand) {\n this.listenTo(enterCommand, 'afterExecute', (evt, data) => {\n const positionParent = editor.model.document.selection.getFirstPosition().parent;\n const isHeading = options.some(option => positionParent.is('element', option.model));\n if (isHeading && !positionParent.is('element', defaultModelElement) && positionParent.childCount === 0) {\n data.writer.rename(positionParent, defaultModelElement);\n }\n });\n }\n }\n /**\n * Adds default conversion for `h1` -> `heading1` with a low priority.\n *\n * @param editor Editor instance on which to add the `h1` conversion.\n */\n _addDefaultH1Conversion(editor) {\n editor.conversion.for('upcast').elementToElement({\n model: 'heading1',\n view: 'h1',\n // With a `low` priority, `paragraph` plugin autoparagraphing mechanism is executed. Make sure\n // this listener is called before it. If not, `h1` will be transformed into a paragraph.\n converterPriority: priorities.low + 1\n });\n }\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./heading.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module heading/headingui\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { ViewModel, createDropdown, addListToDropdown } from 'ckeditor5/src/ui.js';\nimport { Collection } from 'ckeditor5/src/utils.js';\nimport { getLocalizedOptions } from './utils.js';\nimport '../theme/heading.css';\n/**\n * The headings UI feature. It introduces the `headings` dropdown.\n */\nexport default class HeadingUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HeadingUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n const options = getLocalizedOptions(editor);\n const defaultTitle = t('Choose heading');\n const accessibleLabel = t('Heading');\n // Register UI component.\n editor.ui.componentFactory.add('heading', locale => {\n const titles = {};\n const itemDefinitions = new Collection();\n const headingCommand = editor.commands.get('heading');\n const paragraphCommand = editor.commands.get('paragraph');\n const commands = [headingCommand];\n for (const option of options) {\n const def = {\n type: 'button',\n model: new ViewModel({\n label: option.title,\n class: option.class,\n role: 'menuitemradio',\n withText: true\n })\n };\n if (option.model === 'paragraph') {\n def.model.bind('isOn').to(paragraphCommand, 'value');\n def.model.set('commandName', 'paragraph');\n commands.push(paragraphCommand);\n }\n else {\n def.model.bind('isOn').to(headingCommand, 'value', value => value === option.model);\n def.model.set({\n commandName: 'heading',\n commandValue: option.model\n });\n }\n // Add the option to the collection.\n itemDefinitions.add(def);\n titles[option.model] = option.title;\n }\n const dropdownView = createDropdown(locale);\n addListToDropdown(dropdownView, itemDefinitions, {\n ariaLabel: accessibleLabel,\n role: 'menu'\n });\n dropdownView.buttonView.set({\n ariaLabel: accessibleLabel,\n ariaLabelledBy: undefined,\n isOn: false,\n withText: true,\n tooltip: accessibleLabel\n });\n dropdownView.extendTemplate({\n attributes: {\n class: [\n 'ck-heading-dropdown'\n ]\n }\n });\n dropdownView.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled) => {\n return areEnabled.some(isEnabled => isEnabled);\n });\n dropdownView.buttonView.bind('label').to(headingCommand, 'value', paragraphCommand, 'value', (value, para) => {\n const whichModel = value || para && 'paragraph';\n if (typeof whichModel === 'boolean') {\n return defaultTitle;\n }\n // If none of the commands is active, display default title.\n if (!titles[whichModel]) {\n return defaultTitle;\n }\n return titles[whichModel];\n });\n // Execute command when an item from the dropdown is selected.\n this.listenTo(dropdownView, 'execute', evt => {\n const { commandName, commandValue } = evt.source;\n editor.execute(commandName, commandValue ? { value: commandValue } : undefined);\n editor.editing.view.focus();\n });\n return dropdownView;\n });\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * Returns heading options as defined in `config.heading.options` but processed to consider\n * the editor localization, i.e. to display {@link module:heading/headingconfig~HeadingOption}\n * in the correct language.\n *\n * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n * when the user configuration is defined because the editor does not exist yet.\n */\nexport function getLocalizedOptions(editor) {\n const t = editor.t;\n const localizedTitles = {\n 'Paragraph': t('Paragraph'),\n 'Heading 1': t('Heading 1'),\n 'Heading 2': t('Heading 2'),\n 'Heading 3': t('Heading 3'),\n 'Heading 4': t('Heading 4'),\n 'Heading 5': t('Heading 5'),\n 'Heading 6': t('Heading 6')\n };\n return editor.config.get('heading.options').map(option => {\n const title = localizedTitles[option.title];\n if (title && title != option.title) {\n option.title = title;\n }\n return option;\n });\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module heading/heading\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport HeadingEditing from './headingediting.js';\nimport HeadingUI from './headingui.js';\nimport '../theme/heading.css';\n/**\n * The headings feature.\n *\n * For a detailed overview, check the {@glink features/headings Headings feature} guide\n * and the {@glink api/heading package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:heading/headingediting~HeadingEditing heading editing feature}\n * and {@link module:heading/headingui~HeadingUI heading UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class Heading extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [HeadingEditing, HeadingUI];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'Heading';\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module heading/headingbuttonsui\n */\nimport { icons, Plugin } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport { getLocalizedOptions } from './utils.js';\nconst defaultIcons = {\n heading1: icons.heading1,\n heading2: icons.heading2,\n heading3: icons.heading3,\n heading4: icons.heading4,\n heading5: icons.heading5,\n heading6: icons.heading6\n};\n/**\n * The `HeadingButtonsUI` plugin defines a set of UI buttons that can be used instead of the\n * standard drop down component.\n *\n * This feature is not enabled by default by the {@link module:heading/heading~Heading} plugin and needs to be\n * installed manually to the editor configuration.\n *\n * Plugin introduces button UI elements, which names are same as `model` property from {@link module:heading/headingconfig~HeadingOption}.\n *\n * ```ts\n * ClassicEditor\n * .create( {\n * plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n * heading: {\n * options: [\n * { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },\n * { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },\n * { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },\n * { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }\n * ]\n * },\n * toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n * } )\n * .then( ... )\n * .catch( ... );\n * ```\n *\n * NOTE: The `'paragraph'` button is defined in by the {@link module:paragraph/paragraphbuttonui~ParagraphButtonUI} plugin\n * which needs to be loaded manually as well.\n *\n * It is possible to use custom icons by providing `icon` config option in {@link module:heading/headingconfig~HeadingOption}.\n * For the default configuration standard icons are used.\n */\nexport default class HeadingButtonsUI extends Plugin {\n /**\n * @inheritDoc\n */\n init() {\n const options = getLocalizedOptions(this.editor);\n options\n .filter(item => item.model !== 'paragraph')\n .map(item => this._createButton(item));\n }\n /**\n * Creates single button view from provided configuration option.\n */\n _createButton(option) {\n const editor = this.editor;\n editor.ui.componentFactory.add(option.model, locale => {\n const view = new ButtonView(locale);\n const command = editor.commands.get('heading');\n view.label = option.title;\n view.icon = option.icon || defaultIcons[option.model];\n view.tooltip = true;\n view.isToggleable = true;\n view.bind('isEnabled').to(command);\n view.bind('isOn').to(command, 'value', value => value == option.model);\n view.on('execute', () => {\n editor.execute('heading', { value: option.model });\n editor.editing.view.focus();\n });\n return view;\n });\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module heading/title\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\nimport { DowncastWriter, enablePlaceholder, hidePlaceholder, needsPlaceholder, showPlaceholder } from 'ckeditor5/src/engine.js';\n// A list of element names that should be treated by the Title plugin as title-like.\n// This means that an element of a type from this list will be changed to a title element\n// when it is the first element in the root.\nconst titleLikeElements = new Set(['paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6']);\n/**\n * The Title plugin.\n *\n * It splits the document into `Title` and `Body` sections.\n */\nexport default class Title extends Plugin {\n constructor() {\n super(...arguments);\n /**\n * A reference to an empty paragraph in the body\n * created when there is no element in the body for the placeholder purposes.\n */\n this._bodyPlaceholder = new Map();\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'Title';\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n return ['Paragraph'];\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const model = editor.model;\n // To use the schema for disabling some features when the selection is inside the title element\n // it is needed to create the following structure:\n //\n // \n // <title-content>The title text</title-content>\n // \n //\n // See: https://github.com/ckeditor/ckeditor5/issues/2005.\n model.schema.register('title', { isBlock: true, allowIn: '$root' });\n model.schema.register('title-content', { isBlock: true, allowIn: 'title', allowAttributes: ['alignment'] });\n model.schema.extend('$text', { allowIn: 'title-content' });\n // Disallow all attributes in `title-content`.\n model.schema.addAttributeCheck(context => {\n if (context.endsWith('title-content $text')) {\n return false;\n }\n });\n // Because `title` is represented by two elements in the model\n // but only one in the view, it is needed to adjust Mapper.\n editor.editing.mapper.on('modelToViewPosition', mapModelPositionToView(editor.editing.view));\n editor.data.mapper.on('modelToViewPosition', mapModelPositionToView(editor.editing.view));\n // Conversion.\n editor.conversion.for('downcast').elementToElement({ model: 'title-content', view: 'h1' });\n editor.conversion.for('downcast').add(dispatcher => dispatcher.on('insert:title', (evt, data, conversionApi) => {\n conversionApi.consumable.consume(data.item, evt.name);\n }));\n // Custom converter is used for data v -> m conversion to avoid calling post-fixer when setting data.\n // See https://github.com/ckeditor/ckeditor5/issues/2036.\n editor.data.upcastDispatcher.on('element:h1', dataViewModelH1Insertion, { priority: 'high' });\n editor.data.upcastDispatcher.on('element:h2', dataViewModelH1Insertion, { priority: 'high' });\n editor.data.upcastDispatcher.on('element:h3', dataViewModelH1Insertion, { priority: 'high' });\n // Take care about correct `title` element structure.\n model.document.registerPostFixer(writer => this._fixTitleContent(writer));\n // Create and take care of correct position of a `title` element.\n model.document.registerPostFixer(writer => this._fixTitleElement(writer));\n // Create element for `Body` placeholder if it is missing.\n model.document.registerPostFixer(writer => this._fixBodyElement(writer));\n // Prevent from adding extra at the end of the document.\n model.document.registerPostFixer(writer => this._fixExtraParagraph(writer));\n // Attach `Title` and `Body` placeholders to the empty title and/or content.\n this._attachPlaceholders();\n // Attach Tab handling.\n this._attachTabPressHandling();\n }\n /**\n * Returns the title of the document. Note that because this plugin does not allow any formatting inside\n * the title element, the output of this method will be a plain text, with no HTML tags.\n *\n * It is not recommended to use this method together with features that insert markers to the\n * data output, like comments or track changes features. If such markers start in the title and end in the\n * body, the result of this method might be incorrect.\n *\n * @param options Additional configuration passed to the conversion process.\n * See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n * @returns The title of the document.\n */\n getTitle(options = {}) {\n const rootName = options.rootName ? options.rootName : undefined;\n const titleElement = this._getTitleElement(rootName);\n const titleContentElement = titleElement.getChild(0);\n return this.editor.data.stringify(titleContentElement, options);\n }\n /**\n * Returns the body of the document.\n *\n * Note that it is not recommended to use this method together with features that insert markers to the\n * data output, like comments or track changes features. If such markers start in the title and end in the\n * body, the result of this method might be incorrect.\n *\n * @param options Additional configuration passed to the conversion process.\n * See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n * @returns The body of the document.\n */\n getBody(options = {}) {\n const editor = this.editor;\n const data = editor.data;\n const model = editor.model;\n const rootName = options.rootName ? options.rootName : undefined;\n const root = editor.model.document.getRoot(rootName);\n const view = editor.editing.view;\n const viewWriter = new DowncastWriter(view.document);\n const rootRange = model.createRangeIn(root);\n const viewDocumentFragment = viewWriter.createDocumentFragment();\n // Find all markers that intersects with body.\n const bodyStartPosition = model.createPositionAfter(root.getChild(0));\n const bodyRange = model.createRange(bodyStartPosition, model.createPositionAt(root, 'end'));\n const markers = new Map();\n for (const marker of model.markers) {\n const intersection = bodyRange.getIntersection(marker.getRange());\n if (intersection) {\n markers.set(marker.name, intersection);\n }\n }\n // Convert the entire root to view.\n data.mapper.clearBindings();\n data.mapper.bindElements(root, viewDocumentFragment);\n data.downcastDispatcher.convert(rootRange, markers, viewWriter, options);\n // Remove title element from view.\n viewWriter.remove(viewWriter.createRangeOn(viewDocumentFragment.getChild(0)));\n // view -> data\n return editor.data.processor.toData(viewDocumentFragment);\n }\n /**\n * Returns the `title` element when it is in the document. Returns `undefined` otherwise.\n */\n _getTitleElement(rootName) {\n const root = this.editor.model.document.getRoot(rootName);\n for (const child of root.getChildren()) {\n if (isTitle(child)) {\n return child;\n }\n }\n }\n /**\n * Model post-fixer callback that ensures that `title` has only one `title-content` child.\n * All additional children should be moved after the `title` element and renamed to a paragraph.\n */\n _fixTitleContent(writer) {\n let changed = false;\n for (const rootName of this.editor.model.document.getRootNames()) {\n const title = this._getTitleElement(rootName);\n // If there is no title in the content it will be created by `_fixTitleElement` post-fixer.\n // If the title has just one element, then it is correct. No fixing.\n if (!title || title.maxOffset === 1) {\n continue;\n }\n const titleChildren = Array.from(title.getChildren());\n // Skip first child because it is an allowed element.\n titleChildren.shift();\n for (const titleChild of titleChildren) {\n writer.move(writer.createRangeOn(titleChild), title, 'after');\n writer.rename(titleChild, 'paragraph');\n }\n changed = true;\n }\n return changed;\n }\n /**\n * Model post-fixer callback that creates a title element when it is missing,\n * takes care of the correct position of it and removes additional title elements.\n */\n _fixTitleElement(writer) {\n let changed = false;\n const model = this.editor.model;\n for (const modelRoot of this.editor.model.document.getRoots()) {\n const titleElements = Array.from(modelRoot.getChildren()).filter(isTitle);\n const firstTitleElement = titleElements[0];\n const firstRootChild = modelRoot.getChild(0);\n // When title element is at the beginning of the document then try to fix additional title elements (if there are any).\n if (firstRootChild.is('element', 'title')) {\n if (titleElements.length > 1) {\n fixAdditionalTitleElements(titleElements, writer, model);\n changed = true;\n }\n continue;\n }\n // When there is no title in the document and first element in the document cannot be changed\n // to the title then create an empty title element at the beginning of the document.\n if (!firstTitleElement && !titleLikeElements.has(firstRootChild.name)) {\n const title = writer.createElement('title');\n writer.insert(title, modelRoot);\n writer.insertElement('title-content', title);\n changed = true;\n continue;\n }\n if (titleLikeElements.has(firstRootChild.name)) {\n // Change the first element in the document to the title if it can be changed (is title-like).\n changeElementToTitle(firstRootChild, writer, model);\n }\n else {\n // Otherwise, move the first occurrence of the title element to the beginning of the document.\n writer.move(writer.createRangeOn(firstTitleElement), modelRoot, 0);\n }\n fixAdditionalTitleElements(titleElements, writer, model);\n changed = true;\n }\n return changed;\n }\n /**\n * Model post-fixer callback that adds an empty paragraph at the end of the document\n * when it is needed for the placeholder purposes.\n */\n _fixBodyElement(writer) {\n let changed = false;\n for (const rootName of this.editor.model.document.getRootNames()) {\n const modelRoot = this.editor.model.document.getRoot(rootName);\n if (modelRoot.childCount < 2) {\n const placeholder = writer.createElement('paragraph');\n writer.insert(placeholder, modelRoot, 1);\n this._bodyPlaceholder.set(rootName, placeholder);\n changed = true;\n }\n }\n return changed;\n }\n /**\n * Model post-fixer callback that removes a paragraph from the end of the document\n * if it was created for the placeholder purposes and is not needed anymore.\n */\n _fixExtraParagraph(writer) {\n let changed = false;\n for (const rootName of this.editor.model.document.getRootNames()) {\n const root = this.editor.model.document.getRoot(rootName);\n const placeholder = this._bodyPlaceholder.get(rootName);\n if (shouldRemoveLastParagraph(placeholder, root)) {\n this._bodyPlaceholder.delete(rootName);\n writer.remove(placeholder);\n changed = true;\n }\n }\n return changed;\n }\n /**\n * Attaches the `Title` and `Body` placeholders to the title and/or content.\n */\n _attachPlaceholders() {\n const editor = this.editor;\n const t = editor.t;\n const view = editor.editing.view;\n const sourceElement = editor.sourceElement;\n const titlePlaceholder = editor.config.get('title.placeholder') || t('Type your title');\n const bodyPlaceholder = editor.config.get('placeholder') ||\n sourceElement && sourceElement.tagName.toLowerCase() === 'textarea' && sourceElement.getAttribute('placeholder') ||\n t('Type or paste your content here.');\n // Attach placeholder to the view title element.\n editor.editing.downcastDispatcher.on('insert:title-content', (evt, data, conversionApi) => {\n const element = conversionApi.mapper.toViewElement(data.item);\n element.placeholder = titlePlaceholder;\n enablePlaceholder({\n view,\n element,\n keepOnFocus: true\n });\n });\n // Attach placeholder to first element after a title element and remove it if it's not needed anymore.\n // First element after title can change, so we need to observe all changes keep placeholder in sync.\n const bodyViewElements = new Map();\n // This post-fixer runs after the model post-fixer, so we can assume that the second child in view root will always exist.\n view.document.registerPostFixer(writer => {\n let hasChanged = false;\n for (const viewRoot of view.document.roots) {\n // `viewRoot` can be empty despite the model post-fixers if the model root was detached.\n if (viewRoot.isEmpty) {\n continue;\n }\n // If `viewRoot` is not empty, then we can expect at least two elements in it.\n const body = viewRoot.getChild(1);\n const oldBody = bodyViewElements.get(viewRoot.rootName);\n // If body element has changed we need to disable placeholder on the previous element and enable on the new one.\n if (body !== oldBody) {\n if (oldBody) {\n hidePlaceholder(writer, oldBody);\n writer.removeAttribute('data-placeholder', oldBody);\n }\n writer.setAttribute('data-placeholder', bodyPlaceholder, body);\n bodyViewElements.set(viewRoot.rootName, body);\n hasChanged = true;\n }\n // Then we need to display placeholder if it is needed.\n // See: https://github.com/ckeditor/ckeditor5/issues/8689.\n if (needsPlaceholder(body, true) && viewRoot.childCount === 2 && body.name === 'p') {\n hasChanged = showPlaceholder(writer, body) ? true : hasChanged;\n }\n else {\n // Or hide if it is not needed.\n hasChanged = hidePlaceholder(writer, body) ? true : hasChanged;\n }\n }\n return hasChanged;\n });\n }\n /**\n * Creates navigation between the title and body sections using Tab and Shift+Tab keys.\n */\n _attachTabPressHandling() {\n const editor = this.editor;\n const model = editor.model;\n // Pressing Tab inside the title should move the caret to the body.\n editor.keystrokes.set('TAB', (data, cancel) => {\n model.change(writer => {\n const selection = model.document.selection;\n const selectedElements = Array.from(selection.getSelectedBlocks());\n if (selectedElements.length === 1 && selectedElements[0].is('element', 'title-content')) {\n const root = selection.getFirstPosition().root;\n const firstBodyElement = root.getChild(1);\n writer.setSelection(firstBodyElement, 0);\n cancel();\n }\n });\n });\n // Pressing Shift+Tab at the beginning of the body should move the caret to the title.\n editor.keystrokes.set('SHIFT + TAB', (data, cancel) => {\n model.change(writer => {\n const selection = model.document.selection;\n if (!selection.isCollapsed) {\n return;\n }\n const selectedElement = first(selection.getSelectedBlocks());\n const selectionPosition = selection.getFirstPosition();\n const root = editor.model.document.getRoot(selectionPosition.root.rootName);\n const title = root.getChild(0);\n const body = root.getChild(1);\n if (selectedElement === body && selectionPosition.isAtStart) {\n writer.setSelection(title.getChild(0), 0);\n cancel();\n }\n });\n });\n }\n}\n/**\n * A view-to-model converter for the h1 that appears at the beginning of the document (a title element).\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n * @param evt An object containing information about the fired event.\n * @param data An object containing conversion input, a placeholder for conversion output and possibly other values.\n * @param conversionApi Conversion interface to be used by the callback.\n */\nfunction dataViewModelH1Insertion(evt, data, conversionApi) {\n const modelCursor = data.modelCursor;\n const viewItem = data.viewItem;\n if (!modelCursor.isAtStart || !modelCursor.parent.is('element', '$root')) {\n return;\n }\n if (!conversionApi.consumable.consume(viewItem, { name: true })) {\n return;\n }\n const modelWriter = conversionApi.writer;\n const title = modelWriter.createElement('title');\n const titleContent = modelWriter.createElement('title-content');\n modelWriter.append(titleContent, title);\n modelWriter.insert(title, modelCursor);\n conversionApi.convertChildren(viewItem, titleContent);\n conversionApi.updateConversionResult(title, data);\n}\n/**\n * Maps position from the beginning of the model `title` element to the beginning of the view `h1` element.\n *\n * ```html\n * ^<title-content>Foo</title-content> ->

^Foo

\n * ```\n */\nfunction mapModelPositionToView(editingView) {\n return (evt, data) => {\n const positionParent = data.modelPosition.parent;\n if (!positionParent.is('element', 'title')) {\n return;\n }\n const modelTitleElement = positionParent.parent;\n const viewElement = data.mapper.toViewElement(modelTitleElement);\n data.viewPosition = editingView.createPositionAt(viewElement, 0);\n evt.stop();\n };\n}\n/**\n * @returns Returns true when given element is a title. Returns false otherwise.\n */\nfunction isTitle(element) {\n return element.is('element', 'title');\n}\n/**\n * Changes the given element to the title element.\n */\nfunction changeElementToTitle(element, writer, model) {\n const title = writer.createElement('title');\n writer.insert(title, element, 'before');\n writer.insert(element, title, 0);\n writer.rename(element, 'title-content');\n model.schema.removeDisallowedAttributes([element], writer);\n}\n/**\n * Loops over the list of title elements and fixes additional ones.\n *\n * @returns Returns true when there was any change. Returns false otherwise.\n */\nfunction fixAdditionalTitleElements(titleElements, writer, model) {\n let hasChanged = false;\n for (const title of titleElements) {\n if (title.index !== 0) {\n fixTitleElement(title, writer, model);\n hasChanged = true;\n }\n }\n return hasChanged;\n}\n/**\n * Changes given title element to a paragraph or removes it when it is empty.\n */\nfunction fixTitleElement(title, writer, model) {\n const child = title.getChild(0);\n // Empty title should be removed.\n // It is created as a result of pasting to the title element.\n if (child.isEmpty) {\n writer.remove(title);\n return;\n }\n writer.move(writer.createRangeOn(child), title, 'before');\n writer.rename(child, 'paragraph');\n writer.remove(title);\n model.schema.removeDisallowedAttributes([child], writer);\n}\n/**\n * Returns true when the last paragraph in the document was created only for the placeholder\n * purpose and it's not needed anymore. Returns false otherwise.\n */\nfunction shouldRemoveLastParagraph(placeholder, root) {\n if (!placeholder || !placeholder.is('element', 'paragraph') || placeholder.childCount) {\n return false;\n }\n if (root.childCount <= 2 || root.getChild(root.childCount - 1) !== placeholder) {\n return false;\n }\n return true;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { findOptimalInsertionRange } from 'ckeditor5/src/widget.js';\n/**\n * The horizontal line command.\n *\n * The command is registered by {@link module:horizontal-line/horizontallineediting~HorizontalLineEditing} as `'horizontalLine'`.\n *\n * To insert a horizontal line at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'horizontalLine' );\n * ```\n */\nexport default class HorizontalLineCommand extends Command {\n /**\n * @inheritDoc\n */\n refresh() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n this.isEnabled = isHorizontalLineAllowedInParent(selection, schema, model);\n }\n /**\n * Executes the command.\n *\n * @fires execute\n */\n execute() {\n const model = this.editor.model;\n model.change(writer => {\n const horizontalElement = writer.createElement('horizontalLine');\n model.insertObject(horizontalElement, null, null, { setSelection: 'after' });\n });\n }\n}\n/**\n * Checks if a horizontal line is allowed by the schema in the optimal insertion parent.\n *\n * @param model Model instance.\n */\nfunction isHorizontalLineAllowedInParent(selection, schema, model) {\n const parent = getInsertHorizontalLineParent(selection, model);\n return schema.checkChild(parent, 'horizontalLine');\n}\n/**\n * Returns a node that will be used to insert a horizontal line with `model.insertContent` to check if the horizontal line can be\n * placed there.\n *\n * @param model Model instance.\n */\nfunction getInsertHorizontalLineParent(selection, model) {\n const insertionRange = findOptimalInsertionRange(selection, model);\n const parent = insertionRange.start.parent;\n if (parent.isEmpty && !parent.is('element', '$root')) {\n return parent.parent;\n }\n return parent;\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./horizontalline.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module horizontal-line/horizontallineediting\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { toWidget } from 'ckeditor5/src/widget.js';\nimport HorizontalLineCommand from './horizontallinecommand.js';\nimport '../theme/horizontalline.css';\n/**\n * The horizontal line editing feature.\n */\nexport default class HorizontalLineEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HorizontalLineEditing';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const schema = editor.model.schema;\n const t = editor.t;\n const conversion = editor.conversion;\n schema.register('horizontalLine', {\n inheritAllFrom: '$blockObject'\n });\n conversion.for('dataDowncast').elementToElement({\n model: 'horizontalLine',\n view: (modelElement, { writer }) => {\n return writer.createEmptyElement('hr');\n }\n });\n conversion.for('editingDowncast').elementToStructure({\n model: 'horizontalLine',\n view: (modelElement, { writer }) => {\n const label = t('Horizontal line');\n const viewWrapper = writer.createContainerElement('div', null, writer.createEmptyElement('hr'));\n writer.addClass('ck-horizontal-line', viewWrapper);\n writer.setCustomProperty('hr', true, viewWrapper);\n return toHorizontalLineWidget(viewWrapper, writer, label);\n }\n });\n conversion.for('upcast').elementToElement({ view: 'hr', model: 'horizontalLine' });\n editor.commands.add('horizontalLine', new HorizontalLineCommand(editor));\n }\n}\n/**\n * Converts a given {@link module:engine/view/element~Element} to a horizontal line widget:\n * * Adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to\n * recognize the horizontal line widget element.\n * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n *\n * @param writer An instance of the view writer.\n */\nfunction toHorizontalLineWidget(viewElement, writer, label) {\n writer.setCustomProperty('horizontalLine', true, viewElement);\n return toWidget(viewElement, writer, { label });\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module horizontal-line/horizontallineui\n */\nimport { icons, Plugin } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\n/**\n * The horizontal line UI plugin.\n */\nexport default class HorizontalLineUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HorizontalLineUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n // Add the `horizontalLine` button to feature components.\n editor.ui.componentFactory.add('horizontalLine', locale => {\n const command = editor.commands.get('horizontalLine');\n const view = new ButtonView(locale);\n view.set({\n label: t('Horizontal line'),\n icon: icons.horizontalLine,\n tooltip: true\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n // Execute the command.\n this.listenTo(view, 'execute', () => {\n editor.execute('horizontalLine');\n editor.editing.view.focus();\n });\n return view;\n });\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module horizontal-line/horizontalline\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Widget } from 'ckeditor5/src/widget.js';\nimport HorizontalLineEditing from './horizontallineediting.js';\nimport HorizontalLineUI from './horizontallineui.js';\n/**\n * The horizontal line feature.\n *\n * It provides the possibility to insert a horizontal line into the rich-text editor.\n *\n * For a detailed overview, check the {@glink features/horizontal-line Horizontal line feature} documentation.\n */\nexport default class HorizontalLine extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [HorizontalLineEditing, HorizontalLineUI, Widget];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HorizontalLine';\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { findOptimalInsertionRange } from 'ckeditor5/src/widget.js';\n/**\n * The insert HTML embed element command.\n *\n * The command is registered by {@link module:html-embed/htmlembedediting~HtmlEmbedEditing} as `'htmlEmbed'`.\n *\n * To insert an empty HTML embed element at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'htmlEmbed' );\n * ```\n *\n * You can specify the initial content of a new HTML embed in the argument:\n *\n * ```ts\n * editor.execute( 'htmlEmbed', 'Initial content.' );\n * ```\n *\n * To update the content of the HTML embed, select it in the model and pass the content in the argument:\n *\n * ```ts\n * editor.execute( 'htmlEmbed', 'New content of an existing embed.' );\n * ```\n */\nexport default class HtmlEmbedCommand extends Command {\n /**\n * @inheritDoc\n */\n refresh() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const selectedRawHtmlElement = getSelectedRawHtmlModelWidget(selection);\n this.isEnabled = isHtmlEmbedAllowedInParent(selection, schema, model);\n this.value = selectedRawHtmlElement ? selectedRawHtmlElement.getAttribute('value') || '' : null;\n }\n /**\n * Executes the command, which either:\n *\n * * creates and inserts a new HTML embed element if none was selected,\n * * updates the content of the HTML embed if one was selected.\n *\n * @fires execute\n * @param value When passed, the value (content) will be set on a new embed or a selected one.\n */\n execute(value) {\n const model = this.editor.model;\n const selection = model.document.selection;\n model.change(writer => {\n let htmlEmbedElement;\n // If the command has a non-null value, there must be some HTML embed selected in the model.\n if (this.value !== null) {\n htmlEmbedElement = getSelectedRawHtmlModelWidget(selection);\n }\n else {\n htmlEmbedElement = writer.createElement('rawHtml');\n model.insertObject(htmlEmbedElement, null, null, { setSelection: 'on' });\n }\n writer.setAttribute('value', value, htmlEmbedElement);\n });\n }\n}\n/**\n * Checks if an HTML embed is allowed by the schema in the optimal insertion parent.\n */\nfunction isHtmlEmbedAllowedInParent(selection, schema, model) {\n const parent = getInsertHtmlEmbedParent(selection, model);\n return schema.checkChild(parent, 'rawHtml');\n}\n/**\n * Returns a node that will be used to insert a html embed with `model.insertContent` to check if a html embed element can be placed there.\n */\nfunction getInsertHtmlEmbedParent(selection, model) {\n const insertionRange = findOptimalInsertionRange(selection, model);\n const parent = insertionRange.start.parent;\n if (parent.isEmpty && !parent.is('rootElement')) {\n return parent.parent;\n }\n return parent;\n}\n/**\n * Returns the selected HTML embed element in the model, if any.\n */\nfunction getSelectedRawHtmlModelWidget(selection) {\n const selectedElement = selection.getSelectedElement();\n if (selectedElement && selectedElement.is('element', 'rawHtml')) {\n return selectedElement;\n }\n return null;\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./htmlembed.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module html-embed/htmlembedediting\n */\nimport { Plugin, icons } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport { toWidget } from 'ckeditor5/src/widget.js';\nimport { logWarning, createElement } from 'ckeditor5/src/utils.js';\nimport HtmlEmbedCommand from './htmlembedcommand.js';\nimport '../theme/htmlembed.css';\n/**\n * The HTML embed editing feature.\n */\nexport default class HtmlEmbedEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlEmbedEditing';\n }\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n /**\n * Keeps references to {@link module:ui/button/buttonview~ButtonView edit, save, and cancel} button instances created for\n * each widget so they can be destroyed if they are no longer in DOM after the editing view was re-rendered.\n */\n this._widgetButtonViewReferences = new Set();\n editor.config.define('htmlEmbed', {\n showPreviews: false,\n sanitizeHtml: rawHtml => {\n /**\n * When using the HTML embed feature with the `htmlEmbed.showPreviews=true` option, it is strongly recommended to\n * define a sanitize function that will clean up the input HTML in order to avoid XSS vulnerability.\n *\n * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.\n *\n * @error html-embed-provide-sanitize-function\n */\n logWarning('html-embed-provide-sanitize-function');\n return {\n html: rawHtml,\n hasChanged: false\n };\n }\n });\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const schema = editor.model.schema;\n schema.register('rawHtml', {\n inheritAllFrom: '$blockObject',\n allowAttributes: ['value']\n });\n editor.commands.add('htmlEmbed', new HtmlEmbedCommand(editor));\n this._setupConversion();\n }\n /**\n * Prepares converters for the feature.\n */\n _setupConversion() {\n const editor = this.editor;\n const t = editor.t;\n const view = editor.editing.view;\n const widgetButtonViewReferences = this._widgetButtonViewReferences;\n const htmlEmbedConfig = editor.config.get('htmlEmbed');\n // Destroy UI buttons created for widgets that have been removed from the view document (e.g. in the previous conversion).\n // This prevents unexpected memory leaks from UI views.\n this.editor.editing.view.on('render', () => {\n for (const buttonView of widgetButtonViewReferences) {\n if (buttonView.element && buttonView.element.isConnected) {\n return;\n }\n buttonView.destroy();\n widgetButtonViewReferences.delete(buttonView);\n }\n }, { priority: 'lowest' });\n // Register div.raw-html-embed as a raw content element so all of it's content will be provided\n // as a view element's custom property while data upcasting.\n editor.data.registerRawContentMatcher({\n name: 'div',\n classes: 'raw-html-embed'\n });\n editor.conversion.for('upcast').elementToElement({\n view: {\n name: 'div',\n classes: 'raw-html-embed'\n },\n model: (viewElement, { writer }) => {\n // The div.raw-html-embed is registered as a raw content element,\n // so all it's content is available in a custom property.\n return writer.createElement('rawHtml', {\n value: viewElement.getCustomProperty('$rawContent')\n });\n }\n });\n editor.conversion.for('dataDowncast').elementToElement({\n model: 'rawHtml',\n view: (modelElement, { writer }) => {\n return writer.createRawElement('div', { class: 'raw-html-embed' }, function (domElement) {\n domElement.innerHTML = modelElement.getAttribute('value') || '';\n });\n }\n });\n editor.conversion.for('editingDowncast').elementToStructure({\n model: { name: 'rawHtml', attributes: ['value'] },\n view: (modelElement, { writer }) => {\n let domContentWrapper;\n let state;\n let props;\n const viewContentWrapper = writer.createRawElement('div', {\n class: 'raw-html-embed__content-wrapper'\n }, function (domElement) {\n domContentWrapper = domElement;\n renderContent({ editor, domElement, state, props });\n // Since there is a `data-cke-ignore-events` attribute set on the wrapper element in the editable mode,\n // the explicit `mousedown` handler on the `capture` phase is needed to move the selection onto the whole\n // HTML embed widget.\n domContentWrapper.addEventListener('mousedown', () => {\n if (state.isEditable) {\n const model = editor.model;\n const selectedElement = model.document.selection.getSelectedElement();\n // Move the selection onto the whole HTML embed widget if it's currently not selected.\n if (selectedElement !== modelElement) {\n model.change(writer => writer.setSelection(modelElement, 'on'));\n }\n }\n }, true);\n });\n // API exposed on each raw HTML embed widget so other features can control a particular widget.\n const rawHtmlApi = {\n makeEditable() {\n state = Object.assign({}, state, {\n isEditable: true\n });\n renderContent({ domElement: domContentWrapper, editor, state, props });\n view.change(writer => {\n writer.setAttribute('data-cke-ignore-events', 'true', viewContentWrapper);\n });\n // This could be potentially pulled to a separate method called focusTextarea().\n domContentWrapper.querySelector('textarea').focus();\n },\n save(newValue) {\n // If the value didn't change, we just cancel. If it changed,\n // it's enough to update the model – the entire widget will be reconverted.\n if (newValue !== state.getRawHtmlValue()) {\n editor.execute('htmlEmbed', newValue);\n editor.editing.view.focus();\n }\n else {\n this.cancel();\n }\n },\n cancel() {\n state = Object.assign({}, state, {\n isEditable: false\n });\n renderContent({ domElement: domContentWrapper, editor, state, props });\n editor.editing.view.focus();\n view.change(writer => {\n writer.removeAttribute('data-cke-ignore-events', viewContentWrapper);\n });\n }\n };\n state = {\n showPreviews: htmlEmbedConfig.showPreviews,\n isEditable: false,\n getRawHtmlValue: () => modelElement.getAttribute('value') || ''\n };\n props = {\n sanitizeHtml: htmlEmbedConfig.sanitizeHtml,\n textareaPlaceholder: t('Paste raw HTML here...'),\n onEditClick() {\n rawHtmlApi.makeEditable();\n },\n onSaveClick(newValue) {\n rawHtmlApi.save(newValue);\n },\n onCancelClick() {\n rawHtmlApi.cancel();\n }\n };\n const viewContainer = writer.createContainerElement('div', {\n class: 'raw-html-embed',\n 'data-html-embed-label': t('HTML snippet'),\n dir: editor.locale.uiLanguageDirection\n }, viewContentWrapper);\n writer.setCustomProperty('rawHtmlApi', rawHtmlApi, viewContainer);\n writer.setCustomProperty('rawHtml', true, viewContainer);\n return toWidget(viewContainer, writer, {\n label: t('HTML snippet'),\n hasSelectionHandle: true\n });\n }\n });\n function renderContent({ editor, domElement, state, props }) {\n // Remove all children;\n domElement.textContent = '';\n const domDocument = domElement.ownerDocument;\n let domTextarea;\n if (state.isEditable) {\n const textareaProps = {\n isDisabled: false,\n placeholder: props.textareaPlaceholder\n };\n domTextarea = createDomTextarea({ domDocument, state, props: textareaProps });\n domElement.append(domTextarea);\n }\n else if (state.showPreviews) {\n const previewContainerProps = {\n sanitizeHtml: props.sanitizeHtml\n };\n domElement.append(createPreviewContainer({ domDocument, state, props: previewContainerProps, editor }));\n }\n else {\n const textareaProps = {\n isDisabled: true,\n placeholder: props.textareaPlaceholder\n };\n domElement.append(createDomTextarea({ domDocument, state, props: textareaProps }));\n }\n const buttonsWrapperProps = {\n onEditClick: props.onEditClick,\n onSaveClick: () => {\n props.onSaveClick(domTextarea.value);\n },\n onCancelClick: props.onCancelClick\n };\n domElement.prepend(createDomButtonsWrapper({ editor, domDocument, state, props: buttonsWrapperProps }));\n }\n function createDomButtonsWrapper({ editor, domDocument, state, props }) {\n const domButtonsWrapper = createElement(domDocument, 'div', {\n class: 'raw-html-embed__buttons-wrapper'\n });\n if (state.isEditable) {\n const saveButtonView = createUIButton(editor, 'save', props.onSaveClick);\n const cancelButtonView = createUIButton(editor, 'cancel', props.onCancelClick);\n domButtonsWrapper.append(saveButtonView.element, cancelButtonView.element);\n widgetButtonViewReferences.add(saveButtonView).add(cancelButtonView);\n }\n else {\n const editButtonView = createUIButton(editor, 'edit', props.onEditClick);\n domButtonsWrapper.append(editButtonView.element);\n widgetButtonViewReferences.add(editButtonView);\n }\n return domButtonsWrapper;\n }\n function createDomTextarea({ domDocument, state, props }) {\n const domTextarea = createElement(domDocument, 'textarea', {\n placeholder: props.placeholder,\n class: 'ck ck-reset ck-input ck-input-text raw-html-embed__source'\n });\n domTextarea.disabled = props.isDisabled;\n domTextarea.value = state.getRawHtmlValue();\n return domTextarea;\n }\n function createPreviewContainer({ editor, domDocument, state, props }) {\n const sanitizedOutput = props.sanitizeHtml(state.getRawHtmlValue());\n const placeholderText = state.getRawHtmlValue().length > 0 ?\n t('No preview available') :\n t('Empty snippet content');\n const domPreviewPlaceholder = createElement(domDocument, 'div', {\n class: 'ck ck-reset_all raw-html-embed__preview-placeholder'\n }, placeholderText);\n const domPreviewContent = createElement(domDocument, 'div', {\n class: 'raw-html-embed__preview-content',\n dir: editor.locale.contentLanguageDirection\n });\n // Creating a contextual document fragment allows executing scripts when inserting into the preview element.\n // See: #8326.\n const domRange = domDocument.createRange();\n const domDocumentFragment = domRange.createContextualFragment(sanitizedOutput.html);\n domPreviewContent.appendChild(domDocumentFragment);\n const domPreviewContainer = createElement(domDocument, 'div', {\n class: 'raw-html-embed__preview'\n }, [\n domPreviewPlaceholder, domPreviewContent\n ]);\n return domPreviewContainer;\n }\n }\n}\n/**\n * Returns a UI button view that can be used in conversion.\n */\nfunction createUIButton(editor, type, onClick) {\n const { t } = editor.locale;\n const buttonView = new ButtonView(editor.locale);\n const command = editor.commands.get('htmlEmbed');\n buttonView.set({\n class: `raw-html-embed__${type}-button`,\n icon: icons.pencil,\n tooltip: true,\n tooltipPosition: editor.locale.uiLanguageDirection === 'rtl' ? 'e' : 'w'\n });\n buttonView.render();\n if (type === 'edit') {\n buttonView.set({\n icon: icons.pencil,\n label: t('Edit source')\n });\n buttonView.bind('isEnabled').to(command);\n }\n else if (type === 'save') {\n buttonView.set({\n icon: icons.check,\n label: t('Save changes')\n });\n buttonView.bind('isEnabled').to(command);\n }\n else {\n buttonView.set({\n icon: icons.cancel,\n label: t('Cancel')\n });\n }\n buttonView.on('execute', onClick);\n return buttonView;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module html-embed/htmlembedui\n */\nimport { icons, Plugin } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\n/**\n * The HTML embed UI plugin.\n */\nexport default class HtmlEmbedUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlEmbedUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n // Add the `htmlEmbed` button to feature components.\n editor.ui.componentFactory.add('htmlEmbed', locale => {\n const command = editor.commands.get('htmlEmbed');\n const view = new ButtonView(locale);\n view.set({\n label: t('Insert HTML'),\n icon: icons.html,\n tooltip: true\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n // Execute the command.\n this.listenTo(view, 'execute', () => {\n editor.execute('htmlEmbed');\n editor.editing.view.focus();\n const rawHtmlApi = editor.editing.view.document.selection\n .getSelectedElement()\n .getCustomProperty('rawHtmlApi');\n rawHtmlApi.makeEditable();\n });\n return view;\n });\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module html-embed/htmlembed\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Widget } from 'ckeditor5/src/widget.js';\nimport HtmlEmbedEditing from './htmlembedediting.js';\nimport HtmlEmbedUI from './htmlembedui.js';\n/**\n * The HTML embed feature.\n *\n * It allows inserting HTML snippets directly into the editor.\n *\n * For a detailed overview, check the {@glink features/html/html-embed HTML embed feature} documentation.\n */\nexport default class HtmlEmbed extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [HtmlEmbedEditing, HtmlEmbedUI, Widget];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'HtmlEmbed';\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module indent/indentediting\n */\nimport { Plugin, MultiCommand } from 'ckeditor5/src/core.js';\n/**\n * The indent editing feature.\n *\n * This plugin registers the `'indent'` and `'outdent'` commands.\n *\n * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in the\n * {@link module:indent/indent~Indent indent feature} API documentation.\n */\nexport default class IndentEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'IndentEditing';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n editor.commands.add('indent', new MultiCommand(editor));\n editor.commands.add('outdent', new MultiCommand(editor));\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module indent/indentui\n */\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport { icons, Plugin } from 'ckeditor5/src/core.js';\n/**\n * The indent UI feature.\n *\n * This plugin registers the `'indent'` and `'outdent'` buttons.\n *\n * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in\n * the {@link module:indent/indent~Indent indent feature} API documentation.\n */\nexport default class IndentUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'IndentUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const locale = editor.locale;\n const t = editor.t;\n const localizedIndentIcon = locale.uiLanguageDirection == 'ltr' ? icons.indent : icons.outdent;\n const localizedOutdentIcon = locale.uiLanguageDirection == 'ltr' ? icons.outdent : icons.indent;\n this._defineButton('indent', t('Increase indent'), localizedIndentIcon);\n this._defineButton('outdent', t('Decrease indent'), localizedOutdentIcon);\n }\n /**\n * Defines a UI button.\n */\n _defineButton(commandName, label, icon) {\n const editor = this.editor;\n editor.ui.componentFactory.add(commandName, locale => {\n const command = editor.commands.get(commandName);\n const view = new ButtonView(locale);\n view.set({\n label,\n icon,\n tooltip: true\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n this.listenTo(view, 'execute', () => {\n editor.execute(commandName);\n editor.editing.view.focus();\n });\n return view;\n });\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module indent/indent\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport IndentEditing from './indentediting.js';\nimport IndentUI from './indentui.js';\n/**\n * The indent feature.\n *\n * This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.\n *\n * The compatible features are:\n *\n * * The {@link module:list/list~List} or {@link module:list/list/listediting~ListEditing} feature for list indentation.\n * * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.\n *\n * This is a \"glue\" plugin that loads the following plugins:\n *\n * * The {@link module:indent/indentediting~IndentEditing indent editing feature}.\n * * The {@link module:indent/indentui~IndentUI indent UI feature}.\n *\n * The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons\n * that allow to increase or decrease text indentation of supported elements.\n *\n * **Note**: In order for the commands and buttons to work, at least one of compatible features is required.\n */\nexport default class Indent extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'Indent';\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n return [IndentEditing, IndentUI];\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module indent/indentblockcommand\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\n/**\n * The indent block command.\n *\n * The command is registered by the {@link module:indent/indentblock~IndentBlock} as `'indentBlock'` for indenting blocks and\n * `'outdentBlock'` for outdenting blocks.\n *\n * To increase block indentation at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'indentBlock' );\n * ```\n *\n * To decrease block indentation at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'outdentBlock' );\n * ```\n */\nexport default class IndentBlockCommand extends Command {\n /**\n * Creates an instance of the command.\n */\n constructor(editor, indentBehavior) {\n super(editor);\n this._indentBehavior = indentBehavior;\n }\n /**\n * @inheritDoc\n */\n refresh() {\n const editor = this.editor;\n const model = editor.model;\n const block = first(model.document.selection.getSelectedBlocks());\n if (!block || !this._isIndentationChangeAllowed(block)) {\n this.isEnabled = false;\n return;\n }\n this.isEnabled = this._indentBehavior.checkEnabled(block.getAttribute('blockIndent'));\n }\n /**\n * @inheritDoc\n */\n execute() {\n const model = this.editor.model;\n const blocksToChange = this._getBlocksToChange();\n model.change(writer => {\n for (const block of blocksToChange) {\n const currentIndent = block.getAttribute('blockIndent');\n const nextIndent = this._indentBehavior.getNextIndent(currentIndent);\n if (nextIndent) {\n writer.setAttribute('blockIndent', nextIndent, block);\n }\n else {\n writer.removeAttribute('blockIndent', block);\n }\n }\n });\n }\n /**\n * Returns blocks from selection that should have blockIndent selection set.\n */\n _getBlocksToChange() {\n const model = this.editor.model;\n const selection = model.document.selection;\n const blocksInSelection = Array.from(selection.getSelectedBlocks());\n return blocksInSelection.filter(block => this._isIndentationChangeAllowed(block));\n }\n /**\n * Returns false if indentation cannot be applied, i.e.:\n * - for blocks disallowed by schema declaration\n * - for blocks in Document Lists (disallowed forward indentation only). See https://github.com/ckeditor/ckeditor5/issues/14155.\n * Otherwise returns true.\n */\n _isIndentationChangeAllowed(element) {\n const editor = this.editor;\n if (!editor.model.schema.checkAttribute(element, 'blockIndent')) {\n return false;\n }\n if (!editor.plugins.has('ListUtils')) {\n return true;\n }\n // Only forward indentation is disallowed in list items. This allows the user to outdent blocks that are already indented.\n if (!this._indentBehavior.isForward) {\n return true;\n }\n const documentListUtils = editor.plugins.get('ListUtils');\n return !documentListUtils.isListItemBlock(element);\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * The block indentation behavior that uses offsets to set indentation.\n */\nexport default class IndentUsingOffset {\n /**\n * Creates an instance of the indentation behavior.\n *\n * @param config.direction The direction of indentation.\n * @param config.offset The offset of the next indentation step.\n * @param config.unit Indentation unit.\n */\n constructor(config) {\n this.isForward = config.direction === 'forward';\n this.offset = config.offset;\n this.unit = config.unit;\n }\n /**\n * @inheritDoc\n */\n checkEnabled(indentAttributeValue) {\n const currentOffset = parseFloat(indentAttributeValue || '0');\n // The command is always enabled for forward indentation.\n return this.isForward || currentOffset > 0;\n }\n /**\n * @inheritDoc\n */\n getNextIndent(indentAttributeValue) {\n const currentOffset = parseFloat(indentAttributeValue || '0');\n const isSameUnit = !indentAttributeValue || indentAttributeValue.endsWith(this.unit);\n if (!isSameUnit) {\n return this.isForward ? this.offset + this.unit : undefined;\n }\n const nextOffset = this.isForward ? this.offset : -this.offset;\n const offsetToSet = currentOffset + nextOffset;\n return offsetToSet > 0 ? offsetToSet + this.unit : undefined;\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * The block indentation behavior that uses classes to set indentation.\n */\nexport default class IndentUsingClasses {\n /**\n * Creates an instance of the indentation behavior.\n *\n * @param config.direction The direction of indentation.\n * @param config.classes A list of classes used for indentation.\n */\n constructor(config) {\n this.isForward = config.direction === 'forward';\n this.classes = config.classes;\n }\n /**\n * @inheritDoc\n */\n checkEnabled(indentAttributeValue) {\n const currentIndex = this.classes.indexOf(indentAttributeValue);\n if (this.isForward) {\n return currentIndex < this.classes.length - 1;\n }\n else {\n return currentIndex >= 0;\n }\n }\n /**\n * @inheritDoc\n */\n getNextIndent(indentAttributeValue) {\n const currentIndex = this.classes.indexOf(indentAttributeValue);\n const indexStep = this.isForward ? 1 : -1;\n return this.classes[currentIndex + indexStep];\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module indent/indentblock\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { addMarginRules } from 'ckeditor5/src/engine.js';\nimport IndentBlockCommand from './indentblockcommand.js';\nimport IndentUsingOffset from './indentcommandbehavior/indentusingoffset.js';\nimport IndentUsingClasses from './indentcommandbehavior/indentusingclasses.js';\nconst DEFAULT_ELEMENTS = ['paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6'];\n/**\n * The block indentation feature.\n *\n * It registers the `'indentBlock'` and `'outdentBlock'` commands.\n *\n * If the plugin {@link module:indent/indent~Indent} is defined, it also attaches the `'indentBlock'` and `'outdentBlock'` commands to\n * the `'indent'` and `'outdent'` commands.\n */\nexport default class IndentBlock extends Plugin {\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n editor.config.define('indentBlock', {\n offset: 40,\n unit: 'px'\n });\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'IndentBlock';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const configuration = editor.config.get('indentBlock');\n if (configuration.classes && configuration.classes.length) {\n this._setupConversionUsingClasses(configuration.classes);\n editor.commands.add('indentBlock', new IndentBlockCommand(editor, new IndentUsingClasses({\n direction: 'forward',\n classes: configuration.classes\n })));\n editor.commands.add('outdentBlock', new IndentBlockCommand(editor, new IndentUsingClasses({\n direction: 'backward',\n classes: configuration.classes\n })));\n }\n else {\n editor.data.addStyleProcessorRules(addMarginRules);\n this._setupConversionUsingOffset();\n editor.commands.add('indentBlock', new IndentBlockCommand(editor, new IndentUsingOffset({\n direction: 'forward',\n offset: configuration.offset,\n unit: configuration.unit\n })));\n editor.commands.add('outdentBlock', new IndentBlockCommand(editor, new IndentUsingOffset({\n direction: 'backward',\n offset: configuration.offset,\n unit: configuration.unit\n })));\n }\n }\n /**\n * @inheritDoc\n */\n afterInit() {\n const editor = this.editor;\n const schema = editor.model.schema;\n const indentCommand = editor.commands.get('indent');\n const outdentCommand = editor.commands.get('outdent');\n // Enable block indentation to heading configuration options. If it is not defined enable in paragraph and default headings.\n const options = editor.config.get('heading.options');\n const configuredElements = options && options.map(option => option.model);\n const knownElements = configuredElements || DEFAULT_ELEMENTS;\n knownElements.forEach(elementName => {\n if (schema.isRegistered(elementName)) {\n schema.extend(elementName, { allowAttributes: 'blockIndent' });\n }\n });\n schema.setAttributeProperties('blockIndent', { isFormatting: true });\n indentCommand.registerChildCommand(editor.commands.get('indentBlock'));\n outdentCommand.registerChildCommand(editor.commands.get('outdentBlock'));\n }\n /**\n * Setups conversion for using offset indents.\n */\n _setupConversionUsingOffset() {\n const conversion = this.editor.conversion;\n const locale = this.editor.locale;\n const marginProperty = locale.contentLanguageDirection === 'rtl' ? 'margin-right' : 'margin-left';\n conversion.for('upcast').attributeToAttribute({\n view: {\n styles: {\n [marginProperty]: /[\\s\\S]+/\n }\n },\n model: {\n key: 'blockIndent',\n value: (viewElement) => {\n // Do not indent block elements in Document Lists. See https://github.com/ckeditor/ckeditor5/issues/12466.\n if (!viewElement.is('element', 'li')) {\n return viewElement.getStyle(marginProperty);\n }\n }\n }\n });\n conversion.for('downcast').attributeToAttribute({\n model: 'blockIndent',\n view: modelAttributeValue => {\n return {\n key: 'style',\n value: {\n [marginProperty]: modelAttributeValue\n }\n };\n }\n });\n }\n /**\n * Setups conversion for using classes.\n */\n _setupConversionUsingClasses(classes) {\n const definition = {\n model: {\n key: 'blockIndent',\n values: []\n },\n view: {}\n };\n for (const className of classes) {\n definition.model.values.push(className);\n definition.view[className] = {\n key: 'class',\n value: [className]\n };\n }\n this.editor.conversion.attributeToAttribute(definition);\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/utils/automaticdecorators\n */\nimport { toMap } from 'ckeditor5/src/utils.js';\n/**\n * Helper class that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition} and provides\n * the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement downcast dispatchers} for them.\n */\nexport default class AutomaticDecorators {\n constructor() {\n /**\n * Stores the definition of {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}.\n * This data is used as a source for a downcast dispatcher to create a proper conversion to output data.\n */\n this._definitions = new Set();\n }\n /**\n * Gives information about the number of decorators stored in the {@link module:link/utils/automaticdecorators~AutomaticDecorators}\n * instance.\n */\n get length() {\n return this._definitions.size;\n }\n /**\n * Adds automatic decorator objects or an array with them to be used during downcasting.\n *\n * @param item A configuration object of automatic rules for decorating links. It might also be an array of such objects.\n */\n add(item) {\n if (Array.isArray(item)) {\n item.forEach(item => this._definitions.add(item));\n }\n else {\n this._definitions.add(item);\n }\n }\n /**\n * Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method.\n *\n * @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n */\n getDispatcher() {\n return dispatcher => {\n dispatcher.on('attribute:linkHref', (evt, data, conversionApi) => {\n // There is only test as this behavior decorates links and\n // it is run before dispatcher which actually consumes this node.\n // This allows on writing own dispatcher with highest priority,\n // which blocks both native converter and this additional decoration.\n if (!conversionApi.consumable.test(data.item, 'attribute:linkHref')) {\n return;\n }\n // Automatic decorators for block links are handled e.g. in LinkImageEditing.\n if (!(data.item.is('selection') || conversionApi.schema.isInline(data.item))) {\n return;\n }\n const viewWriter = conversionApi.writer;\n const viewSelection = viewWriter.document.selection;\n for (const item of this._definitions) {\n const viewElement = viewWriter.createAttributeElement('a', item.attributes, {\n priority: 5\n });\n if (item.classes) {\n viewWriter.addClass(item.classes, viewElement);\n }\n for (const key in item.styles) {\n viewWriter.setStyle(key, item.styles[key], viewElement);\n }\n viewWriter.setCustomProperty('link', true, viewElement);\n if (item.callback(data.attributeNewValue)) {\n if (data.item.is('selection')) {\n viewWriter.wrap(viewSelection.getFirstRange(), viewElement);\n }\n else {\n viewWriter.wrap(conversionApi.mapper.toViewRange(data.range), viewElement);\n }\n }\n else {\n viewWriter.unwrap(conversionApi.mapper.toViewRange(data.range), viewElement);\n }\n }\n }, { priority: 'high' });\n };\n }\n /**\n * Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method\n * when linking images.\n *\n * @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n */\n getDispatcherForLinkedImage() {\n return dispatcher => {\n dispatcher.on('attribute:linkHref:imageBlock', (evt, data, { writer, mapper }) => {\n const viewFigure = mapper.toViewElement(data.item);\n const linkInImage = Array.from(viewFigure.getChildren())\n .find((child) => child.is('element', 'a'));\n for (const item of this._definitions) {\n const attributes = toMap(item.attributes);\n if (item.callback(data.attributeNewValue)) {\n for (const [key, val] of attributes) {\n // Left for backward compatibility. Since v30 decorator should\n // accept `classes` and `styles` separately from `attributes`.\n if (key === 'class') {\n writer.addClass(val, linkInImage);\n }\n else {\n writer.setAttribute(key, val, linkInImage);\n }\n }\n if (item.classes) {\n writer.addClass(item.classes, linkInImage);\n }\n for (const key in item.styles) {\n writer.setStyle(key, item.styles[key], linkInImage);\n }\n }\n else {\n for (const [key, val] of attributes) {\n if (key === 'class') {\n writer.removeClass(val, linkInImage);\n }\n else {\n writer.removeAttribute(key, linkInImage);\n }\n }\n if (item.classes) {\n writer.removeClass(item.classes, linkInImage);\n }\n for (const key in item.styles) {\n writer.removeStyle(key, linkInImage);\n }\n }\n }\n });\n };\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { upperFirst } from 'lodash-es';\nconst ATTRIBUTE_WHITESPACES = /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g; // eslint-disable-line no-control-regex\nconst SAFE_URL = /^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;\n// Simplified email test - should be run over previously found URL.\nconst EMAIL_REG_EXP = /^[\\S]+@((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})$/i;\n// The regex checks for the protocol syntax ('xxxx://' or 'xxxx:')\n// or non-word characters at the beginning of the link ('/', '#' etc.).\nconst PROTOCOL_REG_EXP = /^((\\w+:(\\/{2,})?)|(\\W))/i;\n/**\n * A keystroke used by the {@link module:link/linkui~LinkUI link UI feature}.\n */\nexport const LINK_KEYSTROKE = 'Ctrl+K';\n/**\n * Returns `true` if a given view node is the link element.\n */\nexport function isLinkElement(node) {\n return node.is('attributeElement') && !!node.getCustomProperty('link');\n}\n/**\n * Creates a link {@link module:engine/view/attributeelement~AttributeElement} with the provided `href` attribute.\n */\nexport function createLinkElement(href, { writer }) {\n // Priority 5 - https://github.com/ckeditor/ckeditor5-link/issues/121.\n const linkElement = writer.createAttributeElement('a', { href }, { priority: 5 });\n writer.setCustomProperty('link', true, linkElement);\n return linkElement;\n}\n/**\n * Returns a safe URL based on a given value.\n *\n * A URL is considered safe if it is safe for the user (does not contain any malicious code).\n *\n * If a URL is considered unsafe, a simple `\"#\"` is returned.\n *\n * @internal\n */\nexport function ensureSafeUrl(url) {\n const urlString = String(url);\n return isSafeUrl(urlString) ? urlString : '#';\n}\n/**\n * Checks whether the given URL is safe for the user (does not contain any malicious code).\n */\nfunction isSafeUrl(url) {\n const normalizedUrl = url.replace(ATTRIBUTE_WHITESPACES, '');\n return !!normalizedUrl.match(SAFE_URL);\n}\n/**\n * Returns the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration processed\n * to respect the locale of the editor, i.e. to display the {@link module:link/linkconfig~LinkDecoratorManualDefinition label}\n * in the correct language.\n *\n * **Note**: Only the few most commonly used labels are translated automatically. Other labels should be manually\n * translated in the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration.\n *\n * @param t Shorthand for {@link module:utils/locale~Locale#t Locale#t}.\n * @param decorators The decorator reference where the label values should be localized.\n */\nexport function getLocalizedDecorators(t, decorators) {\n const localizedDecoratorsLabels = {\n 'Open in a new tab': t('Open in a new tab'),\n 'Downloadable': t('Downloadable')\n };\n decorators.forEach(decorator => {\n if ('label' in decorator && localizedDecoratorsLabels[decorator.label]) {\n decorator.label = localizedDecoratorsLabels[decorator.label];\n }\n return decorator;\n });\n return decorators;\n}\n/**\n * Converts an object with defined decorators to a normalized array of decorators. The `id` key is added for each decorator and\n * is used as the attribute's name in the model.\n */\nexport function normalizeDecorators(decorators) {\n const retArray = [];\n if (decorators) {\n for (const [key, value] of Object.entries(decorators)) {\n const decorator = Object.assign({}, value, { id: `link${upperFirst(key)}` });\n retArray.push(decorator);\n }\n }\n return retArray;\n}\n/**\n * Returns `true` if the specified `element` can be linked (the element allows the `linkHref` attribute).\n */\nexport function isLinkableElement(element, schema) {\n if (!element) {\n return false;\n }\n return schema.checkAttribute(element.name, 'linkHref');\n}\n/**\n * Returns `true` if the specified `value` is an email.\n */\nexport function isEmail(value) {\n return EMAIL_REG_EXP.test(value);\n}\n/**\n * Adds the protocol prefix to the specified `link` when:\n *\n * * it does not contain it already, and there is a {@link module:link/linkconfig~LinkConfig#defaultProtocol `defaultProtocol` }\n * configuration value provided,\n * * or the link is an email address.\n */\nexport function addLinkProtocolIfApplicable(link, defaultProtocol) {\n const protocol = isEmail(link) ? 'mailto:' : defaultProtocol;\n const isProtocolNeeded = !!protocol && !linkHasProtocol(link);\n return link && isProtocolNeeded ? protocol + link : link;\n}\n/**\n * Checks if protocol is already included in the link.\n */\nexport function linkHasProtocol(link) {\n return PROTOCOL_REG_EXP.test(link);\n}\n/**\n * Opens the link in a new browser tab.\n */\nexport function openLink(link) {\n window.open(link, '_blank', 'noopener');\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/linkcommand\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { findAttributeRange } from 'ckeditor5/src/typing.js';\nimport { Collection, first, toMap } from 'ckeditor5/src/utils.js';\nimport AutomaticDecorators from './utils/automaticdecorators.js';\nimport { isLinkableElement } from './utils.js';\n/**\n * The link command. It is used by the {@link module:link/link~Link link feature}.\n */\nexport default class LinkCommand extends Command {\n constructor() {\n super(...arguments);\n /**\n * A collection of {@link module:link/utils/manualdecorator~ManualDecorator manual decorators}\n * corresponding to the {@link module:link/linkconfig~LinkConfig#decorators decorator configuration}.\n *\n * You can consider it a model with states of manual decorators added to the currently selected link.\n */\n this.manualDecorators = new Collection();\n /**\n * An instance of the helper that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition}\n * that are used by the {@glink features/link link} and the {@glink features/images/images-linking linking images} features.\n */\n this.automaticDecorators = new AutomaticDecorators();\n }\n /**\n * Synchronizes the state of {@link #manualDecorators} with the currently present elements in the model.\n */\n restoreManualDecoratorStates() {\n for (const manualDecorator of this.manualDecorators) {\n manualDecorator.value = this._getDecoratorStateFromModel(manualDecorator.id);\n }\n }\n /**\n * @inheritDoc\n */\n refresh() {\n const model = this.editor.model;\n const selection = model.document.selection;\n const selectedElement = selection.getSelectedElement() || first(selection.getSelectedBlocks());\n // A check for any integration that allows linking elements (e.g. `LinkImage`).\n // Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n if (isLinkableElement(selectedElement, model.schema)) {\n this.value = selectedElement.getAttribute('linkHref');\n this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');\n }\n else {\n this.value = selection.getAttribute('linkHref');\n this.isEnabled = model.schema.checkAttributeInSelection(selection, 'linkHref');\n }\n for (const manualDecorator of this.manualDecorators) {\n manualDecorator.value = this._getDecoratorStateFromModel(manualDecorator.id);\n }\n }\n /**\n * Executes the command.\n *\n * When the selection is non-collapsed, the `linkHref` attribute will be applied to nodes inside the selection, but only to\n * those nodes where the `linkHref` attribute is allowed (disallowed nodes will be omitted).\n *\n * When the selection is collapsed and is not inside the text with the `linkHref` attribute, a\n * new {@link module:engine/model/text~Text text node} with the `linkHref` attribute will be inserted in place of the caret, but\n * only if such element is allowed in this place. The `_data` of the inserted text will equal the `href` parameter.\n * The selection will be updated to wrap the just inserted text node.\n *\n * When the selection is collapsed and inside the text with the `linkHref` attribute, the attribute value will be updated.\n *\n * # Decorators and model attribute management\n *\n * There is an optional argument to this command that applies or removes model\n * {@glink framework/architecture/editing-engine#text-attributes text attributes} brought by\n * {@link module:link/utils/manualdecorator~ManualDecorator manual link decorators}.\n *\n * Text attribute names in the model correspond to the entries in the {@link module:link/linkconfig~LinkConfig#decorators\n * configuration}.\n * For every decorator configured, a model text attribute exists with the \"link\" prefix. For example, a `'linkMyDecorator'` attribute\n * corresponds to `'myDecorator'` in the configuration.\n *\n * To learn more about link decorators, check out the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`}\n * documentation.\n *\n * Here is how to manage decorator attributes with the link command:\n *\n * ```ts\n * const linkCommand = editor.commands.get( 'link' );\n *\n * // Adding a new decorator attribute.\n * linkCommand.execute( 'http://example.com', {\n * \tlinkIsExternal: true\n * } );\n *\n * // Removing a decorator attribute from the selection.\n * linkCommand.execute( 'http://example.com', {\n * \tlinkIsExternal: false\n * } );\n *\n * // Adding multiple decorator attributes at the same time.\n * linkCommand.execute( 'http://example.com', {\n * \tlinkIsExternal: true,\n * \tlinkIsDownloadable: true,\n * } );\n *\n * // Removing and adding decorator attributes at the same time.\n * linkCommand.execute( 'http://example.com', {\n * \tlinkIsExternal: false,\n * \tlinkFoo: true,\n * \tlinkIsDownloadable: false,\n * } );\n * ```\n *\n * **Note**: If the decorator attribute name is not specified, its state remains untouched.\n *\n * **Note**: {@link module:link/unlinkcommand~UnlinkCommand#execute `UnlinkCommand#execute()`} removes all\n * decorator attributes.\n *\n * @fires execute\n * @param href Link destination.\n * @param manualDecoratorIds The information about manual decorator attributes to be applied or removed upon execution.\n */\n execute(href, manualDecoratorIds = {}) {\n const model = this.editor.model;\n const selection = model.document.selection;\n // Stores information about manual decorators to turn them on/off when command is applied.\n const truthyManualDecorators = [];\n const falsyManualDecorators = [];\n for (const name in manualDecoratorIds) {\n if (manualDecoratorIds[name]) {\n truthyManualDecorators.push(name);\n }\n else {\n falsyManualDecorators.push(name);\n }\n }\n model.change(writer => {\n // If selection is collapsed then update selected link or insert new one at the place of caret.\n if (selection.isCollapsed) {\n const position = selection.getFirstPosition();\n // When selection is inside text with `linkHref` attribute.\n if (selection.hasAttribute('linkHref')) {\n const linkText = extractTextFromSelection(selection);\n // Then update `linkHref` value.\n let linkRange = findAttributeRange(position, 'linkHref', selection.getAttribute('linkHref'), model);\n if (selection.getAttribute('linkHref') === linkText) {\n linkRange = this._updateLinkContent(model, writer, linkRange, href);\n }\n writer.setAttribute('linkHref', href, linkRange);\n truthyManualDecorators.forEach(item => {\n writer.setAttribute(item, true, linkRange);\n });\n falsyManualDecorators.forEach(item => {\n writer.removeAttribute(item, linkRange);\n });\n // Put the selection at the end of the updated link.\n writer.setSelection(writer.createPositionAfter(linkRange.end.nodeBefore));\n }\n // If not then insert text node with `linkHref` attribute in place of caret.\n // However, since selection is collapsed, attribute value will be used as data for text node.\n // So, if `href` is empty, do not create text node.\n else if (href !== '') {\n const attributes = toMap(selection.getAttributes());\n attributes.set('linkHref', href);\n truthyManualDecorators.forEach(item => {\n attributes.set(item, true);\n });\n const { end: positionAfter } = model.insertContent(writer.createText(href, attributes), position);\n // Put the selection at the end of the inserted link.\n // Using end of range returned from insertContent in case nodes with the same attributes got merged.\n writer.setSelection(positionAfter);\n }\n // Remove the `linkHref` attribute and all link decorators from the selection.\n // It stops adding a new content into the link element.\n ['linkHref', ...truthyManualDecorators, ...falsyManualDecorators].forEach(item => {\n writer.removeSelectionAttribute(item);\n });\n }\n else {\n // If selection has non-collapsed ranges, we change attribute on nodes inside those ranges\n // omitting nodes where the `linkHref` attribute is disallowed.\n const ranges = model.schema.getValidRanges(selection.getRanges(), 'linkHref');\n // But for the first, check whether the `linkHref` attribute is allowed on selected blocks (e.g. the \"image\" element).\n const allowedRanges = [];\n for (const element of selection.getSelectedBlocks()) {\n if (model.schema.checkAttribute(element, 'linkHref')) {\n allowedRanges.push(writer.createRangeOn(element));\n }\n }\n // Ranges that accept the `linkHref` attribute. Since we will iterate over `allowedRanges`, let's clone it.\n const rangesToUpdate = allowedRanges.slice();\n // For all selection ranges we want to check whether given range is inside an element that accepts the `linkHref` attribute.\n // If so, we don't want to propagate applying the attribute to its children.\n for (const range of ranges) {\n if (this._isRangeToUpdate(range, allowedRanges)) {\n rangesToUpdate.push(range);\n }\n }\n for (const range of rangesToUpdate) {\n let linkRange = range;\n if (rangesToUpdate.length === 1) {\n // Current text of the link in the document.\n const linkText = extractTextFromSelection(selection);\n if (selection.getAttribute('linkHref') === linkText) {\n linkRange = this._updateLinkContent(model, writer, range, href);\n writer.setSelection(writer.createSelection(linkRange));\n }\n }\n writer.setAttribute('linkHref', href, linkRange);\n truthyManualDecorators.forEach(item => {\n writer.setAttribute(item, true, linkRange);\n });\n falsyManualDecorators.forEach(item => {\n writer.removeAttribute(item, linkRange);\n });\n }\n }\n });\n }\n /**\n * Provides information whether a decorator with a given name is present in the currently processed selection.\n *\n * @param decoratorName The name of the manual decorator used in the model\n * @returns The information whether a given decorator is currently present in the selection.\n */\n _getDecoratorStateFromModel(decoratorName) {\n const model = this.editor.model;\n const selection = model.document.selection;\n const selectedElement = selection.getSelectedElement();\n // A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.\n // Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n if (isLinkableElement(selectedElement, model.schema)) {\n return selectedElement.getAttribute(decoratorName);\n }\n return selection.getAttribute(decoratorName);\n }\n /**\n * Checks whether specified `range` is inside an element that accepts the `linkHref` attribute.\n *\n * @param range A range to check.\n * @param allowedRanges An array of ranges created on elements where the attribute is accepted.\n */\n _isRangeToUpdate(range, allowedRanges) {\n for (const allowedRange of allowedRanges) {\n // A range is inside an element that will have the `linkHref` attribute. Do not modify its nodes.\n if (allowedRange.containsRange(range)) {\n return false;\n }\n }\n return true;\n }\n /**\n * Updates selected link with a new value as its content and as its href attribute.\n *\n * @param model Model is need to insert content.\n * @param writer Writer is need to create text element in model.\n * @param range A range where should be inserted content.\n * @param href A link value which should be in the href attribute and in the content.\n */\n _updateLinkContent(model, writer, range, href) {\n const text = writer.createText(href, { linkHref: href });\n return model.insertContent(text, range);\n }\n}\n// Returns a text of a link under the collapsed selection or a selection that contains the entire link.\nfunction extractTextFromSelection(selection) {\n if (selection.isCollapsed) {\n const firstPosition = selection.getFirstPosition();\n return firstPosition.textNode && firstPosition.textNode.data;\n }\n else {\n const rangeItems = Array.from(selection.getFirstRange().getItems());\n if (rangeItems.length > 1) {\n return null;\n }\n const firstNode = rangeItems[0];\n if (firstNode.is('$text') || firstNode.is('$textProxy')) {\n return firstNode.data;\n }\n return null;\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/unlinkcommand\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { findAttributeRange } from 'ckeditor5/src/typing.js';\nimport { isLinkableElement } from './utils.js';\n/**\n * The unlink command. It is used by the {@link module:link/link~Link link plugin}.\n */\nexport default class UnlinkCommand extends Command {\n /**\n * @inheritDoc\n */\n refresh() {\n const model = this.editor.model;\n const selection = model.document.selection;\n const selectedElement = selection.getSelectedElement();\n // A check for any integration that allows linking elements (e.g. `LinkImage`).\n // Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n if (isLinkableElement(selectedElement, model.schema)) {\n this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');\n }\n else {\n this.isEnabled = model.schema.checkAttributeInSelection(selection, 'linkHref');\n }\n }\n /**\n * Executes the command.\n *\n * When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.\n * When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.\n *\n * # Decorators\n *\n * If {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} is specified,\n * all configured decorators are removed together with the `linkHref` attribute.\n *\n * @fires execute\n */\n execute() {\n const editor = this.editor;\n const model = this.editor.model;\n const selection = model.document.selection;\n const linkCommand = editor.commands.get('link');\n model.change(writer => {\n // Get ranges to unlink.\n const rangesToUnlink = selection.isCollapsed ?\n [findAttributeRange(selection.getFirstPosition(), 'linkHref', selection.getAttribute('linkHref'), model)] :\n model.schema.getValidRanges(selection.getRanges(), 'linkHref');\n // Remove `linkHref` attribute from specified ranges.\n for (const range of rangesToUnlink) {\n writer.removeAttribute('linkHref', range);\n // If there are registered custom attributes, then remove them during unlink.\n if (linkCommand) {\n for (const manualDecorator of linkCommand.manualDecorators) {\n writer.removeAttribute(manualDecorator.id, range);\n }\n }\n }\n });\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/utils/manualdecorator\n */\nimport { ObservableMixin } from 'ckeditor5/src/utils.js';\n/**\n * Helper class that stores manual decorators with observable {@link module:link/utils/manualdecorator~ManualDecorator#value}\n * to support integration with the UI state. An instance of this class is a model with the state of individual manual decorators.\n * These decorators are kept as collections in {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n */\nexport default class ManualDecorator extends ObservableMixin() {\n /**\n * Creates a new instance of {@link module:link/utils/manualdecorator~ManualDecorator}.\n *\n * @param config.id The name of the attribute used in the model that represents a given manual decorator.\n * For example: `'linkIsExternal'`.\n * @param config.label The label used in the user interface to toggle the manual decorator.\n * @param config.attributes A set of attributes added to output data when the decorator is active for a specific link.\n * Attributes should keep the format of attributes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.\n * @param [config.defaultValue] Controls whether the decorator is \"on\" by default.\n */\n constructor({ id, label, attributes, classes, styles, defaultValue }) {\n super();\n this.id = id;\n this.set('value', undefined);\n this.defaultValue = defaultValue;\n this.label = label;\n this.attributes = attributes;\n this.classes = classes;\n this.styles = styles;\n }\n /**\n * Returns {@link module:engine/view/matcher~MatcherPattern} with decorator attributes.\n *\n * @internal\n */\n _createPattern() {\n return {\n attributes: this.attributes,\n classes: this.classes,\n styles: this.styles\n };\n }\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./link.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/linkediting\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Input, TwoStepCaretMovement, inlineHighlight } from 'ckeditor5/src/typing.js';\nimport { ClipboardPipeline } from 'ckeditor5/src/clipboard.js';\nimport { keyCodes, env } from 'ckeditor5/src/utils.js';\nimport LinkCommand from './linkcommand.js';\nimport UnlinkCommand from './unlinkcommand.js';\nimport ManualDecorator from './utils/manualdecorator.js';\nimport { createLinkElement, ensureSafeUrl, getLocalizedDecorators, normalizeDecorators, openLink, addLinkProtocolIfApplicable } from './utils.js';\nimport '../theme/link.css';\nconst HIGHLIGHT_CLASS = 'ck-link_selected';\nconst DECORATOR_AUTOMATIC = 'automatic';\nconst DECORATOR_MANUAL = 'manual';\nconst EXTERNAL_LINKS_REGEXP = /^(https?:)?\\/\\//;\n/**\n * The link engine feature.\n *\n * It introduces the `linkHref=\"url\"` attribute in the model which renders to the view as a `` element\n * as well as `'link'` and `'unlink'` commands.\n */\nexport default class LinkEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'LinkEditing';\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n // Clipboard is required for handling cut and paste events while typing over the link.\n return [TwoStepCaretMovement, Input, ClipboardPipeline];\n }\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n editor.config.define('link', {\n allowCreatingEmptyLinks: false,\n addTargetToExternalLinks: false\n });\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n // Allow link attribute on all inline nodes.\n editor.model.schema.extend('$text', { allowAttributes: 'linkHref' });\n editor.conversion.for('dataDowncast')\n .attributeToElement({ model: 'linkHref', view: createLinkElement });\n editor.conversion.for('editingDowncast')\n .attributeToElement({ model: 'linkHref', view: (href, conversionApi) => {\n return createLinkElement(ensureSafeUrl(href), conversionApi);\n } });\n editor.conversion.for('upcast')\n .elementToAttribute({\n view: {\n name: 'a',\n attributes: {\n href: true\n }\n },\n model: {\n key: 'linkHref',\n value: (viewElement) => viewElement.getAttribute('href')\n }\n });\n // Create linking commands.\n editor.commands.add('link', new LinkCommand(editor));\n editor.commands.add('unlink', new UnlinkCommand(editor));\n const linkDecorators = getLocalizedDecorators(editor.t, normalizeDecorators(editor.config.get('link.decorators')));\n this._enableAutomaticDecorators(linkDecorators\n .filter((item) => item.mode === DECORATOR_AUTOMATIC));\n this._enableManualDecorators(linkDecorators\n .filter((item) => item.mode === DECORATOR_MANUAL));\n // Enable two-step caret movement for `linkHref` attribute.\n const twoStepCaretMovementPlugin = editor.plugins.get(TwoStepCaretMovement);\n twoStepCaretMovementPlugin.registerAttribute('linkHref');\n // Setup highlight over selected link.\n inlineHighlight(editor, 'linkHref', 'a', HIGHLIGHT_CLASS);\n // Handle link following by CTRL+click or ALT+ENTER\n this._enableLinkOpen();\n // Clears the DocumentSelection decorator attributes if the selection is no longer in a link (for example while using 2-SCM).\n this._enableSelectionAttributesFixer();\n // Handle adding default protocol to pasted links.\n this._enableClipboardIntegration();\n }\n /**\n * Processes an array of configured {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}\n * and registers a {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast dispatcher}\n * for each one of them. Downcast dispatchers are obtained using the\n * {@link module:link/utils/automaticdecorators~AutomaticDecorators#getDispatcher} method.\n *\n * **Note**: This method also activates the automatic external link decorator if enabled with\n * {@link module:link/linkconfig~LinkConfig#addTargetToExternalLinks `config.link.addTargetToExternalLinks`}.\n */\n _enableAutomaticDecorators(automaticDecoratorDefinitions) {\n const editor = this.editor;\n // Store automatic decorators in the command instance as we do the same with manual decorators.\n // Thanks to that, `LinkImageEditing` plugin can re-use the same definitions.\n const command = editor.commands.get('link');\n const automaticDecorators = command.automaticDecorators;\n // Adds a default decorator for external links.\n if (editor.config.get('link.addTargetToExternalLinks')) {\n automaticDecorators.add({\n id: 'linkIsExternal',\n mode: DECORATOR_AUTOMATIC,\n callback: url => !!url && EXTERNAL_LINKS_REGEXP.test(url),\n attributes: {\n target: '_blank',\n rel: 'noopener noreferrer'\n }\n });\n }\n automaticDecorators.add(automaticDecoratorDefinitions);\n if (automaticDecorators.length) {\n editor.conversion.for('downcast').add(automaticDecorators.getDispatcher());\n }\n }\n /**\n * Processes an array of configured {@link module:link/linkconfig~LinkDecoratorManualDefinition manual decorators},\n * transforms them into {@link module:link/utils/manualdecorator~ManualDecorator} instances and stores them in the\n * {@link module:link/linkcommand~LinkCommand#manualDecorators} collection (a model for manual decorators state).\n *\n * Also registers an {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement attribute-to-element}\n * converter for each manual decorator and extends the {@link module:engine/model/schema~Schema model's schema}\n * with adequate model attributes.\n */\n _enableManualDecorators(manualDecoratorDefinitions) {\n if (!manualDecoratorDefinitions.length) {\n return;\n }\n const editor = this.editor;\n const command = editor.commands.get('link');\n const manualDecorators = command.manualDecorators;\n manualDecoratorDefinitions.forEach(decoratorDefinition => {\n editor.model.schema.extend('$text', { allowAttributes: decoratorDefinition.id });\n // Keeps reference to manual decorator to decode its name to attributes during downcast.\n const decorator = new ManualDecorator(decoratorDefinition);\n manualDecorators.add(decorator);\n editor.conversion.for('downcast').attributeToElement({\n model: decorator.id,\n view: (manualDecoratorValue, { writer, schema }, { item }) => {\n // Manual decorators for block links are handled e.g. in LinkImageEditing.\n if (!(item.is('selection') || schema.isInline(item))) {\n return;\n }\n if (manualDecoratorValue) {\n const element = writer.createAttributeElement('a', decorator.attributes, { priority: 5 });\n if (decorator.classes) {\n writer.addClass(decorator.classes, element);\n }\n for (const key in decorator.styles) {\n writer.setStyle(key, decorator.styles[key], element);\n }\n writer.setCustomProperty('link', true, element);\n return element;\n }\n }\n });\n editor.conversion.for('upcast').elementToAttribute({\n view: {\n name: 'a',\n ...decorator._createPattern()\n },\n model: {\n key: decorator.id\n }\n });\n });\n }\n /**\n * Attaches handlers for {@link module:engine/view/document~Document#event:enter} and\n * {@link module:engine/view/document~Document#event:click} to enable link following.\n */\n _enableLinkOpen() {\n const editor = this.editor;\n const view = editor.editing.view;\n const viewDocument = view.document;\n this.listenTo(viewDocument, 'click', (evt, data) => {\n const shouldOpen = env.isMac ? data.domEvent.metaKey : data.domEvent.ctrlKey;\n if (!shouldOpen) {\n return;\n }\n let clickedElement = data.domTarget;\n if (clickedElement.tagName.toLowerCase() != 'a') {\n clickedElement = clickedElement.closest('a');\n }\n if (!clickedElement) {\n return;\n }\n const url = clickedElement.getAttribute('href');\n if (!url) {\n return;\n }\n evt.stop();\n data.preventDefault();\n openLink(url);\n }, { context: '$capture' });\n // Open link on Alt+Enter.\n this.listenTo(viewDocument, 'keydown', (evt, data) => {\n const linkCommand = editor.commands.get('link');\n const url = linkCommand.value;\n const shouldOpen = !!url && data.keyCode === keyCodes.enter && data.altKey;\n if (!shouldOpen) {\n return;\n }\n evt.stop();\n openLink(url);\n });\n }\n /**\n * Watches the DocumentSelection attribute changes and removes link decorator attributes when the linkHref attribute is removed.\n *\n * This is to ensure that there is no left-over link decorator attributes on the document selection that is no longer in a link.\n */\n _enableSelectionAttributesFixer() {\n const editor = this.editor;\n const model = editor.model;\n const selection = model.document.selection;\n this.listenTo(selection, 'change:attribute', (evt, { attributeKeys }) => {\n if (!attributeKeys.includes('linkHref') || selection.hasAttribute('linkHref')) {\n return;\n }\n model.change(writer => {\n removeLinkAttributesFromSelection(writer, getLinkAttributesAllowedOnText(model.schema));\n });\n });\n }\n /**\n * Enables URL fixing on pasting.\n */\n _enableClipboardIntegration() {\n const editor = this.editor;\n const model = editor.model;\n const defaultProtocol = this.editor.config.get('link.defaultProtocol');\n if (!defaultProtocol) {\n return;\n }\n this.listenTo(editor.plugins.get('ClipboardPipeline'), 'contentInsertion', (evt, data) => {\n model.change(writer => {\n const range = writer.createRangeIn(data.content);\n for (const item of range.getItems()) {\n if (item.hasAttribute('linkHref')) {\n const newLink = addLinkProtocolIfApplicable(item.getAttribute('linkHref'), defaultProtocol);\n writer.setAttribute('linkHref', newLink, item);\n }\n }\n });\n });\n }\n}\n/**\n * Make the selection free of link-related model attributes.\n * All link-related model attributes start with \"link\". That includes not only \"linkHref\"\n * but also all decorator attributes (they have dynamic names), or even custom plugins.\n */\nfunction removeLinkAttributesFromSelection(writer, linkAttributes) {\n writer.removeSelectionAttribute('linkHref');\n for (const attribute of linkAttributes) {\n writer.removeSelectionAttribute(attribute);\n }\n}\n/**\n * Returns an array containing names of the attributes allowed on `$text` that describes the link item.\n */\nfunction getLinkAttributesAllowedOnText(schema) {\n const textAttributes = schema.getDefinition('$text').allowAttributes;\n return textAttributes.filter(attribute => attribute.startsWith('link'));\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./linkform.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/ui/linkformview\n */\nimport { ButtonView, FocusCycler, LabeledFieldView, SwitchButtonView, View, ViewCollection, createLabeledInputText, submitHandler } from 'ckeditor5/src/ui.js';\nimport { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';\nimport { icons } from 'ckeditor5/src/core.js';\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/linkform.css';\n/**\n * The link form view controller class.\n *\n * See {@link module:link/ui/linkformview~LinkFormView}.\n */\nexport default class LinkFormView extends View {\n /**\n * Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.\n *\n * Also see {@link #render}.\n *\n * @param locale The localization services instance.\n * @param linkCommand Reference to {@link module:link/linkcommand~LinkCommand}.\n */\n constructor(locale, linkCommand) {\n super(locale);\n /**\n * Tracks information about DOM focus in the form.\n */\n this.focusTracker = new FocusTracker();\n /**\n * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n */\n this.keystrokes = new KeystrokeHandler();\n /**\n * A collection of views that can be focused in the form.\n */\n this._focusables = new ViewCollection();\n const t = locale.t;\n this.urlInputView = this._createUrlInput();\n this.saveButtonView = this._createButton(t('Save'), icons.check, 'ck-button-save');\n this.saveButtonView.type = 'submit';\n this.cancelButtonView = this._createButton(t('Cancel'), icons.cancel, 'ck-button-cancel', 'cancel');\n this._manualDecoratorSwitches = this._createManualDecoratorSwitches(linkCommand);\n this.children = this._createFormChildren(linkCommand.manualDecorators);\n this._focusCycler = new FocusCycler({\n focusables: this._focusables,\n focusTracker: this.focusTracker,\n keystrokeHandler: this.keystrokes,\n actions: {\n // Navigate form fields backwards using the Shift + Tab keystroke.\n focusPrevious: 'shift + tab',\n // Navigate form fields forwards using the Tab key.\n focusNext: 'tab'\n }\n });\n const classList = ['ck', 'ck-link-form', 'ck-responsive-form'];\n if (linkCommand.manualDecorators.length) {\n classList.push('ck-link-form_layout-vertical', 'ck-vertical-form');\n }\n this.setTemplate({\n tag: 'form',\n attributes: {\n class: classList,\n // https://github.com/ckeditor/ckeditor5-link/issues/90\n tabindex: '-1'\n },\n children: this.children\n });\n }\n /**\n * Obtains the state of the {@link module:ui/button/switchbuttonview~SwitchButtonView switch buttons} representing\n * {@link module:link/linkcommand~LinkCommand#manualDecorators manual link decorators}\n * in the {@link module:link/ui/linkformview~LinkFormView}.\n *\n * @returns Key-value pairs, where the key is the name of the decorator and the value is its state.\n */\n getDecoratorSwitchesState() {\n return Array\n .from(this._manualDecoratorSwitches)\n .reduce((accumulator, switchButton) => {\n accumulator[switchButton.name] = switchButton.isOn;\n return accumulator;\n }, {});\n }\n /**\n * @inheritDoc\n */\n render() {\n super.render();\n submitHandler({\n view: this\n });\n const childViews = [\n this.urlInputView,\n ...this._manualDecoratorSwitches,\n this.saveButtonView,\n this.cancelButtonView\n ];\n childViews.forEach(v => {\n // Register the view as focusable.\n this._focusables.add(v);\n // Register the view in the focus tracker.\n this.focusTracker.add(v.element);\n });\n // Start listening for the keystrokes coming from #element.\n this.keystrokes.listenTo(this.element);\n }\n /**\n * @inheritDoc\n */\n destroy() {\n super.destroy();\n this.focusTracker.destroy();\n this.keystrokes.destroy();\n }\n /**\n * Focuses the fist {@link #_focusables} in the form.\n */\n focus() {\n this._focusCycler.focusFirst();\n }\n /**\n * Creates a labeled input view.\n *\n * @returns Labeled field view instance.\n */\n _createUrlInput() {\n const t = this.locale.t;\n const labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n labeledInput.label = t('Link URL');\n return labeledInput;\n }\n /**\n * Creates a button view.\n *\n * @param label The button label.\n * @param icon The button icon.\n * @param className The additional button CSS class name.\n * @param eventName An event name that the `ButtonView#execute` event will be delegated to.\n * @returns The button view instance.\n */\n _createButton(label, icon, className, eventName) {\n const button = new ButtonView(this.locale);\n button.set({\n label,\n icon,\n tooltip: true\n });\n button.extendTemplate({\n attributes: {\n class: className\n }\n });\n if (eventName) {\n button.delegate('execute').to(this, eventName);\n }\n return button;\n }\n /**\n * Populates {@link module:ui/viewcollection~ViewCollection} of {@link module:ui/button/switchbuttonview~SwitchButtonView}\n * made based on {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n *\n * @param linkCommand A reference to the link command.\n * @returns ViewCollection of switch buttons.\n */\n _createManualDecoratorSwitches(linkCommand) {\n const switches = this.createCollection();\n for (const manualDecorator of linkCommand.manualDecorators) {\n const switchButton = new SwitchButtonView(this.locale);\n switchButton.set({\n name: manualDecorator.id,\n label: manualDecorator.label,\n withText: true\n });\n switchButton.bind('isOn').toMany([manualDecorator, linkCommand], 'value', (decoratorValue, commandValue) => {\n return commandValue === undefined && decoratorValue === undefined ? !!manualDecorator.defaultValue : !!decoratorValue;\n });\n switchButton.on('execute', () => {\n manualDecorator.set('value', !switchButton.isOn);\n });\n switches.add(switchButton);\n }\n return switches;\n }\n /**\n * Populates the {@link #children} collection of the form.\n *\n * If {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators} are configured in the editor, it creates an\n * additional `View` wrapping all {@link #_manualDecoratorSwitches} switch buttons corresponding\n * to these decorators.\n *\n * @param manualDecorators A reference to\n * the collection of manual decorators stored in the link command.\n * @returns The children of link form view.\n */\n _createFormChildren(manualDecorators) {\n const children = this.createCollection();\n children.add(this.urlInputView);\n if (manualDecorators.length) {\n const additionalButtonsView = new View();\n additionalButtonsView.setTemplate({\n tag: 'ul',\n children: this._manualDecoratorSwitches.map(switchButton => ({\n tag: 'li',\n children: [switchButton],\n attributes: {\n class: [\n 'ck',\n 'ck-list__item'\n ]\n }\n })),\n attributes: {\n class: [\n 'ck',\n 'ck-reset',\n 'ck-list'\n ]\n }\n });\n children.add(additionalButtonsView);\n }\n children.add(this.saveButtonView);\n children.add(this.cancelButtonView);\n return children;\n }\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./linkactions.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/ui/linkactionsview\n */\nimport { ButtonView, View, ViewCollection, FocusCycler } from 'ckeditor5/src/ui.js';\nimport { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';\nimport { icons } from 'ckeditor5/src/core.js';\nimport { ensureSafeUrl } from '../utils.js';\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/linkactions.css';\nimport unlinkIcon from '../../theme/icons/unlink.svg';\n/**\n * The link actions view class. This view displays the link preview, allows\n * unlinking or editing the link.\n */\nexport default class LinkActionsView extends View {\n /**\n * @inheritDoc\n */\n constructor(locale) {\n super(locale);\n /**\n * Tracks information about DOM focus in the actions.\n */\n this.focusTracker = new FocusTracker();\n /**\n * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n */\n this.keystrokes = new KeystrokeHandler();\n /**\n * A collection of views that can be focused in the view.\n */\n this._focusables = new ViewCollection();\n const t = locale.t;\n this.previewButtonView = this._createPreviewButton();\n this.unlinkButtonView = this._createButton(t('Unlink'), unlinkIcon, 'unlink');\n this.editButtonView = this._createButton(t('Edit link'), icons.pencil, 'edit');\n this.set('href', undefined);\n this._focusCycler = new FocusCycler({\n focusables: this._focusables,\n focusTracker: this.focusTracker,\n keystrokeHandler: this.keystrokes,\n actions: {\n // Navigate fields backwards using the Shift + Tab keystroke.\n focusPrevious: 'shift + tab',\n // Navigate fields forwards using the Tab key.\n focusNext: 'tab'\n }\n });\n this.setTemplate({\n tag: 'div',\n attributes: {\n class: [\n 'ck',\n 'ck-link-actions',\n 'ck-responsive-form'\n ],\n // https://github.com/ckeditor/ckeditor5-link/issues/90\n tabindex: '-1'\n },\n children: [\n this.previewButtonView,\n this.editButtonView,\n this.unlinkButtonView\n ]\n });\n }\n /**\n * @inheritDoc\n */\n render() {\n super.render();\n const childViews = [\n this.previewButtonView,\n this.editButtonView,\n this.unlinkButtonView\n ];\n childViews.forEach(v => {\n // Register the view as focusable.\n this._focusables.add(v);\n // Register the view in the focus tracker.\n this.focusTracker.add(v.element);\n });\n // Start listening for the keystrokes coming from #element.\n this.keystrokes.listenTo(this.element);\n }\n /**\n * @inheritDoc\n */\n destroy() {\n super.destroy();\n this.focusTracker.destroy();\n this.keystrokes.destroy();\n }\n /**\n * Focuses the fist {@link #_focusables} in the actions.\n */\n focus() {\n this._focusCycler.focusFirst();\n }\n /**\n * Creates a button view.\n *\n * @param label The button label.\n * @param icon The button icon.\n * @param eventName An event name that the `ButtonView#execute` event will be delegated to.\n * @returns The button view instance.\n */\n _createButton(label, icon, eventName) {\n const button = new ButtonView(this.locale);\n button.set({\n label,\n icon,\n tooltip: true\n });\n button.delegate('execute').to(this, eventName);\n return button;\n }\n /**\n * Creates a link href preview button.\n *\n * @returns The button view instance.\n */\n _createPreviewButton() {\n const button = new ButtonView(this.locale);\n const bind = this.bindTemplate;\n const t = this.t;\n button.set({\n withText: true,\n tooltip: t('Open link in new tab')\n });\n button.extendTemplate({\n attributes: {\n class: [\n 'ck',\n 'ck-link-actions__preview'\n ],\n href: bind.to('href', href => href && ensureSafeUrl(href)),\n target: '_blank',\n rel: 'noopener noreferrer'\n }\n });\n button.bind('label').to(this, 'href', href => {\n return href || t('This link has no URL');\n });\n button.bind('isEnabled').to(this, 'href', href => !!href);\n button.template.tag = 'a';\n button.template.eventListeners = {};\n return button;\n }\n}\n","export default \"\";","export default \"\";","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/linkui\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { ClickObserver } from 'ckeditor5/src/engine.js';\nimport { ButtonView, ContextualBalloon, clickOutsideHandler, CssTransitionDisablerMixin } from 'ckeditor5/src/ui.js';\nimport { isWidget } from 'ckeditor5/src/widget.js';\nimport LinkFormView from './ui/linkformview.js';\nimport LinkActionsView from './ui/linkactionsview.js';\nimport { addLinkProtocolIfApplicable, isLinkElement, LINK_KEYSTROKE } from './utils.js';\nimport linkIcon from '../theme/icons/link.svg';\nconst VISUAL_SELECTION_MARKER_NAME = 'link-ui';\n/**\n * The link UI plugin. It introduces the `'link'` and `'unlink'` buttons and support for the Ctrl+K keystroke.\n *\n * It uses the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */\nexport default class LinkUI extends Plugin {\n constructor() {\n super(...arguments);\n /**\n * The actions view displayed inside of the balloon.\n */\n this.actionsView = null;\n /**\n * The form view displayed inside the balloon.\n */\n this.formView = null;\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n return [ContextualBalloon];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'LinkUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n editor.editing.view.addObserver(ClickObserver);\n this._balloon = editor.plugins.get(ContextualBalloon);\n // Create toolbar buttons.\n this._createToolbarLinkButton();\n this._enableBalloonActivators();\n // Renders a fake visual selection marker on an expanded selection.\n editor.conversion.for('editingDowncast').markerToHighlight({\n model: VISUAL_SELECTION_MARKER_NAME,\n view: {\n classes: ['ck-fake-link-selection']\n }\n });\n // Renders a fake visual selection marker on a collapsed selection.\n editor.conversion.for('editingDowncast').markerToElement({\n model: VISUAL_SELECTION_MARKER_NAME,\n view: {\n name: 'span',\n classes: ['ck-fake-link-selection', 'ck-fake-link-selection_collapsed']\n }\n });\n }\n /**\n * @inheritDoc\n */\n destroy() {\n super.destroy();\n // Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n if (this.formView) {\n this.formView.destroy();\n }\n if (this.actionsView) {\n this.actionsView.destroy();\n }\n }\n /**\n * Creates views.\n */\n _createViews() {\n this.actionsView = this._createActionsView();\n this.formView = this._createFormView();\n // Attach lifecycle actions to the the balloon.\n this._enableUserBalloonInteractions();\n }\n /**\n * Creates the {@link module:link/ui/linkactionsview~LinkActionsView} instance.\n */\n _createActionsView() {\n const editor = this.editor;\n const actionsView = new LinkActionsView(editor.locale);\n const linkCommand = editor.commands.get('link');\n const unlinkCommand = editor.commands.get('unlink');\n actionsView.bind('href').to(linkCommand, 'value');\n actionsView.editButtonView.bind('isEnabled').to(linkCommand);\n actionsView.unlinkButtonView.bind('isEnabled').to(unlinkCommand);\n // Execute unlink command after clicking on the \"Edit\" button.\n this.listenTo(actionsView, 'edit', () => {\n this._addFormView();\n });\n // Execute unlink command after clicking on the \"Unlink\" button.\n this.listenTo(actionsView, 'unlink', () => {\n editor.execute('unlink');\n this._hideUI();\n });\n // Close the panel on esc key press when the **actions have focus**.\n actionsView.keystrokes.set('Esc', (data, cancel) => {\n this._hideUI();\n cancel();\n });\n // Open the form view on Ctrl+K when the **actions have focus**..\n actionsView.keystrokes.set(LINK_KEYSTROKE, (data, cancel) => {\n this._addFormView();\n cancel();\n });\n return actionsView;\n }\n /**\n * Creates the {@link module:link/ui/linkformview~LinkFormView} instance.\n */\n _createFormView() {\n const editor = this.editor;\n const linkCommand = editor.commands.get('link');\n const defaultProtocol = editor.config.get('link.defaultProtocol');\n const allowCreatingEmptyLinks = editor.config.get('link.allowCreatingEmptyLinks');\n const formView = new (CssTransitionDisablerMixin(LinkFormView))(editor.locale, linkCommand);\n formView.urlInputView.fieldView.bind('value').to(linkCommand, 'value');\n // Form elements should be read-only when corresponding commands are disabled.\n formView.urlInputView.bind('isEnabled').to(linkCommand, 'isEnabled');\n // Disable the \"save\" button if the command is disabled or the input is empty despite being required.\n formView.saveButtonView.bind('isEnabled').to(linkCommand, 'isEnabled', formView.urlInputView, 'isEmpty', (isCommandEnabled, isInputEmpty) => isCommandEnabled && (allowCreatingEmptyLinks || !isInputEmpty));\n // Execute link command after clicking the \"Save\" button.\n this.listenTo(formView, 'submit', () => {\n const { value } = formView.urlInputView.fieldView.element;\n const parsedUrl = addLinkProtocolIfApplicable(value, defaultProtocol);\n editor.execute('link', parsedUrl, formView.getDecoratorSwitchesState());\n this._closeFormView();\n });\n // Hide the panel after clicking the \"Cancel\" button.\n this.listenTo(formView, 'cancel', () => {\n this._closeFormView();\n });\n // Close the panel on esc key press when the **form has focus**.\n formView.keystrokes.set('Esc', (data, cancel) => {\n this._closeFormView();\n cancel();\n });\n return formView;\n }\n /**\n * Creates a toolbar Link button. Clicking this button will show\n * a {@link #_balloon} attached to the selection.\n */\n _createToolbarLinkButton() {\n const editor = this.editor;\n const linkCommand = editor.commands.get('link');\n const t = editor.t;\n editor.ui.componentFactory.add('link', locale => {\n const button = new ButtonView(locale);\n button.isEnabled = true;\n button.label = t('Link');\n button.icon = linkIcon;\n button.keystroke = LINK_KEYSTROKE;\n button.tooltip = true;\n button.isToggleable = true;\n // Bind button to the command.\n button.bind('isEnabled').to(linkCommand, 'isEnabled');\n button.bind('isOn').to(linkCommand, 'value', value => !!value);\n // Show the panel on button click.\n this.listenTo(button, 'execute', () => this._showUI(true));\n return button;\n });\n }\n /**\n * Attaches actions that control whether the balloon panel containing the\n * {@link #formView} should be displayed.\n */\n _enableBalloonActivators() {\n const editor = this.editor;\n const viewDocument = editor.editing.view.document;\n // Handle click on view document and show panel when selection is placed inside the link element.\n // Keep panel open until selection will be inside the same link element.\n this.listenTo(viewDocument, 'click', () => {\n const parentLink = this._getSelectedLinkElement();\n if (parentLink) {\n // Then show panel but keep focus inside editor editable.\n this._showUI();\n }\n });\n // Handle the `Ctrl+K` keystroke and show the panel.\n editor.keystrokes.set(LINK_KEYSTROKE, (keyEvtData, cancel) => {\n // Prevent focusing the search bar in FF, Chrome and Edge. See https://github.com/ckeditor/ckeditor5/issues/4811.\n cancel();\n if (editor.commands.get('link').isEnabled) {\n this._showUI(true);\n }\n });\n }\n /**\n * Attaches actions that control whether the balloon panel containing the\n * {@link #formView} is visible or not.\n */\n _enableUserBalloonInteractions() {\n // Focus the form if the balloon is visible and the Tab key has been pressed.\n this.editor.keystrokes.set('Tab', (data, cancel) => {\n if (this._areActionsVisible && !this.actionsView.focusTracker.isFocused) {\n this.actionsView.focus();\n cancel();\n }\n }, {\n // Use the high priority because the link UI navigation is more important\n // than other feature's actions, e.g. list indentation.\n // https://github.com/ckeditor/ckeditor5-link/issues/146\n priority: 'high'\n });\n // Close the panel on the Esc key press when the editable has focus and the balloon is visible.\n this.editor.keystrokes.set('Esc', (data, cancel) => {\n if (this._isUIVisible) {\n this._hideUI();\n cancel();\n }\n });\n // Close on click outside of balloon panel element.\n clickOutsideHandler({\n emitter: this.formView,\n activator: () => this._isUIInPanel,\n contextElements: () => [this._balloon.view.element],\n callback: () => this._hideUI()\n });\n }\n /**\n * Adds the {@link #actionsView} to the {@link #_balloon}.\n *\n * @internal\n */\n _addActionsView() {\n if (!this.actionsView) {\n this._createViews();\n }\n if (this._areActionsInPanel) {\n return;\n }\n this._balloon.add({\n view: this.actionsView,\n position: this._getBalloonPositionData()\n });\n }\n /**\n * Adds the {@link #formView} to the {@link #_balloon}.\n */\n _addFormView() {\n if (!this.formView) {\n this._createViews();\n }\n if (this._isFormInPanel) {\n return;\n }\n const editor = this.editor;\n const linkCommand = editor.commands.get('link');\n this.formView.disableCssTransitions();\n this._balloon.add({\n view: this.formView,\n position: this._getBalloonPositionData()\n });\n // Make sure that each time the panel shows up, the URL field remains in sync with the value of\n // the command. If the user typed in the input, then canceled the balloon (`urlInputView.fieldView#value` stays\n // unaltered) and re-opened it without changing the value of the link command (e.g. because they\n // clicked the same link), they would see the old value instead of the actual value of the command.\n // https://github.com/ckeditor/ckeditor5-link/issues/78\n // https://github.com/ckeditor/ckeditor5-link/issues/123\n this.formView.urlInputView.fieldView.value = linkCommand.value || '';\n // Select input when form view is currently visible.\n if (this._balloon.visibleView === this.formView) {\n this.formView.urlInputView.fieldView.select();\n }\n this.formView.enableCssTransitions();\n }\n /**\n * Closes the form view. Decides whether the balloon should be hidden completely or if the action view should be shown. This is\n * decided upon the link command value (which has a value if the document selection is in the link).\n *\n * Additionally, if any {@link module:link/linkconfig~LinkConfig#decorators} are defined in the editor configuration, the state of\n * switch buttons responsible for manual decorator handling is restored.\n */\n _closeFormView() {\n const linkCommand = this.editor.commands.get('link');\n // Restore manual decorator states to represent the current model state. This case is important to reset the switch buttons\n // when the user cancels the editing form.\n linkCommand.restoreManualDecoratorStates();\n if (linkCommand.value !== undefined) {\n this._removeFormView();\n }\n else {\n this._hideUI();\n }\n }\n /**\n * Removes the {@link #formView} from the {@link #_balloon}.\n */\n _removeFormView() {\n if (this._isFormInPanel) {\n // Blur the input element before removing it from DOM to prevent issues in some browsers.\n // See https://github.com/ckeditor/ckeditor5/issues/1501.\n this.formView.saveButtonView.focus();\n // Reset the URL field to update the state of the submit button.\n this.formView.urlInputView.fieldView.reset();\n this._balloon.remove(this.formView);\n // Because the form has an input which has focus, the focus must be brought back\n // to the editor. Otherwise, it would be lost.\n this.editor.editing.view.focus();\n this._hideFakeVisualSelection();\n }\n }\n /**\n * Shows the correct UI type. It is either {@link #formView} or {@link #actionsView}.\n *\n * @internal\n */\n _showUI(forceVisible = false) {\n if (!this.formView) {\n this._createViews();\n }\n // When there's no link under the selection, go straight to the editing UI.\n if (!this._getSelectedLinkElement()) {\n // Show visual selection on a text without a link when the contextual balloon is displayed.\n // See https://github.com/ckeditor/ckeditor5/issues/4721.\n this._showFakeVisualSelection();\n this._addActionsView();\n // Be sure panel with link is visible.\n if (forceVisible) {\n this._balloon.showStack('main');\n }\n this._addFormView();\n }\n // If there's a link under the selection...\n else {\n // Go to the editing UI if actions are already visible.\n if (this._areActionsVisible) {\n this._addFormView();\n }\n // Otherwise display just the actions UI.\n else {\n this._addActionsView();\n }\n // Be sure panel with link is visible.\n if (forceVisible) {\n this._balloon.showStack('main');\n }\n }\n // Begin responding to ui#update once the UI is added.\n this._startUpdatingUI();\n }\n /**\n * Removes the {@link #formView} from the {@link #_balloon}.\n *\n * See {@link #_addFormView}, {@link #_addActionsView}.\n */\n _hideUI() {\n if (!this._isUIInPanel) {\n return;\n }\n const editor = this.editor;\n this.stopListening(editor.ui, 'update');\n this.stopListening(this._balloon, 'change:visibleView');\n // Make sure the focus always gets back to the editable _before_ removing the focused form view.\n // Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.\n editor.editing.view.focus();\n // Remove form first because it's on top of the stack.\n this._removeFormView();\n // Then remove the actions view because it's beneath the form.\n this._balloon.remove(this.actionsView);\n this._hideFakeVisualSelection();\n }\n /**\n * Makes the UI react to the {@link module:ui/editorui/editorui~EditorUI#event:update} event to\n * reposition itself when the editor UI should be refreshed.\n *\n * See: {@link #_hideUI} to learn when the UI stops reacting to the `update` event.\n */\n _startUpdatingUI() {\n const editor = this.editor;\n const viewDocument = editor.editing.view.document;\n let prevSelectedLink = this._getSelectedLinkElement();\n let prevSelectionParent = getSelectionParent();\n const update = () => {\n const selectedLink = this._getSelectedLinkElement();\n const selectionParent = getSelectionParent();\n // Hide the panel if:\n //\n // * the selection went out of the EXISTING link element. E.g. user moved the caret out\n // of the link,\n // * the selection went to a different parent when creating a NEW link. E.g. someone\n // else modified the document.\n // * the selection has expanded (e.g. displaying link actions then pressing SHIFT+Right arrow).\n //\n // Note: #_getSelectedLinkElement will return a link for a non-collapsed selection only\n // when fully selected.\n if ((prevSelectedLink && !selectedLink) ||\n (!prevSelectedLink && selectionParent !== prevSelectionParent)) {\n this._hideUI();\n }\n // Update the position of the panel when:\n // * link panel is in the visible stack\n // * the selection remains in the original link element,\n // * there was no link element in the first place, i.e. creating a new link\n else if (this._isUIVisible) {\n // If still in a link element, simply update the position of the balloon.\n // If there was no link (e.g. inserting one), the balloon must be moved\n // to the new position in the editing view (a new native DOM range).\n this._balloon.updatePosition(this._getBalloonPositionData());\n }\n prevSelectedLink = selectedLink;\n prevSelectionParent = selectionParent;\n };\n function getSelectionParent() {\n return viewDocument.selection.focus.getAncestors()\n .reverse()\n .find((node) => node.is('element'));\n }\n this.listenTo(editor.ui, 'update', update);\n this.listenTo(this._balloon, 'change:visibleView', update);\n }\n /**\n * Returns `true` when {@link #formView} is in the {@link #_balloon}.\n */\n get _isFormInPanel() {\n return !!this.formView && this._balloon.hasView(this.formView);\n }\n /**\n * Returns `true` when {@link #actionsView} is in the {@link #_balloon}.\n */\n get _areActionsInPanel() {\n return !!this.actionsView && this._balloon.hasView(this.actionsView);\n }\n /**\n * Returns `true` when {@link #actionsView} is in the {@link #_balloon} and it is\n * currently visible.\n */\n get _areActionsVisible() {\n return !!this.actionsView && this._balloon.visibleView === this.actionsView;\n }\n /**\n * Returns `true` when {@link #actionsView} or {@link #formView} is in the {@link #_balloon}.\n */\n get _isUIInPanel() {\n return this._isFormInPanel || this._areActionsInPanel;\n }\n /**\n * Returns `true` when {@link #actionsView} or {@link #formView} is in the {@link #_balloon} and it is\n * currently visible.\n */\n get _isUIVisible() {\n const visibleView = this._balloon.visibleView;\n return !!this.formView && visibleView == this.formView || this._areActionsVisible;\n }\n /**\n * Returns positioning options for the {@link #_balloon}. They control the way the balloon is attached\n * to the target element or selection.\n *\n * If the selection is collapsed and inside a link element, the panel will be attached to the\n * entire link element. Otherwise, it will be attached to the selection.\n */\n _getBalloonPositionData() {\n const view = this.editor.editing.view;\n const model = this.editor.model;\n const viewDocument = view.document;\n let target;\n if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n // There are cases when we highlight selection using a marker (#7705, #4721).\n const markerViewElements = Array.from(this.editor.editing.mapper.markerNameToElements(VISUAL_SELECTION_MARKER_NAME));\n const newRange = view.createRange(view.createPositionBefore(markerViewElements[0]), view.createPositionAfter(markerViewElements[markerViewElements.length - 1]));\n target = view.domConverter.viewRangeToDom(newRange);\n }\n else {\n // Make sure the target is calculated on demand at the last moment because a cached DOM range\n // (which is very fragile) can desynchronize with the state of the editing view if there was\n // any rendering done in the meantime. This can happen, for instance, when an inline widget\n // gets unlinked.\n target = () => {\n const targetLink = this._getSelectedLinkElement();\n return targetLink ?\n // When selection is inside link element, then attach panel to this element.\n view.domConverter.mapViewToDom(targetLink) :\n // Otherwise attach panel to the selection.\n view.domConverter.viewRangeToDom(viewDocument.selection.getFirstRange());\n };\n }\n return { target };\n }\n /**\n * Returns the link {@link module:engine/view/attributeelement~AttributeElement} under\n * the {@link module:engine/view/document~Document editing view's} selection or `null`\n * if there is none.\n *\n * **Note**: For a non–collapsed selection, the link element is returned when **fully**\n * selected and the **only** element within the selection boundaries, or when\n * a linked widget is selected.\n */\n _getSelectedLinkElement() {\n const view = this.editor.editing.view;\n const selection = view.document.selection;\n const selectedElement = selection.getSelectedElement();\n // The selection is collapsed or some widget is selected (especially inline widget).\n if (selection.isCollapsed || selectedElement && isWidget(selectedElement)) {\n return findLinkElementAncestor(selection.getFirstPosition());\n }\n else {\n // The range for fully selected link is usually anchored in adjacent text nodes.\n // Trim it to get closer to the actual link element.\n const range = selection.getFirstRange().getTrimmed();\n const startLink = findLinkElementAncestor(range.start);\n const endLink = findLinkElementAncestor(range.end);\n if (!startLink || startLink != endLink) {\n return null;\n }\n // Check if the link element is fully selected.\n if (view.createRangeIn(startLink).getTrimmed().isEqual(range)) {\n return startLink;\n }\n else {\n return null;\n }\n }\n }\n /**\n * Displays a fake visual selection when the contextual balloon is displayed.\n *\n * This adds a 'link-ui' marker into the document that is rendered as a highlight on selected text fragment.\n */\n _showFakeVisualSelection() {\n const model = this.editor.model;\n model.change(writer => {\n const range = model.document.selection.getFirstRange();\n if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n writer.updateMarker(VISUAL_SELECTION_MARKER_NAME, { range });\n }\n else {\n if (range.start.isAtEnd) {\n const startPosition = range.start.getLastMatchingPosition(({ item }) => !model.schema.isContent(item), { boundaries: range });\n writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {\n usingOperation: false,\n affectsData: false,\n range: writer.createRange(startPosition, range.end)\n });\n }\n else {\n writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {\n usingOperation: false,\n affectsData: false,\n range\n });\n }\n }\n });\n }\n /**\n * Hides the fake visual selection created in {@link #_showFakeVisualSelection}.\n */\n _hideFakeVisualSelection() {\n const model = this.editor.model;\n if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n model.change(writer => {\n writer.removeMarker(VISUAL_SELECTION_MARKER_NAME);\n });\n }\n }\n}\n/**\n * Returns a link element if there's one among the ancestors of the provided `Position`.\n *\n * @param View position to analyze.\n * @returns Link element at the position or null.\n */\nfunction findLinkElementAncestor(position) {\n return position.getAncestors().find((ancestor) => isLinkElement(ancestor)) || null;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/autolink\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Delete, TextWatcher, getLastTextLine, findAttributeRange } from 'ckeditor5/src/typing.js';\nimport { addLinkProtocolIfApplicable, linkHasProtocol } from './utils.js';\nimport LinkEditing from './linkediting.js';\nconst MIN_LINK_LENGTH_WITH_SPACE_AT_END = 4; // Ie: \"t.co \" (length 5).\n// This was a tweak from https://gist.github.com/dperini/729294.\nconst URL_REG_EXP = new RegExp(\n// Group 1: Line start or after a space.\n'(^|\\\\s)' +\n // Group 2: Detected URL (or e-mail).\n '(' +\n // Protocol identifier or short syntax \"//\"\n // a. Full form http://user@foo.bar.baz:8080/foo/bar.html#baz?foo=bar\n '(' +\n '(?:(?:(?:https?|ftp):)?\\\\/\\\\/)' +\n // BasicAuth using user:pass (optional)\n '(?:\\\\S+(?::\\\\S*)?@)?' +\n '(?:' +\n // IP address dotted notation octets\n // excludes loopback network 0.0.0.0\n // excludes reserved space >= 224.0.0.0\n // excludes network & broadcast addresses\n // (first & last IP address of each class)\n '(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])' +\n '(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}' +\n '(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))' +\n '|' +\n '(' +\n // Do not allow `www.foo` - see https://github.com/ckeditor/ckeditor5/issues/8050.\n '((?!www\\\\.)|(www\\\\.))' +\n // Host & domain names.\n '(?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.)+' +\n // TLD identifier name.\n '(?:[a-z\\\\u00a1-\\\\uffff]{2,63})' +\n ')' +\n ')' +\n // port number (optional)\n '(?::\\\\d{2,5})?' +\n // resource path (optional)\n '(?:[/?#]\\\\S*)?' +\n ')' +\n '|' +\n // b. Short form (either www.example.com or example@example.com)\n '(' +\n '(www.|(\\\\S+@))' +\n // Host & domain names.\n '((?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.))+' +\n // TLD identifier name.\n '(?:[a-z\\\\u00a1-\\\\uffff]{2,63})' +\n ')' +\n ')$', 'i');\nconst URL_GROUP_IN_MATCH = 2;\n/**\n * The autolink plugin.\n */\nexport default class AutoLink extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [Delete, LinkEditing];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'AutoLink';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const selection = editor.model.document.selection;\n selection.on('change:range', () => {\n // Disable plugin when selection is inside a code block.\n this.isEnabled = !selection.anchor.parent.is('element', 'codeBlock');\n });\n this._enableTypingHandling();\n }\n /**\n * @inheritDoc\n */\n afterInit() {\n this._enableEnterHandling();\n this._enableShiftEnterHandling();\n this._enablePasteLinking();\n }\n /**\n * For given position, returns a range that includes the whole link that contains the position.\n *\n * If position is not inside a link, returns `null`.\n */\n _expandLinkRange(model, position) {\n if (position.textNode && position.textNode.hasAttribute('linkHref')) {\n return findAttributeRange(position, 'linkHref', position.textNode.getAttribute('linkHref'), model);\n }\n else {\n return null;\n }\n }\n /**\n * Extends the document selection to includes all links that intersects with given `selectedRange`.\n */\n _selectEntireLinks(writer, selectedRange) {\n const editor = this.editor;\n const model = editor.model;\n const selection = model.document.selection;\n const selStart = selection.getFirstPosition();\n const selEnd = selection.getLastPosition();\n let updatedSelection = selectedRange.getJoined(this._expandLinkRange(model, selStart) || selectedRange);\n if (updatedSelection) {\n updatedSelection = updatedSelection.getJoined(this._expandLinkRange(model, selEnd) || selectedRange);\n }\n if (updatedSelection && (updatedSelection.start.isBefore(selStart) || updatedSelection.end.isAfter(selEnd))) {\n // Only update the selection if it changed.\n writer.setSelection(updatedSelection);\n }\n }\n /**\n * Enables autolinking on pasting a URL when some content is selected.\n */\n _enablePasteLinking() {\n const editor = this.editor;\n const model = editor.model;\n const selection = model.document.selection;\n const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n const linkCommand = editor.commands.get('link');\n clipboardPipeline.on('inputTransformation', (evt, data) => {\n if (!this.isEnabled || !linkCommand.isEnabled || selection.isCollapsed) {\n // Abort if we are disabled or the selection is collapsed.\n return;\n }\n if (selection.rangeCount > 1) {\n // Abort if there are multiple selection ranges.\n return;\n }\n const selectedRange = selection.getFirstRange();\n const newLink = data.dataTransfer.getData('text/plain');\n if (!newLink) {\n // Abort if there is no plain text on the clipboard.\n return;\n }\n const matches = newLink.match(URL_REG_EXP);\n // If the text in the clipboard has a URL, and that URL is the whole clipboard.\n if (matches && matches[2] === newLink) {\n model.change(writer => {\n this._selectEntireLinks(writer, selectedRange);\n linkCommand.execute(newLink);\n });\n evt.stop();\n }\n }, { priority: 'high' });\n }\n /**\n * Enables autolinking on typing.\n */\n _enableTypingHandling() {\n const editor = this.editor;\n const watcher = new TextWatcher(editor.model, text => {\n // 1. Detect Space after a text with a potential link.\n if (!isSingleSpaceAtTheEnd(text)) {\n return;\n }\n // 2. Check text before last typed Space.\n const url = getUrlAtTextEnd(text.substr(0, text.length - 1));\n if (url) {\n return { url };\n }\n });\n watcher.on('matched:data', (evt, data) => {\n const { batch, range, url } = data;\n if (!batch.isTyping) {\n return;\n }\n const linkEnd = range.end.getShiftedBy(-1); // Executed after a space character.\n const linkStart = linkEnd.getShiftedBy(-url.length);\n const linkRange = editor.model.createRange(linkStart, linkEnd);\n this._applyAutoLink(url, linkRange);\n });\n watcher.bind('isEnabled').to(this);\n }\n /**\n * Enables autolinking on the Enter key.\n */\n _enableEnterHandling() {\n const editor = this.editor;\n const model = editor.model;\n const enterCommand = editor.commands.get('enter');\n if (!enterCommand) {\n return;\n }\n enterCommand.on('execute', () => {\n const position = model.document.selection.getFirstPosition();\n if (!position.parent.previousSibling) {\n return;\n }\n const rangeToCheck = model.createRangeIn(position.parent.previousSibling);\n this._checkAndApplyAutoLinkOnRange(rangeToCheck);\n });\n }\n /**\n * Enables autolinking on the Shift+Enter keyboard shortcut.\n */\n _enableShiftEnterHandling() {\n const editor = this.editor;\n const model = editor.model;\n const shiftEnterCommand = editor.commands.get('shiftEnter');\n if (!shiftEnterCommand) {\n return;\n }\n shiftEnterCommand.on('execute', () => {\n const position = model.document.selection.getFirstPosition();\n const rangeToCheck = model.createRange(model.createPositionAt(position.parent, 0), position.getShiftedBy(-1));\n this._checkAndApplyAutoLinkOnRange(rangeToCheck);\n });\n }\n /**\n * Checks if the passed range contains a linkable text.\n */\n _checkAndApplyAutoLinkOnRange(rangeToCheck) {\n const model = this.editor.model;\n const { text, range } = getLastTextLine(rangeToCheck, model);\n const url = getUrlAtTextEnd(text);\n if (url) {\n const linkRange = model.createRange(range.end.getShiftedBy(-url.length), range.end);\n this._applyAutoLink(url, linkRange);\n }\n }\n /**\n * Applies a link on a given range if the link should be applied.\n *\n * @param url The URL to link.\n * @param range The text range to apply the link attribute to.\n */\n _applyAutoLink(url, range) {\n const model = this.editor.model;\n const defaultProtocol = this.editor.config.get('link.defaultProtocol');\n const fullUrl = addLinkProtocolIfApplicable(url, defaultProtocol);\n if (!this.isEnabled || !isLinkAllowedOnRange(range, model) || !linkHasProtocol(fullUrl) || linkIsAlreadySet(range)) {\n return;\n }\n this._persistAutoLink(fullUrl, range);\n }\n /**\n * Enqueues autolink changes in the model.\n *\n * @param url The URL to link.\n * @param range The text range to apply the link attribute to.\n */\n _persistAutoLink(url, range) {\n const model = this.editor.model;\n const deletePlugin = this.editor.plugins.get('Delete');\n // Enqueue change to make undo step.\n model.enqueueChange(writer => {\n writer.setAttribute('linkHref', url, range);\n model.enqueueChange(() => {\n deletePlugin.requestUndoOnBackspace();\n });\n });\n }\n}\n// Check if text should be evaluated by the plugin in order to reduce number of RegExp checks on whole text.\nfunction isSingleSpaceAtTheEnd(text) {\n return text.length > MIN_LINK_LENGTH_WITH_SPACE_AT_END && text[text.length - 1] === ' ' && text[text.length - 2] !== ' ';\n}\nfunction getUrlAtTextEnd(text) {\n const match = URL_REG_EXP.exec(text);\n return match ? match[URL_GROUP_IN_MATCH] : null;\n}\nfunction isLinkAllowedOnRange(range, model) {\n return model.schema.checkAttributeInSelection(model.createSelection(range), 'linkHref');\n}\nfunction linkIsAlreadySet(range) {\n const item = range.start.nodeAfter;\n return !!item && item.hasAttribute('linkHref');\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/linkimageediting\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Matcher } from 'ckeditor5/src/engine.js';\nimport { toMap } from 'ckeditor5/src/utils.js';\nimport LinkEditing from './linkediting.js';\n/**\n * The link image engine feature.\n *\n * It accepts the `linkHref=\"url\"` attribute in the model for the {@link module:image/image~Image ``} element\n * which allows linking images.\n */\nexport default class LinkImageEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return ['ImageEditing', 'ImageUtils', LinkEditing];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'LinkImageEditing';\n }\n /**\n * @inheritDoc\n */\n afterInit() {\n const editor = this.editor;\n const schema = editor.model.schema;\n if (editor.plugins.has('ImageBlockEditing')) {\n schema.extend('imageBlock', { allowAttributes: ['linkHref'] });\n }\n editor.conversion.for('upcast').add(upcastLink(editor));\n editor.conversion.for('downcast').add(downcastImageLink(editor));\n // Definitions for decorators are provided by the `link` command and the `LinkEditing` plugin.\n this._enableAutomaticDecorators();\n this._enableManualDecorators();\n }\n /**\n * Processes {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators} definitions and\n * attaches proper converters that will work when linking an image.`\n */\n _enableAutomaticDecorators() {\n const editor = this.editor;\n const command = editor.commands.get('link');\n const automaticDecorators = command.automaticDecorators;\n if (automaticDecorators.length) {\n editor.conversion.for('downcast').add(automaticDecorators.getDispatcherForLinkedImage());\n }\n }\n /**\n * Processes transformed {@link module:link/utils/manualdecorator~ManualDecorator} instances and attaches proper converters\n * that will work when linking an image.\n */\n _enableManualDecorators() {\n const editor = this.editor;\n const command = editor.commands.get('link');\n for (const decorator of command.manualDecorators) {\n if (editor.plugins.has('ImageBlockEditing')) {\n editor.model.schema.extend('imageBlock', { allowAttributes: decorator.id });\n }\n if (editor.plugins.has('ImageInlineEditing')) {\n editor.model.schema.extend('imageInline', { allowAttributes: decorator.id });\n }\n editor.conversion.for('downcast').add(downcastImageLinkManualDecorator(decorator));\n editor.conversion.for('upcast').add(upcastImageLinkManualDecorator(editor, decorator));\n }\n }\n}\n/**\n * Returns a converter for linked block images that consumes the \"href\" attribute\n * if a link contains an image.\n *\n * @param editor The editor instance.\n */\nfunction upcastLink(editor) {\n const isImageInlinePluginLoaded = editor.plugins.has('ImageInlineEditing');\n const imageUtils = editor.plugins.get('ImageUtils');\n return dispatcher => {\n dispatcher.on('element:a', (evt, data, conversionApi) => {\n const viewLink = data.viewItem;\n const imageInLink = imageUtils.findViewImgElement(viewLink);\n if (!imageInLink) {\n return;\n }\n const blockImageView = imageInLink.findAncestor(element => imageUtils.isBlockImageView(element));\n // There are four possible cases to consider here\n //\n // 1. A \"root > ... > figure.image > a > img\" structure.\n // 2. A \"root > ... > figure.image > a > picture > img\" structure.\n // 3. A \"root > ... > block > a > img\" structure.\n // 4. A \"root > ... > block > a > picture > img\" structure.\n //\n // but the last 2 cases should only be considered by this converter when the inline image plugin\n // is NOT loaded in the editor (because otherwise, that would be a plain, linked inline image).\n if (isImageInlinePluginLoaded && !blockImageView) {\n return;\n }\n // There's an image inside an element - we consume it so it won't be picked up by the Link plugin.\n const consumableAttributes = { attributes: ['href'] };\n // Consume the `href` attribute so the default one will not convert it to $text attribute.\n if (!conversionApi.consumable.consume(viewLink, consumableAttributes)) {\n // Might be consumed by something else - i.e. other converter with priority=highest - a standard check.\n return;\n }\n const linkHref = viewLink.getAttribute('href');\n // Missing the 'href' attribute.\n if (!linkHref) {\n return;\n }\n // A full definition of the image feature.\n // figure > a > img: parent of the view link element is an image element (figure).\n let modelElement = data.modelCursor.parent;\n if (!modelElement.is('element', 'imageBlock')) {\n // a > img: parent of the view link is not the image (figure) element. We need to convert it manually.\n const conversionResult = conversionApi.convertItem(imageInLink, data.modelCursor);\n // Set image range as conversion result.\n data.modelRange = conversionResult.modelRange;\n // Continue conversion where image conversion ends.\n data.modelCursor = conversionResult.modelCursor;\n modelElement = data.modelCursor.nodeBefore;\n }\n if (modelElement && modelElement.is('element', 'imageBlock')) {\n // Set the linkHref attribute from link element on model image element.\n conversionApi.writer.setAttribute('linkHref', linkHref, modelElement);\n }\n }, { priority: 'high' });\n // Using the same priority that `upcastImageLinkManualDecorator()` converter guarantees\n // that manual decorators will decorate the proper element.\n };\n}\n/**\n * Creates a converter that adds `` to linked block image view elements.\n */\nfunction downcastImageLink(editor) {\n const imageUtils = editor.plugins.get('ImageUtils');\n return dispatcher => {\n dispatcher.on('attribute:linkHref:imageBlock', (evt, data, conversionApi) => {\n if (!conversionApi.consumable.consume(data.item, evt.name)) {\n return;\n }\n // The image will be already converted - so it will be present in the view.\n const viewFigure = conversionApi.mapper.toViewElement(data.item);\n const writer = conversionApi.writer;\n // But we need to check whether the link element exists.\n const linkInImage = Array.from(viewFigure.getChildren())\n .find((child) => child.is('element', 'a'));\n const viewImage = imageUtils.findViewImgElement(viewFigure);\n // ... or \n const viewImgOrPicture = viewImage.parent.is('element', 'picture') ? viewImage.parent : viewImage;\n // If so, update the attribute if it's defined or remove the entire link if the attribute is empty.\n if (linkInImage) {\n if (data.attributeNewValue) {\n writer.setAttribute('href', data.attributeNewValue, linkInImage);\n }\n else {\n writer.move(writer.createRangeOn(viewImgOrPicture), writer.createPositionAt(viewFigure, 0));\n writer.remove(linkInImage);\n }\n }\n else {\n // But if it does not exist. Let's wrap already converted image by newly created link element.\n // 1. Create an empty link element.\n const linkElement = writer.createContainerElement('a', { href: data.attributeNewValue });\n // 2. Insert link inside the associated image.\n writer.insert(writer.createPositionAt(viewFigure, 0), linkElement);\n // 3. Move the image to the link.\n writer.move(writer.createRangeOn(viewImgOrPicture), writer.createPositionAt(linkElement, 0));\n }\n }, { priority: 'high' });\n };\n}\n/**\n * Returns a converter that decorates the `` element when the image is the link label.\n */\nfunction downcastImageLinkManualDecorator(decorator) {\n return dispatcher => {\n dispatcher.on(`attribute:${decorator.id}:imageBlock`, (evt, data, conversionApi) => {\n const viewFigure = conversionApi.mapper.toViewElement(data.item);\n const linkInImage = Array.from(viewFigure.getChildren())\n .find((child) => child.is('element', 'a'));\n // The element was removed by the time this converter is executed.\n // It may happen when the base `linkHref` and decorator attributes are removed\n // at the same time (see #8401).\n if (!linkInImage) {\n return;\n }\n for (const [key, val] of toMap(decorator.attributes)) {\n conversionApi.writer.setAttribute(key, val, linkInImage);\n }\n if (decorator.classes) {\n conversionApi.writer.addClass(decorator.classes, linkInImage);\n }\n for (const key in decorator.styles) {\n conversionApi.writer.setStyle(key, decorator.styles[key], linkInImage);\n }\n });\n };\n}\n/**\n * Returns a converter that checks whether manual decorators should be applied to the link.\n */\nfunction upcastImageLinkManualDecorator(editor, decorator) {\n const isImageInlinePluginLoaded = editor.plugins.has('ImageInlineEditing');\n const imageUtils = editor.plugins.get('ImageUtils');\n return dispatcher => {\n dispatcher.on('element:a', (evt, data, conversionApi) => {\n const viewLink = data.viewItem;\n const imageInLink = imageUtils.findViewImgElement(viewLink);\n // We need to check whether an image is inside a link because the converter handles\n // only manual decorators for linked images. See #7975.\n if (!imageInLink) {\n return;\n }\n const blockImageView = imageInLink.findAncestor(element => imageUtils.isBlockImageView(element));\n if (isImageInlinePluginLoaded && !blockImageView) {\n return;\n }\n const matcher = new Matcher(decorator._createPattern());\n const result = matcher.match(viewLink);\n // The link element does not have required attributes or/and proper values.\n if (!result) {\n return;\n }\n // Check whether we can consume those attributes.\n if (!conversionApi.consumable.consume(viewLink, result.match)) {\n return;\n }\n // At this stage we can assume that we have the `` element.\n // `nodeBefore` comes after conversion: ``.\n // `parent` comes with full image definition: `
.\n // See the body of the `upcastLink()` function.\n const modelElement = data.modelCursor.nodeBefore || data.modelCursor.parent;\n conversionApi.writer.setAttribute(decorator.id, true, modelElement);\n }, { priority: 'high' });\n // Using the same priority that `upcastLink()` converter guarantees that the linked image was properly converted.\n };\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/linkimageui\n */\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport LinkUI from './linkui.js';\nimport LinkEditing from './linkediting.js';\nimport { LINK_KEYSTROKE } from './utils.js';\nimport linkIcon from '../theme/icons/link.svg';\n/**\n * The link image UI plugin.\n *\n * This plugin provides the `'linkImage'` button that can be displayed in the {@link module:image/imagetoolbar~ImageToolbar}.\n * It can be used to wrap images in links.\n */\nexport default class LinkImageUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [LinkEditing, LinkUI, 'ImageBlockEditing'];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'LinkImageUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const viewDocument = editor.editing.view.document;\n this.listenTo(viewDocument, 'click', (evt, data) => {\n if (this._isSelectedLinkedImage(editor.model.document.selection)) {\n // Prevent browser navigation when clicking a linked image.\n data.preventDefault();\n // Block the `LinkUI` plugin when an image was clicked.\n // In such a case, we'd like to display the image toolbar.\n evt.stop();\n }\n }, { priority: 'high' });\n this._createToolbarLinkImageButton();\n }\n /**\n * Creates a `LinkImageUI` button view.\n *\n * Clicking this button shows a {@link module:link/linkui~LinkUI#_balloon} attached to the selection.\n * When an image is already linked, the view shows {@link module:link/linkui~LinkUI#actionsView} or\n * {@link module:link/linkui~LinkUI#formView} if it is not.\n */\n _createToolbarLinkImageButton() {\n const editor = this.editor;\n const t = editor.t;\n editor.ui.componentFactory.add('linkImage', locale => {\n const button = new ButtonView(locale);\n const plugin = editor.plugins.get('LinkUI');\n const linkCommand = editor.commands.get('link');\n button.set({\n isEnabled: true,\n label: t('Link image'),\n icon: linkIcon,\n keystroke: LINK_KEYSTROKE,\n tooltip: true,\n isToggleable: true\n });\n // Bind button to the command.\n button.bind('isEnabled').to(linkCommand, 'isEnabled');\n button.bind('isOn').to(linkCommand, 'value', value => !!value);\n // Show the actionsView or formView (both from LinkUI) on button click depending on whether the image is linked already.\n this.listenTo(button, 'execute', () => {\n if (this._isSelectedLinkedImage(editor.model.document.selection)) {\n plugin._addActionsView();\n }\n else {\n plugin._showUI(true);\n }\n });\n return button;\n });\n }\n /**\n * Returns true if a linked image (either block or inline) is the only selected element\n * in the model document.\n */\n _isSelectedLinkedImage(selection) {\n const selectedModelElement = selection.getSelectedElement();\n const imageUtils = this.editor.plugins.get('ImageUtils');\n return imageUtils.isImage(selectedModelElement) && selectedModelElement.hasAttribute('linkHref');\n }\n}\n","import api from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../css-loader/dist/cjs.js!../../../postcss-loader/dist/cjs.js??ruleSet[1].rules[7].use[2]!./linkimage.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module link/linkimage\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport LinkImageEditing from './linkimageediting.js';\nimport LinkImageUI from './linkimageui.js';\nimport '../theme/linkimage.css';\n/**\n * The `LinkImage` plugin.\n *\n * This is a \"glue\" plugin that loads the {@link module:link/linkimageediting~LinkImageEditing link image editing feature}\n * and {@link module:link/linkimageui~LinkImageUI link image UI feature}.\n */\nexport default class LinkImage extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [LinkImageEditing, LinkImageUI];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'LinkImage';\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module list/list/utils/listwalker\n */\nimport { first, toArray } from 'ckeditor5/src/utils.js';\nimport { isListItemBlock } from './model.js';\n/**\n * Document list blocks iterator.\n */\nexport default class ListWalker {\n /**\n * Creates a document list iterator.\n *\n * @param startElement The start list item block element.\n * @param options.direction The iterating direction.\n * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n * @param options.sameAttributes Additional attributes that must be the same for each block.\n * @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n * in the result.\n * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n * in the result.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n * in the result.\n */\n constructor(startElement, options) {\n this._startElement = startElement;\n this._referenceIndent = startElement.getAttribute('listIndent');\n this._isForward = options.direction == 'forward';\n this._includeSelf = !!options.includeSelf;\n this._sameAttributes = toArray(options.sameAttributes || []);\n this._sameIndent = !!options.sameIndent;\n this._lowerIndent = !!options.lowerIndent;\n this._higherIndent = !!options.higherIndent;\n }\n /**\n * Performs only first step of iteration and returns the result.\n *\n * @param startElement The start list item block element.\n * @param options.direction The iterating direction.\n * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n * @param options.sameAttributes Additional attributes that must be the same for each block.\n * @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n * in the result.\n * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n * in the result.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n * in the result.\n */\n static first(startElement, options) {\n const walker = new this(startElement, options);\n const iterator = walker[Symbol.iterator]();\n return first(iterator);\n }\n /**\n * Iterable interface.\n */\n *[Symbol.iterator]() {\n const nestedItems = [];\n for (const { node } of iterateSiblingListBlocks(this._getStartNode(), this._isForward ? 'forward' : 'backward')) {\n const indent = node.getAttribute('listIndent');\n // Leaving a nested list.\n if (indent < this._referenceIndent) {\n // Abort searching blocks.\n if (!this._lowerIndent) {\n break;\n }\n // While searching for lower indents, update the reference indent to find another parent in the next step.\n this._referenceIndent = indent;\n }\n // Entering a nested list.\n else if (indent > this._referenceIndent) {\n // Ignore nested blocks.\n if (!this._higherIndent) {\n continue;\n }\n // Collect nested blocks to verify if they are really nested, or it's a different item.\n if (!this._isForward) {\n nestedItems.push(node);\n continue;\n }\n }\n // Same indent level block.\n else {\n // Ignore same indent block.\n if (!this._sameIndent) {\n // While looking for nested blocks, stop iterating while encountering first same indent block.\n if (this._higherIndent) {\n // No more nested blocks so yield nested items.\n if (nestedItems.length) {\n yield* nestedItems;\n nestedItems.length = 0;\n }\n break;\n }\n continue;\n }\n // Abort if item has any additionally specified attribute different.\n if (this._sameAttributes.some(attr => node.getAttribute(attr) !== this._startElement.getAttribute(attr))) {\n break;\n }\n }\n // There is another block for the same list item so the nested items were in the same list item.\n if (nestedItems.length) {\n yield* nestedItems;\n nestedItems.length = 0;\n }\n yield node;\n }\n }\n /**\n * Returns the model element to start iterating.\n */\n _getStartNode() {\n if (this._includeSelf) {\n return this._startElement;\n }\n return this._isForward ?\n this._startElement.nextSibling :\n this._startElement.previousSibling;\n }\n}\n/**\n * Iterates sibling list blocks starting from the given node.\n *\n * @internal\n * @param node The model node.\n * @param direction Iteration direction.\n * @returns The object with `node` and `previous` {@link module:engine/model/element~Element blocks}.\n */\nexport function* iterateSiblingListBlocks(node, direction = 'forward') {\n const isForward = direction == 'forward';\n const previousNodesByIndent = []; // Last seen nodes of lower indented lists.\n let previous = null;\n while (isListItemBlock(node)) {\n let previousNodeInList = null; // It's like `previous` but has the same indent as current node.\n if (previous) {\n const nodeIndent = node.getAttribute('listIndent');\n const previousNodeIndent = previous.getAttribute('listIndent');\n // Let's find previous node for the same indent.\n // We're going to need that when we get back to previous indent.\n if (nodeIndent > previousNodeIndent) {\n previousNodesByIndent[previousNodeIndent] = previous;\n }\n // Restore the one for given indent.\n else if (nodeIndent < previousNodeIndent) {\n previousNodeInList = previousNodesByIndent[nodeIndent];\n previousNodesByIndent.length = nodeIndent;\n }\n // Same indent.\n else {\n previousNodeInList = previous;\n }\n }\n yield { node, previous, previousNodeInList };\n previous = node;\n node = isForward ? node.nextSibling : node.previousSibling;\n }\n}\n/**\n * The iterable protocol over the list elements.\n *\n * @internal\n */\nexport class ListBlocksIterable {\n /**\n * @param listHead The head element of a list.\n */\n constructor(listHead) {\n this._listHead = listHead;\n }\n /**\n * List blocks iterator.\n *\n * Iterates over all blocks of a list.\n */\n [Symbol.iterator]() {\n return iterateSiblingListBlocks(this._listHead, 'forward');\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { uid, toArray } from 'ckeditor5/src/utils.js';\nimport ListWalker, { iterateSiblingListBlocks } from './listwalker.js';\n/**\n * The list item ID generator.\n *\n * @internal\n */\nexport class ListItemUid {\n /**\n * Returns the next ID.\n *\n * @internal\n */\n /* istanbul ignore next: static function definition -- @preserve */\n static next() {\n return uid();\n }\n}\n/**\n * Returns true if the given model node is a list item block.\n *\n * @internal\n */\nexport function isListItemBlock(node) {\n return !!node && node.is('element') && node.hasAttribute('listItemId');\n}\n/**\n * Returns an array with all elements that represents the same list item.\n *\n * It means that values for `listIndent`, and `listItemId` for all items are equal.\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n * in the result.\n */\nexport function getAllListItemBlocks(listItem, options = {}) {\n return [\n ...getListItemBlocks(listItem, { ...options, direction: 'backward' }),\n ...getListItemBlocks(listItem, { ...options, direction: 'forward' })\n ];\n}\n/**\n * Returns an array with elements that represents the same list item in the specified direction.\n *\n * It means that values for `listIndent` and `listItemId` for all items are equal.\n *\n * **Note**: For backward search the provided item is not included, but for forward search it is included in the result.\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options.direction Walking direction.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included in the result.\n */\nexport function getListItemBlocks(listItem, options = {}) {\n const isForward = options.direction == 'forward';\n const items = Array.from(new ListWalker(listItem, {\n ...options,\n includeSelf: isForward,\n sameIndent: true,\n sameAttributes: 'listItemId'\n }));\n return isForward ? items : items.reverse();\n}\n/**\n * Returns a list items nested inside the given list item.\n *\n * @internal\n */\nexport function getNestedListBlocks(listItem) {\n return Array.from(new ListWalker(listItem, {\n direction: 'forward',\n higherIndent: true\n }));\n}\n/**\n * Returns array of all blocks/items of the same list as given block (same indent, same type and properties).\n *\n * @internal\n * @param listItem Starting list item element.\n */\nexport function getListItems(listItem) {\n const backwardBlocks = new ListWalker(listItem, {\n sameIndent: true,\n sameAttributes: 'listType'\n });\n const forwardBlocks = new ListWalker(listItem, {\n sameIndent: true,\n sameAttributes: 'listType',\n includeSelf: true,\n direction: 'forward'\n });\n return [\n ...Array.from(backwardBlocks).reverse(),\n ...forwardBlocks\n ];\n}\n/**\n * Check if the given block is the first in the list item.\n *\n * @internal\n * @param listBlock The list block element.\n */\nexport function isFirstBlockOfListItem(listBlock) {\n const previousSibling = ListWalker.first(listBlock, {\n sameIndent: true,\n sameAttributes: 'listItemId'\n });\n if (!previousSibling) {\n return true;\n }\n return false;\n}\n/**\n * Check if the given block is the last in the list item.\n *\n * @internal\n */\nexport function isLastBlockOfListItem(listBlock) {\n const nextSibling = ListWalker.first(listBlock, {\n direction: 'forward',\n sameIndent: true,\n sameAttributes: 'listItemId'\n });\n if (!nextSibling) {\n return true;\n }\n return false;\n}\n/**\n * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n *\n * @internal\n * @param blocks The list of selected blocks.\n * @param options.withNested Whether should include nested list items.\n */\nexport function expandListBlocksToCompleteItems(blocks, options = {}) {\n blocks = toArray(blocks);\n const higherIndent = options.withNested !== false;\n const allBlocks = new Set();\n for (const block of blocks) {\n for (const itemBlock of getAllListItemBlocks(block, { higherIndent })) {\n allBlocks.add(itemBlock);\n }\n }\n return sortBlocks(allBlocks);\n}\n/**\n * Expands the given list of selected blocks to include all the items of the lists they're in.\n *\n * @internal\n * @param blocks The list of selected blocks.\n */\nexport function expandListBlocksToCompleteList(blocks) {\n blocks = toArray(blocks);\n const allBlocks = new Set();\n for (const block of blocks) {\n for (const itemBlock of getListItems(block)) {\n allBlocks.add(itemBlock);\n }\n }\n return sortBlocks(allBlocks);\n}\n/**\n * Splits the list item just before the provided list block.\n *\n * @internal\n * @param listBlock The list block element.\n * @param writer The model writer.\n * @returns The array of updated blocks.\n */\nexport function splitListItemBefore(listBlock, writer) {\n const blocks = getListItemBlocks(listBlock, { direction: 'forward' });\n const id = ListItemUid.next();\n for (const block of blocks) {\n writer.setAttribute('listItemId', id, block);\n }\n return blocks;\n}\n/**\n * Merges the list item with the parent list item.\n *\n * @internal\n * @param listBlock The list block element.\n * @param parentBlock The list block element to merge with.\n * @param writer The model writer.\n * @returns The array of updated blocks.\n */\nexport function mergeListItemBefore(listBlock, parentBlock, writer) {\n const attributes = {};\n for (const [key, value] of parentBlock.getAttributes()) {\n if (key.startsWith('list')) {\n attributes[key] = value;\n }\n }\n const blocks = getListItemBlocks(listBlock, { direction: 'forward' });\n for (const block of blocks) {\n writer.setAttributes(attributes, block);\n }\n return blocks;\n}\n/**\n * Increases indentation of given list blocks.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @param options.expand Whether should expand the list of blocks to include complete list items.\n * @param options.indentBy The number of levels the indentation should change (could be negative).\n */\nexport function indentBlocks(blocks, writer, { expand, indentBy = 1 } = {}) {\n blocks = toArray(blocks);\n // Expand the selected blocks to contain the whole list items.\n const allBlocks = expand ? expandListBlocksToCompleteItems(blocks) : blocks;\n for (const block of allBlocks) {\n const blockIndent = block.getAttribute('listIndent') + indentBy;\n if (blockIndent < 0) {\n removeListAttributes(block, writer);\n }\n else {\n writer.setAttribute('listIndent', blockIndent, block);\n }\n }\n return allBlocks;\n}\n/**\n * Decreases indentation of given list of blocks. If the indentation of some blocks matches the indentation\n * of surrounding blocks, they get merged together.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n */\nexport function outdentBlocksWithMerge(blocks, writer) {\n blocks = toArray(blocks);\n // Expand the selected blocks to contain the whole list items.\n const allBlocks = expandListBlocksToCompleteItems(blocks);\n const visited = new Set();\n const referenceIndent = Math.min(...allBlocks.map(block => block.getAttribute('listIndent')));\n const parentBlocks = new Map();\n // Collect parent blocks before the list structure gets altered.\n for (const block of allBlocks) {\n parentBlocks.set(block, ListWalker.first(block, { lowerIndent: true }));\n }\n for (const block of allBlocks) {\n if (visited.has(block)) {\n continue;\n }\n visited.add(block);\n const blockIndent = block.getAttribute('listIndent') - 1;\n if (blockIndent < 0) {\n removeListAttributes(block, writer);\n continue;\n }\n // Merge with parent list item while outdenting and indent matches reference indent.\n if (block.getAttribute('listIndent') == referenceIndent) {\n const mergedBlocks = mergeListItemIfNotLast(block, parentBlocks.get(block), writer);\n // All list item blocks are updated while merging so add those to visited set.\n for (const mergedBlock of mergedBlocks) {\n visited.add(mergedBlock);\n }\n // The indent level was updated while merging so continue to next block.\n if (mergedBlocks.length) {\n continue;\n }\n }\n writer.setAttribute('listIndent', blockIndent, block);\n }\n return sortBlocks(visited);\n}\n/**\n * Removes all list attributes from the given blocks.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @returns Array of altered blocks.\n */\nexport function removeListAttributes(blocks, writer) {\n blocks = toArray(blocks);\n // Convert simple list items to plain paragraphs.\n for (const block of blocks) {\n if (block.is('element', 'listItem')) {\n writer.rename(block, 'paragraph');\n }\n }\n // Remove list attributes.\n for (const block of blocks) {\n for (const attributeKey of block.getAttributeKeys()) {\n if (attributeKey.startsWith('list')) {\n writer.removeAttribute(attributeKey, block);\n }\n }\n }\n return blocks;\n}\n/**\n * Checks whether the given blocks are related to a single list item.\n *\n * @internal\n * @param blocks The list block elements.\n */\nexport function isSingleListItem(blocks) {\n if (!blocks.length) {\n return false;\n }\n const firstItemId = blocks[0].getAttribute('listItemId');\n if (!firstItemId) {\n return false;\n }\n return !blocks.some(item => item.getAttribute('listItemId') != firstItemId);\n}\n/**\n * Modifies the indents of list blocks following the given list block so the indentation is valid after\n * the given block is no longer a list item.\n *\n * @internal\n * @param lastBlock The last list block that has become a non-list element.\n * @param writer The model writer.\n * @returns Array of altered blocks.\n */\nexport function outdentFollowingItems(lastBlock, writer) {\n const changedBlocks = [];\n // Start from the model item that is just after the last turned-off item.\n let currentIndent = Number.POSITIVE_INFINITY;\n // Correct indent of all items after the last turned off item.\n // Rules that should be followed:\n // 1. All direct sub-items of turned-off item should become indent 0, because the first item after it\n // will be the first item of a new list. Other items are at the same level, so should have same 0 index.\n // 2. All items with indent lower than indent of turned-off item should become indent 0, because they\n // should not end up as a child of any of list items that they were not children of before.\n // 3. All other items should have their indent changed relatively to it's parent.\n //\n // For example:\n // 1 * --------\n // 2 * --------\n // 3 * --------\t\t\t<-- this is turned off.\n // 4 * --------\t\t<-- this has to become indent = 0, because it will be first item on a new list.\n // 5 * --------\t<-- this should be still be a child of item above, so indent = 1.\n // 6 * --------\t\t\t<-- this has to become indent = 0, because it should not be a child of any of items above.\n // 7 * --------\t\t<-- this should be still be a child of item above, so indent = 1.\n // 8 * --------\t\t\t\t<-- this has to become indent = 0.\n // 9 * --------\t\t\t<-- this should still be a child of item above, so indent = 1.\n // 10 * --------\t\t<-- this should still be a child of item above, so indent = 2.\n // 11 * --------\t\t<-- this should still be at the same level as item above, so indent = 2.\n // 12 * --------\t\t\t\t<-- this and all below are left unchanged.\n // 13 * --------\n // 14 * --------\n //\n // After turning off 3 the list becomes:\n //\n // 1 * --------\n // 2 * --------\n //\n // 3 --------\n //\n // 4 * --------\n // 5 * --------\n // 6 * --------\n // 7 * --------\n // 8 * --------\n // 9 * --------\n // 10 * --------\n // 11 * --------\n // 12 * --------\n // 13 * --------\n // 14 * --------\n //\n // Thanks to this algorithm no lists are mismatched and no items get unexpected children/parent, while\n // those parent-child connection which are possible to maintain are still maintained. It's worth noting\n // that this is the same effect that we would be get by multiple use of outdent command. However doing\n // it like this is much more efficient because it's less operation (less memory usage, easier OT) and\n // less conversion (faster).\n for (const { node } of iterateSiblingListBlocks(lastBlock.nextSibling, 'forward')) {\n // Check each next list item, as long as its indent is higher than 0.\n const indent = node.getAttribute('listIndent');\n // If the indent is 0 we are not going to change anything anyway.\n if (indent == 0) {\n break;\n }\n // We check if that's item indent is lower than current relative indent.\n if (indent < currentIndent) {\n // If it is, current relative indent becomes that indent.\n currentIndent = indent;\n }\n // Fix indent relatively to current relative indent.\n // Note, that if we just changed the current relative indent, the newIndent will be equal to 0.\n const newIndent = indent - currentIndent;\n writer.setAttribute('listIndent', newIndent, node);\n changedBlocks.push(node);\n }\n return changedBlocks;\n}\n/**\n * Returns the array of given blocks sorted by model indexes (document order).\n *\n * @internal\n */\nexport function sortBlocks(blocks) {\n return Array.from(blocks)\n .filter(block => block.root.rootName !== '$graveyard')\n .sort((a, b) => a.index - b.index);\n}\n/**\n * Returns a selected block object. If a selected object is inline or when there is no selected\n * object, `null` is returned.\n *\n * @internal\n * @param model The instance of editor model.\n * @returns Selected block object or `null`.\n */\nexport function getSelectedBlockObject(model) {\n const selectedElement = model.document.selection.getSelectedElement();\n if (!selectedElement) {\n return null;\n }\n if (model.schema.isObject(selectedElement) && model.schema.isBlock(selectedElement)) {\n return selectedElement;\n }\n return null;\n}\n/**\n * Checks whether the given block can be replaced by a listItem.\n *\n * Note that this is possible only when multiBlock = false option is set in feature config.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */\nexport function canBecomeSimpleListItem(block, schema) {\n return schema.checkChild(block.parent, 'listItem') && schema.checkChild(block, '$text') && !schema.isObject(block);\n}\n/**\n * Merges a given block to the given parent block if parent is a list item and there is no more blocks in the same item.\n */\nfunction mergeListItemIfNotLast(block, parentBlock, writer) {\n const parentItemBlocks = getListItemBlocks(parentBlock, { direction: 'forward' });\n // Merge with parent only if outdented item wasn't the last one in its parent.\n // Merge:\n // * a\t\t\t->\t\t* a\n // * [b]\t\t->\t\t b\n // c\t\t\t->\t\t c\n // Don't merge:\n // * a\t\t\t->\t\t* a\n // * [b]\t\t-> \t\t* b\n // * c\t\t\t->\t\t* c\n if (parentItemBlocks.pop().index > block.index) {\n return mergeListItemBefore(block, parentBlock, writer);\n }\n return [];\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module list/list/listindentcommand\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { expandListBlocksToCompleteItems, indentBlocks, isFirstBlockOfListItem, isListItemBlock, isSingleListItem, outdentBlocksWithMerge, sortBlocks, splitListItemBefore } from './utils/model.js';\nimport ListWalker from './utils/listwalker.js';\n/**\n * The document list indent command. It is used by the {@link module:list/list~List list feature}.\n */\nexport default class ListIndentCommand extends Command {\n /**\n * Creates an instance of the command.\n *\n * @param editor The editor instance.\n * @param indentDirection The direction of indent. If it is equal to `backward`, the command\n * will outdent a list item.\n */\n constructor(editor, indentDirection) {\n super(editor);\n this._direction = indentDirection;\n }\n /**\n * @inheritDoc\n */\n refresh() {\n this.isEnabled = this._checkEnabled();\n }\n /**\n * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n *\n * @fires execute\n * @fires afterExecute\n */\n execute() {\n const model = this.editor.model;\n const blocks = getSelectedListBlocks(model.document.selection);\n model.change(writer => {\n const changedBlocks = [];\n // Handle selection contained in the single list item and starting in the following blocks.\n if (isSingleListItem(blocks) && !isFirstBlockOfListItem(blocks[0])) {\n // Allow increasing indent of following list item blocks.\n if (this._direction == 'forward') {\n changedBlocks.push(...indentBlocks(blocks, writer));\n }\n // For indent make sure that indented blocks have a new ID.\n // For outdent just split blocks from the list item (give them a new IDs).\n changedBlocks.push(...splitListItemBefore(blocks[0], writer));\n }\n // More than a single list item is selected, or the first block of list item is selected.\n else {\n // Now just update the attributes of blocks.\n if (this._direction == 'forward') {\n changedBlocks.push(...indentBlocks(blocks, writer, { expand: true }));\n }\n else {\n changedBlocks.push(...outdentBlocksWithMerge(blocks, writer));\n }\n }\n // Align the list item type to match the previous list item (from the same list).\n for (const block of changedBlocks) {\n // This block become a plain block (for example a paragraph).\n if (!block.hasAttribute('listType')) {\n continue;\n }\n const previousItemBlock = ListWalker.first(block, { sameIndent: true });\n if (previousItemBlock) {\n writer.setAttribute('listType', previousItemBlock.getAttribute('listType'), block);\n }\n }\n this._fireAfterExecute(changedBlocks);\n });\n }\n /**\n * Fires the `afterExecute` event.\n *\n * @param changedBlocks The changed list elements.\n */\n _fireAfterExecute(changedBlocks) {\n this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n }\n /**\n * Checks whether the command can be enabled in the current context.\n *\n * @returns Whether the command should be enabled.\n */\n _checkEnabled() {\n // Check whether any of position's ancestor is a list item.\n let blocks = getSelectedListBlocks(this.editor.model.document.selection);\n let firstBlock = blocks[0];\n // If selection is not in a list item, the command is disabled.\n if (!firstBlock) {\n return false;\n }\n // If we are outdenting it is enough to be in list item. Every list item can always be outdented.\n if (this._direction == 'backward') {\n return true;\n }\n // A single block of a list item is selected, so it could be indented as a sublist.\n if (isSingleListItem(blocks) && !isFirstBlockOfListItem(blocks[0])) {\n return true;\n }\n blocks = expandListBlocksToCompleteItems(blocks);\n firstBlock = blocks[0];\n // Check if there is any list item before selected items that could become a parent of selected items.\n const siblingItem = ListWalker.first(firstBlock, { sameIndent: true });\n if (!siblingItem) {\n return false;\n }\n if (siblingItem.getAttribute('listType') == firstBlock.getAttribute('listType')) {\n return true;\n }\n return false;\n }\n}\n/**\n * Returns an array of selected blocks truncated to the first non list block element.\n */\nfunction getSelectedListBlocks(selection) {\n const blocks = Array.from(selection.getSelectedBlocks());\n const firstNonListBlockIndex = blocks.findIndex(block => !isListItemBlock(block));\n if (firstNonListBlockIndex != -1) {\n blocks.length = firstNonListBlockIndex;\n }\n return blocks;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { splitListItemBefore, expandListBlocksToCompleteItems, getListItemBlocks, getListItems, removeListAttributes, outdentFollowingItems, ListItemUid, sortBlocks, getSelectedBlockObject, isListItemBlock, canBecomeSimpleListItem } from './utils/model.js';\n/**\n * The list command. It is used by the {@link module:list/list~List list feature}.\n */\nexport default class ListCommand extends Command {\n /**\n * Creates an instance of the command.\n *\n * @param editor The editor instance.\n * @param type List type that will be handled by this command.\n */\n constructor(editor, type) {\n super(editor);\n this.type = type;\n }\n /**\n * @inheritDoc\n */\n refresh() {\n this.value = this._getValue();\n this.isEnabled = this._checkEnabled();\n }\n /**\n * Executes the list command.\n *\n * @fires execute\n * @fires afterExecute\n * @param options Command options.\n * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n * selected items and potentially the neighbor elements to the proper list items. If set to `false` it will convert selected elements\n * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const document = model.document;\n const selectedBlockObject = getSelectedBlockObject(model);\n const blocks = Array.from(document.selection.getSelectedBlocks())\n .filter(block => model.schema.checkAttribute(block, 'listType') || canBecomeSimpleListItem(block, model.schema));\n // Whether we are turning off some items.\n const turnOff = options.forceValue !== undefined ? !options.forceValue : this.value;\n model.change(writer => {\n if (turnOff) {\n const lastBlock = blocks[blocks.length - 1];\n // Split the first block from the list item.\n const itemBlocks = getListItemBlocks(lastBlock, { direction: 'forward' });\n const changedBlocks = [];\n if (itemBlocks.length > 1) {\n changedBlocks.push(...splitListItemBefore(itemBlocks[1], writer));\n }\n // Strip list attributes.\n changedBlocks.push(...removeListAttributes(blocks, writer));\n // Outdent items following the selected list item.\n changedBlocks.push(...outdentFollowingItems(lastBlock, writer));\n this._fireAfterExecute(changedBlocks);\n }\n // Changing type of list items for a collapsed selection inside a list item.\n else if ((selectedBlockObject || document.selection.isCollapsed) && isListItemBlock(blocks[0])) {\n const changedBlocks = getListItems(selectedBlockObject || blocks[0]);\n for (const block of changedBlocks) {\n writer.setAttribute('listType', this.type, block);\n }\n this._fireAfterExecute(changedBlocks);\n }\n // Turning on the list items for a non-collapsed selection.\n else {\n const changedBlocks = [];\n for (const block of blocks) {\n // Promote the given block to the list item.\n if (!block.hasAttribute('listType')) {\n // Rename block to a simple list item if this option is enabled.\n if (!block.is('element', 'listItem') && canBecomeSimpleListItem(block, model.schema)) {\n writer.rename(block, 'listItem');\n }\n writer.setAttributes({\n listIndent: 0,\n listItemId: ListItemUid.next(),\n listType: this.type\n }, block);\n changedBlocks.push(block);\n }\n // Change the type of list item.\n else {\n for (const node of expandListBlocksToCompleteItems(block, { withNested: false })) {\n if (node.getAttribute('listType') != this.type) {\n writer.setAttribute('listType', this.type, node);\n changedBlocks.push(node);\n }\n }\n }\n }\n this._fireAfterExecute(changedBlocks);\n }\n });\n }\n /**\n * Fires the `afterExecute` event.\n *\n * @param changedBlocks The changed list elements.\n */\n _fireAfterExecute(changedBlocks) {\n this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n }\n /**\n * Checks the command's {@link #value}.\n *\n * @returns The current value.\n */\n _getValue() {\n const selection = this.editor.model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n if (!blocks.length) {\n return false;\n }\n for (const block of blocks) {\n if (block.getAttribute('listType') != this.type) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks whether the command can be enabled in the current context.\n *\n * @returns Whether the command should be enabled.\n */\n _checkEnabled() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n if (!blocks.length) {\n return false;\n }\n // If command value is true it means that we are in list item, so the command should be enabled.\n if (this.value) {\n return true;\n }\n for (const block of blocks) {\n if (schema.checkAttribute(block, 'listType') || canBecomeSimpleListItem(block, schema)) {\n return true;\n }\n }\n return false;\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module list/list/listmergecommand\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { getNestedListBlocks, indentBlocks, sortBlocks, isFirstBlockOfListItem, mergeListItemBefore, isSingleListItem, getSelectedBlockObject, isListItemBlock } from './utils/model.js';\nimport ListWalker from './utils/listwalker.js';\n/**\n * The document list merge command. It is used by the {@link module:list/list~List list feature}.\n */\nexport default class ListMergeCommand extends Command {\n /**\n * Creates an instance of the command.\n *\n * @param editor The editor instance.\n * @param direction Whether list item should be merged before or after the selected block.\n */\n constructor(editor, direction) {\n super(editor);\n this._direction = direction;\n }\n /**\n * @inheritDoc\n */\n refresh() {\n this.isEnabled = this._checkEnabled();\n }\n /**\n * Merges list blocks together (depending on the {@link #constructor}'s `direction` parameter).\n *\n * @fires execute\n * @fires afterExecute\n * @param options Command options.\n * @param options.shouldMergeOnBlocksContentLevel When set `true`, merging will be performed together\n * with {@link module:engine/model/model~Model#deleteContent} to get rid of the inline content in the selection or take advantage\n * of the heuristics in `deleteContent()` that helps convert lists into paragraphs in certain cases.\n */\n execute({ shouldMergeOnBlocksContentLevel = false } = {}) {\n const model = this.editor.model;\n const selection = model.document.selection;\n const changedBlocks = [];\n model.change(writer => {\n const { firstElement, lastElement } = this._getMergeSubjectElements(selection, shouldMergeOnBlocksContentLevel);\n const firstIndent = firstElement.getAttribute('listIndent') || 0;\n const lastIndent = lastElement.getAttribute('listIndent');\n const lastElementId = lastElement.getAttribute('listItemId');\n if (firstIndent != lastIndent) {\n const nestedLastElementBlocks = getNestedListBlocks(lastElement);\n changedBlocks.push(...indentBlocks([lastElement, ...nestedLastElementBlocks], writer, {\n indentBy: firstIndent - lastIndent,\n // If outdenting, the entire sub-tree that follows must be included.\n expand: firstIndent < lastIndent\n }));\n }\n if (shouldMergeOnBlocksContentLevel) {\n let sel = selection;\n if (selection.isCollapsed) {\n sel = writer.createSelection(writer.createRange(writer.createPositionAt(firstElement, 'end'), writer.createPositionAt(lastElement, 0)));\n }\n // Delete selected content. Replace entire content only for non-collapsed selection.\n model.deleteContent(sel, { doNotResetEntireContent: selection.isCollapsed });\n // Get the last \"touched\" element after deleteContent call (can't use the lastElement because\n // it could get merged into the firstElement while deleting content).\n const lastElementAfterDelete = sel.getLastPosition().parent;\n // Check if the element after it was in the same list item and adjust it if needed.\n const nextSibling = lastElementAfterDelete.nextSibling;\n changedBlocks.push(lastElementAfterDelete);\n if (nextSibling && nextSibling !== lastElement && nextSibling.getAttribute('listItemId') == lastElementId) {\n changedBlocks.push(...mergeListItemBefore(nextSibling, lastElementAfterDelete, writer));\n }\n }\n else {\n changedBlocks.push(...mergeListItemBefore(lastElement, firstElement, writer));\n }\n this._fireAfterExecute(changedBlocks);\n });\n }\n /**\n * Fires the `afterExecute` event.\n *\n * @param changedBlocks The changed list elements.\n */\n _fireAfterExecute(changedBlocks) {\n this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n }\n /**\n * Checks whether the command can be enabled in the current context.\n *\n * @returns Whether the command should be enabled.\n */\n _checkEnabled() {\n const model = this.editor.model;\n const selection = model.document.selection;\n const selectedBlockObject = getSelectedBlockObject(model);\n if (selection.isCollapsed || selectedBlockObject) {\n const positionParent = selectedBlockObject || selection.getFirstPosition().parent;\n if (!isListItemBlock(positionParent)) {\n return false;\n }\n const siblingNode = this._direction == 'backward' ?\n positionParent.previousSibling :\n positionParent.nextSibling;\n if (!siblingNode) {\n return false;\n }\n if (isSingleListItem([positionParent, siblingNode])) {\n return false;\n }\n }\n else {\n const lastPosition = selection.getLastPosition();\n const firstPosition = selection.getFirstPosition();\n // If deleting within a single block of a list item, there's no need to merge anything.\n // The default delete should be executed instead.\n if (lastPosition.parent === firstPosition.parent) {\n return false;\n }\n if (!isListItemBlock(lastPosition.parent)) {\n return false;\n }\n }\n return true;\n }\n /**\n * Returns the boundary elements the merge should be executed for. These are not necessarily selection's first\n * and last position parents but sometimes sibling or even further blocks depending on the context.\n *\n * @param selection The selection the merge is executed for.\n * @param shouldMergeOnBlocksContentLevel When `true`, merge is performed together with\n * {@link module:engine/model/model~Model#deleteContent} to remove the inline content within the selection.\n */\n _getMergeSubjectElements(selection, shouldMergeOnBlocksContentLevel) {\n const model = this.editor.model;\n const selectedBlockObject = getSelectedBlockObject(model);\n let firstElement, lastElement;\n if (selection.isCollapsed || selectedBlockObject) {\n const positionParent = selectedBlockObject || selection.getFirstPosition().parent;\n const isFirstBlock = isFirstBlockOfListItem(positionParent);\n if (this._direction == 'backward') {\n lastElement = positionParent;\n if (isFirstBlock && !shouldMergeOnBlocksContentLevel) {\n // For the \"c\" as an anchorElement:\n // * a\n // * b\n // * [c] <-- this block should be merged with \"a\"\n // It should find \"a\" element to merge with:\n // * a\n // * b\n // c\n firstElement = ListWalker.first(positionParent, { sameIndent: true, lowerIndent: true });\n }\n else {\n firstElement = positionParent.previousSibling;\n }\n }\n else {\n // In case of the forward merge there is no case as above, just merge with next sibling.\n firstElement = positionParent;\n lastElement = positionParent.nextSibling;\n }\n }\n else {\n firstElement = selection.getFirstPosition().parent;\n lastElement = selection.getLastPosition().parent;\n }\n return {\n firstElement: firstElement,\n lastElement: lastElement\n };\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command } from 'ckeditor5/src/core.js';\nimport { isFirstBlockOfListItem, isListItemBlock, sortBlocks, splitListItemBefore } from './utils/model.js';\n/**\n * The document list split command that splits the list item at the selection.\n *\n * It is used by the {@link module:list/list~List list feature}.\n */\nexport default class ListSplitCommand extends Command {\n /**\n * Creates an instance of the command.\n *\n * @param editor The editor instance.\n * @param direction Whether list item should be split before or after the selected block.\n */\n constructor(editor, direction) {\n super(editor);\n this._direction = direction;\n }\n /**\n * @inheritDoc\n */\n refresh() {\n this.isEnabled = this._checkEnabled();\n }\n /**\n * Splits the list item at the selection.\n *\n * @fires execute\n * @fires afterExecute\n */\n execute() {\n const editor = this.editor;\n editor.model.change(writer => {\n const changedBlocks = splitListItemBefore(this._getStartBlock(), writer);\n this._fireAfterExecute(changedBlocks);\n });\n }\n /**\n * Fires the `afterExecute` event.\n *\n * @param changedBlocks The changed list elements.\n */\n _fireAfterExecute(changedBlocks) {\n this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n }\n /**\n * Checks whether the command can be enabled in the current context.\n *\n * @returns Whether the command should be enabled.\n */\n _checkEnabled() {\n const selection = this.editor.model.document.selection;\n const block = this._getStartBlock();\n return selection.isCollapsed &&\n isListItemBlock(block) &&\n !isFirstBlockOfListItem(block);\n }\n /**\n * Returns the model element that is the main focus of the command (according to the current selection and command direction).\n */\n _getStartBlock() {\n const doc = this.editor.model.document;\n const positionParent = doc.selection.getFirstPosition().parent;\n return (this._direction == 'before' ? positionParent : positionParent.nextSibling);\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { expandListBlocksToCompleteItems, expandListBlocksToCompleteList, isFirstBlockOfListItem, isListItemBlock } from './utils/model.js';\n/**\n * A set of helpers related to document lists.\n */\nexport default class ListUtils extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'ListUtils';\n }\n /**\n * Expands the given list of selected blocks to include all the items of the lists they're in.\n *\n * @param blocks The list of selected blocks.\n */\n expandListBlocksToCompleteList(blocks) {\n return expandListBlocksToCompleteList(blocks);\n }\n /**\n * Check if the given block is the first in the list item.\n *\n * @param listBlock The list block element.\n */\n isFirstBlockOfListItem(listBlock) {\n return isFirstBlockOfListItem(listBlock);\n }\n /**\n * Returns true if the given model node is a list item block.\n *\n * @param node A model node.\n */\n isListItemBlock(node) {\n return isListItemBlock(node);\n }\n /**\n * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n *\n * @param blocks The list of selected blocks.\n * @param options.withNested Whether should include nested list items.\n */\n expandListBlocksToCompleteItems(blocks, options = {}) {\n return expandListBlocksToCompleteItems(blocks, options);\n }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * Checks if view element is a list type (ul or ol).\n *\n * @internal\n */\nexport function isListView(viewElement) {\n return viewElement.is('element', 'ol') || viewElement.is('element', 'ul');\n}\n/**\n * Checks if view element is a list item (li).\n *\n * @internal\n */\nexport function isListItemView(viewElement) {\n return viewElement.is('element', 'li');\n}\n/**\n * Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n *\n * Also, fixes non HTML compliant lists indents:\n *\n * ```\n * before: fixed list:\n * OL OL\n * |-> LI (parent LIs: 0) |-> LI (indent: 0)\n * |-> OL |-> OL\n * |-> OL |\n * | |-> OL |\n * | |-> OL |\n * | |-> LI (parent LIs: 1) |-> LI (indent: 1)\n * |-> LI (parent LIs: 1) |-> LI (indent: 1)\n *\n * before: fixed list:\n * OL OL\n * |-> OL |\n * |-> OL |\n * |-> OL |\n * |-> LI (parent LIs: 0) |-> LI (indent: 0)\n *\n * before: fixed list:\n * OL OL\n * |-> LI (parent LIs: 0) |-> LI (indent: 0)\n * |-> OL |-> OL\n * |-> LI (parent LIs: 0) |-> LI (indent: 1)\n * ```\n *\n * @internal\n */\nexport function getIndent(listItem) {\n let indent = 0;\n let parent = listItem.parent;\n while (parent) {\n // Each LI in the tree will result in an increased indent for HTML compliant lists.\n if (isListItemView(parent)) {\n indent++;\n }\n else {\n // If however the list is nested in other list we should check previous sibling of any of the list elements...\n const previousSibling = parent.previousSibling;\n // ...because the we might need increase its indent:\n //\t\tbefore: fixed list:\n //\t\tOL OL\n //\t\t|-> LI (parent LIs: 0) |-> LI (indent: 0)\n //\t\t|-> OL |-> OL\n //\t\t |-> LI (parent LIs: 0) |-> LI (indent: 1)\n if (previousSibling && isListItemView(previousSibling)) {\n indent++;\n }\n }\n parent = parent.parent;\n }\n return indent;\n}\n/**\n * Creates a list attribute element (ol or ul).\n *\n * @internal\n */\nexport function createListElement(writer, indent, type, id = getViewElementIdForListType(type, indent)) {\n // Negative priorities so that restricted editing attribute won't wrap lists.\n return writer.createAttributeElement(getViewElementNameForListType(type), null, {\n priority: 2 * indent / 100 - 100,\n id\n });\n}\n/**\n * Creates a list item attribute element (li).\n *\n * @internal\n */\nexport function createListItemElement(writer, indent, id) {\n // Negative priorities so that restricted editing attribute won't wrap list items.\n return writer.createAttributeElement('li', null, {\n priority: (2 * indent + 1) / 100 - 100,\n id\n });\n}\n/**\n * Returns a view element name for the given list type.\n *\n * @internal\n */\nexport function getViewElementNameForListType(type) {\n return type == 'numbered' ? 'ol' : 'ul';\n}\n/**\n * Returns a view element ID for the given list type and indent.\n *\n * @internal\n */\nexport function getViewElementIdForListType(type, indent) {\n return `list-${type}-${indent}`;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { iterateSiblingListBlocks } from './listwalker.js';\nimport { getListItemBlocks, isListItemBlock, ListItemUid } from './model.js';\n/**\n * Based on the provided positions looks for the list head and stores it in the provided map.\n *\n * @internal\n * @param position The search starting position.\n * @param itemToListHead The map from list item element to the list head element.\n */\nexport function findAndAddListHeadToMap(position, itemToListHead) {\n const previousNode = position.nodeBefore;\n if (!isListItemBlock(previousNode)) {\n const item = position.nodeAfter;\n if (isListItemBlock(item)) {\n itemToListHead.set(item, item);\n }\n }\n else {\n let listHead = previousNode;\n // Previously, the loop below was defined like this:\n //\n // \t\tfor ( { node: listHead } of iterateSiblingListBlocks( listHead, 'backward' ) )\n //\n // Unfortunately, such a destructuring is incorrectly transpiled by Babel and the loop never ends.\n // See: https://github.com/ckeditor/ckeditor5-react/issues/345.\n for (const { node } of iterateSiblingListBlocks(listHead, 'backward')) {\n listHead = node;\n if (itemToListHead.has(listHead)) {\n return;\n }\n }\n itemToListHead.set(previousNode, listHead);\n }\n}\n/**\n * Scans the list starting from the given list head element and fixes items' indentation.\n *\n * @internal\n * @param listNodes The iterable of list nodes.\n * @param writer The model writer.\n * @returns Whether the model was modified.\n */\nexport function fixListIndents(listNodes, writer) {\n let maxIndent = 0; // Guards local sublist max indents that need fixing.\n let prevIndent = -1; // Previous item indent.\n let fixBy = null;\n let applied = false;\n for (const { node } of listNodes) {\n const itemIndent = node.getAttribute('listIndent');\n if (itemIndent > maxIndent) {\n let newIndent;\n if (fixBy === null) {\n fixBy = itemIndent - maxIndent;\n newIndent = maxIndent;\n }\n else {\n if (fixBy > itemIndent) {\n fixBy = itemIndent;\n }\n newIndent = itemIndent - fixBy;\n }\n if (newIndent > prevIndent + 1) {\n newIndent = prevIndent + 1;\n }\n writer.setAttribute('listIndent', newIndent, node);\n applied = true;\n prevIndent = newIndent;\n }\n else {\n fixBy = null;\n maxIndent = itemIndent + 1;\n prevIndent = itemIndent;\n }\n }\n return applied;\n}\n/**\n * Scans the list starting from the given list head element and fixes items' types.\n *\n * @internal\n * @param listNodes The iterable of list nodes.\n * @param seenIds The set of already known IDs.\n * @param writer The model writer.\n * @returns Whether the model was modified.\n */\nexport function fixListItemIds(listNodes, seenIds, writer) {\n const visited = new Set();\n let applied = false;\n for (const { node } of listNodes) {\n if (visited.has(node)) {\n continue;\n }\n let listType = node.getAttribute('listType');\n let listItemId = node.getAttribute('listItemId');\n // Use a new ID if this one was spot earlier (even in other list).\n if (seenIds.has(listItemId)) {\n listItemId = ListItemUid.next();\n }\n seenIds.add(listItemId);\n // Make sure that all items in a simple list have unique IDs.\n if (node.is('element', 'listItem')) {\n if (node.getAttribute('listItemId') != listItemId) {\n writer.setAttribute('listItemId', listItemId, node);\n applied = true;\n }\n continue;\n }\n for (const block of getListItemBlocks(node, { direction: 'forward' })) {\n visited.add(block);\n // Use a new ID if a block of a bigger list item has different type.\n if (block.getAttribute('listType') != listType) {\n listItemId = ListItemUid.next();\n listType = block.getAttribute('listType');\n }\n if (block.getAttribute('listItemId') != listItemId) {\n writer.setAttribute('listItemId', listItemId, block);\n applied = true;\n }\n }\n }\n return applied;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module list/list/converters\n */\nimport { UpcastWriter } from 'ckeditor5/src/engine.js';\nimport { getAllListItemBlocks, getListItemBlocks, isListItemBlock, isFirstBlockOfListItem, ListItemUid } from './utils/model.js';\nimport { createListElement, createListItemElement, getIndent, isListView, isListItemView } from './utils/view.js';\nimport ListWalker, { iterateSiblingListBlocks } from './utils/listwalker.js';\nimport { findAndAddListHeadToMap } from './utils/postfixers.js';\n/**\n * Returns the upcast converter for list items. It's supposed to work after the block converters (content inside list items) are converted.\n *\n * @internal\n */\nexport function listItemUpcastConverter() {\n return (evt, data, conversionApi) => {\n const { writer, schema } = conversionApi;\n if (!data.modelRange) {\n return;\n }\n const items = Array.from(data.modelRange.getItems({ shallow: true }))\n .filter((item) => schema.checkAttribute(item, 'listItemId'));\n if (!items.length) {\n return;\n }\n const listItemId = ListItemUid.next();\n const listIndent = getIndent(data.viewItem);\n let listType = data.viewItem.parent && data.viewItem.parent.is('element', 'ol') ? 'numbered' : 'bulleted';\n // Preserve list type if was already set (for example by to-do list feature).\n const firstItemListType = items[0].getAttribute('listType');\n if (firstItemListType) {\n listType = firstItemListType;\n }\n const attributes = {\n listItemId,\n listIndent,\n listType\n };\n for (const item of items) {\n // Set list attributes only on same level items, those nested deeper are already handled by the recursive conversion.\n if (!item.hasAttribute('listItemId')) {\n writer.setAttributes(attributes, item);\n }\n }\n if (items.length > 1) {\n // Make sure that list item that contain only nested list will preserve paragraph for itself:\n //\t
    \n //\t\t
  • \n //\t\t\t

    <-- this one must be kept\n //\t\t\t
      \n //\t\t\t\t
    • \n //\t\t\t
    \n //\t\t
  • \n //\t
\n if (items[1].getAttribute('listItemId') != attributes.listItemId) {\n conversionApi.keepEmptyElement(items[0]);\n }\n }\n };\n}\n/**\n * Returns the upcast converter for the `