diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f097f7b2c01..7171423c12d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,14 @@ -### Suggested merge commit message ([convention](https://ckeditor.com/docs/ckeditor5/latest/framework/contributing/git-commit-message-convention.html)) +## Description + -Type: Message. Closes #000. ---- +## Screenshots + -### Additional information -_For example – encountered issues, assumptions you had to make, other affected tickets, etc._ +## Testing + + +- [ ] I have added or updated tests that prove my fix is effective or that my feature works + + \ No newline at end of file diff --git a/README.md b/README.md index fa4f8012a5a..de697a052bf 100644 --- a/README.md +++ b/README.md @@ -1,158 +1,60 @@ -CKEditor 5 [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20CKEditor%205%20on%20GitHub&url=https%3A%2F%2Fgithub.com%2Fckeditor%2Fckeditor5) -=================================== +## CKEditor for Authorium -[![npm version](https://badge.fury.io/js/ckeditor5.svg)](https://www.npmjs.com/package/ckeditor5) -[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master) -[![CircleCI](https://circleci.com/gh/ckeditor/ckeditor5.svg?style=shield)](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master) -![TypeScript Support](https://badgen.net/badge/Built%20With/TypeScript/blue) +### Local +1. Navigate to the CKEditor package folder where modifications were made -[![Join newsletter](https://img.shields.io/badge/join-newsletter-00cc99.svg)](http://eepurl.com/c3zRPr) -[![Follow Twitter](https://img.shields.io/badge/follow-twitter-00cc99.svg)](https://twitter.com/ckeditor) + ```bash + cd packages/ckeditor-build-multi-root + ``` -CKEditor 5 is an ultra-modern JavaScript rich-text editor with MVC architecture, a custom data model, and virtual DOM. It is written from scratch in TypeScript and has excellent webpack and Vite support. It provides every type of WYSIWYG editing solution imaginable with extensive collaboration support. From editors similar to Google Docs and Medium to Slack or Twitter-like applications, all is possible within a single editing framework. As a market leader, it is constantly expanded and updated. +2. Generates the build folder containing the customized editor -![A composition of screenshots presenting various features of CKEditor 5 rich text editor](https://user-images.githubusercontent.com/1099479/179190754-f4aaf2b3-21cc-49c4-a454-8de4a00cc70e.jpg) + ```bash + yarn build + ``` + +3. Create symlinks to local project, only the first time -## Table of contents + ```bash + yarn link + ``` -- [CKEditor 5 ](#ckeditor5-) - - [Table of contents](#table-of-contents) - - [Quick start](#quick-start) - - [CKEditor 5 online builder](#ckeditor5-online-builder) - - [CKEditor 5 predefined builds](#ckeditor5-predefined-builds) - - [Example installation](#example-installation) - - [TypeScript support](#typescript-support) - - [CKEditor 5 advanced installation](#ckeditor5-advanced-installation) - - [CKEditor 5 Framework](#ckeditor5-framework) - - [Documentation and FAQ](#documentation-and-faq) - - [Releases](#releases) - - [Editing and collaboration features](#editing-and-collaboration-features) - - [Contributing and project organization](#contributing-and-project-organization) - - [Ideas and discussions](#ideas-and-discussions) - - [Development](#development) - - [Reporting issues and feature requests](#reporting-issues-and-feature-requests) - - [License](#license) +### Authorium repository +1. Link CKEditor custom editor to Authorium, only the first time -## Quick start + ```bash + yarn link "@ckeditor/ckeditor5-build-multi-root" + ``` -### CKEditor 5 online builder +2. Update the repository already linked -The easiest way to start using CKEditor 5 with all the features you need is to prepare a customized build with the [online builder](https://ckeditor.com/ckeditor-5/online-builder/). All you need to do is choose the preferred predefined build as a base, add all the required plugins, and download the ready-to-use package. Refer to the [Online builder Quick start](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/quick-start.html#creating-custom-builds-with-online-builder) guide to follow this installation path. + ```bash + yarn install --force + ``` -### CKEditor 5 predefined builds +3. Setup the authorium application `bin/setup` -CKEditor 5 predefined builds are a set of ready-to-use rich text editors. Every build provides a single type of editor with a set of features and a default configuration. + ```bash + bin/setup + ``` + +4. Run the application `bin/dev` -The following CKEditor 5 predefined builds are currently available: + ```bash + bin/dev + ``` -* [Classic editor](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/predefined-builds.html#classic-editor) -* [Inline editor](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/predefined-builds.html#inline-editor) -* [Balloon editor](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/predefined-builds.html#balloon-editor) -* [Balloon block editor](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/predefined-builds.html#balloon-block-editor) -* [Document editor](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/predefined-builds.html#document-editor) +## Publish package +`TODO: Publish package on release` -#### Example installation +1. Navigate to the CKEditor package folder where modifications were made, log in to NPM, and adjust package.json to reflect your npm username -Creating an editor using a CKEditor 5 build is simple and can be described in two steps: + ```bash + npm login + ``` -1. Load the desired editor via the ` -``` - -Call the [`ClassicEditor.create()`](https://ckeditor.com/docs/ckeditor5/latest/api/module_editor-classic_classiceditor-ClassicEditor.html#static-function-create) method: - -```html - -``` - -You’re ready to go! - -To find out how to start with other builds, check the [Predefined builds](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/predefined-builds.html) guide in the CKEditor 5 documentation. - -### TypeScript support - -CKEditor 5 is a TypeScript project. Starting from v37.0.0, it offers native type definitions. Check out our dedicated guide to read more about [TypeScript support](https://ckeditor.com/docs/ckeditor5/latest/installation/working-with-typescript.html). - -### CKEditor 5 advanced installation - -For more advanced users or those who need to integrate CKEditor 5 with their applications, we have prepared several other, advanced methods to do it. You can: -* Integrate the editor from source [using webpack](https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/alternative-setups/integrating-from-source-webpack.html) or [Vite](https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/alternative-setups/integrating-from-source-vite.html) -* Use [DLL builds](https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/alternative-setups/dll-builds.html) -* Use some of the pre-made integrations with popular [JavaScript frameworks](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/overview.html): - * [Angular](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/angular.html) - * [React](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/react.html) - * [Vue](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/vuejs-v3.html) - -#### CKEditor 5 Framework - -CKEditor 5 builds allow you to quickly and easily initialize one of the many types of editors in your application. At the same time, CKEditor 5 is also a framework for creating custom-made rich text editing solutions. - -To find out how to start building your editor from scratch go to the [CKEditor 5 Framework overview](https://ckeditor.com/docs/ckeditor5/latest/framework/index.html) section of the CKEditor 5 documentation. - -## Documentation and FAQ - -Extensive documentation dedicated to all things CKEditor 5-related is available. You will find basic guides that will help you kick off your project, advanced deep-dive tutorials to tailor the editor to your specific needs, and help sections with solutions and answers to any of your possible questions. To find out more refer to the following [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/index.html) sections: - -* [Installing CKEditor 5](https://ckeditor.com/docs/ckeditor5/latest/installation/index.html) -* [CKEditor 5 features](https://ckeditor.com/docs/ckeditor5/latest/features/index.html) -* [CKEditor 5 examples](https://ckeditor.com/docs/ckeditor5/latest/examples/index.html) -* [Updating CKEditor 5](https://ckeditor.com/docs/ckeditor5/latest/updating/index.html) -* [Getting CKEditor 5 support](https://ckeditor.com/docs/ckeditor5/latest/support/index.html) -* [CKEditor 5 Framework](https://ckeditor.com/docs/ckeditor5/latest/framework/index.html) -* [API documentation](https://ckeditor.com/docs/ckeditor5/latest/api/index.html) - -For FAQ please go to the [CKEditor Ecosystem help center](https://support.ckeditor.com/hc/en-us). -For a high-level overview of the project see the [CKEditor Ecosystem website](https://ckeditor.com). - -## Releases - -Follow the [CKEditor 5 changelog](https://github.com/ckeditor/ckeditor5/blob/stable/CHANGELOG.md) for release details and check out the CKEditor 5 release blog posts on the [CKSource blog](https://ckeditor.com/blog/?category=releases&tags=CKEditor-5) for important release highlights and additional information. - -## Editing and collaboration features - -The CKEditor 5 Framework offers access to a plethora of various plugins, supporting [all kinds of editing features](https://ckeditor.com/docs/ckeditor5/latest/features/index.html). - -From collaborative editing support providing comments and tracking changes, through editing tools that let users control the content looks and structure such as tables, lists, and font styles, to accessibility helpers and multi-language support - CKEditor 5 is easily extensible and customizable. Special duty features like Markdown input and output and source editing, or export to PDF and Word provide solutions for users with diverse and specialized needs. Images and videos are easily supported and CKEditor 5 offers various upload and storage systems to manage these. - -The number of options and the ease of customization and adding new ones make the editing experience even better for any environment and professional background. - -Refer to the [CKEditor 5 Features](https://ckeditor.com/docs/ckeditor5/latest/features/index.html) documentation for details. - -## Contributing and project organization - -### Ideas and discussions - -The development repository of CKEditor 5 is located at [https://github.com/ckeditor/ckeditor5](https://github.com/ckeditor/ckeditor5). This is the best place for bringing opinions and contributions. Letting the core team know if they are going in the right or wrong direction is great feedback and will be much appreciated! - -### Development - -CKEditor 5 is a modular, multi-package, [monorepo](https://en.wikipedia.org/wiki/Monorepo) project. It consists of several packages that create the editing framework, based on which the feature packages are implemented. - -The [`ckeditor5`](https://github.com/ckeditor/ckeditor5) repository is the place that centralizes the development of CKEditor 5. It bundles different packages into a single place, adding the necessary helper tools for the development workflow, like the builder and the test runner. [Basic information on how to set up the development environment](https://ckeditor.com/docs/ckeditor5/latest/framework/contributing/development-environment.html) can be found in the documentation. - -See the [official contributors' guide](https://ckeditor.com/docs/ckeditor5/latest/framework/contributing/contributing.html) to learn how to contribute your code to the project. - -### Reporting issues and feature requests - -Report issues in [the `ckeditor5` repository](https://github.com/ckeditor/ckeditor5/issues). Read more in the [Getting support](https://ckeditor.com/docs/ckeditor5/latest/support/reporting-issues.html) section of the CKEditor 5 documentation. - -## License - -Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license). + ```bash + npm publish --access=public + ``` diff --git a/packages/ckeditor5-build-multi-root/build/ckeditor.d.ts b/packages/ckeditor5-build-multi-root/build/ckeditor.d.ts index e1f301c2849..6760b78cc03 100644 --- a/packages/ckeditor5-build-multi-root/build/ckeditor.d.ts +++ b/packages/ckeditor5-build-multi-root/build/ckeditor.d.ts @@ -3,37 +3,16 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ import { MultiRootEditor as MultiRootEditorBase } from '@ckeditor/ckeditor5-editor-multi-root'; -import { Essentials } from '@ckeditor/ckeditor5-essentials'; -import { CKFinderUploadAdapter } from '@ckeditor/ckeditor5-adapter-ckfinder'; -import { Autoformat } from '@ckeditor/ckeditor5-autoformat'; -import { Bold, Italic } from '@ckeditor/ckeditor5-basic-styles'; -import { BlockQuote } from '@ckeditor/ckeditor5-block-quote'; -import { CKBox } from '@ckeditor/ckeditor5-ckbox'; -import { CKFinder } from '@ckeditor/ckeditor5-ckfinder'; -import { EasyImage } from '@ckeditor/ckeditor5-easy-image'; -import { Heading } from '@ckeditor/ckeditor5-heading'; -import { Image, ImageCaption, ImageStyle, ImageToolbar, ImageUpload, PictureEditing } from '@ckeditor/ckeditor5-image'; -import { Indent } from '@ckeditor/ckeditor5-indent'; -import { Link } from '@ckeditor/ckeditor5-link'; -import { List } from '@ckeditor/ckeditor5-list'; -import { MediaEmbed } from '@ckeditor/ckeditor5-media-embed'; -import { Paragraph } from '@ckeditor/ckeditor5-paragraph'; -import { PasteFromOffice } from '@ckeditor/ckeditor5-paste-from-office'; -import { Table, TableToolbar } from '@ckeditor/ckeditor5-table'; -import { TextTransformation } from '@ckeditor/ckeditor5-typing'; -import { CloudServices } from '@ckeditor/ckeditor5-cloud-services'; -export default class MultiRootEditor extends MultiRootEditorBase { - static builtinPlugins: (typeof TextTransformation | typeof Essentials | typeof CKFinderUploadAdapter | typeof Paragraph | typeof Heading | typeof Autoformat | typeof Bold | typeof Italic | typeof BlockQuote | typeof Image | typeof ImageCaption | typeof ImageStyle | typeof ImageToolbar | typeof ImageUpload | typeof CloudServices | typeof CKBox | typeof CKFinder | typeof EasyImage | typeof List | typeof Indent | typeof Link | typeof MediaEmbed | typeof PasteFromOffice | typeof Table | typeof TableToolbar | typeof PictureEditing)[]; - static defaultConfig: { - toolbar: { - items: string[]; - }; - image: { - toolbar: string[]; - }; - table: { - contentToolbar: string[]; - }; - language: string; +import type { EditorConfig } from '@ckeditor/ckeditor5-core'; +import { LanguageConfig } from './helpers'; +interface MultirootEditorConfig extends EditorConfig { + codeBlock: { + languages: LanguageConfig[]; }; } +declare class Editor extends MultiRootEditorBase { + static builtinPlugins: any[]; + private static toolbarItems; + static defaultConfig: MultirootEditorConfig; +} +export default Editor; diff --git a/packages/ckeditor5-build-multi-root/build/ckeditor.js b/packages/ckeditor5-build-multi-root/build/ckeditor.js index 2e94968145d..7d2f029e2d8 100644 --- a/packages/ckeditor5-build-multi-root/build/ckeditor.js +++ b/packages/ckeditor5-build-multi-root/build/ckeditor.js @@ -1,7 +1,7 @@ -!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"(may require Fn)":"(may require Fn)","%0 of %1":"%0 of %1",Accept:"Accept",Accessibility:"Accessibility","Accessibility help":"Accessibility help","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Below, you can find a list of keyboard shortcuts that can be used in the editor.",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Bold text":"Bold text",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot access default workspace.":"Cannot access default workspace.","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close","Close contextual balloons, dropdowns, and dialogs":"Close contextual balloons, dropdowns, and dialogs",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column","Content editing keystrokes":"Content editing keystrokes","Copy selected content":"Copy selected content","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.","Create link":"Create link",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent","Decrease list item indent":"Decrease list item indent","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit image":"Edit image","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor menu bar":"Editor menu bar","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.","Failed to determine category of edited image.":"Failed to determine category of edited image.","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Help Contents. To close this dialog press ESC.":"Help Contents. To close this dialog press ESC.",HEX:"HEX","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Image from computer":"Image from computer","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Increase list item indent":"Increase list item indent",Insert:"Insert","Insert a hard break (a new paragraph)":"Insert a hard break (a new paragraph)","Insert a new paragraph directly after a widget":"Insert a new paragraph directly after a widget","Insert a new paragraph directly before a widget":"Insert a new paragraph directly before a widget","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert a soft break (a <br> element)":"Insert a soft break (a <br> element)","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert image with file manager":"Insert image with file manager","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Insert with file manager":"Insert with file manager","Inserting image failed":"Inserting image failed",Inset:"Inset","Invalid start index value.":"Invalid start index value.",Italic:"Italic","Italic text":"Italic text","Justify cell text":"Justify cell text","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Media toolbar":"Media toolbar","Media URL":"Media URL","media widget":"media widget",MENU_BAR_MENU_EDIT:"Edit",MENU_BAR_MENU_FILE:"File",MENU_BAR_MENU_FONT:"Font",MENU_BAR_MENU_FORMAT:"Format",MENU_BAR_MENU_HELP:"Help",MENU_BAR_MENU_INSERT:"Insert",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_TOOLS:"Tools",MENU_BAR_MENU_VIEW:"View","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Move focus between form fields (inputs, buttons, etc.)":"Move focus between form fields (inputs, buttons, etc.)","Move focus in and out of an active dialog window":"Move focus in and out of an active dialog window","Move focus to the menu bar, navigate between menu bars":"Move focus to the menu bar, navigate between menu bars","Move focus to the toolbar, navigate between toolbars":"Move focus to the toolbar, navigate between toolbars","Move out of a link":"Move out of a link","Move out of an inline code style":"Move out of an inline code style","Move the caret to allow typing directly after a widget":"Move the caret to allow typing directly after a widget","Move the caret to allow typing directly before a widget":"Move the caret to allow typing directly before a widget","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table","Navigate through the toolbar or menu bar":"Navigate through the toolbar or menu bar",Next:"Next","No results found":"No results found","No searchable items":"No searchable items",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open file manager":"Open file manager","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab","Open the accessibility help dialog":"Open the accessibility help dialog",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste content":"Paste content","Paste content as plain text":"Paste content as plain text","Paste the media URL in the input.":"Paste the media URL in the input.","Press %0 for help.":"Press %0 for help.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous","Processing the edited image.":"Processing the edited image.",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Replace image with file manager":"Replace image with file manager","Replace with file manager":"Replace with file manager","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Revert autoformatting action":"Revert autoformatting action","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Server failed to process the image.":"Server failed to process the image.","Show more items":"Show more items","Side image":"Side image",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Style:"Style",Subscript:"Subscript",Superscript:"Superscript",Table:"Table","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',"The URL must not be empty.":"The URL must not be empty.",'The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"These keyboard shortcuts allow for quick access to content editing features.":"These keyboard shortcuts allow for quick access to content editing features.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline","Underline text":"Underline text",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.","User interface and content navigation keystrokes":"User interface and content navigation keystrokes","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})), +!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"(may require Fn)":"(may require Fn)","*Change %0 content*":"*Change %0 content*","*Change to:* %0":"*Change to:* %0","*Check item*":"*Check item*","*Format:* %0":"*Format:* %0","*Format:* change table cell properties":"*Format:* change table cell properties","*Format:* change table properties":"*Format:* change table properties","*Format:* insert into %0":"*Format:* insert into %0","*Format:* remove from %0":"*Format:* remove from %0","*Format:* resize table":"*Format:* resize table","*Format:* set order to regular":"*Format:* set order to regular","*Format:* set order to reversed":"*Format:* set order to reversed","*Format:* set start index to %0":"*Format:* set start index to %0","*Indent:* %0":"*Indent:* %0","*Insert:* %0":"*Insert:* %0","*Merge cells*":"*Merge cells*","*Merge:* %0":"*Merge:* %0","*Outdent:* %0":"*Outdent:* %0","*Remove all formatting*":"*Remove all formatting*","*Remove format:* %0":"*Remove format:* %0","*Remove highlight*":"*Remove highlight*","*Remove image text alternative*":"*Remove image text alternative*","*Remove link*":"*Remove link*","*Remove:* %0":"*Remove:* %0","*Replace image URL*":"*Replace image URL*","*Replace table cells*":"*Replace table cells*","*Reset font background color*":"*Reset font background color*","*Reset font color*":"*Reset font color*","*Reset font family*":"*Reset font family*","*Reset font size*":"*Reset font size*","*Reset image width*":"*Reset image width*","*Set font background color:* %0":"*Set font background color:* %0","*Set font color:* %0":"*Set font color:* %0","*Set font family:* %0":"*Set font family:* %0","*Set font size:* %0":"*Set font size:* %0","*Set format to:* %0":"*Set format to:* %0","*Set format:* %0":"*Set format:* %0","*Set highlight:* %0":"*Set highlight:* %0","*Set image text alternative:* %0":"*Set image text alternative:* %0","*Set image width:* %0":"*Set image width:* %0","*Set link:* %0":"*Set link:* %0","*Split cell:* horizontally":"*Split cell:* horizontally","*Split cell:* vertically":"*Split cell:* vertically","*Split:* %0":"*Split:* %0","*Uncheck item*":"*Uncheck item*","%0 of %1":"%0 of %1",Accept:"Accept","Accept all selected suggestions":"Accept all selected suggestions","Accept all suggestions":"Accept all suggestions","Accept suggestion":"Accept suggestion",Accessibility:"Accessibility","Accessibility help":"Accessibility help","Advanced options":"Advanced options","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Anonymous:"Anonymous",Aquamarine:"Aquamarine","Are you sure?":"Are you sure?",Background:"Background","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Below, you can find a list of keyboard shortcuts that can be used in the editor.",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue","Blue marker":"Blue marker",Bold:"Bold","Bold text":"Bold text",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close","Close contextual balloons, dropdowns, and dialogs":"Close contextual balloons, dropdowns, and dialogs",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Comment:"Comment","Comment editor":"Comment editor","Comment was made on an element":"Comment was made on an element",COMMENTS_ARCHIVE:"Comments archive",CONNECTED_USERS:["1 connected user (me)","%0 connected users"],"Content editing keystrokes":"Content editing keystrokes","Copy selected content":"Copy selected content","Create link":"Create link",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent","Decrease list item indent":"Decrease list item indent",Default:"Default","Delete column":"Delete column","Delete comment thread?":"Delete comment thread?","Delete comment?":"Delete comment?","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Discard all selected suggestions":"Discard all selected suggestions","Discard all suggestions":"Discard all suggestions","Discard suggestion":"Discard suggestion","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar",Edit:"Edit","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor menu bar":"Editor menu bar","Editor toolbar":"Editor toolbar",ELEMENT_BLOCK_QUOTE:"block quote",ELEMENT_BULLETED_LIST:"bulleted list",ELEMENT_BULLETED_LIST_CIRCLE:"bulleted list (circle)",ELEMENT_BULLETED_LIST_DEFAULT:"bulleted list (default)",ELEMENT_BULLETED_LIST_DISC:"bulleted list (disc)",ELEMENT_BULLETED_LIST_SQUARE:"bulleted list (square)",ELEMENT_CAPTION:"caption",ELEMENT_CODE_BLOCK:["code block","%0 code blocks"],ELEMENT_HEADING:["heading (level %1)","%0 headings (level %1)"],ELEMENT_HEADING_CUSTOM:["heading (%1)","%0 headings (%1)"],ELEMENT_HORIZONTAL_LINE:["horizontal line","%0 horizontal lines"],ELEMENT_HTML_EMBED:["HTML embed","%0 HTML embeds"],ELEMENT_IMAGE:["image","%0 images"],ELEMENT_INLINE_IMAGE:["image","%0 images"],ELEMENT_LINE_BREAK:["line break","%0 line breaks"],ELEMENT_LIST_ITEM:["list item","%0 list items"],ELEMENT_MEDIA:["media item","%0 media items"],ELEMENT_MULTI_LEVEL_LIST:"multi-level list",ELEMENT_NUMBERED_LIST:"numbered list",ELEMENT_NUMBERED_LIST_DECIMAL:"numbered list (decimal)",ELEMENT_NUMBERED_LIST_DECIMAL_LEADING_ZERO:"numbered list (decimal with leading zero)",ELEMENT_NUMBERED_LIST_DEFAULT:"numbered list (default)",ELEMENT_NUMBERED_LIST_LOWER_LATIN:"numbered list (lower-latin)",ELEMENT_NUMBERED_LIST_LOWER_ROMAN:"numbered list (lower-roman)",ELEMENT_NUMBERED_LIST_UPPER_LATIN:"numbered list (upper-latin)",ELEMENT_NUMBERED_LIST_UPPER_ROMAN:"numbered list (upper-roman)",ELEMENT_PAGE_BREAK:["page break","%0 page breaks"],ELEMENT_PARAGRAPH:["paragraph","%0 paragraphs"],ELEMENT_SPACE:["space","%0 spaces"],ELEMENT_TABLE:["table","%0 tables"],ELEMENT_TABLE_COLUMN:["table column","%0 table columns"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["table column *with text* %1","%0 table columns *with text* %1"],ELEMENT_TABLE_OF_CONTENTS:["table of contents","%0 tables of contents"],ELEMENT_TABLE_ROW:["table row","%0 table rows"],ELEMENT_TABLE_ROW_WITH_TEXT:["table row *with text* %1","%0 table rows *with text* %1"],ELEMENT_TABLE_WITH_TEXT:"table *with text* %0",ELEMENT_TITLE:"title",ELEMENT_TODO_LIST:"to-do list",EMPTY_COMMENTS_ARCHIVE:"There are no archived comment threads.","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption",ENTER_COMMENT_ANNOUNCEMENT:"Entering a comment.",ENTER_DELETION_SUGGESTION_ANNOUNCEMENT:"Entering deletion suggestion.",ENTER_FORMATTING_SUGGESTION_ANNOUNCEMENT:"Entering formatting suggestion.",ENTER_INSERTION_SUGGESTION_ANNOUNCEMENT:"Entering insertion suggestion.","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.",EXTERNAL_AVATAR:"Displayed author name comes from external source (added by %0)",EXTERNAL_COMMENT:"This comment comes from an external source.",EXTERNAL_IMPORT_WORD_AVATAR:"Displayed author name comes from a Word document imported by %0",EXTERNAL_IMPORT_WORD_COMMENT:"This comment comes from an imported Word file.",EXTERNAL_IMPORT_WORD_SUGGESTION:"This suggestion comes from an imported Word file.",EXTERNAL_SUGGESTION:"This suggestion comes from an external source.",Find:"Find","Find and replace":"Find and replace","Find in text…":"Find in text…","Find in the document":"Find in the document","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size",FORMAT_ALIGN_TO_CENTER:"align to center",FORMAT_ALIGN_TO_LEFT:"align to left",FORMAT_ALIGN_TO_RIGHT:"align to right",FORMAT_ALIGNMENT:"alignment",FORMAT_BOLD:"bold",FORMAT_CODE:"code",FORMAT_FONT_BACKGROUND:"font background color",FORMAT_FONT_COLOR:"font color",FORMAT_FONT_FAMILY:"font family",FORMAT_FONT_SIZE:"font size",FORMAT_HEADER_COLUMN:"header column",FORMAT_HEADER_ROW:"header row",FORMAT_HIGHLIGHT:"highlight",FORMAT_IMAGE_SIZE:"image size",FORMAT_INDENT:"indent",FORMAT_ITALIC:"italic",FORMAT_JUSTIFY_TEXT:"justify",FORMAT_LIST_REVERSED:"list reversed",FORMAT_LIST_START:"list start",FORMAT_REGULAR_COLUMN:"regular column",FORMAT_REGULAR_ROW:"regular row",FORMAT_RESTRICTED_DISABLED:"*Disable in restricted editing mode*",FORMAT_RESTRICTED_ENABLED:"*Enable in restricted editing mode*",FORMAT_SIDE_IMAGE:"side image",FORMAT_STRIKETHROUGH:"strikethrough",FORMAT_STYLE:"style",FORMAT_SUBSCRIPT:"subscript",FORMAT_SUPERSCRIPT:"superscript",FORMAT_UNDERLINE:"underline","Full size image":"Full size image",Green:"Green","Green marker":"Green marker","Green pen":"Green pen",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Help Contents. To close this dialog press ESC.":"Help Contents. To close this dialog press ESC.",HEX:"HEX",Highlight:"Highlight","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar",Huge:"Huge","Image from computer":"Image from computer","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Increase list item indent":"Increase list item indent",Insert:"Insert","Insert a hard break (a new paragraph)":"Insert a hard break (a new paragraph)","Insert a new paragraph directly after a widget":"Insert a new paragraph directly after a widget","Insert a new paragraph directly before a widget":"Insert a new paragraph directly before a widget","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert a soft break (a <br> element)":"Insert a soft break (a <br> element)","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset","Invalid start index value.":"Invalid start index value.",Italic:"Italic","Italic text":"Italic text",Justify:"Justify","Justify cell text":"Justify cell text","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)",LEAVE_COMMENT_ANNOUNCEMENT:"Leaving a comment.",LEAVE_DELETION_SUGGESTION_ANNOUNCEMENT:"Leaving deletion suggestion.",LEAVE_FORMATTING_SUGGESTION_ANNOUNCEMENT:"Leaving formatting suggestion.",LEAVE_INSERTION_SUGGESTION_ANNOUNCEMENT:"Leaving insertion suggestion.","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Marked as resolved":"Marked as resolved","Match case":"Match case","Media toolbar":"Media toolbar","Media URL":"Media URL","media widget":"media widget",MENU_BAR_MENU_EDIT:"Edit",MENU_BAR_MENU_FILE:"File",MENU_BAR_MENU_FONT:"Font",MENU_BAR_MENU_FORMAT:"Format",MENU_BAR_MENU_HELP:"Help",MENU_BAR_MENU_INSERT:"Insert",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_TOOLS:"Tools",MENU_BAR_MENU_VIEW:"View","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Move focus between form fields (inputs, buttons, etc.)":"Move focus between form fields (inputs, buttons, etc.)","Move focus in and out of an active dialog window":"Move focus in and out of an active dialog window","Move focus to the menu bar, navigate between menu bars":"Move focus to the menu bar, navigate between menu bars","Move focus to the toolbar, navigate between toolbars":"Move focus to the toolbar, navigate between toolbars","Move out of a link":"Move out of a link","Move out of an inline code style":"Move out of an inline code style","Move the caret to allow typing directly after a widget":"Move the caret to allow typing directly after a widget","Move the caret to allow typing directly before a widget":"Move the caret to allow typing directly before a widget","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table","Navigate through the toolbar or menu bar":"Navigate through the toolbar or menu bar",Next:"Next","Next result":"Next result",No:"No","No results found":"No results found","No searchable items":"No searchable items",None:"None",NUMBER_OF_COMMENTS:["%0 Comment","%0 Comments"],"Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab","Open the accessibility help dialog":"Open the accessibility help dialog",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding","Page break":"Page break",Paragraph:"Paragraph","Paste content":"Paste content","Paste content as plain text":"Paste content as plain text","Paste the media URL in the input.":"Paste the media URL in the input.",PENDING_ACTION_COMMENT_THREAD:"Unsaved change in comment thread.",PENDING_ACTION_SENDING_DATA:"Sending data to the server.",PENDING_ACTION_SUGGESTION:"Unsaved change in suggestion.","Pink marker":"Pink marker","Press %0 for help.":"Press %0 for help.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous","Previous result":"Previous result",Purple:"Purple",Red:"Red","Red pen":"Red pen",Redo:"Redo",Remove:"Remove","Remove color":"Remove color","Remove Format":"Remove Format","Remove highlight":"Remove highlight",Reopen:"Reopen",Replace:"Replace","Replace all":"Replace all","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Replace with…":"Replace with…",REPLACE_TEXT:"*Replace:* %0 *with* %1",Reply:"Reply","Reply to reopen discussion...":"Reply to reopen discussion...","Reply...":"Reply...","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size",Resolve:"Resolve","Restore default":"Restore default","Reversed order":"Reversed order","Revert autoformatting action":"Revert autoformatting action","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Synchronization issue":"Synchronization issue",Table:"Table","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative","Text highlight toolbar":"Text highlight toolbar","Text to find must not be empty.":"Text to find must not be empty.",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.":"The document cannot be connected back to the server. To not lose your content save it locally and refresh the editor.","The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.":"The document details could not be taken during the reconnection. To not lose your content save it locally and refresh the editor.","The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.":"The last saved version of the document does not match the local version. To not lose your content save it locally and refresh the editor.","The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.":"The local document and server document differ and merging them can cause unexpected behavior. To not lose your content save it locally and refresh the editor.","The URL must not be empty.":"The URL must not be empty.",'The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"These keyboard shortcuts allow for quick access to content editing features.":"These keyboard shortcuts allow for quick access to content editing features.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.",Tiny:"Tiny","Tip: Find some text first in order to replace it.":"Tip: Find some text first in order to replace it.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",TOO_LONG_COMMENT_ALERT:"Comment content is too long. Your comment has %0 characters but the limit is %1 characters.","Track changes":"Track changes",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline","Underline text":"Underline text",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.","User interface and content navigation keystrokes":"User interface and content navigation keystrokes","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Whole words only":"Whole words only","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text","Write a comment...":"Write a comment...",Yellow:"Yellow","Yellow marker":"Yellow marker",Yes:"Yes"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})), /*! * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. */ -function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.MultiRootEditor=e():t.MultiRootEditor=e()}(self,(()=>(()=>{var t={9246:(t,e,n)=>{const o=n(6931),i={};for(const t of Object.keys(o))i[o[t]]=t;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};t.exports=r;for(const t of Object.keys(r)){if(!("channels"in r[t]))throw new Error("missing channels property: "+t);if(!("labels"in r[t]))throw new Error("missing channel labels property: "+t);if(r[t].labels.length!==r[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=r[t];delete r[t].channels,delete r[t].labels,Object.defineProperty(r[t],"channels",{value:e}),Object.defineProperty(r[t],"labels",{value:n})}r.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),s=r-i;let a,c;r===i?a=0:e===r?a=(n-o)/s:n===r?a=2+(o-e)/s:o===r&&(a=4+(e-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const l=(i+r)/2;return c=r===i?0:l<=.5?s/(r+i):s/(2-r-i),[a,100*c,100*l]},r.rgb.hsv=function(t){let e,n,o,i,r;const s=t[0]/255,a=t[1]/255,c=t[2]/255,l=Math.max(s,a,c),d=l-Math.min(s,a,c),u=function(t){return(l-t)/6/d+.5};return 0===d?(i=0,r=0):(r=d/l,e=u(s),n=u(a),o=u(c),s===l?i=o-n:a===l?i=1/3+e-o:c===l&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*r,100*l]},r.rgb.hwb=function(t){const e=t[0],n=t[1];let o=t[2];const i=r.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,o));return o=1-1/255*Math.max(e,Math.max(n,o)),[i,100*s,100*o]},r.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(1-e,1-n,1-o);return[100*((1-e-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-o-i)/(1-i)||0),100*i]},r.rgb.keyword=function(t){const e=i[t];if(e)return e;let n,r=1/0;for(const e of Object.keys(o)){const i=o[e],c=(a=i,((s=t)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);c.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;return[100*(.4124*e+.3576*n+.1805*o),100*(.2126*e+.7152*n+.0722*o),100*(.0193*e+.1192*n+.9505*o)]},r.rgb.lab=function(t){const e=r.rgb.xyz(t);let n=e[0],o=e[1],i=e[2];n/=95.047,o/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(n-o),200*(o-i)]},r.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const a=2*o-i,c=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,s=6*r<1?a+6*(i-a)*r:2*r<1?i:3*r<2?a+(i-a)*(2/3-r)*6:a,c[t]=255*s;return c},r.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,o=t[2]/100,i=n;const r=Math.max(o,.01);o*=2,n*=o<=1?o:2-o,i*=r<=1?r:2-r;return[e,100*(0===o?2*i/(r+i):2*n/(o+n)),100*((o+n)/2)]},r.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let o=t[2]/100;const i=Math.floor(e)%6,r=e-Math.floor(e),s=255*o*(1-n),a=255*o*(1-n*r),c=255*o*(1-n*(1-r));switch(o*=255,i){case 0:return[o,c,s];case 1:return[a,o,s];case 2:return[s,o,c];case 3:return[s,a,o];case 4:return[c,s,o];case 5:return[o,s,a]}},r.hsv.hsl=function(t){const e=t[0],n=t[1]/100,o=t[2]/100,i=Math.max(o,.01);let r,s;s=(2-n)*o;const a=(2-n)*i;return r=n*i,r/=a<=1?a:2-a,r=r||0,s/=2,[e,100*r,100*s]},r.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,o=t[2]/100;const i=n+o;let r;i>1&&(n/=i,o/=i);const s=Math.floor(6*e),a=1-o;r=6*e-s,1&s&&(r=1-r);const c=n+r*(a-n);let l,d,u;switch(s){default:case 6:case 0:l=a,d=c,u=n;break;case 1:l=c,d=a,u=n;break;case 2:l=n,d=a,u=c;break;case 3:l=n,d=c,u=a;break;case 4:l=c,d=n,u=a;break;case 5:l=a,d=n,u=c}return[255*l,255*d,255*u]},r.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,o=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,o*(1-i)+i))]},r.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,o=t[2]/100;let i,r,s;return i=3.2406*e+-1.5372*n+-.4986*o,r=-.9689*e+1.8758*n+.0415*o,s=.0557*e+-.204*n+1.057*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=Math.min(Math.max(0,i),1),r=Math.min(Math.max(0,r),1),s=Math.min(Math.max(0,s),1),[255*i,255*r,255*s]},r.xyz.lab=function(t){let e=t[0],n=t[1],o=t[2];e/=95.047,n/=100,o/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(e-n),200*(n-o)]},r.lab.xyz=function(t){let e,n,o;n=(t[0]+16)/116,e=t[1]/500+n,o=n-t[2]/200;const i=n**3,r=e**3,s=o**3;return n=i>.008856?i:(n-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,e*=95.047,n*=100,o*=108.883,[e,n,o]},r.lab.lch=function(t){const e=t[0],n=t[1],o=t[2];let i;i=360*Math.atan2(o,n)/2/Math.PI,i<0&&(i+=360);return[e,Math.sqrt(n*n+o*o),i]},r.lch.lab=function(t){const e=t[0],n=t[1],o=t[2]/360*2*Math.PI;return[e,n*Math.cos(o),n*Math.sin(o)]},r.rgb.ansi16=function(t,e=null){const[n,o,i]=t;let s=null===e?r.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(n/255));return 2===s&&(a+=60),a},r.hsv.ansi16=function(t){return r.rgb.ansi16(r.hsv.rgb(t),t[2])},r.rgb.ansi256=function(t){const e=t[0],n=t[1],o=t[2];if(e===n&&n===o)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;return 16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(o/255*5)},r.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},r.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;t-=16;return[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},r.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},r.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];3===e[0].length&&(n=n.split("").map((t=>t+t)).join(""));const o=parseInt(n,16);return[o>>16&255,o>>8&255,255&o]},r.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.max(Math.max(e,n),o),r=Math.min(Math.min(e,n),o),s=i-r;let a,c;return a=s<1?r/(1-s):0,c=s<=0?0:i===e?(n-o)/s%6:i===n?2+(o-e)/s:4+(e-n)/s,c/=6,c%=1,[360*c,100*s,100*a]},r.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,o=n<.5?2*e*n:2*e*(1-n);let i=0;return o<1&&(i=(n-.5*o)/(1-o)),[t[0],100*o,100*i]},r.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,o=e*n;let i=0;return o<1&&(i=(n-o)/(1-o)),[t[0],100*o,100*i]},r.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;if(0===n)return[255*o,255*o,255*o];const i=[0,0,0],r=e%1*6,s=r%1,a=1-s;let c=0;switch(Math.floor(r)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-n)*o,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},r.hcg.hsv=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);let o=0;return n>0&&(o=e/n),[t[0],100*o,100*n]},r.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let o=0;return n>0&&n<.5?o=e/(2*n):n>=.5&&n<1&&(o=e/(2*(1-n))),[t[0],100*o,100*n]},r.hcg.hwb=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},r.hwb.hcg=function(t){const e=t[1]/100,n=1-t[2]/100,o=n-e;let i=0;return o<1&&(i=(n-o)/(1-o)),[t[0],100*o,100*i]},r.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},r.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},r.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},r.gray.hsl=function(t){return[0,0,t[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(t){return[0,100,t[0]]},r.gray.cmyk=function(t){return[0,0,0,t[0]]},r.gray.lab=function(t){return[t[0],0,0]},r.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},9047:(t,e,n)=>{const o=n(9246),i=n(802),r={};Object.keys(o).forEach((t=>{r[t]={},Object.defineProperty(r[t],"channels",{value:o[t].channels}),Object.defineProperty(r[t],"labels",{value:o[t].labels});const e=i(t);Object.keys(e).forEach((n=>{const o=e[n];r[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))})),t.exports=r},802:(t,e,n)=>{const o=n(9246);function i(t){const e=function(){const t={},e=Object.keys(o);for(let n=e.length,o=0;o{"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},4199:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./../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:""}]);const a=s},8708:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},1866:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,':root{--ck-image-processing-highlight-color:#f9fafa;--ck-image-processing-background-color:#e3e5e8}.ck.ck-editor__editable .image.image-processing{position:relative}.ck.ck-editor__editable .image.image-processing:before{animation:ck-image-processing-animation 2s linear infinite;background:linear-gradient(90deg,var(--ck-image-processing-background-color),var(--ck-image-processing-highlight-color),var(--ck-image-processing-background-color));background-size:200% 100%;content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ck.ck-editor__editable .image.image-processing img{height:100%}@keyframes ck-image-processing-animation{0%{background-position:200% 0}to{background-position:-200% 0}}',"",{version:3,sources:["webpack://./../ckeditor5-ckbox/theme/ckboximageedit.css"],names:[],mappings:"AAKA,MAEC,6CAAyD,CACzD,8CACD,CAIE,gDACC,iBA2BD,CAzBC,uDAmBC,0DAA2D,CAR3D,oKAKC,CACD,yBAA0B,CAhB1B,UAAW,CAOX,WAAY,CAHZ,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAKN,UAAW,CAHX,SAcD,CAEA,oDACC,WACD,CAKH,yCACC,GACC,0BACD,CACA,GACC,2BACD,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/* Based on default CKBox theme colors */\n\t--ck-image-processing-highlight-color: hsl(220, 10%, 98%);\n\t--ck-image-processing-background-color: hsl(220, 10%, 90%);\n}\n\n.ck.ck-editor__editable {\n\t& .image {\n\t\t&.image-processing {\n\t\t\tposition: relative;\n\n\t\t\t&:before {\n\t\t\t\tcontent: '';\n\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tz-index: 1;\n\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\n\t\t\t\tbackground: linear-gradient(\n\t\t\t\t\t90deg,\n\t\t\t\t\tvar(--ck-image-processing-background-color),\n\t\t\t\t\tvar(--ck-image-processing-highlight-color),\n\t\t\t\t\tvar(--ck-image-processing-background-color)\n\t\t\t\t);\n\t\t\t\tbackground-size: 200% 100%;\n\n\t\t\t\tanimation: ck-image-processing-animation 2s linear infinite;\n\t\t\t}\n\n\t\t\t& img {\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n\n@keyframes ck-image-processing-animation {\n\t0% {\n\t\tbackground-position: 200% 0;\n\t}\n\t100% {\n\t\tbackground-position: -200% 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7793:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}.ck.ck-clipboard-drop-target-line:before{border-style:solid;content:"";height:0;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-width)*-.5);width:0}[dir=ltr] .ck.ck-clipboard-drop-target-line:before{border-color:transparent transparent transparent var(--ck-clipboard-drop-target-color);border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height);left:-1px}[dir=rtl] .ck.ck-clipboard-drop-target-line:before{border-color:transparent var(--ck-clipboard-drop-target-color) transparent transparent;border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0;right:-1px}',"",{version:3,sources:["webpack://./../ckeditor5-clipboard/theme/clipboard.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CAIF,kCAEC,mBAAoB,CADpB,iBAED,CC9BA,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CAOF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD,CAGD,kCAGC,gDAAiD,CADjD,sDAAuD,CADvD,QAAS,CAGT,eAwBD,CAtBC,yCAMC,kBAAmB,CALnB,UAAW,CAIX,QAAS,CAHT,iBAAkB,CAClB,uDAA0D,CAC1D,OAiBD,CArBA,mDAYE,sFAAuF,CADvF,+JAAoK,CAFpK,SAYF,CArBA,mDAmBE,sFAAuF,CADvF,+JAAmK,CAFnK,UAKF",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/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\tposition: absolute;\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@import \"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\";\n\n:root {\n\t--ck-clipboard-drop-target-dot-width: 12px;\n\t--ck-clipboard-drop-target-dot-height: 8px;\n\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border);\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\t& span {\n\t\t\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tbackground: var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-left: -1px;\n\n\t\t\t/* The triangle above the marker */\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 50%;\n\t\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n\t\t\t\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget that it a drop target.\n\t */\n\t& .ck-widget.ck-clipboard-drop-target-range {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\tzoom: 0.6;\n\t\toutline: none !important;\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\theight: 0;\n\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\tbackground: var(--ck-clipboard-drop-target-color);\n\tmargin-top: -1px;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\twidth: 0;\n\t\theight: 0;\n\t\tborder-style: solid;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tleft: -1px;\n\n\t\t\tborder-width: calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width)) var(--ck-clipboard-drop-target-dot-height);\n\t\t\tborder-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tright: -1px;\n\n\t\t\tborder-width:calc(.5 * var(--ck-clipboard-drop-target-dot-width)) var(--ck-clipboard-drop-target-dot-height) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0;\n\t\t\tborder-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4098:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/placeholder.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDAEC,6CAA8C,CAD9C,WAED",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/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\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/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n\t&::before {\n\t\tcursor: text;\n\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t}\n}\n"],sourceRoot:""}]);const a=s},8264:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,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/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]);const a=s},6269:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-heading/theme/heading.css","webpack://./../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:""}]);const a=s},265:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},5247:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highlighted-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-highlighted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,oDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,qEACD,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-highlighted-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-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},3350:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/imageinsert.css","webpack://./../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:""}]);const a=s},7378:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable img.image_placeholder{background-size:100% 100%}","",{version:3,sources:["webpack://./../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:""}]);const a=s},3469:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},6386:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},7693:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/imageuploadicon.css","webpack://./../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:""}]);const a=s},1559:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/imageuploadloader.css","webpack://./../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:""}]);const a=s},2267:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/imageuploadprogress.css","webpack://./../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:""}]);const a=s},4062:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/textalternativeform.css","webpack://./../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:""}]);const a=s},7719:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},8762:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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),[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),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkactions.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../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,CAWD,qHACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,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:""}]);const a=s},3817:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-link/theme/linkform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../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:""}]);const a=s},4808:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-link/theme/linkimage.css","webpack://./../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:""}]);const a=s},1232:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./../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:""}]);const a=s},6903:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}","",{version:3,sources:["webpack://./../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:""}]);const a=s},9968:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}","",{version:3,sources:["webpack://./../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:""}]);const a=s},7141:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/liststyles.css","webpack://./../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:""}]);const a=s},8991:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},70:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck-content .media{clear:both;display:block;margin:.9em 0;min-width:15em}","",{version:3,sources:["webpack://./../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:""}]);const a=s},7048:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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),.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://./../ckeditor5-media-embed/theme/mediaembedediting.css","webpack://./../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,CAYF,2LACC,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:""}]);const a=s},5651:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-media-embed/theme/mediaform.css","webpack://./../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:""}]);const a=s},5506:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./../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:""}]);const a=s},4043:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},2655:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/formrow.css","webpack://./../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:""}]);const a=s},5032:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/inserttable.css","webpack://./../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:""}]);const a=s},2329:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},4143:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},8986:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/tablecellproperties.css","webpack://./../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:""}]);const a=s},8795:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},8137:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},1623:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/tableform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./../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:""}]);const a=s},5562:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/tableproperties.css","webpack://./../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:""}]);const a=s},8423:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.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://./../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:""}]);const a=s},1801:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/arialiveannouncer/arialiveannouncer.css"],names:[],mappings:"AAKA,2BAEC,aAAc,CADd,iBAAkB,CAElB,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-aria-live-announcer {\n\tposition: absolute;\n\tleft: -10000px;\n\ttop: -10000px;\n}\n"],sourceRoot:""}]);const a=s},5727:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/autocomplete/autocomplete.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/autocomplete/autocomplete.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,oBACC,iBAeD,CAbC,wCACC,iBAAkB,CAClB,yBAUD,CARC,6DACC,WACD,CAEA,6DAEC,WAAY,CADZ,QAED,CCVD,wCCEA,eDuBA,CAzBA,uHCMC,qCDmBD,CAzBA,wCAMC,0CAA2C,CAC3C,sDAAuD,CEPxD,oCAA8B,CFI7B,gBAAiB,CAIjB,cAAe,CAHf,eAoBD,CAfC,6DACC,2BAA4B,CAC5B,4BAA6B,CAG7B,kBACD,CAEA,6DACC,wBAAyB,CACzB,yBAA0B,CAG1B,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.ck.ck-autocomplete {\n\tposition: relative;\n\n\t& > .ck-search__results {\n\t\tposition: absolute;\n\t\tz-index: var(--ck-z-panel);\n\n\t\t&.ck-search__results_n {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-search__results_s {\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\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-theme-lark/theme/mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css";\n\n.ck.ck-autocomplete {\n\t& > .ck-search__results {\n\t\t@mixin ck-rounded-corners;\n\t\t@mixin ck-drop-shadow;\n\n\t\tmax-height: 200px;\n\t\toverflow-y: auto;\n\t\tbackground: var(--ck-color-base-background);\n\t\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\t\tmin-width: auto;\n\n\t\t&.ck-search__results_n {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\n\t\t\t/* Prevent duplicated borders between the input and the results pane. */\n\t\t\tmargin-bottom: -1px;\n\t\t}\n\n\t\t&.ck-search__results_s {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\n\t\t\t/* Prevent duplicated borders between the input and the results pane. */\n\t\t\tmargin-top: -1px;\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","/*\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:""}]);const a=s},9715:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{opacity:.5}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/button.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAQA,6BAMC,kBAAmB,CADnB,mBAAoB,CADpB,iBAAkB,CCHlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD0BD,CA9BA,iDASE,oBAqBF,CA9BA,iDAaE,qBAiBF,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEzBD,6BCAC,oDD2ID,CCxIE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eF4ID,CA3IA,wIEGE,qCFwIF,CA3IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBAsID,CA5GC,oFGhCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHqCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAWD,CAZA,6FAIE,mCAQF,CAZA,6FAQE,oCAIF,CAZA,yEAWC,UACD,CAIC,oIIpFD,oDJwFC,CAOA,gLK/FD,kCLiGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCC9HA,+CDkIA,CC/HC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CD+GA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC9IC,mDDmJD,CChJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CD+HD,2CAIC,wCACD,CAEA,uCAEC,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 "../../mixins/_unselectable.css";\n@import "../../mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\n\t@mixin ck-dir ltr {\n\t\tjustify-content: left;\n\t}\n\n\t@mixin ck-dir rtl {\n\t\tjustify-content: right;\n\t}\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\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/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: 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@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-button-colors --ck-color-button-default;\n\t@mixin ck-rounded-corners;\n\n\twhite-space: nowrap;\n\tcursor: default;\n\tvertical-align: middle;\n\tpadding: var(--ck-spacing-tiny);\n\ttext-align: center;\n\n\t/* A very important piece of styling. Go to variable declaration to learn more. */\n\tmin-width: var(--ck-ui-component-min-height);\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Normalize the height of the line. Removing this will break consistent height\n\tamong text and text-less buttons (with icons). */\n\tline-height: 1;\n\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t/* Avoid flickering when the foucs border shows up. */\n\tborder: 1px solid transparent;\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n\t-webkit-appearance: none;\n\n\t&:active,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t/* Allow icon coloring using the text "color" property. */\n\t& .ck-button__icon {\n\t\t& use,\n\t\t& use * {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n\n\t& .ck-button__label {\n\t\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\t\tfont-size: inherit;\n\t\tfont-weight: inherit;\n\t\tcolor: inherit;\n\t\tcursor: inherit;\n\n\t\t/* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n\t\twithout labels (but with icons) have different sizes in Chrome */\n\t\tvertical-align: middle;\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-button__keystroke {\n\t\tcolor: inherit;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t}\n\n\t\topacity: .5;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t&.ck-disabled {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t/* The disabled button should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t\t& .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t& .ck-button__keystroke {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&.ck-button_with-text {\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-button_with-keystroke {\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t/* A style of the button which is currently on, e.g. its feature is active. */\n\t&.ck-on {\n\t\t@mixin ck-button-colors --ck-color-button-on;\n\n\t\tcolor: var(--ck-color-button-on-color);\n\t}\n\n\t&.ck-button-save {\n\t\tcolor: var(--ck-color-button-save);\n\t}\n\n\t&.ck-button-cancel {\n\t\tcolor: var(--ck-color-button-cancel);\n\t}\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n\t@mixin ck-button-colors --ck-color-button-action;\n\n\tcolor: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\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/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n\tbackground: var($(prefix)-background);\n\n\t&:not(.ck-disabled) {\n\t\t&:hover {\n\t\t\tbackground: var($(prefix)-hover-background);\n\t\t}\n\n\t\t&:active {\n\t\t\tbackground: var($(prefix)-active-background);\n\t\t}\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t&.ck-disabled {\n\t\tbackground: var($(prefix)-disabled-background);\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","/*\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 class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},4391:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,0DAAgE,CAChE,2HAIC,CACD,0FACD,CAOC,0QAEC,sBAAuB,CADvB,aAED,CAEA,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDCpCA,eD4EA,CAxCA,yIChCC,qCDwED,CAxCA,2DAKE,gBAmCF,CAxCA,2DAUE,iBA8BF,CAxCA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CAuBD,CApBC,2ECxDD,eDmEC,CAXA,6LCpDA,qCAAsC,CDsDpC,8CASF,CAXA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAMD,CAEA,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEhFA,kCFkFA,CAGA,oCACC,wBAAyB,CAEzB,eAAgB,CADhB,YAQD,CALC,uDACC,iGAAmG,CAEnG,4BAA6B,CAD7B,kBAED,CAKA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF",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-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\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@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n\t/* 34px at 13px font-size */\n\t--ck-switch-button-toggle-width: 2.6153846154em;\n\t/* 14px at 13px font-size */\n\t--ck-switch-button-toggle-inner-size: calc(1.0769230769em + 1px);\n\t--ck-switch-button-translation: calc(\n\t\tvar(--ck-switch-button-toggle-width) -\n\t\tvar(--ck-switch-button-toggle-inner-size) -\n\t\t2px /* Border */\n\t);\n\t--ck-switch-button-inner-hover-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n}\n\n.ck.ck-button.ck-switchbutton {\n\t/* Unlike a regular button, the switch button text color and background should never change.\n\t * Changing toggle switch (background, outline) is enough to carry the information about the\n\t * state of the entire component (https://github.com/ckeditor/ckeditor5/issues/12519)\n\t */\n\t&, &:hover, &:focus, &:active, &.ck-on:hover, &.ck-on:focus, &.ck-on:active {\n\t\tcolor: inherit;\n\t\tbackground: transparent;\n\t}\n\n\t& .ck-button__label {\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-right: calc(2 * var(--ck-spacing-large));\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-left: calc(2 * var(--ck-spacing-large));\n\t\t}\n\t}\n\n\t& .ck-button__toggle {\n\t\t@mixin ck-rounded-corners;\n\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Make sure the toggle is always to the right as far as possible. */\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Make sure the toggle is always to the left as far as possible. */\n\t\t\tmargin-right: auto;\n\t\t}\n\n\t\t/* Apply some smooth transition to the box-shadow and border. */\n\t\t/* Gently animate the background color of the toggle switch */\n\t\ttransition: background 400ms ease, box-shadow .2s ease-in-out, outline .2s ease-in-out;\n\t\tborder: 1px solid transparent;\n\t\twidth: var(--ck-switch-button-toggle-width);\n\t\tbackground: var(--ck-color-switch-button-off-background);\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: calc(.5 * var(--ck-border-radius));\n\t\t\t}\n\n\t\t\twidth: var(--ck-switch-button-toggle-inner-size);\n\t\t\theight: var(--ck-switch-button-toggle-inner-size);\n\t\t\tbackground: var(--ck-color-switch-button-inner-background);\n\n\t\t\t/* Gently animate the inner part of the toggle switch */\n\t\t\ttransition: all 300ms ease;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-off-hover-background);\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\tbox-shadow: var(--ck-switch-button-inner-hover-shadow);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-button__toggle {\n\t\t@mixin ck-disabled;\n\t}\n\n\t/* Overriding default .ck-button:focus styles + an outline around the toogle */\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tbox-shadow: none;\n\n\t\t& .ck-button__toggle {\n\t\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-background), 0 0 0 5px var(--ck-color-focus-outer-shadow);\n\t\t\toutline-offset: 1px;\n\t\t\toutline: var(--ck-focus-ring);\n\t\t}\n\t}\n\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-on {\n\t\t& .ck-button__toggle {\n\t\t\tbackground: var(--ck-color-switch-button-on-background);\n\n\t\t\t&:hover {\n\t\t\t\tbackground: var(--ck-color-switch-button-on-hover-background);\n\t\t\t}\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\t/*\n\t\t\t\t* Move the toggle switch to the right. It will be animated.\n\t\t\t\t*/\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\ttransform: translateX( var( --ck-switch-button-translation ) );\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\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/**\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 class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},25:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-list-button-padding);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/collapsible/collapsible.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/collapsible/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCAIC,eAAgB,CAChB,aAAc,CAHd,eAAiB,CACjB,qCAAsC,CAFtC,UAoBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,gFACD,CAGC,mEACC,wBACD",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-collapsible.ck-collapsible_collapsed {\n\t& > .ck-collapsible__children {\n\t\tdisplay: none;\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-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-collapsible {\n\t& > .ck.ck-button {\n\t\twidth: 100%;\n\t\tfont-weight: bold;\n\t\tpadding: var(--ck-list-button-padding);\n\t\tborder-radius: 0;\n\t\tcolor: inherit;\n\n\t\t&:focus {\n\t\t\tbackground: transparent;\n\t\t}\n\n\t\t&:active, &:not(:focus), &:hover:not(:focus) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t& > .ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\twidth: var(--ck-collapsible-arrow-size);\n\t\t}\n\t}\n\n\t& > .ck-collapsible__children {\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large);\n\t}\n\n\t&.ck-collapsible_collapsed {\n\t\t& > .ck.ck-button .ck-icon {\n\t\t\ttransform: rotate(-90deg);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},7317:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-selector__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBAOC,QAAS,CALT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CACV,8BAA+B,CAL/B,oCAyCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,+DACC,gDACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,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.ck.ck-color-grid {\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@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-grid-tile-size: 24px;\n\n\t/* Not using global colors here because these may change but some colors in a pallette\n\t * require special treatment. For instance, this ensures no matter what the UI text color is,\n\t * the check icon will look good on the black color tile. */\n\t--ck-color-color-grid-check-icon: hsl(212, 81%, 46%);\n}\n\n.ck.ck-color-grid {\n\tgrid-gap: 5px;\n\tpadding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n\twidth: var(--ck-color-grid-tile-size);\n\theight: var(--ck-color-grid-tile-size);\n\tmin-width: var(--ck-color-grid-tile-size);\n\tmin-height: var(--ck-color-grid-tile-size);\n\tpadding: 0;\n\ttransition: .2s ease box-shadow;\n\tborder: 0;\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t&.ck-color-selector__color-tile_bordered {\n\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\tdisplay: none;\n\t\tcolor: var(--ck-color-color-grid-check-icon);\n\t}\n\n\t&.ck-on {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t&.ck-on,\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\t/* Disable the default .ck-button\'s border ring. */\n\t\tborder: 0;\n\t}\n\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);const a=s},1905:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".color-picker-hex-input{width:max-content}.color-picker-hex-input .ck.ck-input{min-width:unset}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:unset}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:unset}.ck.ck-color-picker__row .ck.ck-input-text{width:unset}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorpicker/colorpicker.css"],names:[],mappings:"AAKA,wBACC,iBAKD,CAHC,qCACC,eACD,CAGD,yBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAA8B,CAC9B,kCAAmC,CACnC,WAcD,CAZC,mDACC,iBACD,CAEA,2CACC,WACD,CAEA,qDAEC,sCAAuC,CADvC,kCAED",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.color-picker-hex-input {\n\twidth: max-content;\n\n\t& .ck.ck-input {\n\t\tmin-width: unset;\n\t}\n}\n\n.ck.ck-color-picker__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\tmargin: var(--ck-spacing-large) 0 0;\n\twidth: unset;\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: unset;\n\t}\n\n\t& .ck.ck-input-text {\n\t\twidth: unset;\n\t}\n\n\t& .ck-color-picker__hash-view {\n\t\tpadding-top: var(--ck-spacing-tiny);\n\t\tpadding-right: var(--ck-spacing-medium);\n\t}\n}\n"],sourceRoot:""}]);const a=s},6309:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{align-items:center;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{display:flex;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{flex:1}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{width:100%}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker{padding:8px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker{height:100px;min-width:180px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{padding:0 8px 8px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorselector/colorselector.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorselector/colorselector.css"],names:[],mappings:"AAUE,oLAGC,kBAAmB,CADnB,YAMD,CARA,wMAME,0BAEF,CAKA,iFACC,YAAa,CACb,kBAAmB,CACnB,4BAMD,CAJC,oMAEC,MACD,CCrBD,oLAEC,UACD,CAEA,0FAEC,2BAA4B,CAC5B,4BAA6B,CAF7B,qEAiBD,CAbC,sGACC,gDACD,CAEA,gHAEE,uCAMF,CARA,gHAME,sCAEF,CAGD,6EACC,iBACD,CAKA,oEACC,WAoBD,CAlBC,sFACC,YAAa,CACb,eAeD,CAbC,wGACC,iEACD,CAEA,iGACC,iEACD,CAEA,yNAGC,WAAY,CADZ,UAED,CAIF,iFACC,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@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-color-selector {\n\t/* View fragment with color grids. */\n\t& .ck-color-grids-fragment {\n\t\t& .ck-button.ck-color-selector__remove-color,\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* View fragment with a color picker. */\n\t& .ck-color-picker-fragment {\n\t\t& .ck.ck-color-selector_action-bar {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tjustify-content: space-around;\n\n\t\t\t& .ck-button-save,\n\t\t\t& .ck-button-cancel {\n\t\t\t\tflex: 1\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\n.ck.ck-color-selector {\n\t/* View fragment with color grids. */\n\t& .ck-color-grids-fragment {\n\t\t& .ck-button.ck-color-selector__remove-color,\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-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& .ck.ck-icon {\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& label.ck.ck-color-grid__label {\n\t\t\tfont-weight: unset;\n\t\t}\n\t}\n\n\t/* View fragment with a color picker. */\n\t& .ck-color-picker-fragment {\n\t\t& .ck.ck-color-picker {\n\t\t\tpadding: 8px;\n\n\t\t\t& .hex-color-picker {\n\t\t\t\theight: 100px;\n\t\t\t\tmin-width: 180px;\n\n\t\t\t\t&::part(saturation) {\n\t\t\t\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\t\t\t\t}\n\n\t\t\t\t&::part(hue) {\n\t\t\t\t\tborder-radius: 0 0 var(--ck-border-radius) var(--ck-border-radius);\n\t\t\t\t}\n\n\t\t\t\t&::part(saturation-pointer),\n\t\t\t\t&::part(hue-pointer) {\n\t\t\t\t\twidth: 15px;\n\t\t\t\t\theight: 15px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& .ck.ck-color-selector_action-bar {\n\t\t\tpadding: 0 8px 8px;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},9819:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-dialog-overlay{bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{animation:none;background:none;pointer-events:none}.ck.ck-dialog{overscroll-behavior:none;position:absolute;width:fit-content}.ck.ck-dialog .ck.ck-form__header{flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}:root{--ck-dialog-overlay-background-color:rgba(0,0,0,.5);--ck-dialog-drop-shadow:0px 0px 6px 2px rgba(0,0,0,.15);--ck-dialog-max-width:100vw;--ck-dialog-max-height:90vh;--ck-color-dialog-background:var(--ck-color-base-background);--ck-color-dialog-form-header-border:var(--ck-color-base-border)}.ck.ck-dialog-overlay{animation:ck-dialog-fade-in .3s;background:var(--ck-dialog-overlay-background-color);z-index:var(--ck-z-dialog)}.ck.ck-dialog{border-radius:0}.ck-rounded-corners .ck.ck-dialog,.ck.ck-dialog.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dialog{--ck-drop-shadow:var(--ck-dialog-drop-shadow);background:var(--ck-color-dialog-background);border:1px solid var(--ck-color-base-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:var(--ck-dialog-max-height);max-width:var(--ck-dialog-max-width)}.ck.ck-dialog .ck.ck-form__header{border-bottom:1px solid var(--ck-color-dialog-form-header-border)}@keyframes ck-dialog-fade-in{0%{background:transparent}to{background:var(--ck-dialog-overlay-background-color)}}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dialog/dialog.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dialog/dialog.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,sBAKC,QAAS,CACT,MAAO,CAJP,wBAAyB,CAEzB,cAAe,CAGf,OAAQ,CACR,KAAM,CAPN,gBAcD,CALC,qDAEC,cAAe,CACf,eAAgB,CAFhB,mBAGD,CAGD,cACC,wBAAyB,CAEzB,iBAAkB,CADlB,iBAcD,CAXC,kCACC,aAKD,CAHC,0DACC,WACD,CAVF,mEAcE,kBAEF,CC7BA,MACC,mDAA2D,CAC3D,uDAA8D,CAC9D,2BAA4B,CAC5B,2BAA4B,CAC5B,4DAA6D,CAC7D,gEACD,CAEA,sBACC,+BAAgC,CAChC,oDAAqD,CACrD,0BACD,CAEA,cCbC,eD2BD,CAdA,mECTE,qCDuBF,CAdA,cAIC,6CAA8C,CAE9C,4CAA6C,CAG7C,4CAA6C,CExB7C,oCAA8B,CFsB9B,sCAAuC,CACvC,oCAMD,CAHC,kCACC,iEACD,CAGD,6BACC,GACC,sBACD,CAEA,GACC,oDACD,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-dialog-overlay {\n\tuser-select: none;\n\toverscroll-behavior: none;\n\n\tposition: fixed;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\n\t&.ck-dialog-overlay__transparent {\n\t\tpointer-events: none;\n\t\tanimation: none;\n\t\tbackground: none;\n\t}\n}\n\n.ck.ck-dialog {\n\toverscroll-behavior: none;\n\twidth: fit-content;\n\tposition: absolute;\n\n\t& .ck.ck-form__header {\n\t\tflex-shrink: 0;\n\n\t\t& .ck-form__header__label {\n\t\t\tcursor: grab;\n\t\t}\n\t}\n\n\t@nest .ck.ck-dialog-overlay.ck-dialog-overlay__transparent & {\n\t\tpointer-events: all;\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@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n:root {\n\t--ck-dialog-overlay-background-color: hsla( 0, 0%, 0%, .5 );\n\t--ck-dialog-drop-shadow: 0px 0px 6px 2px hsl(0deg 0% 0% / 15%);\n\t--ck-dialog-max-width: 100vw;\n\t--ck-dialog-max-height: 90vh;\n\t--ck-color-dialog-background: var(--ck-color-base-background);\n\t--ck-color-dialog-form-header-border: var(--ck-color-base-border);\n}\n\n.ck.ck-dialog-overlay {\n\tanimation: ck-dialog-fade-in .3s;\n\tbackground: var(--ck-dialog-overlay-background-color);\n\tz-index: var(--ck-z-dialog);\n}\n\n.ck.ck-dialog {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\t--ck-drop-shadow: var(--ck-dialog-drop-shadow);\n\n\tbackground: var(--ck-color-dialog-background);\n\tmax-height: var(--ck-dialog-max-height);\n\tmax-width: var(--ck-dialog-max-width);\n\tborder: 1px solid var(--ck-color-base-border);\n\n\t& .ck.ck-form__header {\n\t\tborder-bottom: 1px solid var(--ck-color-dialog-form-header-border);\n\t}\n}\n\n@keyframes ck-dialog-fade-in {\n\t0% {\n\t\tbackground: hsla( 0, 0%, 0%, 0 );\n\t}\n\n\t100% {\n\t\tbackground: var(--ck-dialog-overlay-background-color);\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 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:""}]);const a=s},9822:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-dialog .ck.ck-dialog__actions{display:flex;justify-content:flex-end;padding:var(--ck-spacing-large)}.ck.ck-dialog .ck.ck-dialog__actions>*+*{margin-left:var(--ck-spacing-large)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dialog/dialogactions.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dialog/dialogactions.css"],names:[],mappings:"AAMC,qCACC,YAAa,CACb,wBAAyB,CCDzB,+BDED,CCAC,yCACC,mCACD",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-dialog {\n\t& .ck.ck-dialog__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\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-dialog {\n\t& .ck.ck-dialog__actions {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * + * {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},8149:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CCpFA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eHkHD,CAhCA,qFG9EE,qCH8GF,CAhCA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAuBD,CAnBC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD,CAEA,6BACC,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-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\t}\n\n\t& .ck-dropdown__panel {\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-panel);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-panel) + 1 );\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@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-dropdown__arrow {\n\t\twidth: var(--ck-dropdown-arrow-size);\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-dropdown__arrow {\n\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\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-dropdown__arrow {\n\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-dropdown__arrow {\n\t\t@mixin ck-disabled;\n\t}\n\n\t& .ck-button.ck-dropdown__button {\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t/* #23 */\n\t\t& .ck-button__label {\n\t\t\twidth: 7em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t\t&.ck-disabled .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t&.ck-dropdown__button_label-width_auto .ck-button__label {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\n\t\t&.ck-off:active,\n\t\t&.ck-on:active {\n\t\t\tbox-shadow: none;\n\n\t\t\t&:focus {\n\t\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-dropdown__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\n\t/* Make sure the panel is at least as wide as the drop-down\'s button. */\n\tmin-width: 100%;\n\n\t/* Disabled corner border radius to be consistent with the .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-dropdown__panel_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n\n\t&:focus {\n\t\toutline: none;\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 class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\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","/*\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:""}]);const a=s},3629:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-dropdown>.ck-dropdown__panel>.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",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 "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown > .ck-dropdown__panel > .ck-list {\n\t/* Disabled radius of top-left border to be consistent with .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t/* Make sure the button belonging to the first/last child of the list goes well with the\n\tborder radius of the entire panel. */\n\t& .ck-list__item {\n\t\t&:first-child > .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child > .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-top-right-radius: 0;\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:""}]);const a=s},1792:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD,CCJD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CAKD,sDAEC,qBAAwB,CADxB,kBAED,CAQC,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGA,sIACC,iEACD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCCzFA,eDmGA,CAVA,qHCrFC,qCD+FD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",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-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\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@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n\t/*\n\t * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n\t */\n\t&:hover > .ck-splitbutton__action,\n\t&.ck-splitbutton_open > .ck-splitbutton__action {\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the action button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the action button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\t}\n\n\t& > .ck-splitbutton__arrow {\n\t\t/* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n\t\tit must get some arbitrary min-width. */\n\t\tmin-width: unset;\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the arrow button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the arrow button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\t\t}\n\t}\n\n\t/* Make sure the divider stretches 100% height of the button\n\thttps://github.com/ckeditor/ckeditor5/issues/10936 */\n\t& > .ck-splitbutton__arrow:not(:focus) {\n\t\tborder-top-width: 0px;\n\t\tborder-bottom-width: 0px;\n\t}\n\n\t/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n\tas a whole. The background of both buttons should stand out and there should be a visual\n\tseparation between both buttons. */\n\t&.ck-splitbutton_open,\n\t&:hover {\n\t\t/* When the split button hovered as a whole, not as individual buttons. */\n\t\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n\t\t\tbackground: var(--ck-color-split-button-hover-background);\n\t\t}\n\n\t\t/* Splitbutton separator needs to be set with the ::after pseudoselector\n\t\tto display properly the borders on focus */\n\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\tcontent: \'\';\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t\theight: 100%;\n\t\t\tbackground-color: var(--ck-color-split-button-hover-border);\n\t\t}\n\n\t\t/* Make sure the divider between the buttons looks fine when the button is focused */\n\t\t& > .ck-splitbutton__arrow:focus::after {\n\t\t\t--ck-color-split-button-hover-border: var(--ck-color-focus-border);\n\t\t}\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tleft: -1px;\n\t\t\t}\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tright: -1px;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Don\'t round the bottom left and right corners of the buttons when "open"\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-splitbutton_open {\n\t\t@mixin ck-rounded-corners {\n\t\t\t& > .ck-splitbutton__action {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t& > .ck-splitbutton__arrow {\n\t\t\t\tborder-bottom-right-radius: 0;\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:""}]);const a=s},1666:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",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-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\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-toolbar-dropdown .ck-toolbar {\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},8527:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-accessibility-help-dialog-max-width:600px;--ck-accessibility-help-dialog-max-height:400px;--ck-accessibility-help-dialog-border-color:#ccced1;--ck-accessibility-help-dialog-code-background-color:#ededed;--ck-accessibility-help-dialog-kbd-shadow-color:#9c9c9c}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{border:1px solid transparent;max-height:var(--ck-accessibility-help-dialog-max-height);max-width:var(--ck-accessibility-help-dialog-max-width);overflow:auto;padding:var(--ck-spacing-large);user-select:text}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{*{white-space:normal}}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content .ck-label{display:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3{font-size:1.2em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4{font-size:1em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content p,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content table{margin:1em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl{border-bottom:none;border-top:1px solid var(--ck-accessibility-help-dialog-border-color);display:grid;grid-template-columns:2fr 1fr}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{border-bottom:1px solid var(--ck-accessibility-help-dialog-border-color);padding:.4em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{grid-column-start:1}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd{grid-column-start:2;text-align:right}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{background:var(--ck-accessibility-help-dialog-code-background-color);border-radius:2px;display:inline-block;font-size:.9em;line-height:1;padding:.4em;text-align:center;vertical-align:middle}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code{font-family:monospace}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{box-shadow:0 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);margin:0 1px;min-width:1.8em}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd+kbd{margin-left:2px}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/accessibilityhelp.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAQA,MACC,8CAA+C,CAC/C,+CAAgD,CAChD,mDAA8D,CAC9D,4DAAyE,CACzE,uDACD,CAEA,wEAOC,4BAA6B,CAJ7B,yDAA0D,CAD1D,uDAAwD,CAExD,aAAc,CAHd,+BAAgC,CAIhC,gBAgFD,CA5EC,8ECdA,2BAA2B,CCF3B,2CAA8B,CDC9B,YDkBA,CAZD,wEAcC,EACC,kBACD,CAqED,CAlEC,kFACC,YACD,CAEA,2EAEC,eAAgB,CADhB,eAED,CAEA,2EAEC,aAAc,CADd,eAED,CAEA,8SAIC,YACD,CAEA,2EAIC,kBAAmB,CADnB,qEAAsE,CAFtE,YAAa,CACb,6BAiBD,CAbC,4JACC,wEAAyE,CACzE,cACD,CAEA,8EACC,mBACD,CAEA,8EACC,mBAAoB,CACpB,gBACD,CAGD,yJAEC,oEAAqE,CAIrE,iBAAkB,CALlB,oBAAqB,CAOrB,cAAe,CAHf,aAAc,CAFd,YAAa,CAIb,iBAAkB,CAHlB,qBAKD,CAEA,6EACC,qBACD,CAEA,4EAEC,yEAA4E,CAC5E,YAAa,CAFb,eAOD,CAHC,gFACC,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 "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-accessibility-help-dialog-max-width: 600px;\n\t--ck-accessibility-help-dialog-max-height: 400px;\n\t--ck-accessibility-help-dialog-border-color: hsl(220, 6%, 81%);\n\t--ck-accessibility-help-dialog-code-background-color: hsl(0deg 0% 92.94%);\n\t--ck-accessibility-help-dialog-kbd-shadow-color: hsl(0deg 0% 61%);\n}\n\n.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content {\n\tpadding: var(--ck-spacing-large);\n\tmax-width: var(--ck-accessibility-help-dialog-max-width);\n\tmax-height: var(--ck-accessibility-help-dialog-max-height);\n\toverflow: auto;\n\tuser-select: text;\n\n\tborder: 1px solid transparent;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t* {\n\t\twhite-space: normal;\n\t}\n\n\t/* Hide the main label of the content container. */\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t& h3 {\n\t\tfont-weight: bold;\n\t\tfont-size: 1.2em;\n\t}\n\n\t& h4 {\n\t\tfont-weight: bold;\n\t\tfont-size: 1em;\n\t}\n\n\t& p,\n\t& h3,\n\t& h4,\n\t& table {\n\t\tmargin: 1em 0;\n\t}\n\n\t& dl {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 2fr 1fr;\n\t\tborder-top: 1px solid var(--ck-accessibility-help-dialog-border-color);\n\t\tborder-bottom: none;\n\n\t\t& dt, & dd {\n\t\t\tborder-bottom: 1px solid var(--ck-accessibility-help-dialog-border-color);\n\t\t\tpadding: .4em 0;\n\t\t}\n\n\t\t& dt {\n\t\t\tgrid-column-start: 1;\n\t\t}\n\n\t\t& dd {\n\t\t\tgrid-column-start: 2;\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& kbd, & code {\n\t\tdisplay: inline-block;\n\t\tbackground: var(--ck-accessibility-help-dialog-code-background-color);\n\t\tpadding: .4em;\n\t\tvertical-align: middle;\n\t\tline-height: 1;\n\t\tborder-radius: 2px;\n\t\ttext-align: center;\n\t\tfont-size: .9em;\n\t}\n\n\t& code {\n\t\tfont-family: monospace;\n\t}\n\n\t& kbd {\n\t\tmin-width: 1.8em;\n\t\tbox-shadow: 0px 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);\n\t\tmargin: 0 1px;\n\n\t\t& + kbd {\n\t\t\tmargin-left: 2px;\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/**\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:""}]);const a=s},1185:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,oDACD,CAIA,gEACC,iDACD",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 "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n\t@mixin ck-rounded-corners;\n\n\t&.ck-focused {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n\n.ck.ck-editor__editable_inline {\n\toverflow: auto;\n\tpadding: 0 var(--ck-spacing-standard);\n\tborder: 1px solid transparent;\n\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/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n\t& > *:first-child {\n\t\tmargin-top: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\n\t& > *:last-child {\n\t\t/*\n\t\t * This value should match with the default margins of the block elements (like .media or .image)\n\t\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n\t\t */\n\t\tmargin-bottom: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\n\t&.ck-blurred ::selection {\n\t\tbackground: var(--ck-color-editable-blur-selection);\n\t}\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n\t&::after {\n\t\tborder-bottom-color: var(--ck-color-panel-background);\n\t}\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n\t&::after {\n\t\tborder-top-color: var(--ck-color-panel-background);\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:""}]);const a=s},7913:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:44px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header>.ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header>.ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{--ck-font-size-base:15px;font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BAKD,CAHC,8CACC,WACD,CCPD,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAmBD,CAdC,uCAEE,qCAMF,CARA,uCAME,oCAEF,CAEA,4CACC,wBAAyB,CACzB,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.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n\n\t& h2.ck-form__header__label {\n\t\tflex-grow: 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@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-form-header-height: 44px;\n}\n\n.ck.ck-form__header {\n\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\n\theight: var(--ck-form-header-height);\n\tline-height: var(--ck-form-header-height);\n\tborder-bottom: 1px solid var(--ck-color-base-border);\n\n\t& > .ck-icon {\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: var(--ck-spacing-medium);\n\t\t}\n\t}\n\n\t& .ck-form__header__label {\n\t\t--ck-font-size-base: 15px;\n\t\tfont-weight: bold;\n\t}\n}\n'],sourceRoot:""}]);const a=s},9529:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:initial}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css"],names:[],mappings:"AAKA,6BACC,+CAAgD,CAIhD,iBAAkB,CAFlB,mBAAoB,CACpB,mBAAoB,CAFpB,sBAID",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-highlighted-text mark {\n\tbackground: var(--ck-color-highlight-background);\n\tvertical-align: initial;\n\tfont-weight: inherit;\n\tline-height: inherit;\n\tfont-size: inherit;\n}\n"],sourceRoot:""}]);const a=s},7621:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/icon/icon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAU1B,qBAoBD,CAlBC,0BALA,cAQA,CAMC,sEACC,aAMD,CAJC,+CAEC,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-icon {\n\tvertical-align: middle;\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-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n}\n\n.ck.ck-icon {\n\twidth: var(--ck-icon-size);\n\theight: var(--ck-icon-size);\n\n\t/* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n\tfont-size: .8333350694em;\n\n\t/* Inherit cursor style (#5). */\n\tcursor: inherit;\n\n\t/* This will prevent blurry icons on Firefox. See #340. */\n\twill-change: transform;\n\n\t& * {\n\t\t/* Inherit cursor style (#5). */\n\t\tcursor: inherit;\n\t}\n\n\t/* Allows dynamic coloring of an icon by inheriting its color from the parent. */\n\t&.ck-icon_inherit-color {\n\t\tcolor: inherit;\n\n\t\t& * {\n\t\t\tcolor: inherit;\n\n\t\t\t&:not([fill]) {\n\t\t\t\t/* Needed by FF. */\n\t\t\t\tfill: currentColor;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},253:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DA0BD,CAxBC,mBEnBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YFuBA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBAEC,sCAAuC,CADvC,+CAMD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,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@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-input-width: 18em;\n\n\t/* Backward compatibility. */\n\t--ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-input-background);\n\tborder: 1px solid var(--ck-color-input-border);\n\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n\tmin-width: var(--ck-input-width);\n\n\t/* This is important to stay of the same height as surrounding buttons */\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t&[readonly] {\n\t\tborder: 1px solid var(--ck-color-input-disabled-border);\n\t\tbackground: var(--ck-color-input-disabled-background);\n\t\tcolor: var(--ck-color-input-disabled-text);\n\n\t\t&:focus {\n\t\t\t/* The read-only input should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\tborder-color: var(--ck-color-input-error-border);\n\t\tanimation: ck-input-shake .3s ease both;\n\n\t\t&:focus {\n\t\t\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n\t\t}\n\t}\n}\n\n@keyframes ck-input-shake {\n\t20% {\n\t\ttransform: translateX(-2px);\n\t}\n\n\t40% {\n\t\ttransform: translateX(2px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-1px);\n\t}\n\n\t80% {\n\t\ttransform: translateX(1px);\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:""}]);const a=s},7801:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/label/label.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,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.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: 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.ck.ck-label {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const a=s},4962:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0;transform:translate(calc(var(--ck-spacing-medium)*-1),-6px) scale(.75);transform-origin:100% 0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,oEAAqE,CACrE,8EAAiF,CACjF,yEACD,CAEA,0BCLC,eD+GD,CA1GA,2FCDE,qCD2GF,CAvGC,mEACC,UAoCD,CAlCC,gFACC,KAgCD,CAjCA,0FAIE,MAAS,CAGT,6DAA+D,CAF/D,oBA4BF,CAjCA,0FAWE,OAAU,CAEV,sEAA0E,CAD1E,uBAqBF,CAjCA,gFAkBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAH9C,mBAAoB,CAQpB,sBAAuB,CAKvB,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,2XAGE,+HAYF,CAfA,2XAOE,wIAQF,CAfA,uWAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",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-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\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@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n\t--ck-labeled-field-label-default-position-x: var(--ck-spacing-medium);\n\t--ck-labeled-field-label-default-position-y: calc(0.6 * var(--ck-font-size-base));\n\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n\t@mixin ck-rounded-corners;\n\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\twidth: 100%;\n\n\t\t& > .ck.ck-label {\n\t\t\ttop: 0px;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: 0px;\n\t\t\t\ttransform-origin: 0 0;\n\t\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t\ttransform-origin: 100% 0;\n\t\t\t\ttransform: translate(calc(-1 * var(--ck-spacing-medium)), -6px) scale(.75);\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\n\t\t\tbackground: var(--ck-color-labeled-field-label-background);\n\t\t\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\n\t\t\tline-height: initial;\n\t\t\tfont-weight: normal;\n\n\t\t\t/* Prevent overflow when the label is longer than the input */\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\n\t\t\tmax-width: 100%;\n\n\t\t\ttransition:\n\t\t\t\ttransform var(--ck-labeled-field-view-transition),\n\t\t\t\tpadding var(--ck-labeled-field-view-transition),\n\t\t\t\tbackground var(--ck-labeled-field-view-transition);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\n\t\t& .ck-input:not([readonly]) + .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t& .ck-labeled-field-view__status {\n\t\tfont-size: var(--ck-font-size-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\n\t\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\t\tThe status could be very long. */\n\t\twhite-space: normal;\n\n\t\t&.ck-labeled-field-view__status_error {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t/* Disabled fields and fields that have no focus should fade out. */\n\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\tcolor: var(--ck-color-input-disabled-text);\n\t}\n\n\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t@mixin ck-dir ltr {\n\t\t\ttransform: translate(var(--ck-labeled-field-label-default-position-x), var(--ck-labeled-field-label-default-position-y)) scale(1);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttransform: translate(calc(-1 * var(--ck-labeled-field-label-default-position-x)), var(--ck-labeled-field-label-default-position-y)) scale(1);\n\t\t}\n\n\t\t/* Compensate for the default translate position. */\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n\t/* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n\t\tbackground: transparent;\n\t}\n\n\t/* When the dropdown is "empty", the labeled field label replaces its label. */\n\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n\t\topacity: 0;\n\t}\n\n\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\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:""}]);const a=s},5199:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}:root{--ck-list-button-padding:calc(var(--ck-line-height-base)*0.11*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item>.ck-button{border-radius:0;min-height:unset;width:100%}[dir=ltr] .ck.ck-list__item>.ck-button{text-align:left}[dir=rtl] .ck.ck-list__item>.ck-button{text-align:right}.ck.ck-list__item>.ck-button{padding:var(--ck-list-button-padding)}.ck.ck-list__item>.ck-button:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item>.ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item>.ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item>.ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item>.ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item>.ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck-list .ck-list__group{padding-top:var(--ck-spacing-medium);:not(.ck-hidden)~&{border-top:1px solid var(--ck-color-base-border)}}.ck-list .ck-list__group>.ck-label{font-size:11px;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium)}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/list/list.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEdD,MACC,qJAGD,CAEA,YCLC,eDUD,CALA,+DCDE,qCDMF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAGC,eAAgB,CAFhB,gBAAiB,CACjB,UAwCD,CA1CA,uCAME,eAoCF,CA1CA,uCAUE,gBAgCF,CA1CA,6BAgBC,qCA0BD,CAxBC,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,iFACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,yBACC,oCAAqC,CAGrC,mBACC,gDACD,CAOD,CALC,mCACC,cAAe,CACf,eAAiB,CACjB,oFACD,CAGD,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",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 "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\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 * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: 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@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-list-button-padding:\n\t\tcalc(.11 * var(--ck-line-height-base) * var(--ck-font-size-base))\n\t\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\n}\n\n.ck.ck-list {\n\t@mixin ck-rounded-corners;\n\n\tlist-style-type: none;\n\tbackground: var(--ck-color-list-background);\n}\n\n.ck.ck-list__item {\n\tcursor: default;\n\tmin-width: 12em;\n\n\t& > .ck-button {\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\tborder-radius: 0;\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\n\t\t/* List items should have the same height. Use absolute units to make sure it is so\n\t\t because e.g. different heading styles may have different height\n\t\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\tpadding: var(--ck-list-button-padding);\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-button-on-background);\n\t\t\tcolor: var(--ck-color-list-button-on-text);\n\n\t\t\t&:active {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-on-background-focus);\n\t\t\t}\n\n\t\t\t&:focus:not(.ck-switchbutton):not(.ck-disabled) {\n\t\t\t\tborder-color: var(--ck-color-base-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled) {\n\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t}\n\t}\n\n\t/* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n\tof conveying its state (like the switcher) */\n\t& > .ck-switchbutton {\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-background);\n\t\t\tcolor: inherit;\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck-list .ck-list__group {\n\tpadding-top: var(--ck-spacing-medium);\n\n\t/* The group should have a border when it\'s not the first item. */\n\t*:not(.ck-hidden) ~ & {\n\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t}\n\n\t& > .ck-label {\n\t\tfont-size: 11px;\n\t\tfont-weight: bold;\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium);\n\t}\n}\n\n.ck.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\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:""}]);const a=s},497:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-menu-bar{background:var(--ck-color-base-background);border:1px solid var(--ck-color-toolbar-border);display:flex;flex-wrap:wrap;gap:var(--ck-spacing-small);justify-content:flex-start;padding:var(--ck-spacing-small);width:100%}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubar.css"],names:[],mappings:"AAKA,gBAIC,0CAA2C,CAG3C,+CAAgD,CANhD,YAAa,CACb,cAAe,CAIf,2BAA4B,CAH5B,0BAA2B,CAE3B,+BAAgC,CAGhC,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-menu-bar {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\tbackground: var(--ck-color-base-background);\n\tpadding: var(--ck-spacing-small);\n\tgap: var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\twidth: 100%;\n}\n"],sourceRoot:""}]);const a=s},4:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-menu-bar__menu{display:block;font-size:inherit;position:relative}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level{max-width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/menubar/menubarmenu.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenu.css"],names:[],mappings:"AAKA,sBACC,aAAc,CCCd,iBAAkB,CDAlB,iBACD,CCCC,kDACC,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-menu-bar__menu {\n\tdisplay: block;\n\tposition: relative;\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-menu-bar__menu {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t&.ck-menu-bar__menu_top-level {\n\t\tmax-width: 100%;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3344:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button{padding:var(--ck-list-button-padding);width:100%}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-button__label{flex-grow:1;overflow:hidden;text-overflow:ellipsis}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button.ck-disabled>.ck-button__label{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button{min-height:unset;padding:var(--ck-spacing-small) var(--ck-spacing-medium)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-button__label{line-height:unset;width:unset}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-icon{display:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button{border-radius:0}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(-90deg)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(90deg)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button.ck-disabled>.ck-menu-bar__menu__button__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/menubar/menubarmenubutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenubutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAMC,mFACC,mBAAoB,CACpB,2BACD,CCIA,iDACC,qCAAsC,CACtC,UAuBD,CArBC,mEACC,WAAY,CACZ,eAAgB,CAChB,sBACD,CAEA,+ECdD,kCDgBC,CAGC,qFACC,oCACD,CAIA,qFACC,qCACD,CAOF,6EAEC,gBAAiB,CADjB,wDAgBD,CAbC,+FAEC,iBAAkB,CADlB,WAED,CAEA,mFACC,2BAA4B,CAC5B,4BACD,CAEA,sFACC,YACD,CAMD,mFACC,eAiDD,CA/CC,yFACC,wBAAyB,CACzB,eAKD,CAHC,qGACC,0DACD,CAID,iIACC,+DACD,CAEA,qHACC,mCASD,CAVA,+HAIE,wBAMF,CAVA,+HAQE,uBAEF,CAEA,iICrFD,kCDuFC,CAGC,+HAIC,sCAAuC,CAHvC,gCAID,CAIA,+HACC,+BAAgC,CAGhC,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.ck.ck-menu-bar__menu {\n\t& > .ck-menu-bar__menu__button > .ck-menu-bar__menu__button__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\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/_disabled.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-menu-bar__menu {\n\t/*\n\t * All menu buttons.\n\t */\n\t& > .ck-menu-bar__menu__button {\n\t\tpadding: var(--ck-list-button-padding);\n\t\twidth: 100%;\n\n\t\t& > .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&.ck-disabled > .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Top-level menu buttons only.\n\t */\n\t&.ck-menu-bar__menu_top-level > .ck-menu-bar__menu__button {\n\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\tmin-height: unset;\n\n\t\t& .ck-button__label {\n\t\t\twidth: unset;\n\t\t\tline-height: unset;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t/*\n\t * Sub-menu buttons.\n\t */\n\t&:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button {\n\t\tborder-radius: 0;\n\n\t\t&:focus {\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\n\t\t\t&:not(.ck-on) {\n\t\t\t\tbackground: var(--ck-color-button-default-hover-background);\n\t\t\t}\n\t\t}\n\n\t\t/* Spacing in buttons that miss the icon. */\n\t\t&:not(:has(.ck-button__icon)) > .ck-button__label {\n\t\t\tmargin-left: calc(var(--ck-icon-size) - var(--ck-spacing-small));\n\t\t}\n\n\t\t& > .ck-menu-bar__menu__button__arrow {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\ttransform: rotate(-90deg);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\ttransform: rotate(90deg);\n\t\t\t}\n\t\t}\n\n\t\t&.ck-disabled > .ck-menu-bar__menu__button__arrow {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\t& > .ck-menu-bar__menu__button__arrow {\n\t\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t\t/* A space to accommodate the triangle. */\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& > .ck-menu-bar__menu__button__arrow {\n\t\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t\t/* A space to accommodate the triangle. */\n\t\t\t\tmargin-right: var(--ck-spacing-small);\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 * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},9481:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-menu-bar-menu-item-min-width:18em}.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item{min-width:var(--ck-menu-bar-menu-item-min-width)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenulistitem.css"],names:[],mappings:"AAKA,MACC,sCACD,CAEA,kDACC,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:root {\n\t--ck-menu-bar-menu-item-min-width: 18em;\n}\n\n.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item {\n\tmin-width: var(--ck-menu-bar-menu-item-min-width);\n}\n"],sourceRoot:""}]);const a=s},977:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button{border-radius:0}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container,.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container .ck-spinner{--ck-toolbar-spinner-size:20px}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__panel>ul>.ck-menu-bar__menu__item>.ck-menu-bar__menu__item__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenulistitembutton.css"],names:[],mappings:"AASC,iEACC,eA0BD,CAxBC,0LAGC,8BACD,CAEA,uFAEC,4CAA+C,CAC/C,oCACD,CAMA,uEACC,wBAAyB,CACzB,eAKD,CAHC,mFACC,0DACD,CASD,uLACC,+DACD",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-menu-bar__menu {\n\t/*\n\t * List item buttons.\n\t */\n\t& .ck-button.ck-menu-bar__menu__item__button {\n\t\tborder-radius: 0;\n\n\t\t& > .ck-spinner-container,\n\t\t& > .ck-spinner-container .ck-spinner {\n\t\t\t/* These styles correspond to .ck-icon so that the spinner seamlessly replaces the icon. */\n\t\t\t--ck-toolbar-spinner-size: 20px;\n\t\t}\n\n\t\t& > .ck-spinner-container {\n\t\t\t/* These margins are the same as for .ck-icon. */\n\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/*\n\t\t * Hovered items automatically get focused. Default focus styles look odd\n\t\t * while moving across a huge list of items so let's get rid of them\n\t\t */\n\t\t&:focus {\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\n\t\t\t&:not(.ck-on) {\n\t\t\t\tbackground: var(--ck-color-button-default-hover-background);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * First-level sub-menu item buttons.\n\t */\n\t&.ck-menu-bar__menu_top-level > .ck-menu-bar__menu__panel > ul > .ck-menu-bar__menu__item > .ck-menu-bar__menu__item__button {\n\t\t/* Spacing in buttons that miss the icon. */\n\t\t&:not(:has(.ck-button__icon)) > .ck-button__label {\n\t\t\tmargin-left: calc(var(--ck-icon-size) - var(--ck-spacing-small));\n\t\t}\n\t}\n}\n\n\n"],sourceRoot:""}]);const a=s},9108:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-menu-bar-menu-max-width:75vw;--ck-menu-bar-nested-menu-horizontal-offset:5px}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{max-width:var(--ck-menu-bar-menu-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw{bottom:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{bottom:auto;top:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{left:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{right:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{left:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en{bottom:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{right:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{bottom:0}:root{--ck-menu-bar-menu-panel-max-width:75vw}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{border-radius:0}.ck-rounded-corners .ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;height:fit-content;max-width:var(--ck-menu-bar-menu-panel-max-width)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{border-top-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{border-top-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne{border-bottom-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{border-bottom-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel:focus{outline:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/menubar/menubarmenupanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenupanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,iCAAkC,CAClC,+CACD,CAEA,mDAEC,2CAA4C,CAC5C,iBAAkB,CAFlB,yBAkDD,CA9CC,gLAEC,WACD,CAEA,gLAGC,WAAY,CADZ,QAED,CAEA,gLAEC,MACD,CAEA,gLAEC,OACD,CAEA,gLAEC,kEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CAEA,gLAEC,mEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CCpDD,MACC,uCACD,CAEA,mDCDC,eDmCD,CAlCA,6ICGE,qCD+BF,CAlCA,mDAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CETT,oCAA8B,CFU9B,kBAAmB,CACnB,iDA0BD,CAvBC,gLAEC,wBACD,CAEA,gLAEC,yBACD,CAEA,gLAEC,2BACD,CAEA,gLAEC,4BACD,CAEA,yDACC,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-menu-bar-menu-max-width: 75vw;\n\t--ck-menu-bar-nested-menu-horizontal-offset: 5px;\n}\n\n.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel {\n\tz-index: var(--ck-z-panel);\n\tmax-width: var(--ck-menu-bar-menu-max-width);\n\tposition: absolute;\n\n\t&.ck-menu-bar__menu__panel_position_ne,\n\t&.ck-menu-bar__menu__panel_position_nw {\n\t\tbottom: 100%;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_se,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\ttop: 100%;\n\t\tbottom: auto;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ne,\n\t&.ck-menu-bar__menu__panel_position_se {\n\t\tleft: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_nw,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\tright: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_es,\n\t&.ck-menu-bar__menu__panel_position_en {\n\t\tleft: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_es {\n\t\ttop: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_en {\n\t\tbottom: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws,\n\t&.ck-menu-bar__menu__panel_position_wn {\n\t\tright: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws {\n\t\ttop: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_wn {\n\t\tbottom: 0px;\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@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-menu-bar-menu-panel-max-width: 75vw;\n}\n\n.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\theight: fit-content;\n\tmax-width: var(--ck-menu-bar-menu-panel-max-width);\n\n\t/* Corner border radius consistent with the button. */\n\t&.ck-menu-bar__menu__panel_position_es,\n\t&.ck-menu-bar__menu__panel_position_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_en,\n\t&.ck-menu-bar__menu__panel_position_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_wn,\n\t&.ck-menu-bar__menu__panel_position_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n\n\t&:focus {\n\t\toutline: none;\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 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:""}]);const a=s},3710:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-panel)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCLC,eDmMD,CA9LA,iFCDE,qCD+LF,CA9LA,qBAMC,2CAA4C,CAC5C,wEAAyE,CEdzE,oCAA8B,CFW9B,eA0LD,CApLE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,kDACD,CAEA,2CACC,iFAAkF,CAClF,gFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDAAwD,CACxD,qDACD,CAEA,2CACC,iFAAkF,CAClF,mFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,oDACD,CAEA,2CACC,iFAAkF,CAClF,kFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,mDACD,CAEA,2CACC,iFAAkF,CAClF,iFACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD,CAIA,yGAGC,sDAAyD,CADzD,6CAAgD,CAEhD,OACD,CAIA,yGAEC,4CAA+C,CAC/C,sDAAyD,CACzD,OACD",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/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-panel);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\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@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-border-width: 1px;\n\t--ck-balloon-arrow-offset: 2px;\n\t--ck-balloon-arrow-height: 10px;\n\t--ck-balloon-arrow-half-width: 8px;\n\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: var(--ck-balloon-border-width) solid var(--ck-color-panel-border);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\n\t\t\tmargin-top: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\n\t\t\tmargin-top: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: var(--ck-color-panel-border) transparent transparent;\n\t\t\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n\t\t\tmargin-bottom: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\n\t\t\tmargin-bottom: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_e"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-border);\n\t\t\tmargin-right: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-background);\n\t\t\tmargin-right: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_w"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0;\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent var(--ck-color-panel-border) transparent transparent;\n\t\t\tmargin-left: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent var(--ck-color-panel-background) transparent transparent;\n\t\t\tmargin-left: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_n {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_ne {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_s {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_se {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_smw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nmw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_e {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_w {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 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/**\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 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:""}]);const a=s},991:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,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.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\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-balloon-rotator__navigation {\n\tbackground: var(--ck-color-toolbar-background);\n\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\n\tpadding: 0 var(--ck-spacing-small);\n\n\t/* Let's keep similar appearance to `ck-toolbar`. */\n\t& > * {\n\t\tmargin-right: var(--ck-spacing-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t/* Gives counter more breath than buttons. */\n\t& .ck-balloon-rotator__counter {\n\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t/* We need to use smaller margin because of previous button's right margin. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n.ck .ck-balloon-rotator__content {\n\n\t/* Disable default annotation shadow inside rotator with fake panels. */\n\t& .ck.ck-annotation-wrapper {\n\t\tbox-shadow: none;\n\t}\n}\n"],sourceRoot:""}]);const a=s},5380:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",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-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-panel) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\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/_shadow.css";\n\n:root {\n\t--ck-balloon-fake-panel-offset-horizontal: 6px;\n\t--ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\tborder-radius: var(--ck-border-radius);\n\n\twidth: 100%;\n\theight: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n\t--ck-balloon-fake-panel-offset-vertical: -6px;\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:""}]);const a=s},8298:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",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-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-panel); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\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@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\t@mixin ck-drop-shadow;\n\n\t\tborder-width: 0 1px 1px;\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 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/**\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:""}]);const a=s},2722:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../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,CASC,uGACC,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,0OAeE,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:""}]);const a=s},8107:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}:root{--ck-search-field-view-horizontal-spacing:calc(var(--ck-icon-size) + var(--ck-spacing-medium))}.ck.ck-search>.ck-labeled-field-view .ck-input{width:100%}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon{--ck-labeled-field-label-default-position-x:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon>.ck-labeled-field-view__input-wrapper>.ck-icon{opacity:.5;pointer-events:none}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input,[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input:not(.ck-input-text_empty){padding-left:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset{--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset.ck-labeled-field-view_empty{--ck-labeled-field-empty-unfocused-max-width:100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{background:none;min-height:auto;min-width:auto;opacity:.5;padding:0}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{left:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset:hover{opacity:1}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input:not(.ck-input-text_empty),[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{padding-right:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-search__results{min-width:100%}.ck.ck-search>.ck-search__results>.ck-search__info{padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-search>.ck-search__results>.ck-search__info *{white-space:normal}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{font-weight:700}.ck.ck-search>.ck-search__results>.ck-search__info>span:last-child{margin-top:var(--ck-spacing-medium)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/search/search.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/search/search.css"],names:[],mappings:"AASE,oFACC,iBAAkB,CAClB,OAAQ,CACR,0BASD,CAZA,8FAME,6BAMF,CAZA,8FAUE,8BAEF,CAEA,uDACC,iBAAkB,CAClB,OAAQ,CACR,0BACD,CAKC,oEACC,aACD,CAGA,qEACC,YACD,CChCH,MACC,8FACD,CAIE,+CACC,UACD,CAEA,gEACC,0FAoBD,CAlBC,+GACC,UAAW,CACX,mBACD,CAEA,0EACC,UAWD,CAJE,kMACC,2DACD,CAKH,iEACC,sGAwCD,CAtCC,6FACC,6HACD,CAEA,mFAIC,eAAgB,CAFhB,eAAgB,CADhB,cAAe,CAIf,UAAW,CACX,SAaD,CAnBA,6FASE,8BAUF,CAnBA,6FAaE,6BAMF,CAHC,yFACC,SACD,CAGD,2EACC,UAWD,CAZA,oMAUE,4DAEF,CAIF,kCACC,cAkBD,CAhBC,mDAEC,wDAAyD,CADzD,UAcD,CAXC,qDACC,kBACD,CAEA,oEACC,eACD,CAEA,mEACC,mCACD",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/_dir.css";\n\n.ck.ck-search {\n\t& > .ck-labeled-field-view {\n\t\t& > .ck-labeled-field-view__input-wrapper > .ck-icon {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\n\t\t& .ck-search__reset {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\t}\n\n\t& > .ck-search__results {\n\t\t& > .ck-search__info {\n\t\t\t& > span:first-child {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t/* Hide the filtered view when nothing was found */\n\t\t\t&:not(.ck-hidden) ~ * {\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@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-search-field-view-horizontal-spacing: calc(var(--ck-icon-size) + var(--ck-spacing-medium));\n}\n\n.ck.ck-search {\n\t& > .ck-labeled-field-view {\n\t\t& .ck-input {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&.ck-search__query_with-icon {\n\t\t\t--ck-labeled-field-label-default-position-x: var(--ck-search-field-view-horizontal-spacing);\n\n\t\t\t& > .ck-labeled-field-view__input-wrapper > .ck-icon {\n\t\t\t\topacity: .5;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tpadding-left: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\t&:not(.ck-input-text_empty) {\n\t\t\t\t\t\tpadding-left: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-search__query_with-reset {\n\t\t\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-search-field-view-horizontal-spacing);\n\n\t\t\t&.ck-labeled-field-view_empty {\n\t\t\t\t--ck-labeled-field-empty-unfocused-max-width: 100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t& .ck-search__reset {\n\t\t\t\tmin-width: auto;\n\t\t\t\tmin-height: auto;\n\n\t\t\t\tbackground: none;\n\t\t\t\topacity: .5;\n\t\t\t\tpadding: 0;\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tright: var(--ck-spacing-medium);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tleft: var(--ck-spacing-medium);\n\t\t\t\t}\n\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\t&:not(.ck-input-text_empty) {\n\t\t\t\t\t\tpadding-right: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tpadding-right: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-search__results {\n\t\tmin-width: 100%;\n\n\t\t& > .ck-search__info {\n\t\t\twidth: 100%;\n\t\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\n\n\t\t\t& * {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\n\t\t\t& > span:first-child {\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\n\t\t\t& > span:last-child {\n\t\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const a=s},109:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:1}:root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{animation:rotate 1.5s linear infinite}.ck.ck-spinner,.ck.ck-spinner-container{height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}.ck.ck-spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent}@keyframes rotate{to{transform:rotate(1turn)}}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/spinner/spinner.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/spinner/spinner.css"],names:[],mappings:"AASA,yBACC,aAAc,CACd,iBACD,CAEA,eAGC,MAAO,CAEP,aAAc,CAJd,iBAAkB,CAGlB,OAAQ,CAFR,OAAQ,CAIR,0BAA2B,CAC3B,SACD,CCjBA,MACC,8BACD,CAEA,yBAGC,qCACD,CAEA,wCAJC,qCAAsC,CADtC,oCAWD,CANA,eAKC,qCAA6B,CAF7B,iBAAkB,CAElB,gCACD,CAEA,kBACC,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:root {\n\t--ck-toolbar-spinner-size: 18px;\n}\n\n.ck.ck-spinner-container {\n\tdisplay: block;\n\tposition: relative;\n}\n\n.ck.ck-spinner {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 0;\n\tright: 0;\n\tmargin: 0 auto;\n\ttransform: translateY(-50%);\n\tz-index: 1;\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-toolbar-spinner-size: 18px;\n}\n\n.ck.ck-spinner-container {\n\twidth: var(--ck-toolbar-spinner-size);\n\theight: var(--ck-toolbar-spinner-size);\n\tanimation: 1.5s infinite rotate linear;\n}\n\n.ck.ck-spinner {\n\twidth: var(--ck-toolbar-spinner-size);\n\theight: var(--ck-toolbar-spinner-size);\n\tborder-radius: 50%;\n\tborder: 2px solid var(--ck-color-text);\n\tborder-top-color: transparent;\n}\n\n@keyframes rotate {\n\tto {\n\t\ttransform: rotate(360deg)\n\t}\n}\n\n"],sourceRoot:""}]);const a=s},1671:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck-textarea{overflow-x:hidden}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/textarea/textarea.css"],names:[],mappings:"AASA,aACC,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/*\n * This fixes a problem in Firefox when the initial height of the complement does not match the number of rows.\n * This bug is especially visible when rows=1.\n */\n.ck-textarea {\n\toverflow-x: hidden\n}\n"],sourceRoot:""}]);const a=s},2710:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",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-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\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-block-toolbar-button: var(--ck-color-text);\n\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n\tcolor: var(--ck-color-block-toolbar-button);\n\tfont-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);const a=s},9677:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eDwGD,CA3GA,qECOE,qCDoGF,CA3GA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAuGD,CApGC,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAaD,CAVC,0DAQC,eAAgB,CAHhB,QAAS,CAHT,UAOD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAMA,wEACC,cACD,CAEA,iFACC,aAAc,CACd,UACD,CAGD,qBACC,YACD,CAtGD,qCAyGE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CASD,8RACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CASD,8RACC,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@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\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 * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: 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@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-toolbar-background);\n\tpadding: 0 var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\n\t& .ck.ck-toolbar__separator {\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tbackground: var(--ck-color-toolbar-border);\n\n\t\t/*\n\t\t * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\n\t\t */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\theight: 0;\n\t}\n\n\t& > .ck-toolbar__items {\n\t\t& > *:not(.ck-toolbar__line-break) {\n\t\t\t/* (#11) Separate toolbar items. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/* Don\'t display a separator after an empty items container, for instance,\n\t\twhen all items were grouped */\n\t\t&:empty + .ck.ck-toolbar__separator {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/* Make sure items wrapped to the next line have v-spacing */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t&.ck-toolbar_vertical {\n\t\t/* Items in a vertical toolbar span the entire width. */\n\t\tpadding: 0;\n\n\t\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n\t\t& > .ck-toolbar__items > .ck {\n\t\t\t/* Items in a vertical toolbar should span the horizontal space. */\n\t\t\twidth: 100%;\n\n\t\t\t/* Items in a vertical toolbar should have no margin. */\n\t\t\tmargin: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n\t\t\tborder-radius: 0;\n\t\t}\n\t}\n\n\t&.ck-toolbar_compact {\n\t\t/* No spacing around items. */\n\t\tpadding: 0;\n\n\t\t& > .ck-toolbar__items > * {\n\t\t\t/* Compact toolbar items have no spacing between them. */\n\t\t\tmargin: 0;\n\n\t\t\t/* "Middle" children should have no rounded corners. */\n\t\t\t&:not(:first-child):not(:last-child) {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/*\n\t\t * Dropdown button has asymmetric padding to fit the arrow.\n\t\t * This button has no arrow so let\'s revert that padding back to normal.\n\t\t */\n\t\t& > .ck.ck-button.ck-dropdown__button {\n\t\t\tpadding-left: var(--ck-spacing-tiny);\n\t\t}\n\t}\n\n\t/* A drop-down containing the nested toolbar with configured items. */\n\t& .ck-toolbar__nested-toolbar-dropdown {\n\t\t/* Prevent empty space in the panel when the dropdown label is visible and long but the toolbar has few items. */\n\t\t& > .ck-dropdown__panel {\n\t\t\tmin-width: auto;\n\t\t}\n\n\t\t& > .ck-button > .ck-button__label {\n\t\t\tmax-width: 7em;\n\t\t\twidth: auto;\n\t\t}\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t@nest .ck-toolbar-container & {\n\t\tborder: 0;\n\t}\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n\t& > .ck-toolbar__items > .ck {\n\t\tmargin-right: 0;\n\t}\n\n\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n\t\t/* (#11) Separate toolbar items. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-left: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n}\n\n/* stylelint-enable */\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:""}]);const a=s},9205:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);z-index:calc(var(--ck-z-dialog) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;max-width:200px;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAKA,gCCGC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,6BAA8B,CAC9B,8DAA+D,CAE/D,kCAAmC,CDTnC,sCACD,CCUC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAEA,wEAEC,oBAAqB,CAErB,eAAgB,CADhB,wCAAyC,CAFzC,wBAID,CArBD,gCAwBC,eAMD,CAHC,uCACC,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-balloon-panel.ck-tooltip {\n\tz-index: calc( var(--ck-z-dialog) + 100 );\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-balloon-panel.ck-tooltip {\n\t--ck-balloon-border-width: 0px;\n\t--ck-balloon-arrow-offset: 0px;\n\t--ck-balloon-arrow-half-width: 4px;\n\t--ck-balloon-arrow-height: 4px;\n\t--ck-tooltip-text-padding: 4px;\n\t--ck-color-panel-background: var(--ck-color-tooltip-background);\n\n\tpadding: 0 var(--ck-spacing-medium);\n\n\t& .ck-tooltip__text {\n\t\tfont-size: .9em;\n\t\tline-height: 1.5;\n\t\tcolor: var(--ck-color-tooltip-text);\n\t}\n\n\t&.ck-tooltip_multi-line .ck-tooltip__text {\n\t\twhite-space: break-spaces;\n\t\tdisplay: inline-block;\n\t\tpadding: var(--ck-tooltip-text-padding) 0;\n\t\tmax-width: 200px;\n\t}\n\n\t/* Reset balloon panel styles */\n\tbox-shadow: none;\n\n\t/* Hide the default shadow of the .ck-balloon-panel tip */\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n'],sourceRoot:""}]);const a=s},7676:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-dialog-background:var(--ck-custom-background);--ck-color-dialog-form-header-border:var(--ck-custom-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/globals/_hidden.css","webpack://./../ckeditor5-ui/theme/globals/_reset.css","webpack://./../ckeditor5-ui/theme/globals/_zindex.css","webpack://./../ckeditor5-ui/theme/globals/_transition.css","webpack://./../ckeditor5-ui/theme/globals/_poweredby.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CAA+C,CAC/C,kBACD,CCDA,oDAEC,yBACD,CCNA,MACC,gCAAiC,CACjC,oCAAqC,CACrC,sCAAuC,CACvC,kCAA2C,CAC3C,qDAAsD,CACtD,+BAA4C,CAC5C,yDACD,CAEA,2CACC,qDAAsD,CAGtD,0CAA2C,CAD3C,eAAgB,CAEhB,gBAAiB,CACjB,mCAiDD,CA/CC,6DACC,4CAoCD,CAlCC,+DAGC,kBAAmB,CAFnB,cAAe,CACf,YAAa,CAGb,qBAAsB,CACtB,4CAA6C,CAF7C,WAAY,CAGZ,qFACD,CAEA,mFASC,qCAAsC,CAFtC,cAAe,CANf,eAAgB,CAIhB,eAAiB,CAHjB,oBAAqB,CAMrB,kBAAmB,CAFnB,gBAAiB,CAHjB,gBAAiB,CACjB,wBAOD,CAEA,sEAEC,cAAe,CADf,aAED,CAGC,qEACC,mBAAqB,CACrB,SACD,CAIF,mEACC,wBACD,CAEA,mEACC,2BAA4B,CAC5B,8CACD,CChED,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAkD,CAClD,8BAAuD,CACvD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAsD,CACtD,oCAA4D,CAC5D,6BAAkD,CAIlD,mDAA4D,CAC5D,qEAA+E,CAC/E,qCAA4D,CAC5D,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAAiE,CACjE,mDAAkE,CAClE,yDAA8D,CAE9D,uCAA6D,CAC7D,6CAAoE,CACpE,8CAAoE,CACpE,gDAAiE,CACjE,kCAAyD,CAGzD,+DAAsE,CACtE,iDAAsE,CACtE,kDAAsE,CACtE,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA8D,CAC9D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAuE,CACvE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,wDAAiE,CACjE,4DAAmE,CAInE,2DAAoE,CACpE,mDAA6D,CAC7D,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,4DAAoE,CACpE,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,oEAA2E,CAC3E,0EAA+E,CAC/E,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CAIhE,oCAAyD,CAIzD,yBAAgD,CChHhD,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJgHD,CI1GA,2EAaC,oBAAqB,CANrB,sBAAuB,CADvB,QAAS,CAFT,QAAS,CACT,SAAU,CAGV,oBAAqB,CAErB,eAAgB,CADhB,qBAKD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCnFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",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 * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\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-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\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-z-default: 1;\n\t--ck-z-panel: calc( var(--ck-z-default) + 999 );\n\t--ck-z-dialog: 9999;\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 class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\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-powered-by-line-height: 10px;\n\t--ck-powered-by-padding-vertical: 2px;\n\t--ck-powered-by-padding-horizontal: 4px;\n\t--ck-powered-by-text-color: hsl(0, 0%, 31%);\n\t--ck-powered-by-border-radius: var(--ck-border-radius);\n\t--ck-powered-by-background: hsl(0, 0%, 100%);\n\t--ck-powered-by-border-color: var(--ck-color-focus-border);\n}\n\n.ck.ck-balloon-panel.ck-powered-by-balloon {\n\t--ck-border-radius: var(--ck-powered-by-border-radius);\n\n\tbox-shadow: none;\n\tbackground: var(--ck-powered-by-background);\n\tmin-height: unset;\n\tz-index: calc( var(--ck-z-panel) - 1 );\n\n\t& .ck.ck-powered-by {\n\t\tline-height: var(--ck-powered-by-line-height);\n\n\t\t& a {\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\topacity: .66;\n\t\t\tfilter: grayscale(80%);\n\t\t\tline-height: var(--ck-powered-by-line-height);\n\t\t\tpadding: var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal);\n\t\t}\n\n\t\t& .ck-powered-by__label {\n\t\t\tfont-size: 7.5px;\n\t\t\tletter-spacing: -.2px;\n\t\t\tpadding-left: 2px;\n\t\t\ttext-transform: uppercase;\n\t\t\tfont-weight: bold;\n\t\t\tmargin-right: 4px;\n\t\t\tcursor: pointer;\n\t\t\tline-height: normal;\n\t\t\tcolor: var(--ck-powered-by-text-color);\n\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\tdisplay: block;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&:hover {\n\t\t\t& a {\n\t\t\t\tfilter: grayscale(0%);\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[class*="position_inside"] {\n\t\tborder-color: transparent;\n\t}\n\n\t&[class*="position_border"] {\n\t\tborder: var(--ck-focus-ring);\n\t\tborder-color: var(--ck-powered-by-border-color);\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--ck-color-base-foreground: \t\t\t\t\t\t\t\thsl(0, 0%, 98%);\n\t--ck-color-base-background: \t\t\t\t\t\t\t\thsl(0, 0%, 100%);\n\t--ck-color-base-border: \t\t\t\t\t\t\t\t\thsl(220, 6%, 81%);\n\t--ck-color-base-action: \t\t\t\t\t\t\t\t\thsl(104, 50.2%, 42.5%);\n\t--ck-color-base-focus: \t\t\t\t\t\t\t\t\t\thsl(209, 92%, 70%);\n\t--ck-color-base-text: \t\t\t\t\t\t\t\t\t\thsl(0, 0%, 20%);\n\t--ck-color-base-active: \t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\t--ck-color-base-active-focus:\t\t\t\t\t\t\t\thsl(218.2, 100%, 52.5%);\n\t--ck-color-base-error:\t\t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------ */\n\n\t--ck-color-focus-border-coordinates: \t\t\t\t\t\t218, 81.8%, 56.9%;\n\t--ck-color-focus-border: \t\t\t\t\t\t\t\t\thsl(var(--ck-color-focus-border-coordinates));\n\t--ck-color-focus-outer-shadow:\t\t\t\t\t\t\t\thsl(212.4, 89.3%, 89%);\n\t--ck-color-focus-disabled-shadow:\t\t\t\t\t\t\thsla(209, 90%, 72%,.3);\n\t--ck-color-focus-error-shadow:\t\t\t\t\t\t\t\thsla(9,100%,56%,.3);\n\t--ck-color-text: \t\t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-shadow-drop: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.15);\n\t--ck-color-shadow-drop-active:\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.2);\n\t--ck-color-shadow-inner: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Buttons ------------------------------------------------------------------------------- */\n\n\t--ck-color-button-default-background: \t\t\t\t\t\ttransparent;\n\t--ck-color-button-default-hover-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-active-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-disabled-background: \t\t\t\ttransparent;\n\n\t--ck-color-button-on-background: \t\t\t\t\t\t\thsl(212, 100%, 97.1%);\n\t--ck-color-button-on-hover-background: \t\t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-active-background: \t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-disabled-background: \t\t\t\t\thsl(211, 15%, 95%);\n\t--ck-color-button-on-color:\t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\n\n\t--ck-color-button-action-background: \t\t\t\t\t\tvar(--ck-color-base-action);\n\t--ck-color-button-action-hover-background: \t\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-active-background: \t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-disabled-background: \t\t\t\thsl(104, 44%, 58%);\n\t--ck-color-button-action-text: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t--ck-color-button-save: \t\t\t\t\t\t\t\t\thsl(120, 100%, 27%);\n\t--ck-color-button-cancel: \t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t--ck-color-switch-button-off-background:\t\t\t\t\thsl(0, 0%, 57.6%);\n\t--ck-color-switch-button-off-hover-background:\t\t\t\thsl(0, 0%, 49%);\n\t--ck-color-switch-button-on-background:\t\t\t\t\t\tvar(--ck-color-button-action-background);\n\t--ck-color-switch-button-on-hover-background:\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-switch-button-inner-background:\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-switch-button-inner-shadow:\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Dropdown ------------------------------------------------------------------------------ */\n\n\t--ck-color-dropdown-panel-background: \t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-dropdown-panel-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Dialog -------------------------------------------------------------------------------- */\n\n\t--ck-color-dialog-background: \t\t\t\t\t\t\t\tvar(--ck-custom-background);\n\t--ck-color-dialog-form-header-border: \t\t\t\t\t\tvar(--ck-custom-border);\n\n\t/* -- Input --------------------------------------------------------------------------------- */\n\n\t--ck-color-input-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-input-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-error-border:\t\t\t\t\t\t\t\tvar(--ck-color-base-error);\n\t--ck-color-input-text: \t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-input-disabled-background: \t\t\t\t\t\thsl(0, 0%, 95%);\n\t--ck-color-input-disabled-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-disabled-text: \t\t\t\t\t\t\thsl(0, 0%, 46%);\n\n\t/* -- List ---------------------------------------------------------------------------------- */\n\n\t--ck-color-list-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-list-button-hover-background: \t\t\t\t\tvar(--ck-color-button-default-hover-background);\n\t--ck-color-list-button-on-background: \t\t\t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-background-focus: \t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-text:\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Panel --------------------------------------------------------------------------------- */\n\n\t--ck-color-panel-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-panel-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Toolbar ------------------------------------------------------------------------------- */\n\n\t--ck-color-toolbar-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-toolbar-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Tooltip ------------------------------------------------------------------------------- */\n\n\t--ck-color-tooltip-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-tooltip-text: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Engine -------------------------------------------------------------------------------- */\n\n\t--ck-color-engine-placeholder-text: \t\t\t\t\t\thsl(0, 0%, 44%);\n\n\t/* -- Upload -------------------------------------------------------------------------------- */\n\n\t--ck-color-upload-bar-background:\t\t \t\t\t\t\thsl(209, 92%, 70%);\n\n\t/* -- Link -------------------------------------------------------------------------------- */\n\n\t--ck-color-link-default:\t\t\t\t\t\t\t\t\thsl(240, 100%, 47%);\n\t--ck-color-link-selected-background:\t\t\t\t\t\thsla(201, 100%, 56%, 0.1);\n\t--ck-color-link-fake-selection:\t\t\t\t\t\t\t\thsla(201, 100%, 56%, 0.3);\n\n\t/* -- Search result highlight ---------------------------------------------------------------- */\n\n\t--ck-color-highlight-background:\t\t\t\t\t\t\thsl(60, 100%, 50%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------- */\n\n\t--ck-color-light-red:\t\t\t\t\t\t\t\t\t\thsl(0, 100%, 90%);\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/**\n\t * An opacity value of disabled UI item.\n\t */\n\t--ck-disabled-opacity: .5;\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/**\n\t * The geometry of the of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n\t/**\n\t * A visual style of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when disabled).\n\t */\n\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when has errors).\n\t */\n\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n\t/**\n\t * A visual style of focused element's border or outline.\n\t */\n\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\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-font-size-base: 13px;\n\t--ck-line-height-base: 1.84615;\n\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n\t--ck-font-size-tiny: 0.7em;\n\t--ck-font-size-small: 0.75em;\n\t--ck-font-size-normal: 1em;\n\t--ck-font-size-big: 1.4em;\n\t--ck-font-size-large: 1.8em;\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/* This is super-important. This is **manually** adjusted so a button without an icon\n\tis never smaller than a button with icon, additionally making sure that text-less buttons\n\tare perfect squares. The value is also shared by other components which should stay "in-line"\n\twith buttons. */\n\t--ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* Do not include inheritable rules here. */\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: transparent;\n\ttext-decoration: none;\n\tvertical-align: middle;\n\ttransition: none;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n\tword-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* These are rule inherited by all children elements. */\n\tborder-collapse: collapse;\n\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n\tcolor: var(--ck-color-text);\n\ttext-align: left;\n\twhite-space: nowrap;\n\tcursor: auto;\n\tfloat: none;\n}\n\n.ck-reset_all {\n\t& .ck-rtl *:not(.ck-reset_all-excluded *) {\n\t\ttext-align: right;\n\t}\n\n\t& iframe:not(.ck-reset_all-excluded *) {\n\t\t/* For IE */\n\t\tvertical-align: inherit;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *) {\n\t\twhite-space: pre-wrap;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *),\n\t& input[type="text"]:not(.ck-reset_all-excluded *),\n\t& input[type="password"]:not(.ck-reset_all-excluded *) {\n\t\tcursor: text;\n\t}\n\n\t& textarea[disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="text"][disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="password"][disabled]:not(.ck-reset_all-excluded *) {\n\t\tcursor: default;\n\t}\n\n\t& fieldset:not(.ck-reset_all-excluded *) {\n\t\tpadding: 10px;\n\t\tborder: 2px groove hsl(255, 7%, 88%);\n\t}\n\n\t& button:not(.ck-reset_all-excluded *)::-moz-focus-inner {\n\t\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n\t\tpadding: 0;\n\t\tborder: 0\n\t}\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n\ttext-align: right;\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 * Default border-radius value.\n */\n:root{\n\t--ck-border-radius: 2px;\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/**\n\t * A visual style of element's inner shadow (i.e. input).\n\t */\n\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n\t/**\n\t * A visual style of element's drop shadow (i.e. panel).\n\t */\n\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n\t/**\n\t * A visual style of element's active shadow (i.e. comment or suggestion).\n\t */\n\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\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-spacing-unit: \t\t\t\t\t\t0.6em;\n\t--ck-spacing-large: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 1.5);\n\t--ck-spacing-standard: \t\t\t\t\tvar(--ck-spacing-unit);\n\t--ck-spacing-medium: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.8);\n\t--ck-spacing-small: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.5);\n\t--ck-spacing-tiny: \t\t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.3);\n\t--ck-spacing-extra-tiny: \t\t\t\tcalc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);const a=s},695:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widget.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAsD,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGAKC,iEAAkE,CCnCnE,2BAA2B,CCF3B,qCAA8B,CDC9B,YDqCA,CAIA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAgCD,CAnBC,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAWD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",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-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\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/_focus.css";\n@import "../mixins/_shadow.css";\n\n:root {\n\t--ck-widget-outline-thickness: 3px;\n\t--ck-widget-handler-icon-size: 16px;\n\t--ck-widget-handler-animation-duration: 200ms;\n\t--ck-widget-handler-animation-curve: ease;\n\n\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\n\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n\toutline-width: var(--ck-widget-outline-thickness);\n\toutline-style: solid;\n\toutline-color: transparent;\n\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n\t}\n\n\t&:hover {\n\t\toutline-color: var(--ck-color-widget-hover-border);\n\t}\n}\n\n.ck .ck-editor__nested-editable {\n\tborder: 1px solid transparent;\n\n\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n\t&.ck-editor__nested-editable_focused,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\n\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\n\t}\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t& .ck-widget__selection-handle {\n\t\tpadding: 4px;\n\t\tbox-sizing: border-box;\n\n\t\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n\t\tbackground-color: transparent;\n\t\topacity: 0;\n\n\t\t/* Transition:\n\t\t * background-color for the .ck-widget_selected state change,\n\t\t * visibility for hiding the handler,\n\t\t * opacity for the proper look of the icon when the handler disappears. */\n\t\ttransition:\n\t\t\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t/* Make only top corners round. */\n\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n\t\t/* Place the drag handler outside the widget wrapper. */\n\t\ttransform: translateY(-100%);\n\t\tleft: calc(0px - var(--ck-widget-outline-thickness));\n\t\ttop: 0;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n\t\t\twidth: var(--ck-widget-handler-icon-size);\n\t\t\theight: var(--ck-widget-handler-icon-size);\n\t\t\tcolor: var(--ck-color-widget-drag-handler-icon-color);\n\n\t\t\t/* The "selected" part of the icon is invisible by default */\n\t\t\t& .ck-icon__selected-indicator {\n\t\t\t\topacity: 0;\n\n\t\t\t\t/* Note: The animation is longer on purpose. Simply feels better. */\n\t\t\t\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\n\t\t\t}\n\t\t}\n\n\t\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n\t\t&:hover .ck-icon .ck-icon__selected-indicator {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\topacity: 1;\n\t\tbackground-color: var(--ck-color-widget-hover-border);\n\t}\n\n\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\t& > .ck-widget__selection-handle {\n\t\t\topacity: 1;\n\t\t\tbackground-color: var(--ck-color-focus-border);\n\n\t\t\t/* When the widget is selected, notify the user using the proper look of the icon. */\n\t\t\t& .ck-icon .ck-icon__selected-indicator {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n\tleft: auto;\n\tright: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\n\ttransition: none;\n\n\t&:not(.ck-widget_selected) {\n\t\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\n\t\t *\n\t\t * Leave the unit because this custom property is used in calc() by other features.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\n\t\t */\n\t\t--ck-widget-outline-thickness: 0px;\n\t}\n\n\t&.ck-widget_with-selection-handle {\n\t\t& .ck-widget__selection-handle,\n\t\t& .ck-widget__selection-handle:hover {\n\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t}\n\t}\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline-color: var(--ck-color-widget-blurred-border);\n\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t& > .ck-widget__selection-handle,\n\t\t\t& > .ck-widget__selection-handle:hover {\n\t\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n\tIn fact, anything with overflow: hidden.\n\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\n\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\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:""}]);const a=s},4095:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgetresize.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",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-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\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-resizer-size: 10px;\n\n\t/* Set the resizer with a 50% offset. */\n\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n\t--ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n\toutline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n\twidth: var(--ck-resizer-size);\n\theight: var(--ck-resizer-size);\n\tbackground: var(--ck-color-focus-border);\n\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n\tborder-radius: var(--ck-resizer-border-radius);\n\n\t&.ck-widget__resizer__handle-top-left {\n\t\ttop: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-top-right {\n\t\ttop: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n}\n"],sourceRoot:""}]);const a=s},8508:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(9372),i=n.n(o),r=n(935),s=n.n(r)()(i());s.push([t.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgettypearound.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAkDD,CA1CC,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAoBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAlJD,SAAU,CACV,mBAmJC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,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-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: 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-widget-type-around-button-size: 20px;\n\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\n\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\n\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n\topacity: 0;\n\tpointer-events: none;\n}\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\twidth: var(--ck-widget-type-around-button-size);\n\t\theight: var(--ck-widget-type-around-button-size);\n\t\tbackground: var(--ck-color-widget-type-around-button);\n\t\tborder-radius: 100px;\n\t\ttransition: opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t@mixin ck-widget-type-around-button-hidden;\n\n\t\t& svg {\n\t\t\twidth: 10px;\n\t\t\theight: 8px;\n\t\t\ttransform: translate(-50%,-50%);\n\t\t\ttransition: transform .5s ease;\n\t\t\tmargin-top: 1px;\n\n\t\t\t& * {\n\t\t\t\tstroke-dasharray: 10;\n\t\t\t\tstroke-dashoffset: 0;\n\n\t\t\t\tfill: none;\n\t\t\t\tstroke: var(--ck-color-widget-type-around-button-icon);\n\t\t\t\tstroke-width: 1.5px;\n\t\t\t\tstroke-linecap: round;\n\t\t\t\tstroke-linejoin: round;\n\t\t\t}\n\n\t\t\t& line {\n\t\t\t\tstroke-dasharray: 7;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t/*\n\t\t\t * Display the "sonar" around the button when hovered.\n\t\t\t */\n\t\t\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n\t\t\t/*\n\t\t\t * Animate active button\'s icon.\n\t\t\t */\n\t\t\t& svg {\n\t\t\t\t& polyline {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-dash 2s linear;\n\t\t\t\t}\n\n\t\t\t\t& line {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Show type around buttons when the widget gets selected or being hovered.\n\t */\n\t&.ck-widget_selected,\n\t&:hover {\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-visible;\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n\t * and still can be hovered).\n\t */\n\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\tbackground: var(--ck-color-widget-type-around-button-hover);\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\tbackground: var(--ck-color-widget-type-around-button-active);\n\n\t\t&::after {\n\t\t\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\tborder-radius: 100px;\n\t\t\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the "before" button when the widget has a selection handle. Because some space\n\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n\t */\n\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n\t\tmargin-left: 20px;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& .ck-widget__type-around__fake-caret {\n\t\tpointer-events: none;\n\t\theight: 1px;\n\t\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n\t\t/*\n\t\t * The semi-transparent-outline+background combo improves the contrast\n\t\t * when the background underneath the fake caret is dark.\n\t\t */\n\t\toutline: solid 1px hsla(0, 0%, 100%, .5);\n\t\tbackground: var(--ck-color-base-text);\n\t}\n\n\t/*\n\t * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t * Despite the widget being physically selected in the model, its outline should disappear.\n\t */\n\t&.ck-widget_selected {\n\t\t&.ck-widget_type-around_show-fake-caret_before,\n\t\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t\toutline-color: transparent;\n\t\t}\n\t}\n\n\t&.ck-widget_type-around_show-fake-caret_before,\n\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t/*\n\t\t * When the "fake caret" is visible we simulate that the widget is not selected\n\t\t * (despite being physically selected), so the outline color should be for the\n\t\t * unselected widget.\n\t\t */\n\t\t&.ck-widget_selected:hover {\n\t\t\toutline-color: var(--ck-color-widget-hover-border);\n\t\t}\n\n\t\t/*\n\t\t * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\n\t\t */\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n\t\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\n\t\t */\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t&.ck-widget_selected,\n\t\t\t&.ck-widget_selected:hover {\n\t\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\t\topacity: 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n\t\t * hide the resize UI because it creates too much noise. It can be visible when the user\n\t\t * hovers the widget, though.\n\t\t */\n\t\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n\t\t\topacity: 0\n\t\t}\n\t}\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n\tmargin-left: 0;\n\tmargin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n\t& .ck-widget {\n\t\t&.ck-widget_selected,\n\t\t&:hover {\n\t\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\n\n\t& svg * {\n\t\tstroke: hsl(0,0%,60%);\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n\t0% {\n\t\tstroke-dashoffset: 10;\n\t}\n\t20%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n\t0%, 20% {\n\t\tstroke-dashoffset: 7;\n\t}\n\t40%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n\t0% {\n\t\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n\t50% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n\t}\n\t100% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t49% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t99% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n'],sourceRoot:""}]);const a=s},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var o,i,r=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n{"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var o={};return(()=>{"use strict";n.d(o,{default:()=>pS});const t=function(){try{return navigator.userAgent.toLowerCase()}catch(t){return""}}();var e;const i={isMac:r(t),isWindows:(e=t,e.indexOf("windows")>-1),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(t),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(t),isiOS:function(t){return!!t.match(/iphone|ipad/i)||r(t)&&navigator.maxTouchPoints>0}(t),isAndroid:function(t){return t.indexOf("android")>-1}(t),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(t),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}};function r(t){return t.indexOf("macintosh")>-1}function s(t,e,n,o){n=n||function(t,e){return t===e};const i=Array.isArray(t)?t:Array.prototype.slice.call(t),r=Array.isArray(e)?e:Array.prototype.slice.call(e),s=function(t,e,n){const o=a(t,e,n);if(-1===o)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=c(t,o),r=c(e,o),s=a(i,r,n),l=t.length-s,d=e.length-s;return{firstIndex:o,lastIndexOld:l,lastIndexNew:d}}(i,r,n),l=o?function(t,e){const{firstIndex:n,lastIndexOld:o,lastIndexNew:i}=t;if(-1===n)return Array(e).fill("equal");let r=[];n>0&&(r=r.concat(Array(n).fill("equal")));i-n>0&&(r=r.concat(Array(i-n).fill("insert")));o-n>0&&(r=r.concat(Array(o-n).fill("delete")));i0&&n.push({index:o,type:"insert",values:t.slice(o,r)});i-o>0&&n.push({index:o+(r-o),type:"delete",howMany:i-o});return n}(r,s);return l}function a(t,e,n){for(let o=0;o200||i>200||o+i>300)return l.fastDiff(t,e,n,!0);let r,s;if(il?-1:1;u[o+d]&&(u[o]=u[o+d].slice(0)),u[o]||(u[o]=[]),u[o].push(i>l?r:s);let g=Math.max(i,l),m=g-o;for(;md;m--)h[m]=g(m);h[d]=g(d),p++}while(h[d]!==c);return u[d].slice(1)}l.fastDiff=s;const d=function(){return function t(){t.called=!0}};class u{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=d(),this.off=d()}}const h=new Array(256).fill("").map(((t,e)=>("0"+e.toString(16)).slice(-2)));function g(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+h[255&t]+h[t>>8&255]+h[t>>16&255]+h[t>>24&255]+h[255&e]+h[e>>8&255]+h[e>>16&255]+h[e>>24&255]+h[255&n]+h[n>>8&255]+h[n>>16&255]+h[n>>24&255]+h[255&o]+h[o>>8&255]+h[o>>16&255]+h[o>>24&255]}const m={get(t="normal"){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function p(t,e){const n=m.get(e.priority);for(let o=0;o{if("object"==typeof e&&null!==e){if(n.has(e))return`[object ${e.constructor.name}]`;n.add(e)}return e},i=e?` ${JSON.stringify(e,o)}`:"",r=A(t);return t+i+r}(t,n)),this.name="CKEditorError",this.context=e,this.data=n}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const n=new k(t.message,e);throw n.stack=t.stack,n}}function b(t,e){console.warn(..._(t,e))}function w(t,e){console.error(..._(t,e))}function A(t){return`\nRead more: ${f}#error-${t}`}function _(t,e){const n=A(t);return e?[t,e,n]:[t,n]}const C="41.3.1",v=new Date(2024,3,16);if(globalThis.CKEDITOR_VERSION)throw new k("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=C;const y=Symbol("listeningTo"),x=Symbol("emitterId"),E=Symbol("delegations"),D=I(Object);function I(t){if(!t)return D;return class extends t{on(t,e,n){this.listenTo(this,t,e,n)}once(t,e,n){let o=!1;this.listenTo(this,t,((t,...n)=>{o||(o=!0,t.off(),e.call(this,t,...n))}),n)}off(t,e){this.stopListening(this,t,e)}listenTo(t,e,n,o={}){let i,r;this[y]||(this[y]={});const s=this[y];S(t)||M(t);const a=S(t);(i=s[a])||(i=s[a]={emitter:t,callbacks:{}}),(r=i.callbacks[e])||(r=i.callbacks[e]=[]),r.push(n),function(t,e,n,o,i){e._addEventListener?e._addEventListener(n,o,i):t._addEventListener.call(e,n,o,i)}(this,t,e,n,o)}stopListening(t,e,n){const o=this[y];let i=t&&S(t);const r=o&&i?o[i]:void 0,s=r&&e?r.callbacks[e]:void 0;if(!(!o||t&&!r||e&&!s))if(n){O(this,t,e,n);-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[e]:O(this,t,e,n))}else if(s){for(;n=s.pop();)O(this,t,e,n);delete r.callbacks[e]}else if(r){for(e in r.callbacks)this.stopListening(t,e);delete o[i]}else{for(i in o)this.stopListening(o[i].emitter);delete this[y]}}fire(t,...e){try{const n=t instanceof u?t:new u(this,t),o=n.name;let i=N(this,o);if(n.path.push(this),i){const t=[n,...e];i=Array.from(i);for(let e=0;e{this[E]||(this[E]=new Map),t.forEach((t=>{const o=this[E].get(t);o?o.set(e,n):this[E].set(t,new Map([[e,n]]))}))}}}stopDelegating(t,e){if(this[E])if(t)if(e){const n=this[E].get(t);n&&n.delete(e)}else this[E].delete(t);else this[E].clear()}_addEventListener(t,e,n){!function(t,e){const n=T(t);if(n[e])return;let o=e,i=null;const r=[];for(;""!==o&&!n[o];)n[o]={callbacks:[],childEvents:[]},r.push(n[o]),i&&n[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(":"));if(""!==o){for(const t of r)t.callbacks=n[o].callbacks.slice();n[o].childEvents.push(i)}}(this,t);const o=B(this,t),i={callback:e,priority:m.get(n.priority)};for(const t of o)p(t,i)}_removeEventListener(t,e){const n=B(this,t);for(const t of n)for(let n=0;n-1?N(t,e.substr(0,e.lastIndexOf(":"))):null}function P(t,e,n){for(let[o,i]of t){i?"function"==typeof i&&(i=i(e.name)):i=e.name;const t=new u(e.source,i);t.path=[...e.path],o.fire(t,...n)}}function O(t,e,n,o){e._removeEventListener?e._removeEventListener(n,o):t._removeEventListener.call(e,n,o)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{I[t]=D.prototype[t]}));const L=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},z=Symbol("observableProperties"),R=Symbol("boundObservables"),j=Symbol("boundProperties"),F=Symbol("decoratedMethods"),V=Symbol("decoratedOriginal"),H=U(I());function U(t){if(!t)return H;return class extends t{set(t,e){if(L(t))return void Object.keys(t).forEach((e=>{this.set(e,t[e])}),this);q(this);const n=this[z];if(t in this&&!n.has(t))throw new k("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const o=n.get(t);let i=this.fire(`set:${t}`,t,e,o);void 0===i&&(i=e),o===i&&n.has(t)||(n.set(t,i),this.fire(`change:${t}`,t,i,o))}}),this[t]=e}bind(...t){if(!t.length||!K(t))throw new k("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new k("observable-bind-duplicate-properties",this);q(this);const e=this[j];t.forEach((t=>{if(e.has(t))throw new k("observable-bind-rebind",this)}));const n=new Map;return t.forEach((t=>{const o={property:t,to:[]};e.set(t,o),n.set(t,o)})),{to:G,toMany:W,_observable:this,_bindProperties:t,_to:[],_bindings:n}}unbind(...t){if(!this[z])return;const e=this[j],n=this[R];if(t.length){if(!K(t))throw new k("observable-unbind-wrong-properties",this);t.forEach((t=>{const o=e.get(t);o&&(o.to.forEach((([t,e])=>{const i=n.get(t),r=i[e];r.delete(o),r.size||delete i[e],Object.keys(i).length||(n.delete(t),this.stopListening(t,"change"))})),e.delete(t))}))}else n.forEach(((t,e)=>{this.stopListening(e,"change")})),n.clear(),e.clear()}decorate(t){q(this);const e=this[t];if(!e)throw new k("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,((t,n)=>{t.return=e.apply(this,n)})),this[t]=function(...e){return this.fire(t,e)},this[t][V]=e,this[F]||(this[F]=[]),this[F].push(t)}stopListening(t,e,n){if(!t&&this[F]){for(const t of this[F])this[t]=this[t][V];delete this[F]}super.stopListening(t,e,n)}}}function q(t){t[z]||(Object.defineProperty(t,z,{value:new Map}),Object.defineProperty(t,R,{value:new Map}),Object.defineProperty(t,j,{value:new Map}))}function G(...t){const e=function(...t){if(!t.length)throw new k("observable-bind-to-parse-error",null);const e={to:[]};let n;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach((t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new k("observable-bind-to-parse-error",null);n={observable:t,properties:[]},e.to.push(n)}})),e}(...t),n=Array.from(this._bindings.keys()),o=n.length;if(!e.callback&&e.to.length>1)throw new k("observable-bind-to-no-callback",this);if(o>1&&e.callback)throw new k("observable-bind-to-extra-callback",this);var i;e.to.forEach((t=>{if(t.properties.length&&t.properties.length!==o)throw new k("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)})),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),i=this._observable,this._to.forEach((t=>{const e=i[R];let n;e.get(t.observable)||i.listenTo(t.observable,"change",((o,r)=>{n=e.get(t.observable)[r],n&&n.forEach((t=>{$(i,t.property)}))}))})),function(t){let e;t._bindings.forEach(((n,o)=>{t._to.forEach((i=>{e=i.properties[n.callback?0:t._bindProperties.indexOf(o)],n.to.push([i.observable,e]),function(t,e,n,o){const i=t[R],r=i.get(n),s=r||{};s[o]||(s[o]=new Set);s[o].add(e),r||i.set(n,s)}(t._observable,n,i.observable,e)}))}))}(this),this._bindProperties.forEach((t=>{$(this._observable,t)}))}function W(t,e,n){if(this._bindings.size>1)throw new k("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const n=t.map((t=>[t,e]));return Array.prototype.concat.apply([],n)}(t,e),n)}function K(t){return t.every((t=>"string"==typeof t))}function $(t,e){const n=t[j].get(e);let o;n.callback?o=n.callback.apply(t,n.to.map((t=>t[0][t[1]]))):(o=n.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=o:t.set(e,o)}function Y(t){let e=0;for(const n of t)e++;return e}function Q(t,e){const n=Math.min(t.length,e.length);for(let o=0;o{U[t]=H.prototype[t]}));const J="object"==typeof global&&global&&global.Object===Object&&global;var X="object"==typeof self&&self&&self.Object===Object&&self;const tt=J||X||Function("return this")();const et=tt.Symbol;var nt=Object.prototype,ot=nt.hasOwnProperty,it=nt.toString,rt=et?et.toStringTag:void 0;const st=function(t){var e=ot.call(t,rt),n=t[rt];try{t[rt]=void 0;var o=!0}catch(t){}var i=it.call(t);return o&&(e?t[rt]=n:delete t[rt]),i};var at=Object.prototype.toString;const ct=function(t){return at.call(t)};var lt=et?et.toStringTag:void 0;const dt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":lt&< in Object(t)?st(t):ct(t)};const ut=Array.isArray;const ht=function(t){return null!=t&&"object"==typeof t};const gt=function(t){return"string"==typeof t||!ut(t)&&ht(t)&&"[object String]"==dt(t)};function mt(t,e,n={},o=[]){const i=n&&n.xmlns,r=i?t.createElementNS(i,e):t.createElement(e);for(const t in n)r.setAttribute(t,n[t]);!gt(o)&&Z(o)||(o=[o]);for(let e of o)gt(e)&&(e=t.createTextNode(e)),r.appendChild(e);return r}const pt=function(t,e){return function(n){return t(e(n))}};const ft=pt(Object.getPrototypeOf,Object);var kt=Function.prototype,bt=Object.prototype,wt=kt.toString,At=bt.hasOwnProperty,_t=wt.call(Object);const Ct=function(t){if(!ht(t)||"[object Object]"!=dt(t))return!1;var e=ft(t);if(null===e)return!0;var n=At.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&wt.call(n)==_t};const vt=function(){this.__data__=[],this.size=0};const yt=function(t,e){return t===e||t!=t&&e!=e};const xt=function(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1};var Et=Array.prototype.splice;const Dt=function(t){var e=this.__data__,n=xt(e,t);return!(n<0)&&(n==e.length-1?e.pop():Et.call(e,n,1),--this.size,!0)};const It=function(t){var e=this.__data__,n=xt(e,t);return n<0?void 0:e[n][1]};const Mt=function(t){return xt(this.__data__,t)>-1};const St=function(t,e){var n=this.__data__,o=xt(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Tt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991};var Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;const He=function(t){return ht(t)&&Fe(t.length)&&!!Ve[dt(t)]};const Ue=function(t){return function(e){return t(e)}};var qe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ge=qe&&"object"==typeof module&&module&&!module.nodeType&&module,We=Ge&&Ge.exports===qe&&J.process;const Ke=function(){try{var t=Ge&&Ge.require&&Ge.require("util").types;return t||We&&We.binding&&We.binding("util")}catch(t){}}();var $e=Ke&&Ke.isTypedArray;const Ye=$e?Ue($e):He;var Qe=Object.prototype.hasOwnProperty;const Ze=function(t,e){var n=ut(t),o=!n&&Be(t),i=!n&&!o&&ze(t),r=!n&&!o&&!i&&Ye(t),s=n||o||i||r,a=s?De(t.length,String):[],c=a.length;for(var l in t)!e&&!Qe.call(t,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||je(l,c))||a.push(l);return a};var Je=Object.prototype;const Xe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Je)};const tn=pt(Object.keys,Object);var en=Object.prototype.hasOwnProperty;const nn=function(t){if(!Xe(t))return tn(t);var e=[];for(var n in Object(t))en.call(t,n)&&"constructor"!=n&&e.push(n);return e};const on=function(t){return null!=t&&Fe(t.length)&&!zt(t)};const rn=function(t){return on(t)?Ze(t):nn(t)};const sn=function(t,e){return t&&Ee(e,rn(e),t)};const an=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var cn=Object.prototype.hasOwnProperty;const ln=function(t){if(!L(t))return an(t);var e=Xe(t),n=[];for(var o in t)("constructor"!=o||!e&&cn.call(t,o))&&n.push(o);return n};const dn=function(t){return on(t)?Ze(t,!0):ln(t)};const un=function(t,e){return t&&Ee(e,dn(e),t)};var hn="object"==typeof exports&&exports&&!exports.nodeType&&exports,gn=hn&&"object"==typeof module&&module&&!module.nodeType&&module,mn=gn&&gn.exports===hn?tt.Buffer:void 0,pn=mn?mn.allocUnsafe:void 0;const fn=function(t,e){if(e)return t.slice();var n=t.length,o=pn?pn(n):new t.constructor(n);return t.copy(o),o};const kn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n{this._setToTarget(t,o,e[o],n)}))}}function Co(t){return wo(t,vo)}function vo(t){return Ao(t)||"function"==typeof t?t:void 0}function yo(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}function xo(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}const Eo=Do(I());function Do(t){if(!t)return Eo;return class extends t{listenTo(t,e,n,o={}){if(yo(t)||xo(t)){const i={capture:!!o.useCapture,passive:!!o.usePassive},r=this._getProxyEmitter(t,i)||new Io(t,i);this.listenTo(r,e,n,o)}else super.listenTo(t,e,n,o)}stopListening(t,e,n){if(yo(t)||xo(t)){const o=this._getAllProxyEmitters(t);for(const t of o)this.stopListening(t,e,n)}else super.stopListening(t,e,n)}_getProxyEmitter(t,e){return function(t,e){const n=t[y];return n&&n[e]?n[e].emitter:null}(this,Mo(t,e))}_getAllProxyEmitters(t){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((e=>this._getProxyEmitter(t,e))).filter((t=>!!t))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{Do[t]=Eo.prototype[t]}));class Io extends(I()){constructor(t,e){super(),M(this,Mo(t,e)),this._domNode=t,this._options=e}attach(t){if(this._domListeners&&this._domListeners[t])return;const e=this._createDomListener(t);this._domNode.addEventListener(t,e,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=e}detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()}_addEventListener(t,e,n){this.attach(t),I().prototype._addEventListener.call(this,t,e,n)}_removeEventListener(t,e){I().prototype._removeEventListener.call(this,t,e),this.detach(t)}_createDomListener(t){const e=e=>{this.fire(t,e)};return e.removeListener=()=>{this._domNode.removeEventListener(t,e,this._options),delete this._domListeners[t]},e}}function Mo(t,e){let n=function(t){return t["data-ck-expando"]||(t["data-ck-expando"]=g())}(t);for(const t of Object.keys(e).sort())e[t]&&(n+="-"+t);return n}let So;try{So={window,document}}catch(t){So={window:{},document:{}}}const To=So;function Bo(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}function No(t){return"[object Text]"==Object.prototype.toString.call(t)}function Po(t){return"[object Range]"==Object.prototype.toString.apply(t)}function Oo(t){return t&&t.parentNode?t.offsetParent===To.document.body?null:t.offsetParent:null}const Lo=["top","right","bottom","left","width","height"];class zo{constructor(t){const e=Po(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Fo(t)||e)if(e){const e=zo.getDomRangeRects(t);Ro(this,zo.getBoundingRect(e))}else Ro(this,t.getBoundingClientRect());else if(xo(t)){const{innerWidth:e,innerHeight:n}=t;Ro(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else Ro(this,t)}clone(){return new zo(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};if(e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0)return null;{const t=new zo(e);return t._source=this._source,t}}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(jo(t))return e;let n,o=t,i=t.parentNode||t.commonAncestorContainer;for(;i&&!jo(i);){const t="visible"===((r=i)instanceof HTMLElement?r.ownerDocument.defaultView.getComputedStyle(r).overflow:"visible");o instanceof HTMLElement&&"absolute"===Vo(o)&&(n=o);const s=Vo(i);if(t||n&&("relative"===s&&t||"relative"!==s)){o=i,i=i.parentNode;continue}const a=new zo(i),c=e.getIntersection(a);if(!c)return null;c.getArea(){for(const e of t){const t=Ho._getElementCallbacks(e.target);if(t)for(const n of t)n(e)}}))}};let Uo=Ho;function qo(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}function Go(t){return e=>e+t}function Wo(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function Ko(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function $o(t){return t&&t.nodeType===Node.COMMENT_NODE}function Yo(t){return!!(t&&t.getClientRects&&t.getClientRects().length)}Uo._observerInstance=null,Uo._elementCallbacks=null;var Qo=Math.pow;function Zo({element:t,target:e,positions:n,limiter:o,fitInViewport:i,viewportOffsetConfig:r}){zt(e)&&(e=e()),zt(o)&&(o=o());const s=Oo(t),a=function(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new zo(To.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e}(r),c=new zo(t),l=Jo(e,a);let d;if(!l||!a.getIntersection(l))return null;const u={targetRect:l,elementRect:c,positionedElementAncestor:s,viewportRect:a};if(o||i){if(o){const t=Jo(o,a);t&&(u.limiterRect=t)}d=function(t,e){const{elementRect:n}=e,o=n.getArea(),i=t.map((t=>new Xo(t,e))).filter((t=>!!t.name));let r=0,s=null;for(const t of i){const{limiterIntersectionArea:e,viewportIntersectionArea:n}=t;if(e===o)return t;const i=Qo(n,2)+Qo(e,2);i>r&&(r=i,s=t)}return s}(n,u)}else d=new Xo(n[0],u);return d}function Jo(t,e){const n=new zo(t).getVisible();return n?n.getIntersection(e):null}class Xo{constructor(t,e){const n=t(e.targetRect,e.elementRect,e.viewportRect,e.limiterRect);if(!n)return;const{left:o,top:i,name:r,config:s}=n;this.name=r,this.config=s,this._positioningFunctionCoordinates={left:o,top:i},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;return t?t.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function ti(t){const e=t.parentNode;e&&e.removeChild(t)}function ei({window:t,rect:e,alignToTop:n,forceScroll:o,viewportOffset:i}){const r=e.clone().moveBy(0,i.bottom),s=e.clone().moveBy(0,-i.top),a=new zo(t).excludeScrollbarsAndBorders(),c=n&&o,l=[s,r].every((t=>a.contains(t)));let{scrollX:d,scrollY:u}=t;const h=d,g=u;c?u-=a.top-e.top+i.top:l||(ii(s,a)?u-=a.top-e.top+i.top:oi(r,a)&&(u+=n?e.top-a.top-i.top:e.bottom-a.bottom+i.bottom)),l||(ri(e,a)?d-=a.left-e.left+i.left:si(e,a)&&(d+=e.right-a.right+i.right)),d==h&&u===g||t.scrollTo(d,u)}function ni({parent:t,getRect:e,alignToTop:n,forceScroll:o,ancestorOffset:i=0,limiterElement:r}){const s=ai(t),a=n&&o;let c,l,d;const u=r||s.document.body;for(;t!=u;)l=e(),c=new zo(t).excludeScrollbarsAndBorders(),d=c.contains(l),a?t.scrollTop-=c.top-l.top+i:d||(ii(l,c)?t.scrollTop-=c.top-l.top+i:oi(l,c)&&(t.scrollTop+=n?l.top-c.top-i:l.bottom-c.bottom+i)),d||(ri(l,c)?t.scrollLeft-=c.left-l.left+i:si(l,c)&&(t.scrollLeft+=l.right-c.right+i)),t=t.parentNode}function oi(t,e){return t.bottom>e.bottom}function ii(t,e){return t.tope.right}function ai(t){return Po(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function ci(t){if(Po(t)){let e=t.commonAncestorContainer;return No(e)&&(e=e.parentNode),e}return t.parentNode}function li(t,e){const n=ai(t),o=new zo(t);if(n===e)return o;{let t=n;for(;t!=e;){const e=t.frameElement,n=new zo(e).excludeScrollbarsAndBorders();o.moveBy(n.left,n.top),t=t.parent}}return o}const di={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},ui={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},hi={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},gi=function(){const t={pageup:33,pagedown:34,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let e=65;e<=90;e++){t[String.fromCharCode(e).toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;return Object.assign(t,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),t}(),mi=Object.fromEntries(Object.entries(gi).map((([t,e])=>{let n;return n=e in hi?hi[e]:t.charAt(0).toUpperCase()+t.slice(1),[e,n]})));function pi(t){let e;if("string"==typeof t){if(e=gi[t.toLowerCase()],!e)throw new k("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?gi.alt:0)+(t.ctrlKey?gi.ctrl:0)+(t.shiftKey?gi.shift:0)+(t.metaKey?gi.cmd:0);return e}function fi(t){return"string"==typeof t&&(t=function(t){return t.split("+").map((t=>t.trim()))}(t)),t.map((t=>"string"==typeof t?function(t){if(t.endsWith("!"))return pi(t.slice(0,-1));const e=pi(t);return(i.isMac||i.isiOS)&&e==gi.ctrl?gi.cmd:e}(t):t)).reduce(((t,e)=>e+t),0)}function ki(t){let e=fi(t);return Object.entries(i.isMac||i.isiOS?di:ui).reduce(((t,[n,o])=>(e&gi[n]&&(e&=~gi[n],t+=o),t)),"")+(e?mi[e]:"")}function bi(t,e){const n="ltr"===e;switch(t){case gi.arrowleft:return n?"left":"right";case gi.arrowright:return n?"right":"left";case gi.arrowup:return"up";case gi.arrowdown:return"down"}}function wi(t){return Array.isArray(t)?t:[t]}const Ai=function(t,e,n){(void 0!==n&&!yt(t[e],n)||void 0===n&&!(e in t))&&ve(t,e,n)};const _i=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var c=s[t?a:++i];if(!1===n(r[c],c,r))break}return e}}();const Ci=function(t){return ht(t)&&on(t)};const vi=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};const yi=function(t){return Ee(t,dn(t))};const xi=function(t,e,n,o,i,r,s){var a=vi(t,n),c=vi(e,n),l=s.get(c);if(l)Ai(t,n,l);else{var d=r?r(a,c,n+"",t,e,s):void 0,u=void 0===d;if(u){var h=ut(c),g=!h&&ze(c),m=!h&&!g&&Ye(c);d=c,h||g||m?ut(a)?d=a:Ci(a)?d=kn(a):g?(u=!1,d=fn(c,!0)):m?(u=!1,d=no(c,!0)):d=[]:Ct(c)||Be(c)?(d=a,Be(a)?d=yi(a):L(a)&&!zt(a)||(d=so(c))):u=!1}u&&(s.set(c,d),i(d,c,o,r,s),s.delete(c)),Ai(t,n,d)}};const Ei=function t(e,n,o,i,r){e!==n&&_i(n,(function(s,a){if(r||(r=new Ae),L(s))xi(e,n,a,o,t,i,r);else{var c=i?i(vi(e,a),s,a+"",e,n,r):void 0;void 0===c&&(c=s),Ai(e,a,c)}}),dn)};const Di=function(t){return t};const Ii=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var Mi=Math.max;const Si=function(t,e,n){return e=Mi(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,r=Mi(o.length-e,0),s=Array(r);++i0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const Oi=Pi(Bi);const Li=function(t,e){return Oi(Si(t,e,Di),t+"")};const zi=function(t,e,n){if(!L(n))return!1;var o=typeof e;return!!("number"==o?on(n)&&je(e,n.length):"string"==o&&e in n)&&yt(n[e],t)};const Ri=function(t){return Li((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&zi(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++o1===t?0:1),l=a[s];if("string"==typeof l)return l;return l[Number(c(n))]}To.window.CKEDITOR_TRANSLATIONS||(To.window.CKEDITOR_TRANSLATIONS={});const Vi=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function Hi(t){return Vi.includes(t)?"rtl":"ltr"}class Ui{constructor({uiLanguage:t="en",contentLanguage:e,translations:n}={}){this.uiLanguage=t,this.contentLanguage=e||this.uiLanguage,this.uiLanguageDirection=Hi(this.uiLanguage),this.contentLanguageDirection=Hi(this.contentLanguage),this.translations=function(t){return Array.isArray(t)?t.reduce(((t,e)=>ji(t,e))):t}(n),this.t=(t,e)=>this._t(t,e)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(t,e=[]){e=wi(e),"string"==typeof t&&(t={string:t});const n=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,((t,n)=>nthis._items.length||e<0)throw new k("collection-add-item-invalid-index",this);let n=0;for(const o of t){const t=this._getItemIdBeforeAdding(o),i=e+n;this._items.splice(i,0,o),this._itemMap.set(t,o),this.fire("add",o,i),n++}return this.fire("change",{added:t,removed:[],index:e}),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new k("collection-get-invalid-arg",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return e&&this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,e?this._items.indexOf(e):-1}remove(t){const[e,n]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:n}),e}map(t,e){return this._items.map(t,e)}forEach(t,e){this._items.forEach(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new k("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding((e=>new t(e)))},using:t=>{"function"==typeof t?this._setUpBindToBinding(t):this._setUpBindToBinding((e=>e[t]))}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,o,i)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(o);if(r&&s)this._bindToExternalToInternalMap.set(o,s),this._bindToInternalToExternalMap.set(s,o);else{const n=t(o);if(!n)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const t of this._skippedIndexesFromExternal)i>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,r);for(let t=0;t{const o=this._bindToExternalToInternalMap.get(e);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((t,e)=>(ne&&t.push(e),t)),[])}))}_getItemIdBeforeAdding(t){const e=this._idProperty;let n;if(e in t){if(n=t[e],"string"!=typeof n)throw new k("collection-add-invalid-id",this);if(this.get(n))throw new k("collection-add-item-already-exists",this)}else t[e]=n=g();return n}_remove(t){let e,n,o,i=!1;const r=this._idProperty;if("string"==typeof t?(n=t,o=this._itemMap.get(n),i=!o,o&&(e=this._items.indexOf(o))):"number"==typeof t?(e=t,o=this._items[e],i=!o,o&&(n=o[r])):(o=t,n=o[r],e=this._items.indexOf(o),i=-1==e||!this._itemMap.get(n)),i)throw new k("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(o);return this._bindToInternalToExternalMap.delete(o),this._bindToExternalToInternalMap.delete(s),this.fire("remove",o,e),[o,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Gi(t){const e=t.next();return e.done?null:e.value}class Wi extends(Do(U())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(t){if(this._elements.has(t))throw new k("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",(()=>this._focus(t)),{useCapture:!0}),this.listenTo(t,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Ki{constructor(){this._listener=new(Do())}listenTo(t){this._listener.listenTo(t,"keydown",((t,e)=>{this._listener.fire("_keydown:"+pi(e),e)}))}set(t,e,n={}){const o=fi(t),i=n.priority;this._listener.listenTo(this._listener,"_keydown:"+o,((t,n)=>{e(n,(()=>{n.preventDefault(),n.stopPropagation(),t.stop()})),t.return=!0}),{priority:i})}press(t){return!!this._listener.fire("_keydown:"+pi(t),t)}stopListening(t){this._listener.stopListening(t)}destroy(){this.stopListening()}}function $i(t){return Z(t)?new Map(t):function(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}(t)}Math.pow;function Yi(t,e){let n;function o(...i){o.cancel(),n=setTimeout((()=>t(...i)),e)}return o.cancel=()=>{clearTimeout(n)},o}function Qi(t,e){return!!(n=t.charAt(e-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var n}function Zi(t,e){return!!(n=t.charAt(e))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}const Ji=function(){const t=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],e=new RegExp("\\p{Regional_Indicator}{2}","u").source,n="(?:"+t.map((t=>t.source)).join("|")+")";return new RegExp(`${e}|${n}(?:‍${n})*`,"ug")}();function Xi(t,e){const n=String(t).matchAll(Ji);return Array.from(n).some((t=>t.index{this.refresh()})),this.listenTo(t,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(e=>{if(!this.affectsData)return;const n=t.model.document.selection,o=!("$graveyard"==n.getFirstPosition().root.rootName)&&t.model.canEditAt(n);(t.isReadOnly||this._isEnabledBasedOnSelection&&!o)&&(e.return=!1,e.stop())}),{priority:"highest"}),this.on("execute",(t=>{this.isEnabled||t.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(t){this._affectsData=t}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",or,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",or),this.refresh())}execute(...t){}destroy(){this.stopListening()}}function or(t){t.return=!1,t.stop()}class ir extends nr{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();return!!e&&e.execute(t)}registerChildCommand(t,e={}){p(this._childCommandsDefinitions,{command:t,priority:e.priority||"normal"}),t.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const t=this._childCommandsDefinitions.find((({command:t})=>t.isEnabled));return t&&t.command}}class rr extends(I()){constructor(t,e=[],n=[]){super(),this._plugins=new Map,this._context=t,this._availablePlugins=new Map;for(const t of e)t.pluginName&&this._availablePlugins.set(t.pluginName,t);this._contextPlugins=new Map;for(const[t,e]of n)this._contextPlugins.set(t,e),this._contextPlugins.set(e,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){let e=t;throw"function"==typeof t&&(e=t.pluginName||t.name),new k("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],n=[]){const o=this,i=this._context;!function t(e,n=new Set){e.forEach((e=>{a(e)&&(n.has(e)||(n.add(e),e.pluginName&&!o._availablePlugins.has(e.pluginName)&&o._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,n)))}))}(t),u(t);const r=[...function t(e,n=new Set){return e.map((t=>a(t)?t:o._availablePlugins.get(t))).reduce(((e,o)=>n.has(o)?e:(n.add(o),o.requires&&(u(o.requires,o),t(o.requires,n).forEach((t=>e.add(t)))),e.add(o))),new Set)}(t.filter((t=>!l(t,e))))];!function(t,e){for(const n of e){if("function"!=typeof n)throw new k("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const e=n.pluginName;if(!e)throw new k("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new k("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const i=o._availablePlugins.get(e);if(!i)throw new k("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const r=t.indexOf(i);if(-1===r){if(o._contextPlugins.has(i))return;throw new k("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(i.requires&&i.requires.length)throw new k("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(r,1,n),o._availablePlugins.set(e,n)}}(r,n);const s=r.map((t=>{let e=o._contextPlugins.get(t);return e=e||new t(i),o._add(t,e),e}));return h(s,"init").then((()=>h(s,"afterInit"))).then((()=>s));function a(t){return"function"==typeof t}function c(t){return a(t)&&!!t.isContextPlugin}function l(t,e){return e.some((e=>e===t||(d(t)===e||d(e)===t)))}function d(t){return a(t)?t.pluginName||t.name:t}function u(t,n=null){t.map((t=>a(t)?t:o._availablePlugins.get(t)||t)).forEach((t=>{!function(t,e){if(a(t))return;if(e)throw new k("plugincollection-soft-required",i,{missingPlugin:t,requiredBy:d(e)});throw new k("plugincollection-plugin-not-found",i,{plugin:t})}(t,n),function(t,e){if(!c(e))return;if(c(t))return;throw new k("plugincollection-context-required",i,{plugin:d(t),requiredBy:d(e)})}(t,n),function(t,n){if(!n)return;if(!l(t,e))return;throw new k("plugincollection-required",i,{plugin:d(t),requiredBy:d(n)})}(t,n)}))}function h(t,e){return t.reduce(((t,n)=>n[e]?o._contextPlugins.has(n)?t:t.then(n[e].bind(n)):t),Promise.resolve())}}destroy(){const t=[];for(const[,e]of this)"function"!=typeof e.destroy||this._contextPlugins.has(e)||t.push(e.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new k("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}var sr=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable;class lr{constructor(t){this._contextOwner=null;const e=t||{},{translations:n}=e,o=((t,e)=>{var n={};for(var o in t)ar.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&sr)for(var o of sr(t))e.indexOf(o)<0&&cr.call(t,o)&&(n[o]=t[o]);return n})(e,["translations"]);this.config=new _o(o,this.constructor.defaultConfig);const i=this.constructor.builtinPlugins;this.config.define("plugins",i),this.plugins=new rr(this,i);const r=this.config.get("language")||{};this.locale=new Ui({uiLanguage:"string"==typeof r?r:r.ui,contentLanguage:this.config.get("language.content"),translations:n}),this.t=this.locale.t,this.editors=new qi}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const n of t.concat(e)){if("function"!=typeof n)throw new k("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new k("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(t,[],e)}destroy(){return Promise.all(Array.from(this.editors,(t=>t.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(t,e){if(this._contextOwner)throw new k("context-addeditor-private-context");this.editors.add(t),e&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(t[e]=this.config.get(e));return t}static create(t){return new Promise((e=>{const n=new this(t);e(n.initPlugins().then((()=>n)))}))}}class dr extends(U()){constructor(t){super(),this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class ur extends Ki{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}var hr=n(2591),gr=n.n(hr),mr=n(4098),pr={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(mr.A,pr);mr.A.locals;const fr=new WeakMap;let kr=!1;function br({view:t,element:e,text:n,isDirectHost:o=!0,keepOnFocus:i=!1}){const r=t.document;function s(n){fr.get(r).set(e,{text:n,isDirectHost:o,keepOnFocus:i,hostElement:o?e:null}),t.change((t=>Cr(r,t)))}fr.has(r)||(fr.set(r,new Map),r.registerPostFixer((t=>Cr(r,t))),r.on("change:isComposing",(()=>{t.change((t=>Cr(r,t)))}),{priority:"high"})),e.is("editableElement")&&e.on("change:placeholder",((t,e,n)=>{s(n)})),e.placeholder?s(e.placeholder):n&&s(n),n&&function(){kr||b("enableplaceholder-deprecated-text-option");kr=!0}()}function wr(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}function Ar(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function _r(t,e){if(!t.isAttached())return!1;if(Array.from(t.getChildren()).some((t=>!t.is("uiElement"))))return!1;const n=t.document,o=n.selection.anchor;return(!n.isComposing||!o||o.parent!==t)&&(!!e||(!n.isFocused||!!o&&o.parent!==t))}function Cr(t,e){const n=fr.get(t),o=[];let i=!1;for(const[t,r]of n)r.isDirectHost&&(o.push(t),vr(e,t,r)&&(i=!0));for(const[t,r]of n){if(r.isDirectHost)continue;const n=yr(t);n&&(o.includes(n)||(r.hostElement=n,vr(e,t,r)&&(i=!0)))}return i}function vr(t,e,n){const{text:o,isDirectHost:i,hostElement:r}=n;let s=!1;r.getAttribute("data-placeholder")!==o&&(t.setAttribute("data-placeholder",o,r),s=!0);return(i||1==e.childCount)&&_r(r,n.keepOnFocus)?wr(t,r)&&(s=!0):Ar(t,r)&&(s=!0),s}function yr(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement")&&!e.is("attributeElement"))return e}return null}class xr{is(){throw new Error("is() method is abstract")}}const Er=function(t){return bo(t,4)};class Dr extends(I(xr)){constructor(t){super(),this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new k("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Q(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o]t.data.length)throw new k("view-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.data.length)throw new k("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(t={}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}Mr.prototype.is=function(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t};class Sr{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=Tr(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const o=Tr(n,t);o&&e.push({element:n,pattern:t,match:o})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function Tr(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){if(t instanceof RegExp)return!!e.match(t);return t===e}(e.name,t.name),!n.name)||e.attributes&&(n.attributes=function(t,e){const n=new Set(e.getAttributeKeys());Ct(t)?(void 0!==t.style&&b("matcher-pattern-deprecated-attributes-style-key",t),void 0!==t.class&&b("matcher-pattern-deprecated-attributes-class-key",t)):(n.delete("style"),n.delete("class"));return Br(t,n,(t=>e.getAttribute(t)))}(e.attributes,t),!n.attributes)||e.classes&&(n.classes=function(t,e){return Br(t,e.getClassNames(),(()=>{}))}(e.classes,t),!n.classes)||e.styles&&(n.styles=function(t,e){return Br(t,e.getStyleNames(!0),(t=>e.getStyle(t)))}(e.styles,t),!n.styles)?null:n}function Br(t,e,n){const o=function(t){if(Array.isArray(t))return t.map((t=>Ct(t)?(void 0!==t.key&&void 0!==t.value||b("matcher-pattern-missing-key-or-value",t),[t.key,t.value]):[t,!0]));if(Ct(t))return Object.entries(t);return[[t,!0]]}(t),i=Array.from(e),r=[];if(o.forEach((([t,e])=>{i.forEach((o=>{(function(t,e){return!0===t||t===e||t instanceof RegExp&&e.match(t)})(t,o)&&function(t,e,n){if(!0===t)return!0;const o=n(e);return t===o||t instanceof RegExp&&!!String(o).match(t)}(e,o,n)&&r.push(o)}))})),o.length&&!(r.lengthi?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(i);++oe===t));return Array.isArray(e)}set(t,e){if(L(t))for(const[e,n]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,n,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=cs(t);ns(this._styles,e),delete this._styles[t],this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((t=>t.join(":"))).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!L(this._styles[t]))return this._styles[t];const e=this._styleProcessor.getReducedForm(t,this._styles).find((([e])=>e===t));return Array.isArray(e)?e[1]:void 0}getStyleNames(t=!1){if(this.isEmpty)return[];if(t)return this._styleProcessor.getStyleNames(this._styles);return this.getStylesEntries().map((([t])=>t))}clear(){this._styles={}}getStylesEntries(){const t=[],e=Object.keys(this._styles);for(const n of e)t.push(...this._styleProcessor.getReducedForm(n,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const n=e.splice(0,e.length-1).join("."),o=os(this._styles,n);if(!o)return;!Object.keys(o).length&&this.remove(n)}}class as{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,n){if(L(e))ls(n,cs(t),e);else if(this._normalizers.has(t)){const o=this._normalizers.get(t),{path:i,value:r}=o(e);ls(n,i,r)}else ls(n,t,e)}getNormalized(t,e){if(!t)return ji({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const n=this._extractors.get(t);if("string"==typeof n)return os(e,n);const o=n(t,e);if(o)return o}return os(e,cs(t))}getReducedForm(t,e){const n=this.getNormalized(t,e);if(void 0===n)return[];if(this._reducers.has(t)){return this._reducers.get(t)(n)}return[[t,n]]}getStyleNames(t){const e=Array.from(this._consumables.keys()).filter((e=>{const n=this.getNormalized(e,t);return n&&"object"==typeof n?Object.keys(n).length:n})),n=new Set([...e,...Object.keys(t)]);return Array.from(n)}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const n of e)this._mapStyleNames(n,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function cs(t){return t.replace("-",".")}function ls(t,e,n){let o=n;L(n)&&(o=ji({},os(t,e),n)),rs(t,e,o)}class ds extends Dr{constructor(t,e,n,o){if(super(t),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=e,this._attrs=function(t){const e=$i(t);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(n),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");us(this._classes,t),this._attrs.delete("class")}this._styles=new ss(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==t){const t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(t)}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof ds))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(t){return this._styles.getStyleNames(t)}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new Sr(...t);let n=this.parent;for(;n&&!n.is("documentFragment");){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=this._styles.toString(),n=Array.from(this._attrs).map((t=>`${t[0]}="${t[1]}"`)).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(t){return this._unsafeAttributesToRender.includes(t)}_clone(t=!1){const e=[];if(t)for(const n of this.getChildren())e.push(n._clone(t));const n=new this.constructor(this.document,this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._unsafeAttributesToRender=this._unsafeAttributesToRender,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new Ir(t,e)];Z(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ir(t,e):e instanceof Mr?new Ir(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n0&&(this._classes.clear(),!0):"style"==t?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const e of wi(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of wi(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),"string"!=typeof t?this._styles.set(t):this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of wi(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function us(t,e){const n=e.split(/\s+/);t.clear(),n.forEach((e=>t.add(e)))}ds.prototype.is=function(t,e){return e?e===this.name&&("element"===t||"view:element"===t):"element"===t||"view:element"===t||"node"===t||"view:node"===t};class hs extends ds{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=gs}}function gs(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}hs.prototype.is=function(t,e){return e?e===this.name&&("containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class ms extends(U(hs)){constructor(t,e,n,o){super(t,e,n,o),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",(e=>e&&t.selection.editableElement==this)),this.listenTo(t.selection,"change",(()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this}))}destroy(){this.stopListening()}}ms.prototype.is=function(t,e){return e?e===this.name&&("editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};const ps=Symbol("rootName");class fs extends ms{constructor(t,e){super(t,e),this.rootName="main"}get rootName(){return this.getCustomProperty(ps)}set rootName(t){this._setCustomProperty(ps,t)}set _name(t){this.name=t}}fs.prototype.is=function(t,e){return e?e===this.name&&("rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class ks{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new k("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new k("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this._position=bs._createAt(t.startPosition):this._position=bs._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(t){let e,n;do{n=this.position,e=this.next()}while(!e.done&&t(e.value));e.done||(this._position=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let o;if(n instanceof Ir){if(t.isAtEnd)return this._position=bs._createAfter(n),this._next();o=n.data[t.offset]}else o=n.getChild(t.offset);if(o instanceof ds){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t=new bs(o,0);return this._position=t,this._formatReturnValue("elementStart",o,e,t,1)}if(o instanceof Ir){if(this.singleCharacters)return t=new bs(o,0),this._position=t,this._next();let n,i=o.data.length;return o==this._boundaryEndParent?(i=this.boundaries.end.offset,n=new Mr(o,0,i),t=bs._createAfter(n)):(n=new Mr(o,0,o.data.length),t.offset++),this._position=t,this._formatReturnValue("text",n,e,t,i)}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{o=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset}const i=new Mr(n,t.offset,o);return t.offset+=o,this._position=t,this._formatReturnValue("text",i,e,t,o)}return t=bs._createAfter(n),this._position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let o;if(n instanceof Ir){if(t.isAtStart)return this._position=bs._createBefore(n),this._previous();o=n.data[t.offset-1]}else o=n.getChild(t.offset-1);if(o instanceof ds)return this.shallow?(t.offset--,this._position=t,this._formatReturnValue("elementStart",o,e,t,1)):(t=new bs(o,o.childCount),this._position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",o,e,t));if(o instanceof Ir){if(this.singleCharacters)return t=new bs(o,o.data.length),this._position=t,this._previous();let n,i=o.data.length;if(o==this._boundaryStartParent){const e=this.boundaries.start.offset;n=new Mr(o,e,o.data.length-e),i=n.data.length,t=bs._createBefore(n)}else n=new Mr(o,0,o.data.length),t.offset--;return this._position=t,this._formatReturnValue("text",n,e,t,i)}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=t.offset-e}t.offset-=o;const i=new Mr(n,t.offset,o);return this._position=t,this._formatReturnValue("text",i,e,t,o)}return t=bs._createBefore(n),this._position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,o,i){return e instanceof Mr&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=bs._createAfter(e.textNode):(o=bs._createAfter(e.textNode),this._position=o)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=bs._createBefore(e.textNode):(o=bs._createBefore(e.textNode),this._position=o))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}}class bs extends xr{constructor(t,e){super(),this.parent=t,this.offset=e}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof ms);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=bs._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new ks(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let o=0;for(;e[o]==n[o]&&e[o];)o++;return 0===o?null:e[o-1]}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const o=Q(e,n);switch(o){case"prefix":return"before";case"extension":return"after";default:return e[o]0?new this(n,o):new this(o,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(bs._createBefore(t),e)}}function As(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}ws.prototype.is=function(t){return"range"===t||"view:range"===t};class _s extends(I(xr)){constructor(...t){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",t.length&&this.setTo(...t)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=Y(this.getRanges());if(e!=Y(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let n=!1;for(let o of t.getRanges())if(o=o.getTrimmed(),e.start.isEqual(o.start)&&e.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...t){let[e,n,o]=t;if("object"==typeof n&&(o=n,n=void 0),null===e)this._setRanges([]),this._setFakeOptions(o);else if(e instanceof _s||e instanceof Cs)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof ws)this._setRanges([e],o&&o.backward),this._setFakeOptions(o);else if(e instanceof bs)this._setRanges([new ws(e)]),this._setFakeOptions(o);else if(e instanceof Dr){const t=!!o&&!!o.backward;let i;if(void 0===n)throw new k("view-selection-setto-required-second-parameter",this);i="in"==n?ws._createIn(e):"on"==n?ws._createOn(e):new ws(bs._createAt(e,n)),this._setRanges([i],t),this._setFakeOptions(o)}else{if(!Z(e))throw new k("view-selection-setto-not-selectable",this);this._setRanges(e,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new k("view-selection-setfocus-no-ranges",this);const n=bs._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==n.compareWith(o)?this._addRange(new ws(n,o),!0):this._addRange(new ws(o,n)),this.fire("change")}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof ws))throw new k("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new k("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new ws(t.start,t.end))}}_s.prototype.is=function(t){return"selection"===t||"view:selection"===t};class Cs extends(I(xr)){constructor(...t){super(),this._selection=new _s,this._selection.delegate("change").to(this),t.length&&this._selection.setTo(...t)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}_setTo(...t){this._selection.setTo(...t)}_setFocus(t,e){this._selection.setFocus(t,e)}}Cs.prototype.is=function(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t};class vs extends u{constructor(t,e,n){super(t,e),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const ys=Symbol("bubbling contexts");function xs(t){return class extends t{fire(t,...e){try{const n=t instanceof u?t:new u(this,t),o=Ms(this);if(!o.size)return;if(Es(n,"capturing",this),Ds(o,"$capture",n,...e))return n.return;const i=n.startRange||this.selection.getFirstRange(),r=i?i.getContainedElement():null,s=!!r&&Boolean(Is(o,r));let a=r||function(t){if(!t)return null;const e=t.start.parent,n=t.end.parent,o=e.getPath(),i=n.getPath();return o.length>i.length?e:n}(i);if(Es(n,"atTarget",a),!s){if(Ds(o,"$text",n,...e))return n.return;Es(n,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Ds(o,"$root",n,...e))return n.return}else if(a.is("element")&&Ds(o,a.name,n,...e))return n.return;if(Ds(o,a,n,...e))return n.return;a=a.parent,Es(n,"bubbling",a)}return Es(n,"bubbling",this),Ds(o,"$document",n,...e),n.return}catch(t){k.rethrowUnexpectedError(t,this)}}_addEventListener(t,e,n){const o=wi(n.context||"$document"),i=Ms(this);for(const r of o){let o=i.get(r);o||(o=new(I()),i.set(r,o)),this.listenTo(o,t,e,n)}}_removeEventListener(t,e){const n=Ms(this);for(const o of n.values())this.stopListening(o,t,e)}}}{const t=xs(Object);["fire","_addEventListener","_removeEventListener"].forEach((e=>{xs[e]=t.prototype[e]}))}function Es(t,e,n){t instanceof vs&&(t._eventPhase=e,t._currentTarget=n)}function Ds(t,e,n,...o){const i="string"==typeof e?t.get(e):Is(t,e);return!!i&&(i.fire(n,...o),n.stop.called)}function Is(t,e){for(const[n,o]of t)if("function"==typeof n&&n(e))return o;return null}function Ms(t){return t[ys]||(t[ys]=new Map),t[ys]}class Ss extends(xs(U())){constructor(t){super(),this._postFixers=new Set,this.selection=new Cs,this.roots=new qi({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.forEach((t=>t.destroy())),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t),e)break}while(e)}}class Ts extends ds{constructor(t,e,n,o){super(t,e,n,o),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Bs}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new k("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t=!1){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function Bs(){if(Ns(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(Ns(t)>1)return null;t=t.parent}return!t||Ns(t)>1?null:this.childCount}function Ns(t){return Array.from(t.getChildren()).filter((t=>!t.is("uiElement"))).length}Ts.DEFAULT_PRIORITY=10,Ts.prototype.is=function(t,e){return e?e===this.name&&("attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t):"attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Ps extends ds{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Os}_insertChild(t,e){if(e&&(e instanceof Dr||Array.from(e).length>0))throw new k("view-emptyelement-cannot-add",[this,e]);return 0}}function Os(){return null}Ps.prototype.is=function(t,e){return e?e===this.name&&("emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t):"emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Ls extends ds{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Rs}_insertChild(t,e){if(e&&(e instanceof Dr||Array.from(e).length>0))throw new k("view-uielement-cannot-add",[this,e]);return 0}render(t,e){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function zs(t){t.document.on("arrowKey",((e,n)=>function(t,e,n){if(e.keyCode==gi.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),o=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(o||e.shiftKey){const e=t.focusNode,i=t.focusOffset,r=n.domPositionToView(e,i);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement")))));if(s){const e=n.viewPositionToDom(a);o?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,n,t.domConverter)),{priority:"low"})}function Rs(){return null}Ls.prototype.is=function(t,e){return e?e===this.name&&("uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t):"uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class js extends ds{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Fs}_insertChild(t,e){if(e&&(e instanceof Dr||Array.from(e).length>0))throw new k("view-rawelement-cannot-add",[this,e]);return 0}render(t,e){}}function Fs(){return null}js.prototype.is=function(t,e){return e?e===this.name&&("rawElement"===t||"view:rawElement"===t||"element"===t||"view:element"===t):"rawElement"===t||"view:rawElement"===t||t===this.name||t==="view:"+this.name||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Vs extends(I(xr)){constructor(t,e){super(),this._children=[],this._customProperties=new Map,this.document=t,e&&this._insertChild(0,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new Ir(t,e)];Z(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ir(t,e):e instanceof Mr?new Ir(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n{const n=t[t.length-1],o=!e.is("uiElement");return n&&n.breakAttributes==o?n.nodes.push(e):t.push({breakAttributes:o,nodes:[e]}),t}),[]);let o=null,i=t;for(const{nodes:t,breakAttributes:e}of n){const n=this._insertNodes(i,t,e);o||(o=n.start),i=n.end}return o?new ws(o,i):new ws(t)}remove(t){const e=t instanceof ws?t:ws._createOn(t);if(Zs(e,this.document),e.isCollapsed)return new Vs(this.document);const{start:n,end:o}=this._breakAttributesRange(e,!0),i=n.parent,r=o.offset-n.offset,s=i._removeChildren(n.offset,r);for(const t of s)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(n);return e.start=a,e.end=a.clone(),new Vs(this.document,s)}clear(t,e){Zs(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of n){const n=o.item;let i;if(n.is("element")&&e.isSimilar(n))i=ws._createOn(n);else if(!o.nextPosition.isAfter(t.start)&&n.is("$textProxy")){const t=n.getAncestors().find((t=>t.is("element")&&e.isSimilar(t)));t&&(i=ws._createIn(t))}i&&(i.end.isAfter(t.end)&&(i.end=t.end),i.start.isBefore(t.start)&&(i.start=t.start),this.remove(i))}}move(t,e){let n;if(e.isAfter(t.end)){const o=(e=this._breakAttributes(e,!0)).parent,i=o.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=o.childCount-i}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof Ts))throw new k("view-writer-wrap-invalid-attribute",this.document);if(Zs(t,this.document),t.isCollapsed){let o=t.start;o.parent.is("element")&&(n=o.parent,!Array.from(n.getChildren()).some((t=>!t.is("uiElement"))))&&(o=o.getLastMatchingPosition((t=>t.item.is("uiElement")))),o=this._wrapPosition(o,e);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(t.start)&&this.setSelection(o),new ws(o)}return this._wrapRange(t,e);var n}unwrap(t,e){if(!(e instanceof Ts))throw new k("view-writer-unwrap-invalid-attribute",this.document);if(Zs(t,this.document),t.isCollapsed)return t;const{start:n,end:o}=this._breakAttributesRange(t,!0),i=n.parent,r=this._unwrapChildren(i,n.offset,o.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new ws(s,a)}rename(t,e){const n=new hs(this.document,t,e.getAttributes());return this.insert(bs._createAfter(e),n),this.move(ws._createIn(e),bs._createAt(n,0)),this.remove(ws._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return bs._createAt(t,e)}createPositionAfter(t){return bs._createAfter(t)}createPositionBefore(t){return bs._createBefore(t)}createRange(t,e){return new ws(t,e)}createRangeOn(t){return ws._createOn(t)}createRangeIn(t){return ws._createIn(t)}createSelection(...t){return new _s(...t)}createSlot(t="children"){if(!this._slotFactory)throw new k("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,t)}_registerSlotFactory(t){this._slotFactory=t}_clearSlotFactory(){this._slotFactory=null}_insertNodes(t,e,n){let o,i;if(o=n?Us(t):t.parent.is("$text")?t.parent.parent:t.parent,!o)throw new k("view-writer-invalid-position-container",this.document);i=n?this._breakAttributes(t,!0):t.parent.is("$text")?Ws(t):t;const r=o._insertChild(i.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const s=i.getShiftedBy(r),a=this.mergeAttributes(i);a.isEqual(i)||s.offset--;const c=this.mergeAttributes(s);return new ws(a,c)}_wrapChildren(t,e,n,o){let i=e;const r=[];for(;i!1,t.parent._insertChild(t.offset,n);const o=new ws(t,t.getShiftedBy(1));this.wrap(o,e);const i=new bs(n.parent,n.index);n._remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof Ir&&s instanceof Ir?Ks(r,s):Gs(i)}_wrapAttributeElement(t,e){if(!Js(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!Js(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,o=t.end;if(Zs(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new ws(n,n)}const i=this._breakAttributes(o,e),r=i.parent.childCount,s=this._breakAttributes(n,e);return i.offset+=i.parent.childCount-r,new ws(s,i)}_breakAttributes(t,e=!1){const n=t.offset,o=t.parent;if(t.parent.is("emptyElement"))throw new k("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new k("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new k("view-writer-cannot-break-raw-element",this.document);if(!e&&o.is("$text")&&Qs(o.parent))return t.clone();if(Qs(o))return t.clone();if(o.is("$text"))return this._breakAttributes(Ws(t),e);if(n==o.childCount){const t=new bs(o.parent,o.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new bs(o.parent,o.index);return this._breakAttributes(t,e)}{const t=o.index+1,i=o._clone();o.parent._insertChild(t,i),this._addToClonedElementsGroup(i);const r=o.childCount-n,s=o._removeChildren(n,r);i._appendChild(s);const a=new bs(o.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function Us(t){let e=t.parent;for(;!Qs(e);){if(!e)return;e=e.parent}return e}function qs(t,e){return t.prioritye.priority)&&t.getIdentity()n instanceof t)))throw new k("view-writer-insert-invalid-node-type",e);n.is("$text")||Ys(n.getChildren(),e)}}function Qs(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function Zs(t,e){const n=Us(t.start),o=Us(t.end);if(!n||!o||n!==o)throw new k("view-writer-invalid-range-container",e)}function Js(t,e){return null===t.id&&null===e.id}const Xs=t=>t.createTextNode(" "),ta=t=>{const e=t.createElement("span");return e.dataset.ckeFiller="true",e.innerText=" ",e},ea=t=>{const e=t.createElement("br");return e.dataset.ckeFiller="true",e},na=7,oa="⁠".repeat(na);function ia(t){return"string"==typeof t?t.substr(0,na)===oa:No(t)&&t.data.substr(0,na)===oa}function ra(t){return t.data.length==na&&ia(t)}function sa(t){const e="string"==typeof t?t:t.data;return ia(t)?e.slice(na):e}function aa(t,e){if(e.keyCode==gi.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,n=t.getRangeAt(0).startOffset;ia(e)&&n<=na&&t.collapse(e,0)}}}var ca=n(8264),la={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(ca.A,la);ca.A.locals;class da extends(U()){constructor(t,e){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=t,this.selection=e,this.set("isFocused",!1),this.set("isSelecting",!1),i.isBlink&&!i.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t){throw new k("view-renderer-unknown-type",this)}this.markedChildren.add(e)}}}render(){if(this.isComposing&&!i.isAndroid)return;let t=null;const e=!(i.isBlink&&!i.isAndroid)||!this.isSelecting;for(const t of this.markedChildren)this._updateChildrenMappings(t);e?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(t=this.domConverter.domPositionToView(this._inlineFiller),t&&t.parent.is("$text")&&(t=bs._createBefore(t.parent)));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(e)if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;ia(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=ua(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.childNodes),o=Array.from(this.domConverter.viewChildrenToDom(t,{withChildren:!1})),i=this._diffNodeLists(n,o),r=this._findUpdateActions(i,n,o,ha);if(-1!==r.indexOf("update")){const e={equal:0,insert:0,delete:0};for(const i of r)if("update"===i){const i=e.equal+e.insert,r=e.equal+e.delete,s=t.getChild(i);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,n[r]),ti(o[i]),e.equal++}else e[i]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?bs._createBefore(t.parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&No(e.parent)&&ia(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!ia(t))throw new k("view-renderer-filler-was-lost",this);ra(t)?t.remove():t.data=t.data.substr(na),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor((t=>t.hasAttribute("contenteditable")));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const o=t.nodeBefore,r=t.nodeAfter;return!(o instanceof Ir||r instanceof Ir)&&(!i.isAndroid||!o&&!r)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t);let o=this.domConverter.viewToDom(t).data;const i=e.inlineFillerPosition;i&&i.parent==t.parent&&i.offset==t.index&&(o=oa+o),pa(n,o)}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map((t=>t.name)),o=t.getAttributeKeys();for(const n of o)this.domConverter.setDomElementAttribute(e,n,t.getAttribute(n),t);for(const o of n)t.hasAttribute(o)||this.domConverter.removeDomElementAttribute(e,o)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;if(i.isAndroid){let t=null;for(const e of Array.from(n.childNodes)){if(t&&No(t)&&No(e)){n.normalize();break}t=e}}const o=e.inlineFillerPosition,r=n.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(t,{bind:!0}));o&&o.parent===t&&ua(n.ownerDocument,s,o.offset);const a=this._diffNodeLists(r,s),c=this._findUpdateActions(a,r,s,ga);let l=0;const d=new Set;for(const t of c)"delete"===t?(d.add(r[l]),ti(r[l])):"equal"!==t&&"update"!==t||l++;l=0;for(const t of c)"insert"===t?(Ko(n,l,s[l]),l++):"update"===t?(pa(r[l],s[l].data),l++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(s[l])),l++);for(const t of d)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return t=function(t,e){const n=Array.from(t);if(0==n.length||!e)return n;const o=n[n.length-1];o==e&&n.pop();return n}(t,this._fakeSelectionContainer),l(t,e,ma.bind(null,this.domConverter))}_findUpdateActions(t,e,n,o){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let i=[],r=[],s=[];const a={equal:0,insert:0,delete:0};for(const c of t)"insert"===c?s.push(n[a.equal+a.insert]):"delete"===c?r.push(e[a.equal+a.delete]):(i=i.concat(l(r,s,o).map((t=>"equal"===t?"update":t))),i.push("equal"),r=[],s=[]),a[c]++;return i.concat(l(r,s,o).map((t=>"equal"===t?"update":t)))}_markDescendantTextToSync(t){if(t)if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(i.isBlink&&!i.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(t)):this.isComposing&&i.isAndroid||this._updateDomSelection(t))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(t))return;n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const o=e.getSelection(),i=e.createRange();o.removeAllRanges(),i.selectNodeContents(n),o.addRange(i)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.setBaseAndExtent(n.parent,n.offset,o.parent,o.offset),i.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const o=n.childNodes[t.offset];o&&"BR"==o.tagName&&e.addRange(e.getRangeAt(0))}(o,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,n=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(n.anchorNode!==e&&!e.contains(n.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){const e=t.getSelection();if(e.rangeCount){const n=t.activeElement,o=this.domConverter.mapDomToView(n);n&&o&&e.removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function ua(t,e,n){const o=e instanceof Array?e:e.childNodes,i=o[n];if(No(i))return i.data=oa+i.data,i;{const i=t.createTextNode(oa);return Array.isArray(e)?o.splice(n,0,i):Ko(e,n,i),i}}function ha(t,e){return yo(t)&&yo(e)&&!No(t)&&!No(e)&&!$o(t)&&!$o(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function ga(t,e){return yo(t)&&yo(e)&&No(t)&&No(e)}function ma(t,e,n){return e===n||(No(e)&&No(n)?e.data===n.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(n)))}function pa(t,e){const n=t.data;if(n==e)return;const o=s(n,e);for(const e of o)"insert"===e.type?t.insertData(e.index,e.values.join("")):t.deleteData(e.index,e.howMany)}const fa=ea(To.document),ka=Xs(To.document),ba=ta(To.document),wa="data-ck-unsafe-attribute-",Aa="data-ck-unsafe-element";class _a{constructor(t,{blockFillerMode:e,renderingMode:n="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Sr,this._inlineObjectElementMatcher=new Sr,this._elementsWithTemporaryCustomProperties=new Set,this.document=t,this.renderingMode=n,this.blockFillerMode=e||("editing"===n?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?To.document:To.document.implementation.createHTMLDocument("")}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new _s(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of Array.from(t.children))this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}shouldRenderAttribute(t,e,n){return"data"===this.renderingMode||!(t=t.toLowerCase()).startsWith("on")&&(("srcdoc"!==t||!e.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===t||"srcset"===t)||("source"===n&&"srcset"===t||!e.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(t,e){if("data"===this.renderingMode)return void(t.innerHTML=e);const n=(new DOMParser).parseFromString(e,"text/html"),o=n.createDocumentFragment(),i=n.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);const r=n.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const t of s){for(const e of t.getAttributeNames())this.setDomElementAttribute(t,e,t.getAttribute(e));const e=t.tagName.toLowerCase();this._shouldRenameElement(e)&&(xa(e),t.replaceWith(this._createReplacementDomElement(e,t)))}for(;t.firstChild;)t.firstChild.remove();t.append(o)}viewToDom(t,e={}){if(t.is("$text")){const e=this._processDataFromViewText(t);return this._domDocument.createTextNode(e)}{const n=t;if(this.mapViewToDom(n)){if(!n.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(n);this._elementsWithTemporaryCustomProperties.add(n)}let o;if(n.is("documentFragment"))o=this._domDocument.createDocumentFragment(),e.bind&&this.bindDocumentFragments(o,n);else{if(n.is("uiElement"))return o="$comment"===n.name?this._domDocument.createComment(n.getCustomProperty("$rawContent")):n.render(this._domDocument,this),e.bind&&this.bindElements(o,n),o;this._shouldRenameElement(n.name)?(xa(n.name),o=this._createReplacementDomElement(n.name)):o=n.hasAttribute("xmlns")?this._domDocument.createElementNS(n.getAttribute("xmlns"),n.name):this._domDocument.createElement(n.name),n.is("rawElement")&&n.render(o,this),e.bind&&this.bindElements(o,n);for(const t of n.getAttributeKeys())this.setDomElementAttribute(o,t,n.getAttribute(t),n)}if(!1!==e.withChildren)for(const t of this.viewChildrenToDom(n,e))o.appendChild(t);return o}}setDomElementAttribute(t,e,n,o){const i=this.shouldRenderAttribute(e,n,t.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(e);i||b("domconverter-unsafe-attribute-detected",{domElement:t,key:e,value:n}),function(t){try{To.document.createAttribute(t)}catch(t){return!1}return!0}(e)?(t.hasAttribute(e)&&!i?t.removeAttribute(e):t.hasAttribute(wa+e)&&i&&t.removeAttribute(wa+e),t.setAttribute(i?e:wa+e,n)):b("domconverter-invalid-attribute-detected",{domElement:t,key:e,value:n})}removeDomElementAttribute(t,e){e!=Aa&&(t.removeAttribute(e),t.removeAttribute(wa+e))}*viewChildrenToDom(t,e={}){const n=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const i of t.getChildren()){n===o&&(yield this._getBlockFiller());const t=i.is("element")&&!!i.getCustomProperty("dataPipeline:transparentRendering")&&!Gi(i.getAttributes());t&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,e):(t&&b("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,e)),o++}n===o&&(yield this._getBlockFiller())}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),o=this._domDocument.createRange();return o.setStart(e.parent,e.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let o=t.offset;return ia(n)&&(o+=na),{parent:n,offset:o}}{let n,o,i;if(0===t.offset){if(n=this.mapViewToDom(e),!n)return null;i=n.childNodes[0]}else{const e=t.nodeBefore;if(o=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(e),!o)return null;n=o.parentNode,i=o.nextSibling}if(No(i)&&ia(i))return{parent:i,offset:na};return{parent:n,offset:o?Wo(o)+1:0}}}domToView(t,e={}){const n=[],o=this._domToView(t,e,n),i=o.next().value;return i?(o.next(),this._processDomInlineNodes(null,n,e),i.is("$text")&&0==i.data.length?null:i):null}*domChildrenToView(t,e={},n=[]){for(let o=0;o{const{scrollLeft:e,scrollTop:n}=t;o.push([e,n])})),e.focus(),va(e,(t=>{const[e,n]=o.shift();t.scrollLeft=e,t.scrollTop=n})),To.window.scrollTo(t,n)}}_clearDomSelection(){const t=this.mapViewToDom(this.document.selection.editableElement);if(!t)return;const e=t.ownerDocument.defaultView.getSelection(),n=this.domSelectionToView(e);n&&n.rangeCount>0&&e.removeAllRanges()}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(fa):!("BR"!==t.tagName||!ya(t,this.blockElements)||1!==t.parentNode.childNodes.length)||(t.isEqualNode(ba)||function(t,e){const n=t.isEqualNode(ka);return n&&ya(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements))}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=this._domDocument.createRange();try{e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset)}catch(t){return!1}const n=e.collapsed;return e.detach(),n}getHostViewElement(t){const e=function(t){const e=[];let n=t;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)e.unshift(n),n=n.parentNode;return e}(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}registerInlineObjectMatcher(t){this._inlineObjectElementMatcher.add(t)}_clearTemporaryCustomProperties(){for(const t of this._elementsWithTemporaryCustomProperties)t._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Xs(this._domDocument);case"markedNbsp":return ta(this._domDocument);case"br":return ea(this._domDocument)}}_isDomSelectionPositionCorrect(t,e){if(No(t)&&ia(t)&&e0?e[t-1]:null,c=t+1this.preElements.includes(t.name))))return e;if(" "==e.charAt(0)){const n=this._getTouchingInlineViewNode(t,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingInlineViewNode(t,!0),o=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=e.charAt(e.length-2)&&n&&!o||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some((t=>this.preElements.includes(t.name))))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_getTouchingInlineViewNode(t,e){const n=new ks({startPosition:e?bs._createAfter(t):bs._createBefore(t),direction:e?"forward":"backward"});for(const t of n){if(t.item.is("element","br"))return null;if(this._isInlineObjectElement(t.item))return t.item;if(t.item.is("containerElement"))return null;if(t.item.is("$textProxy"))return t.item}return null}_isBlockDomElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isBlockViewElement(t){return t.is("element")&&this.blockElements.includes(t.name)}_isInlineObjectElement(t){return!!t.is("element")&&("br"==t.name||this.inlineObjectElements.includes(t.name)||!!this._inlineObjectElementMatcher.match(t))}_createViewElement(t,e){if($o(t))return new Ls(this.document,"$comment");const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new ds(this.document,n)}_isViewElementWithRawContent(t,e){return!1!==e.withChildren&&t.is("element")&&!!this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){const e=t.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(e)}_createReplacementDomElement(t,e){const n=this._domDocument.createElement("span");if(n.setAttribute(Aa,t),e){for(;e.firstChild;)n.appendChild(e.firstChild);for(const t of e.getAttributeNames())n.setAttribute(t,e.getAttribute(t))}return n}}function Ca(t,e){return t.getAncestors().some((t=>t.is("element")&&e.includes(t.name)))}function va(t,e){let n=t;for(;n;)e(n),n=n.parentElement}function ya(t,e){const n=t.parentNode;return!!n&&!!n.tagName&&e.includes(n.tagName.toLowerCase())}function xa(t){"script"===t&&b("domconverter-unsafe-script-element-detected"),"style"===t&&b("domconverter-unsafe-style-element-detected")}class Ea extends(Do()){constructor(t){super(),this._isEnabled=!1,this.view=t,this.document=t.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&3===t.nodeType&&(t=t.parentNode),!(!t||1!==t.nodeType)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}const Da=Ri((function(t,e){Ee(e,dn(e),t)}));class Ia{constructor(t,e,n){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Da(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ma extends Ea{constructor(){super(...arguments),this.useCapture=!1}observe(t){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((e=>{this.listenTo(t,e,((t,e)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(e.target)&&this.onDomEvent(e)}),{useCapture:this.useCapture})}))}stopObserving(t){this.stopListening(t)}fire(t,e,n){this.isEnabled&&this.document.fire(t,new Ia(this.view,e,n))}}class Sa extends Ma{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(t){const e={keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return pi(this)}};this.fire(t.type,t,e)}}const Ta=function(){return tt.Date.now()};var Ba=/\s/;const Na=function(t){for(var e=t.length;e--&&Ba.test(t.charAt(e)););return e};var Pa=/^\s+/;const Oa=function(t){return t?t.slice(0,Na(t)+1).replace(Pa,""):t};var La=/^[-+]0x[0-9a-f]+$/i,za=/^0b[01]+$/i,Ra=/^0o[0-7]+$/i,ja=parseInt;const Fa=function(t){if("number"==typeof t)return t;if(Nr(t))return NaN;if(L(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=L(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Oa(t);var n=za.test(t);return n||Ra.test(t)?ja(t.slice(2),n?2:8):La.test(t)?NaN:+t};var Va=Math.max,Ha=Math.min;const Ua=function(t,e,n){var o,i,r,s,a,c,l=0,d=!1,u=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=o,r=i;return o=i=void 0,l=e,s=t.apply(r,n)}function m(t){var n=t-c;return void 0===c||n>=e||n<0||u&&t-l>=r}function p(){var t=Ta();if(m(t))return f(t);a=setTimeout(p,function(t){var n=e-(t-c);return u?Ha(n,r-(t-l)):n}(t))}function f(t){return a=void 0,h&&o?g(t):(o=i=void 0,s)}function k(){var t=Ta(),n=m(t);if(o=arguments,i=this,c=t,n){if(void 0===a)return function(t){return l=t,a=setTimeout(p,e),d?g(t):s}(c);if(u)return clearTimeout(a),a=setTimeout(p,e),g(c)}return void 0===a&&(a=setTimeout(p,e)),s}return e=Fa(e)||0,L(n)&&(d=!!n.leading,r=(u="maxWait"in n)?Va(Fa(n.maxWait)||0,e):r,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==a&&clearTimeout(a),l=0,o=c=i=a=void 0},k.flush=function(){return void 0===a?s:f(Ta())},k};class qa extends Ea{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=Ua((t=>{this.document.fire("selectionChangeDone",t)}),200)}observe(){const t=this.document;t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&n.preventDefault()}),{context:"$capture"}),t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new _s(e.getRanges(),{backward:e.isBackward,fake:!1});t!=gi.arrowleft&&t!=gi.arrowup||n.setTo(n.getFirstPosition()),t!=gi.arrowright&&t!=gi.arrowdown||n.setTo(n.getLastPosition());const o={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}const Ga=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const Wa=function(t){return this.__data__.has(t)};function Ka(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ke;++ea))return!1;var l=r.get(t),d=r.get(e);if(l&&d)return l==e&&d==t;var u=-1,h=!0,g=2&n?new $a:void 0;for(r.set(t,e),r.set(e,t);++u{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),t.change((()=>{}))}),50)})),e.on("blur",((n,o)=>{const i=e.selection.editableElement;null!==i&&i!==o.target||(e.isFocused=!1,this._isFocusChanging=!1,t.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class pc extends Ea{constructor(t){super(t),this.mutationObserver=t.getObserver(hc),this.focusObserver=t.getObserver(mc),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Ua((t=>{this.document.fire("selectionChangeDone",t)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=Ua((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument,n=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,e),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(t,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(t,"keydown",n,{priority:"highest",useCapture:!0}),this.listenTo(t,"keyup",n,{priority:"highest",useCapture:!0}),this._documents.has(e)||(this.listenTo(e,"mouseup",n,{priority:"highest",useCapture:!0}),this.listenTo(e,"selectionchange",((t,n)=>{this.document.isComposing&&!i.isAndroid||(this._handleSelectionChange(n,e),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(e))}stopObserving(t){this.stopListening(t)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(t,e){if(!this.isEnabled)return;const n=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(n);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(o)||!this.domConverter.isDomSelectionCorrect(n))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(o))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:o,domSelection:n};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class fc extends Ma{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",(()=>{e.isComposing=!0}),{priority:"low"}),e.on("compositionend",(()=>{e.isComposing=!1}),{priority:"low"})}onDomEvent(t){this.fire(t.type,t,{data:t.data})}}class kc{constructor(t,e={}){this._files=e.cacheFiles?bc(t):null,this._native=t}get files(){return this._files||(this._files=bc(this._native)),this._files}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}setDragImage(t,e,n){this._native.setDragImage(t,e,n)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function bc(t){const e=Array.from(t.files||[]),n=Array.from(t.items||[]);return e.length?e:n.filter((t=>"file"===t.kind)).map((t=>t.getAsFile()))}class wc extends Ma{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(t){const e=t.getTargetRanges(),n=this.view,o=n.document;let r=null,s=null,a=[];if(t.dataTransfer&&(r=new kc(t.dataTransfer)),null!==t.data?s=t.data:r&&(s=r.getData("text/plain")),o.selection.isFake)a=Array.from(o.selection.getRanges());else if(e.length)a=e.map((t=>{const e=n.domConverter.domPositionToView(t.startContainer,t.startOffset),o=n.domConverter.domPositionToView(t.endContainer,t.endOffset);return e?n.createRange(e,o):o?n.createRange(o):void 0})).filter((t=>!!t));else if(i.isAndroid){const e=t.target.ownerDocument.defaultView.getSelection();a=Array.from(n.domConverter.domSelectionToView(e).getRanges())}if(i.isAndroid&&"insertCompositionText"==t.inputType&&s&&s.endsWith("\n"))this.fire(t.type,t,{inputType:"insertParagraph",targetRanges:[n.createRange(a[0].end)]});else if("insertText"==t.inputType&&s&&s.includes("\n")){const e=s.split(/\n{1,2}/g);let n=a;for(let i=0;i{if(this.isEnabled&&((n=e.keyCode)==gi.arrowright||n==gi.arrowleft||n==gi.arrowup||n==gi.arrowdown)){const n=new vs(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,e),n.stop.called&&t.stop()}var n}))}observe(){}stopObserving(){}}class _c extends Ea{constructor(t){super(t);const e=this.document;e.on("keydown",((t,n)=>{if(!this.isEnabled||n.keyCode!=gi.tab||n.ctrlKey)return;const o=new vs(e,"tab",e.selection.getFirstRange());e.fire(o,n),o.stop.called&&t.stop()}))}observe(){}stopObserving(){}}const Cc=function(t){return bo(t,5)};class vc extends(U()){constructor(t){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Ss(t),this.domConverter=new _a(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new da(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Hs(this.document),this.addObserver(hc),this.addObserver(mc),this.addObserver(pc),this.addObserver(Sa),this.addObserver(qa),this.addObserver(fc),this.addObserver(Ac),this.addObserver(wc),this.addObserver(_c),this.document.on("arrowKey",aa,{priority:"low"}),zs(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),i.isiOS&&this.listenTo(this.document,"blur",((t,e)=>{this.domConverter.mapDomToView(e.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const o={};for(const{name:e,value:i}of Array.from(t.attributes))o[e]=i,"class"===e?this._writer.addClass(i.split(" "),n):this._writer.setAttribute(e,i,n);this._initialDomRootAttributes.set(t,o);const i=()=>{this._writer.setAttribute("contenteditable",(!n.isReadOnly).toString(),n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};i(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",((t,e)=>this._renderer.markToSync("children",e))),n.on("change:attributes",((t,e)=>this._renderer.markToSync("attributes",e))),n.on("change:text",((t,e)=>this._renderer.markToSync("text",e))),n.on("change:isReadOnly",(()=>this.change(i))),n.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const n of this._observers.values())n.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach((({name:t})=>e.removeAttribute(t)));const n=this._initialDomRootAttributes.get(e);for(const t in n)e.setAttribute(t,n[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e);for(const t of this._observers.values())t.stopObserving(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,n]of this.domRoots)e.observe(n,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection({alignToTop:t,forceScroll:e,viewportOffset:n=20,ancestorOffset:o=20}={}){const i=this.document.selection.getFirstRange();if(!i)return;const r=Cc({alignToTop:t,forceScroll:e,viewportOffset:n,ancestorOffset:o});"number"==typeof n&&(n={top:n,bottom:n,left:n,right:n});const s={target:this.domConverter.viewRangeToDom(i),viewportOffset:n,ancestorOffset:o,alignToTop:t,forceScroll:e};this.fire("scrollToTheSelection",s,r),function({target:t,viewportOffset:e=0,ancestorOffset:n=0,alignToTop:o,forceScroll:i}){const r=ai(t);let s=r,a=null;for(e=function(t){return"number"==typeof t?{top:t,bottom:t,left:t,right:t}:t}(e);s;){let c;c=ci(s==r?t:a),ni({parent:c,getRect:()=>li(t,s),alignToTop:o,ancestorOffset:n,forceScroll:i});const l=li(t,s);if(ei({window:s,rect:l,viewportOffset:e,alignToTop:o,forceScroll:i}),s.parent!=s){if(a=s.frameElement,s=s.parent,!a)return}else s=null}}(s)}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new k("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){k.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(mc).flush(),this.change((()=>{}))}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return bs._createAt(t,e)}createPositionAfter(t){return bs._createAfter(t)}createPositionBefore(t){return bs._createBefore(t)}createRange(t,e){return new ws(t,e)}createRangeOn(t){return ws._createOn(t)}createRangeIn(t){return ws._createIn(t)}createSelection(...t){return new _s(...t)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class yc{is(){throw new Error("is() method is abstract")}}class xc extends yc{constructor(t){super(),this.parent=null,this._attrs=$i(t)}get document(){return null}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new k("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new k("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Q(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o](t[e[0]]=e[1],t)),{})),t}_clone(t){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=$i(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}xc.prototype.is=function(t){return"node"===t||"model:node"===t};class Ec{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((t,e)=>t+e.offsetSize),0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce(((t,e)=>t+e.offsetSize),0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new k("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&t1e4)return t.slice(0,n).concat(e).concat(t.slice(n+o,t.length));{const i=Array.from(t);return i.splice(n,o,...e),i}}(this._nodes,Array.from(e),t,0)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map((t=>t.toJSON()))}}class Dc extends xc{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new Dc(this.data,this.getAttributes())}static fromJSON(t){return new Dc(t.data,t.attributes)}}Dc.prototype.is=function(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t};class Ic extends yc{constructor(t,e,n){if(super(),this.textNode=t,e<0||e>t.offsetSize)throw new k("model-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.offsetSize)throw new k("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Ic.prototype.is=function(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t};class Mc extends xc{constructor(t,e,n){super(e),this._children=new Ec,this.name=t,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}findAncestor(t,e={}){let n=e.includeSelf?this:this.parent;for(;n;){if(n.name===t)return n;n=n.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map((t=>t._clone(!0))):void 0;return new Mc(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Dc(t)];Z(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Dc(t):t instanceof Ic?new Dc(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}static fromJSON(t){let e;if(t.children){e=[];for(const n of t.children)n.name?e.push(Mc.fromJSON(n)):e.push(Dc.fromJSON(n))}return new Mc(t.name,t.attributes,e)}}Mc.prototype.is=function(t,e){return e?e===this.name&&("element"===t||"model:element"===t):"element"===t||"model:element"===t||"node"===t||"model:node"===t};class Sc{constructor(t){if(!t||!t.boundaries&&!t.startPosition)throw new k("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new k("model-tree-walker-unknown-direction",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this._position=t.startPosition.clone():this._position=Bc._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(t){let e,n,o,i;do{o=this.position,i=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this._position=o,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const o=Nc(e,n),i=o||Pc(e,n,o);if(i instanceof Mc){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e.path.push(0),this._visitedParent=i;return this._position=e,Tc("elementStart",i,t,e,1)}if(i instanceof Dc){let o;if(this.singleCharacters)o=1;else{let t=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsett&&(t=this.boundaries.start.offset),o=e.offset-t}const i=e.offset-r.startOffset,s=new Ic(r,i-o,o);return e.offset-=o,this._position=e,Tc("text",s,t,e,o)}return e.path.pop(),this._position=e,this._visitedParent=n.parent,Tc("elementStart",n,t,e,1)}}function Tc(t,e,n,o,i){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}class Bc extends yc{constructor(t,e,n="toNone"){if(super(),!t.is("element")&&!t.is("documentFragment"))throw new k("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new k("model-position-path-incorrect-format",t,{path:e});t.is("rootElement")?e=e.slice():(e=[...t.getPath(),...e],t=t.root),this.root=t,this.path=e,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e1)return!1;if(1===e)return Lc(t,this,n);if(-1===e)return Lc(this,t,n)}return this.path.length===t.path.length||(this.path.length>t.path.length?zc(this.path,e):zc(t.path,e))}hasSameParentAs(t){if(this.root!==t.root)return!1;return"same"==Q(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Bc._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.start.isEqual(this)?(n=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(n=n._getTransformedByDeletion(t.deletionPosition,1))):n=this.isEqual(t.deletionPosition)?Bc._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=Bc._createAt(this);if(this.root!=t.root)return n;if("same"==Q(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;n.offset-=e}}else if("prefix"==Q(t.getParentPath(),this.getParentPath())){const o=t.path.length-1;if(t.offset<=this.path[o]){if(t.offset+e>this.path[o])return null;n.path[o]-=e}}return n}_getTransformedByInsertion(t,e){const n=Bc._createAt(this);if(this.root!=t.root)return n;if("same"==Q(t.getParentPath(),this.getParentPath()))(t.offset=e;){if(t.path[o]+i!==n.maxOffset)return!1;i=1,o--,n=n.parent}return!0}(t,n+1))}function zc(t,e){for(;ee+1;){const e=o.maxOffset-n.offset;0!==e&&t.push(new Rc(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],o=e-n.offset;0!==o&&t.push(new Rc(n,n.getShiftedBy(o))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new Sc(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new Sc(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new Sc(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new Rc(this.start,this.end)]}getTransformedByOperations(t){const e=[new Rc(this.start,this.end)];for(const n of t)for(let t=0;t0?new this(n,o):new this(o,n)}static _createIn(t){return new this(Bc._createAt(t,0),Bc._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Bc._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new k("range-create-from-ranges-empty-array",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort(((t,e)=>t.start.isAfter(e.start)?1:-1));const n=t.indexOf(e),o=new this(e.start,e.end);if(n>0)for(let e=n-1;t[e].end.isEqual(o.start);e++)o.start=Bc._createAt(t[e].start);for(let e=n+1;e{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);if(!n)throw new k("mapping-model-position-view-parent-not-found",this,{modelPosition:e.modelPosition});e.viewPosition=this.findPositionIn(n,e.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),o=this._viewToModelMapping.get(n),i=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=Bc._createAt(o,i)}),{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t,e={}){const n=this.toModelElement(t);if(this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);e.defer?this._deferredBindingRemovals.set(t,t.root):(this._viewToModelMapping.delete(t),this._modelToViewMapping.get(n)==t&&this._modelToViewMapping.delete(n))}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const o=this._elementToMarkerNames.get(t)||new Set;o.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,o)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const o=this._elementToMarkerNames.get(t);o&&(o.delete(e),0==o.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}flushDeferredBindings(){for(const[t,e]of this._deferredBindingRemovals)t.root==e&&this.unbindViewElement(t);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new Rc(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new ws(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())n.add(e);else n.add(t);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t){return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let o=0;for(let n=0;n1?e[0]+":"+e[1]:e[0]}var Hc=Object.defineProperty,Uc=Object.defineProperties,qc=Object.getOwnPropertyDescriptors,Gc=Object.getOwnPropertySymbols,Wc=Object.prototype.hasOwnProperty,Kc=Object.prototype.propertyIsEnumerable,$c=(t,e,n)=>e in t?Hc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yc=(t,e)=>{for(var n in e||(e={}))Wc.call(e,n)&&$c(t,n,e[n]);if(Gc)for(var n of Gc(e))Kc.call(e,n)&&$c(t,n,e[n]);return t},Qc=(t,e)=>Uc(t,qc(e));class Zc extends(I()){constructor(t){super(),this._conversionApi=Yc({dispatcher:this},t),this._firedEventsMap=new WeakMap}convertChanges(t,e,n){const o=this._createConversionApi(n,t.getRefreshedItems());for(const e of t.getMarkersToRemove())this._convertMarkerRemove(e.name,e.range,o);const i=this._reduceChanges(t.getChanges());for(const t of i)"insert"===t.type?this._convertInsert(Rc._createFromPositionAndShift(t.position,t.length),o):"reinsert"===t.type?this._convertReinsert(Rc._createFromPositionAndShift(t.position,t.length),o):"remove"===t.type?this._convertRemove(t.position,t.length,t.name,o):this._convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,o);o.mapper.flushDeferredBindings();for(const t of o.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this._convertMarkerRemove(t,n,o),this._convertMarkerAdd(t,n,o)}for(const e of t.getMarkersToAdd())this._convertMarkerAdd(e.name,e.range,o);o.consumable.verifyAllConsumed("insert")}convert(t,e,n,o={}){const i=this._createConversionApi(n,void 0,o);this._convertInsert(t,i);for(const[t,n]of e)this._convertMarkerAdd(t,n,i);i.consumable.verifyAllConsumed("insert")}convertSelection(t,e,n){const o=this._createConversionApi(n);this.fire("cleanSelection",{selection:t},o);const i=t.getFirstPosition().root;if(!o.mapper.toViewElement(i))return;const r=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this._addConsumablesForSelection(o.consumable,t,r),this.fire("selection",{selection:t},o),t.isCollapsed){for(const e of r)if(o.consumable.test(t,"addMarker:"+e.name)){const n=e.getRange();if(!Jc(t.getFirstPosition(),e,o.mapper))continue;const i={item:t,markerName:e.name,markerRange:n};this.fire(`addMarker:${e.name}`,i,o)}for(const e of t.getAttributeKeys())if(o.consumable.test(t,"attribute:"+e)){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.fire(`attribute:${e}:$text`,n,o)}}}_convertInsert(t,e,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(e.consumable,t);for(const n of Array.from(t.getWalker({shallow:!0})).map(Xc))this._testAndFire("insert",n,e)}_convertRemove(t,e,n,o){this.fire(`remove:${n}`,{position:t,length:e},o)}_convertAttribute(t,e,n,o,i){this._addConsumablesForRange(i.consumable,t,`attribute:${e}`);for(const r of t){const t={item:r.item,range:Rc._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:e,attributeOldValue:n,attributeNewValue:o};this._testAndFire(`attribute:${e}`,t,i)}}_convertReinsert(t,e){const n=Array.from(t.getWalker({shallow:!0}));this._addConsumablesForInsert(e.consumable,n);for(const t of n.map(Xc))this._testAndFire("insert",Qc(Yc({},t),{reconversion:!0}),e)}_convertMarkerAdd(t,e,n){if("$graveyard"==e.root.rootName)return;const o=`addMarker:${t}`;if(n.consumable.add(e,o),this.fire(o,{markerName:t,markerRange:e},n),n.consumable.consume(e,o)){this._addConsumablesForRange(n.consumable,e,o);for(const i of e.getItems()){if(!n.consumable.test(i,o))continue;const r={item:i,range:Rc._createOn(i),markerName:t,markerRange:e};this.fire(o,r,n)}}}_convertMarkerRemove(t,e,n){"$graveyard"!=e.root.rootName&&this.fire(`removeMarker:${t}`,{markerName:t,markerRange:e},n)}_reduceChanges(t){const e={changes:t};return this.fire("reduceChanges",e),e.changes}_addConsumablesForInsert(t,e){for(const n of e){const e=n.item;if(null===t.test(e,"insert")){t.add(e,"insert");for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n)}}return t}_addConsumablesForRange(t,e,n){for(const o of e.getItems())t.add(o,n);return t}_addConsumablesForSelection(t,e,n){t.add(e,"selection");for(const o of n)t.add(e,"addMarker:"+o.name);for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n);return t}_testAndFire(t,e,n){const o=function(t,e){const n=e.item.is("element")?e.item.name:"$text";return`${t}:${n}`}(t,e),i=e.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(e.item):e.item,r=this._firedEventsMap.get(n),s=r.get(i);if(s){if(s.has(o))return;s.add(o)}else r.set(i,new Set([o]));this.fire(o,e,n)}_testAndFireAddAttributes(t,e){const n={item:t,range:Rc._createOn(t)};for(const t of n.item.getAttributeKeys())n.attributeKey=t,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(t),this._testAndFire(`attribute:${t}`,n,e)}_createConversionApi(t,e=new Set,n={}){const o=Qc(Yc({},this._conversionApi),{consumable:new Fc,writer:t,options:n,convertItem:t=>this._convertInsert(Rc._createOn(t),o),convertChildren:t=>this._convertInsert(Rc._createIn(t),o,{doNotAddConsumables:!0}),convertAttributes:t=>this._testAndFireAddAttributes(t,o),canReuseView:t=>!e.has(o.mapper.toModelElement(t))});return this._firedEventsMap.set(o,new Map),o}}function Jc(t,e,n){const o=e.getRange(),i=Array.from(t.getAncestors());i.shift(),i.reverse();return!i.some((t=>{if(o.containsItem(t)){return!!n.toViewElement(t).getCustomProperty("addHighlight")}}))}function Xc(t){return{item:t.item,range:Rc._createFromPositionAndShift(t.previousPosition,t.length)}}class tl extends(I(yc)){constructor(...t){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],t.length&&this.setTo(...t)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new Rc(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new Rc(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new Rc(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(...t){let[e,n,o]=t;if("object"==typeof n&&(o=n,n=void 0),null===e)this._setRanges([]);else if(e instanceof tl)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof Rc)this._setRanges([e],!!o&&!!o.backward);else if(e instanceof Bc)this._setRanges([new Rc(e)]);else if(e instanceof xc){const t=!!o&&!!o.backward;let i;if("in"==n)i=Rc._createIn(e);else if("on"==n)i=Rc._createOn(e);else{if(void 0===n)throw new k("model-selection-setto-required-second-parameter",[this,e]);i=new Rc(Bc._createAt(e,n))}this._setRanges([i],t)}else{if(!Z(e))throw new k("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,o&&!!o.backward)}}_setRanges(t,e=!1){const n=Array.from(t),o=n.some((e=>{if(!(e instanceof Rc))throw new k("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every((t=>!t.isEqual(e)))}));(n.length!==this._ranges.length||o)&&(this._replaceAllRanges(n),this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0}))}setFocus(t,e){if(null===this.anchor)throw new k("model-selection-setfocus-no-ranges",[this,t]);const n=Bc._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(o)?(this._pushRange(new Rc(n,o)),this._lastRangeBackward=!0):(this._pushRange(new Rc(o,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=ol(e.start,t);rl(n,e)&&(yield n);for(const n of e.getWalker()){const o=n.item;"elementEnd"==n.type&&nl(o,t,e)&&(yield o)}const o=ol(e.end,t);sl(o,e)&&(yield o)}}containsEntireContent(t=this.anchor.root){const e=Bc._createAt(t,0),n=Bc._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new Rc(t.start,t.end))}_checkRange(t){for(let e=0;e0;)this._popRange()}_popRange(){this._ranges.pop()}}function el(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&!!t.parent)}function nl(t,e,n){return el(t,e)&&il(t,n)}function ol(t,e){const n=t.parent.root.document.model.schema,o=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=o.find((t=>!i&&(i=n.isLimit(t),!i&&el(t,e))));return o.forEach((t=>e.add(t))),r}function il(t,e){const n=function(t){const e=t.root.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}(t);if(!n)return!0;return!e.containsRange(Rc._createOn(n),!0)}function rl(t,e){return!!t&&(!(!e.isCollapsed&&!t.isEmpty)||!e.start.isTouching(Bc._createAt(t,t.maxOffset))&&il(t,e))}function sl(t,e){return!!t&&(!(!e.isCollapsed&&!t.isEmpty)||!e.end.isTouching(Bc._createAt(t,0))&&il(t,e))}tl.prototype.is=function(t){return"selection"===t||"model:selection"===t};class al extends(I(Rc)){constructor(t,e){super(t,e),cl.call(this)}detach(){this.stopListening()}toRange(){return new Rc(this.start,this.end)}static fromRange(t){return new al(t.start,t.end)}}function cl(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&ll.call(this,n)}),{priority:"low"})}function ll(t){const e=this.getTransformedByOperation(t),n=Rc._createFromRanges(e),o=!n.isEqual(this),i=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(o){"$graveyard"==n.root.rootName&&(r="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:r})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:r})}al.prototype.is=function(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t};const dl="selection:";class ul extends(I(yc)){constructor(t){super(),this._selection=new hl(t),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(...t){this._selection.setTo(...t)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return dl+t}static _isStoreAttributeKey(t){return t.startsWith(dl)}}ul.prototype.is=function(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t};class hl extends tl{constructor(t){super(),this.markers=new qi({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=t.model,this._document=t,this.listenTo(this._model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((t,e,n,o)=>{this._updateMarker(e,o)})),this.listenTo(this._document,"change",((t,e)=>{!function(t,e){const n=t.document.differ;for(const o of n.getChanges()){if("insert"!=o.type)continue;const n=o.position.parent;o.length===n.maxOffset&&t.enqueueChange(e,(t=>{const e=Array.from(n.getAttributeKeys()).filter((t=>t.startsWith(dl)));for(const o of e)t.removeAttribute(o,n)}))}}(this._model,e)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t{if(this._hasChangedRange=!0,e.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const t=this._ranges.indexOf(e);this._ranges.splice(t,1),e.detach()}})),e}updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let e=!1;for(const e of this._model.markers){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const o=e.getRange();for(const n of this.getRanges())o.containsRange(n,!n.isCollapsed)&&t.push(e)}const n=Array.from(this.markers);for(const n of t)this.markers.has(n)||(this.markers.add(n),e=!0);for(const n of Array.from(this.markers))t.includes(n)||(this.markers.remove(n),e=!0);e&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(t,e){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let o=!1;const i=Array.from(this.markers),r=this.markers.has(t);if(e){let n=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(t),o=!0):!n&&r&&(this.markers.remove(t),o=!0)}else r&&(this.markers.remove(t),o=!0);o&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(t){const e=$i(this._getSurroundingAttributes()),n=$i(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const o=[];for(const[t,e]of this.getAttributes())n.has(t)&&n.get(t)===e||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(t,e,n=!0){const o=n?"normal":"low";if("low"==o&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,o),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,n),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,n]of this.getAttributes())t.get(e)!==n&&this._removeAttribute(e,!1);for(const[n,o]of t){this._setAttribute(n,o,!1)&&e.add(n)}return e}*getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith(dl)){const n=e.substr(10);yield[n,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;if("$graveyard"==t.root.rootName)return null;let n=null;if(this.isCollapsed){const o=t.textNode?t.textNode:t.nodeBefore,i=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=gl(o,e)),n||(n=gl(i,e)),!this.isGravityOverridden&&!n){let t=o;for(;t&&!n;)t=t.previousSibling,n=gl(t,e)}if(!n){let t=i;for(;t&&!n;)t=t.nextSibling,n=gl(t,e)}n||(n=this.getStoredAttributes())}else{const t=this.getFirstRange();for(const o of t){if(o.item.is("element")&&e.isObject(o.item)){n=gl(o.item,e);break}if("text"==o.type){n=o.item.getAttributes();break}}}return n}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function gl(t,e){if(!t)return null;if(t instanceof Ic||t instanceof Dc)return t.getAttributes();if(!e.isInline(t))return null;if(!e.isObject(t))return[];const n=[];for(const[o,i]of t.getAttributes())e.checkAttribute("$text",o)&&!1!==e.getAttributeProperties(o).copyFromObject&&n.push([o,i]);return n}class ml{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}class pl extends ml{elementToElement(t){return this.add(function(t){const e=bl(t.model),n=wl(t.view,"container");e.attributes.length&&(e.children=!0);return o=>{o.on(`insert:${e.name}`,function(t,e=Dl){return(n,o,i)=>{if(!e(o.item,i.consumable,{preflight:!0}))return;const r=t(o.item,i,o);if(!r)return;e(o.item,i.consumable);const s=i.mapper.toViewPosition(o.range.start);i.mapper.bindElements(o.item,r),i.writer.insert(s,r),i.convertAttributes(o.item),xl(r,o.item.getChildren(),i,{reconversion:o.reconversion})}}(n,yl(e)),{priority:t.converterPriority||"normal"}),(e.children||e.attributes.length)&&o.on("reduceChanges",vl(e),{priority:"low"})}}(t))}elementToStructure(t){return this.add(function(t){const e=bl(t.model),n=wl(t.view,"container");return e.children=!0,o=>{if(o._conversionApi.schema.checkChild(e.name,"$text"))throw new k("conversion-element-to-structure-disallowed-text",o,{elementName:e.name});var i,r;o.on(`insert:${e.name}`,(i=n,r=yl(e),(t,e,n)=>{if(!r(e.item,n.consumable,{preflight:!0}))return;const o=new Map;n.writer._registerSlotFactory(function(t,e,n){return(o,i)=>{const r=o.createContainerElement("$slot");let s=null;if("children"===i)s=Array.from(t.getChildren());else{if("function"!=typeof i)throw new k("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:i});s=Array.from(t.getChildren()).filter((t=>i(t)))}return e.set(r,s),r}}(e.item,o,n));const s=i(e.item,n,e);if(n.writer._clearSlotFactory(),!s)return;!function(t,e,n){const o=Array.from(e.values()).flat(),i=new Set(o);if(i.size!=o.length)throw new k("conversion-slot-filter-overlap",n.dispatcher,{element:t});if(i.size!=t.childCount)throw new k("conversion-slot-filter-incomplete",n.dispatcher,{element:t})}(e.item,o,n),r(e.item,n.consumable);const a=n.mapper.toViewPosition(e.range.start);n.mapper.bindElements(e.item,s),n.writer.insert(a,s),n.convertAttributes(e.item),function(t,e,n,o){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let i=null,r=null;for([i,r]of e)xl(t,r,n,o),n.writer.move(n.writer.createRangeIn(i),n.writer.createPositionBefore(i)),n.writer.remove(i);function s(t,e){const n=e.modelPosition.nodeAfter,o=r.indexOf(n);o<0||(e.viewPosition=e.mapper.findPositionIn(i,o))}n.mapper.off("modelToViewPosition",s)}(s,o,n,{reconversion:e.reconversion})}),{priority:t.converterPriority||"normal"}),o.on("reduceChanges",vl(e),{priority:"low"})}}(t))}attributeToElement(t){return this.add(function(t){t=Cc(t);let e=t.model;"string"==typeof e&&(e={key:e});let n=`attribute:${e.key}`;e.name&&(n+=":"+e.name);if(e.values)for(const n of e.values)t.view[n]=wl(t.view[n],"attribute");else t.view=wl(t.view,"attribute");const o=Al(t);return e=>{e.on(n,function(t){return(e,n,o)=>{if(!o.consumable.test(n.item,e.name))return;const i=t(n.attributeOldValue,o,n),r=t(n.attributeNewValue,o,n);if(!i&&!r)return;o.consumable.consume(n.item,e.name);const s=o.writer,a=s.document.selection;if(n.item instanceof tl||n.item instanceof ul)s.wrap(a.getFirstRange(),r);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&i&&(t=s.unwrap(t,i)),null!==n.attributeNewValue&&r&&s.wrap(t,r)}}}(o),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=Cc(t);let e=t.model;"string"==typeof e&&(e={key:e});let n=`attribute:${e.key}`;e.name&&(n+=":"+e.name);if(e.values)for(const n of e.values)t.view[n]=_l(t.view[n]);else t.view=_l(t.view);const o=Al(t);return e=>{var i;e.on(n,(i=o,(t,e,n)=>{if(!n.consumable.test(e.item,t.name))return;const o=i(e.attributeOldValue,n,e),r=i(e.attributeNewValue,n,e);if(!o&&!r)return;n.consumable.consume(e.item,t.name);const s=n.mapper.toViewElement(e.item),a=n.writer;if(!s)throw new k("conversion-attribute-to-attribute-on-text",n.dispatcher,e);if(null!==e.attributeOldValue&&o)if("class"==o.key){const t="string"==typeof o.value?o.value.split(/\s+/):o.value;for(const e of t)a.removeClass(e,s)}else if("style"==o.key)if("string"==typeof o.value){const t=new ss(a.document.stylesProcessor);t.setTo(o.value);for(const[e]of t.getStylesEntries())a.removeStyle(e,s)}else{const t=Object.keys(o.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(o.key,s);if(null!==e.attributeNewValue&&r)if("class"==r.key){const t="string"==typeof r.value?r.value.split(/\s+/):r.value;for(const e of t)a.addClass(e,s)}else if("style"==r.key)if("string"==typeof r.value){const t=new ss(a.document.stylesProcessor);t.setTo(r.value);for(const[e,n]of t.getStylesEntries())a.setStyle(e,n,s)}else{const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){const e=wl(t.view,"ui");return n=>{var o;n.on(`addMarker:${t.model}`,(o=e,(t,e,n)=>{e.isOpening=!0;const i=o(e,n);e.isOpening=!1;const r=o(e,n);if(!i||!r)return;const s=e.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,t.name))return;for(const e of s)if(!n.consumable.consume(e.item,t.name))return;const a=n.mapper,c=n.writer;c.insert(a.toViewPosition(s.start),i),n.mapper.bindElementToMarker(i,e.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),n.on(`removeMarker:${t.model}`,((t,e,n)=>{const o=n.mapper.markerNameToElements(e.markerName);if(o){for(const t of o)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var n;e.on(`addMarker:${t.model}`,(n=t.view,(t,e,o)=>{if(!e.item)return;if(!(e.item instanceof tl||e.item instanceof ul||e.item.is("$textProxy")))return;const i=Cl(n,e,o);if(!i)return;if(!o.consumable.consume(e.item,t.name))return;const r=o.writer,s=fl(r,i),a=r.document.selection;if(e.item instanceof tl||e.item instanceof ul)r.wrap(a.getFirstRange(),s);else{const t=o.mapper.toViewRange(e.range),n=r.wrap(t,s);for(const t of n.getItems())if(t.is("attributeElement")&&t.isSimilar(s)){o.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on(`addMarker:${t.model}`,function(t){return(e,n,o)=>{if(!n.item)return;if(!(n.item instanceof Mc))return;const i=Cl(t,n,o);if(!i)return;if(!o.consumable.test(n.item,e.name))return;const r=o.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){o.consumable.consume(n.item,e.name);for(const t of Rc._createIn(n.item))o.consumable.consume(t.item,e.name);r.getCustomProperty("addHighlight")(r,i,o.writer),o.mapper.bindElementToMarker(r,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on(`removeMarker:${t.model}`,function(t){return(e,n,o)=>{if(n.markerRange.isCollapsed)return;const i=Cl(t,n,o);if(!i)return;const r=fl(o.writer,i),s=o.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)if(o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement"))o.writer.unwrap(o.writer.createRangeOn(t),r);else{t.getCustomProperty("removeHighlight")(t,i.id,o.writer)}o.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){t=Cc(t);const e=t.model;let n=t.view;n||(n=n=>({group:e,name:n.substr(t.model.length+1)}));return o=>{var i;o.on(`addMarker:${e}`,(i=n,(t,e,n)=>{const o=i(e.markerName,n);if(!o)return;const r=e.markerRange;n.consumable.consume(r,t.name)&&(kl(r,!1,n,e,o),kl(r,!0,n,e,o),t.stop())}),{priority:t.converterPriority||"normal"}),o.on(`removeMarker:${e}`,function(t){return(e,n,o)=>{const i=t(n.markerName,o);if(!i)return;const r=o.mapper.markerNameToElements(n.markerName);if(r){for(const t of r)o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("containerElement")?(s(`data-${i.group}-start-before`,t),s(`data-${i.group}-start-after`,t),s(`data-${i.group}-end-before`,t),s(`data-${i.group}-end-after`,t)):o.writer.clear(o.writer.createRangeOn(t),t);o.writer.clearClonedElementsGroup(n.markerName),e.stop()}function s(t,e){if(e.hasAttribute(t)){const n=new Set(e.getAttribute(t).split(","));n.delete(i.name),0==n.size?o.writer.removeAttribute(t,e):o.writer.setAttribute(t,Array.from(n).join(","),e)}}}}(n),{priority:t.converterPriority||"normal"})}}(t))}}function fl(t,e){const n=t.createAttributeElement("span",e.attributes);return e.classes&&n._addClass(e.classes),"number"==typeof e.priority&&(n._priority=e.priority),n._id=e.id,n}function kl(t,e,n,o,i){const r=e?t.start:t.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let t,r;e&&s||!e&&!a?(t=s,r=!0):(t=a,r=!1);const c=n.mapper.toViewElement(t);if(c)return void function(t,e,n,o,i,r){const s=`data-${r.group}-${e?"start":"end"}-${n?"before":"after"}`,a=t.hasAttribute(s)?t.getAttribute(s).split(","):[];a.unshift(r.name),o.writer.setAttribute(s,a.join(","),t),o.mapper.bindElementToMarker(t,i.markerName)}(c,e,r,n,o,i)}!function(t,e,n,o,i){const r=`${i.group}-${e?"start":"end"}`,s=i.name?{name:i.name}:null,a=n.writer.createUIElement(r,s);n.writer.insert(t,a),n.mapper.bindElementToMarker(a,o.markerName)}(n.mapper.toViewPosition(r),e,n,o,i)}function bl(t){return"string"==typeof t&&(t={name:t}),{name:t.name,attributes:t.attributes?wi(t.attributes):[],children:!!t.children}}function wl(t,e){return"function"==typeof t?t:(n,o)=>function(t,e,n){"string"==typeof t&&(t={name:t});let o;const i=e.writer,r=Object.assign({},t.attributes);if("container"==n)o=i.createContainerElement(t.name,r);else if("attribute"==n){const e={priority:t.priority||Ts.DEFAULT_PRIORITY};o=i.createAttributeElement(t.name,r,e)}else o=i.createUIElement(t.name,r);if(t.styles){const e=Object.keys(t.styles);for(const n of e)i.setStyle(n,t.styles[n],o)}if(t.classes){const e=t.classes;if("string"==typeof e)i.addClass(e,o);else for(const t of e)i.addClass(t,o)}return o}(t,o,e)}function Al(t){return t.model.values?(e,n,o)=>{const i=t.view[e];return i?i(e,n,o):null}:t.view}function _l(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function Cl(t,e,n){const o="function"==typeof t?t(e,n):t;return o?(o.priority||(o.priority=10),o.id||(o.id=e.markerName),o):null}function vl(t){const e=function(t){return(e,n)=>{if(!e.is("element",t.name))return!1;if("attribute"==n.type){if(t.attributes.includes(n.attributeKey))return!0}else if(t.children)return!0;return!1}}(t);return(t,n)=>{const o=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const t of n.changes){const i="attribute"==t.type?t.range.start.nodeAfter:t.position.parent;if(i&&e(i,t)){if(!n.reconvertedElements.has(i)){n.reconvertedElements.add(i);const t=Bc._createBefore(i);let e=o.length;for(let n=o.length-1;n>=0;n--){const i=o[n],r=("attribute"==i.type?i.range.start:i.position).compareWith(t);if("before"==r||"remove"==i.type&&"same"==r)break;e=n}o.splice(e,0,{type:"remove",name:i.name,position:t,length:1},{type:"reinsert",name:i.name,position:t,length:1})}}else o.push(t)}n.changes=o}}function yl(t){return(e,n,o={})=>{const i=["insert"];for(const n of t.attributes)e.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every((t=>n.test(e,t)))&&(o.preflight||i.forEach((t=>n.consume(e,t))),!0)}}function xl(t,e,n,o){for(const i of e)El(t.root,i,n,o)||n.convertItem(i)}function El(t,e,n,o){const{writer:i,mapper:r}=n;if(!o.reconversion)return!1;const s=r.toViewElement(e);return!(!s||s.root==t)&&(!!n.canReuseView(s)&&(i.move(i.createRangeOn(s),r.toViewPosition(Bc._createBefore(e))),!0))}function Dl(t,e,{preflight:n}={}){return n?e.test(t,"insert"):e.consume(t,"insert")}function Il(t){const{schema:e,document:n}=t.model;for(const o of n.getRoots())if(o.isEmpty&&!e.checkChild(o,"$text")&&e.checkChild(o,"paragraph"))return t.insertElement("paragraph",o),!0;return!1}function Ml(t,e,n){const o=n.createContext(t);return!!n.checkChild(o,"paragraph")&&!!n.checkChild(o.push("paragraph"),e)}function Sl(t,e){const n=e.createElement("paragraph");return e.insert(n,t),e.createPositionAt(n,0)}var Tl=Object.defineProperty,Bl=Object.defineProperties,Nl=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Ll=Object.prototype.propertyIsEnumerable,zl=(t,e,n)=>e in t?Tl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Rl extends ml{elementToElement(t){return this.add(jl(t))}elementToAttribute(t){return this.add(function(t){t=Cc(t),Hl(t);const e=Ul(t,!1),n=Fl(t.view),o=n?`element:${n}`:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=Cc(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key,n=void 0===t.view.value?/[\s\S]*/:t.view.value;let o;if("class"==e||"style"==e){const t="class"==e?"classes":"styles";o={[t]:n}}else o={attributes:{[e]:n}};t.view.name&&(o.name=t.view.name);return t.view=o,e}(t));Hl(t,e);const n=Ul(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){const e=function(t){return(e,n)=>{const o="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":o})}}(t.model);return jl((n=((t,e)=>{for(var n in e||(e={}))Ol.call(e,n)&&zl(t,n,e[n]);if(Pl)for(var n of Pl(e))Ll.call(e,n)&&zl(t,n,e[n]);return t})({},t),o={model:e},Bl(n,Nl(o))));var n,o}(t))}dataToMarker(t){return this.add(function(t){t=Cc(t),t.model||(t.model=e=>e?t.view+":"+e:t.view);const e={view:t.view,model:t.model},n=Vl(ql(e,"start")),o=Vl(ql(e,"end"));return i=>{i.on(`element:${t.view}-start`,n,{priority:t.converterPriority||"normal"}),i.on(`element:${t.view}-end`,o,{priority:t.converterPriority||"normal"});const r=m.low,s=m.highest,a=m.get(t.converterPriority)/s;i.on("element",function(t){return(e,n,o)=>{const i=`data-${t.view}`;function r(e,i){for(const r of i){const i=t.model(r,o),s=o.writer.createElement("$marker",{"data-name":i});o.writer.insert(s,e),n.modelCursor.isEqual(e)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(e,1),n.modelRange=n.modelRange._getTransformedByInsertion(e,1)[0]}}(o.consumable.test(n.viewItem,{attributes:i+"-end-after"})||o.consumable.test(n.viewItem,{attributes:i+"-start-after"})||o.consumable.test(n.viewItem,{attributes:i+"-end-before"})||o.consumable.test(n.viewItem,{attributes:i+"-start-before"}))&&(n.modelRange||Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor)),o.consumable.consume(n.viewItem,{attributes:i+"-end-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-end-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-start-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-end-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-end-before").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-start-before").split(",")))}}(e),{priority:r+a})}}(t))}}function jl(t){const e=Vl(t=Cc(t)),n=Fl(t.view),o=n?`element:${n}`:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"normal"})}}function Fl(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function Vl(t){const e=new Sr(t.view);return(n,o,i)=>{const r=e.match(o.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!i.consumable.test(o.viewItem,s))return;const a=function(t,e,n){return t instanceof Function?t(e,n):n.writer.createElement(t)}(t.model,o.viewItem,i);a&&i.safeInsert(a,o.modelCursor)&&(i.consumable.consume(o.viewItem,s),i.convertChildren(o.viewItem,a),i.updateConversionResult(a,o))}}function Hl(t,e=null){const n=null===e||(t=>t.getAttribute(e)),o="object"!=typeof t.model?t.model:t.model.key,i="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:o,value:i}}function Ul(t,e){const n=new Sr(t.view);return(o,i,r)=>{if(!i.modelRange&&e)return;const s=n.match(i.viewItem);if(!s)return;if(!function(t,e){const n="function"==typeof t?t(e):t;if("object"==typeof n&&!Fl(n))return!1;return!n.classes&&!n.attributes&&!n.styles}(t.view,i.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(i.viewItem,s.match))return;const a=t.model.key,c="function"==typeof t.model.value?t.model.value(i.viewItem,r):t.model.value;if(null===c)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const l=function(t,e,n,o){let i=!1;for(const r of Array.from(t.getItems({shallow:n})))o.schema.checkAttribute(r,e.key)&&(i=!0,r.hasAttribute(e.key)||o.writer.setAttribute(e.key,e.value,r));return i}(i.modelRange,{key:a,value:c},e,r);l&&(r.consumable.test(i.viewItem,{name:!0})&&(s.match.name=!0),r.consumable.consume(i.viewItem,s.match))}}function ql(t,e){return{view:`${t.view}-${e}`,model:(e,n)=>{const o=e.getAttribute("name"),i=t.model(o,n);return n.writer.createElement("$marker",{"data-name":i})}}}function Gl(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.selection,o=e.schema,i=[];let r=!1;for(const t of n.getRanges()){const e=Wl(t,o);e&&!e.isEqual(t)?(i.push(e),r=!0):i.push(t)}r&&t.setSelection(function(t){const e=[...t],n=new Set;let o=1;for(;o!n.has(e)))}(i),{backward:n.isBackward});return!1}(e,t)))}function Wl(t,e){return t.isCollapsed?function(t,e){const n=t.start,o=e.getNearestSelectionRange(n);if(!o){const t=n.getAncestors().reverse().find((t=>e.isObject(t)));return t?Rc._createOn(t):null}if(!o.isCollapsed)return o;const i=o.start;if(n.isEqual(i))return null;return new Rc(i)}(t,e):function(t,e){const{start:n,end:o}=t,i=e.checkChild(n,"$text"),r=e.checkChild(o,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(o);if(s===a){if(i&&r)return null;if(function(t,e,n){const o=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),i=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return o||i}(n,o,e)){const t=n.nodeAfter&&e.isSelectable(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),i=o.nodeBefore&&e.isSelectable(o.nodeBefore)?null:e.getNearestSelectionRange(o,"backward"),r=t?t.start:n,s=i?i.end:o;return new Rc(r,s)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const t=n.nodeAfter&&o.nodeBefore&&n.nodeAfter.parent===o.nodeBefore.parent,i=c&&(!t||!$l(n.nodeAfter,e)),r=l&&(!t||!$l(o.nodeBefore,e));let d=n,u=o;return i&&(d=Bc._createBefore(Kl(s,e))),r&&(u=Bc._createAfter(Kl(a,e))),new Rc(d,u)}return null}(t,e)}function Kl(t,e){let n=t,o=n;for(;e.isLimit(o)&&o.parent;)n=o,o=o.parent;return n}function $l(t,e){return t&&e.isSelectable(t)}class Yl extends(U()){constructor(t,e){super(),this.model=t,this.view=new vc(e),this.mapper=new jc,this.downcastDispatcher=new Zc({mapper:this.mapper,schema:t.schema});const n=this.model.document,o=n.selection,r=this.model.markers;var s,a,c;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(n,"change",(()=>{this.view.change((t=>{this.downcastDispatcher.convertChanges(n.differ,r,t),this.downcastDispatcher.convertSelection(o,r,t)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(n,o)=>{const i=o.newSelection,r=[];for(const t of i.getRanges())r.push(e.toModelRange(t));const s=t.createSelection(r,{backward:i.isBackward});s.isEqual(t.document.selection)||t.change((t=>{t.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(s=this.mapper,a=this.model.schema,c=this.view,(t,e)=>{if(!c.document.isComposing||i.isAndroid)for(let t=0;t{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((t,e,n)=>{const o=n.mapper.toViewPosition(e.position),i=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(i,{isPhantom:!0}),s=n.writer.createRange(o,r),a=n.writer.remove(s.getTrimmed());for(const t of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(t,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((t,e,n)=>{const o=n.writer,i=o.document.selection;for(const t of i.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&n.writer.mergeAttributes(t.start);o.setSelection(null)})),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=[];for(const t of o.getRanges())i.push(n.mapper.toViewRange(t));n.writer.setSelection(i,{backward:o.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(!o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=n.writer,r=o.getFirstPosition(),s=n.mapper.toViewPosition(r),a=i.breakAttributes(s);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((t=>{if("$graveyard"==t.rootName)return null;const e=new fs(this.view.document,t.name);return e.rootName=t.rootName,this.mapper.bindElements(t,e),e}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(t){const e="string"==typeof t?t:t.name,n=this.model.markers.get(e);if(!n)throw new k("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:e});this.model.change((()=>{this.model.markers._refresh(n)}))}reconvertItem(t){this.model.change((()=>{this.model.document.differ._refreshItem(t)}))}}class Ql{constructor(){this._consumables=new Map}add(t,e){let n;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?n=this._consumables.get(t):(n=new Jl(t),this._consumables.set(t,n)),n.add(e))}test(t,e){const n=this._consumables.get(t);return void 0===n?null:t.is("$text")||t.is("documentFragment")?n:n.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const n=this._consumables.get(t);void 0!==n&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):n.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},n=t.getAttributeKeys();for(const t of n)"style"!=t&&"class"!=t&&e.attributes.push(t);const o=t.getClassNames();for(const t of o)e.classes.push(t);const i=t.getStyleNames();for(const t of i)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new Ql),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,Ql.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const n of t.getChildren())e=Ql.createFrom(n,e);return e}}const Zl=["attributes","classes","styles"];class Jl{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e of Zl)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e of Zl)if(e in t){const n=this._test(e,t[e]);if(!0!==n)return n}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e of Zl)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e of Zl)e in t&&this._revert(e,t[e])}_add(t,e){const n=wi(e),o=this._consumables[t];for(const e of n){if("attributes"===t&&("class"===e||"style"===e))throw new k("viewconsumable-invalid-attribute",this);if(o.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!0)}}_test(t,e){const n=wi(e),o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){const t=o.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",n=this._test(t,[...this._consumables[t].keys()]);if(!0!==n)return n}return!0}_consume(t,e){const n=wi(e),o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){if(o.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const n=wi(e),o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){!1===o.get(e)&&o.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}class Xl extends(U()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((t,e)=>{e[0]=new td(e[0])}),{priority:"highest"}),this.on("checkChild",((t,e)=>{e[0]=new td(e[0]),e[1]=this.getDefinition(e[1])}),{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new k("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new k("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:"is"in t&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!!e&&!!(e.isObject||e.isLimit&&e.isSelectable&&e.isContent)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}isSelectable(t){const e=this.getDefinition(t);return!!e&&!(!e.isSelectable&&!e.isObject)}isContent(t){const e=this.getDefinition(t);return!!e&&!(!e.isContent&&!e.isObject)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e){if(t instanceof Bc){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof Mc))throw new k("schema-check-merge-no-element-before",this);if(!(n instanceof Mc))throw new k("schema-check-merge-no-element-after",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",((e,[n,o])=>{if(!o)return;const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",((e,[n,o])=>{const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof Bc)e=t.parent;else{e=(t instanceof Rc?[t]:Array.from(t.getRanges())).reduce(((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n}),null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new Dc("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if("$graveyard"==t.root.rootName)return null;if(this.checkChild(t,"$text"))return new Rc(t);let n,o;const i=t.getAncestors().reverse().find((t=>this.isLimit(t)))||t.root;"both"!=e&&"backward"!=e||(n=new Sc({boundaries:Rc._createIn(i),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(o=new Sc({boundaries:Rc._createIn(i),startPosition:t}));for(const t of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,o)){const e=t.walker==n?"elementEnd":"elementStart",o=t.value;if(o.type==e&&this.isObject(o.item))return Rc._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new Rc(o.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}setAllowedAttributes(t,e,n){const o=n.model;for(const[i,r]of Object.entries(e))o.schema.checkAttribute(t,i)&&n.setAttribute(i,r,t)}removeDisallowedAttributes(t,e){for(const n of t)if(n.is("$text"))gd(this,n,e);else{const t=Rc._createIn(n).getPositions();for(const n of t){gd(this,n.nodeBefore||n.parent,e)}}}getAttributesWithProperty(t,e,n){const o={};for(const[i,r]of t.getAttributes()){const t=this.getAttributeProperties(i);void 0!==t[e]&&(void 0!==n&&n!==t[e]||(o[i]=r))}return o}createContext(t){return new td(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const o of n)t[o]=ed(e[o],o);for(const e of n)nd(t,e);for(const e of n)od(t,e);for(const e of n)id(t,e);for(const e of n)rd(t,e),sd(t,e);for(const e of n)ad(t,e),cd(t,e),ld(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const o=e.getItem(n);if(t.allowIn.includes(o.name)){if(0==n)return!0;{const t=this.getDefinition(o);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,o=t.start;for(const i of t.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(Rc._createIn(i),e)),this.checkAttribute(i,e)||(n.isEqual(o)||(yield new Rc(n,o)),n=Bc._createAfter(i)),o=Bc._createAfter(i);n.isEqual(o)||(yield new Rc(n,o))}findOptimalInsertionRange(t,e){const n=t.getSelectedElement();if(n&&this.isObject(n)&&!this.isInline(n))return"before"==e||"after"==e?new Rc(Bc._createAt(n,e)):Rc._createOn(n);const o=Gi(t.getSelectedBlocks());if(!o)return new Rc(t.focus);if(o.isEmpty)return new Rc(Bc._createAt(o,0));const i=Bc._createAfter(o);return t.focus.isTouching(i)?new Rc(i):new Rc(Bc._createBefore(o))}}class td{constructor(t){if(t instanceof td)return t;let e;e="string"==typeof t?[t]:Array.isArray(t)?t:t.getAncestors({includeSelf:!0}),this._items=e.map(hd)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new td([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map((t=>t.name))}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function ed(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter((t=>t.startsWith("is")));for(const o of t)e[o]=!!n[o]}}(t,n),dd(t,n,"allowIn"),dd(t,n,"allowContentOf"),dd(t,n,"allowWhere"),dd(t,n,"allowAttributes"),dd(t,n,"allowAttributesOf"),dd(t,n,"allowChildren"),dd(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function nd(t,e){const n=t[e];for(const o of n.allowChildren){const n=t[o];n&&n.allowIn.push(e)}n.allowChildren.length=0}function od(t,e){for(const n of t[e].allowContentOf)if(t[n]){ud(t,n).forEach((t=>{t.allowIn.push(e)}))}delete t[e].allowContentOf}function id(t,e){for(const n of t[e].allowWhere){const o=t[n];if(o){const n=o.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function rd(t,e){for(const n of t[e].allowAttributesOf){const o=t[n];if(o){const n=o.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function sd(t,e){const n=t[e];for(const e of n.inheritTypesFrom){const o=t[e];if(o){const t=Object.keys(o).filter((t=>t.startsWith("is")));for(const e of t)e in n||(n[e]=o[e])}}delete n.inheritTypesFrom}function ad(t,e){const n=t[e],o=n.allowIn.filter((e=>t[e]));n.allowIn=Array.from(new Set(o))}function cd(t,e){const n=t[e];for(const o of n.allowIn){t[o].allowChildren.push(e)}}function ld(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function dd(t,e,n){for(const o of t){const t=o[n];"string"==typeof t?e[n].push(t):Array.isArray(t)&&e[n].push(...t)}}function ud(t,e){const n=t[e];return(o=t,Object.keys(o).map((t=>o[t]))).filter((t=>t.allowIn.includes(n.name)));var o}function hd(t){return"string"==typeof t||t.is("documentFragment")?{name:"string"==typeof t?t:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function gd(t,e,n){for(const o of e.getAttributeKeys())t.checkAttribute(e,o)||n.removeAttribute(o,e)}var md=Object.defineProperty,pd=Object.defineProperties,fd=Object.getOwnPropertyDescriptors,kd=Object.getOwnPropertySymbols,bd=Object.prototype.hasOwnProperty,wd=Object.prototype.propertyIsEnumerable,Ad=(t,e,n)=>e in t?md(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class _d extends(I()){constructor(t){var e;super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=(e=((t,e)=>{for(var n in e||(e={}))bd.call(e,n)&&Ad(t,n,e[n]);if(kd)for(var n of kd(e))wd.call(e,n)&&Ad(t,n,e[n]);return t})({},t),pd(e,fd({consumable:null,writer:null,store:null,convertItem:(t,e)=>this._convertItem(t,e),convertChildren:(t,e)=>this._convertChildren(t,e),safeInsert:(t,e)=>this._safeInsert(t,e),updateConversionResult:(t,e)=>this._updateConversionResult(t,e),splitToAllowedParent:(t,e)=>this._splitToAllowedParent(t,e),getSplitParts:t=>this._getSplitParts(t),keepEmptyElement:t=>this._keepEmptyElement(t)})))}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const o of new td(t)){const t={};for(const e of o.getAttributeKeys())t[e]=o.getAttribute(e);const i=e.createElement(o.name,t);n&&e.insert(i,n),n=Bc._createAt(i,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=Ql.createFrom(t),this.conversionApi.store={};const{modelRange:o}=this._convertItem(t,this._modelCursor),i=e.createDocumentFragment();if(o){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,i);i.markers=function(t,e){const n=new Set,o=new Map,i=Rc._createIn(t).getItems();for(const t of i)t.is("element","$marker")&&n.add(t);for(const t of n){const n=t.getAttribute("data-name"),i=e.createPositionBefore(t);o.has(n)?o.get(n).end=i.clone():o.set(n,new Rc(i.clone())),e.remove(t)}return o}(i,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(t,e){const n={viewItem:t,modelCursor:e,modelRange:null};if(t.is("element")?this.fire(`element:${t.name}`,n,this.conversionApi):t.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Rc))throw new k("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){let n=e.is("position")?e:Bc._createAt(e,0);const o=new Rc(n);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);t.modelRange instanceof Rc&&(o.end=t.modelRange.end,n=t.modelCursor)}return{modelRange:o,modelCursor:n}}_safeInsert(t,e){const n=this._splitToAllowedParent(t,e);return!!n&&(this.conversionApi.writer.insert(t,n.position),!0)}_updateConversionResult(t,e){const n=this._getSplitParts(t),o=this.conversionApi.writer;e.modelRange||(e.modelRange=o.createRange(o.createPositionBefore(t),o.createPositionAfter(n[n.length-1])));const i=this._cursorParents.get(t);e.modelCursor=i?o.createPositionAt(i,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:n,writer:o}=this.conversionApi;let i=n.findAllowedParent(e,t);if(i){if(i===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return Ml(e,t,n)?{position:Sl(e,o)}:null;const r=this.conversionApi.writer.split(e,i),s=[];for(const t of r.range.getWalker())if("elementEnd"==t.type)s.push(t.item);else{const e=s.pop(),n=t.item;this._registerSplitPair(e,n)}const a=r.range.end.parent;return this._cursorParents.set(t,a),{position:r.position,cursorParent:a}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t],e}_keepEmptyElement(t){this._emptyElementsToKeep.add(t)}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&!this._emptyElementsToKeep.has(e)&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}class Cd{getHtml(t){const e=To.document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class vd{constructor(t){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new _a(t,{renderingMode:"data"}),this.htmlWriter=new Cd}toData(t){const e=this.domConverter.viewToDom(t);return this.htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this.domConverter.domToView(e,{skipComments:this.skipComments})}registerRawContentMatcher(t){this.domConverter.registerRawContentMatcher(t)}useFillerType(t){this.domConverter.blockFillerMode="marked"==t?"markedNbsp":"nbsp"}_toDom(t){t.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(t=`${t}`);const e=this.domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)n.appendChild(o[0]);return n}}class yd extends(I()){constructor(t,e){super(),this.model=t,this.mapper=new jc,this.downcastDispatcher=new Zc({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.upcastDispatcher=new _d({schema:t.schema}),this.viewDocument=new Ss(e),this.stylesProcessor=e,this.htmlProcessor=new vd(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Hs(this.viewDocument),this.upcastDispatcher.on("text",((t,e,{schema:n,consumable:o,writer:i})=>{let r=e.modelCursor;if(!o.test(e.viewItem))return;if(!n.checkChild(r,"$text")){if(!Ml(r,"$text",n))return;if(0==e.viewItem.data.trim().length)return;const t=r.nodeBefore;r=Sl(r,i),t&&t.is("element","$marker")&&(i.move(i.createRangeOn(t),r),r=i.createPositionAfter(t))}o.consume(e.viewItem);const s=i.createText(e.viewItem.data);i.insert(s,r),e.modelRange=i.createRange(r,r.getShiftedBy(s.offsetSize)),e.modelCursor=e.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),U().prototype.decorate.call(this,"init"),U().prototype.decorate.call(this,"set"),U().prototype.decorate.call(this,"get"),U().prototype.decorate.call(this,"toView"),U().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Il)}),{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:n="empty"}=t;if(!this._checkIfRootsExists([e]))throw new k("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(e);return o.isAttached()||b("datacontroller-get-detached-root",this),"empty"!==n||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,t):""}stringify(t,e={}){const n=this.toView(t,e);return this.processor.toData(n)}toView(t,e={}){const n=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const i=Rc._createIn(t),r=new Vs(n);this.mapper.bindElements(t,r);const s=t.is("documentFragment")?t.markers:function(t){const e=[],n=t.root.document;if(!n)return new Map;const o=Rc._createIn(t);for(const t of n.model.markers){const n=t.getRange(),i=n.isCollapsed,r=n.start.isEqual(o.start)||n.end.isEqual(o.end);if(i&&r)e.push([t.name,n]);else{const i=o.getIntersection(n);i&&e.push([t.name,i])}}return e.sort((([t,e],[n,o])=>{if("after"!==e.end.compareWith(o.start))return 1;if("before"!==e.start.compareWith(o.end))return-1;switch(e.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(e.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(t)}}})),new Map(e)}(t);return this.downcastDispatcher.convert(i,s,o,e),r}init(t){if(this.model.document.version)throw new k("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new k("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(t=>{for(const n of Object.keys(e)){const o=this.model.document.getRoot(n);t.insert(this.parse(e[n],o),o,0)}})),Promise.resolve()}set(t,e={}){let n={};if("string"==typeof t?n.main=t:n=t,!this._checkIfRootsExists(Object.keys(n)))throw new k("datacontroller-set-non-existent-root",this);this.model.enqueueChange(e.batchType||{},(t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const e of Object.keys(n)){const o=this.model.document.getRoot(e);t.remove(t.createRangeIn(o)),t.insert(this.parse(n[e],o),o,0)}}))}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change((n=>this.upcastDispatcher.convert(t,n,e)))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRoot(e))return!1;return!0}}class xd{constructor(t,e){this._helpers=new Map,this._downcast=wi(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=wi(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new k("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new k("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of Ed(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of Ed(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of Ed(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new k("conversion-group-exists",this);const o=n?new pl(e):new Rl(e);this._helpers.set(t,o)}}function*Ed(t){if(t.model.values)for(const e of t.model.values){const n={key:t.model.key,value:e},o=t.view[e],i=t.upcastAlso?t.upcastAlso[e]:void 0;yield*Dd(n,o,i)}else yield*Dd(t.model,t.view,t.upcastAlso)}function*Dd(t,e,n){if(yield{model:t,view:e},n)for(const e of wi(n))yield{model:t,view:e}}class Id{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t,e){return new this(t.baseVersion)}}function Md(t,e){const n=Bd(e),o=n.reduce(((t,e)=>t+e.offsetSize),0),i=t.parent;Pd(t);const r=t.index;return i._insertChild(r,n),Nd(i,r+n.length),Nd(i,r),new Rc(t,t.getShiftedBy(o))}function Sd(t){if(!t.isFlat)throw new k("operation-utils-remove-range-not-flat",this);const e=t.start.parent;Pd(t.start),Pd(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return Nd(e,t.start.index),n}function Td(t,e){if(!t.isFlat)throw new k("operation-utils-move-range-not-flat",this);const n=Sd(t);return Md(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function Bd(t){const e=[];!function t(n){if("string"==typeof n)e.push(new Dc(n));else if(n instanceof Ic)e.push(new Dc(n.data,n.getAttributes()));else if(n instanceof xc)e.push(n);else if(Z(n))for(const e of n)t(e);else{}}(t);for(let t=1;tt.maxOffset)throw new k("move-operation-nodes-do-not-exist",this);if(t===e&&n=n&&this.targetPosition.path[t]t._clone(!0)))),e=new zd(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Bc(t,[0]);return new Ld(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffsett._clone(!0)))),Md(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const e of t.nodes)e.name?n.push(Mc.fromJSON(e)):n.push(Dc.fromJSON(e));const o=new zd(Bc.fromJSON(t.position,e),n,t.baseVersion);return o.shouldReceiveAttributes=t.shouldReceiveAttributes,o}}class Rd extends Id{constructor(t,e,n,o,i){super(i),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=n,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Bc(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Rc(this.splitPosition,t)}get affectedSelectable(){const t=[Rc._createFromPositionAndShift(this.splitPosition,0),Rc._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&t.push(Rc._createFromPositionAndShift(this.graveyardPosition,0)),t}clone(){return new Rd(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Bc(t,[0]);return new jd(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset0&&(t.sourcePosition.isEqual(e.sourcePosition.getShiftedBy(e.howMany))&&this._setRelation(t,e,"mergeSourceAffected"),t.targetPosition.isEqual(e.sourcePosition)&&this._setRelation(t,e,"mergeTargetWasBefore"));else if(t instanceof Fd){const n=t.newRange;if(!n)return;if(e instanceof Ld){const o=Rc._createFromPositionAndShift(e.sourcePosition,e.howMany),i=o.containsPosition(n.start)||o.start.isEqual(n.start),r=o.containsPosition(n.end)||o.end.isEqual(n.end);!i&&!r||o.containsRange(n)||this._setRelation(t,e,{side:i?"left":"right",path:i?n.start.path.slice():n.end.path.slice()})}else if(e instanceof jd){const o=n.start.isEqual(e.targetPosition),i=n.start.isEqual(e.deletionPosition),r=n.end.isEqual(e.deletionPosition),s=n.end.isEqual(e.sourcePosition);(o||i||r||s)&&this._setRelation(t,e,{wasInLeftElement:o,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:r,wasInRightElement:s})}}}getContext(t,e,n){return{aIsStrong:n,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const n=this.originalOperations.get(e),o=this._history.getUndoneOperation(n);if(!o)return null;const i=this.originalOperations.get(t),r=this._relations.get(i);return r&&r.get(o)||null}_setRelation(t,e,n){const o=this.originalOperations.get(t),i=this.originalOperations.get(e);let r=this._relations.get(o);r||(r=new Map,this._relations.set(o,r)),r.set(i,n)}}function eu(t,e){for(const n of t)n.baseVersion=e++}function nu(t,e){for(let n=0;n{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const o=t.range.getDifference(e.range).map((e=>new Hd(e,t.key,t.oldValue,t.newValue,0))),i=t.range.getIntersection(e.range);return i&&n.aIsStrong&&o.push(new Hd(i,e.key,e.newValue,t.newValue,0)),0==o.length?[new Ud(0)]:o}return[t]})),Qd(Hd,zd,((t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map((e=>new Hd(e,t.key,t.oldValue,t.newValue,t.baseVersion)));if(e.shouldReceiveAttributes){const o=ou(e,t.key,t.oldValue);o&&n.unshift(o)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]})),Qd(Hd,jd,((t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(Rc._createFromPositionAndShift(e.graveyardPosition,1));const o=t.range._getTransformedByMergeOperation(e);return o.isCollapsed||n.push(o),n.map((e=>new Hd(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),Qd(Hd,Ld,((t,e)=>{const n=function(t,e){const n=Rc._createFromPositionAndShift(e.sourcePosition,e.howMany);let o=null,i=[];n.containsRange(t,!0)?o=t:t.start.hasSameParentAs(n.start)?(i=t.getDifference(n),o=t.getIntersection(n)):i=[t];const r=[];for(let t of i){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart(),o=t.start.hasSameParentAs(n),i=t._getTransformedByInsertion(n,e.howMany,o);r.push(...i)}o&&r.push(o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return r}(t.range,e);return n.map((e=>new Hd(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),Qd(Hd,Rd,((t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new Rc(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]})),Qd(zd,Hd,((t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const o=ou(t,e.key,e.newValue);o&&n.push(o)}return n})),Qd(zd,zd,((t,e,n)=>(t.position.isEqual(e.position)&&n.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t]))),Qd(zd,Ld,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),Qd(zd,Rd,((t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t]))),Qd(zd,jd,((t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t]))),Qd(Fd,zd,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t]))),Qd(Fd,Fd,((t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new Ud(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]})),Qd(Fd,jd,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t]))),Qd(Fd,Ld,((t,e,n)=>{if(t.oldRange&&(t.oldRange=Rc._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const o=Rc._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.end=o.end,t.newRange.start.path=n.abRelation.path,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=o.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=Rc._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]})),Qd(Fd,Rd,((t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const o=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Bc._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=Bc._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=Bc._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Bc._createAt(e.insertionPosition):t.newRange.end=o.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]})),Qd(jd,zd,((t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t]))),Qd(jd,jd,((t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new Bc(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new Ud(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const o="$graveyard"==t.targetPosition.root.rootName,i="$graveyard"==e.targetPosition.root.rootName;if(i&&!o||!(o&&!i)&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),o=t.targetPosition._getTransformedByMergeOperation(e);return[new Ld(n,t.howMany,o,0)]}return[new Ud(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),Qd(jd,Ld,((t,e,n)=>{const o=Rc._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition)?[new Ud(0)]:(e.sourcePosition.getShiftedBy(e.howMany).isEqual(t.sourcePosition)?t.sourcePosition.stickiness="toNone":e.targetPosition.isEqual(t.sourcePosition)&&"mergeSourceAffected"==n.abRelation?t.sourcePosition.stickiness="toNext":e.sourcePosition.isEqual(t.targetPosition)?(t.targetPosition.stickiness="toNone",t.howMany-=e.howMany):e.targetPosition.isEqual(t.targetPosition)&&"mergeTargetWasBefore"==n.abRelation?(t.targetPosition.stickiness="toPrevious",t.howMany+=e.howMany):(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany)),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.sourcePosition.stickiness="toPrevious",t.targetPosition.stickiness="toNext",t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])})),Qd(jd,Rd,((t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const o=0!=e.howMany,i=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(o||i||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]})),Qd(Ld,zd,((t,e)=>{const n=Rc._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]})),Qd(Ld,Ld,((t,e,n)=>{const o=Rc._createFromPositionAndShift(t.sourcePosition,t.howMany),i=Rc._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),iu(t,e)&&iu(e,t))return[e.getReversed()];if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ru([o],r);if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return o.start=o.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),o.end=o.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),ru([o],r);const c=Q(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ru([o],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const l=[],d=o.getDifference(i);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n="same"==Q(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),o=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);l.push(...o)}const u=o.getIntersection(i);return null!==u&&s&&(u.start=u.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),u.end=u.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(u):1==l.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?l.unshift(u):l.push(u):l.splice(1,0,u)),0===l.length?[new Ud(t.baseVersion)]:ru(l,r)})),Qd(Ld,Rd,((t,e,n)=>{let o=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(o=t.targetPosition._getTransformedBySplitOperation(e));const i=Rc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(i.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=o,[t];if(i.start.hasSameParentAs(e.splitPosition)&&i.containsPosition(e.splitPosition)){let t=new Rc(e.splitPosition,i.end);t=t._getTransformedBySplitOperation(e);return ru([new Rc(i.start,e.splitPosition),t],o)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(o=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(o=t.targetPosition);const r=[i._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);t.howMany>1&&o&&!n.aWasUndone&&r.push(Rc._createFromPositionAndShift(e.insertionPosition,1))}return ru(r,o)})),Qd(Ld,jd,((t,e,n)=>{const o=Rc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new Ud(0)]}else if(!n.aWasUndone){const n=[];let o=e.graveyardPosition.clone(),i=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new Ld(t.sourcePosition,t.howMany-1,t.targetPosition,0)),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new Ld(o,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new Bc(s.targetPosition.root,a);i=i._getTransformedByMove(o,r,1);const l=new Ld(i,e.howMany,c,0);return n.push(s),n.push(l),n}const i=Rc._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]})),Qd(qd,zd,((t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t]))),Qd(qd,jd,((t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t]))),Qd(qd,Ld,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),Qd(qd,qd,((t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new Ud(0)];t.oldName=e.newName}return[t]})),Qd(qd,Rd,((t,e)=>{if("same"==Q(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){const e=new qd(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]})),Qd(Gd,Gd,((t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new Ud(0)];t.oldValue=e.newValue}return[t]})),Qd(Wd,Wd,((t,e)=>t.rootName===e.rootName&&t.isAdd===e.isAdd?[new Ud(0)]:[t])),Qd(Rd,zd,((t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const o=new Bc(e.graveyardPosition.root,n),i=Rd.getInsertionPosition(new Bc(e.graveyardPosition.root,n)),r=new Rd(o,0,i,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Rd.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Rd.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),Qd(Rd,Ld,((t,e,n)=>{const o=Rc._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&i){const n=t.splitPosition._getTransformedByMoveOperation(e),o=t.graveyardPosition._getTransformedByMoveOperation(e),i=o.path.slice();i.push(0);const r=new Bc(o.root,i);return[new Ld(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const i=t.splitPosition.isEqual(e.targetPosition);if(i&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=Rd.getInsertionPosition(t.splitPosition),[t];if(i&&n.abRelation&&n.abRelation.howMany){const{howMany:e,offset:o}=n.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(o),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new Ud(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new Ud(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const o="$graveyard"==t.splitPosition.root.rootName,i="$graveyard"==e.splitPosition.root.rootName;if(i&&!o||!(o&&!i)&&n.aIsStrong){const n=[];return e.howMany&&n.push(new Ld(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new Ld(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new Ud(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const o=new Bc(e.insertionPosition.root,n);return[t,new Ld(t.insertionPosition,1,o,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset{const n=e[0];n.isDocumentOperation&&cu.call(this,n)}),{priority:"low"})}function cu(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}su.prototype.is=function(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t};class lu{constructor(t={}){"string"==typeof t&&(t="transparent"===t?{isUndoable:!1}:{},b("batch-constructor-deprecated-string-type"));const{isUndoable:e=!0,isLocal:n=!0,isUndo:o=!1,isTyping:i=!1}=t;this.operations=[],this.isUndoable=e,this.isLocal=n,this.isUndo=o,this.isTyping=i}get type(){return b("batch-type-deprecated"),"default"}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}var du=Object.defineProperty,uu=Object.defineProperties,hu=Object.getOwnPropertyDescriptors,gu=Object.getOwnPropertySymbols,mu=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable,fu=(t,e,n)=>e in t?du(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ku=(t,e)=>{for(var n in e||(e={}))mu.call(e,n)&&fu(t,n,e[n]);if(gu)for(var n of gu(e))pu.call(e,n)&&fu(t,n,e[n]);return t};class bu{constructor(t){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=t}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(t){const e=t;switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=Rc._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const o=e.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,e.targetPosition.offset,t.maxOffset);break}case"detachRoot":case"addRoot":{const t=e.affectedSelectable;if(!t._isLoaded)return;if(t.isAttached()==e.isAdd)return;this._bufferRootStateChange(e.rootName,e.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!e.root._isLoaded)return;const t=e.root.rootName;this._bufferRootAttributeChange(t,e.key,e.oldValue,e.newValue);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n){e.range&&e.range.root.is("rootElement")&&!e.range.root._isLoaded&&(e.range=null),n.range&&n.range.root.is("rootElement")&&!n.range.root._isLoaded&&(n.range=null);let o=this._changedMarkers.get(t);o?o.newMarkerData=n:(o={newMarkerData:n,oldMarkerData:e},this._changedMarkers.set(t,o)),null==o.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(t)}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldMarkerData.range&&t.push({name:e,range:n.oldMarkerData.range});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newMarkerData.range&&t.push({name:e,range:n.newMarkerData.range});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map((([t,e])=>({name:t,data:{oldRange:e.oldMarkerData.range,newRange:e.newMarkerData.range}})))}hasDataChanges(){if(this.getChanges().length)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:t,oldMarkerData:e}of this._changedMarkers.values()){if(t.affectsData!==e.affectsData)return!0;if(t.affectsData){const n=t.range&&!e.range,o=!t.range&&e.range,i=t.range&&e.range&&!t.range.isEqual(e.range);if(n||o||i)return!0}}return!1}getChanges(t={}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let e=[];for(const t of this._changesInElement.keys()){const n=this._changesInElement.get(t).sort(((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offsett.position.root!=e.position.root?t.position.root.rootNamet));for(const t of e)delete t.changeCount,"attribute"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e,this._cachedChanges=e.filter(_u),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((t=>{const e=ku({},t);return void 0!==e.state&&delete e.attributes,e}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(t,e){if(!this._changedRoots.has(t))return void this._changedRoots.set(t,{name:t,state:e?"attached":"detached"});const n=this._changedRoots.get(t);void 0!==n.state?(delete n.state,void 0===n.attributes&&this._changedRoots.delete(t)):n.state=e?"attached":"detached"}_bufferRootAttributeChange(t,e,n,o){const i=this._changedRoots.get(t)||{name:t},r=i.attributes||{};if(r[e]){const t=r[e];o===t.oldValue?delete r[e]:t.newValue=o}else r[e]={oldValue:n,newValue:o};0===Object.entries(r).length?(delete i.attributes,void 0===i.state&&this._changedRoots.delete(t)):(i.attributes=r,this._changedRoots.set(t,i))}_refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize),this._refreshedItems.add(t);const e=Rc._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._cachedChanges=null}_bufferRootLoad(t){if(t.isAttached()){this._bufferRootStateChange(t.rootName,!0),this._markInsert(t,0,t.maxOffset);for(const e of t.getAttributeKeys())this._bufferRootAttributeChange(t.rootName,e,null,t.getAttribute(e));for(const n of this._markerCollection)if(n.getRange().root==t){const t=n.getData();this.bufferMarkerChange(n.name,(e=ku({},t),uu(e,hu({range:null}))),t)}var e}}_markInsert(t,e,n){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const o={type:"insert",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o)}_markRemove(t,e,n){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const o={type:"remove",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o),this._removeAllNestedChanges(t,e,n)}_markAttribute(t){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const e={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const n=this._getChangesForElement(t);this._handleChange(e,n),n.push(e);for(let t=0;tn.offset){if(o>i){const t={type:"attribute",offset:i,howMany:o-i,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offseti?(t.nodesToHandle=o-i,t.offset=i):t.nodesToHandle=0);if("remove"==n.type&&t.offsetn.offset){const i={type:"attribute",offset:n.offset,howMany:o-n.offset,count:this._changeCount++};this._handleChange(i,e),e.push(i),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&o<=i?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&o>=i&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:Bc._createAt(t,e),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++,_element:n.element}}_getRemoveDiff(t,e,n){return{type:"remove",position:Bc._createAt(t,e),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++,_element:n.element}}_getAttributesDiff(t,e,n){const o=[];n=new Map(n);for(const[i,r]of e){const e=n.has(i)?n.get(i):null;e!==r&&o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(i)}for(const[e,i]of n)o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),o=t.startOffset;if(n)for(const t of n)if("insert"==t.type&&o>=t.offset&&oo){for(let e=0;ethis._version+1&&this._gaps.set(this._version,t),this._version=t}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(t){if(t.baseVersion!==this.version)throw new k("model-document-history-addoperation-incorrect-version",this,{operation:t,historyVersion:this.version});this._operations.push(t),this._version++,this._baseVersionToOperationIndex.set(t.baseVersion,this._operations.length-1)}getOperations(t,e=this.version){if(!this._operations.length)return[];const n=this._operations[0];void 0===t&&(t=n.baseVersion);let o=e-1;for(const[e,n]of this._gaps)t>e&&te&&othis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(t);void 0===i&&(i=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(i,r+1)}getOperation(t){const e=this._baseVersionToOperationIndex.get(t);if(void 0!==e)return this._operations[e]}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class vu extends Mc{constructor(t,e,n="main"){super(e),this._isAttached=!0,this._isLoaded=!0,this._document=t,this.rootName=n}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}vu.prototype.is=function(t,e){return e?e===this.name&&("rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t):"rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t||"node"===t||"model:node"===t};var yu=Object.defineProperty,xu=Object.defineProperties,Eu=Object.getOwnPropertyDescriptors,Du=Object.getOwnPropertySymbols,Iu=Object.prototype.hasOwnProperty,Mu=Object.prototype.propertyIsEnumerable,Su=(t,e,n)=>e in t?yu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tu=(t,e)=>{for(var n in e||(e={}))Iu.call(e,n)&&Su(t,n,e[n]);if(Du)for(var n of Du(e))Mu.call(e,n)&&Su(t,n,e[n]);return t},Bu=(t,e)=>xu(t,Eu(e));const Nu="$graveyard";class Pu extends(I()){constructor(t){super(),this.model=t,this.history=new Cu,this.selection=new ul(this),this.roots=new qi({idProperty:"rootName"}),this.differ=new bu(t.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Nu),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)}),{priority:"high"}),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.history.addOperation(n)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(t.markers,"update",((t,e,n,o,i)=>{const r=Bu(Tu({},e.getData()),{range:o});this.differ.bufferMarkerChange(e.name,i,r),null===n&&e.on("change",((t,n)=>{const o=e.getData();this.differ.bufferMarkerChange(e.name,Bu(Tu({},o),{range:n}),o)}))})),this.registerPostFixer((t=>{let e=!1;for(const n of this.roots)n.isAttached()||n.isEmpty||(t.remove(t.createRangeIn(n)),e=!0);for(const n of this.model.markers)n.getRange().root.isAttached()||(t.removeMarker(n),e=!0);return e}))}get version(){return this.history.version}set version(t){this.history.version=t}get graveyard(){return this.getRoot(Nu)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new k("model-document-createroot-name-exists",this,{name:e});const n=new vu(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(t=!1){return this.getRoots(t).map((t=>t.rootName))}getRoots(t=!1){return this.roots.filter((e=>e!=this.graveyard&&(t||e.isAttached())&&e._isLoaded))}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Er(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const t=this.getRoots();return t.length?t[0]:this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,o=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(o)||e.createRange(o)}_validateSelectionRange(t){return Ou(t.start)&&Ou(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t),e)break}while(e)}}function Ou(t){const e=t.textNode;if(e){const n=e.data,o=t.offset-e.startOffset;return!Qi(n,o)&&!Zi(n,o)}return!0}var Lu=Object.defineProperty,zu=Object.defineProperties,Ru=Object.getOwnPropertyDescriptors,ju=Object.getOwnPropertySymbols,Fu=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable,Hu=(t,e,n)=>e in t?Lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Uu extends(I()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const e=t instanceof qu?t.name:t;return this._markers.has(e)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,o=!1){const i=t instanceof qu?t.name:t;if(i.includes(","))throw new k("markercollection-incorrect-marker-name",this);const r=this._markers.get(i);if(r){const t=r.getData(),s=r.getRange();let a=!1;return s.isEqual(e)||(r._attachLiveRange(al.fromRange(e)),a=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,a=!0),"boolean"==typeof o&&o!=r.affectsData&&(r._affectsData=o,a=!0),a&&this.fire(`update:${i}`,r,s,e,t),r}const s=al.fromRange(e),a=new qu(i,s,n,o);var c;return this._markers.set(i,a),this.fire(`update:${i}`,a,null,e,(c=((t,e)=>{for(var n in e||(e={}))Fu.call(e,n)&&Hu(t,n,e[n]);if(ju)for(var n of ju(e))Vu.call(e,n)&&Hu(t,n,e[n]);return t})({},a.getData()),zu(c,Ru({range:null})))),a}_remove(t){const e=t instanceof qu?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire(`update:${e}`,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof qu?t.name:t,n=this._markers.get(e);if(!n)throw new k("markercollection-refresh-marker-not-exists",this);const o=n.getRange();this.fire(`update:${e}`,n,o,o,n.getData())}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}class qu extends(I(yc)){constructor(t,e,n,o){super(),this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}qu.prototype.is=function(t){return"marker"===t||"model:marker"===t};class Gu extends Id{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new k("detach-operation-on-document-node",this)}_execute(){Sd(Rc._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Wu extends yc{constructor(t){super(),this.markers=new Map,this._children=new Ec,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(Mc.fromJSON(n)):e.push(Dc.fromJSON(n));return new Wu(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Dc(t)];Z(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Dc(t):t instanceof Ic?new Dc(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}}Wu.prototype.is=function(t){return"documentFragment"===t||"model:documentFragment"===t};class Ku{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new Dc(t,e)}createElement(t,e){return new Mc(t,e)}createDocumentFragment(){return new Wu}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,n=0){if(this._assertWriterUsedCorrectly(),t instanceof Dc&&""==t.data)return;const o=Bc._createAt(e,n);if(t.parent){if(Ju(t.root,o.root))return void this.move(Rc._createOn(t),o);if(t.root.document)throw new k("model-writer-insert-forbidden-move",this);this.remove(t)}const i=o.root.document?o.root.document.version:null,r=new zd(o,t,i);if(t instanceof Dc&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),t instanceof Wu)for(const[e,n]of t.markers){const t=Bc._createAt(n.root,0),i={range:new Rc(n.start._getCombined(t,o),n.end._getCombined(t,o)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,i):this.addMarker(e,i)}}insertText(t,e,n,o){e instanceof Wu||e instanceof Mc||e instanceof Bc?this.insert(this.createText(t),e,n):this.insert(this.createText(t,e),n,o)}insertElement(t,e,n,o){e instanceof Wu||e instanceof Mc||e instanceof Bc?this.insert(this.createElement(t),e,n):this.insert(this.createElement(t,e),n,o)}append(t,e){this.insert(t,e,"end")}appendText(t,e,n){e instanceof Wu||e instanceof Mc?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),n,"end")}appendElement(t,e,n){e instanceof Wu||e instanceof Mc?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),n,"end")}setAttribute(t,e,n){if(this._assertWriterUsedCorrectly(),n instanceof Rc){const o=n.getMinimalFlatRanges();for(const n of o)$u(this,t,e,n)}else Yu(this,t,e,n)}setAttributes(t,e){for(const[n,o]of $i(t))this.setAttribute(n,o,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof Rc){const n=e.getMinimalFlatRanges();for(const e of n)$u(this,t,null,e)}else Yu(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof Rc)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof Rc))throw new k("writer-move-invalid-range",this);if(!t.isFlat)throw new k("writer-move-range-not-flat",this);const o=Bc._createAt(e,n);if(o.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!Ju(t.root,o.root))throw new k("writer-move-different-document",this);const i=t.root.document?t.root.document.version:null,r=new Ld(t.start,t.end.offset-t.start.offset,o,i);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof Rc?t:Rc._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),Zu(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof Mc))throw new k("writer-merge-no-element-before",this);if(!(n instanceof Mc))throw new k("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(...t){return this.model.createSelection(...t)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(Rc._createIn(n),Bc._createAt(e,"end")),this.remove(n)}_merge(t){const e=Bc._createAt(t.nodeBefore,"end"),n=Bc._createAt(t.nodeAfter,0),o=t.root.document.graveyard,i=new Bc(o,[0]),r=t.root.document.version,s=new jd(n,t.nodeAfter.maxOffset,e,i,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Mc))throw new k("writer-rename-not-element-instance",this);const n=t.root.document?t.root.document.version:null,o=new qd(Bc._createBefore(t),t.name,e,n);this.batch.addOperation(o),this.model.applyOperation(o)}split(t,e){this._assertWriterUsedCorrectly();let n,o,i=t.parent;if(!i.parent)throw new k("writer-split-element-no-parent",this);if(e||(e=i.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new k("writer-split-invalid-limit-element",this);do{const e=i.root.document?i.root.document.version:null,r=i.maxOffset-t.offset,s=Rd.getInsertionPosition(t),a=new Rd(t,r,s,null,e);this.batch.addOperation(a),this.model.applyOperation(a),n||o||(n=i,o=t.parent.nextSibling),i=(t=this.createPositionAfter(t.parent)).parent}while(i!==e);return{position:t,range:new Rc(Bc._createAt(n,"end"),Bc._createAt(o,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new k("writer-wrap-range-not-flat",this);const n=e instanceof Mc?e:new Mc(e);if(n.childCount>0)throw new k("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new k("writer-wrap-element-attached",this);this.insert(n,t.start);const o=new Rc(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(o,Bc._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new k("writer-unwrap-element-no-parent",this);this.move(Rc._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new k("writer-addmarker-no-usingoperation",this);const n=e.usingOperation,o=e.range,i=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new k("writer-addmarker-marker-exists",this);if(!o)throw new k("writer-addmarker-no-range",this);return n?(Qu(this,t,null,o,i),this.model.markers.get(t)):this.model.markers._set(t,o,n,i)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,o=this.model.markers.get(n);if(!o)throw new k("writer-updatemarker-marker-not-exists",this);if(!e)return b("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(o);const i="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:o.affectsData;if(!i&&!e.range&&!r)throw new k("writer-updatemarker-wrong-options",this);const a=o.getRange(),c=e.range?e.range:a;i&&e.usingOperation!==o.managedUsingOperations?e.usingOperation?Qu(this,n,null,c,s):(Qu(this,n,a,null,s),this.model.markers._set(n,c,void 0,s)):o.managedUsingOperations?Qu(this,n,a,c,s):this.model.markers._set(n,c,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new k("writer-removemarker-no-marker",this);const n=this.model.markers.get(e);if(!n.managedUsingOperations)return void this.model.markers._remove(e);Qu(this,e,n.getRange(),null,n.affectsData)}addRoot(t,e="$root"){this._assertWriterUsedCorrectly();const n=this.model.document.getRoot(t);if(n&&n.isAttached())throw new k("writer-addroot-root-exists",this);const o=this.model.document,i=new Wd(t,e,!0,o,o.version);return this.batch.addOperation(i),this.model.applyOperation(i),this.model.document.getRoot(t)}detachRoot(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?this.model.document.getRoot(t):t;if(!e||!e.isAttached())throw new k("writer-detachroot-no-root",this);for(const t of this.model.markers)t.getRange().root===e&&this.removeMarker(t);for(const t of e.getAttributeKeys())this.removeAttribute(t,e);this.remove(this.createRangeIn(e));const n=this.model.document,o=new Wd(e.rootName,e.name,!1,n,n.version);this.batch.addOperation(o),this.model.applyOperation(o)}setSelection(...t){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...t)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,n]of $i(t))this._setSelectionAttribute(e,n)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const o=ul._getStoreAttributeKey(t);this.setAttribute(o,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=ul._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new k("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const o=n.getRange();let i=!1;if("move"===t){const t=e;i=t.containsPosition(o.start)||t.start.isEqual(o.start)||t.containsPosition(o.end)||t.end.isEqual(o.end)}else{const t=e,n=t.nodeBefore,r=t.nodeAfter,s=o.start.parent==n&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,c=o.end.nodeAfter==r,l=o.start.nodeAfter==r;i=s||a||c||l}i&&this.updateMarker(n.name,{range:o})}}}function $u(t,e,n,o){const i=t.model,r=i.document;let s,a,c,l=o.start;for(const t of o.getWalker({shallow:!0}))c=t.item.getAttribute(e),s&&a!=c&&(a!=n&&d(),l=s),s=t.nextPosition,a=c;function d(){const o=new Rc(l,s),c=o.root.document?r.version:null,d=new Hd(o,e,a,n,c);t.batch.addOperation(d),i.applyOperation(d)}s instanceof Bc&&s!=l&&a!=n&&d()}function Yu(t,e,n,o){const i=t.model,r=i.document,s=o.getAttribute(e);let a,c;if(s!=n){if(o.root===o){const t=o.document?r.version:null;c=new Gd(o,e,s,n,t)}else{a=new Rc(Bc._createBefore(o),t.createPositionAfter(o));const i=a.root.document?r.version:null;c=new Hd(a,e,s,n,i)}t.batch.addOperation(c),i.applyOperation(c)}}function Qu(t,e,n,o,i){const r=t.model,s=r.document,a=new Fd(e,n,o,r.markers,!!i,s.version);t.batch.addOperation(a),r.applyOperation(a)}function Zu(t,e,n,o){let i;if(t.root.document){const n=o.document,r=new Bc(n.graveyard,[0]);i=new Ld(t,e,r,n.version)}else i=new Gu(t,e);n.addOperation(i),o.applyOperation(i)}function Ju(t,e){return t===e||t instanceof vu&&e instanceof vu}function Xu(t,e,n={}){if(e.isCollapsed)return;const o=e.getFirstRange();if("$graveyard"==o.root.rootName)return;const i=t.schema;t.change((t=>{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const o=e.getFirstRange();if(o.start.parent==o.end.parent)return!1;return t.checkChild(n,"paragraph")}(i,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),oh(t,t.createPositionAt(n,0),e)}(t,e);const r={};if(!n.doNotAutoparagraph){const t=e.getSelectedElement();t&&Object.assign(r,i.getAttributesWithProperty(t,"copyOnReplace",!0))}const[s,a]=function(t){const e=t.root.document.model,n=t.start;let o=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const n=function(t){const e=t.parent,n=e.root.document.model.schema,o=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of o){if(n.isLimit(t))return null;if(n.isBlock(t))return t}}(o);if(n&&o.isTouching(e.createPositionAt(n,0))){const n=e.createSelection(t);e.modifySelection(n,{direction:"backward"});const i=n.getLastPosition(),r=e.createRange(i,o);e.hasContent(r,{ignoreMarkers:!0})||(o=i)}}return[su.fromPosition(n,"toPrevious"),su.fromPosition(o,"toNext")]}(o);s.isTouching(a)||t.remove(t.createRange(s,a)),n.leaveUnmerged||(!function(t,e,n){const o=t.model;if(!nh(t.model.schema,e,n))return;const[i,r]=function(t,e){const n=t.getAncestors(),o=e.getAncestors();let i=0;for(;n[i]&&n[i]==o[i];)i++;return[n[i],o[i]]}(e,n);if(!i||!r)return;!o.hasContent(i,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?eh(t,e,n,i.parent):th(t,e,n,i.parent)}(t,s,a),i.removeDisallowedAttributes(s.parent.getChildren(),t)),ih(t,e,s),!n.doNotAutoparagraph&&function(t,e){const n=t.checkChild(e,"$text"),o=t.checkChild(e,"paragraph");return!n&&o}(i,s)&&oh(t,s,e,r),s.detach(),a.detach()}))}function th(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(r,e),t.merge(e);n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}nh(t.model.schema,e,n)&&th(t,e,n,o)}}function eh(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(i,n);e.parent.isEmpty;){const n=e.parent;e=t.createPositionBefore(n),t.remove(n)}n=t.createPositionBefore(r),function(t,e){const n=e.nodeBefore,o=e.nodeAfter;n.name!=o.name&&t.rename(n,o.name);t.clearAttributes(n),t.setAttributes(Object.fromEntries(o.getAttributes()),n),t.merge(e)}(t,n),nh(t.model.schema,e,n)&&eh(t,e,n,o)}}function nh(t,e,n){const o=e.parent,i=n.parent;return o!=i&&(!t.isLimit(o)&&!t.isLimit(i)&&function(t,e,n){const o=new Rc(t,e);for(const t of o.getWalker())if(n.isLimit(t.item))return!1;return!0}(e,n,t))}function oh(t,e,n,o={}){const i=t.createElement("paragraph");t.model.schema.setAllowedAttributes(i,o,t),t.insert(i,e),ih(t,n,t.createPositionAt(i,0))}function ih(t,e,n){e instanceof ul?t.setSelection(n):e.setTo(n)}function rh(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map((t=>e.createRangeOn(t))).filter((e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end)))).forEach((t=>{n.push(t.start.parent),e.remove(t)})),n.forEach((t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}}))}class sh{constructor(t,e,n){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=e.createDocumentFragment(),this._documentFragmentPosition=e.createPositionAt(this._documentFragment,0)}handleNodes(t){for(const e of Array.from(t))this._handleNode(e);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const e=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(t);if(n.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new k("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Rc._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Rc(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let e=this._checkAndAutoParagraphToAllowedPosition(t);e||(e=this._checkAndSplitToAllowedPosition(t),e)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=su.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new k("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=t:this._nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=su.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=su.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof Mc))return;if(!this._canMergeLeft(t))return;const e=su._createBefore(t);e.stickiness="toNext";const n=su.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=su._createAt(e.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=su._createAt(e.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof Mc))return;if(!this._canMergeRight(t))return;const e=su._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new k("insertcontent-invalid-insertion-position",this);this.position=Bc._createAt(e.nodeBefore,"end");const n=su.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=su._createAt(e.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=su._createAt(e.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof Mc&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof Mc&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(t,e)}_tryAutoparagraphing(t){const e=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,e)&&this.schema.checkChild(e,t)&&(e._appendChild(t),this._handleNode(e))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const e=this.writer.createElement("paragraph");return this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0),!0}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(this.position.parent,t);if(!e)return!1;for(e!=this.position.parent&&this._insertPartialFragment();e!=this.position.parent;)if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(t,e){return this.schema.checkChild(t,e)?t:this.schema.isLimit(t)?null:this._getAllowedIn(t.parent,e)}}function ah(t,e,n,o={}){if(!t.schema.isObject(e))throw new k("insertobject-element-not-an-object",t,{object:e});const i=n||t.document.selection;let r=i;o.findOptimalPosition&&t.schema.isBlock(e)&&(r=t.createSelection(t.schema.findOptimalInsertionRange(i,o.findOptimalPosition)));const s=Gi(i.getSelectedBlocks()),a={};return s&&Object.assign(a,t.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),t.change((n=>{r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});let i=e;const s=r.anchor.parent;!t.schema.checkChild(s,e)&&t.schema.checkChild(s,"paragraph")&&t.schema.checkChild("paragraph",e)&&(i=n.createElement("paragraph"),n.insert(e,i)),t.schema.setAllowedAttributes(i,a,n);const c=t.insertContent(i,r);return c.isCollapsed||o.setSelection&&function(t,e,n,o){const i=t.model;if("on"==n)return void t.setSelection(e,"on");if("after"!=n)throw new k("insertobject-invalid-place-parameter-value",i);let r=e.nextSibling;if(i.schema.isInline(e))return void t.setSelection(e,"after");const s=r&&i.schema.checkChild(r,"$text");!s&&i.schema.checkChild(e.parent,"paragraph")&&(r=t.createElement("paragraph"),i.schema.setAllowedAttributes(r,o,t),i.insertContent(r,t.createPositionAfter(e)));r&&t.setSelection(r,0)}(n,e,o.setSelection,a),c}))}const ch=' ,.?!:;"-()';function lh(t,e){const{isForward:n,walker:o,unit:i,schema:r,treatEmojiAsSingleUnit:s}=t,{type:a,item:c,nextPosition:l}=e;if("text"==a)return"word"===t.unit?function(t,e){let n=t.position.textNode;n||(n=e?t.position.nodeAfter:t.position.nodeBefore);for(;n&&n.is("$text");){const o=t.position.offset-n.startOffset;if(hh(n,o,e))n=e?t.position.nodeAfter:t.position.nodeBefore;else{if(uh(n.data,o,e))break;t.next()}}return t.position}(o,n):function(t,e,n){const o=t.position.textNode;if(o){const i=o.data;let r=t.position.offset-o.startOffset;for(;Qi(i,r)||"character"==e&&Zi(i,r)||n&&Xi(i,r);)t.next(),r=t.position.offset-o.startOffset}return t.position}(o,i,s);if(a==(n?"elementStart":"elementEnd")){if(r.isSelectable(c))return Bc._createAt(c,n?"after":"before");if(r.checkChild(l,"$text"))return l}else{if(r.isLimit(c))return void o.skip((()=>!0));if(r.checkChild(l,"$text"))return l}}function dh(t,e){const n=t.root,o=Bc._createAt(n,e?"end":0);return e?new Rc(t,o):new Rc(o,t)}function uh(t,e,n){const o=e+(n?0:-1);return ch.includes(t.charAt(o))}function hh(t,e,n){return e===(n?t.offsetSize:0)}class gh extends(U()){constructor(){super(),this.markers=new Uu,this.document=new Pu(this),this.schema=new Xl,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((t=>this.decorate(t))),this.on("applyOperation",((t,e)=>{e[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((t,e)=>{if("$marker"===e.name)return!0})),Gl(this),this.document.registerPostFixer(Il),this.on("insertContent",((t,[e,n])=>{t.return=function(t,e,n){return t.change((o=>{const i=n||t.document.selection;i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0});const r=new sh(t,o,i.anchor),s=[];let a;if(e.is("documentFragment")){if(e.markers.size){const t=[];for(const[n,o]of e.markers){const{start:e,end:i}=o,r=e.isEqual(i);t.push({position:e,name:n,isCollapsed:r},{position:i,name:n,isCollapsed:r})}t.sort((({position:t},{position:e})=>t.isBefore(e)?1:-1));for(const{position:n,name:i,isCollapsed:r}of t){let t=null,a=null;const c=n.parent===e&&n.isAtStart,l=n.parent===e&&n.isAtEnd;c||l?r&&(a=c?"start":"end"):(t=o.createElement("$marker"),o.insert(t,n)),s.push({name:i,element:t,collapsed:a})}}a=e.getChildren()}else a=[e];r.handleNodes(a);let c=r.getSelectionRange();if(e.is("documentFragment")&&s.length){const t=c?al.fromRange(c):null,e={};for(let t=s.length-1;t>=0;t--){const{name:n,element:i,collapsed:a}=s[t],c=!e[n];if(c&&(e[n]=[]),i){const t=o.createPositionAt(i,"before");e[n].push(t),o.remove(i)}else{const t=r.getAffectedRange();if(!t){a&&e[n].push(r.position);continue}a?e[n].push(t[a]):e[n].push(c?t.start:t.end)}}for(const[t,[n,i]]of Object.entries(e))n&&i&&n.root===i.root&&n.root.document&&!o.model.markers.has(t)&&o.addMarker(t,{usingOperation:!0,affectsData:!0,range:new Rc(n,i)});t&&(c=t.toRange(),t.detach())}c&&(i instanceof ul?o.setSelection(c):i.setTo(c));const l=r.getAffectedRange()||t.createRange(i.anchor);return r.destroy(),l}))}(this,e,n)})),this.on("insertObject",((t,[e,n,o])=>{t.return=ah(this,e,n,o)})),this.on("canEditAt",(t=>{const e=!this.document.isReadOnly;t.return=e,e||t.stop()}))}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new lu,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){k.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{t?"function"==typeof t?(e=t,t=new lu):t instanceof lu||(t=new lu(t)):t=new lu,this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){k.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,n,...o){const i=mh(e,n);return this.fire("insertContent",[t,i,n,...o])}insertObject(t,e,n,o,...i){const r=mh(e,n);return this.fire("insertObject",[t,r,o,o,...i])}deleteContent(t,e){Xu(this,t,e)}modifySelection(t,e){!function(t,e,n={}){const o=t.schema,i="backward"!=n.direction,r=n.unit?n.unit:"character",s=!!n.treatEmojiAsSingleUnit,a=e.focus,c=new Sc({boundaries:dh(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),l={walker:c,schema:o,isForward:i,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=c.next();){if(d.done)return;const n=lh(l,d.value);if(n)return void(e instanceof ul?t.change((t=>{t.setSelectionFocus(n)})):e.setFocus(n))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change((t=>{const n=t.createDocumentFragment(),o=e.getFirstRange();if(!o||o.isCollapsed)return n;const i=o.start.root,r=o.start.getCommonPath(o.end),s=i.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:t.createRange(t.createPositionAt(s,o.start.path[r.length]),t.createPositionAt(s,o.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(t.cloneElement(e,!0),n);if(a!=o){const e=o._getTransformedByMove(a.start,t.createPositionAt(n,0),c)[0],i=t.createRange(t.createPositionAt(n,0),e.start);rh(t.createRange(e.end,t.createPositionAt(n,"end")),t),rh(i,t)}return n}))}(this,t)}hasContent(t,e={}){const n=t instanceof Rc?t:Rc._createIn(t);if(n.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:i=!1}=e;if(!i)for(const t of this.markers.getMarkersIntersectingRange(n))if(t.affectsData)return!0;for(const t of n.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!o)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}canEditAt(t){const e=mh(t);return this.fire("canEditAt",[e])}createPositionFromPath(t,e,n){return new Bc(t,e,n)}createPositionAt(t,e){return Bc._createAt(t,e)}createPositionAfter(t){return Bc._createAfter(t)}createPositionBefore(t){return Bc._createBefore(t)}createRange(t,e){return new Rc(t,e)}createRangeIn(t){return Rc._createIn(t)}createRangeOn(t){return Rc._createOn(t)}createSelection(...t){return new tl(...t)}createBatch(t){return new lu(t)}createOperationFromJSON(t){return $d.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new Ku(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return t}}function mh(t,e){if(t)return t instanceof tl||t instanceof ul?t:t instanceof xc?e||0===e?new tl(t,e):t.is("rootElement")?new tl(t,"in"):new tl(t,"on"):new tl(t)}class ph extends Ma{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class fh extends Ma{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}class kh{constructor(t){this.document=t}createDocumentFragment(t){return new Vs(this.document,t)}createElement(t,e,n){return new ds(this.document,t,e,n)}createText(t){return new Ir(this.document,t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,n){return n._insertChild(t,e)}removeChildren(t,e,n){return n._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const n=t.parent;if(n){const o=n.getChildIndex(t);return this.removeChildren(o,1,n),this.insertChild(o,e,n),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const n=e.getChildIndex(t);this.remove(t),this.insertChild(n,t.getChildren(),e)}}rename(t,e){const n=new ds(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,n)?n:null}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){Ct(t)&&void 0===n?e._setStyle(t):n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return bs._createAt(t,e)}createPositionAfter(t){return bs._createAfter(t)}createPositionBefore(t){return bs._createBefore(t)}createRange(t,e){return new ws(t,e)}createRangeOn(t){return ws._createOn(t)}createRangeIn(t){return ws._createIn(t)}createSelection(...t){return new _s(...t)}}class bh{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new k("commandcollection-command-not-found",this,{commandName:t});return n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}var wh=Object.defineProperty,Ah=Object.getOwnPropertySymbols,_h=Object.prototype.hasOwnProperty,Ch=Object.prototype.propertyIsEnumerable,vh=(t,e,n)=>e in t?wh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;const yh="contentEditing",xh="common";class Eh{constructor(t){this.keystrokeInfos=new Map,this._editor=t;const e=t.config.get("menuBar.isVisible"),n=t.locale.t;this.addKeystrokeInfoCategory({id:yh,label:n("Content editing keystrokes"),description:n("These keyboard shortcuts allow for quick access to content editing features.")});const o=[{label:n("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:n("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:n("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:n("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:n("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:n("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];e&&o.push({label:n("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:n("User interface and content navigation keystrokes"),description:n("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:o}]})}addKeystrokeInfoCategory({id:t,label:e,description:n,groups:o}){this.keystrokeInfos.set(t,{id:t,label:e,description:n,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:t,id:xh}),o&&o.forEach((e=>{this.addKeystrokeInfoGroup(((t,e)=>{for(var n in e||(e={}))_h.call(e,n)&&vh(t,n,e[n]);if(Ah)for(var n of Ah(e))Ch.call(e,n)&&vh(t,n,e[n]);return t})({categoryId:t},e))}))}addKeystrokeInfoGroup({categoryId:t=yh,id:e,label:n,keystrokes:o}){const i=this.keystrokeInfos.get(t);if(!i)throw new k("accessibility-unknown-keystroke-info-category",this._editor,{groupId:e,categoryId:t});i.groups.set(e,{id:e,label:n,keystrokes:o||[]})}addKeystrokeInfos({categoryId:t=yh,groupId:e=xh,keystrokes:n}){if(!this.keystrokeInfos.has(t))throw new k("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:t,keystrokes:n});const o=this.keystrokeInfos.get(t);if(!o.groups.has(e))throw new k("accessibility-unknown-keystroke-info-group",this._editor,{groupId:e,categoryId:t,keystrokes:n});o.groups.get(e).keystrokes.push(...n)}}var Dh=Object.getOwnPropertySymbols,Ih=Object.prototype.hasOwnProperty,Mh=Object.prototype.propertyIsEnumerable,Sh=(t,e)=>{var n={};for(var o in t)Ih.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&Dh)for(var o of Dh(t))e.indexOf(o)<0&&Mh.call(t,o)&&(n[o]=t[o]);return n};class Th extends(U()){constructor(t={}){super();const e=this.constructor,n=e.defaultConfig||{},{translations:o}=n,i=Sh(n,["translations"]),r=t,{translations:s=o}=r,a=Sh(r,["translations"]),c=t.language||i.language;this._context=t.context||new lr({language:c,translations:s}),this._context._addEditor(this,!t.context);const l=Array.from(e.builtinPlugins||[]);this.config=new _o(a,i),this.config.define("plugins",l),this.config.define(this._context._getEditorConfig()),this.plugins=new rr(this,l,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new bh,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new gh,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const d=new as;this.data=new yd(this.model,d),this.editing=new Yl(this.model,d),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new xd([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new ur(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new Eh(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(t){throw new k("editor-isreadonly-has-no-setter")}enableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new k("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)||(this._readOnlyLocks.add(t),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new k("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)&&(this._readOnlyLocks.delete(t),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(t){this.data.set(t)}getData(t){return this.data.get(t)}initPlugins(){const t=this.config,e=t.get("plugins"),n=t.get("removePlugins")||[],o=t.get("extraPlugins")||[],i=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(o),n,i)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise((t=>this.once("ready",t)))),t.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(t,...e){try{return this.commands.execute(t,...e)}catch(t){k.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}static create(...t){throw new Error("This is an abstract method.")}}function Bh(t){return class extends t{updateSourceElement(t){if(!this.sourceElement)throw new k("editor-missing-sourceelement",this);const e=this.config.get("updateSourceElementOnDestroy"),n=this.sourceElement instanceof HTMLTextAreaElement;if(!e&&!n)return void qo(this.sourceElement,"");const o="string"==typeof t?t:this.data.get();qo(this.sourceElement,o)}}}function Nh(t,e){if(e.ckeditorInstance)throw new k("editor-source-element-already-used",t);e.ckeditorInstance=t,t.once("destroy",(()=>{delete e.ckeditorInstance}))}Bh.updateSourceElement=Bh(Object).prototype.updateSourceElement;class Ph extends dr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new qi({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new k("pendingactions-add-invalid-message",this);const e=new(U());return e.set("message",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const Oh={bold:'',cancel:'',caption:'',check:'',cog:'',colorPalette:'',eraser:'',history:'',image:'',imageUpload:'',imageAssetManager:'',imageUrl:'',lowVision:'',textAlternative:'',loupe:'',previousArrow:'',nextArrow:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:'',dragIndicator:'',redo:'',undo:'',bulletedList:'',numberedList:'',todoList:'',codeBlock:'',browseFiles:'',heading1:'',heading2:'',heading3:'',heading4:'',heading5:'',heading6:'',horizontalLine:'',html:'',indent:'',outdent:'',table:''};class Lh{constructor(t){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof t.crashNumberLimit?t.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof t.minimumNonErrorTimePeriod?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const e="error"in t?t.error:t.reason;e instanceof Error&&this._handleError(e,t)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)}off(t,e){this._listeners[t]=this._listeners[t].filter((t=>t!==e))}_fire(t,...e){const n=this._listeners[t]||[];for(const t of n)t.apply(this,[null,...e])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,e){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:e instanceof ErrorEvent?e.filename:void 0,lineno:e instanceof ErrorEvent?e.lineno:void 0,colno:e instanceof ErrorEvent?e.colno:void 0,date:this._now()});const n=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:n}),n?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&void 0!==t.context&&null!==t.context&&"ready"===this.state&&this._isErrorComingFromThisItem(t)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function zh(t,e=new Set){const n=[t],o=new Set;let i=0;for(;n.length>i;){const t=n[i++];if(!o.has(t)&&Rh(t)&&!e.has(t))if(o.add(t),Symbol.iterator in t)try{for(const e of t)n.push(e)}catch(t){}else for(const e in t)"defaultValue"!==e&&n.push(t[e])}return o}function Rh(t){const e=Object.prototype.toString.call(t),n=typeof t;return!("number"===n||"boolean"===n||"string"===n||"symbol"===n||"function"===n||"[object Date]"===e||"[object RegExp]"===e||"[object Module]"===e||null==t||t._watchdogExcluded||t instanceof EventTarget||t instanceof Event)}function jh(t,e,n=new Set){if(t===e&&("object"==typeof(o=t)&&null!==o))return!0;var o;const i=zh(t,n),r=zh(e,n);for(const t of i)if(r.has(t))return!0;return!1}const Fh=function(t,e,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return L(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Ua(t,e,{leading:o,maxWait:e,trailing:i})};var Vh=Object.defineProperty,Hh=Object.defineProperties,Uh=Object.getOwnPropertyDescriptors,qh=Object.getOwnPropertySymbols,Gh=Object.prototype.hasOwnProperty,Wh=Object.prototype.propertyIsEnumerable,Kh=(t,e,n)=>e in t?Vh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$h=(t,e)=>{for(var n in e||(e={}))Gh.call(e,n)&&Kh(t,n,e[n]);if(qh)for(var n of qh(e))Wh.call(e,n)&&Kh(t,n,e[n]);return t};class Yh extends Lh{constructor(t,e={}){super(e),this._editor=null,this._lifecyclePromise=null,this._initUsingData=!0,this._editables={},this._throttledSave=Fh(this._save.bind(this),"number"==typeof e.saveInterval?e.saveInterval:5e3),t&&(this._creator=(e,n)=>t.create(e,n)),this._destructor=t=>t.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((t=>{console.error("An error happened during the editor destroying.",t)})).then((()=>{const t={},e=[],n=this._config.rootsAttributes||{},o={};for(const[i,r]of Object.entries(this._data.roots))r.isLoaded?(t[i]="",o[i]=n[i]||{}):e.push(i);const i=(r=$h({},this._config),s={extraPlugins:this._config.extraPlugins||[],lazyRoots:e,rootsAttributes:o,_watchdogInitialData:this._data},Hh(r,Uh(s)));var r,s;return delete i.initialData,i.extraPlugins.push(Qh),this._initUsingData?this.create(t,i,i.context):Ao(this._elementOrData)?this.create(this._elementOrData,i,i.context):this.create(this._editables,i,i.context)})).then((()=>{this._fire("restart")}))}create(t=this._elementOrData,e=this._config,n){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(super._startErrorHandling(),this._elementOrData=t,this._initUsingData="string"==typeof t||Object.keys(t).length>0&&"string"==typeof Object.values(t)[0],this._config=this._cloneEditorConfiguration(e)||{},this._config.context=n,this._creator(t,this._config)))).then((t=>{this._editor=t,t.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=t.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")})).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const t=this._editor;return this._editor=null,t.model.document.off("change:data",this._throttledSave),this._destructor(t)}))}_save(){const t=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=t}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t=this._editor,e=t.model.document.roots.filter((t=>t.isAttached()&&"$graveyard"!=t.rootName)),{plugins:n}=t,o=n.has("CommentsRepository")&&n.get("CommentsRepository"),i=n.has("TrackChanges")&&n.get("TrackChanges"),r={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};e.forEach((t=>{r.roots[t.rootName]={content:JSON.stringify(Array.from(t.getChildren())),attributes:JSON.stringify(Array.from(t.getAttributes())),isLoaded:t._isLoaded}}));for(const e of t.model.markers)e._affectsData&&(r.markers[e.name]={rangeJSON:e.getRange().toJSON(),usingOperation:e._managedUsingOperations,affectsData:e._affectsData});return o&&(r.commentThreads=JSON.stringify(o.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),i&&(r.suggestions=JSON.stringify(i.getSuggestions({toJSON:!0,skipNotAttached:!0}))),r}_getEditables(){const t={};for(const e of this.editor.model.document.getRootNames()){const n=this.editor.ui.getEditableElement(e);n&&(t[e]=n)}return t}_isErrorComingFromThisItem(t){return jh(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return wo(t,((t,e)=>Ao(t)||"context"===e?t:void 0))}}class Qh{constructor(t){this.editor=t,this._data=t.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(t=>{t.stop(),this.editor.model.enqueueChange({isUndoable:!1},(t=>{this._restoreCollaborationData(),this._restoreEditorData(t)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(t,e){if("name"in e){const n=t.createElement(e.name,e.attributes);if(e.children)for(const o of e.children)n._appendChild(this._createNode(t,o));return n}return t.createText(e.data,e.attributes)}_restoreEditorData(t){const e=this.editor;Object.entries(this._data.roots).forEach((([n,{content:o,attributes:i}])=>{const r=JSON.parse(o),s=JSON.parse(i),a=e.model.document.getRoot(n);for(const[e,n]of s)t.setAttribute(e,n,a);for(const e of r){const n=this._createNode(t,e);t.insert(n,a,"end")}})),Object.entries(this._data.markers).forEach((([n,o])=>{const{document:i}=e.model,r=o,{rangeJSON:{start:s,end:a}}=r,c=((t,e)=>{var n={};for(var o in t)Gh.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&qh)for(var o of qh(t))e.indexOf(o)<0&&Wh.call(t,o)&&(n[o]=t[o]);return n})(r,["rangeJSON"]),l=i.getRoot(s.root),d=t.createPositionFromPath(l,s.path,s.stickiness),u=t.createPositionFromPath(l,a.path,a.stickiness),h=t.createRange(d,u);t.addMarker(n,$h({range:h},c))}))}_restoreCollaborationData(){const t=JSON.parse(this._data.commentThreads),e=JSON.parse(this._data.suggestions);t.forEach((t=>{const e=this.editor.config.get("collaboration.channelId"),n=this.editor.plugins.get("CommentsRepository");if(n.hasCommentThread(t.threadId)){n.getCommentThread(t.threadId).remove()}n.addCommentThread($h({channelId:e},t))})),e.forEach((t=>{const e=this.editor.plugins.get("TrackChangesEditing");if(e.hasSuggestion(t.id)){e.getSuggestion(t.id).attributes=t.attributes}else e.addSuggestionData(t)}))}}const Zh=Symbol("MainQueueId");class Jh{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t,e){const n=t===Zh;this._activeActions++,this._queues.get(t)||this._queues.set(t,Promise.resolve());const o=(n?Promise.all(this._queues.values()):Promise.all([this._queues.get(Zh),this._queues.get(t)])).then(e),i=o.catch((()=>{}));return this._queues.set(t,i),o.finally((()=>{this._activeActions--,this._queues.get(t)===i&&0===this._activeActions&&this._onEmptyCallbacks.forEach((t=>t()))}))}}function Xh(t){return Array.isArray(t)?t:[t]}function tg({emitter:t,activator:e,callback:n,contextElements:o}){t.listenTo(document,"mousedown",((t,i)=>{if(!e())return;const r="function"==typeof i.composedPath?i.composedPath():[],s="function"==typeof o?o():o;for(const t of s)if(t.contains(i.target)||r.includes(t))return;n()}))}function eg(t){return class extends t{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...t){super(...t),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function ng({view:t}){t.listenTo(t.element,"submit",((e,n)=>{n.preventDefault(),t.fire("submit")}),{useCapture:!0})}function og({keystrokeHandler:t,focusTracker:e,gridItems:n,numberOfColumns:o,uiLanguageDirection:i}){const r="number"==typeof o?()=>o:o;function s(t){return o=>{const i=n.find((t=>t.element===e.focusedElement)),r=n.getIndex(i),s=t(r,n);n.get(s).focus(),o.stopPropagation(),o.preventDefault()}}function a(t,e){return t===e-1?0:t+1}function c(t,e){return 0===t?e-1:t-1}t.set("arrowright",s(((t,e)=>"rtl"===i?c(t,e.length):a(t,e.length)))),t.set("arrowleft",s(((t,e)=>"rtl"===i?a(t,e.length):c(t,e.length)))),t.set("arrowup",s(((t,e)=>{let n=t-r();return n<0&&(n=t+r()*Math.floor(e.length/r()),n>e.length-1&&(n-=r())),n}))),t.set("arrowdown",s(((t,e)=>{let n=t+r();return n>e.length-1&&(n=t%r()),n})))}class ig extends qi{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",((t,e,n)=>{this._renderViewIntoCollectionParent(e,n)})),this.on("remove",((t,e)=>{e.element&&this._parentElement&&e.element.remove()})),this._parentElement=null}destroy(){this.map((t=>t.destroy()))}setParent(t){this._parentElement=t;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...t){if(!t.length||!t.every((t=>"string"==typeof t)))throw new k("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const n of this)for(const o of t)n.delegate(o).to(e);this.on("add",((n,o)=>{for(const n of t)o.delegate(n).to(e)})),this.on("remove",((n,o)=>{for(const n of t)o.stopDelegating(n,e)}))}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}remove(t){return super.remove(t)}}class rg extends(I()){constructor(t){super(),Object.assign(this,pg(mg(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,intoFragment:!1,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new k("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)_g(n)?yield n:Cg(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,o)=>new ag({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:o}),if:(n,o,i)=>new cg({observable:t,emitter:e,attribute:n,valueIfTrue:o,callback:i})}}static extend(t,e){if(t._isRendered)throw new k("template-extend-render",[this,t]);wg(t,pg(mg(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new k("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),lg(this.text)?this._bindToObservable({schema:this.text,updater:ug(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){if(!this.attributes)return;const e=t.node,n=t.revertData;for(const o in this.attributes){const i=e.getAttribute(o),r=this.attributes[o];n&&(n.attributes[o]=i);const s=yg(r)?r[0].ns:null;if(lg(r)){const a=yg(r)?r[0].value:r;n&&xg(o)&&a.unshift(i),this._bindToObservable({schema:a,updater:hg(e,o,s),data:t})}else if("style"==o&&"string"!=typeof r[0])this._renderStyleAttribute(r[0],t);else{n&&i&&xg(o)&&r.unshift(i);const t=r.map((t=>t&&t.value||t)).reduce(((t,e)=>t.concat(e)),[]).reduce(kg,"");Ag(t)||e.setAttributeNS(s,o,t)}}}_renderStyleAttribute(t,e){const n=e.node;for(const o in t){const i=t[o];lg(i)?this._bindToObservable({schema:[i],updater:gg(n,o),data:e}):n.style[o]=i}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,o=t.isApplying;let i=0;for(const r of this.children)if(vg(r)){if(!o){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(_g(r))o||(r.isRendered||r.render(),n.appendChild(r.element));else if(yo(r))n.appendChild(r);else if(o){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({intoFragment:!1,node:n.childNodes[i++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map((n=>{const[o,i]=e.split("@");return n.activateDomEventListener(o,i,t)}));t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const o=n.revertData;dg(t,e,n);const i=t.filter((t=>!Ag(t))).filter((t=>t.observable)).map((o=>o.activateAttributeListener(t,e,n)));o&&o.bindings.push(i)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)return void(t.textContent=e.text);const n=t;for(const t in e.attributes){const o=e.attributes[t];null===o?n.removeAttribute(t):n.setAttribute(t,o)}for(let t=0;tdg(t,e,n);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,o),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,o)}}}class ag extends sg{constructor(t){super(t),this.eventNameOrFunction=t.eventNameOrFunction}activateDomEventListener(t,e,n){const o=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,o),()=>{this.emitter.stopListening(n.node,t,o)}}}class cg extends sg{constructor(t){super(t),this.valueIfTrue=t.valueIfTrue}getValue(t){return!Ag(super.getValue(t))&&(this.valueIfTrue||!0)}}function lg(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(lg):t instanceof sg)}function dg(t,e,{node:n}){const o=function(t,e){return t.map((t=>t instanceof sg?t.getValue(e):t))}(t,n);let i;i=1==t.length&&t[0]instanceof cg?o[0]:o.reduce(kg,""),Ag(i)?e.remove():e.set(i)}function ug(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function hg(t,e,n){return{set(o){t.setAttributeNS(n,e,o)},remove(){t.removeAttributeNS(n,e)}}}function gg(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function mg(t){return wo(t,(t=>{if(t&&(t instanceof sg||Cg(t)||_g(t)||vg(t)))return t}))}function pg(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=wi(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)fg(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=wi(t[e].value)),fg(t,e)}(t.attributes);const e=[];if(t.children)if(vg(t.children))e.push(t.children);else for(const n of t.children)Cg(n)||_g(n)||yo(n)?e.push(n):e.push(new rg(n));t.children=e}return t}function fg(t,e){t[e]=wi(t[e])}function kg(t,e){return Ag(e)?t:Ag(t)?e:`${t} ${e}`}function bg(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function wg(t,e){if(e.attributes&&(t.attributes||(t.attributes={}),bg(t.attributes,e.attributes)),e.eventListeners&&(t.eventListeners||(t.eventListeners={}),bg(t.eventListeners,e.eventListeners)),e.text&&t.text.push(...e.text),e.children&&e.children.length){if(t.children.length!=e.children.length)throw new k("ui-template-extend-children-mismatch",t);let n=0;for(const o of e.children)wg(t.children[n++],o)}}function Ag(t){return!t&&0!==t}function _g(t){return t instanceof Ig}function Cg(t){return t instanceof rg}function vg(t){return t instanceof ig}function yg(t){return L(t[0])&&t[0].ns}function xg(t){return"class"==t||"style"==t}var Eg=n(7676),Dg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Eg.A,Dg);Eg.A.locals;class Ig extends(Do(U())){constructor(t){super(),this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new qi,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((e,n)=>{n.locale=t,n.t=t&&t.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=rg.bind(this,this)}createCollection(t){const e=new ig(t);return this._viewCollections.add(e),e}registerChild(t){Z(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){Z(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new rg(t)}extendTemplate(t){rg.extend(this.template,t)}render(){if(this.isRendered)throw new k("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((t=>t.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}var Mg=n(7801),Sg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Mg.A,Sg);Mg.A.locals;class Tg extends Ig{constructor(t){super(t),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${g()}`;const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}class Bg extends Ig{constructor(t,e){super(t);const n=t.t,o=new Tg;o.text=n("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":o.id,role:"document",tabindex:-1},children:[mt(document,"p",{},n("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(e.values())),o]})}focus(){this.element.focus()}_createCategories(t){return t.map((t=>{const e=[mt(document,"h3",{},t.label),...Array.from(t.groups.values()).map((t=>this._createGroup(t))).flat()];return t.description&&e.splice(1,0,mt(document,"p",{},t.description)),mt(document,"section",{},e)}))}_createGroup(t){const e=t.keystrokes.sort(((t,e)=>t.label.localeCompare(e.label))).map((t=>this._createGroupRow(t))).flat(),n=[mt(document,"dl",{},e)];return t.label&&n.unshift(mt(document,"h4",{},t.label)),n}_createGroupRow(t){const e=this.locale.t,n=mt(document,"dt"),o=mt(document,"dd"),r=function(t){if("string"==typeof t)return[[t]];if("string"==typeof t[0])return[t];return t}(t.keystroke),s=[];for(const t of r)s.push(t.map(Ng).join(""));return n.innerHTML=t.label,o.innerHTML=s.join(", ")+(t.mayRequireFn&&i.isMac?` ${e("(may require Fn)")}`:""),[n,o]}}function Ng(t){return ki(t).split("+").map((t=>`${t}`)).join("+")}const Pg='';var Og=n(8527),Lg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Og.A,Lg);Og.A.locals;class zg extends tr{constructor(){super(...arguments),this.contentView=null}static get requires(){return[Rp]}static get pluginName(){return"AccessibilityHelp"}init(){const t=this.editor,e=t.locale.t;t.ui.componentFactory.add("accessibilityHelp",(()=>{const t=this._createButton(Wg);return t.set({tooltip:!0,withText:!1,label:e("Accessibility help")}),t})),t.ui.componentFactory.add("menuBar:accessibilityHelp",(()=>{const t=this._createButton(Vk);return t.label=e("Accessibility"),t})),t.keystrokes.set("Alt+0",((t,e)=>{this._showDialog(),e()})),this._setupRootLabels()}_createButton(t){const e=new t(this.editor.locale);return e.set({keystroke:"Alt+0",icon:Pg}),e.on("execute",(()=>this._showDialog())),e}_setupRootLabels(){const t=this.editor,e=t.editing.view,n=t.t;function o(t,e){const o=`${e.getAttribute("aria-label")}. ${n("Press %0 for help.",[ki("Alt+0")])}`;t.setAttribute("aria-label",o,e)}t.ui.on("ready",(()=>{e.change((t=>{for(const n of e.document.roots)o(t,n)})),t.on("addRoot",((n,i)=>{const r=t.editing.view.document.getRoot(i.rootName);e.change((t=>o(t,r)))}),{priority:"low"})}))}_showDialog(){const t=this.editor,e=t.plugins.get("Dialog"),n=t.locale.t;this.contentView||(this.contentView=new Bg(t.locale,t.accessibility.keystrokeInfos)),e.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:n("Accessibility help"),icon:Pg,hasCloseButton:!0,content:this.contentView})}}class Rg extends ig{constructor(t,e=[]){super(e),this.locale=t}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new rg({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=mt(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&0==t.childElementCount&&t.remove()}}var jg=n(7621),Fg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(jg.A,Fg);jg.A.locals;const Vg=class extends Ig{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",t.if("isVisible","ck-hidden",(t=>!t)),"ck-reset_all-excluded",t.if("isColorInherited","ck-icon_inherit-color")],viewBox:t.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");e&&(this.viewBox=e);for(const{name:e,value:n}of Array.from(t.attributes))Vg.presentationalAttributeNames.includes(e)&&this.element.setAttribute(e,n);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((t=>{t.style.fill=this.fillColor}))}};let Hg=Vg;Hg.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];class Ug extends Ig{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:t.to("style"),id:t.to("id")},children:[{text:t.to("text")}]})}}var qg=n(9715),Gg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(qg.A,Gg);qg.A.locals;class Wg extends Ig{constructor(t,e=new Ug){super(t),this._focusDelayed=null;const n=this.bindTemplate,o=g();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${o}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(e),this.iconView=new Hg,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const r={tag:"button",attributes:{class:["ck","ck-button",n.to("class"),n.if("isEnabled","ck-disabled",(t=>!t)),n.if("isVisible","ck-hidden",(t=>!t)),n.to("isOn",(t=>t?"ck-on":"ck-off")),n.if("withText","ck-button_with-text"),n.if("withKeystroke","ck-button_with-keystroke")],role:n.to("role"),type:n.to("type",(t=>t||"button")),tabindex:n.to("tabindex"),"aria-checked":n.to("ariaChecked"),"aria-label":n.to("ariaLabel"),"aria-labelledby":n.to("ariaLabelledBy"),"aria-disabled":n.if("isEnabled",!0,(t=>!t)),"aria-pressed":n.to("isOn",(t=>!!this.isToggleable&&String(!!t))),"data-cke-tooltip-text":n.to("_tooltipString"),"data-cke-tooltip-position":n.to("tooltipPosition")},children:this.children,on:{click:n.to((t=>{this.isEnabled?this.fire("execute"):t.preventDefault()}))}};i.isSafari&&(this._focusDelayed||(this._focusDelayed=Yi((()=>this.focus()),0)),r.on.mousedown=n.to((()=>{this._focusDelayed()})),r.on.mouseup=n.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(r)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(t){return t.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),t}_createKeystrokeView(){const t=new Ig;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(t=>ki(t)))}]}),t}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=ki(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var Kg=n(4391),$g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Kg.A,$g);Kg.A.locals;class Yg extends Wg{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new Ig;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}class Qg extends Wg{constructor(t){super(t),this.buttonView=this,this._fileInputView=new Zg(t),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",(()=>{this._fileInputView.open()})),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}class Zg extends Ig{constructor(t){super(t),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}const Jg='';var Xg=n(25),tm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Xg.A,tm);Xg.A.locals;class em extends Ig{constructor(t,e){super(t);const n=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),e&&this.children.addMany(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",n.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:n.if("isCollapsed","hidden"),"aria-labelledby":n.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const t=new Wg(this.locale),e=t.bindTemplate;return t.set({withText:!0,icon:Jg}),t.extendTemplate({attributes:{"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("label").to(this),t.bind("isOn").to(this,"isCollapsed",(t=>!t)),t.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),t}}var nm=n(7317),om={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(nm.A,om);nm.A.locals;n(6931);n(9047);var im=n(4962),rm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(im.A,rm);im.A.locals;class sm extends Ig{constructor(t,e){super(t);const n=`ck-labeled-field-view-${g()}`,o=`ck-labeled-field-view-status-${g()}`;this.fieldView=e(this,n,o),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(o),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(t=>!t)),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(t){const e=new Tg(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new Ig(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",(t=>!t))],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}focus(t){this.fieldView.focus(t)}}class am extends Ig{constructor(t){super(t),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new Wi,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",e.if("isFocused","ck-input_focused"),e.if("isEmpty","ck-input-text_empty"),e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),tabindex:e.to("tabIndex"),readonly:e.to("isReadOnly"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById"),"aria-label":e.to("ariaLabel")},on:{input:e.to(((...t)=>{this.fire("input",...t),this._updateIsEmpty()})),change:e.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((t,e,n)=>{this._setDomElementValue(n),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}var cm=n(253),lm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(cm.A,lm);cm.A.locals;class dm extends am{constructor(t){super(t),this.set("inputMode","text");const e=this.bindTemplate;this.extendTemplate({attributes:{inputmode:e.to("inputMode")}})}}class um extends dm{constructor(t){super(t),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}var hm=n(1671),gm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(hm.A,gm);hm.A.locals;class mm extends Ig{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",e.to("position",(t=>`ck-dropdown__panel_${t}`)),e.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:e.to((t=>{"input"!==t.target.tagName.toLocaleLowerCase()&&t.preventDefault()}))}})}focus(){if(this.children.length){const t=this.children.first;"function"==typeof t.focus?t.focus():b("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}var pm=n(8149),fm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(pm.A,fm);pm.A.locals;const km=class extends Ig{constructor(t,e,n){super(t);const o=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Ki,this.focusTracker=new Wi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",(t=>!t))],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[e,n]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":o.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.on("change:isOpen",((t,e,n)=>{if(n)if("auto"===this.panelPosition){const t=km._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=t?t.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const t=(t,e)=>{this.isOpen&&(this.isOpen=!1,e())};this.keystrokes.set("arrowdown",((t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())})),this.keystrokes.set("arrowright",((t,e)=>{this.isOpen&&e()})),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:t,north:e,southEast:n,southWest:o,northEast:i,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=km.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,o,s,a,t,i,r,c,l,e]:[o,n,a,s,t,r,i,l,c,e]}};let bm=km;bm.defaultPanelPositions={south:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/2,name:"s"}),southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),southMiddleEast:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/4,name:"sme"}),southMiddleWest:(t,e)=>({top:t.bottom,left:t.left-3*(e.width-t.width)/4,name:"smw"}),north:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/2,name:"n"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),northMiddleEast:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/4,name:"nme"}),northMiddleWest:(t,e)=>({top:t.top-e.height,left:t.left-3*(e.width-t.width)/4,name:"nmw"})},bm._getOptimalPosition=Zo;class wm extends Wg{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(t=>String(t)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new Hg;return t.content=Jg,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}class Am extends(I()){constructor(t){if(super(),this.focusables=t.focusables,this.focusTracker=t.focusTracker,this.keystrokeHandler=t.keystrokeHandler,this.actions=t.actions,t.actions&&t.keystrokeHandler)for(const e in t.actions){let n=t.actions[e];"string"==typeof n&&(n=[n]);for(const o of n)t.keystrokeHandler.set(o,((t,n)=>{this[e](),n()}))}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(_m)||null}get last(){return this.focusables.filter(_m).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((e,n)=>{const o=e.element===this.focusTracker.focusedElement;return o&&(t=n),o})),t)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const t=this.next;t&&this.focusables.getIndex(t)===this.current||t===this.first?this.fire("forwardCycle"):this._focus(t,1)}focusPrevious(){const t=this.previous;t&&this.focusables.getIndex(t)===this.current||t===this.last?this.fire("backwardCycle"):this._focus(t,-1)}_focus(t,e){t&&this.focusTracker.focusedElement!==t.element&&t.focus(e)}_getDomFocusableItem(t){const e=this.focusables.length;if(!e)return null;const n=this.current;if(null===n)return this[1===t?"first":"last"];let o=this.focusables.get(n),i=(n+e+t)%e;do{const n=this.focusables.get(i);if(_m(n)){o=n;break}i=(i+e+t)%e}while(i!==n);return o}}function _m(t){return Cm(t)&&Yo(t.element)}function Cm(t){return!(!("focus"in t)||"function"!=typeof t.focus)}class vm extends Ig{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class ym extends Ig{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var xm=Object.defineProperty,Em=Object.getOwnPropertySymbols,Dm=Object.prototype.hasOwnProperty,Im=Object.prototype.propertyIsEnumerable,Mm=(t,e,n)=>e in t?xm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sm=(t,e)=>{for(var n in e||(e={}))Dm.call(e,n)&&Mm(t,n,e[n]);if(Em)for(var n of Em(e))Im.call(e,n)&&Mm(t,n,e[n]);return t};function Tm(t){if(Array.isArray(t))return{items:t,removeItems:[]};const e={items:[],removeItems:[]};return t?Sm(Sm({},e),t):e}var Bm=n(9677),Nm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Bm.A,Nm);Bm.A.locals;const{threeVerticalDots:Pm}=Oh,Om={alignLeft:Oh.alignLeft,bold:Oh.bold,importExport:Oh.importExport,paragraph:Oh.paragraph,plus:Oh.plus,text:Oh.text,threeVerticalDots:Oh.threeVerticalDots,pilcrow:Oh.pilcrow,dragIndicator:Oh.dragIndicator};class Lm extends Ig{constructor(t,e){super(t);const n=this.bindTemplate,o=this.t;this.options=e||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Wi,this.keystrokes=new Ki,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new zm(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const i="rtl"===t.uiLanguageDirection;this._focusCycler=new Am({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[i?"arrowright":"arrowleft","arrowup"],focusNext:[i?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((t=>{t.target===s.element&&t.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new jm(this):new Rm(this)}render(){super.render(),this.focusTracker.add(this.element);for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e,n){this.items.addMany(this._buildItemsFromConfig(t,e,n))}_buildItemsFromConfig(t,e,n){const o=Tm(t),i=n||o.removeItems;return this._cleanItemsConfiguration(o.items,e,i).map((t=>L(t)?this._createNestedToolbarDropdown(t,e,i):"|"===t?new vm:"-"===t?new ym:e.create(t))).filter((t=>!!t))}_cleanItemsConfiguration(t,e,n){const o=t.filter(((t,o,i)=>"|"===t||-1===n.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(b("toolbarview-line-break-ignored-when-grouping-items",i),!1):!(!L(t)&&!e.has(t))||(b("toolbarview-item-unavailable",{item:t}),!1))));return this._cleanSeparatorsAndLineBreaks(o)}_cleanSeparatorsAndLineBreaks(t){const e=t=>"-"!==t&&"|"!==t,n=t.length,o=t.findIndex(e);if(-1===o)return[];const i=n-t.slice().reverse().findIndex(e);return t.slice(o,i).filter(((t,n,o)=>{if(e(t))return!0;return!(n>0&&o[n-1]===t)}))}_createNestedToolbarDropdown(t,e,n){let{label:o,icon:i,items:r,tooltip:s=!0,withText:a=!1}=t;if(r=this._cleanItemsConfiguration(r,e,n),!r.length)return null;const c=Xm(this.locale);return o||b("toolbarview-nested-toolbar-dropdown-missing-label",t),c.class="ck-toolbar__nested-toolbar-dropdown",c.buttonView.set({label:o,tooltip:s,withText:!!a}),!1!==i?c.buttonView.icon=Om[i]||i||Pm:c.buttonView.withText=!0,tp(c,(()=>c.toolbarView._buildItemsFromConfig(r,e,n))),c}}class zm extends Ig{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Rm{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using((t=>t)),t.focusables.bindTo(t.items).using((t=>Cm(t)?t:null)),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class jm{constructor(t){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=t,this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),t.itemsView.children.bindTo(this.ungroupedItems).using((t=>t)),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),t.children.on("change",this._updateFocusCyclableItems.bind(this)),t.items.on("change",((t,e)=>{const n=e.index,o=Array.from(e.added);for(const t of e.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=n;tthis.ungroupedItems.length?this.groupedItems.add(e,t-this.ungroupedItems.length):this.ungroupedItems.add(e,t)}this._updateGrouping()})),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!Yo(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let e;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==t&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,n=new zo(t.lastChild),o=new zo(t);if(!this.cachedPadding){const n=To.window.getComputedStyle(t),o="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[o])}return"ltr"===e?n.right>o.right-this.cachedPadding:n.left{t&&t===e.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=e.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new vm),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const t=this.viewLocale,e=t.t,n=Xm(t);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",tp(n,this.groupedItems),n.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:Pm}),n}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((t=>{Cm(t)&&this.viewFocusables.add(t)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class Fm extends Ig{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",e.if("isVisible","ck-hidden",(t=>!t))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class Vm extends Ig{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class Hm extends Ig{constructor(t,e=new Tg){super(t);const n=this.bindTemplate,o=new Gm(t);this.set({label:"",isVisible:!0}),this.labelView=e,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,o]),o.set({role:"group",ariaLabelledBy:e.id}),o.focusTracker.destroy(),o.keystrokes.destroy(),this.items=o.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",n.if("isVisible","ck-hidden",(t=>!t))]},children:this.children})}focus(){if(this.items){const t=this.items.find((t=>!(t instanceof Vm)));t&&t.focus()}}}var Um=n(5199),qm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Um.A,qm);Um.A.locals;class Gm extends Ig{constructor(t){super(t),this._listItemGroupToChangeListeners=new WeakMap;const e=this.bindTemplate;this.focusables=new ig,this.items=this.createCollection(),this.focusTracker=new Wi,this.keystrokes=new Ki,this._focusCycler=new Am({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:e.to("role"),"aria-label":e.to("ariaLabel"),"aria-labelledby":e.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const t of this.items)t instanceof Hm?this._registerFocusableItemsGroup(t):t instanceof Fm&&this._registerFocusableListItem(t);this.items.on("change",((t,e)=>{for(const t of e.removed)t instanceof Hm?this._deregisterFocusableItemsGroup(t):t instanceof Fm&&this._deregisterFocusableListItem(t);for(const t of Array.from(e.added).reverse())t instanceof Hm?this._registerFocusableItemsGroup(t,e.index):this._registerFocusableListItem(t,e.index)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(t,e){this.focusTracker.add(t.element),this.focusables.add(t,e)}_deregisterFocusableListItem(t){this.focusTracker.remove(t.element),this.focusables.remove(t)}_getOnGroupItemsChangeCallback(t){return(e,n)=>{for(const t of n.removed)this._deregisterFocusableListItem(t);for(const e of Array.from(n.added).reverse())this._registerFocusableListItem(e,this.items.getIndex(t)+n.index)}}_registerFocusableItemsGroup(t,e){Array.from(t.items).forEach(((t,n)=>{const o=void 0!==e?e+n:void 0;this._registerFocusableListItem(t,o)}));const n=this._getOnGroupItemsChangeCallback(t);this._listItemGroupToChangeListeners.set(t,n),t.items.on("change",n)}_deregisterFocusableItemsGroup(t){for(const e of t.items)this._deregisterFocusableListItem(e);t.items.off("change",this._listItemGroupToChangeListeners.get(t)),this._listItemGroupToChangeListeners.delete(t)}}var Wm=n(1792),Km={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Wm.A,Km);Wm.A.locals;class $m extends Ig{constructor(t,e){super(t);const n=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(e),this.arrowView=this._createArrowView(),this.keystrokes=new Ki,this.focusTracker=new Wi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",n.to("class"),n.if("isVisible","ck-hidden",(t=>!t)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((t,e)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),e())})),this.keystrokes.set("arrowleft",((t,e)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),e())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(t){const e=t||new Wg;return t||e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const t=new Wg,e=t.bindTemplate;return t.icon=Jg,t.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":e.to("isOn"),"aria-haspopup":!0,"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("isEnabled").to(this),t.bind("label").to(this),t.bind("tooltip").to(this),t.delegate("execute").to(this,"open"),t}}var Ym=n(1666),Qm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Ym.A,Qm);Ym.A.locals;var Zm=n(3629),Jm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Zm.A,Jm);Zm.A.locals;function Xm(t,e=wm){const n="function"==typeof e?new e(t):e,o=new mm(t),i=new bm(t,n,o);return n.bind("isEnabled").to(i),n instanceof $m?n.arrowView.bind("isOn").to(i,"isOpen"):n.bind("isOn").to(i,"isOpen"),function(t){(function(t){t.on("render",(()=>{tg({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:()=>[t.element,...t.focusTracker._elements]})}))})(t),function(t){t.on("execute",(e=>{e.source instanceof Yg||(t.isOpen=!1)}))}(t),function(t){t.focusTracker.on("change:isFocused",((e,n,o)=>{t.isOpen&&!o&&(t.isOpen=!1)}))}(t),function(t){t.keystrokes.set("arrowdown",((e,n)=>{t.isOpen&&(t.panelView.focus(),n())})),t.keystrokes.set("arrowup",((e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())}))}(t),function(t){t.on("change:isOpen",((e,n,o)=>{if(o)return;const i=t.panelView.element;i&&i.contains(To.document.activeElement)&&t.buttonView.focus()}))}(t),function(t){t.on("change:isOpen",((e,n,o)=>{o&&t.panelView.focus()}),{priority:"low"})}(t)}(i),i}function tp(t,e,n={}){t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.isOpen?ep(t,e,n):t.once("change:isOpen",(()=>ep(t,e,n)),{priority:"highest"}),n.enableActiveItemFocusOnDropdownOpen&&ip(t,(()=>t.toolbarView.items.find((t=>t.isOn))))}function ep(t,e,n){const o=t.locale,i=o.t,r=t.toolbarView=new Lm(o),s="function"==typeof e?e():e;r.ariaLabel=n.ariaLabel||i("Dropdown toolbar"),n.maxWidth&&(r.maxWidth=n.maxWidth),n.class&&(r.class=n.class),n.isCompact&&(r.isCompact=n.isCompact),n.isVertical&&(r.isVertical=!0),s instanceof ig?r.items.bindTo(s).using((t=>t)):r.items.addMany(s),t.panelView.children.add(r),r.items.delegate("execute").to(t)}function np(t,e,n={}){t.isOpen?op(t,e,n):t.once("change:isOpen",(()=>op(t,e,n)),{priority:"highest"}),ip(t,(()=>t.listView.items.find((t=>t instanceof Fm&&t.children.first.isOn))))}function op(t,e,n){const o=t.locale,i=t.listView=new Gm(o),r="function"==typeof e?e():e;i.ariaLabel=n.ariaLabel,i.role=n.role,rp(t,i.items,r,o),t.panelView.children.add(i),i.items.delegate("execute").to(t)}function ip(t,e){t.on("change:isOpen",(()=>{if(!t.isOpen)return;const n=e();n&&("function"==typeof n.focus?n.focus():b("ui-dropdown-focus-child-on-open-child-missing-focus",{view:n}))}),{priority:m.low-10})}function rp(t,e,n,o){e.bindTo(n).using((e=>{if("separator"===e.type)return new Vm(o);if("group"===e.type){const n=new Hm(o);return n.set({label:e.label}),rp(t,n.items,e.items,o),n.items.delegate("execute").to(t),n}if("button"===e.type||"switchbutton"===e.type){const t=new Fm(o);let n;return"button"===e.type?(n=new Wg(o),n.bind("ariaChecked").to(n,"isOn")):n=new Yg(o),n.bind(...Object.keys(e.model)).to(e.model),n.delegate("execute").to(t),t.children.add(n),t}return null}))}const sp=(t,e,n)=>{const o=new um(t.locale);return o.set({id:e,ariaDescribedById:n}),o.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),o.bind("hasError").to(t,"errorText",(t=>!!t)),o.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(o),o};Math.PI;const ap=Symbol("same"),cp=(Symbol("color"),Symbol("hsva"),Symbol("update")),lp=(Symbol("parts"),Symbol("css")),dp=Symbol("sliders");HTMLElement;var up=n(1905),hp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(up.A,hp);up.A.locals;U(qi);const{eraser:gp,colorPalette:mp}=Oh;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var pp=n(6309),fp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(pp.A,fp);pp.A.locals;class kp{constructor(t){this._components=new Map,this.editor=t}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(bp(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new k("componentfactory-item-missing",this,{name:t});return this._components.get(bp(t)).callback(this.editor.locale)}has(t){return this._components.has(bp(t))}}function bp(t){return String(t).toLowerCase()}var wp=n(7913),Ap={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(wp.A,Ap);wp.A.locals;class _p extends Ig{constructor(t,e={}){super(t);const n=this.bindTemplate;this.set("label",e.label||""),this.set("class",e.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",n.to("class")]},children:this.children}),e.icon&&(this.iconView=new Hg,this.iconView.content=e.icon,this.children.add(this.iconView));const o=new Ig(t);o.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:n.to("label")}]}),this.children.add(o)}}var Cp=n(9822),vp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Cp.A,vp);Cp.A.locals;class yp extends Ig{constructor(t){super(t),this.children=this.createCollection(),this.keystrokes=new Ki,this._focusTracker=new Wi,this._focusables=new ig,this.focusCycler=new Am({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(t){for(const e of t){const t=new Wg(this.locale);let n;for(n in t.on("execute",(()=>e.onExecute())),e.onCreate&&e.onCreate(t),e)"onExecute"!=n&&"onCreate"!=n&&t.set(n,e[n]);this.children.add(t)}this._updateFocusCyclableItems()}focus(t){-1===t?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach((t=>{this._focusables.add(t),this._focusTracker.add(t.element)}))}}class xp extends Ig{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}var Ep=n(9819),Dp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Ep.A,Dp);Ep.A.locals;const Ip="screen-center",Mp="editor-center",Sp="editor-top-side",Tp="editor-top-center",Bp="editor-bottom-center",Np="editor-above-center",Pp="editor-below-center",Op=Go("px"),Lp=class extends(function(t){return class extends t{constructor(...t){super(...t),this._onDragBound=this._onDrag.bind(this),this._onDragEndBound=this._onDragEnd.bind(this),this._lastDraggingCoordinates={x:0,y:0},this.on("render",(()=>{this._attachListeners()})),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(To.document,"mouseup",this._onDragEndBound),this.listenTo(To.document,"touchend",this._onDragEndBound),this.listenTo(To.document,"mousemove",this._onDragBound),this.listenTo(To.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(To.document,"mouseup",this._onDragEndBound),this.stopListening(To.document,"touchend",this._onDragEndBound),this.stopListening(To.document,"mousemove",this._onDragBound),this.stopListening(To.document,"touchmove",this._onDragBound)}_onDragStart(t,e){if(!this._isHandleElementPressed(e))return;this._attachDragListeners();let n=0,o=0;e instanceof MouseEvent?(n=e.clientX,o=e.clientY):(n=e.touches[0].clientX,o=e.touches[0].clientY),this._lastDraggingCoordinates={x:n,y:o},this.isDragging=!0}_onDrag(t,e){if(!this.isDragging)return void this._detachDragListeners();let n=0,o=0;e instanceof MouseEvent?(n=e.clientX,o=e.clientY):(n=e.touches[0].clientX,o=e.touches[0].clientY),e.preventDefault(),this.fire("drag",{deltaX:Math.round(n-this._lastDraggingCoordinates.x),deltaY:Math.round(o-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:n,y:o}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(t){return!!this.dragHandleElement&&(this.dragHandleElement===t.target||t.target instanceof HTMLElement&&this.dragHandleElement.contains(t.target))}}}(Ig)){constructor(t,{getCurrentDomRoot:e,getViewportOffset:n}){super(t),this.wasMoved=!1;const o=this.bindTemplate,i=t.t;this.set("className",""),this.set("ariaLabel",i("Editor dialog")),this.set("isModal",!1),this.set("position",Ip),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=e,this._getViewportOffset=n,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new Ki,this.focusTracker=new Wi,this._focusables=new ig,this._focusCycler=new Am({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",o.if("isModal","ck-dialog-overlay__transparent",(t=>!t)),o.if("_isVisible","ck-hidden",(t=>!t))],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",o.to("className")],role:"dialog","aria-label":o.to("ariaLabel"),style:{top:o.to("_top",(t=>Op(t))),left:o.to("_left",(t=>Op(t))),visibility:o.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",((t,e)=>{this.fire("close",{source:"escKeyPress"}),e()})),this.on("drag",((t,{deltaX:e,deltaY:n})=>{this.wasMoved=!0,this.moveBy(e,n)})),this.listenTo(To.window,"resize",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.listenTo(To.document,"scroll",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.on("change:_isVisible",((t,e,n)=>{n&&(this._isTransparent=!0,setTimeout((()=>{this.updatePosition(),this._isTransparent=!1,this.focus()}),10))})),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:t,title:e,hasCloseButton:n=!0,content:o,actionButtons:i}){e&&(this.headerView=new _p(this.locale,{icon:t}),n&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=e,this.ariaLabel=e,this.parts.add(this.headerView,0)),o&&(o instanceof Ig&&(o=[o]),this.contentView=new xp(this.locale),this.contentView.children.addMany(o),this.parts.add(this.contentView)),i&&(this.actionsView=new yp(this.locale),this.actionsView.setButtons(i),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(t,e){const n=this._getViewportRect(),o=this._getDialogRect();t+o.width>n.right&&(t=n.right-o.width),t{var e;this._focusables.add(t),this.focusTracker.add(t.element),Cm(e=t)&&"focusCycler"in e&&e.focusCycler instanceof Am&&(this.listenTo(t.focusCycler,"forwardCycle",(t=>{this._focusCycler.focusNext(),this._focusCycler.next!==this._focusCycler.focusables.get(this._focusCycler.current)&&t.stop()})),this.listenTo(t.focusCycler,"backwardCycle",(t=>{this._focusCycler.focusPrevious(),this._focusCycler.previous!==this._focusCycler.focusables.get(this._focusCycler.current)&&t.stop()})))}))}_createCloseButton(){const t=new Wg(this.locale),e=this.locale.t;return t.set({label:e("Close"),tooltip:!0,icon:Oh.cancel}),t.on("execute",(()=>this.fire("close",{source:"closeButton"}))),t}};let zp=Lp;zp.defaultOffset=15;class Rp extends tr{constructor(t){super(t);const e=t.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set("id",null),t.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:e("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}static get pluginName(){return"Dialog"}_initShowHideListeners(){this.on("show",((t,e)=>{this._show(e)})),this.on("show",((t,e)=>{e.onShow&&e.onShow(this)}),{priority:"low"}),this.on("hide",(()=>{Rp._visibleDialogPlugin&&Rp._visibleDialogPlugin._hide()})),this.on("hide",(()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)}),{priority:"low"})}_initFocusToggler(){const t=this.editor;t.keystrokes.set("Ctrl+F6",((e,n)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?t.editing.view.focus():this.view.focus(),n())}))}_initMultiRootIntegration(){const t=this.editor.model;t.document.on("change:data",(()=>{if(!this.view)return;const e=t.document.differ.getChangedRoots();for(const t of e)t.state&&this.view.updatePosition()}))}show(t){this.hide(),this.fire(`show:${t.id}`,t)}_show({id:t,icon:e,title:n,hasCloseButton:o=!0,content:i,actionButtons:r,className:s,isModal:a,position:c,onHide:l}){const d=this.editor;this.view=new zp(d.locale,{getCurrentDomRoot:()=>d.editing.view.getDomRoot(d.model.document.selection.anchor.root.rootName),getViewportOffset:()=>d.ui.viewportOffset});const u=this.view;u.on("close",(()=>{this.hide()})),d.ui.view.body.add(u),d.ui.focusTracker.add(u.element),d.keystrokes.listenTo(u.element),c||(c=a?Ip:Mp),u.set({position:c,_isVisible:!0,className:s,isModal:a}),u.setupParts({icon:e,title:n,hasCloseButton:o,content:i,actionButtons:r}),this.id=t,l&&(this._onHide=l),this.isOpen=!0,Rp._visibleDialogPlugin=this}hide(){Rp._visibleDialogPlugin&&Rp._visibleDialogPlugin.fire(`hide:${Rp._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const t=this.editor,e=this.view;e.contentView&&e.contentView.reset(),t.ui.view.body.remove(e),t.ui.focusTracker.remove(e.element),t.keystrokes.stopListening(e.element),e.destroy(),t.editing.view.focus(),this.id=null,this.isOpen=!1,Rp._visibleDialogPlugin=null}}var jp=n(3710),Fp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(jp.A,Fp);jp.A.locals;var Vp=Object.defineProperty,Hp=Object.getOwnPropertySymbols,Up=Object.prototype.hasOwnProperty,qp=Object.prototype.propertyIsEnumerable,Gp=(t,e,n)=>e in t?Vp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wp=(t,e)=>{for(var n in e||(e={}))Up.call(e,n)&&Gp(t,n,e[n]);if(Hp)for(var n of Hp(e))qp.call(e,n)&&Gp(t,n,e[n]);return t};const Kp=Go("px"),$p=To.document.body,Yp={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}},Qp=class extends Ig{constructor(t){super(t);const e=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",e.to("position",(t=>`ck-balloon-panel_${t}`)),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",Kp),left:e.to("left",Kp)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Qp.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast,e.viewportStickyNorth],limiter:$p,fitInViewport:!0},t),o=Qp._getOptimalPosition(n)||Yp,i=parseInt(o.left),r=parseInt(o.top),s=o.name,a=o.config||{},{withArrow:c=!0}=a;this.top=r,this.left=i,this.position=s,this.withArrow=c}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(t){this.attachTo(t);const e=Jp(t.target),n=t.limiter?Jp(t.limiter):$p;this.listenTo(To.document,"scroll",((o,i)=>{const r=i.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)}),{useCapture:!0}),this.listenTo(To.window,"resize",(()=>{this.attachTo(t)}))}_stopPinning(){this.stopListening(To.document,"scroll"),this.stopListening(To.window,"resize")}};let Zp=Qp;function Jp(t){return Ao(t)?t:Po(t)?t.commonAncestorContainer:"function"==typeof t?Jp(t()):null}function Xp(t={}){const{sideOffset:e=Zp.arrowSideOffset,heightOffset:n=Zp.arrowHeightOffset,stickyVerticalOffset:o=Zp.stickyVerticalOffset,config:i}=t;return{northWestArrowSouthWest:(t,n)=>Wp({top:r(t,n),left:t.left-e,name:"arrow_sw"},i&&{config:i}),northWestArrowSouthMiddleWest:(t,n)=>Wp({top:r(t,n),left:t.left-.25*n.width-e,name:"arrow_smw"},i&&{config:i}),northWestArrowSouth:(t,e)=>Wp({top:r(t,e),left:t.left-e.width/2,name:"arrow_s"},i&&{config:i}),northWestArrowSouthMiddleEast:(t,n)=>Wp({top:r(t,n),left:t.left-.75*n.width+e,name:"arrow_sme"},i&&{config:i}),northWestArrowSouthEast:(t,n)=>Wp({top:r(t,n),left:t.left-n.width+e,name:"arrow_se"},i&&{config:i}),northArrowSouthWest:(t,n)=>Wp({top:r(t,n),left:t.left+t.width/2-e,name:"arrow_sw"},i&&{config:i}),northArrowSouthMiddleWest:(t,n)=>Wp({top:r(t,n),left:t.left+t.width/2-.25*n.width-e,name:"arrow_smw"},i&&{config:i}),northArrowSouth:(t,e)=>Wp({top:r(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"},i&&{config:i}),northArrowSouthMiddleEast:(t,n)=>Wp({top:r(t,n),left:t.left+t.width/2-.75*n.width+e,name:"arrow_sme"},i&&{config:i}),northArrowSouthEast:(t,n)=>Wp({top:r(t,n),left:t.left+t.width/2-n.width+e,name:"arrow_se"},i&&{config:i}),northEastArrowSouthWest:(t,n)=>Wp({top:r(t,n),left:t.right-e,name:"arrow_sw"},i&&{config:i}),northEastArrowSouthMiddleWest:(t,n)=>Wp({top:r(t,n),left:t.right-.25*n.width-e,name:"arrow_smw"},i&&{config:i}),northEastArrowSouth:(t,e)=>Wp({top:r(t,e),left:t.right-e.width/2,name:"arrow_s"},i&&{config:i}),northEastArrowSouthMiddleEast:(t,n)=>Wp({top:r(t,n),left:t.right-.75*n.width+e,name:"arrow_sme"},i&&{config:i}),northEastArrowSouthEast:(t,n)=>Wp({top:r(t,n),left:t.right-n.width+e,name:"arrow_se"},i&&{config:i}),southWestArrowNorthWest:t=>Wp({top:s(t),left:t.left-e,name:"arrow_nw"},i&&{config:i}),southWestArrowNorthMiddleWest:(t,n)=>Wp({top:s(t),left:t.left-.25*n.width-e,name:"arrow_nmw"},i&&{config:i}),southWestArrowNorth:(t,e)=>Wp({top:s(t),left:t.left-e.width/2,name:"arrow_n"},i&&{config:i}),southWestArrowNorthMiddleEast:(t,n)=>Wp({top:s(t),left:t.left-.75*n.width+e,name:"arrow_nme"},i&&{config:i}),southWestArrowNorthEast:(t,n)=>Wp({top:s(t),left:t.left-n.width+e,name:"arrow_ne"},i&&{config:i}),southArrowNorthWest:t=>Wp({top:s(t),left:t.left+t.width/2-e,name:"arrow_nw"},i&&{config:i}),southArrowNorthMiddleWest:(t,n)=>Wp({top:s(t),left:t.left+t.width/2-.25*n.width-e,name:"arrow_nmw"},i&&{config:i}),southArrowNorth:(t,e)=>Wp({top:s(t),left:t.left+t.width/2-e.width/2,name:"arrow_n"},i&&{config:i}),southArrowNorthMiddleEast:(t,n)=>Wp({top:s(t),left:t.left+t.width/2-.75*n.width+e,name:"arrow_nme"},i&&{config:i}),southArrowNorthEast:(t,n)=>Wp({top:s(t),left:t.left+t.width/2-n.width+e,name:"arrow_ne"},i&&{config:i}),southEastArrowNorthWest:t=>Wp({top:s(t),left:t.right-e,name:"arrow_nw"},i&&{config:i}),southEastArrowNorthMiddleWest:(t,n)=>Wp({top:s(t),left:t.right-.25*n.width-e,name:"arrow_nmw"},i&&{config:i}),southEastArrowNorth:(t,e)=>Wp({top:s(t),left:t.right-e.width/2,name:"arrow_n"},i&&{config:i}),southEastArrowNorthMiddleEast:(t,n)=>Wp({top:s(t),left:t.right-.75*n.width+e,name:"arrow_nme"},i&&{config:i}),southEastArrowNorthEast:(t,n)=>Wp({top:s(t),left:t.right-n.width+e,name:"arrow_ne"},i&&{config:i}),westArrowEast:(t,e)=>Wp({top:t.top+t.height/2-e.height/2,left:t.left-e.width-n,name:"arrow_e"},i&&{config:i}),eastArrowWest:(t,e)=>Wp({top:t.top+t.height/2-e.height/2,left:t.right+n,name:"arrow_w"},i&&{config:i}),viewportStickyNorth:(t,e,n,r)=>{const s=r||n;return t.getIntersection(s)?s.height-t.height>o?null:{top:s.top+o,left:t.left+t.width/2-e.width/2,name:"arrowless",config:Wp({withArrow:!1},i)}:null}};function r(t,e){return t.top-e.height-n}function s(t){return t.bottom+n}}Zp.arrowSideOffset=25,Zp.arrowHeightOffset=10,Zp.stickyVerticalOffset=20,Zp._getOptimalPosition=Zo,Zp.defaultPositions=Xp();var tf=n(9205),ef={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(tf.A,ef);tf.A.locals;const nf="ck-tooltip",of=class extends(Do()){constructor(t){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,this._mutationObserver=null,of._editors.add(t),of._instance)return of._instance;of._instance=this,this.tooltipTextView=new Ig(t.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Zp(t.locale),this.balloonPanelView.class=nf,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(t){const e=new MutationObserver((()=>{t()}));return{attach(t){e.observe(t,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){e.disconnect()}}}((()=>{this._updateTooltipPosition()})),this._pinTooltipDebounced=Ua(this._pinTooltip,600),this._unpinTooltipDebounced=Ua(this._unpinTooltip,400),this.listenTo(To.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(To.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(To.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(To.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(To.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(To.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(t){const e=t.ui.view&&t.ui.view.body;of._editors.delete(t),this.stopListening(t.ui),e&&e.has(this.balloonPanelView)&&e.remove(this.balloonPanelView),of._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),of._instance=null)}static getPositioningFunctions(t){const e=of.defaultBalloonPositions;return{s:[e.southArrowNorth,e.southArrowNorthEast,e.southArrowNorthWest],n:[e.northArrowSouth],e:[e.eastArrowWest],w:[e.westArrowEast],sw:[e.southArrowNorthEast],se:[e.southArrowNorthWest]}[t]}_onKeyDown(t,e){"Escape"===e.key&&this._currentElementWithTooltip&&(this._unpinTooltip(),e.stopPropagation())}_onEnterOrFocus(t,{target:e}){const n=sf(e);n?n!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(n,af(n))):"focus"===t.name&&this._unpinTooltip()}_onLeaveOrBlur(t,{target:e,relatedTarget:n}){if("mouseleave"===t.name){if(!Ao(e))return;const t=this.balloonPanelView.element,o=t&&(t===n||t.contains(n)),i=!o&&e===t;if(o)return void this._unpinTooltipDebounced.cancel();if(!i&&this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;const r=sf(e),s=sf(n);(i||r&&r!==s)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(t,{target:e}){this._currentElementWithTooltip&&(e.contains(this.balloonPanelView.element)&&e.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(t,{text:e,position:n,cssClass:o}){this._unpinTooltip();const i=Gi(of._editors.values()).ui.view.body;i.has(this.balloonPanelView)||i.add(this.balloonPanelView),this.tooltipTextView.text=e,this.balloonPanelView.pin({target:t,positions:of.getPositioningFunctions(n)}),this._resizeObserver=new Uo(t,(()=>{Yo(t)||this._unpinTooltip()})),this._mutationObserver.attach(t),this.balloonPanelView.class=[nf,o].filter((t=>t)).join(" ");for(const t of of._editors)this.listenTo(t.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=t,this._currentTooltipPosition=n}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const t of of._editors)this.stopListening(t.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._resizeObserver&&this._resizeObserver.destroy(),this._mutationObserver.detach()}_updateTooltipPosition(){const t=af(this._currentElementWithTooltip);Yo(this._currentElementWithTooltip)&&t.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:of.getPositioningFunctions(t.position)}):this._unpinTooltip()}};let rf=of;function sf(t){return Ao(t)?t.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function af(t){return{text:t.dataset.ckeTooltipText,position:t.dataset.ckeTooltipPosition||"s",cssClass:t.dataset.ckeTooltipClass||""}}rf.defaultBalloonPositions=Xp({heightOffset:5,sideOffset:13}),rf._editors=new Set,rf._instance=null;var cf=Object.defineProperty,lf=Object.getOwnPropertySymbols,df=Object.prototype.hasOwnProperty,uf=Object.prototype.propertyIsEnumerable,hf=(t,e,n)=>e in t?cf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gf=(t,e)=>{for(var n in e||(e={}))df.call(e,n)&&hf(t,n,e[n]);if(lf)for(var n of lf(e))uf.call(e,n)&&hf(t,n,e[n]);return t};const mf=50,pf=350,ff="Powered by";class kf extends(Do()){constructor(t){super(),this.editor=t,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=Fh(this._showBalloon.bind(this),50,{leading:!0}),t.on("ready",this._handleEditorReady.bind(this))}destroy(){const t=this._balloonView;t&&(t.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const t=this.editor;(!!t.config.get("ui.poweredBy.forceVisible")||"VALID"!==function(t){function e(t){return t.length>=40&&t.length<=255?"VALID":"INVALID"}if(!t)return"INVALID";let n="";try{n=atob(t)}catch(t){return"INVALID"}const o=n.split("-"),i=o[0],r=o[1];if(!r)return e(t);try{atob(r)}catch(n){try{if(atob(i),!atob(i).length)return e(t)}catch(n){return e(t)}}if(i.length<40||i.length>255)return"INVALID";let s="";try{atob(i),s=atob(r)}catch(t){return"INVALID"}if(8!==s.length)return"INVALID";const a=Number(s.substring(0,4)),c=Number(s.substring(4,6))-1,l=Number(s.substring(6,8)),d=new Date(a,c,l);return d{this._updateLastFocusedEditableElement(),n?this._showBalloon():this._hideBalloon()})),t.ui.focusTracker.on("change:focusedElement",((t,e,n)=>{this._updateLastFocusedEditableElement(),n&&this._showBalloon()})),t.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const t=this.editor,e=this._balloonView=new Zp,n=Af(t),o=new bf(t.locale,n.label);e.content.add(o),e.set({class:"ck-powered-by-balloon"}),t.ui.view.body.add(e),t.ui.focusTracker.add(e.element),this._balloonView=e}_showBalloon(){if(!this._lastFocusedEditableElement)return;const t=function(t,e){const n=Af(t),o="right"===n.side?function(t,e){return wf(t,e,((t,n)=>t.left+t.width-n.width-e.horizontalOffset))}(e,n):function(t,e){return wf(t,e,(t=>t.left+e.horizontalOffset))}(e,n);return{target:e,positions:[o]}}(this.editor,this._lastFocusedEditableElement);t&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(t))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const t=this.editor,e=t.ui.focusTracker.isFocused,n=t.ui.focusTracker.focusedElement;if(!e||!n)return void(this._lastFocusedEditableElement=null);const o=Array.from(t.ui.getEditableElementsNames()).map((e=>t.ui.getEditableElement(e)));o.includes(n)?this._lastFocusedEditableElement=n:this._lastFocusedEditableElement=o[0]}}class bf extends Ig{constructor(t,e){super(t);const n=new Hg,o=this.bindTemplate;n.set({content:'\n',isColorInherited:!1}),n.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...e?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[e]}]:[],n],on:{dragstart:o.to((t=>t.preventDefault()))}}]})}}function wf(t,e,n){return(o,i)=>{const r=new zo(t);if(r.widthe.regionName===t));i||(i=new Ef(this.view.locale),this.view.regionViews.add(i)),i.set({regionName:t,text:e,politeness:n})}}class xf extends Ig{constructor(t){super(t),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class Ef extends Ig{constructor(t){super(t);const e=this.bindTemplate;this.set("regionName",""),this.set("text",""),this.set("politeness",vf),this.setTemplate({tag:"div",attributes:{role:"region","data-region":e.to("regionName"),"aria-live":e.to("politeness")},children:[{text:e.to("text")}]})}}var Df=Object.defineProperty,If=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Sf=Object.prototype.propertyIsEnumerable,Tf=(t,e,n)=>e in t?Df(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Bf extends(U()){constructor(t){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[];const e=t.editing.view;this.editor=t,this.componentFactory=new kp(t),this.focusTracker=new Wi,this.tooltipManager=new rf(t),this.poweredBy=new kf(t),this.ariaLiveAnnouncer=new yf(t),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(e.document,"layoutChanged",this.update.bind(this)),this.listenTo(e,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null,this.editor.keystrokes.stopListening(t);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor),this.focusTracker.add(e);const n=()=>{this.editor.editing.view.getDomRoot(t)||this.editor.keystrokes.listenTo(e)};this.isReady?n():this.once("ready",n)}removeEditableElement(t){const e=this._editableElementsMap.get(t);e&&(this._editableElementsMap.delete(t),this.editor.keystrokes.stopListening(e),this.focusTracker.remove(e),e.ckeditorInstance=null)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(t,e={}){t.isRendered?(this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)):t.once("render",(()=>{this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)})),this._focusableToolbarDefinitions.push({toolbarView:t,options:e})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const t=this.editor,e=t.config.get("ui.viewportOffset");if(e)return e;const n=t.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}_initFocusTracking(){const t=this.editor,e=t.editing.view;let n,o;t.keystrokes.set("Alt+F10",((t,i)=>{const r=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(r)&&!Array.from(e.domRoots.values()).includes(r)&&(n=r);const s=this._getCurrentFocusedToolbarDefinition();s&&o||(o=this._getFocusableCandidateToolbarDefinitions());for(let t=0;t{const i=this._getCurrentFocusedToolbarDefinition();i&&(n?(n.focus(),n=null):t.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),o())}))}_getFocusableCandidateToolbarDefinitions(){const t=[];for(const e of this._focusableToolbarDefinitions){const{toolbarView:n,options:o}=e;(Yo(n.element)||o.beforeFocus)&&t.push(e)}return t.sort(((t,e)=>Nf(t)-Nf(e))),t}_getCurrentFocusedToolbarDefinition(){for(const t of this._focusableToolbarDefinitions)if(t.toolbarView.element&&t.toolbarView.element.contains(this.focusTracker.focusedElement))return t;return null}_focusFocusableCandidateToolbar(t){const{toolbarView:e,options:{beforeFocus:n}}=t;return n&&n(),!!Yo(e.element)&&(e.focus(),!0)}_handleScrollToTheSelection(t,e){const n=((t,e)=>{for(var n in e||(e={}))Mf.call(e,n)&&Tf(t,n,e[n]);if(If)for(var n of If(e))Sf.call(e,n)&&Tf(t,n,e[n]);return t})({top:0,bottom:0,left:0,right:0},this.viewportOffset);e.viewportOffset.top+=n.top,e.viewportOffset.bottom+=n.bottom,e.viewportOffset.left+=n.left,e.viewportOffset.right+=n.right}}function Nf(t){const{toolbarView:e,options:n}=t;let o=10;return Yo(e.element)&&o--,n.isContextual&&o--,o}var Pf=n(1185),Of={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Pf.A,Of);Pf.A.locals;class Lf extends Ig{constructor(t){super(t),this.body=new Rg(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class zf extends Ig{constructor(t,e,n){super(t),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const t=this._editingView;function e(e){t.change((n=>{const o=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",o),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",o)}))}t.isRenderingInProgress?function n(o){t.once("change:isRenderingInProgress",((t,i,r)=>{r?n(o):e(o)}))}(this):e(this)}}class Rf extends zf{constructor(t,e,n,o={}){super(t,e,n);const i=t.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=o.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const t=this._editingView;t.change((e=>{const n=t.document.getRoot(this.name);e.setAttribute("aria-label",this._generateLabel(this),n)}))}}class jf extends dr{static get pluginName(){return"Notification"}init(){this.on("show:warning",((t,e)=>{window.alert(e.message)}),{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e=t.namespace?`show:${t.type}:${t.namespace}`:`show:${t.type}`;this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class Ff extends(U()){constructor(t,e){super(),e&&Da(this,e),t&&this.set(t)}}var Vf=n(991),Hf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Vf.A,Hf);Vf.A.locals;var Uf=n(5380),qf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Uf.A,qf);Uf.A.locals;const Gf=Go("px");class Wf extends tr{constructor(t){super(t),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this._view||this._createPanelView(),this.hasView(t.view))throw new k("contextualballoon-add-view-exist",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new k("contextualballoon-remove-view-not-exist",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new k("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}_createPanelView(){this._view=new Zp(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find((e=>e[1]===t))[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Kf(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>1)),t.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((t,n)=>{if(n<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[o,n])})),t.buttonNextView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),t.buttonPrevView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),t}_createFakePanelsView(){const t=new $f(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>=2?Math.min(t-1,2):0)),t.listenTo(this.view,"change:top",(()=>t.updatePosition())),t.listenTo(this.view,"change:left",(()=>t.updatePosition())),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:o=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&(t.limiter||(t=Object.assign({},t,{limiter:this.positionLimiter})),t=Object.assign({},t,{viewportOffsetConfig:this.editor.ui.viewportOffset})),t}}class Kf extends Ig{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Wi,this.buttonPrevView=this._createButtonView(e("Previous"),Oh.previousArrow),this.buttonNextView=this._createButtonView(e("Next"),Oh.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",(t=>t?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new Wg(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class $f extends Ig{constructor(t,e){super(t);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",(t=>t?"":"ck-hidden"))],style:{top:n.to("top",Gf),left:n.to("left",Gf),width:n.to("width",Gf),height:n.to("height",Gf)}},children:this.content}),this.on("change:numberOfPanels",((t,e,n,o)=>{n>o?this._addPanels(n-o):this._removePanels(o-n),this.updatePosition()}))}_addPanels(t){for(;t--;){const t=new Ig;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:o}=new zo(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:o})}}}var Yf=n(8298),Qf={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Yf.A,Qf);Yf.A.locals,Go("px");class Zf extends sm{constructor(t,e){const n=t.t,o=Object.assign({},{showResetButton:!0,showIcon:!0,creator:sp},e);super(t,o.creator),this.label=e.label,this._viewConfig=o,this._viewConfig.showIcon&&(this.iconView=new Hg,this.iconView.content=Oh.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new Wg(t),this.resetButtonView.set({label:n("Clear"),icon:Oh.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",(()=>{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(t=>!t)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class Jf extends Ig{constructor(){super();const t=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",t.if("isVisible","ck-hidden",(t=>!t))],tabindex:-1},children:[{tag:"span",children:[{text:[t.to("primaryText")]}]},{tag:"span",children:[{text:[t.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class Xf extends Ig{constructor(t){super(t),this.children=this.createCollection(),this.focusTracker=new Wi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new Am({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const t of this.children)this.focusTracker.add(t.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var tk=/[\\^$.*+?()[\]{}|]/g,ek=RegExp(tk.source);const nk=function(t){return(t=$r(t))&&ek.test(t)?t.replace(tk,"\\$&"):t};var ok=n(8107),ik={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(ok.A,ik);ok.A.locals;var rk=Object.defineProperty,sk=Object.getOwnPropertySymbols,ak=Object.prototype.hasOwnProperty,ck=Object.prototype.propertyIsEnumerable,lk=(t,e,n)=>e in t?rk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class dk extends Ig{constructor(t,e){super(t),this._config=e,this.filteredView=e.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new Wi,this.keystrokes=new Ki,this.resultsView=new Xf(t),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),e.infoView&&e.infoView.instance?this.infoView=e.infoView.instance:(this.infoView=new Jf,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new Am({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((t,{resultsCount:e,totalItemsCount:n})=>{this.resultsCount=e,this.totalItemsCount=n})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",e.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const t=t=>t.stopPropagation();for(const t of this.focusableChildren)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(t){const e=t?new RegExp(nk(t),"ig"):null,n=this.filteredView.filter(e);this.fire("search",((t,e)=>{for(var n in e||(e={}))ak.call(e,n)&&lk(t,n,e[n]);if(sk)for(var n of sk(e))ck.call(e,n)&&lk(t,n,e[n]);return t})({query:t},n))}_createSearchTextQueryView(){const t=new Zf(this.locale,this._config.queryView);return this.listenTo(t.fieldView,"input",(()=>{this.search(t.fieldView.element.value)})),t.on("reset",(()=>this.reset())),t.bind("isEnabled").to(this),t}_enableDefaultInfoViewBehavior(){const t=this.locale.t,e=this.infoView;function n(t,{query:e,resultsCount:n,totalItemsCount:o}){return"function"==typeof t?t(e,n,o):t}this.on("search",((o,i)=>{if(i.resultsCount)e.set({isVisible:!1});else{const o=this._config.infoView&&this._config.infoView.text;let r,s;i.totalItemsCount?o&&o.notFound?(r=o.notFound.primary,s=o.notFound.secondary):(r=t("No results found"),s=""):o&&o.noSearchableItems?(r=o.noSearchableItems.primary,s=o.noSearchableItems.secondary):(r=t("No searchable items"),s=""),e.set({primaryText:n(r,i),secondaryText:n(s,i),isVisible:!0})}}))}}var uk=n(5727),hk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(uk.A,hk);uk.A.locals;const gk=class extends dk{constructor(t,e){super(t,e),this._config=e;const n=Go("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const o=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[o.if("isVisible","ck-hidden",(t=>!t)),o.to("_position",(t=>`ck-search__results_${t}`))],style:{width:o.to("_width",n)}}}),this.focusTracker.on("change:isFocused",((t,n,o)=>{this._updateResultsVisibility(),o?this.resultsView.element.scrollTop=0:e.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((t,e)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,e())})),this.listenTo(To.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((t,{value:e})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=e,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new zo(this.queryView.fieldView.element).width;const t=gk._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:gk.defaultResultsPositions});this.resultsView._position=t?t.name:"s"}_updateResultsVisibility(){const t=void 0===this._config.queryMinChars?0:this._config.queryMinChars,e=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&e>=t}};let mk=gk;mk.defaultResultsPositions=[t=>({top:t.bottom,left:t.left,name:"s"}),(t,e)=>({top:t.top-e.height,left:t.left,name:"n"})],mk._getOptimalPosition=Zo;pk={"&":"&","<":"<",">":">",'"':""","'":"'"};var pk;var fk=/[&<>"']/g;RegExp(fk.source);var kk=n(9529),bk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(kk.A,bk);kk.A.locals;var wk=n(109),Ak={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(wk.A,Ak);wk.A.locals;Go("px");var _k=n(2710),Ck={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(_k.A,Ck);_k.A.locals,Go("px");Go("px");var vk=n(3344),yk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(vk.A,yk);vk.A.locals;class xk extends Wg{constructor(t){super(t);const e=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(t=>String(t))),"data-cke-tooltip-disabled":e.to("isOn")},on:{mouseenter:e.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new Hg;return t.content=Jg,t.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),t}}var Ek=n(9481),Dk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Ek.A,Dk);Ek.A.locals;class Ik extends Fm{constructor(t,e){super(t);const n=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:n.to("mouseenter")}}),this.delegate("mouseenter").to(e)}}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const Mk={openAndFocusPanelOnArrowDownKey(t){t.keystrokes.set("arrowdown",((e,n)=>{t.focusTracker.focusedElement===t.buttonView.element&&(t.isOpen||(t.isOpen=!0),t.panelView.focus(),n())}))},openOnArrowRightKey(t){const e="rtl"===t.locale.uiLanguageDirection?"arrowleft":"arrowright";t.keystrokes.set(e,((e,n)=>{t.focusTracker.focusedElement===t.buttonView.element&&t.isEnabled&&(t.isOpen||(t.isOpen=!0),t.panelView.focus(),n())}))},openOnButtonClick(t){t.buttonView.on("execute",(()=>{t.isOpen=!0,t.panelView.focus()}))},toggleOnButtonClick(t){t.buttonView.on("execute",(()=>{t.isOpen=!t.isOpen,t.isOpen&&t.panelView.focus()}))},closeOnArrowLeftKey(t){const e="rtl"===t.locale.uiLanguageDirection?"arrowright":"arrowleft";t.keystrokes.set(e,((e,n)=>{t.isOpen&&(t.isOpen=!1,t.focus(),n())}))},closeOnEscKey(t){t.keystrokes.set("esc",((e,n)=>{t.isOpen&&(t.isOpen=!1,t.focus(),n())}))},closeOnParentClose(t){t.parentMenuView.on("change:isOpen",((e,n,o)=>{o||e.source!==t.parentMenuView||(t.isOpen=!1)}))}},Sk={southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),eastSouth:t=>({top:t.top,left:t.right-5,name:"es"}),eastNorth:(t,e)=>({top:t.top-e.height,left:t.right-5,name:"en"}),westSouth:(t,e)=>({top:t.top,left:t.left-e.width+5,name:"ws"}),westNorth:(t,e)=>({top:t.top-e.height,left:t.left-e.width+5,name:"wn"})};var Tk=n(9108),Bk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Tk.A,Bk);Tk.A.locals;class Nk extends Ig{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",e.to("position",(t=>`ck-menu-bar__menu__panel_position_${t}`)),e.if("isVisible","ck-hidden",(t=>!t))],tabindex:"-1"},children:this.children,on:{selectstart:e.to((t=>{"input"!==t.target.tagName.toLocaleLowerCase()&&t.preventDefault()}))}})}focus(t=1){this.children.length&&(1===t?this.children.first.focus():this.children.last.focus())}}var Pk=n(4),Ok={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Pk.A,Ok);Pk.A.locals;const Lk=class extends Ig{constructor(t){super(t);const e=this.bindTemplate;this.buttonView=new xk(t),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new Nk(t),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Ki,this.focusTracker=new Wi,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",e.to("class"),e.if("isEnabled","ck-disabled",(t=>!t)),e.if("parentMenuView","ck-menu-bar__menu_top-level",(t=>!t))]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),Mk.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(Mk.openOnButtonClick(this),Mk.openOnArrowRightKey(this),Mk.closeOnArrowLeftKey(this),Mk.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),Mk.openAndFocusPanelOnArrowDownKey(this),Mk.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",((t,e)=>{this.fire("arrowright"),e()})),this.keystrokes.set("arrowleft",((t,e)=>{this.fire("arrowleft"),e()}))}_repositionPanelOnOpen(){this.on("change:isOpen",((t,e,n)=>{if(!n)return;const o=Lk._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=o?o.name:this._panelPositions[0].name}))}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:t,southWest:e,northEast:n,northWest:o,westSouth:i,eastSouth:r,westNorth:s,eastNorth:a}=Sk;return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?[r,a,i,s]:[t,e,n,o]:this.parentMenuView?[i,s,r,a]:[e,t,o,n]}};let zk=Lk;zk._getOptimalPosition=Zo;class Rk extends Gm{constructor(t){super(t),this.role="menu"}}var jk=n(977),Fk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(jk.A,Fk);jk.A.locals;class Vk extends Wg{constructor(t){super(t),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class Hk extends Qg{constructor(t){super(t),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var Uk=n(497),qk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Uk.A,qk);Uk.A.locals;class Gk extends Bf{constructor(t,e){super(t),this.view=e,this._lastFocusedEditableElement=null}init(){this.view.render(),this.focusTracker.on("change:focusedElement",((t,e,n)=>{for(const t of Object.values(this.view.editables))n===t.element&&(this._lastFocusedEditableElement=t.element)})),this.focusTracker.on("change:isFocused",((t,e,n)=>{n||(this._lastFocusedEditableElement=null)}));for(const t of Object.values(this.view.editables))this.addEditable(t);this._initToolbar(),this.fire("ready")}addEditable(t,e){const n=t.element;this.editor.editing.view.attachDomRoot(n,t.name),this.setEditableElement(t.name,n),t.bind("isFocused").to(this.focusTracker,"isFocused",this.focusTracker,"focusedElement",((t,e)=>!!t&&(e===n||this._lastFocusedEditableElement===n))),this._initPlaceholder(t,e)}removeEditable(t){this.editor.editing.view.detachDomRoot(t.name),t.unbind("isFocused"),this.removeEditableElement(t.name)}destroy(){super.destroy();for(const t of Object.values(this.view.editables))this.removeEditable(t);this.view.destroy()}_initToolbar(){const t=this.editor,e=this.view;e.toolbar.fillFromConfig(t.config.get("toolbar"),this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(t,e){if(!e){const n=this.editor.config.get("placeholder");n&&(e="string"==typeof n?n:n[t.name])}const n=this.editor.editing.view,o=n.document.getRoot(t.name);e&&(o.placeholder=e),br({view:n,element:o,isDirectHost:!1,keepOnFocus:!0})}}class Wk extends Lf{constructor(t,e,n,o={}){super(t),this._editingView=e,this.toolbar=new Lm(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.editables={};for(const t of n){const e=o.editableElements?o.editableElements[t]:void 0;this.createEditable(t,e)}this.editable=Object.values(this.editables)[0],this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}})}createEditable(t,e){const n=this.locale.t,o=new Rf(this.locale,this._editingView,e,{label:t=>n("Rich Text Editor. Editing area: %0",t.name)});return this.editables[t]=o,o.name=t,this.isRendered&&this.registerChild(o),o}removeEditable(t){const e=this.editables[t];this.isRendered&&this.deregisterChild(e),delete this.editables[t],e.destroy()}render(){super.render(),this.registerChild(Object.values(this.editables)),this.registerChild(this.toolbar)}}var Kk=Object.defineProperty,$k=Object.defineProperties,Yk=Object.getOwnPropertyDescriptors,Qk=Object.getOwnPropertySymbols,Zk=Object.prototype.hasOwnProperty,Jk=Object.prototype.propertyIsEnumerable,Xk=(t,e,n)=>e in t?Kk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tb=(t,e)=>{for(var n in e||(e={}))Zk.call(e,n)&&Xk(t,n,e[n]);if(Qk)for(var n of Qk(e))Jk.call(e,n)&&Xk(t,n,e[n]);return t};class eb extends Th{constructor(t,e={}){const n=Object.keys(t),o=0===n.length||"string"==typeof t[n[0]];if(o&&void 0!==e.initialData&&Object.keys(e.initialData).length>0)throw new k("editor-create-initial-data",null);if(super(e),this._registeredRootsAttributesKeys=new Set,this._readOnlyRootLocks=new Map,this.sourceElements=o?{}:t,void 0===this.config.get("initialData")){const e={};for(const o of n)e[o]=nb(r=t[o])?(i=r)instanceof HTMLTextAreaElement?i.value:i.innerHTML:r;this.config.set("initialData",e)}var i,r;if(!o)for(const e of n)Nh(this,t[e]);this.editing.view.document.roots.on("add",((t,e)=>{e.unbind("isReadOnly"),e.bind("isReadOnly").to(this.editing.view.document,"isReadOnly",(t=>t||this._readOnlyRootLocks.has(e.rootName))),e.on("change:isReadOnly",((t,n,o)=>{const i=this.editing.view.createRangeIn(e);for(const t of i.getItems())t.is("editableElement")&&(t.unbind("isReadOnly"),t.isReadOnly=o)}))}));for(const t of n)this.model.document.createRoot("$root",t);if(this.config.get("lazyRoots"))for(const t of this.config.get("lazyRoots")){this.model.document.createRoot("$root",t)._isLoaded=!1}if(this.config.get("rootsAttributes")){const t=this.config.get("rootsAttributes");for(const[e,n]of Object.entries(t)){if(!this.model.document.getRoot(e))throw new k("multi-root-editor-root-attributes-no-root",null);for(const t of Object.keys(n))this.registerRootAttribute(t)}this.data.on("init",(()=>{this.model.enqueueChange({isUndoable:!1},(e=>{for(const[n,o]of Object.entries(t)){const t=this.model.document.getRoot(n);for(const[n,i]of Object.entries(o))null!==i&&e.setAttribute(n,i,t)}}))}))}const s={shouldToolbarGroupWhenFull:!this.config.get("toolbar.shouldNotGroupWhenFull"),editableElements:o?void 0:t},a=new Wk(this.locale,this.editing.view,n,s);this.ui=new Gk(this,a),this.model.document.on("change:data",(()=>{const t=this.model.document.differ.getChangedRoots();for(const e of t){const t=this.model.document.getRoot(e.name);"detached"==e.state&&this.fire("detachRoot",t)}for(const e of t){const t=this.model.document.getRoot(e.name);"attached"==e.state&&this.fire("addRoot",t)}})),this.listenTo(this.model,"canEditAt",((t,[e])=>{if(!e)return;let n=!1;for(const t of e.getRanges()){const e=t.root;if(this._readOnlyRootLocks.has(e.rootName)){n=!0;break}}n&&(t.return=!1,t.stop())}),{priority:"high"}),this.decorate("loadRoot"),this.on("loadRoot",((t,[e])=>{const n=this.model.document.getRoot(e);if(!n)throw new k("multi-root-editor-load-root-no-root",this,{rootName:e});n._isLoaded&&(b("multi-root-editor-load-root-already-loaded"),t.stop())}),{priority:"highest"})}destroy(){const t=this.config.get("updateSourceElementOnDestroy"),e={};for(const n of Object.keys(this.sourceElements))e[n]=t?this.getData({rootName:n}):"";return this.ui.destroy(),super.destroy().then((()=>{for(const t of Object.keys(this.sourceElements))qo(this.sourceElements[t],e[t])}))}addRoot(t,{data:e="",attributes:n={},elementName:o="$root",isUndoable:i=!1}={}){const r=i=>{const r=i.addRoot(t,o);e&&i.insert(this.data.parse(e,r),r,0);for(const t of Object.keys(n))this.registerRootAttribute(t),i.setAttribute(t,n[t],r)};i?this.model.change(r):this.model.enqueueChange({isUndoable:!1},r)}detachRoot(t,e=!1){e?this.model.change((e=>e.detachRoot(t))):this.model.enqueueChange({isUndoable:!1},(e=>e.detachRoot(t)))}createEditable(t,e){const n=this.ui.view.createEditable(t.rootName);return this.ui.addEditable(n,e),this.editing.view.forceRender(),n.element}detachEditable(t){const e=t.rootName,n=this.ui.view.editables[e];return this.ui.removeEditable(n),this.ui.view.removeEditable(e),n.element}loadRoot(t,{data:e="",attributes:n={}}={}){const o=this.model.document.getRoot(t);this.model.enqueueChange({isUndoable:!1},(t=>{e&&t.insert(this.data.parse(e,o),o,0);for(const e of Object.keys(n))this.registerRootAttribute(e),t.setAttribute(e,n[e],o);o._isLoaded=!0,this.model.document.differ._bufferRootLoad(o)}))}getFullData(t){const e={};for(const o of this.model.document.getRootNames())e[o]=this.data.get((n=tb({},t),$k(n,Yk({rootName:o}))));var n;return e}getRootsAttributes(){const t={};for(const e of this.model.document.getRootNames())t[e]=this.getRootAttributes(e);return t}getRootAttributes(t){const e={},n=this.model.document.getRoot(t);for(const t of this._registeredRootsAttributesKeys)e[t]=n.hasAttribute(t)?n.getAttribute(t):null;return e}registerRootAttribute(t){this._registeredRootsAttributesKeys.has(t)||(this._registeredRootsAttributesKeys.add(t),this.editing.model.schema.extend("$root",{allowAttributes:t}))}disableRoot(t,e){if("$graveyard"==t)throw new k("multi-root-editor-cannot-disable-graveyard-root",this);const n=this._readOnlyRootLocks.get(t);if(n)n.add(e);else{this._readOnlyRootLocks.set(t,new Set([e]));this.editing.view.document.getRoot(t).isReadOnly=!0,Array.from(this.commands.commands()).forEach((t=>t.affectsData&&t.refresh()))}}enableRoot(t,e){const n=this._readOnlyRootLocks.get(t);if(n&&n.has(e))if(1===n.size){this._readOnlyRootLocks.delete(t);this.editing.view.document.getRoot(t).isReadOnly=this.isReadOnly,Array.from(this.commands.commands()).forEach((t=>t.affectsData&&t.refresh()))}else n.delete(e)}static create(t,e={}){return new Promise((n=>{for(const e of Object.values(t))if(nb(e)&&"TEXTAREA"===e.tagName)throw new k("editor-wrong-element",null);const o=new this(t,e);n(o.initPlugins().then((()=>o.ui.init())).then((()=>(o._verifyRootsWithInitialData(),o.data.init(o.config.get("initialData"))))).then((()=>o.fire("ready"))).then((()=>o)))}))}_verifyRootsWithInitialData(){const t=this.config.get("initialData");for(const e of this.model.document.getRootNames())if(!(e in t))throw new k("multi-root-editor-root-initial-data-mismatch",null);for(const e of Object.keys(t)){const t=this.model.document.getRoot(e);if(!t||!t.isAttached())throw new k("multi-root-editor-root-initial-data-mismatch",null)}}}function nb(t){return Ao(t)}eb.Context=lr,eb.EditorWatchdog=Yh,eb.ContextWatchdog=class extends Lh{constructor(t,e={}){super(e),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new Jh,this._watchdogConfig=e,this._creator=e=>t.create(e),this._destructor=t=>t.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}get context(){return this._context}create(t={}){return this._actionQueues.enqueue(Zh,(()=>(this._contextConfig=t,this._create())))}getItem(t){return this._getWatchdog(t)._item}getItemState(t){return this._getWatchdog(t).state}add(t){const e=Xh(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let e;if(this._watchdogs.has(t.id))throw new Error(`Item with the given id is already added: '${t.id}'.`);if("editor"===t.type)return e=new Yh(null,this._watchdogConfig),e.setCreator(t.creator),e._setExcludedProperties(this._contextProps),t.destructor&&e.setDestructor(t.destructor),this._watchdogs.set(t.id,e),e.on("error",((n,{error:o,causesRestart:i})=>{this._fire("itemError",{itemId:t.id,error:o}),i&&this._actionQueues.enqueue(t.id,(()=>new Promise((n=>{const o=()=>{e.off("restart",o),this._fire("itemRestart",{itemId:t.id}),n()};e.on("restart",o)}))))})),e.create(t.sourceElementOrData,t.config,this._context);throw new Error(`Not supported item type: '${t.type}'.`)})))))}remove(t){const e=Xh(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t,(()=>{const e=this._getWatchdog(t);return this._watchdogs.delete(t),e.destroy()})))))}destroy(){return this._actionQueues.enqueue(Zh,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(Zh,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((t=>{console.error("An error happened during destroying the context or items.",t)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((t=>(this._context=t,this._contextProps=zh(this._context),Promise.all(Array.from(this._watchdogs.values()).map((t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const t=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((t=>t.destroy()))).then((()=>this._destructor(t)))}))}_getWatchdog(t){const e=this._watchdogs.get(t);if(!e)throw new Error(`Item with the given id was not registered: ${t}.`);return e}_isErrorComingFromThisItem(t){for(const e of this._watchdogs.values())if(e._isErrorComingFromThisItem(t))return!1;return jh(this._context,t.context)}};class ob extends Ma{constructor(t){super(t),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const e=this.document;function n(t){return(n,o)=>{o.preventDefault();const i=o.dropRange?[o.dropRange]:null,r=new u(e,t);e.fire(r,{dataTransfer:o.dataTransfer,method:n.name,targetRanges:i,target:o.target,domEvent:o.domEvent}),r.stop.called&&o.stopPropagation()}}this.listenTo(e,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(e,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(e,"dragover",n("dragging"),{priority:"low"})}onDomEvent(t){const e="clipboardData"in t?t.clipboardData:t.dataTransfer,n="drop"==t.type||"paste"==t.type,o={dataTransfer:new kc(e,{cacheFiles:n})};"drop"!=t.type&&"dragover"!=t.type||(o.dropRange=function(t,e){const n=e.target.ownerDocument,o=e.clientX,i=e.clientY;let r;n.caretRangeFromPoint&&n.caretRangeFromPoint(o,i)?r=n.caretRangeFromPoint(o,i):e.rangeParent&&(r=n.createRange(),r.setStart(e.rangeParent,e.rangeOffset),r.collapse(!0));if(r)return t.domConverter.domRangeToView(r);return null}(this.view,t)),this.fire(t.type,t,o)}}const ib=["figcaption","li"],rb=["ol","ul"];function sb(t){if(t.is("$text")||t.is("$textProxy"))return t.data;if(t.is("element","img")&&t.hasAttribute("alt"))return t.getAttribute("alt");if(t.is("element","br"))return"\n";let e="",n=null;for(const o of t.getChildren())e+=ab(o,n)+sb(o),n=o;return e}function ab(t,e){return e?t.is("element","li")&&!t.isEmpty&&t.getChild(0).is("containerElement")||rb.includes(t.name)&&rb.includes(e.name)?"\n\n":t.is("containerElement")||e.is("containerElement")?ib.includes(t.name)||ib.includes(e.name)?"\n":"\n\n":"":""}const cb=function(t,e){return t&&_i(t,e,rn)};const lb=function(t,e,n,o){var i=n.length,r=i,s=!o;if(null==t)return!r;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++ie in t?vb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Sb extends tr{constructor(){super(...arguments),this._markersToCopy=new Map}static get pluginName(){return"ClipboardMarkersUtils"}_registerMarkerToCopy(t,e){this._markersToCopy.set(t,e)}_copySelectedFragmentWithMarkers(t,e,n=(t=>t.model.getSelectedContent(t.model.document.selection))){return this.editor.model.change((o=>{const i=o.model.document.selection;o.setSelection(e);const r=this._insertFakeMarkersIntoSelection(o,o.model.document.selection,t),s=n(o),a=this._removeFakeMarkersInsideElement(o,s);for(const[t,e]of Object.entries(r)){a[t]||(a[t]=o.createRangeIn(s));for(const t of e)o.remove(t)}s.markers.clear();for(const[t,e]of Object.entries(a))s.markers.set(t,e);return o.setSelection(i),s}))}_pasteMarkersIntoTransformedElement(t,e){const n=this._getPasteMarkersFromRangeMap(t);return this.editor.model.change((t=>{const o=this._insertFakeMarkersElements(t,n),i=e(t),r=this._removeFakeMarkersInsideElement(t,i);for(const e of Object.values(o).flat())t.remove(e);for(const[e,n]of Object.entries(r))t.model.markers.has(e)||t.addMarker(e,{usingOperation:!0,affectsData:!0,range:n});return i}))}_pasteFragmentWithMarkers(t){const e=this._getPasteMarkersFromRangeMap(t.markers);t.markers.clear();for(const n of e)t.markers.set(n.name,n.range);return this.editor.model.insertContent(t)}_forceMarkersCopy(t,e,n={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const o=this._markersToCopy.get(t);this._markersToCopy.set(t,n),e(),o?this._markersToCopy.set(t,o):this._markersToCopy.delete(t)}_isMarkerCopyable(t,e){const n=this._getMarkerClipboardConfig(t);if(!n)return!1;if(!e)return!0;const{allowedActions:o}=n;return"all"===o||o.includes(e)}_hasMarkerConfiguration(t){return!!this._getMarkerClipboardConfig(t)}_getMarkerClipboardConfig(t){const[e]=t.split(":");return this._markersToCopy.get(e)||null}_insertFakeMarkersIntoSelection(t,e,n){const o=this._getCopyableMarkersFromSelection(t,e,n);return this._insertFakeMarkersElements(t,o)}_getCopyableMarkersFromSelection(t,e,n){const o=Array.from(e.getRanges()),i=new Set(o.flatMap((e=>Array.from(t.model.markers.getMarkersIntersectingRange(e)))));return Array.from(i).filter((t=>{if(!this._isMarkerCopyable(t.name,n))return!1;const{copyPartiallySelected:e}=this._getMarkerClipboardConfig(t.name);if(!e){const e=t.getRange();return o.some((t=>t.containsRange(e,!0)))}return!0})).map((t=>({name:"dragstart"===n?this._getUniqueMarkerName(t.name):t.name,range:t.getRange()})))}_getPasteMarkersFromRangeMap(t,e=null){const{model:n}=this.editor;return(t instanceof Map?Array.from(t.entries()):Object.entries(t)).flatMap((([t,o])=>{if(!this._hasMarkerConfiguration(t))return[{name:t,range:o}];if(this._isMarkerCopyable(t,e)){const e=this._getMarkerClipboardConfig(t),i=n.markers.has(t)&&"$graveyard"===n.markers.get(t).getRange().root.rootName;return(e.duplicateOnPaste||i)&&(t=this._getUniqueMarkerName(t)),[{name:t,range:o}]}return[]}))}_insertFakeMarkersElements(t,e){const n={},o=e.flatMap((t=>{const{start:e,end:n}=t.range;return[{position:e,marker:t,type:"start"},{position:n,marker:t,type:"end"}]})).sort((({position:t},{position:e})=>t.isBefore(e)?1:-1));for(const{position:e,marker:i,type:r}of o){const o=t.createElement("$marker",{"data-name":i.name,"data-type":r});n[i.name]||(n[i.name]=[]),n[i.name].push(o),t.insert(o,e)}return n}_removeFakeMarkersInsideElement(t,e){const n=this._getAllFakeMarkersFromElement(t,e).reduce(((e,n)=>{const o=n.markerElement&&t.createPositionBefore(n.markerElement);let i=e[n.name],r=!1;if(i&&i.start&&i.end){this._getMarkerClipboardConfig(n.name).duplicateOnPaste?e[this._getUniqueMarkerName(n.name)]=e[n.name]:r=!0,i=null}var s,a;return r||(e[n.name]=(s=((t,e)=>{for(var n in e||(e={}))Db.call(e,n)&&Mb(t,n,e[n]);if(Eb)for(var n of Eb(e))Ib.call(e,n)&&Mb(t,n,e[n]);return t})({},i),a={[n.type]:o},yb(s,xb(a)))),n.markerElement&&t.remove(n.markerElement),e}),{});return Cb(n,(n=>new Rc(n.start||t.createPositionFromPath(e,[0]),n.end||t.createPositionAt(e,"end"))))}_getAllFakeMarkersFromElement(t,e){const n=Array.from(t.createRangeIn(e)).flatMap((({item:t})=>{if(!t.is("element","$marker"))return[];const e=t.getAttribute("data-name"),n=t.getAttribute("data-type");return[{markerElement:t,name:e,type:n}]})),o=[],i=[];for(const t of n){if("end"===t.type){n.some((e=>e.name===t.name&&"start"===e.type))||o.push({markerElement:null,name:t.name,type:"start"})}if("start"===t.type){n.some((e=>e.name===t.name&&"end"===e.type))||i.unshift({markerElement:null,name:t.name,type:"end"})}}return[...o,...n,...i]}_getUniqueMarkerName(t){const e=t.split(":"),n=g().substring(1,6);return 3===e.length?`${e.slice(0,2).join(":")}:${n}`:`${e.join(":")}:${n}`}}class Tb extends tr{static get pluginName(){return"ClipboardPipeline"}static get requires(){return[Sb]}init(){this.editor.editing.view.addObserver(ob),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(t,e,n){const o=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:"cut"===n},(()=>{const i=o._copySelectedFragmentWithMarkers(n,e);this.fire("outputTransformation",{dataTransfer:t,content:i,method:n})}))}_setupPasteDrop(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,i=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(o,"clipboardInput",((e,n)=>{"paste"!=n.method||t.model.canEditAt(t.model.document.selection)||e.stop()}),{priority:"highest"}),this.listenTo(o,"clipboardInput",((t,e)=>{const o=e.dataTransfer;let i;if(e.content)i=e.content;else{let t="";o.getData("text/html")?t=function(t){return t.replace(/(\s+)<\/span>/g,((t,e)=>1==e.length?" ":e)).replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((r=(r=o.getData("text/plain")).replace(/&/g,"&").replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||r.includes("
"))&&(r=`

${r}

`),t=r),i=this.editor.data.htmlProcessor.toView(t)}var r;const s=new u(this,"inputTransformation");this.fire(s,{content:i,dataTransfer:o,targetRanges:e.targetRanges,method:e.method}),s.stop.called&&t.stop(),n.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((t,n)=>{if(n.content.isEmpty)return;const o=this.editor.data.toModel(n.content,"$clipboardHolder");0!=o.childCount&&(t.stop(),e.change((()=>{this.fire("contentInsertion",{content:o,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((t,e)=>{e.resultRange=i._pasteFragmentWithMarkers(e.content)}),{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,n=t.editing.view.document,o=(t,n)=>{const o=n.dataTransfer;n.preventDefault(),this._fireOutputTransformationEvent(o,e.selection,t.name)};this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",((e,n)=>{t.model.canEditAt(t.model.document.selection)?o(e,n):n.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((e,o)=>{const i=t.data.toView(o.content);n.fire("clipboardOutput",{dataTransfer:o.dataTransfer,content:i,method:o.method})}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",sb(o.content))),"cut"==o.method&&t.model.deleteContent(e.selection)}),{priority:"low"})}}class Bb{constructor(t,e=20){this._batch=null,this.model=t,this._size=0,this.limit=e,this._isLocked=!1,this._changeCallback=(t,e)=>{e.isLocal&&e.isUndoable&&e!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(t){this._size+=t,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(t=!1){this.isLocked&&!t||(this._batch=null,this._size=0)}}class Nb extends nr{constructor(t,e){super(t),this._buffer=new Bb(t.model,e),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,o=t.text||"",i=o.length;let r=n.selection;if(t.selection?r=t.selection:t.range&&(r=e.createSelection(t.range)),!e.canEditAt(r))return;const s=t.resultRange;e.enqueueChange(this._buffer.batch,(t=>{this._buffer.lock();const a=Array.from(n.selection.getAttributes());e.deleteContent(r),o&&e.insertContent(t.createText(o,a),r),s?t.setSelection(s):r.is("documentSelection")||t.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}const Pb=["insertText","insertReplacementText"];class Ob extends Ea{constructor(t){super(t),this.focusObserver=t.getObserver(mc),i.isAndroid&&Pb.push("insertCompositionText");const e=t.document;e.on("beforeinput",((n,o)=>{if(!this.isEnabled)return;const{data:i,targetRanges:r,inputType:s,domEvent:a}=o;if(!Pb.includes(s))return;this.focusObserver.flush();const c=new u(e,"insertText");e.fire(c,new Ia(t,a,{text:i,selection:t.createSelection(r)})),c.stop.called&&n.stop()})),e.on("compositionend",((n,{data:o,domEvent:r})=>{this.isEnabled&&!i.isAndroid&&o&&e.fire("insertText",new Ia(t,r,{text:o,selection:e.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class Lb extends tr{static get pluginName(){return"Input"}init(){const t=this.editor,e=t.model,n=t.editing.view,o=e.document.selection;n.addObserver(Ob);const r=new Nb(t,t.config.get("typing.undoStep")||20);t.commands.add("insertText",r),t.commands.add("input",r),this.listenTo(n.document,"insertText",((o,r)=>{n.document.isComposing||r.preventDefault();const{text:s,selection:a,resultRange:c}=r,l=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));let d=s;if(i.isAndroid){const t=Array.from(l[0].getItems()).reduce(((t,e)=>t+(e.is("$textProxy")?e.data:"")),"");t&&(t.length<=d.length?d.startsWith(t)&&(d=d.substring(t.length),l[0].start=l[0].start.getShiftedBy(t.length)):t.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const u={text:d,selection:e.createSelection(l)};c&&(u.resultRange=t.editing.mapper.toModelRange(c)),t.execute("insertText",u),n.scrollToTheSelection()})),i.isAndroid?this.listenTo(n.document,"keydown",((t,i)=>{!o.isCollapsed&&229==i.keyCode&&n.document.isComposing&&zb(e,r)})):this.listenTo(n.document,"compositionstart",(()=>{o.isCollapsed||zb(e,r)}))}}function zb(t,e){if(!e.isEnabled)return;const n=e.buffer;n.lock(),t.enqueueChange(n.batch,(()=>{t.deleteContent(t.document.selection)})),n.unlock()}class Rb extends nr{constructor(t,e){super(t),this.direction=e,this._buffer=new Bb(t.model,t.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const i=o.createSelection(t.selection||n.selection);if(!e.canEditAt(i))return;const r=t.sequence||1,s=i.isCollapsed;if(i.isCollapsed&&e.modifySelection(i,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(i,r))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let a=0;i.getFirstRange().getMinimalFlatRanges().forEach((t=>{a+=Y(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),e.deleteContent(i,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),o.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(o)))return!1;if(!e.schema.checkChild(o,"paragraph"))return!1;const i=o.getChild(0);return!i||!i.is("element","paragraph")}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n),i=t.createElement("paragraph");t.remove(t.createRangeIn(o)),t.insert(i,o),t.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const n=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const o=t.getFirstPosition(),i=n.schema.getLimitElement(o),r=i.getChild(0);return o.parent==r&&(!!t.containsEntireContent(r)&&(!!n.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}const jb="word",Fb="selection",Vb="backward",Hb="forward",Ub={deleteContent:{unit:Fb,direction:Vb},deleteContentBackward:{unit:"codePoint",direction:Vb},deleteWordBackward:{unit:jb,direction:Vb},deleteHardLineBackward:{unit:Fb,direction:Vb},deleteSoftLineBackward:{unit:Fb,direction:Vb},deleteContentForward:{unit:"character",direction:Hb},deleteWordForward:{unit:jb,direction:Hb},deleteHardLineForward:{unit:Fb,direction:Hb},deleteSoftLineForward:{unit:Fb,direction:Hb}};class qb extends Ea{constructor(t){super(t);const e=t.document;let n=0;e.on("keydown",(()=>{n++})),e.on("keyup",(()=>{n=0})),e.on("beforeinput",((o,r)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:a,inputType:c}=r,l=Ub[c];if(!l)return;const d={direction:l.direction,unit:l.unit,sequence:n};d.unit==Fb&&(d.selectionToRemove=t.createSelection(s[0])),"deleteContentBackward"===c&&(i.isAndroid&&(d.sequence=1),function(t){if(1!=t.length||t[0].isCollapsed)return!1;const e=t[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let n=0;for(const{nextPosition:t}of e){if(t.parent.is("$text")){const e=t.parent.data,o=t.offset;if(Qi(e,o)||Zi(e,o)||Xi(e,o))continue;n++}else n++;if(n>1)return!0}return!1}(s)&&(d.unit=Fb,d.selectionToRemove=t.createSelection(s)));const u=new vs(e,"delete",s[0]);e.fire(u,new Ia(t,a,d)),u.stop.called&&o.stop()})),i.isBlink&&function(t){const e=t.view,n=e.document;let o=null,i=!1;function r(t){return t==gi.backspace||t==gi.delete}function s(t){return t==gi.backspace?Vb:Hb}n.on("keydown",((t,{keyCode:e})=>{o=e,i=!1})),n.on("keyup",((a,{keyCode:c,domEvent:l})=>{const d=n.selection,u=t.isEnabled&&c==o&&r(c)&&!d.isCollapsed&&!i;if(o=null,u){const t=d.getFirstRange(),o=new vs(n,"delete",t),i={unit:Fb,direction:s(c),selectionToRemove:d};n.fire(o,new Ia(e,l,i))}})),n.on("beforeinput",((t,{inputType:e})=>{const n=Ub[e];r(o)&&n&&n.direction==s(o)&&(i=!0)}),{priority:"high"}),n.on("beforeinput",((t,{inputType:e,data:n})=>{o==gi.delete&&"insertText"==e&&""==n&&t.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class Gb extends tr{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.model.document;e.addObserver(qb),this._undoOnBackspace=!1;const i=new Rb(t,"forward");t.commands.add("deleteForward",i),t.commands.add("forwardDelete",i),t.commands.add("delete",new Rb(t,"backward")),this.listenTo(n,"delete",((o,i)=>{n.isComposing||i.preventDefault();const{direction:r,sequence:s,selectionToRemove:a,unit:c}=i,l="forward"===r?"deleteForward":"delete",d={sequence:s};if("selection"==c){const e=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));d.selection=t.model.createSelection(e)}else d.unit=c;t.execute(l,d),e.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",((e,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,t.execute("undo"),n.preventDefault(),e.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Wb extends tr{static get requires(){return[Lb,Gb]}static get pluginName(){return"Typing"}}function Kb(t,e){let n=t.start;return{text:Array.from(t.getWalker({ignoreElementEnd:!1})).reduce(((t,{item:o})=>o.is("$text")||o.is("$textProxy")?t+o.data:(n=e.createPositionAfter(o),"")),""),range:e.createRange(n,t.end)}}class $b extends(U()){constructor(t,e){super(),this.model=t,this.testCallback=e,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",((e,{directChange:n})=>{n&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(t,"change:data",((t,e)=>{!e.isUndo&&e.isLocal&&this._evaluateTextBeforeSelection("data",{batch:e})}))}_evaluateTextBeforeSelection(t,e={}){const n=this.model,o=n.document.selection,i=n.createRange(n.createPositionAt(o.focus.parent,0),o.focus),{text:r,range:s}=Kb(i,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const n=Object.assign(e,{text:r,range:s});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${t}`,n)}}}class Yb extends tr{constructor(t){super(t),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const t=this.editor,e=t.model,n=t.editing.view,o=t.locale,i=e.document.selection;this.listenTo(n.document,"arrowKey",((t,e)=>{if(!i.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==gi.arrowright,r=e.keyCode==gi.arrowleft;if(!n&&!r)return;const s=o.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()}),{context:"$text",priority:"highest"}),this.listenTo(i,"change:range",((t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&ew(i.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,i=o.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!Qb(o,e))&&(!!ew(i,e)&&(Xb(t),Qb(o,e)&&ew(i,e,!0)?Jb(n,e):this._overrideGravity(),!0)))}_handleBackwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,i=o.getFirstPosition();return this._isGravityOverridden?(Xb(t),this._restoreGravity(),ew(i,e,!0)?Jb(n,e):Zb(n,e,i),!0):i.isAtStart?!!Qb(o,e)&&(Xb(t),Zb(n,e,i),!0):!Qb(o,e)&&ew(i,e,!0)?(Xb(t),Zb(n,e,i),!0):!!tw(i,e)&&(i.isAtEnd&&!Qb(o,e)&&ew(i,e)?(Xb(t),Zb(n,e,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view.document;t.editing.view.addObserver(fh);let i=!1;this.listenTo(o,"mousedown",(()=>{i=!0})),this.listenTo(o,"selectionChange",(()=>{const t=this.attributes;if(!i)return;if(i=!1,!n.isCollapsed)return;if(!Qb(n,t))return;const o=n.getFirstPosition();ew(o,t)&&(o.isAtStart||ew(o,t,!0)?Jb(e,t):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection,n=this.attributes;this.listenTo(t,"insertContent",(()=>{const o=e.getFirstPosition();Qb(e,n)&&ew(o,n)&&Jb(t,n)}),{priority:"low"})}_handleDeleteContentAfterNode(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view;let i=!1,r=!1;this.listenTo(o.document,"delete",((t,e)=>{i="backward"===e.direction}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{if(!i)return;const t=n.getFirstPosition();r=Qb(n,this.attributes)&&!tw(t,this.attributes)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i&&(i=!1,r||t.model.enqueueChange((()=>{const t=n.getFirstPosition();Qb(n,this.attributes)&&ew(t,this.attributes)&&(t.isAtStart||ew(t,this.attributes,!0)?Jb(e,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((t=>t.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function Qb(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function Zb(t,e,n){const o=n.nodeBefore;t.change((n=>{if(o){const e=[],i=t.schema.isObject(o)&&t.schema.isInline(o);for(const[n,r]of o.getAttributes())!t.schema.checkAttribute("$text",n)||i&&!1===t.schema.getAttributeProperties(n).copyFromObject||e.push([n,r]);n.setSelectionAttribute(e)}else n.removeSelectionAttribute(e)}))}function Jb(t,e){t.change((t=>{t.removeSelectionAttribute(e)}))}function Xb(t){t.preventDefault()}function tw(t,e){return ew(t.getShiftedBy(-1),e)}function ew(t,e,n=!1){const{nodeBefore:o,nodeAfter:i}=t;for(const t of e){const e=o?o.getAttribute(t):void 0,r=i?i.getAttribute(t):void 0;if((!n||void 0!==e&&void 0!==r)&&r!==e)return!0}return!1}const nw={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:cw('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:cw("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:cw("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:cw('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:cw('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:cw("'"),to:[null,"‚",null,"’"]}},ow={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},iw=["symbols","mathematical","typography","quotes"];function rw(t){return"string"==typeof t?new RegExp(`(${nk(t)})$`):t}function sw(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function aw(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function cw(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function lw(t,e,n,o){return o.createRange(dw(t,e,n,!0,o),dw(t,e,n,!1,o))}function dw(t,e,n,o,i){let r=t.textNode||(o?t.nodeBefore:t.nodeAfter),s=null;for(;r&&r.getAttribute(e)==n;)s=r,r=o?r.previousSibling:r.nextSibling;return s?i.createPositionAt(s,o?"before":"after"):t}function*uw(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class hw extends nr{execute(){this.editor.model.change((t=>{this.enterBlock(t),this.fire("afterExecute",{writer:t})}))}enterBlock(t){const e=this.editor.model,n=e.document.selection,o=e.schema,i=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(o.isLimit(s)||o.isLimit(a))return i||s!=a||e.deleteContent(n),!1;if(i){const e=uw(t.model.schema,n.getAttributes());return gw(t,r.start),t.setSelectionAttribute(e),!0}{const o=!(r.start.isAtStart&&r.end.isAtEnd),i=s==a;if(e.deleteContent(n,{leaveUnmerged:o}),o){if(i)return gw(t,n.focus),!0;t.setSelection(a,0)}}return!1}}function gw(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}const mw={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class pw extends Ea{constructor(t){super(t);const e=this.document;let n=!1;e.on("keydown",((t,e)=>{n=e.shiftKey})),e.on("beforeinput",((o,r)=>{if(!this.isEnabled)return;let s=r.inputType;i.isSafari&&n&&"insertParagraph"==s&&(s="insertLineBreak");const a=r.domEvent,c=mw[s];if(!c)return;const l=new vs(e,"enter",r.targetRanges[0]);e.fire(l,new Ia(t,a,{isSoft:c.isSoft})),l.stop.called&&o.stop()}))}observe(){}stopObserving(){}}class fw extends tr{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=this.editor.t;e.addObserver(pw),t.commands.add("enter",new hw(t)),this.listenTo(n,"enter",((o,i)=>{n.isComposing||i.preventDefault(),i.isSoft||(t.execute("enter"),e.scrollToTheSelection())}),{priority:"low"}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class kw extends nr{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n){const o=n.isCollapsed,i=n.getFirstRange(),r=i.start.parent,s=i.end.parent,a=r==s;if(o){const o=uw(t.schema,n.getAttributes());bw(t,e,i.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(o)}else{const o=!(i.start.isAtStart&&i.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:o}),a?bw(t,e,n.focus):o&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})}))}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const o=e.getFirstRange(),i=o.start.parent,r=o.end.parent;if((ww(i,t)||ww(r,t))&&i!==r)return!1;return!0}(t.schema,e.selection)}}function bw(t,e,n){const o=e.createElement("softBreak");t.insertContent(o,n),e.setSelection(o,"after")}function ww(t,e){return!t.is("rootElement")&&(e.isLimit(t)||ww(t.parent,e))}class Aw extends tr{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,o=t.editing.view,i=o.document,r=this.editor.t;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),o.addObserver(pw),t.commands.add("shiftEnter",new kw(t)),this.listenTo(i,"enter",((e,n)=>{i.isComposing||n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Insert a soft break (a <br> element)"),keystroke:"Shift+Enter"}]})}}class _w extends(I()){constructor(){super(...arguments),this._stack=[]}add(t,e){const n=this._stack,o=n[0];this._insertDescriptor(t);const i=n[0];o===i||Cw(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}remove(t,e){const n=this._stack,o=n[0];this._removeDescriptor(t);const i=n[0];o===i||Cw(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t.id));if(Cw(t,e[n]))return;n>-1&&e.splice(n,1);let o=0;for(;e[o]&&vw(e[o],t);)o++;e.splice(o,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t));n>-1&&e.splice(n,1)}}function Cw(t,e){return t&&e&&t.priority==e.priority&&yw(t.classes)==yw(e.classes)}function vw(t,e){return t.priority>e.priority||!(t.priorityyw(e.classes)}function yw(t){return Array.isArray(t)?t.sort().join(","):t}const xw='',Ew="ck-widget",Dw="ck-widget_selected";function Iw(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function Mw(t,e,n={}){if(!t.is("containerElement"))throw new k("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass(Ew,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=Ow,e.setCustomProperty("widgetLabel",[],t),n.label&&function(t,e){const n=t.getCustomProperty("widgetLabel");n.push(e)}(t,n.label),n.hasSelectionHandle&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),n=new Hg;return n.set("content",xw),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),Bw(t,e),t}function Sw(t,e,n){if(e.classes&&n.addClass(wi(e.classes),t),e.attributes)for(const o in e.attributes)n.setAttribute(o,e.attributes[o],t)}function Tw(t,e,n){if(e.classes&&n.removeClass(wi(e.classes),t),e.attributes)for(const o in e.attributes)n.removeAttribute(o,t)}function Bw(t,e,n=Sw,o=Tw){const i=new _w;i.on("change:top",((e,i)=>{i.oldDescriptor&&o(t,i.oldDescriptor,i.writer),i.newDescriptor&&n(t,i.newDescriptor,i.writer)}));e.setCustomProperty("addHighlight",((t,e,n)=>i.add(e,n)),t),e.setCustomProperty("removeHighlight",((t,e,n)=>i.remove(e,n)),t)}function Nw(t,e,n={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),e.setAttribute("role","textbox",t),e.setAttribute("tabindex","-1",t),n.label&&e.setAttribute("aria-label",n.label,t),e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",((n,o,i)=>{e.setAttribute("contenteditable",i?"false":"true",t)})),t.on("change:isFocused",((n,o,i)=>{i?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)})),Bw(t,e),t}function Pw(t,e){const n=t.getSelectedElement();if(n){const o=Rw(t);if(o)return e.createRange(e.createPositionAt(n,o))}return e.schema.findOptimalInsertionRange(t)}function Ow(){return null}const Lw="widget-type-around";function zw(t,e,n){return!!t&&Iw(t)&&!n.isInline(e)}function Rw(t){return t.getAttribute(Lw)}var jw=n(8508),Fw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(jw.A,Fw);jw.A.locals;const Vw=["before","after"],Hw=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,Uw="ck-widget__type-around_disabled";class qw extends tr{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[fw,Gb]}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",((n,o,i)=>{e.change((t=>{for(const n of e.document.roots)i?t.removeClass(Uw,n):t.addClass(Uw,n)})),i||t.model.change((t=>{t.removeSelectionAttribute(Lw)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(t,e){const n=this.editor,o=n.editing.view,i=n.model.schema.getAttributesWithProperty(t,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(t,e),attributes:i}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(t,e,n,o){this.listenTo(t,e,((...t)=>{this.isEnabled&&n(...t)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=Rw(t);if(!e)return!1;const n=t.getSelectedElement();return this._insertParagraph(n,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,n=t.locale.t,o={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",((t,i,r)=>{const s=r.mapper.toViewElement(i.item);if(s&&zw(s,i.item,e)){!function(t,e,n){const o=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const n=this.toDomElement(t);return function(t,e){for(const n of Vw){const o=new rg({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:e[n],"aria-hidden":"true"},children:[t.ownerDocument.importNode(Hw,!0)]});t.appendChild(o.render())}}(n,e),function(t){const e=new rg({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(n),n}));t.insert(t.createPositionAt(n,"end"),o)}(r.writer,o,s);s.getCustomProperty("widgetLabel").push((()=>this.isEnabled?n("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,n=e.document.selection,o=e.schema,i=t.editing.view;function r(t){return`ck-widget_type-around_show-fake-caret_${t}`}this._listenToIfEnabled(i.document,"arrowKey",((t,e)=>{this._handleArrowKeyPress(t,e)}),{context:[Iw,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",((e,n)=>{n.directChange&&t.model.change((t=>{t.removeSelectionAttribute(Lw)}))})),this._listenToIfEnabled(e.document,"change:data",(()=>{const e=n.getSelectedElement();if(e){if(zw(t.editing.mapper.toViewElement(e),e,o))return}t.model.change((t=>{t.removeSelectionAttribute(Lw)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",((t,e,n)=>{const i=n.writer;if(this._currentFakeCaretModelElement){const t=n.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(i.removeClass(Vw.map(r),t),this._currentFakeCaretModelElement=null)}const s=e.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!zw(a,s,o))return;const c=Rw(e.selection);c&&(i.addClass(r(c),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",((e,n,o)=>{o||t.model.change((t=>{t.removeSelectionAttribute(Lw)}))}))}_handleArrowKeyPress(t,e){const n=this.editor,o=n.model,i=o.document.selection,r=o.schema,s=n.editing.view,a=function(t,e){const n=bi(t,e);return"down"===n||"right"===n}(e.keyCode,n.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();let l;zw(c,n.editing.mapper.toModelElement(c),r)?l=this._handleArrowKeyPressOnSelectedWidget(a):i.isCollapsed?l=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):e.shiftKey||(l=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),l&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,n=Rw(e.document.selection);return e.change((e=>{if(!n)return e.setSelectionAttribute(Lw,t?"after":"before"),!0;if(!(n===(t?"after":"before")))return e.removeSelectionAttribute(Lw),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,n=e.model,o=n.schema,i=e.plugins.get("Widget"),r=i._getObjectElementNextToSelection(t);return!!zw(e.editing.mapper.toViewElement(r),r,o)&&(n.change((e=>{i._setSelectionOverElement(r),e.setSelectionAttribute(Lw,t?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,n=e.model,o=n.schema,i=e.editing.mapper,r=n.document.selection,s=t?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!zw(i.toViewElement(s),s,o)&&(n.change((e=>{e.setSelection(s,"on"),e.setSelectionAttribute(Lw,t?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",((n,o)=>{const i=o.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const r=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),s=function(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}(i,e.domConverter),a=t.editing.mapper.toModelElement(s);this._insertParagraph(a,r),o.preventDefault(),n.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",((n,o)=>{if("atTarget"!=n.eventPhase)return;const i=e.getSelectedElement(),r=t.editing.mapper.toViewElement(i),s=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:zw(r,i,s)&&(this._insertParagraph(i,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),n.stop())}),{context:Iw})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",((e,n)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(n.selection=t.selection)}),{priority:"high"}),i.isAndroid?this._listenToIfEnabled(t,"keydown",((t,e)=>{229==e.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(t,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,n=t.model,o=n.schema;this._listenToIfEnabled(e.document,"delete",((e,i)=>{if("atTarget"!=e.eventPhase)return;const r=Rw(n.document.selection);if(!r)return;const s=i.direction,a=n.document.selection.getSelectedElement(),c="forward"==s;if("before"===r===c)t.execute("delete",{selection:n.createSelection(a,"on")});else{const e=o.getNearestSelectionRange(n.createPositionAt(a,r),s);if(e)if(e.isCollapsed){const i=n.createSelection(e.start);if(n.modifySelection(i,{direction:s}),i.focus.isEqual(e.start)){const t=function(t,e){let n=e;for(const o of e.getAncestors({parentFirst:!0})){if(o.childCount>1||t.isLimit(o))break;n=o}return n}(o,e.start.parent);n.deleteContent(n.createSelection(t,"on"),{doNotAutoparagraph:!0})}else n.change((n=>{n.setSelection(e),t.execute(c?"deleteForward":"delete")}))}else n.change((n=>{n.setSelection(e),t.execute(c?"deleteForward":"delete")}))}i.preventDefault(),e.stop()}),{context:Iw})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,n=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",((t,[o,i])=>{if(i&&!i.is("documentSelection"))return;const r=Rw(n);return r?(t.stop(),e.change((t=>{const i=n.getSelectedElement(),s=e.createPositionAt(i,r),a=t.createSelection(s),c=e.insertContent(o,a);return t.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"insertObject",((t,n)=>{const[,o,i={}]=n;if(o&&!o.is("documentSelection"))return;const r=Rw(e);r&&(i.findOptimalPosition=r,n[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",((t,[n])=>{if(n&&!n.is("documentSelection"))return;Rw(e)&&t.stop()}),{priority:"high"})}}function Gw(t){const e=t.model;return(n,o)=>{const i=o.keyCode==gi.arrowup,r=o.keyCode==gi.arrowdown,s=o.shiftKey,a=e.document.selection;if(!i&&!r)return;const c=r;if(s&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,c))return;const l=function(t,e,n){const o=t.model;if(n){const t=e.isCollapsed?e.focus:e.getLastPosition(),n=Ww(o,t,"forward");if(!n)return null;const i=o.createRange(t,n),r=Kw(o.schema,i,"backward");return r?o.createRange(t,r):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),n=Ww(o,t,"backward");if(!n)return null;const i=o.createRange(n,t),r=Kw(o.schema,i,"forward");return r?o.createRange(r,t):null}}(t,a,c);if(l){if(l.isCollapsed){if(a.isCollapsed)return;if(s)return}(l.isCollapsed||function(t,e,n){const o=t.model,i=t.view.domConverter;if(n){const t=o.createSelection(e.start);o.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=o.createRange(t.focus,e.end))}const r=t.mapper.toViewRange(e),s=i.viewRangeToDom(r),a=zo.getDomRangeRects(s);let c;for(const t of a)if(void 0!==c){if(Math.round(t.top)>=c)return!1;c=Math.max(c,Math.round(t.bottom))}else c=Math.round(t.bottom);return!0}(t,l,c))&&(e.change((t=>{const n=c?l.end:l.start;if(s){const o=e.createSelection(a.anchor);o.setFocus(n),t.setSelection(o)}else t.setSelection(n)})),n.stop(),o.preventDefault(),o.stopPropagation())}}}function Ww(t,e,n){const o=t.schema,i=t.createRangeIn(e.root),r="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:t,item:s,type:a}of i.getWalker({startPosition:e,direction:n})){if(o.isLimit(s)&&!o.isInline(s))return t;if(a==r&&o.isBlock(s))return null}return null}function Kw(t,e,n){const o="backward"==n?e.end:e.start;if(t.checkChild(o,"$text"))return o;for(const{nextPosition:o}of e.getWalker({direction:n}))if(t.checkChild(o,"$text"))return o;return null}var $w=n(695),Yw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()($w.A,Yw);$w.A.locals;class Qw extends tr{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[qw,Gb]}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.t;this.editor.editing.downcastDispatcher.on("selection",((e,n,o)=>{const i=o.writer,r=n.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);var c;Iw(a)&&(o.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:(c=a,c.getCustomProperty("widgetLabel").reduce(((t,e)=>"function"==typeof e?t?t+". "+e():e():t?t+". "+e:e),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,i=o.document.selection;let r=null;for(const t of i.getRanges())for(const e of t){const t=e.item;Iw(t)&&!Zw(t,r)&&(o.addClass(Dw,t),this._previouslySelected.add(t),r=t)}}),{priority:"low"}),e.addObserver(fh),this.listenTo(n,"mousedown",((...t)=>this._onMousedown(...t))),this.listenTo(n,"arrowKey",((...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)}),{context:[Iw,"$text"]}),this.listenTo(n,"arrowKey",((...t)=>{this._preventDefaultOnArrowKeyPress(...t)}),{context:"$root"}),this.listenTo(n,"arrowKey",Gw(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",((t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())}),{context:"$root"}),this.listenTo(n,"tab",((t,e)=>{"atTarget"==t.eventPhase&&(e.shiftKey||this._selectFirstNestedEditable()&&(e.preventDefault(),t.stop()))}),{context:Iw,priority:"low"}),this.listenTo(n,"tab",((t,e)=>{e.shiftKey&&this._selectAncestorWidget()&&(e.preventDefault(),t.stop())}),{priority:"low"}),this.listenTo(n,"keydown",((t,e)=>{e.keystroke==gi.esc&&this._selectAncestorWidget()&&(e.preventDefault(),t.stop())}),{priority:"low"}),t.accessibility.addKeystrokeInfoGroup({id:"widget",label:o("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:o("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:o("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:o("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:o("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(t,e){const n=this.editor,o=n.editing.view,r=o.document;let s=e.target;if(e.domEvent.detail>=3)return void(this._selectBlockContent(s)&&e.preventDefault());if(function(t){let e=t;for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Iw(e))return!1;e=e.parent}return!1}(s))return;if(!Iw(s)&&(s=s.findAncestor(Iw),!s))return;i.isAndroid&&e.preventDefault(),r.isFocused||o.focus();const a=n.editing.mapper.toModelElement(s);this._setSelectionOverElement(a)}_selectBlockContent(t){const e=this.editor,n=e.model,o=e.editing.mapper,i=n.schema,r=o.findMappedViewAncestor(this.editor.editing.view.createPositionAt(t,0)),s=function(t,e){for(const n of t.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(n,"$text"))return n;if(e.isLimit(n)&&!e.isObject(n))break}return null}(o.toModelElement(r),n.schema);return!!s&&(n.change((t=>{const e=i.isLimit(s)?null:function(t,e){const n=new Sc({startPosition:t});for(const{item:t}of n){if(e.isLimit(t)||!t.is("element"))return null;if(e.checkChild(t,"$text"))return t}return null}(t.createPositionAfter(s),i),n=t.createPositionAt(s,0),o=e?t.createPositionAt(e,0):t.createPositionAt(s,"end");t.setSelection(t.createRange(n,o))})),!0)}_handleSelectionChangeOnArrowKeyPress(t,e){const n=e.keyCode,o=this.editor.model,i=o.schema,r=o.document.selection,s=r.getSelectedElement(),a=bi(n,this.editor.locale.contentLanguageDirection),c="down"==a||"right"==a,l="up"==a||"down"==a;if(s&&i.isObject(s)){const n=c?r.getLastPosition():r.getFirstPosition(),s=i.getNearestSelectionRange(n,c?"forward":"backward");return void(s&&(o.change((t=>{t.setSelection(s)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed&&!e.shiftKey){const n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,l=s.nodeBefore;return void((a&&i.isObject(a)||l&&i.isObject(l))&&(o.change((t=>{t.setSelection(c?s:n)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed)return;const d=this._getObjectElementNextToSelection(c);if(d&&i.isObject(d)){if(i.isInline(d)&&l)return;this._setSelectionOverElement(d),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const n=this.editor.model,o=n.schema,i=n.document.selection.getSelectedElement();i&&o.isObject(i)&&(e.preventDefault(),t.stop())}_handleDelete(t){const e=this.editor.model.document.selection;if(!this.editor.model.canEditAt(e))return;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change((t=>{let o=e.anchor.parent;for(;o.isEmpty;){const e=o;o=e.parent,t.remove(e)}this._setSelectionOverElement(n)})),!0):void 0}_setSelectionOverElement(t){this.editor.model.change((e=>{e.setSelection(e.createRangeOn(t))}))}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,o=e.document.selection,i=e.createSelection(o);if(e.modifySelection(i,{direction:t?"forward":"backward"}),i.isEqual(o))return null;const r=t?i.focus.nodeBefore:i.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(Dw,e);this._previouslySelected.clear()}_selectFirstNestedEditable(){const t=this.editor,e=this.editor.editing.view.document;for(const n of e.selection.getFirstRange().getItems())if(n.is("editableElement")){const e=t.editing.mapper.toModelElement(n);if(!e)continue;const o=t.model.createPositionAt(e,0),i=t.model.schema.getNearestSelectionRange(o,"forward");return t.model.change((t=>{t.setSelection(i)})),!0}return!1}_selectAncestorWidget(){const t=this.editor,e=t.editing.mapper,n=t.editing.view.document.selection.getFirstPosition().parent,o=(n.is("$text")?n.parent:n).findAncestor(Iw);if(!o)return!1;const i=e.toModelElement(o);return!!i&&(t.model.change((t=>{t.setSelection(i,"on")})),!0)}}function Zw(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class Jw extends tr{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Wf]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",(e=>{(function(t){const e=t.getSelectedElement();return!(!e||!Iw(e))})(t.editing.view.document.selection)&&e.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:o,balloonClassName:i="ck-toolbar-container"}){if(!n.length)return void b("widget-toolbar-no-items",{toolbarId:t});const r=this.editor,s=r.t,a=new Lm(r.locale);if(a.ariaLabel=e||s("Widget toolbar"),this._toolbarDefinitions.has(t))throw new k("widget-toolbar-duplicated",this,{toolbarId:t});const c={view:a,getRelatedElement:o,balloonClassName:i,itemsConfig:n,initialized:!1};r.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const t=o(r.editing.view.document.selection);t&&this._showToolbar(c,t)},afterBlur:()=>{this._hideToolbar(c)}}),this._toolbarDefinitions.set(t,c)}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const o of this._toolbarDefinitions.values()){const i=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>t&&(t=r,e=i,n=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?Xw(this.editor,e):this._isToolbarInBalloon(t)||(t.initialized||(t.initialized=!0,t.view.fillFromConfig(t.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:t.view,position:tA(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);Xw(this.editor,e)}})))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function Xw(t,e){const n=t.plugins.get("ContextualBalloon"),o=tA(t,e);n.updatePosition(o)}function tA(t,e){const n=t.editing.view,o=Zp.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}U();Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;U();var eA=n(4095),nA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(eA.A,nA);eA.A.locals;const oA=Go("px");class iA extends Ig{constructor(){super();const t=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",t.if("isVisible","ck-hidden",(t=>!t))],style:{left:t.to("left",(t=>oA(t))),top:t.to("top",(t=>oA(t))),width:t.to("width",(t=>oA(t)))}}})}}class rA extends tr{constructor(){super(...arguments),this.removeDropMarkerDelayed=Yi((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=Fh((t=>this._updateDropMarker(t)),40),this._reconvertMarkerThrottled=Fh((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new iA,this._domEmitter=new(Do()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:t}of this._scrollables.values())t.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(t,e,n,o,i,r){this.removeDropMarkerDelayed.cancel();const s=sA(this.editor,t,e,n,o,i,r);if(s)return r&&r.containsRange(s)?this.removeDropMarker():void this._updateDropMarkerThrottled(s)}getFinalDropRange(t,e,n,o,i,r){const s=sA(this.editor,t,e,n,o,i,r);return this.removeDropMarker(),s}removeDropMarker(){const t=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,t.markers.has("drop-target")&&t.change((t=>{t.removeMarker("drop-target")}))}_setupDropMarker(){const t=this.editor;t.ui.view.body.add(this._dropTargetLineView),t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:n})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(n);e.markerRange.isCollapsed?this._updateDropTargetLine(e.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(t){const e=this.editor,n=e.model.markers;e.model.change((e=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(t){return t.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.append("⁠",t.createElement("span"),"⁠"),e}))}_updateDropTargetLine(t){const e=this.editor.editing,n=t.start.nodeBefore,o=t.start.nodeAfter,i=t.start.parent,r=n?e.mapper.toViewElement(n):null,s=r?e.view.domConverter.mapViewToDom(r):null,a=o?e.mapper.toViewElement(o):null,c=a?e.view.domConverter.mapViewToDom(a):null,l=e.mapper.toViewElement(i);if(!l)return;const d=e.view.domConverter.mapViewToDom(l),u=this._getScrollableRect(l),{scrollX:h,scrollY:g}=To.window,m=s?new zo(s):null,p=c?new zo(c):null,f=new zo(d).excludeScrollbarsAndBorders(),k=m?m.bottom:f.top,b=p?p.top:f.bottom,w=To.window.getComputedStyle(d),A=k<=b?(k+b)/2:b;if(u.topa.schema.checkChild(r,t)))){if(a.schema.checkChild(r,"$text"))return a.createRange(r);if(e)return cA(t,dA(t,e.parent),o,i)}}}else if(a.schema.isInline(l))return cA(t,l,o,i);if(a.schema.isBlock(l))return cA(t,l,o,i);if(a.schema.checkChild(l,"$block")){const e=Array.from(l.getChildren()).filter((e=>e.is("element")&&!aA(t,e)));let n=0,r=e.length;if(0==r)return a.createRange(a.createPositionAt(l,"end"));for(;ne in t?uA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class bA extends tr{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new(Do())}static get pluginName(){return"DragDropBlockToolbar"}init(){const t=this.editor;if(this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),i.isAndroid&&this.forceDisabled("noAndroidSupport"),t.plugins.has("BlockToolbar")){const e=t.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(e,"dragstart",((t,e)=>this._handleBlockDragStart(e))),this._domEmitter.listenTo(To.document,"dragover",((t,e)=>this._handleBlockDragging(e))),this._domEmitter.listenTo(To.document,"drop",((t,e)=>this._handleBlockDragging(e))),this._domEmitter.listenTo(To.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&e.setAttribute("draggable","true"),this.on("change:isEnabled",((t,n,o)=>{e.setAttribute("draggable",o?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(t){if(!this.isEnabled)return;const e=this.editor.model,n=e.document.selection,o=this.editor.editing.view,i=Array.from(n.getSelectedBlocks()),r=e.createRange(e.createPositionBefore(i[0]),e.createPositionAfter(i[i.length-1]));e.change((t=>t.setSelection(r))),this._isBlockDragging=!0,o.focus(),o.getObserver(ob).onDomEvent(t)}_handleBlockDragging(t){if(!this.isEnabled||!this._isBlockDragging)return;const e=t.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),n=t.clientY,o=document.elementFromPoint(e,n),i=this.editor.editing.view;var r,s;o&&o.closest(".ck-editor__editable")&&i.getObserver(ob).onDomEvent((r=((t,e)=>{for(var n in e||(e={}))pA.call(e,n)&&kA(t,n,e[n]);if(mA)for(var n of mA(e))fA.call(e,n)&&kA(t,n,e[n]);return t})({},t),s={type:t.type,dataTransfer:t.dataTransfer,target:o,clientX:e,clientY:n,preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()},hA(r,gA(s))))}_handleBlockDragEnd(){this._isBlockDragging=!1}}var wA=n(7793),AA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(wA.A,AA);wA.A.locals;class _A extends tr{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=Yi((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new(Do())}static get pluginName(){return"DragDrop"}static get requires(){return[Tb,Qw,rA,bA]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,e.addObserver(ob),e.addObserver(fh),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((t,e,n)=>{n||this._finalizeDragging(!1)})),i.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,r=t.plugins.get(rA);this.listenTo(o,"dragstart",((t,n)=>{if(n.target&&n.target.is("editableElement"))return void n.preventDefault();if(this._prepareDraggedRange(n.target),!this._draggedRange)return void n.preventDefault();this._draggingUid=g(),n.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",n.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const o=e.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(n.dataTransfer,o,"dragstart");const{dataTransfer:i,domTarget:r,domEvent:s}=n,{clientX:a}=s;this._updatePreview({dataTransfer:i,domTarget:r,clientX:a}),n.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(o,"dragend",((t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(To.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(o,"dragenter",(()=>{this.isEnabled&&n.focus()})),this.listenTo(o,"dragleave",(()=>{r.removeDropMarkerDelayed()})),this.listenTo(o,"dragging",((t,e)=>{if(!this.isEnabled)return void(e.dataTransfer.dropEffect="none");const{clientX:n,clientY:o}=e.domEvent;r.updateDropMarker(e.target,e.targetRanges,n,o,this._blockMode,this._draggedRange),this._draggedRange||(e.dataTransfer.dropEffect="copy"),i.isGecko||("copy"==e.dataTransfer.effectAllowed?e.dataTransfer.dropEffect="copy":["all","copyMove"].includes(e.dataTransfer.effectAllowed)&&(e.dataTransfer.dropEffect="move")),t.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get(rA);this.listenTo(e,"clipboardInput",((e,o)=>{if("drop"!=o.method)return;const{clientX:i,clientY:r}=o.domEvent,s=n.getFinalDropRange(o.target,o.targetRanges,i,r,this._blockMode,this._draggedRange);if(!s)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==CA(o.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(s,!0))return this._finalizeDragging(!1),void e.stop();o.targetRanges=[t.editing.mapper.toViewRange(s)]}),{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(Tb);t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n=e.targetRanges.map((t=>this.editor.editing.mapper.toModelRange(t)));this.editor.model.change((t=>t.setSelection(n)))}),{priority:"high"}),t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n="move"==CA(e.dataTransfer),o=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(o&&n)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,n=e.document;this.listenTo(n,"mousedown",((o,r)=>{if(i.isAndroid||!r)return;this._clearDraggableAttributesDelayed.cancel();let s=vA(r.target);if(i.isBlink&&!t.isReadOnly&&!s&&!n.selection.isCollapsed){const t=n.selection.getSelectedElement();t&&Iw(t)||(s=n.selection.editableElement)}s&&(e.change((t=>{t.setAttribute("draggable","true",s)})),this._draggableElement=t.editing.mapper.toModelElement(s))})),this.listenTo(n,"mouseup",(()=>{i.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change((e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(t){const e=this.editor,n=e.model;if(e.plugins.get(rA).removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(t&&this.isEnabled&&n.change((t=>{const e=n.createSelection(this._draggedRange);n.deleteContent(e,{doNotAutoparagraph:!0});const o=e.getFirstPosition().parent;o.isEmpty&&!n.schema.checkChild(o,"$text")&&n.schema.checkChild(o,"paragraph")&&t.insertElement("paragraph",o,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(t){const e=this.editor,n=e.model,o=n.document.selection,i=t?vA(t):null;if(i){const t=e.editing.mapper.toModelElement(i);if(this._draggedRange=al.fromRange(n.createRangeOn(t)),this._blockMode=n.schema.isBlock(t),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(o.isCollapsed&&!o.getFirstPosition().parent.isEmpty)return;const r=Array.from(o.getSelectedBlocks()),s=o.getFirstRange();if(0==r.length)return void(this._draggedRange=al.fromRange(s));const a=yA(n,r);if(r.length>1)this._draggedRange=al.fromRange(a),this._blockMode=!0;else if(1==r.length){const t=s.start.isTouching(a.start)&&s.end.isTouching(a.end);this._draggedRange=al.fromRange(t?a:s),this._blockMode=t}n.change((t=>t.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:t,domTarget:e,clientX:n}){const o=this.editor.editing.view,r=o.document.selection.editableElement,s=o.domConverter.mapViewToDom(r),a=To.window.getComputedStyle(s);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=mt(To.document,"div",{style:"position: fixed; left: -999999px;"}),To.document.body.appendChild(this._previewContainer));const c=new zo(s);if(s.contains(e))return;const l=parseFloat(a.paddingLeft),d=mt(To.document,"div");d.className="ck ck-content",d.style.width=a.width,d.style.paddingLeft=`${c.left-n+l}px`,i.isiOS&&(d.style.backgroundColor="white"),d.innerHTML=t.getData("text/html"),t.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function CA(t){return i.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function vA(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(Iw);if(Iw(t))return t;const e=t.findAncestor((t=>Iw(t)||t.is("editableElement")));return Iw(e)?e:null}function yA(t,e){const n=e[0],o=e[e.length-1],i=n.getCommonAncestor(o),r=t.createPositionBefore(n),s=t.createPositionAfter(o);if(i&&i.is("element")&&!t.schema.isLimit(i)){const e=t.createRangeOn(i),n=r.isTouching(e.start),o=s.isTouching(e.end);if(n&&o)return yA(t,[i])}return t.createRange(r,s)}class xA extends tr{static get pluginName(){return"PastePlainText"}static get requires(){return[Tb]}init(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,i=e.document.selection;let r=!1;n.addObserver(ob),this.listenTo(o,"keydown",((t,e)=>{r=e.shiftKey})),t.plugins.get(Tb).on("contentInsertion",((t,n)=>{(r||function(t,e){if(t.childCount>1)return!1;const n=t.getChild(0);if(e.isObject(n))return!1;return 0==Array.from(n.getAttributeKeys()).length}(n.content,e.schema))&&e.change((t=>{const o=Array.from(i.getAttributes()).filter((([t])=>e.schema.getAttributeProperties(t).isFormatting));i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0}),o.push(...i.getAttributes());const r=t.createRangeIn(n.content);for(const e of r.getItems())e.is("$textProxy")&&t.setAttributes(o,e)}))}))}}class EA extends tr{static get pluginName(){return"Clipboard"}static get requires(){return[Sb,Tb,_A,xA]}init(){const t=this.editor,e=this.editor.t;t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Copy selected content"),keystroke:"CTRL+C"},{label:e("Paste content"),keystroke:"CTRL+V"},{label:e("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}class DA extends nr{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let n=t.schema.getLimitElement(e);if(e.containsEntireContent(n)||!IA(t.schema,n))do{if(n=n.parent,!n)return}while(!IA(t.schema,n));t.change((t=>{t.setSelection(n,"in")}))}}function IA(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const MA=fi("Ctrl+A");class SA extends tr{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.t,n=t.editing.view.document;t.commands.add("selectAll",new DA(t)),this.listenTo(n,"keydown",((e,n)=>{pi(n)===MA&&(t.execute("selectAll"),n.preventDefault())})),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Select all"),keystroke:"CTRL+A"}]})}}class TA extends tr{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",(()=>{const t=this._createButton(Wg);return t.set({tooltip:!0}),t})),t.ui.componentFactory.add("menuBar:selectAll",(()=>this._createButton(Vk)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("selectAll"),i=new t(e.locale),r=n.t;return i.set({label:r("Select all"),icon:'',keystroke:"Ctrl+A"}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),i}}class BA extends tr{static get requires(){return[SA,TA]}static get pluginName(){return"SelectAll"}}var NA=Object.defineProperty,PA=Object.getOwnPropertySymbols,OA=Object.prototype.hasOwnProperty,LA=Object.prototype.propertyIsEnumerable,zA=(t,e,n)=>e in t?NA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class RA extends nr{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(t.data,"set",((t,e)=>{e[1]=((t,e)=>{for(var n in e||(e={}))OA.call(e,n)&&zA(t,n,e[n]);if(PA)for(var n of PA(e))LA.call(e,n)&&zA(t,n,e[n]);return t})({},e[1]);const n=e[1];n.batchType||(n.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(t.data,"set",((t,e)=>{e[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const o=this.editor.model,i=o.document,r=[],s=t.map((t=>t.getTransformedByOperations(n))),a=s.flat();for(const t of s){const e=t.filter((t=>t.root!=i.graveyard)).filter((t=>!FA(t,a)));e.length&&(jA(e),r.push(e[0]))}r.length&&o.change((t=>{t.setSelection(r,{backward:e})}))}_undo(t,e){const n=this.editor.model,o=n.document;this._createdBatches.add(e);const i=t.operations.slice().filter((t=>t.isDocumentOperation));i.reverse();for(const t of i){const i=t.baseVersion+1,r=Array.from(o.history.getOperations(i)),s=Xd([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let i of s){const r=i.affectedSelectable;r&&!n.canEditAt(r)&&(i=new Ud(i.baseVersion)),e.addOperation(i),n.applyOperation(i),o.history.setOperationAsUndone(t,i)}}}}function jA(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;ee!==t&&e.containsRange(t,!0)))}class VA extends RA{execute(t=null){const e=t?this._stack.findIndex((e=>e.batch==t)):this._stack.length-1,n=this._stack.splice(e,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(n.batch,o);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t)})),this.fire("revert",n.batch,o),this.refresh()}}class HA extends RA{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(e,(()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o),this._undo(t.batch,e)})),this.refresh()}}class UA extends tr{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const t=this.editor,e=t.t;this._undoCommand=new VA(t),this._redoCommand=new HA(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",((t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const o=n.batch,i=this._redoCommand.createdBatches.has(o),r=this._undoCommand.createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(i?this._undoCommand.addBatch(o):r||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((t,e,n)=>{this._redoCommand.addBatch(n)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Undo"),keystroke:"CTRL+Z"},{label:e("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class qA extends tr{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?Oh.undo:Oh.redo,i="ltr"==e.uiLanguageDirection?Oh.redo:Oh.undo;this._addButtonsToFactory("undo",n("Undo"),"CTRL+Z",o),this._addButtonsToFactory("redo",n("Redo"),"CTRL+Y",i)}_addButtonsToFactory(t,e,n,o){const i=this.editor;i.ui.componentFactory.add(t,(()=>{const i=this._createButton(Wg,t,e,n,o);return i.set({tooltip:!0}),i})),i.ui.componentFactory.add("menuBar:"+t,(()=>this._createButton(Vk,t,e,n,o)))}_createButton(t,e,n,o,i){const r=this.editor,s=r.locale,a=r.commands.get(e),c=new t(s);return c.set({label:n,icon:i,keystroke:o}),c.bind("isEnabled").to(a,"isEnabled"),this.listenTo(c,"execute",(()=>{r.execute(e),r.editing.view.focus()})),c}}class GA extends tr{static get requires(){return[UA,qA]}static get pluginName(){return"Undo"}}class WA extends(U()){constructor(){super();const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise(((n,o)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{o("error")},e.onabort=()=>{o("aborted")},this._reader.readAsDataURL(t)}))}abort(){this._reader.abort()}}class KA extends tr{constructor(){super(...arguments),this.loaders=new qi,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[Ph]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0))}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return b("filerepository-no-upload-adapter"),null;const e=new $A(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then((t=>{this._loadersMap.set(t,e)})).catch((()=>{})),e.on("change:uploaded",(()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t})),e.on("change:uploadTotal",(()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t})),e}destroyLoader(t){const e=t instanceof $A?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach(((t,n)=>{t===e&&this._loadersMap.delete(n)}))}_updatePendingAction(){const t=this.editor.plugins.get(Ph);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("Upload in progress")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}class $A extends(U()){constructor(t,e){super(),this.id=g(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new WA,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((t=>this._filePromiseWrapper?t:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new k("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((t=>this._reader.read(t))).then((t=>{if("reading"!==this.status)throw this.status;return this.status="idle",t})).catch((t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t}))}upload(){if("idle"!=this.status)throw new k("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((t=>(this.uploadResponse=t,this.status="idle",t))).catch((t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t}))}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(t){const e={};return e.promise=new Promise(((n,o)=>{e.rejecter=o,e.isFulfilled=!1,t.then((t=>{e.isFulfilled=!0,n(t)})).catch((t=>{e.isFulfilled=!0,o(t)}))})),e}}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const YA="ckCsrfToken",QA="abcdefghijklmnopqrstuvwxyz0123456789";function ZA(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("=");if(decodeURIComponent(e[0].trim().toLowerCase())===t)return decodeURIComponent(e[1])}return null}(YA);var e,n;return t&&40==t.length||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let t=0;t.5?o.toUpperCase():o}return e}(40),e=YA,n=t,document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(n)+";path=/"),t}class JA{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const o=this.xhr,i=this.loader,r=(0,this.t)("Cannot upload file:")+` ${n.name}.`;o.addEventListener("error",(()=>e(r))),o.addEventListener("abort",(()=>e())),o.addEventListener("load",(()=>{const n=o.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})})),o.upload&&o.upload.addEventListener("progress",(t=>{t.lengthComputable&&(i.uploadTotal=t.total,i.uploaded=t.loaded)}))}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",ZA()),this.xhr.send(e)}}function XA(t,e,n,o){let i,r=null;"function"==typeof o?i=o:(r=t.commands.get(o),i=()=>{t.execute(o)}),t.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!e.isEnabled)return;const c=Gi(t.model.document.selection.getRanges());if(!c.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const l=Array.from(t.model.document.differ.getChanges()),d=l[0];if(1!=l.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const u=d.position.parent;if(u.is("element","codeBlock"))return;if(u.is("element","listItem")&&"function"!=typeof o&&!["numberedList","bulletedList","todoList"].includes(o))return;if(r&&!0===r.value)return;const h=u.getChild(0),g=t.model.createRangeOn(h);if(!g.containsRange(c)&&!c.end.isEqual(g.end))return;const m=n.exec(h.data.substr(0,c.end.offset));m&&t.model.enqueueChange((e=>{const n=e.createPositionAt(u,0),o=e.createPositionAt(u,m[0].length),r=new al(n,o);if(!1!==i({match:m})){e.remove(r);const n=t.model.document.selection.getFirstRange(),o=e.createRangeIn(u);!u.isEmpty||o.isEqual(n)||o.containsRange(n,!0)||e.remove(u)}r.detach(),t.model.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function t_(t,e,n,o){let i,r;n instanceof RegExp?i=n:r=n,r=r||(t=>{let e;const n=[],o=[];for(;null!==(e=i.exec(t))&&!(e&&e.length<4);){let{index:t,1:i,2:r,3:s}=e;const a=i+r+s;t+=e[0].length-a.length;const c=[t,t+i.length],l=[t+i.length+r.length,t+i.length+r.length+s.length];n.push(c),n.push(l),o.push([t+i.length,t+i.length+r.length])}return{remove:n,format:o}}),t.model.document.on("change:data",((n,i)=>{if(i.isUndo||!i.isLocal||!e.isEnabled)return;const s=t.model,a=s.document.selection;if(!a.isCollapsed)return;const c=Array.from(s.document.differ.getChanges()),l=c[0];if(1!=c.length||"insert"!==l.type||"$text"!=l.name||1!=l.length)return;const d=a.focus,u=d.parent,{text:h,range:g}=function(t,e){let n=t.start;const o=Array.from(t.getItems()).reduce(((t,o)=>!o.is("$text")&&!o.is("$textProxy")||o.getAttribute("code")?(n=e.createPositionAfter(o),""):t+o.data),"");return{text:o,range:e.createRange(n,t.end)}}(s.createRange(s.createPositionAt(u,0),d),s),m=r(h),p=e_(g.start,m.format,s),f=e_(g.start,m.remove,s);p.length&&f.length&&s.enqueueChange((e=>{if(!1!==o(e,p)){for(const t of f.reverse())e.remove(t);s.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function e_(t,e,n){return e.filter((t=>void 0!==t[0]&&void 0!==t[1])).map((e=>n.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1]))))}function n_(t,e){return(n,o)=>{if(!t.commands.get(e).isEnabled)return!1;const i=t.model.schema.getValidRanges(o,e);for(const t of i)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class o_ extends nr{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const i_="bold";class r_ extends tr{static get pluginName(){return"BoldEditing"}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:i_}),t.model.schema.setAttributeProperties(i_,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:i_,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e&&("bold"==e||Number(e)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(i_,new o_(t,i_)),t.keystrokes.set("CTRL+B",i_),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Bold text"),keystroke:"CTRL+B"}]})}}function s_({editor:t,commandName:e,plugin:n,icon:o,label:i,keystroke:r}){return s=>{const a=t.commands.get(e),c=new s(t.locale);return c.set({label:i,icon:o,keystroke:r,isToggleable:!0}),c.bind("isEnabled").to(a,"isEnabled"),n.listenTo(c,"execute",(()=>{t.execute(e),t.editing.view.focus()})),c}}const a_="bold";class c_ extends tr{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.locale.t,n=t.commands.get(a_),o=s_({editor:t,commandName:a_,plugin:this,icon:Oh.bold,label:e("Bold"),keystroke:"CTRL+B"});t.ui.componentFactory.add(a_,(()=>{const t=o(Wg);return t.set({tooltip:!0}),t.bind("isOn").to(n,"value"),t})),t.ui.componentFactory.add("menuBar:"+a_,(()=>o(Vk)))}}var l_=n(4199),d_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(l_.A,d_);l_.A.locals;const u_="italic";class h_ extends tr{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:u_}),t.model.schema.setAttributeProperties(u_,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:u_,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(u_,new o_(t,u_)),t.keystrokes.set("CTRL+I",u_),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Italic text"),keystroke:"CTRL+I"}]})}}const g_="italic";class m_ extends tr{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.commands.get(g_),n=t.locale.t,o=s_({editor:t,commandName:g_,plugin:this,icon:'',keystroke:"CTRL+I",label:n("Italic")});t.ui.componentFactory.add(g_,(()=>{const t=o(Wg);return t.set({tooltip:!0}),t.bind("isOn").to(e,"value"),t})),t.ui.componentFactory.add("menuBar:"+g_,(()=>o(Vk)))}}class p_ extends nr{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,o=e.document.selection,i=Array.from(o.getSelectedBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(r){const e=i.filter((t=>f_(t)||b_(n,t)));this._applyQuote(t,e)}else this._removeQuote(t,i.filter(f_))}))}_getValue(){const t=Gi(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!f_(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=Gi(t.getSelectedBlocks());return!!n&&b_(e,n)}_removeQuote(t,e){k_(t,e).reverse().forEach((e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)}))}_applyQuote(t,e){const n=[];k_(t,e).reverse().forEach((e=>{let o=f_(e.start);o||(o=t.createElement("blockQuote"),t.wrap(e,o)),n.push(o)})),n.reverse().reduce(((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n))}}function f_(t){return"blockQuote"==t.parent.name?t.parent:null}function k_(t,e){let n,o=0;const i=[];for(;o{const o=t.model.document.differ.getChanges();for(const t of o)if("insert"==t.type){const o=t.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return n.remove(o),!0;if(o.is("element","blockQuote")&&!e.checkChild(t.position,o))return n.unwrap(o),!0;if(o.is("element")){const t=n.createRangeIn(o);for(const o of t.getItems())if(o.is("element","blockQuote")&&!e.checkChild(n.createPositionBefore(o),o))return n.unwrap(o),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1}));const n=this.editor.editing.view.document,o=t.model.document.selection,i=t.commands.get("blockQuote");this.listenTo(n,"enter",((e,n)=>{if(!o.isCollapsed||!i.value)return;o.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((e,n)=>{if("backward"!=n.direction||!o.isCollapsed||!i.value)return;const r=o.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"})}}var A_=n(8708),__={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(A_.A,__);A_.A.locals;class C_ extends tr{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,e=t.commands.get("blockQuote");t.ui.componentFactory.add("blockQuote",(()=>{const t=this._createButton(Wg);return t.set({tooltip:!0}),t.bind("isOn").to(e,"value"),t})),t.ui.componentFactory.add("menuBar:blockQuote",(()=>this._createButton(Vk)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("blockQuote"),i=new t(e.locale),r=n.t;return i.set({label:r("Block quote"),icon:Oh.quote,isToggleable:!0}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),i}}class v_ extends tr{static get pluginName(){return"CKBoxUI"}afterInit(){const t=this.editor;if(!t.commands.get("ckbox"))return;const e=t.t,n=t.ui.componentFactory;if(n.add("ckbox",(()=>{const t=this._createButton(Wg);return t.tooltip=!0,t})),n.add("menuBar:ckbox",(()=>this._createButton(Vk))),t.plugins.has("ImageInsertUI")){const n=t.plugins.get("ImageInsertUI");n.registerIntegration({name:"assetManager",observable:()=>t.commands.get("ckbox"),buttonViewCreator:()=>{const t=this.editor.ui.componentFactory.create("ckbox");return t.icon=Oh.imageAssetManager,t.bind("label").to(n,"isImageSelected",(t=>e(t?"Replace image with file manager":"Insert image with file manager"))),t},formViewCreator:()=>{const t=this.editor.ui.componentFactory.create("ckbox");return t.icon=Oh.imageAssetManager,t.withText=!0,t.bind("label").to(n,"isImageSelected",(t=>e(t?"Replace with file manager":"Insert with file manager"))),t.on("execute",(()=>{n.dropdownView.isOpen=!1})),t}})}}_createButton(t){const e=this.editor,n=e.locale,o=new t(n),i=e.commands.get("ckbox"),r=n.t;return o.set({label:r("Open file manager"),icon:Oh.browseFiles}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),o.on("execute",(()=>{e.execute("ckbox")})),o}}var y_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],x_=t=>{let e=0;for(let n=0;n{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},D_=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},I_=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),M_=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},S_=t=>{if(!t||t.length<6)throw new M_("The blurhash string must be at least 6 characters");let e=x_(t[0]),n=Math.floor(e/9)+1,o=e%9+1;if(t.length!==4+2*o*n)throw new M_(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*o*n}`)},T_=t=>{let e=t>>8&255,n=255&t;return[E_(t>>16),E_(e),E_(n)]},B_=(t,e)=>{let n=Math.floor(t/361),o=Math.floor(t/19)%19,i=t%19;return[I_((n-9)/9,2)*e,I_((o-9)/9,2)*e,I_((i-9)/9,2)*e]},N_=(t,e,n,o)=>{S_(t),o|=1;let i=x_(t[0]),r=Math.floor(i/9)+1,s=i%9+1,a=(x_(t[1])+1)/166,c=new Array(s*r);for(let e=0;ee in t?P_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;function j_(t){const e=[];let n=0;for(const o in t){const i=parseInt(o,10);isNaN(i)||(i>n&&(n=i),e.push(`${t[o]} ${o}w`))}const o=[{srcset:e.join(","),sizes:`(max-width: ${n}px) 100vw, ${n}px`,type:"image/webp"}];return{imageFallbackUrl:t.default,imageSources:o}}const F_=32;function V_({url:t,method:e="GET",data:n,onUploadProgress:o,signal:i,authorization:r}){const s=new XMLHttpRequest;s.open(e,t.toString()),s.setRequestHeader("Authorization",r),s.setRequestHeader("CKBox-Version","CKEditor 5"),s.responseType="json";const a=()=>{s.abort()};return new Promise(((t,e)=>{i.throwIfAborted(),i.addEventListener("abort",a),s.addEventListener("loadstart",(()=>{i.addEventListener("abort",a)})),s.addEventListener("loadend",(()=>{i.removeEventListener("abort",a)})),s.addEventListener("error",(()=>{e()})),s.addEventListener("abort",(()=>{e()})),s.addEventListener("load",(()=>{const n=s.response;if(!n||n.statusCode>=400)return e(n&&n.message);t(n)})),o&&s.upload.addEventListener("progress",(t=>{o(t)})),s.send(n)}))}const H_={"image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};function U_(t,e){return n=this,o=null,i=function*(){try{const n=yield fetch(t,((t,e)=>{for(var n in e||(e={}))L_.call(e,n)&&R_(t,n,e[n]);if(O_)for(var n of O_(e))z_.call(e,n)&&R_(t,n,e[n]);return t})({method:"HEAD",cache:"force-cache"},e));return n.ok&&n.headers.get("content-type")||""}catch(t){return""}},new Promise(((t,e)=>{var r=t=>{try{a(i.next(t))}catch(t){e(t)}},s=t=>{try{a(i.throw(t))}catch(t){e(t)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,s);a((i=i.apply(n,o)).next())}));var n,o,i}var q_=Object.defineProperty,G_=Object.getOwnPropertySymbols,W_=Object.prototype.hasOwnProperty,K_=Object.prototype.propertyIsEnumerable,$_=(t,e,n)=>e in t?q_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y_=(t,e)=>{for(var n in e||(e={}))W_.call(e,n)&&$_(t,n,e[n]);if(G_)for(var n of G_(e))K_.call(e,n)&&$_(t,n,e[n]);return t};class Q_ extends nr{constructor(t){super(t),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){const t=this.editor.commands.get("insertImage"),e=this.editor.commands.get("link");return!(!t.isEnabled&&!e.isEnabled)}_prepareOptions(){const t=this.editor.config.get("ckbox");return{theme:t.theme,language:t.language,tokenUrl:t.tokenUrl,serviceOrigin:t.serviceOrigin,forceDemoLabel:t.forceDemoLabel,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:t=>this.fire("ckbox:choose",t)}}}_initListeners(){const t=this.editor,e=t.model,n=!t.config.get("ckbox.ignoreDataId");this.on("ckbox",(()=>{this.refresh()}),{priority:"low"}),this.on("ckbox:open",(()=>{this.isEnabled&&!this.value&&(this._wrapper=mt(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))})),this.on("ckbox:close",(()=>{this.value&&(this._wrapper.remove(),this._wrapper=null,t.editing.view.focus())})),this.on("ckbox:choose",((o,i)=>{if(!this.isEnabled)return;const r=t.commands.get("insertImage"),s=t.commands.get("link"),a=function({assets:t,isImageAllowed:e,isLinkAllowed:n}){return t.map((t=>function(t){const e=t.data.metadata;if(!e)return!1;return e.width&&e.height}(t)?{id:t.data.id,type:"image",attributes:Z_(t)}:{id:t.data.id,type:"link",attributes:J_(t)})).filter((t=>"image"===t.type?e:n))}({assets:i,isImageAllowed:r.isEnabled,isLinkAllowed:s.isEnabled}),c=a.length;0!==c&&(e.change((t=>{for(const e of a){const o=e===a[c-1],i=1===c;this._insertAsset(e,o,t,i),n&&(setTimeout((()=>this._chosenAssets.delete(e)),1e3),this._chosenAssets.add(e))}})),t.editing.view.focus())})),this.listenTo(t,"destroy",(()=>{this.fire("ckbox:close"),this._chosenAssets.clear()}))}_insertAsset(t,e,n,o){const i=this.editor.model.document.selection;n.removeSelectionAttribute("linkHref"),"image"===t.type?this._insertImage(t):this._insertLink(t,n,o),e||n.setSelection(i.getLastPosition())}_insertImage(t){const e=this.editor,{imageFallbackUrl:n,imageSources:o,imageTextAlternative:i,imageWidth:r,imageHeight:s,imagePlaceholder:a}=t.attributes;e.execute("insertImage",{source:Y_({src:n,sources:o,alt:i,width:r,height:s},a?{placeholder:a}:null)})}_insertLink(t,e,n){const o=this.editor,i=o.model,r=i.document.selection,{linkName:s,linkHref:a}=t.attributes;if(r.isCollapsed){const t=$i(r.getAttributes()),c=e.createText(s,t);if(!n){const t=r.getLastPosition(),n=t.parent;"paragraph"===n.name&&n.isEmpty||o.execute("insertParagraph",{position:t});const s=i.insertContent(c);return e.setSelection(s),void o.execute("link",a)}const l=i.insertContent(c);e.setSelection(l)}o.execute("link",a)}}function Z_(t){const{imageFallbackUrl:e,imageSources:n}=j_(t.data.imageUrls),{description:o,width:i,height:r,blurHash:s}=t.data.metadata,a=function(t){if(t)try{const e=`${F_}px`,n=document.createElement("canvas");n.setAttribute("width",e),n.setAttribute("height",e);const o=n.getContext("2d");if(!o)return;const i=o.createImageData(F_,F_),r=N_(t,F_,F_);return i.data.set(r),o.putImageData(i,0,0),n.toDataURL()}catch(t){return}}(s);return Y_({imageFallbackUrl:e,imageSources:n,imageTextAlternative:o||"",imageWidth:i,imageHeight:r},a?{imagePlaceholder:a}:null)}function J_(t){return{linkName:t.data.name,linkHref:X_(t)}}function X_(t){const e=new URL(t.data.url);return e.searchParams.set("download","true"),e.toString()}var tC=(t,e,n)=>new Promise(((o,i)=>{var r=t=>{try{a(n.next(t))}catch(t){i(t)}},s=t=>{try{a(n.throw(t))}catch(t){i(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((n=n.apply(t,e)).next())}));class eC extends tr{static get pluginName(){return"CKBoxUtils"}static get requires(){return["CloudServices"]}init(){return tC(this,null,(function*(){const t=this.editor,e=!!t.config.get("ckbox"),n=!!window.CKBox;if(!e&&!n)return;t.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",defaultUploadCategories:null,ignoreDataId:!1,language:t.locale.uiLanguage,theme:"lark",tokenUrl:t.config.get("cloudServices.tokenUrl")});const o=t.plugins.get("CloudServices"),i=t.config.get("cloudServices.tokenUrl"),r=t.config.get("ckbox.tokenUrl");if(!r)throw new k("ckbox-plugin-missing-token-url",this);this._token=r==i?o.token:yield o.registerTokenUrl(r)}))}getToken(){return this._token}getWorkspaceId(){const t=(0,this.editor.t)("Cannot access default workspace."),e=this.editor.config.get("ckbox.defaultUploadWorkspaceId"),n=function(t,e){const[,n]=t.value.split("."),o=JSON.parse(atob(n)),i=o.auth&&o.auth.ckbox&&o.auth.ckbox.workspaces||[o.aud];return e?"superadmin"==(o.auth&&o.auth.ckbox&&o.auth.ckbox.role)||i.includes(e)?e:null:i[0]}(this._token,e);if(null==n)throw w("ckbox-access-default-workspace-error"),t;return n}getCategoryIdForFile(t,e){return tC(this,null,(function*(){const n=(0,this.editor.t)("Cannot determine a category for the uploaded file."),o=this.editor.config.get("ckbox.defaultUploadCategories"),i=this._getAvailableCategories(e),r="string"==typeof t?(s=yield U_(t,e),H_[s]):function(t){const e=t.name,n=new RegExp("\\.(?[^.]+)$");return e.match(n).groups.ext.toLowerCase()}(t);var s;const a=yield i;if(!a)throw n;if(o){const t=Object.keys(o).find((t=>o[t].find((t=>t.toLowerCase()==r))));if(t){const e=a.find((e=>e.id===t||e.name===t));if(!e)throw n;return e.id}}const c=a.find((t=>t.extensions.find((t=>t.toLowerCase()==r))));if(!c)throw n;return c.id}))}_getAvailableCategories(t){return tC(this,null,(function*(){const e=this.editor,n=this._token,{signal:o}=t,i=e.config.get("ckbox.serviceOrigin"),r=this.getWorkspaceId();try{const t=[];let e,n=0;do{const o=yield s(n);t.push(...o.items),e=o.totalCount-(n+50),n+=50}while(e>0);return t}catch(t){return o.throwIfAborted(),void w("ckbox-fetch-category-http-error")}function s(t){const e=new URL("categories",i);return e.searchParams.set("limit",50..toString()),e.searchParams.set("offset",t.toString()),e.searchParams.set("workspaceId",r),V_({url:e,signal:o,authorization:n.value})}}))}}var nC=(t,e,n)=>new Promise(((o,i)=>{var r=t=>{try{a(n.next(t))}catch(t){i(t)}},s=t=>{try{a(n.throw(t))}catch(t){i(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((n=n.apply(t,e)).next())}));class oC extends tr{static get requires(){return["ImageUploadEditing","ImageUploadProgress",KA,rC]}static get pluginName(){return"CKBoxUploadAdapter"}afterInit(){return nC(this,null,(function*(){const t=this.editor,e=!!t.config.get("ckbox"),n=!!window.CKBox;if(!e&&!n)return;const o=t.plugins.get(KA),i=t.plugins.get(eC);o.createUploadAdapter=e=>new iC(e,t,i);const r=!t.config.get("ckbox.ignoreDataId"),s=t.plugins.get("ImageUploadEditing");r&&s.on("uploadComplete",((e,{imageElement:n,data:o})=>{t.model.change((t=>{t.setAttribute("ckboxImageId",o.ckboxImageId,n)}))}))}))}}class iC{constructor(t,e,n){this.loader=t,this.token=n.getToken(),this.ckboxUtils=n,this.editor=e,this.controller=new AbortController,this.serviceOrigin=e.config.get("ckbox.serviceOrigin")}upload(){return nC(this,null,(function*(){const t=this.ckboxUtils,e=this.editor.t,n=yield this.loader.file,o=yield t.getCategoryIdForFile(n,{signal:this.controller.signal}),i=new URL("assets",this.serviceOrigin),r=new FormData;i.searchParams.set("workspaceId",t.getWorkspaceId()),r.append("categoryId",o),r.append("file",n);return V_({method:"POST",url:i,data:r,onUploadProgress:t=>{t.lengthComputable&&(this.loader.uploadTotal=t.total,this.loader.uploaded=t.loaded)},signal:this.controller.signal,authorization:this.token.value}).then((t=>nC(this,null,(function*(){const e=j_(t.imageUrls);return{ckboxImageId:t.id,default:e.imageFallbackUrl,sources:e.imageSources}})))).catch((()=>{const t=e("Cannot upload file:")+` ${n.name}.`;return Promise.reject(t)}))}))}abort(){this.controller.abort()}}class rC extends tr{static get pluginName(){return"CKBoxEditing"}static get requires(){return["LinkEditing","PictureEditing",oC,eC]}init(){const t=this.editor;this._shouldBeInitialised()&&(this._checkImagePlugins(),lC()&&t.commands.add("ckbox",new Q_(t)))}afterInit(){const t=this.editor;this._shouldBeInitialised()&&(t.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()))}_shouldBeInitialised(){return!!this.editor.config.get("ckbox")||lC()}_checkImagePlugins(){const t=this.editor;t.plugins.has("ImageBlockEditing")||t.plugins.has("ImageInlineEditing")||w("ckbox-plugin-image-feature-missing",t)}_initSchema(){const t=this.editor.model.schema;t.extend("$text",{allowAttributes:"ckboxLinkId"}),t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),t.addAttributeCheck(((t,e)=>{if(!!!t.last.getAttribute("linkHref")&&"ckboxLinkId"===e)return!1}))}_initConversion(){const t=this.editor;t.conversion.for("downcast").add((t=>{t.on("attribute:ckboxLinkId:imageBlock",((t,e,n)=>{const{writer:o,mapper:i,consumable:r}=n;if(!r.consume(e.item,t.name))return;const s=[...i.toViewElement(e.item).getChildren()].find((t=>"a"===t.name));s&&(e.item.hasAttribute("ckboxLinkId")?o.setAttribute("data-ckbox-resource-id",e.item.getAttribute("ckboxLinkId"),s):o.removeAttribute("data-ckbox-resource-id",s))}),{priority:"low"}),t.on("attribute:ckboxLinkId",((t,e,n)=>{const{writer:o,mapper:i,consumable:r}=n;if(r.consume(e.item,t.name)){if(e.attributeOldValue){const t=aC(o,e.attributeOldValue);o.unwrap(i.toViewRange(e.range),t)}if(e.attributeNewValue){const t=aC(o,e.attributeNewValue);if(e.item.is("selection")){const e=o.document.selection;o.wrap(e.getFirstRange(),t)}else o.wrap(i.toViewRange(e.range),t)}}}),{priority:"low"})})),t.conversion.for("upcast").add((t=>{t.on("element:a",((t,e,n)=>{const{writer:o,consumable:i}=n;if(!e.viewItem.getAttribute("href"))return;if(!i.consume(e.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const r=e.viewItem.getAttribute("data-ckbox-resource-id");if(r)if(e.modelRange)for(let t of e.modelRange.getItems())t.is("$textProxy")&&(t=t.textNode),cC(t)&&o.setAttribute("ckboxLinkId",r,t);else{const t=e.modelCursor.nodeBefore||e.modelCursor.parent;o.setAttribute("ckboxLinkId",r,t)}}),{priority:"low"})})),t.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),t.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:t=>t.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}});const e=t.commands.get("replaceImageSource");e&&this.listenTo(e,"cleanupImage",((t,[e,n])=>{e.removeAttribute("ckboxImageId",n)}))}_initFixers(){const t=this.editor,e=t.model,n=e.document.selection;e.document.registerPostFixer(function(t){return e=>{let n=!1;const o=t.model,i=t.commands.get("ckbox");if(!i)return n;for(const t of o.document.differ.getChanges()){if("insert"!==t.type&&"attribute"!==t.type)continue;const o="insert"===t.type?new Rc(t.position,t.position.getShiftedBy(t.length)):t.range,r="attribute"===t.type&&"linkHref"===t.attributeKey&&null===t.attributeNewValue;for(const t of o.getItems()){if(r&&t.hasAttribute("ckboxLinkId")){e.removeAttribute("ckboxLinkId",t),n=!0;continue}const o=sC(t,i._chosenAssets);for(const i of o){const o="image"===i.type?"ckboxImageId":"ckboxLinkId";i.id!==t.getAttribute(o)&&(e.setAttribute(o,i.id,t),n=!0)}}}return n}}(t)),e.document.registerPostFixer(function(t){return e=>!(t.hasAttribute("linkHref")||!t.hasAttribute("ckboxLinkId"))&&(e.removeSelectionAttribute("ckboxLinkId"),!0)}(n))}}function sC(t,e){const n=t.is("element","imageInline")||t.is("element","imageBlock"),o=t.hasAttribute("linkHref");return[...e].filter((e=>"image"===e.type&&n?e.attributes.imageFallbackUrl===t.getAttribute("src"):"link"===e.type&&o?e.attributes.linkHref===t.getAttribute("linkHref"):void 0))}function aC(t,e){const n=t.createAttributeElement("a",{"data-ckbox-resource-id":e},{priority:5});return t.setCustomProperty("link",!0,n),n}function cC(t){return!!t.is("$text")||!(!t.is("element","imageInline")&&!t.is("element","imageBlock"))}function lC(){return!!window.CKBox}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var dC=n(1866),uC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(dC.A,uC);dC.A.locals;class hC extends tr{static get pluginName(){return"CKFinderUI"}init(){const t=this.editor,e=t.ui.componentFactory,n=t.t;if(e.add("ckfinder",(t=>{const e=this._createButton(Wg),n=t.t;return e.set({label:n("Insert image or file"),tooltip:!0}),e})),e.add("menuBar:ckfinder",(t=>{const e=this._createButton(Vk),n=t.t;return e.label=n("Image or file"),e})),t.plugins.has("ImageInsertUI")){const e=t.plugins.get("ImageInsertUI");e.registerIntegration({name:"assetManager",observable:()=>t.commands.get("ckfinder"),buttonViewCreator:()=>{const t=this.editor.ui.componentFactory.create("ckfinder");return t.icon=Oh.imageAssetManager,t.bind("label").to(e,"isImageSelected",(t=>n(t?"Replace image with file manager":"Insert image with file manager"))),t},formViewCreator:()=>{const t=this.editor.ui.componentFactory.create("ckfinder");return t.icon=Oh.imageAssetManager,t.withText=!0,t.bind("label").to(e,"isImageSelected",(t=>n(t?"Replace with file manager":"Insert with file manager"))),t.on("execute",(()=>{e.dropdownView.isOpen=!1})),t}})}}_createButton(t){const e=this.editor,n=new t(e.locale),o=e.commands.get("ckfinder");return n.icon=Oh.browseFiles,n.bind("isEnabled").to(o),n.on("execute",(()=>{e.execute("ckfinder"),e.editing.view.focus()})),n}}class gC extends nr{constructor(t){super(t),this.affectsData=!1,this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",(()=>this.refresh()),{priority:"low"})}refresh(){const t=this.editor.commands.get("insertImage"),e=this.editor.commands.get("link");this.isEnabled=t.isEnabled||e.isEnabled}execute(){const t=this.editor,e=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=e&&"modal"!=e)throw new k("ckfinder-unknown-openermethod",t);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const o=n.onInit;n.language||(n.language=t.locale.uiLanguage),n.onInit=e=>{o&&o(e),e.on("files:choose",(n=>{const o=n.data.files.toArray(),i=o.filter((t=>!t.isImage())),r=o.filter((t=>t.isImage()));for(const e of i)t.execute("link",e.getUrl());const s=[];for(const t of r){const n=t.getUrl();s.push(n||e.request("file:getProxyUrl",{file:t}))}s.length&&mC(t,s)})),e.on("file:choose:resizedImage",(e=>{const n=e.data.resizedUrl;if(n)mC(t,[n]);else{const e=t.plugins.get("Notification"),n=t.locale.t;e.showWarning(n("Could not obtain resized image URL."),{title:n("Selecting resized image failed"),namespace:"ckfinder"})}}))},window.CKFinder[e](n)}}function mC(t,e){if(t.commands.get("insertImage").isEnabled)t.execute("insertImage",{source:e});else{const e=t.plugins.get("Notification"),n=t.locale.t;e.showWarning(n("Could not insert image at the current position."),{title:n("Inserting image failed"),namespace:"ckfinder"})}}class pC extends tr{static get pluginName(){return"CKFinderEditing"}static get requires(){return[jf,"LinkEditing"]}init(){const t=this.editor;if(!t.plugins.has("ImageBlockEditing")&&!t.plugins.has("ImageInlineEditing"))throw new k("ckfinder-missing-image-plugin",t);t.commands.add("ckfinder",new gC(t))}}class fC extends tr{static get pluginName(){return"CloudServicesUploadAdapter"}static get requires(){return["CloudServices",KA]}init(){const t=this.editor,e=t.plugins.get("CloudServices"),n=e.token,o=e.uploadUrl;if(!n)return;const i=t.plugins.get("CloudServicesCore");this._uploadGateway=i.createUploadGateway(n,o),t.plugins.get(KA).createUploadAdapter=t=>new kC(this._uploadGateway,t)}}class kC{constructor(t,e){this.uploadGateway=t,this.loader=e}upload(){return this.loader.file.then((t=>(this.fileUploader=this.uploadGateway.upload(t),this.fileUploader.on("progress",((t,e)=>{this.loader.uploadTotal=e.total,this.loader.uploaded=e.uploaded})),this.fileUploader.send())))}abort(){this.fileUploader.abort()}}class bC extends nr{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}refresh(){const t=this.editor.model,e=Gi(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&wC(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document,o=t.selection||n.selection;e.canEditAt(o)&&e.change((t=>{const n=o.getSelectedBlocks();for(const o of n)!o.is("element","paragraph")&&wC(o,e.schema)&&t.rename(o,"paragraph")}))}}function wC(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class AC extends nr{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}execute(t){const e=this.editor.model,n=t.attributes;let o=t.position;e.canEditAt(o)&&e.change((t=>{if(o=this._findPositionToInsertParagraph(o,t),!o)return;const i=t.createElement("paragraph");n&&e.schema.setAllowedAttributes(i,n,t),e.insertContent(i,o),t.setSelection(i,"in")}))}_findPositionToInsertParagraph(t,e){const n=this.editor.model;if(n.schema.checkChild(t,"paragraph"))return t;const o=n.schema.findAllowedParent(t,"paragraph");if(!o)return null;const i=t.parent,r=n.schema.checkChild(i,"$text");return i.isEmpty||r&&t.isAtEnd?n.createPositionAfter(i):!i.isEmpty&&r&&t.isAtStart?n.createPositionBefore(i):e.split(t,o).position}}const _C=class extends tr{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new bC(t)),t.commands.add("insertParagraph",new AC(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>_C.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}};let CC=_C;CC.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class vC extends nr{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=Gi(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((e=>yC(t,e,this.editor.model.schema)))}execute(t){const e=this.editor.model,n=e.document,o=t.value;e.change((t=>{const i=Array.from(n.selection.getSelectedBlocks()).filter((t=>yC(t,o,e.schema)));for(const e of i)e.is("element",o)||t.rename(e,o)}))}}function yC(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const xC="paragraph";class EC extends tr{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.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[CC]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const o of e)"paragraph"!==o.model&&(t.model.schema.register(o.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(o),n.push(o.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new vC(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",((e,o)=>{const i=t.model.document.selection.getFirstPosition().parent;n.some((t=>i.is("element",t.model)))&&!i.is("element",xC)&&0===i.childCount&&o.writer.rename(i,xC)}))}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:m.low+1})}}var DC=n(6269),IC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(DC.A,IC);DC.A.locals;class MC extends tr{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,e=t.t,n=function(t){const e=t.t,n={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return t.config.get("heading.options").map((t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t}))}(t),o=e("Choose heading"),i=e("Heading");t.ui.componentFactory.add("heading",(e=>{const r={},s=new qi,a=t.commands.get("heading"),c=t.commands.get("paragraph"),l=[a];for(const t of n){const e={type:"button",model:new Ff({label:t.title,class:t.class,role:"menuitemradio",withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(c,"value"),e.model.set("commandName","paragraph"),l.push(c)):(e.model.bind("isOn").to(a,"value",(e=>e===t.model)),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),r[t.model]=t.title}const d=Xm(e);return np(d,s,{ariaLabel:i,role:"menu"}),d.buttonView.set({ariaLabel:i,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:i}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(l,"isEnabled",((...t)=>t.some((t=>t)))),d.buttonView.bind("label").to(a,"value",c,"value",((t,e)=>{const n=e?"paragraph":t;return"boolean"==typeof n?o:r[n]?r[n]:o})),d.buttonView.bind("ariaLabel").to(a,"value",c,"value",((t,e)=>{const n=e?"paragraph":t;return"boolean"==typeof n?i:r[n]?`${r[n]}, ${i}`:i})),this.listenTo(d,"execute",(e=>{const{commandName:n,commandValue:o}=e.source;t.execute(n,o?{value:o}:void 0),t.editing.view.focus()})),d})),t.ui.componentFactory.add("menuBar:heading",(o=>{const i=new zk(o),r=t.commands.get("heading"),s=t.commands.get("paragraph"),a=[r],c=new Rk(o);i.set({class:"ck-heading-dropdown"}),c.set({ariaLabel:e("Heading"),role:"menu"}),i.buttonView.set({label:e("Heading")}),i.panelView.children.add(c);for(const e of n){const n=new Ik(o,i),l=new Vk(o);n.children.add(l),c.items.add(n),l.set({label:e.title,role:"menuitemradio",class:e.class}),l.bind("ariaChecked").to(l,"isOn"),l.delegate("execute").to(i),l.on("execute",(()=>{const n="paragraph"===e.model?"paragraph":"heading";t.execute(n,{value:e.model}),t.editing.view.focus()})),"paragraph"===e.model?(l.bind("isOn").to(s,"value"),a.push(s)):l.bind("isOn").to(r,"value",(t=>t===e.model))}return i.bind("isEnabled").toMany(a,"isEnabled",((...t)=>t.some((t=>t)))),i}))}}function SC(t){return t.createContainerElement("figure",{class:"image"},[t.createEmptyElement("img"),t.createSlot("children")])}function TC(t,e){const n=t.plugins.get("ImageUtils"),o=t.plugins.has("ImageInlineEditing")&&t.plugins.has("ImageBlockEditing");return t=>{if(!n.isInlineImageView(t))return null;if(!o)return i(t);return("block"==t.getStyle("display")||t.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==e?null:i(t)};function i(t){const e={name:!0};return t.hasAttribute("src")&&(e.attributes=["src"]),e}}function BC(t,e){const n=Gi(e.getSelectedBlocks());return!n||t.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}function NC(t){return t&&t.endsWith("px")?parseInt(t):null}function PC(t){const e=NC(t.getStyle("width")),n=NC(t.getStyle("height"));return!(!e||!n)}var OC=Object.defineProperty,LC=Object.getOwnPropertySymbols,zC=Object.prototype.hasOwnProperty,RC=Object.prototype.propertyIsEnumerable,jC=(t,e,n)=>e in t?OC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,FC=(t,e)=>{for(var n in e||(e={}))zC.call(e,n)&&jC(t,n,e[n]);if(LC)for(var n of LC(e))RC.call(e,n)&&jC(t,n,e[n]);return t};const VC=/^(image|image-inline)$/;class HC extends tr{constructor(){super(...arguments),this._domEmitter=new(Do())}static get pluginName(){return"ImageUtils"}isImage(t){return this.isInlineImage(t)||this.isBlockImage(t)}isInlineImageView(t){return!!t&&t.is("element","img")}isBlockImageView(t){return!!t&&t.is("element","figure")&&t.hasClass("image")}insertImage(t={},e=null,n=null,o={}){const i=this.editor,r=i.model,s=r.document.selection,a=UC(i,e||s,n);t=FC(FC({},Object.fromEntries(s.getAttributes())),t);for(const e in t)r.schema.checkAttribute(a,e)||delete t[e];return r.change((n=>{const{setImageSizes:i=!0}=o,s=n.createElement(a,t);return r.insertObject(s,e,null,{setSelection:"on",findOptimalPosition:e||"imageInline"==a?void 0:"auto"}),s.parent?(i&&this.setImageNaturalSizeAttributes(s),s):null}))}setImageNaturalSizeAttributes(t){const e=t.getAttribute("src");e&&(t.getAttribute("width")||t.getAttribute("height")||this.editor.model.change((n=>{const o=new To.window.Image;this._domEmitter.listenTo(o,"load",(()=>{t.getAttribute("width")||t.getAttribute("height")||this.editor.model.enqueueChange(n.batch,(e=>{e.setAttribute("width",o.naturalWidth,t),e.setAttribute("height",o.naturalHeight,t)})),this._domEmitter.stopListening(o,"load")})),o.src=e})))}getClosestSelectedImageWidget(t){const e=t.getFirstPosition();if(!e)return null;const n=t.getSelectedElement();if(n&&this.isImageWidget(n))return n;let o=e.parent;for(;o;){if(o.is("element")&&this.isImageWidget(o))return o;o=o.parent}return null}getClosestSelectedImageElement(t){const e=t.getSelectedElement();return this.isImage(e)?e:t.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(t){return t.findAncestor({classes:VC})}isImageAllowed(){const t=this.editor.model.document.selection;return function(t,e){const n=UC(t,e,null);if("imageBlock"==n){const n=function(t,e){const n=Pw(t,e),o=n.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(e,t.model);if(t.model.schema.checkChild(n,"imageBlock"))return!0}else if(t.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}(this.editor,t)&&function(t){return[...t.focus.getAncestors()].every((t=>!t.is("element","imageBlock")))}(t)}toImageWidget(t,e,n){e.setCustomProperty("image",!0,t);return Mw(t,e,{label:()=>{const e=this.findViewImgElement(t).getAttribute("alt");return e?`${e} ${n}`:n}})}isImageWidget(t){return!!t.getCustomProperty("image")&&Iw(t)}isBlockImage(t){return!!t&&t.is("element","imageBlock")}isInlineImage(t){return!!t&&t.is("element","imageInline")}findViewImgElement(t){if(this.isInlineImageView(t))return t;const e=this.editor.editing.view;for(const{item:n}of e.createRangeIn(t))if(this.isInlineImageView(n))return n}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function UC(t,e,n){const o=t.model.schema,i=t.config.get("image.insert.type");return t.plugins.has("ImageBlockEditing")?t.plugins.has("ImageInlineEditing")?n||("inline"===i?"imageInline":"auto"!==i?"imageBlock":e.is("selection")?BC(o,e):o.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;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 qC extends nr{refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o=e.model,i=n.getClosestSelectedImageElement(o.document.selection);o.change((e=>{e.setAttribute("alt",t.newValue,i)}))}}class GC extends tr{static get requires(){return[HC]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new qC(this.editor))}}var WC=n(4062),KC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(WC.A,KC);WC.A.locals;var $C=n(2722),YC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()($C.A,YC);$C.A.locals;class QC extends Ig{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new Wi,this.keystrokes=new Ki,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("Save"),Oh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("Cancel"),Oh.cancel,"ck-button-cancel","cancel"),this._focusables=new ig,this._focusCycler=new Am({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),ng({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,e,n,o){const i=new Wg(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createLabeledInputView(){const t=this.locale.t,e=new sm(this.locale,sp);return e.label=t("Text alternative"),e}}function ZC(t){const e=t.editing.view,n=Zp.defaultPositions,o=t.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(e.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class JC extends tr{static get requires(){return[Wf]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",(n=>{const o=t.commands.get("imageTextAlternative"),i=new Wg(n);return i.set({label:e("Change image text alternative"),icon:Oh.textAlternative,tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),i.bind("isOn").to(o,"value",(t=>!!t)),this.listenTo(i,"execute",(()=>{this._showForm()})),i}))}_createForm(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(eg(QC))(t.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{t.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",((t,e)=>{this._hideForm(!0),e()})),this.listenTo(t.ui,"update",(()=>{n.getClosestSelectedImageWidget(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(t.plugins.get("ImageUtils").getClosestSelectedImageWidget(t.editing.view.document.selection)){const n=ZC(t);e.updatePosition(n)}}(t):this._hideForm(!0)})),tg({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:ZC(t)}),n.fieldView.value=n.fieldView.element.value=e.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&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 XC extends tr{static get requires(){return[GC,JC]}static get pluginName(){return"ImageTextAlternative"}}function tv(t,e){const n=(e,n,o)=>{if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);null===n.attributeNewValue?(i.removeAttribute("srcset",s),i.removeAttribute("sizes",s)):n.attributeNewValue&&(i.setAttribute("srcset",n.attributeNewValue,s),i.setAttribute("sizes","100vw",s))};return t=>{t.on(`attribute:srcset:${e}`,n)}}function ev(t,e,n){const o=(e,n,o)=>{if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);i.setAttribute(n.attributeKey,n.attributeNewValue||"",s)};return t=>{t.on(`attribute:${n}:${e}`,o)}}class nv extends Ea{observe(t){this.listenTo(t,"load",((t,e)=>{const n=e.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(e)}),{useCapture:!0})}stopObserving(t){this.stopListening(t)}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}}var ov=Object.defineProperty,iv=Object.getOwnPropertySymbols,rv=Object.prototype.hasOwnProperty,sv=Object.prototype.propertyIsEnumerable,av=(t,e,n)=>e in t?ov(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cv=(t,e)=>{for(var n in e||(e={}))rv.call(e,n)&&av(t,n,e[n]);if(iv)for(var n of iv(e))sv.call(e,n)&&av(t,n,e[n]);return t};class lv extends nr{constructor(t){super(t);const e=t.config.get("image.insert.type");t.plugins.has("ImageBlockEditing")||"block"===e&&b("image-block-plugin-required"),t.plugins.has("ImageInlineEditing")||"inline"===e&&b("image-inline-plugin-required")}refresh(){const t=this.editor.plugins.get("ImageUtils");this.isEnabled=t.isImageAllowed()}execute(t){const e=wi(t.source),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if("string"==typeof t&&(t={src:t}),e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);o.insertImage(cv(cv({},t),i),e)}else o.insertImage(cv(cv({},t),i))}))}}class dv extends nr{constructor(t){super(t),this.decorate("cleanupImage")}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(e),this.value=this.isEnabled?e.getAttribute("src"):null}execute(t){const e=this.editor.model.document.selection.getSelectedElement(),n=this.editor.plugins.get("ImageUtils");this.editor.model.change((o=>{o.setAttribute("src",t.source,e),this.cleanupImage(o,e),n.setImageNaturalSizeAttributes(e)}))}cleanupImage(t,e){t.removeAttribute("srcset",e),t.removeAttribute("sizes",e),t.removeAttribute("sources",e),t.removeAttribute("width",e),t.removeAttribute("height",e),t.removeAttribute("alt",e)}}class uv extends tr{static get requires(){return[HC]}static get pluginName(){return"ImageEditing"}init(){const t=this.editor,e=t.conversion;t.editing.view.addObserver(nv),e.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const n=new lv(t),o=new dv(t);t.commands.add("insertImage",n),t.commands.add("replaceImageSource",o),t.commands.add("imageInsert",n)}}class hv extends tr{static get requires(){return[HC]}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(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o="imageBlock"===t?"figure":"img";function i(e,o,i,r){e.on(`attribute:${o}:${t}`,((e,o,s)=>{if(!s.consumable.consume(o.item,e.name))return;const a=s.writer,c=s.mapper.toViewElement(o.item),l=n.findViewImgElement(c);if(null!==o.attributeNewValue?a.setAttribute(i,o.attributeNewValue,l):a.removeAttribute(i,l),o.item.hasAttribute("sources"))return;const d=o.item.hasAttribute("resizedWidth");if("imageInline"===t&&!d&&!r)return;const u=o.item.getAttribute("width"),h=o.item.getAttribute("height");u&&h&&a.setStyle("aspect-ratio",`${u}/${h}`,l)}))}e.conversion.for("upcast").attributeToAttribute({view:{name:o,styles:{width:/.+/}},model:{key:"width",value:t=>PC(t)?NC(t.getStyle("width")):null}}).attributeToAttribute({view:{name:o,key:"width"},model:"width"}).attributeToAttribute({view:{name:o,styles:{height:/.+/}},model:{key:"height",value:t=>PC(t)?NC(t.getStyle("height")):null}}).attributeToAttribute({view:{name:o,key:"height"},model:"height"}),e.conversion.for("editingDowncast").add((t=>{i(t,"width","width",!0),i(t,"height","height",!0)})),e.conversion.for("dataDowncast").add((t=>{i(t,"width","width",!1),i(t,"height","height",!1)}))}}class gv extends nr{constructor(t,e){super(t),this._modelElementName=e}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=t.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=t.isInlineImage(e):this.isEnabled=t.isBlockImage(e)}execute(t={}){const e=this.editor,n=this.editor.model,o=e.plugins.get("ImageUtils"),i=o.getClosestSelectedImageElement(n.document.selection),r=Object.fromEntries(i.getAttributes());return r.src||r.uploadId?n.change((e=>{const{setImageSizes:s=!0}=t,a=Array.from(n.markers).filter((t=>t.getRange().containsItem(i))),c=o.insertImage(r,n.createSelection(i,"on"),this._modelElementName,{setImageSizes:s});if(!c)return null;const l=e.createRangeOn(c);for(const t of a){const n=t.getRange(),o="$graveyard"!=n.root.rootName?n.getJoined(l,!0):l;e.updateMarker(t,{range:o})}return{oldElement:i,newElement:c}})):null}}var mv=n(7378),pv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(mv.A,pv);mv.A.locals;class fv extends tr{static get requires(){return[HC]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const t=this.editor.model.schema;t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["placeholder"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const t=this.editor,e=t.conversion,n=t.plugins.get("ImageUtils");e.for("editingDowncast").add((t=>{t.on("attribute:placeholder",((t,e,o)=>{if(!o.consumable.test(e.item,t.name))return;if(!e.item.is("element","imageBlock")&&!e.item.is("element","imageInline"))return;o.consumable.consume(e.item,t.name);const i=o.writer,r=o.mapper.toViewElement(e.item),s=n.findViewImgElement(r);e.attributeNewValue?(i.addClass("image_placeholder",s),i.setStyle("background-image",`url(${e.attributeNewValue})`,s),i.setCustomProperty("editingPipeline:doNotReuseOnce",!0,s)):(i.removeClass("image_placeholder",s),i.removeStyle("background-image",s))}))}))}_setupLoadListener(){const t=this.editor,e=t.model,n=t.editing,o=n.view,i=t.plugins.get("ImageUtils");o.addObserver(nv),this.listenTo(o.document,"imageLoaded",((t,r)=>{const s=o.domConverter.mapDomToView(r.target);if(!s)return;const a=i.getImageWidgetFromImageView(s);if(!a)return;const c=n.mapper.toModelElement(a);c&&c.hasAttribute("placeholder")&&e.enqueueChange({isUndoable:!1},(t=>{t.removeAttribute("placeholder",c)}))}))}}class kv extends tr{static get requires(){return[uv,hv,HC,fv,Tb]}static get pluginName(){return"ImageBlockEditing"}init(){const t=this.editor;t.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),t.plugins.has("ImageInlineEditing")&&(t.commands.add("imageTypeBlock",new gv(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:e})=>SC(e)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:n})=>o.toImageWidget(SC(n),n,e("image widget"))}),n.for("downcast").add(ev(o,"imageBlock","src")).add(ev(o,"imageBlock","alt")).add(tv(o,"imageBlock")),n.for("upcast").elementToElement({view:TC(t,"imageBlock"),model:(t,{writer:e})=>e.createElement("imageBlock",t.hasAttribute("src")?{src:t.getAttribute("src")}:void 0)}).add(function(t){const e=(e,n,o)=>{if(!o.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const i=t.findViewImgElement(n.viewItem);if(!i||!o.consumable.test(i,{name:!0}))return;o.consumable.consume(n.viewItem,{name:!0,classes:"image"});const r=Gi(o.convertItem(i,n.modelCursor).modelRange.getItems());r?(o.convertChildren(n.viewItem,r),o.updateConversionResult(r,n)):o.consumable.revert(n.viewItem,{name:!0,classes:"image"})};return t=>{t.on("element:figure",e)}}(o))}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils"),i=t.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isInlineImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const c=e.createSelection(a);if("imageBlock"===BC(e.schema,c)){const t=new kh(n.document),e=s.map((e=>t.createElement("figure",{class:"image"},e)));r.content=t.createDocumentFragment(e)}})),this.listenTo(i,"contentInsertion",((t,n)=>{"paste"===n.method&&e.change((t=>{const e=t.createRangeIn(n.content);for(const t of e.getItems())t.is("element","imageBlock")&&o.setImageNaturalSizeAttributes(t)}))}))}}var bv=n(3350),wv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(bv.A,wv);bv.A.locals;class Av extends Ig{constructor(t,e=[]){super(t),this.focusTracker=new Wi,this.keystrokes=new Ki,this._focusables=new ig,this.children=this.createCollection(),this._focusCycler=new Am({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const t of e)this.children.add(t),this._focusables.add(t),t instanceof em&&this._focusables.addMany(t.children);if(this._focusables.length>1)for(const t of this._focusables)_v(t)&&(t.focusCycler.on("forwardCycle",(t=>{this._focusCycler.focusNext(),t.stop()})),t.focusCycler.on("backwardCycle",(t=>{this._focusCycler.focusPrevious(),t.stop()})));this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),ng({view:this});for(const t of this._focusables)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}function _v(t){return"focusCycler"in t}class Cv extends tr{constructor(t){super(t),this._integrations=new Map,t.config.define("image.insert.integrations",["upload","assetManager","url"])}static get pluginName(){return"ImageInsertUI"}static get requires(){return[HC]}init(){const t=this.editor,e=t.model.document.selection,n=t.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(t.model.document,"change",(()=>{this.isImageSelected=n.isImage(e.getSelectedElement())}));const o=t=>this._createToolbarComponent(t);t.ui.componentFactory.add("insertImage",o),t.ui.componentFactory.add("imageInsert",o)}registerIntegration({name:t,observable:e,buttonViewCreator:n,formViewCreator:o,requiresForm:i}){this._integrations.has(t)&&b("image-insert-integration-exists",{name:t}),this._integrations.set(t,{observable:e,buttonViewCreator:n,formViewCreator:o,requiresForm:!!i})}_createToolbarComponent(t){const e=this.editor,n=t.t,o=this._prepareIntegrations();if(!o.length)return null;let i;const r=o[0];if(1==o.length){if(!r.requiresForm)return r.buttonViewCreator(!0);i=r.buttonViewCreator(!0)}else{const e=r.buttonViewCreator(!1);i=new $m(t,e),i.tooltip=!0,i.bind("label").to(this,"isImageSelected",(t=>n(t?"Replace image":"Insert image")))}const s=this.dropdownView=Xm(t,i),a=o.map((({observable:t})=>"function"==typeof t?t():t));return s.bind("isEnabled").toMany(a,"isEnabled",((...t)=>t.some((t=>t)))),s.once("change:isOpen",(()=>{const t=o.map((({formViewCreator:t})=>t(1==o.length))),n=new Av(e.locale,t);s.panelView.children.add(n)})),s}_prepareIntegrations(){const t=this.editor.config.get("image.insert.integrations"),e=[];if(!t.length)return b("image-insert-integrations-not-specified"),e;for(const n of t)this._integrations.has(n)?e.push(this._integrations.get(n)):["upload","assetManager","url"].includes(n)||b("image-insert-unknown-integration",{item:n});return e.length||b("image-insert-integrations-not-registered"),e}}var vv=n(265),yv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(vv.A,yv);vv.A.locals;class xv extends tr{static get requires(){return[kv,Qw,XC,Cv]}static get pluginName(){return"ImageBlock"}}class Ev extends tr{static get requires(){return[uv,hv,HC,fv,Tb]}static get pluginName(){return"ImageInlineEditing"}init(){const t=this.editor,e=t.model.schema;e.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),e.addChildCheck(((t,e)=>{if(t.endsWith("caption")&&"imageInline"===e.name)return!1})),this._setupConversion(),t.plugins.has("ImageBlockEditing")&&(t.commands.add("imageTypeInline",new gv(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(t,{writer:e})=>e.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(t,{writer:n})=>o.toImageWidget(function(t){return t.createContainerElement("span",{class:"image-inline"},t.createEmptyElement("img"))}(n),n,e("image widget"))}),n.for("downcast").add(ev(o,"imageInline","src")).add(ev(o,"imageInline","alt")).add(tv(o,"imageInline")),n.for("upcast").elementToElement({view:TC(t,"imageInline"),model:(t,{writer:e})=>e.createElement("imageInline",t.hasAttribute("src")?{src:t.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils"),i=t.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isBlockImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const c=e.createSelection(a);if("imageInline"===BC(e.schema,c)){const t=new kh(n.document),e=s.map((e=>1===e.childCount?(Array.from(e.getAttributes()).forEach((n=>t.setAttribute(...n,o.findViewImgElement(e)))),e.getChild(0)):e));r.content=t.createDocumentFragment(e)}})),this.listenTo(i,"contentInsertion",((t,n)=>{"paste"===n.method&&e.change((t=>{const e=t.createRangeIn(n.content);for(const t of e.getItems())t.is("element","imageInline")&&o.setImageNaturalSizeAttributes(t)}))}))}}class Dv extends tr{static get requires(){return[Ev,Qw,XC,Cv]}static get pluginName(){return"ImageInline"}}class Iv extends tr{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[HC]}getCaptionFromImageModelElement(t){for(const e of t.getChildren())if(e&&e.is("element","caption"))return e;return null}getCaptionFromModelSelection(t){const e=this.editor.plugins.get("ImageUtils"),n=t.getFirstPosition().findAncestor("caption");return n&&e.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(t){const e=this.editor.plugins.get("ImageUtils");return"figcaption"==t.name&&e.isBlockImageView(t.parent)?{name:!0}:null}}class Mv extends nr{refresh(){const t=this.editor,e=t.plugins.get("ImageCaptionUtils"),n=t.plugins.get("ImageUtils");if(!t.plugins.has(kv))return this.isEnabled=!1,void(this.value=!1);const o=t.model.document.selection,i=o.getSelectedElement();if(!i){const t=e.getCaptionFromModelSelection(o);return this.isEnabled=!!t,void(this.value=!!t)}this.isEnabled=n.isImage(i),this.isEnabled?this.value=!!e.getCaptionFromImageModelElement(i):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideImageCaption(t):this._showImageCaption(t,e)}))}_showImageCaption(t,e){const n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing"),i=this.editor.plugins.get("ImageUtils");let r=n.getSelectedElement();const s=o._getSavedCaption(r);i.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=n.getSelectedElement());const a=s||t.createElement("caption");t.append(a,r),e&&t.setSelection(a,"in")}_hideImageCaption(t){const e=this.editor,n=e.model.document.selection,o=e.plugins.get("ImageCaptionEditing"),i=e.plugins.get("ImageCaptionUtils");let r,s=n.getSelectedElement();s?r=i.getCaptionFromImageModelElement(s):(r=i.getCaptionFromModelSelection(n),s=r.parent),o._saveCaption(s,r),t.setSelection(s,"on"),t.remove(r)}}class Sv extends tr{constructor(t){super(t),this._savedCaptionsMap=new WeakMap}static get requires(){return[HC,Iv]}static get pluginName(){return"ImageCaptionEditing"}init(){const t=this.editor,e=t.model.schema;e.isRegistered("caption")?e.extend("caption",{allowIn:"imageBlock"}):e.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleImageCaption",new Mv(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils"),i=t.t;t.conversion.for("upcast").elementToElement({view:t=>o.matchImageCaptionViewElement(t),model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>n.isBlockImage(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:o})=>{if(!n.isBlockImage(t.parent))return null;const r=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,r),r.placeholder=i("Enter image caption"),br({view:e,element:r,keepOnFocus:!0});const s=t.parent.getAttribute("alt");return Nw(r,o,{label:s?i("Caption for image: %0",[s]):i("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.plugins.get("ImageCaptionUtils"),o=t.commands.get("imageTypeInline"),i=t.commands.get("imageTypeBlock"),r=t=>{if(!t.return)return;const{oldElement:o,newElement:i}=t.return;if(!o)return;if(e.isBlockImage(o)){const t=n.getCaptionFromImageModelElement(o);if(t)return void this._saveCaption(i,t)}const r=this._getSavedCaption(o);r&&this._saveCaption(i,r)};o&&this.listenTo(o,"execute",r,{priority:"low"}),i&&this.listenTo(i,"execute",r,{priority:"low"})}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?Mc.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}_registerCaptionReconversion(){const t=this.editor,e=t.model,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils");e.document.on("change:data",(()=>{const i=e.document.differ.getChanges();for(const e of i){if("alt"!==e.attributeKey)continue;const i=e.range.start.nodeAfter;if(n.isBlockImage(i)){const e=o.getCaptionFromImageModelElement(i);if(!e)return;t.editing.reconvertItem(e)}}}))}}class Tv extends tr{static get requires(){return[Iv]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageCaptionUtils"),o=t.t;t.ui.componentFactory.add("toggleImageCaption",(i=>{const r=t.commands.get("toggleImageCaption"),s=new Wg(i);return s.set({icon:Oh.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.bind("label").to(r,"value",(t=>o(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=n.getCaptionFromModelSelection(t.model.document.selection);if(o){const n=t.editing.mapper.toViewElement(o);e.scrollToTheSelection(),e.change((t=>{t.addClass("image__caption_highlighted",n)}))}t.editing.view.focus()})),s}))}}var Bv=n(5247),Nv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Bv.A,Nv);Bv.A.locals;function Pv(t){const e=t.map((t=>t.replace("+","\\+")));return new RegExp(`^image\\/(${e.join("|")})$`)}function Ov(t){return new Promise(((e,n)=>{const o=t.getAttribute("src");fetch(o).then((t=>t.blob())).then((t=>{const n=Lv(t,o),i=n.replace("image/",""),r=new File([t],`image.${i}`,{type:n});e(r)})).catch((t=>t&&"TypeError"===t.name?function(t){return function(t){return new Promise(((e,n)=>{const o=To.document.createElement("img");o.addEventListener("load",(()=>{const t=To.document.createElement("canvas");t.width=o.width,t.height=o.height;t.getContext("2d").drawImage(o,0,0),t.toBlob((t=>t?e(t):n()))})),o.addEventListener("error",(()=>n())),o.src=t}))}(t).then((e=>{const n=Lv(e,t),o=n.replace("image/","");return new File([e],`image.${o}`,{type:n})}))}(o).then(e).catch(n):n(t)))}))}function Lv(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class zv extends tr{static get pluginName(){return"ImageUploadUI"}init(){const t=this.editor,e=t.t,n=()=>{const t=this._createButton(Qg);return t.set({label:e("Upload image from computer"),tooltip:!0}),t};if(t.ui.componentFactory.add("uploadImage",n),t.ui.componentFactory.add("imageUpload",n),t.ui.componentFactory.add("menuBar:uploadImage",(()=>{const t=this._createButton(Hk);return t.label=e("Image from computer"),t})),t.plugins.has("ImageInsertUI")){const n=t.plugins.get("ImageInsertUI");n.registerIntegration({name:"upload",observable:()=>t.commands.get("uploadImage"),buttonViewCreator:()=>{const o=t.ui.componentFactory.create("uploadImage");return o.bind("label").to(n,"isImageSelected",(t=>e(t?"Replace image from computer":"Upload image from computer"))),o},formViewCreator:()=>{const o=t.ui.componentFactory.create("uploadImage");return o.withText=!0,o.bind("label").to(n,"isImageSelected",(t=>e(t?"Replace from computer":"Upload from computer"))),o.on("execute",(()=>{n.dropdownView.isOpen=!1})),o}})}}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("uploadImage"),i=e.config.get("image.upload.types"),r=Pv(i),s=new t(e.locale),a=n.t;return s.set({acceptedType:i.map((t=>`image/${t}`)).join(","),allowMultipleFiles:!0,label:a("Upload image from computer"),icon:Oh.imageUpload}),s.bind("isEnabled").to(o),s.on("done",((t,n)=>{const o=Array.from(n).filter((t=>r.test(t.type)));o.length&&(e.execute("uploadImage",{file:o}),e.editing.view.focus())})),s}}var Rv=n(2267),jv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Rv.A,jv);Rv.A.locals;var Fv=n(7693),Vv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Fv.A,Vv);Fv.A.locals;var Hv=n(1559),Uv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Hv.A,Uv);Hv.A.locals;class qv extends tr{constructor(t){super(t),this.uploadStatusChange=(t,e,n)=>{const o=this.editor,i=e.item,r=i.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(KA),c=r?e.attributeNewValue:null,l=this.placeholder,d=o.editing.mapper.toViewElement(i),u=n.writer;if("reading"==c)return Gv(d,u),void Wv(s,l,d,u);if("uploading"==c){const t=a.loaders.get(r);return Gv(d,u),void(t?(Kv(d,u),function(t,e,n,o){const i=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),i),n.on("change:uploadedPercent",((t,e,n)=>{o.change((t=>{t.setStyle("width",n+"%",i)}))}))}(d,u,t,o.editing.view),function(t,e,n,o){if(o.data){const i=t.findViewImgElement(e);n.setAttribute("src",o.data,i)}}(s,d,u,t)):Wv(s,l,d,u))}"complete"==c&&a.loaders.get(r)&&function(t,e,n){const o=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),o),setTimeout((()=>{n.change((t=>t.remove(t.createRangeOn(o))))}),3e3)}(d,u,o.editing.view),function(t,e){Yv(t,e,"progressBar")}(d,u),Kv(d,u),function(t,e){e.removeClass("ck-appear",t)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}static get pluginName(){return"ImageUploadProgress"}init(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),t.plugins.has("ImageInlineEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function Gv(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function Wv(t,e,n,o){n.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",n);const i=t.findViewImgElement(n);i.getAttribute("src")!==e&&o.setAttribute("src",e,i),$v(n,"placeholder")||o.insert(o.createPositionAfter(i),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(o))}function Kv(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),Yv(t,e,"placeholder")}function $v(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function Yv(t,e,n){const o=$v(t,n);o&&e.remove(e.createRangeOn(o))}var Qv=Object.defineProperty,Zv=Object.defineProperties,Jv=Object.getOwnPropertyDescriptors,Xv=Object.getOwnPropertySymbols,ty=Object.prototype.hasOwnProperty,ey=Object.prototype.propertyIsEnumerable,ny=(t,e,n)=>e in t?Qv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class oy extends nr{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.model.document.selection.getSelectedElement();this.isEnabled=e.isImageAllowed()||e.isImage(n)}execute(t){const e=wi(t.file),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if(e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);this._uploadImage(t,i,e)}else this._uploadImage(t,i)}))}_uploadImage(t,e,n){const o=this.editor,i=o.plugins.get(KA).createLoader(t),r=o.plugins.get("ImageUtils");var s,a;i&&r.insertImage((s=((t,e)=>{for(var n in e||(e={}))ty.call(e,n)&&ny(t,n,e[n]);if(Xv)for(var n of Xv(e))ey.call(e,n)&&ny(t,n,e[n]);return t})({},e),a={uploadId:i.id},Zv(s,Jv(a))),n)}}class iy extends tr{constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}static get requires(){return[KA,jf,Tb,HC]}static get pluginName(){return"ImageUploadEditing"}init(){const t=this.editor,e=t.model.document,n=t.conversion,o=t.plugins.get(KA),i=t.plugins.get("ImageUtils"),r=t.plugins.get("ClipboardPipeline"),s=Pv(t.config.get("image.upload.types")),a=new oy(t);t.commands.add("uploadImage",a),t.commands.add("imageUpload",a),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",((e,n)=>{if(o=n.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const i=Array.from(n.dataTransfer.files).filter((t=>!!t&&s.test(t.type)));i.length&&(e.stop(),t.model.change((e=>{n.targetRanges&&e.setSelection(n.targetRanges.map((e=>t.editing.mapper.toModelRange(e)))),t.execute("uploadImage",{file:i})})))})),this.listenTo(r,"inputTransformation",((e,n)=>{const r=Array.from(t.editing.view.createRangeIn(n.content)).map((t=>t.item)).filter((t=>function(t,e){return!(!t.isInlineImageView(e)||!e.getAttribute("src")||!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!e.getAttribute("src").match(/^blob:/g))}(i,t)&&!t.getAttribute("uploadProcessed"))).map((t=>({promise:Ov(t),imageElement:t})));if(!r.length)return;const s=new kh(t.editing.view.document);for(const t of r){s.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(s.setAttribute("src","",t.imageElement),s.setAttribute("uploadId",e.id,t.imageElement))}})),t.editing.view.document.on("dragover",((t,e)=>{e.preventDefault()})),e.on("change",(()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),i=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,r="$graveyard"==e.position.root.rootName;for(const e of ry(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(r?i.has(t)||n.abort():(i.add(t),this._uploadImageElements.set(t,e),"idle"==n.status&&this._readAndUpload(n)))}}})),this.on("uploadComplete",((t,{imageElement:e,data:n})=>{const o=n.urls?n.urls:n;this.editor.model.change((t=>{t.setAttribute("src",o.default,e),this._parseAndSetSrcsetAttributeOnImage(o,e,t),i.setImageNaturalSizeAttributes(e)}))}),{priority:"low"})}afterInit(){const t=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&t.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(t){const e=this.editor,n=e.model,o=e.locale.t,r=e.plugins.get(KA),s=e.plugins.get(jf),a=e.plugins.get("ImageUtils"),c=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","reading",c.get(t.id))})),t.read().then((()=>{const o=t.upload(),r=c.get(t.id);if(i.isSafari){const t=e.editing.mapper.toViewElement(r),n=a.findViewImgElement(t);e.editing.view.once("render",(()=>{if(!n.parent)return;const t=e.editing.view.domConverter.mapViewToDom(n.parent);if(!t)return;const o=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=o}))}return n.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","uploading",r)})),o})).then((e=>{n.enqueueChange({isUndoable:!1},(n=>{const o=c.get(t.id);n.setAttribute("uploadStatus","complete",o),this.fire("uploadComplete",{data:e,imageElement:o})})),l()})).catch((e=>{if("error"!==t.status&&"aborted"!==t.status)throw e;"error"==t.status&&e&&s.showWarning(e,{title:o("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},(e=>{e.remove(c.get(t.id))})),l()}));function l(){n.enqueueChange({isUndoable:!1},(e=>{const n=c.get(t.id);e.removeAttribute("uploadId",n),e.removeAttribute("uploadStatus",n),c.delete(t.id)})),r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let o=0;const i=Object.keys(t).filter((t=>{const e=parseInt(t,10);if(!isNaN(e))return o=Math.max(o,e),!0})).map((e=>`${t[e]} ${e}w`)).join(", ");if(""!=i){const t={srcset:i};e.hasAttribute("width")||e.hasAttribute("height")||(t.width=o),n.setAttributes(t,e)}}}function ry(t,e){const n=t.plugins.get("ImageUtils");return Array.from(t.model.createRangeOn(e)).filter((t=>n.isImage(t.item))).map((t=>t.item))}var sy=n(3469),ay={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(sy.A,ay);sy.A.locals;class cy extends nr{constructor(t,e){super(t),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(e.map((t=>{if(t.isDefault)for(const e of t.modelElements)this._defaultStyles[e]=t.name;return[t.name,t]})))}refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?t.hasAttribute("imageStyle")?this.value=t.getAttribute("imageStyle"):this.value=this._defaultStyles[t.name]:this.value=!1}execute(t={}){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils");n.change((e=>{const i=t.value,{setImageSizes:r=!0}=t;let s=o.getClosestSelectedImageElement(n.document.selection);i&&this.shouldConvertImageType(i,s)&&(this.editor.execute(o.isBlockImage(s)?"imageTypeInline":"imageTypeBlock",{setImageSizes:r}),s=o.getClosestSelectedImageElement(n.document.selection)),!i||this._styles.get(i).isDefault?e.removeAttribute("imageStyle",s):e.setAttribute("imageStyle",i,s),r&&o.setImageNaturalSizeAttributes(s)}))}shouldConvertImageType(t,e){return!this._styles.get(t).modelElements.includes(e.name)}}var ly=Object.defineProperty,dy=Object.getOwnPropertySymbols,uy=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,gy=(t,e,n)=>e in t?ly(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,my=(t,e)=>{for(var n in e||(e={}))uy.call(e,n)&&gy(t,n,e[n]);if(dy)for(var n of dy(e))hy.call(e,n)&&gy(t,n,e[n]);return t};const{objectFullWidth:py,objectInline:fy,objectLeft:ky,objectRight:by,objectCenter:wy,objectBlockLeft:Ay,objectBlockRight:_y}=Oh,Cy={get inline(){return{name:"inline",title:"In line",icon:fy,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:ky,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Ay,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:wy,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:by,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:_y,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:wy,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:by,modelElements:["imageBlock"],className:"image-style-side"}}},vy={full:py,left:Ay,right:_y,center:wy,inlineLeft:ky,inlineRight:by,inline:fy},yy=[{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 xy(t){b("image-style-configuration-definition-invalid",t)}const Ey={normalizeStyles:function(t){return(t.configuredStyles.options||[]).map((t=>function(t){t="string"==typeof t?Cy[t]?my({},Cy[t]):{name:t}:function(t,e){const n=my({},e);for(const o in t)Object.prototype.hasOwnProperty.call(e,o)||(n[o]=t[o]);return n}(Cy[t.name],t);"string"==typeof t.icon&&(t.icon=vy[t.icon]||t.icon);return t}(t))).filter((e=>function(t,{isBlockPluginLoaded:e,isInlinePluginLoaded:n}){const{modelElements:o,name:i}=t;if(!(o&&o.length&&i))return xy({style:t}),!1;{const i=[e?"imageBlock":null,n?"imageInline":null];if(!o.some((t=>i.includes(t))))return b("image-style-missing-dependency",{style:t,missingPlugins:o.map((t=>"imageBlock"===t?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(e,t)))},getDefaultStylesConfiguration:function(t,e){return t&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:t?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(t){return t.has("ImageBlockEditing")&&t.has("ImageInlineEditing")?[...yy]:[]},warnInvalidStyle:xy,DEFAULT_OPTIONS:Cy,DEFAULT_ICONS:vy,DEFAULT_DROPDOWN_DEFINITIONS:yy};function Dy(t,e){for(const n of e)if(n.name===t)return n}class Iy extends tr{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[HC]}init(){const{normalizeStyles:t,getDefaultStylesConfiguration:e}=Ey,n=this.editor,o=n.plugins.has("ImageBlockEditing"),i=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",e(o,i)),this.normalizedStyles=t({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:i}),this._setupConversion(o,i),this._setupPostFixer(),n.commands.add("imageStyle",new cy(n,this.normalizedStyles))}_setupConversion(t,e){const n=this.editor,o=n.model.schema,i=(r=this.normalizedStyles,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=Dy(e.attributeNewValue,r),i=Dy(e.attributeOldValue,r),s=n.mapper.toViewElement(e.item),a=n.writer;i&&a.removeClass(i.className,s),o&&a.addClass(o.className,s)});var r;const s=function(t){const e={imageInline:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageInline"))),imageBlock:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageBlock")))};return(t,n,o)=>{if(!n.modelRange)return;const i=n.viewItem,r=Gi(n.modelRange.getItems());if(r&&o.schema.checkAttribute(r,"imageStyle"))for(const t of e[r.name])o.consumable.consume(i,{classes:t.className})&&o.writer.setAttribute("imageStyle",t.name,r)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",i),n.data.downcastDispatcher.on("attribute:imageStyle",i),t&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),e&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const t=this.editor,e=t.model.document,n=t.plugins.get(HC),o=new Map(this.normalizedStyles.map((t=>[t.name,t])));e.registerPostFixer((t=>{let i=!1;for(const r of e.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let e="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(e&&e.is("element","paragraph")&&e.childCount>0&&(e=e.getChild(0)),!n.isImage(e))continue;const s=e.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(e.name)||(t.removeAttribute("imageStyle",e),i=!0)}return i}))}}var My=n(6386),Sy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(My.A,Sy);My.A.locals;class Ty extends tr{static get requires(){return[Iy]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Wrap text":t("Wrap text"),"Break text":t("Break text"),"In line":t("In line"),"Full size image":t("Full size image"),"Side image":t("Side image"),"Left aligned image":t("Left aligned image"),"Centered image":t("Centered image"),"Right aligned image":t("Right aligned image")}}init(){const t=this.editor.plugins,e=this.editor.config.get("image.toolbar")||[],n=By(t.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const t of n)this._createButton(t);const o=By([...e.filter(L),...Ey.getDefaultDropdownDefinitions(t)],this.localizedDefaultStylesTitles);for(const t of o)this._createDropdown(t,n)}_createDropdown(t,e){const n=this.editor.ui.componentFactory;n.add(t.name,(o=>{let i;const{defaultItem:r,items:s,title:a}=t,c=s.filter((t=>e.find((({name:e})=>Ny(e)===t)))).map((t=>{const e=n.create(t);return t===r&&(i=e),e}));s.length!==c.length&&Ey.warnInvalidStyle({dropdown:t});const l=Xm(o,$m),d=l.buttonView,u=d.arrowView;return tp(l,c,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:Py(a,i.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(c,"isOn",((...t)=>{const e=t.findIndex(Di);return e<0?i.icon:c[e].icon})),d.bind("label").toMany(c,"isOn",((...t)=>{const e=t.findIndex(Di);return Py(a,e<0?i.label:c[e].label)})),d.bind("isOn").toMany(c,"isOn",((...t)=>t.some(Di))),d.bind("class").toMany(c,"isOn",((...t)=>t.some(Di)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{c.some((({isOn:t})=>t))?l.isOpen=!l.isOpen:i.fire("execute")})),l.bind("isEnabled").toMany(c,"isEnabled",((...t)=>t.some(Di))),this.listenTo(l,"execute",(()=>{this.editor.editing.view.focus()})),l}))}_createButton(t){const e=t.name;this.editor.ui.componentFactory.add(Ny(e),(n=>{const o=this.editor.commands.get("imageStyle"),i=new Wg(n);return i.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(o,"isEnabled"),i.bind("isOn").to(o,"value",(t=>t===e)),i.on("execute",this._executeCommand.bind(this,e)),i}))}_executeCommand(t){this.editor.execute("imageStyle",{value:t}),this.editor.editing.view.focus()}}function By(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}function Ny(t){return`imageStyle:${t}`}function Py(t,e){return(t?t+": ":"")+e}class Oy extends tr{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new ir(t)),t.commands.add("outdent",new ir(t))}}class Ly extends tr{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?Oh.indent:Oh.outdent,i="ltr"==e.uiLanguageDirection?Oh.outdent:Oh.indent;this._defineButton("indent",n("Increase indent"),o),this._defineButton("outdent",n("Decrease indent"),i)}_defineButton(t,e,n){const o=this.editor;o.ui.componentFactory.add(t,(()=>{const o=this._createButton(Wg,t,e,n);return o.set({tooltip:!0}),o})),o.ui.componentFactory.add("menuBar:"+t,(()=>this._createButton(Vk,t,e,n)))}_createButton(t,e,n,o){const i=this.editor,r=i.commands.get(e),s=new t(i.locale);return s.set({label:n,icon:o}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",(()=>{i.execute(e),i.editing.view.focus()})),s}}class zy{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach((t=>this._definitions.add(t))):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",((t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;if(!e.item.is("selection")&&!n.schema.isInline(e.item))return;const o=n.writer,i=o.document.selection;for(const t of this._definitions){const r=o.createAttributeElement("a",t.attributes,{priority:5});t.classes&&o.addClass(t.classes,r);for(const e in t.styles)o.setStyle(e,t.styles[e],r);o.setCustomProperty("link",!0,r),t.callback(e.attributeNewValue)?e.item.is("selection")?o.wrap(i.getFirstRange(),r):o.wrap(n.mapper.toViewRange(e.range),r):o.unwrap(n.mapper.toViewRange(e.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",((t,e,{writer:n,mapper:o})=>{const i=o.toViewElement(e.item),r=Array.from(i.getChildren()).find((t=>t.is("element","a")));for(const t of this._definitions){const o=$i(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of o)"class"===t?n.addClass(e,r):n.setAttribute(t,e,r);t.classes&&n.addClass(t.classes,r);for(const e in t.styles)n.setStyle(e,t.styles[e],r)}else{for(const[t,e]of o)"class"===t?n.removeClass(e,r):n.removeAttribute(t,r);t.classes&&n.removeClass(t.classes,r);for(const e in t.styles)n.removeStyle(e,r)}}}))}}}const Ry=function(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:Xr(t,e,n)};var jy=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const Fy=function(t){return jy.test(t)};const Vy=function(t){return t.split("")};var Hy="\\ud800-\\udfff",Uy="["+Hy+"]",qy="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Gy="\\ud83c[\\udffb-\\udfff]",Wy="[^"+Hy+"]",Ky="(?:\\ud83c[\\udde6-\\uddff]){2}",$y="[\\ud800-\\udbff][\\udc00-\\udfff]",Yy="(?:"+qy+"|"+Gy+")"+"?",Qy="[\\ufe0e\\ufe0f]?",Zy=Qy+Yy+("(?:\\u200d(?:"+[Wy,Ky,$y].join("|")+")"+Qy+Yy+")*"),Jy="(?:"+[Wy+qy+"?",qy,Ky,$y,Uy].join("|")+")",Xy=RegExp(Gy+"(?="+Gy+")|"+Jy+Zy,"g");const tx=function(t){return t.match(Xy)||[]};const ex=function(t){return Fy(t)?tx(t):Vy(t)};const nx=function(t){return function(e){e=$r(e);var n=Fy(e)?ex(e):void 0,o=n?n[0]:e.charAt(0),i=n?Ry(n,1).join(""):e.slice(1);return o[t]()+i}}("toUpperCase"),ox=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,ix=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,rx=/^((\w+:(\/{2,})?)|(\W))/i,sx=["https?","ftps?","mailto"],ax="Ctrl+K";function cx(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function lx(t,e=sx){const n=String(t),o=e.join("|");return function(t,e){const n=t.replace(ox,"");return!!n.match(e)}(n,new RegExp(`${"^(?:(?:):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))".replace("",o)}`,"i"))?n:"#"}function dx(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function ux(t,e){const n=(o=t,ix.test(o)?"mailto:":e);var o;const i=!!n&&!hx(t);return t&&i?n+t:t}function hx(t){return rx.test(t)}function gx(t){window.open(t,"_blank","noopener")}class mx extends nr{constructor(){super(...arguments),this.manualDecorators=new qi,this.automaticDecorators=new zy}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement()||Gi(e.getSelectedBlocks());dx(n,t.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(n,"linkHref")):(this.value=e.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const n=this.editor.model,o=n.document.selection,i=[],r=[];for(const t in e)e[t]?i.push(t):r.push(t);n.change((e=>{if(o.isCollapsed){const s=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=px(o);let c=lw(s,"linkHref",o.getAttribute("linkHref"),n);o.getAttribute("linkHref")===a&&(c=this._updateLinkContent(n,e,c,t)),e.setAttribute("linkHref",t,c),i.forEach((t=>{e.setAttribute(t,!0,c)})),r.forEach((t=>{e.removeAttribute(t,c)})),e.setSelection(e.createPositionAfter(c.end.nodeBefore))}else if(""!==t){const r=$i(o.getAttributes());r.set("linkHref",t),i.forEach((t=>{r.set(t,!0)}));const{end:a}=n.insertContent(e.createText(t,r),s);e.setSelection(a)}["linkHref",...i,...r].forEach((t=>{e.removeSelectionAttribute(t)}))}else{const s=n.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const t of o.getSelectedBlocks())n.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const c=a.slice();for(const t of s)this._isRangeToUpdate(t,a)&&c.push(t);for(const s of c){let a=s;if(1===c.length){const i=px(o);o.getAttribute("linkHref")===i&&(a=this._updateLinkContent(n,e,s,t),e.setSelection(e.createSelection(a)))}e.setAttribute("linkHref",t,a),i.forEach((t=>{e.setAttribute(t,!0,a)})),r.forEach((t=>{e.removeAttribute(t,a)}))}}}))}_getDecoratorStateFromModel(t){const e=this.editor.model,n=e.document.selection,o=n.getSelectedElement();return dx(o,e.schema)?o.getAttribute(t):n.getAttribute(t)}_isRangeToUpdate(t,e){for(const n of e)if(n.containsRange(t))return!1;return!0}_updateLinkContent(t,e,n,o){const i=e.createText(o,{linkHref:o});return t.insertContent(i,n)}}function px(t){if(t.isCollapsed){const e=t.getFirstPosition();return e.textNode&&e.textNode.data}{const e=Array.from(t.getFirstRange().getItems());if(e.length>1)return null;const n=e[0];return n.is("$text")||n.is("$textProxy")?n.data:null}}class fx extends nr{refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement();dx(n,t.schema)?this.isEnabled=t.schema.checkAttribute(n,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,o=t.commands.get("link");e.change((t=>{const i=n.isCollapsed?[lw(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),e)]:e.schema.getValidRanges(n.getRanges(),"linkHref");for(const e of i)if(t.removeAttribute("linkHref",e),o)for(const n of o.manualDecorators)t.removeAttribute(n.id,e)}))}}class kx extends(U()){constructor({id:t,label:e,attributes:n,classes:o,styles:i,defaultValue:r}){super(),this.id=t,this.set("value",void 0),this.defaultValue=r,this.label=e,this.attributes=n,this.classes=o,this.styles=i}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var bx=n(7719),wx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(bx.A,wx);bx.A.locals;var Ax=Object.defineProperty,_x=Object.getOwnPropertySymbols,Cx=Object.prototype.hasOwnProperty,vx=Object.prototype.propertyIsEnumerable,yx=(t,e,n)=>e in t?Ax(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xx=(t,e)=>{for(var n in e||(e={}))Cx.call(e,n)&&yx(t,n,e[n]);if(_x)for(var n of _x(e))vx.call(e,n)&&yx(t,n,e[n]);return t};const Ex="automatic",Dx=/^(https?:)?\/\//;class Ix extends tr{static get pluginName(){return"LinkEditing"}static get requires(){return[Yb,Lb,Tb]}constructor(t){super(t),t.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const t=this.editor,e=this.editor.config.get("link.allowedProtocols");t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:cx}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,n)=>cx(lx(t,e),n)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new mx(t)),t.commands.add("unlink",new fx(t));const n=function(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach((t=>("label"in t&&n[t.label]&&(t.label=n[t.label]),t))),e}(t.t,function(t){const e=[];if(t)for(const[n,o]of Object.entries(t)){const t=Object.assign({},o,{id:`link${nx(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter((t=>t.mode===Ex))),this._enableManualDecorators(n.filter((t=>"manual"===t.mode)));t.plugins.get(Yb).registerAttribute("linkHref"),function(t,e,n,o){const i=t.editing.view,r=new Set;i.document.registerPostFixer((i=>{const s=t.model.document.selection;let a=!1;if(s.hasAttribute(e)){const c=lw(s.getFirstPosition(),e,s.getAttribute(e),t.model),l=t.editing.mapper.toViewRange(c);for(const t of l.getItems())t.is("element",n)&&!t.hasClass(o)&&(i.addClass(o,t),r.add(t),a=!0)}return a})),t.conversion.for("editingDowncast").add((t=>{function e(){i.change((t=>{for(const e of r.values())t.removeClass(o,e),r.delete(e)}))}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})}))}(t,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(t){const e=this.editor,n=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:Ex,callback:t=>!!t&&Dx.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach((t=>{e.model.schema.extend("$text",{allowAttributes:t.id});const o=new kx(t);n.add(o),e.conversion.for("downcast").attributeToElement({model:o.id,view:(t,{writer:e,schema:n},{item:i})=>{if((i.is("selection")||n.isInline(i))&&t){const t=e.createAttributeElement("a",o.attributes,{priority:5});o.classes&&e.addClass(o.classes,t);for(const n in o.styles)e.setStyle(n,o.styles[n],t);return e.setCustomProperty("link",!0,t),t}}}),e.conversion.for("upcast").elementToAttribute({view:xx({name:"a"},o._createPattern()),model:{key:o.id}})}))}_enableLinkOpen(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",((t,e)=>{if(!(i.isMac?e.domEvent.metaKey:e.domEvent.ctrlKey))return;let n=e.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const o=n.getAttribute("href");o&&(t.stop(),e.preventDefault(),gx(o))}),{context:"$capture"}),this.listenTo(e,"keydown",((e,n)=>{const o=t.commands.get("link").value;!!o&&n.keyCode===gi.enter&&n.altKey&&(e.stop(),gx(o))}))}_enableSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(e,"change:attribute",((n,{attributeKeys:o})=>{o.includes("linkHref")&&!e.hasAttribute("linkHref")&&t.change((e=>{var n;!function(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}(e,(n=t.schema,n.getDefinition("$text").allowAttributes.filter((t=>t.startsWith("link")))))}))}))}_enableClipboardIntegration(){const t=this.editor,e=t.model,n=this.editor.config.get("link.defaultProtocol");n&&this.listenTo(t.plugins.get("ClipboardPipeline"),"contentInsertion",((t,o)=>{e.change((t=>{const e=t.createRangeIn(o.content);for(const o of e.getItems())if(o.hasAttribute("linkHref")){const e=ux(o.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,o)}}))}))}}var Mx=n(3817),Sx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Mx.A,Sx);Mx.A.locals;class Tx extends Ig{constructor(t,e){super(t),this.focusTracker=new Wi,this.keystrokes=new Ki,this._focusables=new ig;const n=t.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Oh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Oh.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusCycler=new Am({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];e.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((t,e)=>(t[e.name]=e.isOn,t)),{})}render(){super.render(),ng({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new sm(this.locale,sp);return e.label=t("Link URL"),e}_createButton(t,e,n,o){const i=new Wg(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t.manualDecorators){const o=new Yg(this.locale);o.set({name:n.id,label:n.label,withText:!0}),o.bind("isOn").toMany([n,t],"value",((t,e)=>void 0===e&&void 0===t?!!n.defaultValue:!!t)),o.on("execute",(()=>{n.set("value",!o.isOn)})),e.add(o)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new Ig;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var Bx=n(8762),Nx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Bx.A,Nx);Bx.A.locals;class Px extends Ig{constructor(t,e={}){super(t),this.focusTracker=new Wi,this.keystrokes=new Ki,this._focusables=new ig;const n=t.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n("Unlink"),'',"unlink"),this.editButtonView=this._createButton(n("Edit link"),Oh.pencil,"edit"),this.set("href",void 0),this._linkConfig=e,this._focusCycler=new Am({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((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const o=new Wg(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.delegate("execute").to(this,n),o}_createPreviewButton(){const t=new Wg(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",(t=>t&&lx(t,this._linkConfig.allowedProtocols))),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",(t=>t||n("This link has no URL"))),t.bind("isEnabled").to(this,"href",(t=>!!t)),t.template.tag="a",t.template.eventListeners={},t}}const Ox="link-ui";class Lx extends tr{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Wf]}static get pluginName(){return"LinkUI"}init(){const t=this.editor,e=this.editor.t;t.editing.view.addObserver(ph),this._balloon=t.plugins.get(Wf),this._createToolbarLinkButton(),this._enableBalloonActivators(),t.conversion.for("editingDowncast").markerToHighlight({model:Ox,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:Ox,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Create link"),keystroke:ax},{label:e("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}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 t=this.editor,e=new Px(t.locale,t.config.get("link")),n=t.commands.get("link"),o=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(e,"edit",(()=>{this._addFormView()})),this.listenTo(e,"unlink",(()=>{t.execute("unlink"),this._hideUI()})),e.keystrokes.set("Esc",((t,e)=>{this._hideUI(),e()})),e.keystrokes.set(ax,((t,e)=>{this._addFormView(),e()})),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=t.config.get("link.defaultProtocol"),o=t.config.get("link.allowCreatingEmptyLinks"),i=new(eg(Tx))(t.locale,e);return i.urlInputView.fieldView.bind("value").to(e,"value"),i.urlInputView.bind("isEnabled").to(e,"isEnabled"),i.saveButtonView.bind("isEnabled").to(e,"isEnabled",i.urlInputView,"isEmpty",((t,e)=>t&&(o||!e))),this.listenTo(i,"submit",(()=>{const{value:e}=i.urlInputView.fieldView.element,o=ux(e,n);t.execute("link",o,i.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(i,"cancel",(()=>{this._closeFormView()})),i.keystrokes.set("Esc",((t,e)=>{this._closeFormView(),e()})),i}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link");t.ui.componentFactory.add("link",(()=>{const t=this._createButton(Wg);return t.set({tooltip:!0,isToggleable:!0}),t.bind("isOn").to(e,"value",(t=>!!t)),t})),t.ui.componentFactory.add("menuBar:link",(()=>this._createButton(Vk)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("link"),i=new t(e.locale),r=n.t;return i.set({label:r("Link"),icon:'',keystroke:ax}),i.bind("isEnabled").to(o,"isEnabled"),this.listenTo(i,"execute",(()=>this._showUI(!0))),i}_enableBalloonActivators(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),t.keystrokes.set(ax,((e,n)=>{n(),t.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),tg({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 t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=t.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.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(t=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),o=r();const i=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,o=e};function r(){return e.selection.focus.getAncestors().reverse().find((t=>t.is("element")))}this.listenTo(t.ui,"update",i),this.listenTo(this._balloon,"change:visibleView",i)}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 t=this._balloon.visibleView;return!!this.formView&&t==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=this.editor.model,n=t.document;let o;if(e.markers.has(Ox)){const e=Array.from(this.editor.editing.mapper.markerNameToElements(Ox)),n=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));o=t.domConverter.viewRangeToDom(n)}else o=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,n=e.getSelectedElement();if(e.isCollapsed||n&&Iw(n))return zx(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),o=zx(n.start),i=zx(n.end);return o&&o==i&&t.createRangeIn(o).getTrimmed().isEqual(n)?o:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change((e=>{const n=t.document.selection.getFirstRange();if(t.markers.has(Ox))e.updateMarker(Ox,{range:n});else if(n.start.isAtEnd){const o=n.start.getLastMatchingPosition((({item:e})=>!t.schema.isContent(e)),{boundaries:n});e.addMarker(Ox,{usingOperation:!1,affectsData:!1,range:e.createRange(o,n.end)})}else e.addMarker(Ox,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(Ox)&&t.change((t=>{t.removeMarker(Ox)}))}}function zx(t){return t.getAncestors().find((t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e}))||null}const Rx=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 jx extends tr{static get requires(){return[Gb,Ix]}static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(t,e){return e.textNode&&e.textNode.hasAttribute("linkHref")?lw(e,"linkHref",e.textNode.getAttribute("linkHref"),t):null}_selectEntireLinks(t,e){const n=this.editor.model,o=n.document.selection,i=o.getFirstPosition(),r=o.getLastPosition();let s=e.getJoined(this._expandLinkRange(n,i)||e);s&&(s=s.getJoined(this._expandLinkRange(n,r)||e)),s&&(s.start.isBefore(i)||s.end.isAfter(r))&&t.setSelection(s)}_enablePasteLinking(){const t=this.editor,e=t.model,n=e.document.selection,o=t.plugins.get("ClipboardPipeline"),i=t.commands.get("link");o.on("inputTransformation",((t,o)=>{if(!this.isEnabled||!i.isEnabled||n.isCollapsed||"paste"!==o.method)return;if(n.rangeCount>1)return;const r=n.getFirstRange(),s=o.dataTransfer.getData("text/plain");if(!s)return;const a=s.match(Rx);a&&a[2]===s&&(e.change((t=>{this._selectEntireLinks(t,r),i.execute(s)})),t.stop())}),{priority:"high"})}_enableTypingHandling(){const t=this.editor,e=new $b(t.model,(t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=Fx(t.substr(0,t.length-1));return e?{url:e}:void 0}));e.on("matched:data",((e,n)=>{const{batch:o,range:i,url:r}=n;if(!o.isTyping)return;const s=i.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),c=t.model.createRange(a,s);this._applyAutoLink(r,c)})),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("enter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const n=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("shiftEnter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition(),n=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:n,range:o}=Kb(t,e),i=Fx(n);if(i){const t=e.createRange(o.end.getShiftedBy(-i.length),o.end);this._applyAutoLink(i,t)}}_applyAutoLink(t,e){const n=this.editor.model,o=ux(t,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,n)&&hx(o)&&!function(t){const e=t.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}(e)&&this._persistAutoLink(o,e)}_persistAutoLink(t,e){const n=this.editor.model,o=this.editor.plugins.get("Delete");n.enqueueChange((i=>{i.setAttribute("linkHref",t,e),n.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function Fx(t){const e=Rx.exec(t);return e?e[2]:null}var Vx=n(4808),Hx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(Vx.A,Hx);Vx.A.locals;class Ux{constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=wi(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){return Gi(new this(t,e)[Symbol.iterator]())}*[Symbol.iterator](){const t=[];for(const{node:e}of qx(this._getStartNode(),this._isForward?"forward":"backward")){const n=e.getAttribute("listIndent");if(nthis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some((t=>e.getAttribute(t)!==this._startElement.getAttribute(t))))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*qx(t,e="forward"){const n="forward"==e,o=[];let i=null;for(;nE(t);){let e=null;if(i){const n=t.getAttribute("listIndent"),r=i.getAttribute("listIndent");n>r?o[r]=i:ne in t?Wx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xx=(t,e)=>{for(var n in e||(e={}))Qx.call(e,n)&&Jx(t,n,e[n]);if(Yx)for(var n of Yx(e))Zx.call(e,n)&&Jx(t,n,e[n]);return t},tE=(t,e)=>Kx(t,$x(e));class eE{static next(){return g()}}function nE(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function oE(t,e={}){return[...iE(t,tE(Xx({},e),{direction:"backward"})),...iE(t,tE(Xx({},e),{direction:"forward"}))]}function iE(t,e={}){const n="forward"==e.direction,o=Array.from(new Ux(t,tE(Xx({},e),{includeSelf:n,sameIndent:!0,sameAttributes:"listItemId"})));return n?o:o.reverse()}function rE(t,e){const n=new Ux(t,Xx({sameIndent:!0,sameAttributes:"listType"},e)),o=new Ux(t,Xx({sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"},e));return[...Array.from(n).reverse(),...o]}function sE(t){return!Ux.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function aE(t){return!Ux.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function cE(t,e={}){t=wi(t);const n=!1!==e.withNested,o=new Set;for(const e of t)for(const t of oE(e,{higherIndent:n}))o.add(t);return pE(o)}function lE(t){t=wi(t);const e=new Set;for(const n of t)for(const t of rE(n))e.add(t);return pE(e)}function dE(t,e){const n=iE(t,{direction:"forward"}),o=eE.next();for(const t of n)e.setAttribute("listItemId",o,t);return n}function uE(t,e,n){const o={};for(const[t,n]of e.getAttributes())t.startsWith("list")&&(o[t]=n);const i=iE(t,{direction:"forward"});for(const t of i)n.setAttributes(o,t);return i}function hE(t,e,{expand:n,indentBy:o=1}={}){t=wi(t);const i=n?cE(t):t;for(const t of i){const n=t.getAttribute("listIndent")+o;n<0?gE(t,e):e.setAttribute("listIndent",n,t)}return i}function gE(t,e){t=wi(t);for(const n of t)n.is("element","listItem")&&e.rename(n,"paragraph");for(const n of t)for(const t of n.getAttributeKeys())t.startsWith("list")&&e.removeAttribute(t,n);return t}function mE(t){if(!t.length)return!1;const e=t[0].getAttribute("listItemId");return!!e&&!t.some((t=>t.getAttribute("listItemId")!=e))}function pE(t){return Array.from(t).filter((t=>"$graveyard"!==t.root.rootName)).sort(((t,e)=>t.index-e.index))}function fE(t){const e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function kE(t,e){return e.checkChild(t.parent,"listItem")&&e.checkChild(t,"$text")&&!e.isObject(t)}function bE(t){return"numbered"==t||"customNumbered"==t}function wE(t,e,n){return iE(e,{direction:"forward"}).pop().index>t.index?uE(t,e,n):[]}class AE extends nr{constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=_E(t.document.selection);t.change((t=>{const n=[];mE(e)&&!sE(e[0])?("forward"==this._direction&&n.push(...hE(e,t)),n.push(...dE(e[0],t))):"forward"==this._direction?n.push(...hE(e,t,{expand:!0})):n.push(...function(t,e){const n=cE(t=wi(t)),o=new Set,i=Math.min(...n.map((t=>t.getAttribute("listIndent")))),r=new Map;for(const t of n)r.set(t,Ux.first(t,{lowerIndent:!0}));for(const t of n){if(o.has(t))continue;o.add(t);const n=t.getAttribute("listIndent")-1;if(n<0)gE(t,e);else{if(t.getAttribute("listIndent")==i){const n=wE(t,r.get(t),e);for(const t of n)o.add(t);if(n.length)continue}e.setAttribute("listIndent",n,t)}}return pE(o)}(e,t));for(const e of n){if(!e.hasAttribute("listType"))continue;const n=Ux.first(e,{sameIndent:!0});n&&t.setAttribute("listType",n.getAttribute("listType"),e)}this._fireAfterExecute(n)}))}_fireAfterExecute(t){this.fire("afterExecute",pE(new Set(t)))}_checkEnabled(){let t=_E(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction)return!0;if(mE(t)&&!sE(t[0]))return!0;t=cE(t),e=t[0];const n=Ux.first(e,{sameIndent:!0});return!!n&&n.getAttribute("listType")==e.getAttribute("listType")}}function _E(t){const e=Array.from(t.getSelectedBlocks()),n=e.findIndex((t=>!nE(t)));return-1!=n&&(e.length=n),e}var CE=Object.defineProperty,vE=Object.defineProperties,yE=Object.getOwnPropertyDescriptors,xE=Object.getOwnPropertySymbols,EE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,IE=(t,e,n)=>e in t?CE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ME=(t,e)=>{for(var n in e||(e={}))EE.call(e,n)&&IE(t,n,e[n]);if(xE)for(var n of xE(e))DE.call(e,n)&&IE(t,n,e[n]);return t},SE=(t,e)=>vE(t,yE(e));class TE extends nr{constructor(t,e,n={}){super(t),this.type=e,this._listWalkerOptions=n.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.document,o=fE(e),i=Array.from(n.selection.getSelectedBlocks()).filter((t=>e.schema.checkAttribute(t,"listType")||kE(t,e.schema))),r=void 0!==t.forceValue?!t.forceValue:this.value;e.change((s=>{if(r){const t=i[i.length-1],e=iE(t,{direction:"forward"}),n=[];e.length>1&&n.push(...dE(e[1],s)),n.push(...gE(i,s)),n.push(...function(t,e){const n=[];let o=Number.POSITIVE_INFINITY;for(const{node:i}of qx(t.nextSibling,"forward")){const t=i.getAttribute("listIndent");if(0==t)break;t{const{firstElement:r,lastElement:s}=this._getMergeSubjectElements(n,t),a=r.getAttribute("listIndent")||0,c=s.getAttribute("listIndent"),l=s.getAttribute("listItemId");if(a!=c){const t=(d=s,Array.from(new Ux(d,{direction:"forward",higherIndent:!0})));o.push(...hE([s,...t],i,{indentBy:a-c,expand:a{const e=dE(this._getStartBlock(),t);this._fireAfterExecute(e)}))}_fireAfterExecute(t){this.fire("afterExecute",pE(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&nE(e)&&!sE(e)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}class PE extends tr{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(t){return lE(t)}isFirstBlockOfListItem(t){return sE(t)}isListItemBlock(t){return nE(t)}expandListBlocksToCompleteItems(t,e={}){return cE(t,e)}isNumberedListType(t){return bE(t)}}function OE(t){return t.is("element","ol")||t.is("element","ul")}function LE(t){return t.is("element","li")}function zE(t,e,n,o=FE(n,e)){return t.createAttributeElement(jE(n),null,{priority:2*e/100-100,id:o})}function RE(t,e,n){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:n})}function jE(t){return"numbered"==t||"customNumbered"==t?"ol":"ul"}function FE(t,e){return`list-${t}-${e}`}function VE(t,e){const n=t.nodeBefore;if(nE(n)){let t=n;for(const{node:n}of qx(t,"backward"))if(t=n,e.has(t))return;e.set(n,t)}else{const n=t.nodeAfter;nE(n)&&e.set(n,n)}}function HE(){return(t,e,n)=>{const{writer:o,schema:i}=n;if(!e.modelRange)return;const r=Array.from(e.modelRange.getItems({shallow:!0})).filter((t=>i.checkAttribute(t,"listItemId")));if(!r.length)return;const s=eE.next(),a=function(t){let e=0,n=t.parent;for(;n;){if(LE(n))e++;else{const t=n.previousSibling;t&&LE(t)&&e++}n=n.parent}return e}(e.viewItem);let c=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted";const l=r[0].getAttribute("listType");l&&(c=l);const d={listItemId:s,listIndent:a,listType:c};for(const t of r)t.hasAttribute("listItemId")||o.setAttributes(d,t);r.length>1&&r[1].getAttribute("listItemId")!=d.listItemId&&n.keepEmptyElement(r[0])}}function UE(){return(t,e,n)=>{if(!n.consumable.test(e.viewItem,{name:!0}))return;const o=new kh(e.viewItem.document);for(const t of Array.from(e.viewItem.getChildren()))LE(t)||OE(t)||o.remove(t)}}function qE(t,e,n,{dataPipeline:o}={}){const i=function(t){return(e,n)=>{const o=[];for(const n of t)e.hasAttribute(n)&&o.push(`attribute:${n}`);return!!o.every((t=>!1!==n.test(e,t)))&&(o.forEach((t=>n.consume(e,t))),!0)}}(t);return(r,s,a)=>{const{writer:c,mapper:l,consumable:d}=a,u=s.item;if(!t.includes(s.attributeKey))return;if(!i(u,d))return;const h=function(t,e,n){const o=n.createRangeOn(t),i=e.toViewRange(o).getTrimmed();return i.end.nodeBefore}(u,l,n);WE(h,c,l),function(t,e){let n=t.parent;for(;n.is("attributeElement")&&["ul","ol","li"].includes(n.name);){const o=n.parent;e.unwrap(e.createRangeOn(t),n),n=o}}(h,c);const g=function(t,e,n,o,{dataPipeline:i}){let r=o.createRangeOn(e);if(!sE(t))return r;for(const s of n){if("itemMarker"!=s.scope)continue;const n=s.createElement(o,t,{dataPipeline:i});if(!n)continue;if(o.setCustomProperty("listItemMarker",!0,n),s.canInjectMarkerIntoElement&&s.canInjectMarkerIntoElement(t)?o.insert(o.createPositionAt(e,0),n):(o.insert(r.start,n),r=o.createRange(o.createPositionBefore(n),o.createPositionAfter(e))),!s.createWrapperElement||!s.canWrapElement)continue;const a=s.createWrapperElement(o,t,{dataPipeline:i});o.setCustomProperty("listItemWrapper",!0,a),s.canWrapElement(t)?r=o.wrap(r,a):(r=o.wrap(o.createRangeOn(n),a),r=o.createRange(r.start,o.createPositionAfter(e)))}return r}(u,h,e,c,{dataPipeline:o});!function(t,e,n,o){if(!t.hasAttribute("listIndent"))return;const i=t.getAttribute("listIndent");let r=t;for(let t=i;t>=0;t--){const i=RE(o,t,r.getAttribute("listItemId")),s=zE(o,t,r.getAttribute("listType"));for(const t of n)"list"!=t.scope&&"item"!=t.scope||!r.hasAttribute(t.attributeName)||t.setAttributeOnDowncast(o,r.getAttribute(t.attributeName),"list"==t.scope?s:i);if(e=o.wrap(e,i),e=o.wrap(e,s),0==t)break;if(r=Ux.first(r,{lowerIndent:!0}),!r)break}}(u,g,e,c)}}function GE(t,{dataPipeline:e}={}){return(n,{writer:o})=>{if(!KE(n,t))return null;if(!e)return o.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const i=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,i),i}}function WE(t,e,n){for(;t.parent.is("attributeElement")&&t.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(t),t.parent);const o=[];i(e.createPositionBefore(t).getWalker({direction:"backward"})),i(e.createRangeIn(t).getWalker());for(const t of o)e.remove(t);function i(t){for(const{item:e}of t){if(e.is("element")&&n.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&o.push(e)}}}function KE(t,e,n=oE(t)){if(!nE(t))return!1;for(const n of t.getAttributeKeys())if(!n.startsWith("selection:")&&!e.includes(n))return!1;return n.length<2}var $E=n(1232),YE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()($E.A,YE);$E.A.locals;var QE=n(6903),ZE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(QE.A,ZE);QE.A.locals;const JE=["listType","listIndent","listItemId"];class XE extends tr{constructor(t){super(t),this._downcastStrategies=[],t.config.define("list.multiBlock",!0)}static get pluginName(){return"ListEditing"}static get requires(){return[fw,Gb,PE,Tb]}init(){const t=this.editor,e=t.model,n=t.config.get("list.multiBlock");if(t.plugins.has("LegacyListEditing"))throw new k("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});e.schema.register("$listItem",{allowAttributes:JE}),n?(e.schema.extend("$container",{allowAttributesOf:"$listItem"}),e.schema.extend("$block",{allowAttributesOf:"$listItem"}),e.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):e.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const t of JE)e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new TE(t,"numbered")),t.commands.add("bulletedList",new TE(t,"bulleted")),t.commands.add("customNumberedList",new TE(t,"customNumbered",{multiLevel:!0})),t.commands.add("customBulletedList",new TE(t,"customBulleted",{multiLevel:!0})),t.commands.add("indentList",new AE(t,"forward")),t.commands.add("outdentList",new AE(t,"backward")),t.commands.add("splitListItemBefore",new NE(t,"before")),t.commands.add("splitListItemAfter",new NE(t,"after")),n&&(t.commands.add("mergeListItemBackward",new BE(t,"backward")),t.commands.add("mergeListItemForward",new BE(t,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration()}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),n&&n.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}getListAttributeNames(){return[...JE,...this._downcastStrategies.map((t=>t.attributeName))]}_setupDeleteIntegration(){const t=this.editor,e=t.commands.get("mergeListItemBackward"),n=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",((o,i)=>{const r=t.model.document.selection;fE(t.model)||t.model.change((()=>{const s=r.getFirstPosition();if(r.isCollapsed&&"backward"==i.direction){if(!s.isAtStart)return;const n=s.parent;if(!nE(n))return;if(Ux.first(n,{sameAttributes:"listType",sameIndent:!0})||0!==n.getAttribute("listIndent")){if(!e||!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:tD(t.model,"backward")})}else aE(n)||t.execute("splitListItemAfter"),t.execute("outdentList");i.preventDefault(),o.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!n||!n.isEnabled)return;n.execute({shouldMergeOnBlocksContentLevel:tD(t.model,"forward")}),i.preventDefault(),o.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const t=this.editor,e=t.model,n=t.commands,o=n.get("enter");this.listenTo(t.editing.view.document,"enter",((n,o)=>{const i=e.document,r=i.selection.getFirstPosition().parent;if(i.selection.isCollapsed&&nE(r)&&r.isEmpty&&!o.isSoft){const e=sE(r),i=aE(r);e&&i?(t.execute("outdentList"),o.preventDefault(),n.stop()):e&&!i?(t.execute("splitListItemAfter"),o.preventDefault(),n.stop()):i&&(t.execute("splitListItemBefore"),o.preventDefault(),n.stop())}}),{context:"li"}),this.listenTo(o,"afterExecute",(()=>{const e=n.get("splitListItemBefore");if(e.refresh(),!e.isEnabled)return;2===oE(t.model.document.selection.getLastPosition().parent).length&&e.execute()}))}_setupTabIntegration(){const t=this.editor;this.listenTo(t.editing.view.document,"tab",((e,n)=>{const o=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(t.execute(o),n.stopPropagation(),n.preventDefault(),e.stop())}),{context:"li"})}_setupConversion(){const t=this.editor,e=t.model,n=this.getListAttributeNames(),o=t.config.get("list.multiBlock"),i=o?"paragraph":"listItem";t.conversion.for("upcast").elementToElement({view:"li",model:(t,{writer:e})=>e.createElement(i,{listType:""})}).elementToElement({view:"p",model:(t,{writer:e})=>t.parent&&t.parent.is("element","li")?e.createElement(i,{listType:""}):null,converterPriority:"high"}).add((t=>{t.on("element:li",HE()),t.on("element:ul",UE(),{priority:"high"}),t.on("element:ol",UE(),{priority:"high"})})),o||t.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),t.conversion.for("editingDowncast").elementToElement({model:i,view:GE(n),converterPriority:"high"}).add((t=>{var o;t.on("attribute",qE(n,this._downcastStrategies,e)),t.on("remove",(o=e.schema,(t,e,n)=>{const{writer:i,mapper:r}=n,s=t.name.split(":")[1];if(!o.checkAttribute(s,"listItemId"))return;const a=r.toViewPosition(e.position),c=e.position.getShiftedBy(e.length),l=r.toViewPosition(c,{isPhantom:!0}),d=i.createRange(a,l).getTrimmed().end.nodeBefore;d&&WE(d,i,r)}))})),t.conversion.for("dataDowncast").elementToElement({model:i,view:GE(n,{dataPipeline:!0}),converterPriority:"high"}).add((t=>{t.on("attribute",qE(n,this._downcastStrategies,e,{dataPipeline:!0}))}));const r=(s=this._downcastStrategies,a=t.editing.view,(t,e)=>{if(e.modelPosition.offset>0)return;const n=e.modelPosition.parent;if(!nE(n))return;if(!s.some((t=>"itemMarker"==t.scope&&t.canInjectMarkerIntoElement&&t.canInjectMarkerIntoElement(n))))return;const o=e.mapper.toViewElement(n),i=a.createRangeIn(o),r=i.getWalker();let c=i.start;for(const{item:t}of r){if(t.is("element")&&e.mapper.toModelElement(t)||t.is("$textProxy"))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&(c=a.createPositionAfter(t),r.skip((({previousPosition:t})=>!t.isEqual(c))))}e.viewPosition=c});var s,a;t.editing.mapper.on("modelToViewPosition",r),t.data.mapper.on("modelToViewPosition",r),this.listenTo(e.document,"change:data",function(t,e,n,o){return()=>{const o=t.document.differ.getChanges(),s=[],a=new Map,c=new Set;for(const t of o)if("insert"==t.type&&"$text"!=t.name)VE(t.position,a),t.attributes.has("listItemId")?c.add(t.position.nodeAfter):VE(t.position.getShiftedBy(t.length),a);else if("remove"==t.type&&t.attributes.has("listItemId"))VE(t.position,a);else if("attribute"==t.type){const e=t.range.start.nodeAfter;n.includes(t.attributeKey)?(VE(t.range.start,a),null===t.attributeNewValue?(VE(t.range.start.getShiftedBy(1),a),r(e)&&s.push(e)):c.add(e)):nE(e)&&r(e)&&s.push(e)}for(const t of a.values())s.push(...i(t,c));for(const t of new Set(s))e.reconvertItem(t)};function i(t,e){const o=[],i=new Set,a=[];for(const{node:c,previous:l}of qx(t,"forward")){if(i.has(c))continue;const t=c.getAttribute("listIndent");l&&tn.includes(t))));const d=iE(c,{direction:"forward"});for(const t of d)i.add(t),(r(t,d)||s(t,a,e))&&o.push(t)}return o}function r(t,i){const r=e.mapper.toViewElement(t);if(!r)return!1;if(o.fire("checkElement",{modelElement:t,viewElement:r}))return!0;if(!t.is("element","paragraph")&&!t.is("element","listItem"))return!1;const s=KE(t,n,i);return!(!s||!r.is("element","p"))||!(s||!r.is("element","span"))}function s(t,n,i){if(i.has(t))return!1;const r=e.mapper.toViewElement(t);let s=n.length-1;for(let t=r.parent;!t.is("editableElement");t=t.parent){const e=LE(t),i=OE(t);if(!i&&!e)continue;const r="checkAttributes:"+(e?"item":"list");if(o.fire(r,{viewElement:t,modelAttributes:n[s]}))break;if(i&&(s--,s<0))return!1}return!0}}(e,t.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",((t,{viewElement:e,modelAttributes:n})=>{e.id!=n.listItemId&&(t.return=!0,t.stop())})),this.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:n})=>{e.name==jE(n.listType)&&e.id==FE(n.listType,n.listIndent)||(t.return=!0,t.stop())}))}_setupModelPostFixing(){const t=this.editor.model,e=this.getListAttributeNames();t.document.registerPostFixer((n=>function(t,e,n,o){const i=t.document.differ.getChanges(),r=new Map,s=o.editor.config.get("list.multiBlock");let a=!1;for(const o of i){if("insert"==o.type&&"$text"!=o.name){const i=o.position.nodeAfter;if(!t.schema.checkAttribute(i,"listItemId"))for(const t of Array.from(i.getAttributeKeys()))n.includes(t)&&(e.removeAttribute(t,i),a=!0);VE(o.position,r),o.attributes.has("listItemId")||VE(o.position.getShiftedBy(o.length),r);for(const{item:e,previousPosition:n}of t.createRangeIn(i))nE(e)&&VE(n,r)}else"remove"==o.type?VE(o.position,r):"attribute"==o.type&&n.includes(o.attributeKey)&&(VE(o.range.start,r),null===o.attributeNewValue&&VE(o.range.start.getShiftedBy(1),r));if(!s&&"attribute"==o.type&&JE.includes(o.attributeKey)){const t=o.range.start.nodeAfter;null===o.attributeNewValue&&t&&t.is("element","listItem")?(e.rename(t,"paragraph"),a=!0):null===o.attributeOldValue&&t&&t.is("element")&&"listItem"!=t.name&&(e.rename(t,"listItem"),a=!0)}}const c=new Set;for(const t of r.values())a=o.fire("postFixer",{listNodes:new Gx(t),listHead:t,writer:e,seenIds:c})||a;return a}(t,n,e,this))),this.on("postFixer",((t,{listNodes:e,writer:n})=>{t.return=function(t,e){let n=0,o=-1,i=null,r=!1;for(const{node:s}of t){const t=s.getAttribute("listIndent");if(t>n){let a;null===i?(i=t-n,a=n):(i>t&&(i=t),a=t-i),a>o+1&&(a=o+1),e.setAttribute("listIndent",a,s),r=!0,o=a}else i=null,n=t+1,o=t}return r}(e,n)||t.return}),{priority:"high"}),this.on("postFixer",((t,{listNodes:e,writer:n,seenIds:o})=>{t.return=function(t,e,n){const o=new Set;let i=!1;for(const{node:r}of t){if(o.has(r))continue;let t=r.getAttribute("listType"),s=r.getAttribute("listItemId");if(e.has(s)&&(s=eE.next()),e.add(s),r.is("element","listItem"))r.getAttribute("listItemId")!=s&&(n.setAttribute("listItemId",s,r),i=!0);else for(const e of iE(r,{direction:"forward"}))o.add(e),e.getAttribute("listType")!=t&&(s=eE.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=s&&(n.setAttribute("listItemId",s,e),i=!0)}return i}(e,o,n)||t.return}),{priority:"high"})}_setupClipboardIntegration(){const t=this.editor.model,e=this.editor.plugins.get("ClipboardPipeline");this.listenTo(t,"insertContent",function(t){return(e,[n,o])=>{const i=n.is("documentFragment")?Array.from(n.getChildren()):[n];if(!i.length)return;const r=(o?t.createSelection(o):t.document.selection).getFirstPosition();let s;if(nE(r.parent))s=r.parent;else{if(!nE(r.nodeBefore))return;s=r.nodeBefore}t.change((t=>{const e=s.getAttribute("listType"),n=s.getAttribute("listIndent"),o=i[0].getAttribute("listIndent")||0,r=Math.max(n-o,0);for(const n of i){const o=nE(n);s.is("element","listItem")&&n.is("element","paragraph")&&t.rename(n,"listItem"),t.setAttributes({listIndent:(o?n.getAttribute("listIndent"):0)+r,listItemId:o?n.getAttribute("listItemId"):eE.next(),listType:e},n)}}))}}(t),{priority:"high"}),this.listenTo(e,"outputTransformation",((e,n)=>{t.change((t=>{const e=Array.from(n.content.getChildren()),o=e[e.length-1];if(e.length>1&&o.is("element")&&o.isEmpty){e.slice(0,-1).every(nE)&&t.remove(o)}if("copy"==n.method||"cut"==n.method){const e=Array.from(n.content.getChildren());mE(e)&&gE(e,t)}}))}))}_setupAccessibilityIntegration(){const t=this.editor,e=t.t;t.accessibility.addKeystrokeInfoGroup({id:"list",label:e("Keystrokes that can be used in a list"),keystrokes:[{label:e("Increase list item indent"),keystroke:"Tab"},{label:e("Decrease list item indent"),keystroke:"Shift+Tab"}]})}}function tD(t,e){const n=t.document.selection;if(!n.isCollapsed)return!fE(t);if("forward"===e)return!0;const o=n.getFirstPosition().parent,i=o.previousSibling;return!t.schema.isObject(i)&&(!!i.isEmpty||mE([o,i]))}function eD(t,e,n,o){t.ui.componentFactory.add(e,(()=>{const i=nD(Wg,t,e,n,o);return i.set({tooltip:!0,isToggleable:!0}),i})),t.ui.componentFactory.add(`menuBar:${e}`,(()=>nD(Vk,t,e,n,o)))}function nD(t,e,n,o,i){const r=e.commands.get(n),s=new t(e.locale);return s.set({label:o,icon:i}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{e.execute(n),e.editing.view.focus()})),s}class oD extends tr{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;eD(this.editor,"numberedList",t("Numbered List"),Oh.numberedList),eD(this.editor,"bulletedList",t("Bulleted List"),Oh.bulletedList)}}class iD extends tr{static get requires(){return[XE,oD]}static get pluginName(){return"List"}}const rD={},sD={},aD={},cD=[{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:t,typeAttribute:e,listType:n}of cD)rD[t]=n,sD[t]=e,e&&(aD[e]=t);var lD=n(9968),dD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(lD.A,dD);lD.A.locals;var uD=n(7141),hD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(uD.A,hD);uD.A.locals;Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;fi("Ctrl+Enter");var gD=n(8991),mD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(gD.A,mD);gD.A.locals;fi("Ctrl+Enter");function pD(t,e){const n=(n,o,i)=>{if(!i.consumable.consume(o.item,n.name))return;const r=o.attributeNewValue,s=i.writer,a=i.mapper.toViewElement(o.item),c=[...a.getChildren()].find((t=>t.getCustomProperty("media-content")));s.remove(c);const l=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),l)};return t=>{t.on("attribute:url:media",n)}}function fD(t,e,n,o){return t.createContainerElement("figure",{class:"media"},[e.getMediaViewElement(t,n,o),t.createSlot()])}function kD(t){const e=t.getSelectedElement();return e&&e.is("element","media")?e:null}function bD(t,e,n,o){t.change((i=>{const r=i.createElement("media",{url:e});t.insertObject(r,n,null,{setSelection:"on",findOptimalPosition:o?"auto":void 0})}))}class wD extends nr{refresh(){const t=this.editor.model,e=t.document.selection,n=kD(e);this.value=n?n.getAttribute("url"):void 0,this.isEnabled=function(t){const e=t.getSelectedElement();return!!e&&"media"===e.name}(e)||function(t,e){const n=Pw(t,e);let o=n.start.parent;o.isEmpty&&!e.schema.isLimit(o)&&(o=o.parent);return e.schema.checkChild(o,"media")}(e,t)}execute(t){const e=this.editor.model,n=e.document.selection,o=kD(n);o?e.change((e=>{e.setAttribute("url",t,o)})):bD(e,t,n,!0)}}class AD{constructor(t,e){const n=e.providers,o=e.extraProviders||[],i=new Set(e.removeProviders),r=n.concat(o).filter((t=>{const e=t.name;return e?!i.has(e):(b("media-embed-no-provider-name",{provider:t}),!1)}));this.locale=t,this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,n){return this._getMedia(e).getViewElement(t,n)}_getMedia(t){if(!t)return new _D(this.locale);t=t.trim();for(const e of this.providerDefinitions){const n=e.html,o=wi(e.url);for(const e of o){const o=this._getUrlMatches(t,e);if(o)return new _D(this.locale,t,o,n)}}return null}_getUrlMatches(t,e){let n=t.match(e);if(n)return n;let o=t.replace(/^https?:\/\//,"");return n=o.match(e),n||(o=o.replace(/^www\./,""),n=o.match(e),n||null)}}class _D{constructor(t,e,n,o){this.url=this._getValidUrl(e),this._locale=t,this._match=n,this._previewRenderer=o}getViewElement(t,e){const n={};let o;if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),e.renderForEditingView&&(n.class="ck-media__wrapper");const i=this._getPreviewHtml(e);o=t.createRawElement("div",n,((t,e)=>{e.setContentOf(t,i)}))}else this.url&&(n.url=this.url),o=t.createEmptyElement(e.elementName,n);return t.setCustomProperty("media-content",!0,o),o}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const t=new Hg,e=this._locale.t;t.content='',t.viewBox="0 0 64 42";return new rg({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":e("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:"https://"+t:null}}var CD=n(7048),vD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(CD.A,vD);CD.A.locals;class yD extends tr{constructor(t){super(t),t.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:t=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>`
`},{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:t=>{const e=t[1],n=t[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:t=>`
`},{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 AD(t.locale,t.config.get("mediaEmbed"))}static get pluginName(){return"MediaEmbedEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion,i=t.config.get("mediaEmbed.previewsInData"),r=t.config.get("mediaEmbed.elementName"),s=this.registry;t.commands.add("mediaEmbed",new wD(t)),e.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),o.for("dataDowncast").elementToStructure({model:"media",view:(t,{writer:e})=>{const n=t.getAttribute("url");return fD(e,s,n,{elementName:r,renderMediaPreview:!!n&&i})}}),o.for("dataDowncast").add(pD(s,{elementName:r,renderMediaPreview:i})),o.for("editingDowncast").elementToStructure({model:"media",view:(t,{writer:e})=>{const o=t.getAttribute("url");return function(t,e,n){return e.setCustomProperty("media",!0,t),Mw(t,e,{label:n})}(fD(e,s,o,{elementName:r,renderForEditingView:!0}),e,n("media widget"))}}),o.for("editingDowncast").add(pD(s,{elementName:r,renderForEditingView:!0})),o.for("upcast").elementToElement({view:t=>["oembed",r].includes(t.name)&&t.getAttribute("url")?{name:!0}:null,model:(t,{writer:e})=>{const n=t.getAttribute("url");return s.hasMedia(n)?e.createElement("media",{url:n}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(t,{writer:e})=>{const n=t.getAttribute("data-oembed-url");return s.hasMedia(n)?e.createElement("media",{url:n}):null}}).add((t=>{t.on("element:figure",((t,e,n)=>{if(!n.consumable.consume(e.viewItem,{name:!0,classes:"media"}))return;const{modelRange:o,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=o,e.modelCursor=i;Gi(o.getItems())||n.consumable.revert(e.viewItem,{name:!0,classes:"media"})}))}))}}const xD=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class ED extends tr{constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}static get requires(){return[EA,Gb,GA]}static get pluginName(){return"AutoMediaEmbed"}init(){const t=this.editor,e=t.model.document,n=t.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",(()=>{const t=e.selection.getFirstRange(),n=su.fromPosition(t.start);n.stickiness="toPrevious";const o=su.fromPosition(t.end);o.stickiness="toNext",e.once("change:data",(()=>{this._embedMediaBetweenPositions(n,o),n.detach(),o.detach()}),{priority:"high"})}));t.commands.get("undo").on("execute",(()=>{this._timeoutId&&(To.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedMediaBetweenPositions(t,e){const n=this.editor,o=n.plugins.get(yD).registry,i=new al(t,e),r=i.getWalker({ignoreElementEnd:!0});let s="";for(const t of r)t.item.is("$textProxy")&&(s+=t.item.data);if(s=s.trim(),!s.match(xD))return void i.detach();if(!o.hasMedia(s))return void i.detach();n.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=su.fromPosition(t),this._timeoutId=To.window.setTimeout((()=>{n.model.change((t=>{this._timeoutId=null,t.remove(i),i.detach();let e=null;"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),bD(n.model,s,e,!1),this._positionToInsert.detach(),this._positionToInsert=null})),n.plugins.get(Gb).requestUndoOnBackspace()}),100)):i.detach()}}var DD=n(5651),ID={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(DD.A,ID);DD.A.locals;class MD extends Ig{constructor(t,e){super(e);const n=e.t;this.focusTracker=new Wi,this.keystrokes=new Ki,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Oh.check,"ck-button-save"),this.saveButtonView.type="submit",this.saveButtonView.bind("isEnabled").to(this,"mediaURLInputValue",(t=>!!t)),this.cancelButtonView=this._createButton(n("Cancel"),Oh.cancel,"ck-button-cancel","cancel"),this._focusables=new ig,this._focusCycler=new Am({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=t,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(),ng({view:this});[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(t){this.urlInputView.fieldView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,e=new sm(this.locale,sp),n=e.fieldView;return this._urlInputViewInfoDefault=t("Paste the media URL in the input."),this._urlInputViewInfoTip=t("Tip: Paste the URL into the content to embed faster."),e.label=t("Media URL"),e.infoText=this._urlInputViewInfoDefault,n.on("input",(()=>{e.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()})),e}_createButton(t,e,n,o){const i=new Wg(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}}class SD extends tr{static get requires(){return[yD]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor,e=t.commands.get("mediaEmbed");t.ui.componentFactory.add("mediaEmbed",(t=>{const n=Xm(t);return this._setUpDropdown(n,e),n}))}_setUpDropdown(t,e){const n=this.editor,o=n.t,i=t.buttonView,r=n.plugins.get(yD).registry;t.once("change:isOpen",(()=>{const o=new(eg(MD))(function(t,e){return[e=>{if(!e.url.length)return t("The URL must not be empty.")},n=>{if(!e.hasMedia(n.url))return t("This media URL is not supported.")}]}(n.t,r),n.locale);t.panelView.children.add(o),i.on("open",(()=>{o.disableCssTransitions(),o.url=e.value||"",o.urlInputView.fieldView.select(),o.enableCssTransitions()}),{priority:"low"}),t.on("submit",(()=>{o.isValid()&&(n.execute("mediaEmbed",o.url),n.editing.view.focus())})),t.on("change:isOpen",(()=>o.resetFormStatus())),t.on("cancel",(()=>{n.editing.view.focus()})),o.delegate("submit","cancel").to(t),o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.bind("isEnabled").to(e,"isEnabled")})),t.bind("isEnabled").to(e),i.set({label:o("Insert media"),icon:'',tooltip:!0})}}var TD=n(70),BD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};gr()(TD.A,BD);TD.A.locals;function ND(t){return void 0!==t&&t.endsWith("px")}function PD(t){return t.toFixed(2).replace(/\.?0+$/,"")+"px"}var OD=Object.defineProperty,LD=Object.defineProperties,zD=Object.getOwnPropertyDescriptors,RD=Object.getOwnPropertySymbols,jD=Object.prototype.hasOwnProperty,FD=Object.prototype.propertyIsEnumerable,VD=(t,e,n)=>e in t?OD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HD=(t,e)=>{for(var n in e||(e={}))jD.call(e,n)&&VD(t,n,e[n]);if(RD)for(var n of RD(e))FD.call(e,n)&&VD(t,n,e[n]);return t};function UD(t,e,n){if(!t.childCount)return;const o=new kh(t.document),i=function(t,e){const n=e.createRangeIn(t),o=[],i=new Set;for(const t of n.getItems()){if(!t.is("element")||!t.name.match(/^(p|h\d+|li|div)$/))continue;let e=ZD(t);if(void 0===e||0!=parseFloat(e)||Array.from(t.getClassNames()).find((t=>t.startsWith("MsoList")))||(e=void 0),t.hasStyle("mso-list")||void 0!==e&&i.has(e)){const n=YD(t);o.push({element:t,id:n.id,order:n.order,indent:n.indent,marginLeft:e}),void 0!==e&&i.add(e)}else i.clear()}return o}(t,o);if(!i.length)return;const r={},s=[];for(const t of i)if(void 0!==t.indent){qD(t)||(s.length=0);const i=`${t.id}:${t.indent}`,c=Math.min(t.indent-1,s.length);if(cs.length-1||s[c].listElement.name!=l.type){0==c&&"ol"==l.type&&void 0!==t.id&&r[i]&&(l.startIndex=r[i]);const e=$D(l,o,n);if(ND(t.marginLeft)&&(0==c||ND(s[c-1].marginLeft))){let n=t.marginLeft;c>0&&(n=PD(parseFloat(n)-parseFloat(s[c-1].marginLeft))),o.setStyle("padding-left",n,e)}if(0==s.length){const n=t.element.parent,i=n.getChildIndex(t.element)+1;o.insertChild(i,e,n)}else{const t=s[c-1].listItemElements;o.appendChild(e,t[t.length-1])}s[c]=(a=HD({},t),LD(a,zD({listElement:e,listItemElements:[]}))),0==c&&void 0!==t.id&&(r[i]=l.startIndex||1)}}const l="li"==t.element.name?t.element:o.createElement("li");o.appendChild(l,s[c].listElement),s[c].listItemElements.push(l),0==c&&void 0!==t.id&&r[i]++,t.element!=l&&o.appendChild(t.element,l),QD(t.element,o),o.removeStyle("text-indent",t.element),o.removeStyle("margin-left",t.element)}else{const e=s.find((e=>e.marginLeft==t.marginLeft));if(e){const n=e.listItemElements;o.appendChild(t.element,n[n.length-1]),o.removeStyle("margin-left",t.element)}else s.length=0}var a}function qD(t){const e=t.element.previousSibling;return GD(e||t.element.parent)}function GD(t){return t.is("element","ol")||t.is("element","ul")}function WD(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),o=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,r=new RegExp(`@list\\s+l${t.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),s=new RegExp(`@list l${t.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),a=r.exec(e),c=s.exec(e),l=a&&!c,d=n.exec(e);let u="decimal",h="ol",g=null;if(d&&d[1]){const e=o.exec(d[1]);if(e&&e[1]&&(u=e[1].trim(),h="bullet"!==u&&"image"!==u?"ol":"ul"),"bullet"===u){const e=function(t){if("li"==t.name&&"ul"==t.parent.name&&t.parent.hasAttribute("type"))return t.parent.getAttribute("type");const e=function(t){if(t.getChild(0).is("$text"))return null;for(const e of t.getChildren()){if(!e.is("element","span"))continue;const t=e.getChild(0);if(t)return t.is("$text")?t:t.getChild(0)}return null}(t);if(!e)return null;const n=e._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(t.element);e&&(u=e)}else{const t=i.exec(d[1]);t&&t[1]&&(g=parseInt(t[1]))}l&&(h="ol")}return{type:h,startIndex:g,style:KD(u),isLegalStyleList:l}}function KD(t){if(t.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(t){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 t;default:return null}}function $D(t,e,n){const o=e.createElement(t.type);return t.style&&e.setStyle("list-style-type",t.style,o),t.startIndex&&t.startIndex>1&&e.setAttribute("start",t.startIndex,o),t.isLegalStyleList&&n&&e.addClass("legal-list",o),o}function YD(t){const e=t.getStyle("mso-list");if(void 0===e)return{};const n=e.match(/(^|\s{1,100})l(\d+)/i),o=e.match(/\s{0,100}lfo(\d+)/i),i=e.match(/\s{0,100}level(\d+)/i);return n&&o&&i?{id:n[2],order:o[1],indent:parseInt(i[1])}:{indent:1}}function QD(t,e){const n=new Sr({name:"span",styles:{"mso-list":"Ignore"}}),o=e.createRangeIn(t);for(const t of o)"elementStart"===t.type&&n.match(t.item)&&e.remove(t.item)}function ZD(t){const e=t.getStyle("margin-left");return void 0===e||e.endsWith("px")?e:function(t){const e=parseFloat(t);return t.endsWith("pt")?PD(96*e/72):t.endsWith("pc")?PD(12*e*96/72):t.endsWith("in")?PD(96*e):t.endsWith("cm")?PD(96*e/2.54):t.endsWith("mm")?PD(e/10*96/2.54):t}(e)}function JD(t,e){if(!t.childCount)return;const n=new kh(t.document),o=function(t,e){const n=e.createRangeIn(t),o=new Sr({name:/v:(.+)/}),i=[];for(const t of n){if("elementStart"!=t.type)continue;const e=t.item,n=e.previousSibling,r=n&&n.is("element")?n.name:null,s=["Chart"],a=o.match(e),c=e.getAttribute("o:gfxdata"),l="v:shapetype"===r,d=c&&s.some((t=>e.getAttribute("id").includes(t)));a&&c&&!l&&!d&&i.push(t.item.getAttribute("id"))}return i}(t,n);!function(t,e,n){const o=n.createRangeIn(e),i=new Sr({name:"img"}),r=[];for(const e of o)if(e.item.is("element")&&i.match(e.item)){const n=e.item,o=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];o.length&&o.every((e=>t.indexOf(e)>-1))?r.push(n):n.getAttribute("src")||r.push(n)}for(const t of r)n.remove(t)}(o,t,n),function(t,e,n){const o=n.createRangeIn(e),i=[];for(const e of o)if("elementStart"==e.type&&e.item.is("element","v:shape")){const n=e.item.getAttribute("id");if(t.includes(n))continue;r(e.item.parent.getChildren(),n)||i.push(e.item)}for(const t of i){const e={src:s(t)};t.hasAttribute("alt")&&(e.alt=t.getAttribute("alt"));const o=n.createElement("img",e);n.insertChild(t.index+1,o,t.parent)}function r(t,e){for(const n of t)if(n.is("element")){if("img"==n.name&&n.getAttribute("v:shapes")==e)return!0;if(r(n.getChildren(),e))return!0}return!1}function s(t){for(const e of t.getChildren())if(e.is("element")&&e.getAttribute("src"))return e.getAttribute("src")}}(o,t,n),function(t,e){const n=e.createRangeIn(t),o=new Sr({name:/v:(.+)/}),i=[];for(const t of n)"elementStart"==t.type&&o.match(t.item)&&i.push(t.item);for(const t of i)e.remove(t)}(t,n);const i=function(t,e){const n=e.createRangeIn(t),o=new Sr({name:"img"}),i=[];for(const t of n)t.item.is("element")&&o.match(t.item)&&t.item.getAttribute("src").startsWith("file://")&&i.push(t.item);return i}(t,n);i.length&&function(t,e,n){if(t.length===e.length)for(let o=0;oString.fromCharCode(parseInt(t,16)))).join(""))}const tI=//i,eI=/xmlns:o="urn:schemas-microsoft-com/i;class nI{constructor(t,e=!1){this.document=t,this.hasMultiLevelListPlugin=e}isActive(t){return tI.test(t)||eI.test(t)}execute(t){const{body:e,stylesString:n}=t._parsedData;UD(e,n,this.hasMultiLevelListPlugin),JD(e,t.dataTransfer.getData("text/rtf")),function(t){const e=[],n=new kh(t.document);for(const{item:o}of n.createRangeIn(t))if(o.is("element")){for(const t of o.getClassNames())/\bmso/gi.exec(t)&&n.removeClass(t,o);for(const t of o.getStyleNames())/\bmso/gi.exec(t)&&n.removeStyle(t,o);(o.is("element","w:sdt")||o.is("element","w:sdtpr")&&o.isEmpty||o.is("element","o:p")&&o.isEmpty)&&e.push(o)}for(const t of e){const e=t.parent,o=e.getChildIndex(t);n.insertChild(o,t.getChildren(),e),n.remove(t)}}(e),t.content=e}}function oI(t,e,n,{blockElements:o,inlineObjectElements:i}){let r=n.createPositionAt(t,"forward"==e?"after":"before");return r=r.getLastMatchingPosition((({item:t})=>t.is("element")&&!o.includes(t.name)&&!i.includes(t.name)),{direction:e}),"forward"==e?r.nodeAfter:r.nodeBefore}function iI(t,e){return!!t&&t.is("element")&&e.includes(t.name)}const rI=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class sI{constructor(t){this.document=t}isActive(t){return rI.test(t)}execute(t){const e=new kh(this.document),{body:n}=t._parsedData;!function(t,e){for(const n of t.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const o=t.getChildIndex(n);e.remove(n),e.insertChild(o,n.getChildren(),t)}}(n,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","li")){const n=t.getChild(0);n&&n.is("element","p")&&e.unwrapElement(n)}}}(n,e),function(t,e){const n=new Ss(e.document.stylesProcessor),o=new _a(n,{renderingMode:"data"}),i=o.blockElements,r=o.inlineObjectElements,s=[];for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","br")){const n=oI(t,"forward",e,{blockElements:i,inlineObjectElements:r}),o=oI(t,"backward",e,{blockElements:i,inlineObjectElements:r}),a=iI(n,i);(iI(o,i)||a)&&s.push(t)}}for(const t of s)t.hasClass("Apple-interchange-newline")?e.remove(t):e.replace(t,e.createElement("p"))}(n,e),t.content=n}}const aI=/(\s+)<\/span>/g,((t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length)))}function dI(t,e){const n=new DOMParser,o=function(t){return lI(lI(t)).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(t){const e="",n="",o=t.indexOf(e);if(o<0)return t;const i=t.indexOf(n,o+e.length);return t.substring(0,o+e.length)+(i>=0?t.substring(i):"")}(t=(t=t.replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((i=(i=o.getData("text/plain")).replace(/&/g,"&").replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||i.includes("
"))&&(i=`

${i}

`),t=i),r=this.editor.data.htmlProcessor.toView(t)}var i;const s=new p(this,"inputTransformation");this.fire(s,{content:r,dataTransfer:o,targetRanges:e.targetRanges,method:e.method}),s.stop.called&&t.stop(),n.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((t,n)=>{if(n.content.isEmpty)return;const o=this.editor.data.toModel(n.content,"$clipboardHolder");0!=o.childCount&&(t.stop(),e.change((()=>{this.fire("contentInsertion",{content:o,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((t,e)=>{e.resultRange=r._pasteFragmentWithMarkers(e.content)}),{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,n=t.editing.view.document,o=(t,n)=>{const o=n.dataTransfer;n.preventDefault(),this._fireOutputTransformationEvent(o,e.selection,t.name)};this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",((e,n)=>{t.model.canEditAt(t.model.document.selection)?o(e,n):n.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((e,o)=>{const r=t.data.toView(o.content);n.fire("clipboardOutput",{dataTransfer:o.dataTransfer,content:r,method:o.method})}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",VC(o.content))),"cut"==o.method&&t.model.deleteContent(e.selection)}),{priority:"low"})}}class u_{constructor(t,e=20){this._batch=null,this.model=t,this._size=0,this.limit=e,this._isLocked=!1,this._changeCallback=(t,e)=>{e.isLocal&&e.isUndoable&&e!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(t){this._size+=t,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(t=!1){this.isLocked&&!t||(this._batch=null,this._size=0)}}class h_ extends si{constructor(t,e){super(t),this._buffer=new u_(t.model,e),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,o=t.text||"",r=o.length;let i=n.selection;if(t.selection?i=t.selection:t.range&&(i=e.createSelection(t.range)),!e.canEditAt(i))return;const s=t.resultRange;e.enqueueChange(this._buffer.batch,(t=>{this._buffer.lock();const a=Array.from(n.selection.getAttributes());e.deleteContent(i),o&&e.insertContent(t.createText(o,a),i),s?t.setSelection(s):i.is("documentSelection")||t.setSelection(i),this._buffer.unlock(),this._buffer.input(r)}))}}const p_=["insertText","insertReplacementText"];class m_ extends Sa{constructor(t){super(t),this.focusObserver=t.getObserver(kc),s.isAndroid&&p_.push("insertCompositionText");const e=t.document;e.on("beforeinput",((n,o)=>{if(!this.isEnabled)return;const{data:r,targetRanges:i,inputType:s,domEvent:a}=o;if(!p_.includes(s))return;this.focusObserver.flush();const c=new p(e,"insertText");e.fire(c,new Ba(t,a,{text:r,selection:t.createSelection(i)})),c.stop.called&&n.stop()})),e.on("compositionend",((n,{data:o,domEvent:r})=>{this.isEnabled&&!s.isAndroid&&o&&e.fire("insertText",new Ba(t,r,{text:o,selection:e.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class g_ extends ri{static get pluginName(){return"Input"}init(){const t=this.editor,e=t.model,n=t.editing.view,o=e.document.selection;n.addObserver(m_);const r=new h_(t,t.config.get("typing.undoStep")||20);t.commands.add("insertText",r),t.commands.add("input",r),this.listenTo(n.document,"insertText",((o,r)=>{n.document.isComposing||r.preventDefault();const{text:i,selection:a,resultRange:c}=r,l=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));let d=i;if(s.isAndroid){const t=Array.from(l[0].getItems()).reduce(((t,e)=>t+(e.is("$textProxy")?e.data:"")),"");t&&(t.length<=d.length?d.startsWith(t)&&(d=d.substring(t.length),l[0].start=l[0].start.getShiftedBy(t.length)):t.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const u={text:d,selection:e.createSelection(l)};c&&(u.resultRange=t.editing.mapper.toModelRange(c)),t.execute("insertText",u),n.scrollToTheSelection()})),s.isAndroid?this.listenTo(n.document,"keydown",((t,i)=>{!o.isCollapsed&&229==i.keyCode&&n.document.isComposing&&f_(e,r)})):this.listenTo(n.document,"compositionstart",(()=>{o.isCollapsed||f_(e,r)}))}}function f_(t,e){if(!e.isEnabled)return;const n=e.buffer;n.lock(),t.enqueueChange(n.batch,(()=>{t.deleteContent(t.document.selection)})),n.unlock()}class b_ extends si{constructor(t,e){super(t),this.direction=e,this._buffer=new u_(t.model,t.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const r=o.createSelection(t.selection||n.selection);if(!e.canEditAt(r))return;const i=t.sequence||1,s=r.isCollapsed;if(r.isCollapsed&&e.modifySelection(r,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(i))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(r,i))return void this.editor.execute("paragraph",{selection:r});if(r.isCollapsed)return;let a=0;r.getFirstRange().getMinimalFlatRanges().forEach((t=>{a+=Q(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),e.deleteContent(r,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),o.setSelection(r),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(o)))return!1;if(!e.schema.checkChild(o,"paragraph"))return!1;const r=o.getChild(0);return!r||!r.is("element","paragraph")}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n),r=t.createElement("paragraph");t.remove(t.createRangeIn(o)),t.insert(r,o),t.setSelection(r,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const n=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const o=t.getFirstPosition(),r=n.schema.getLimitElement(o),i=r.getChild(0);return o.parent==i&&(!!t.containsEntireContent(i)&&(!!n.schema.checkChild(r,"paragraph")&&"paragraph"!=i.name))}}const k_="word",w_="selection",A_="backward",C_="forward",__={deleteContent:{unit:w_,direction:A_},deleteContentBackward:{unit:"codePoint",direction:A_},deleteWordBackward:{unit:k_,direction:A_},deleteHardLineBackward:{unit:w_,direction:A_},deleteSoftLineBackward:{unit:w_,direction:A_},deleteContentForward:{unit:"character",direction:C_},deleteWordForward:{unit:k_,direction:C_},deleteHardLineForward:{unit:w_,direction:C_},deleteSoftLineForward:{unit:w_,direction:C_}};class y_ extends Sa{constructor(t){super(t);const e=t.document;let n=0;e.on("keydown",(()=>{n++})),e.on("keyup",(()=>{n=0})),e.on("beforeinput",((o,r)=>{if(!this.isEnabled)return;const{targetRanges:i,domEvent:a,inputType:c}=r,l=__[c];if(!l)return;const d={direction:l.direction,unit:l.unit,sequence:n};d.unit==w_&&(d.selectionToRemove=t.createSelection(i[0])),"deleteContentBackward"===c&&(s.isAndroid&&(d.sequence=1),function(t){if(1!=t.length||t[0].isCollapsed)return!1;const e=t[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let n=0;for(const{nextPosition:t}of e){if(t.parent.is("$text")){const e=t.parent.data,o=t.offset;if(ti(e,o)||ei(e,o)||oi(e,o))continue;n++}else n++;if(n>1)return!0}return!1}(i)&&(d.unit=w_,d.selectionToRemove=t.createSelection(i)));const u=new xs(e,"delete",i[0]);e.fire(u,new Ba(t,a,d)),u.stop.called&&o.stop()})),s.isBlink&&function(t){const e=t.view,n=e.document;let o=null,r=!1;function i(t){return t==br.backspace||t==br.delete}function s(t){return t==br.backspace?A_:C_}n.on("keydown",((t,{keyCode:e})=>{o=e,r=!1})),n.on("keyup",((a,{keyCode:c,domEvent:l})=>{const d=n.selection,u=t.isEnabled&&c==o&&i(c)&&!d.isCollapsed&&!r;if(o=null,u){const t=d.getFirstRange(),o=new xs(n,"delete",t),r={unit:w_,direction:s(c),selectionToRemove:d};n.fire(o,new Ba(e,l,r))}})),n.on("beforeinput",((t,{inputType:e})=>{const n=__[e];i(o)&&n&&n.direction==s(o)&&(r=!0)}),{priority:"high"}),n.on("beforeinput",((t,{inputType:e,data:n})=>{o==br.delete&&"insertText"==e&&""==n&&t.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class v_ extends ri{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.model.document;e.addObserver(y_),this._undoOnBackspace=!1;const r=new b_(t,"forward");t.commands.add("deleteForward",r),t.commands.add("forwardDelete",r),t.commands.add("delete",new b_(t,"backward")),this.listenTo(n,"delete",((o,r)=>{n.isComposing||r.preventDefault();const{direction:i,sequence:s,selectionToRemove:a,unit:c}=r,l="forward"===i?"deleteForward":"delete",d={sequence:s};if("selection"==c){const e=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));d.selection=t.model.createSelection(e)}else d.unit=c;t.execute(l,d),e.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",((e,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,t.execute("undo"),n.preventDefault(),e.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class I_ extends ri{static get requires(){return[g_,v_]}static get pluginName(){return"Typing"}}function E_(t,e){let n=t.start;return{text:Array.from(t.getWalker({ignoreElementEnd:!1})).reduce(((t,{item:o})=>o.is("$text")||o.is("$textProxy")?t+o.data:(n=e.createPositionAfter(o),"")),""),range:e.createRange(n,t.end)}}class x_ extends(G()){constructor(t,e){super(),this.model=t,this.testCallback=e,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",((e,{directChange:n})=>{n&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(t,"change:data",((t,e)=>{!e.isUndo&&e.isLocal&&this._evaluateTextBeforeSelection("data",{batch:e})}))}_evaluateTextBeforeSelection(t,e={}){const n=this.model,o=n.document.selection,r=n.createRange(n.createPositionAt(o.focus.parent,0),o.focus),{text:i,range:s}=E_(r,n),a=this.testCallback(i);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const n=Object.assign(e,{text:i,range:s});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${t}`,n)}}}class T_ extends ri{constructor(t){super(t),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const t=this.editor,e=t.model,n=t.editing.view,o=t.locale,r=e.document.selection;this.listenTo(n.document,"arrowKey",((t,e)=>{if(!r.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==br.arrowright,i=e.keyCode==br.arrowleft;if(!n&&!i)return;const s=o.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&i?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()}),{context:"$text",priority:"highest"}),this.listenTo(r,"change:range",((t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&N_(r.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,r=o.getFirstPosition();return!this._isGravityOverridden&&((!r.isAtStart||!D_(o,e))&&(!!N_(r,e)&&(B_(t),D_(o,e)&&N_(r,e,!0)?O_(n,e):this._overrideGravity(),!0)))}_handleBackwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,r=o.getFirstPosition();return this._isGravityOverridden?(B_(t),this._restoreGravity(),N_(r,e,!0)?O_(n,e):S_(n,e,r),!0):r.isAtStart?!!D_(o,e)&&(B_(t),S_(n,e,r),!0):!D_(o,e)&&N_(r,e,!0)?(B_(t),S_(n,e,r),!0):!!M_(r,e)&&(r.isAtEnd&&!D_(o,e)&&N_(r,e)?(B_(t),S_(n,e,r),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view.document;t.editing.view.addObserver(Ch);let r=!1;this.listenTo(o,"mousedown",(()=>{r=!0})),this.listenTo(o,"selectionChange",(()=>{const t=this.attributes;if(!r)return;if(r=!1,!n.isCollapsed)return;if(!D_(n,t))return;const o=n.getFirstPosition();N_(o,t)&&(o.isAtStart||N_(o,t,!0)?O_(e,t):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection,n=this.attributes;this.listenTo(t,"insertContent",(()=>{const o=e.getFirstPosition();D_(e,n)&&N_(o,n)&&O_(t,n)}),{priority:"low"})}_handleDeleteContentAfterNode(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view;let r=!1,i=!1;this.listenTo(o.document,"delete",((t,e)=>{r="backward"===e.direction}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{if(!r)return;const t=n.getFirstPosition();i=D_(n,this.attributes)&&!M_(t,this.attributes)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{r&&(r=!1,i||t.model.enqueueChange((()=>{const t=n.getFirstPosition();D_(n,this.attributes)&&N_(t,this.attributes)&&(t.isAtStart||N_(t,this.attributes,!0)?O_(e,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((t=>t.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function D_(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function S_(t,e,n){const o=n.nodeBefore;t.change((n=>{if(o){const e=[],r=t.schema.isObject(o)&&t.schema.isInline(o);for(const[n,i]of o.getAttributes())!t.schema.checkAttribute("$text",n)||r&&!1===t.schema.getAttributeProperties(n).copyFromObject||e.push([n,i]);n.setSelectionAttribute(e)}else n.removeSelectionAttribute(e)}))}function O_(t,e){t.change((t=>{t.removeSelectionAttribute(e)}))}function B_(t){t.preventDefault()}function M_(t,e){return N_(t.getShiftedBy(-1),e)}function N_(t,e,n=!1){const{nodeBefore:o,nodeAfter:r}=t;for(const t of e){const e=o?o.getAttribute(t):void 0,i=r?r.getAttribute(t):void 0;if((!n||void 0!==e&&void 0!==i)&&i!==e)return!0}return!1}const P_={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:F_('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:F_("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:F_("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:F_('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:F_('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:F_("'"),to:[null,"‚",null,"’"]}},R_={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},L_=["symbols","mathematical","typography","quotes"];function j_(t){return"string"==typeof t?new RegExp(`(${Fk(t)})$`):t}function V_(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function z_(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function F_(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function U_(t,e,n,o){return o.createRange(H_(t,e,n,!0,o),H_(t,e,n,!1,o))}function H_(t,e,n,o,r){let i=t.textNode||(o?t.nodeBefore:t.nodeAfter),s=null;for(;i&&i.getAttribute(e)==n;)s=i,i=o?i.previousSibling:i.nextSibling;return s?r.createPositionAt(s,o?"before":"after"):t}function*q_(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class G_ extends si{execute(){this.editor.model.change((t=>{this.enterBlock(t),this.fire("afterExecute",{writer:t})}))}enterBlock(t){const e=this.editor.model,n=e.document.selection,o=e.schema,r=n.isCollapsed,i=n.getFirstRange(),s=i.start.parent,a=i.end.parent;if(o.isLimit(s)||o.isLimit(a))return r||s!=a||e.deleteContent(n),!1;if(r){const e=q_(t.model.schema,n.getAttributes());return W_(t,i.start),t.setSelectionAttribute(e),!0}{const o=!(i.start.isAtStart&&i.end.isAtEnd),r=s==a;if(e.deleteContent(n,{leaveUnmerged:o}),o){if(r)return W_(t,n.focus),!0;t.setSelection(a,0)}}return!1}}function W_(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}const K_={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class Y_ extends Sa{constructor(t){super(t);const e=this.document;let n=!1;e.on("keydown",((t,e)=>{n=e.shiftKey})),e.on("beforeinput",((o,r)=>{if(!this.isEnabled)return;let i=r.inputType;s.isSafari&&n&&"insertParagraph"==i&&(i="insertLineBreak");const a=r.domEvent,c=K_[i];if(!c)return;const l=new xs(e,"enter",r.targetRanges[0]);e.fire(l,new Ba(t,a,{isSoft:c.isSoft})),l.stop.called&&o.stop()}))}observe(){}stopObserving(){}}class J_ extends ri{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=this.editor.t;e.addObserver(Y_),t.commands.add("enter",new G_(t)),this.listenTo(n,"enter",((o,r)=>{n.isComposing||r.preventDefault(),r.isSoft||(t.execute("enter"),e.scrollToTheSelection())}),{priority:"low"}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class $_ extends si{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n){const o=n.isCollapsed,r=n.getFirstRange(),i=r.start.parent,s=r.end.parent,a=i==s;if(o){const o=q_(t.schema,n.getAttributes());Q_(t,e,r.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(o)}else{const o=!(r.start.isAtStart&&r.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:o}),a?Q_(t,e,n.focus):o&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})}))}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const o=e.getFirstRange(),r=o.start.parent,i=o.end.parent;if((Z_(r,t)||Z_(i,t))&&r!==i)return!1;return!0}(t.schema,e.selection)}}function Q_(t,e,n){const o=e.createElement("softBreak");t.insertContent(o,n),e.setSelection(o,"after")}function Z_(t,e){return!t.is("rootElement")&&(e.isLimit(t)||Z_(t.parent,e))}class X_ extends ri{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,o=t.editing.view,r=o.document,i=this.editor.t;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),o.addObserver(Y_),t.commands.add("shiftEnter",new $_(t)),this.listenTo(r,"enter",((e,n)=>{r.isComposing||n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Insert a soft break (a <br> element)"),keystroke:"Shift+Enter"}]})}}class ty extends(S()){constructor(){super(...arguments),this._stack=[]}add(t,e){const n=this._stack,o=n[0];this._insertDescriptor(t);const r=n[0];o===r||ey(o,r)||this.fire("change:top",{oldDescriptor:o,newDescriptor:r,writer:e})}remove(t,e){const n=this._stack,o=n[0];this._removeDescriptor(t);const r=n[0];o===r||ey(o,r)||this.fire("change:top",{oldDescriptor:o,newDescriptor:r,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t.id));if(ey(t,e[n]))return;n>-1&&e.splice(n,1);let o=0;for(;e[o]&&ny(e[o],t);)o++;e.splice(o,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t));n>-1&&e.splice(n,1)}}function ey(t,e){return t&&e&&t.priority==e.priority&&oy(t.classes)==oy(e.classes)}function ny(t,e){return t.priority>e.priority||!(t.priorityoy(e.classes)}function oy(t){return Array.isArray(t)?t.sort().join(","):t}const ry='',iy="ck-widget",sy="ck-widget_selected";function ay(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function cy(t,e,n={}){if(!t.is("containerElement"))throw new w("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass(iy,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=my,e.setCustomProperty("widgetLabel",[],t),n.label&&function(t,e){const n=t.getCustomProperty("widgetLabel");n.push(e)}(t,n.label),n.hasSelectionHandle&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),n=new Mm;return n.set("content",ry),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),uy(t,e),t}function ly(t,e,n){if(e.classes&&n.addClass(yr(e.classes),t),e.attributes)for(const o in e.attributes)n.setAttribute(o,e.attributes[o],t)}function dy(t,e,n){if(e.classes&&n.removeClass(yr(e.classes),t),e.attributes)for(const o in e.attributes)n.removeAttribute(o,t)}function uy(t,e,n=ly,o=dy){const r=new ty;r.on("change:top",((e,r)=>{r.oldDescriptor&&o(t,r.oldDescriptor,r.writer),r.newDescriptor&&n(t,r.newDescriptor,r.writer)}));e.setCustomProperty("addHighlight",((t,e,n)=>r.add(e,n)),t),e.setCustomProperty("removeHighlight",((t,e,n)=>r.remove(e,n)),t)}function hy(t,e,n={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),e.setAttribute("role","textbox",t),e.setAttribute("tabindex","-1",t),n.label&&e.setAttribute("aria-label",n.label,t),e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",((n,o,r)=>{e.setAttribute("contenteditable",r?"false":"true",t)})),t.on("change:isFocused",((n,o,r)=>{r?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)})),uy(t,e),t}function py(t,e){const n=t.getSelectedElement();if(n){const o=ky(t);if(o)return e.createRange(e.createPositionAt(n,o))}return e.schema.findOptimalInsertionRange(t)}function my(){return null}function gy(t){const e=t.parentElement;if(!e)return 0;let n=parseFloat(e.ownerDocument.defaultView.getComputedStyle(e).width);let o=0,r=e;for(;isNaN(n);){if(r=r.parentElement,++o>5)return 0;n=parseFloat(e.ownerDocument.defaultView.getComputedStyle(r).width)}return n}const fy="widget-type-around";function by(t,e,n){return!!t&&ay(t)&&!n.isInline(e)}function ky(t){return t.getAttribute(fy)}var wy=__webpack_require__(8508),Ay={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(wy.A,Ay);wy.A.locals;const Cy=["before","after"],_y=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,yy="ck-widget__type-around_disabled";class vy extends ri{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[J_,v_]}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",((n,o,r)=>{e.change((t=>{for(const n of e.document.roots)r?t.removeClass(yy,n):t.addClass(yy,n)})),r||t.model.change((t=>{t.removeSelectionAttribute(fy)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(t,e){const n=this.editor,o=n.editing.view,r=n.model.schema.getAttributesWithProperty(t,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(t,e),attributes:r}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(t,e,n,o){this.listenTo(t,e,((...t)=>{this.isEnabled&&n(...t)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=ky(t);if(!e)return!1;const n=t.getSelectedElement();return this._insertParagraph(n,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,n=t.locale.t,o={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",((t,r,i)=>{const s=i.mapper.toViewElement(r.item);if(s&&by(s,r.item,e)){!function(t,e,n){const o=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const n=this.toDomElement(t);return function(t,e){for(const n of Cy){const o=new $p({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:e[n],"aria-hidden":"true"},children:[t.ownerDocument.importNode(_y,!0)]});t.appendChild(o.render())}}(n,e),function(t){const e=new $p({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(n),n}));t.insert(t.createPositionAt(n,"end"),o)}(i.writer,o,s);s.getCustomProperty("widgetLabel").push((()=>this.isEnabled?n("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,n=e.document.selection,o=e.schema,r=t.editing.view;function i(t){return`ck-widget_type-around_show-fake-caret_${t}`}this._listenToIfEnabled(r.document,"arrowKey",((t,e)=>{this._handleArrowKeyPress(t,e)}),{context:[ay,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",((e,n)=>{n.directChange&&t.model.change((t=>{t.removeSelectionAttribute(fy)}))})),this._listenToIfEnabled(e.document,"change:data",(()=>{const e=n.getSelectedElement();if(e){if(by(t.editing.mapper.toViewElement(e),e,o))return}t.model.change((t=>{t.removeSelectionAttribute(fy)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",((t,e,n)=>{const r=n.writer;if(this._currentFakeCaretModelElement){const t=n.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(r.removeClass(Cy.map(i),t),this._currentFakeCaretModelElement=null)}const s=e.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!by(a,s,o))return;const c=ky(e.selection);c&&(r.addClass(i(c),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",((e,n,o)=>{o||t.model.change((t=>{t.removeSelectionAttribute(fy)}))}))}_handleArrowKeyPress(t,e){const n=this.editor,o=n.model,r=o.document.selection,i=o.schema,s=n.editing.view,a=function(t,e){const n=_r(t,e);return"down"===n||"right"===n}(e.keyCode,n.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();let l;by(c,n.editing.mapper.toModelElement(c),i)?l=this._handleArrowKeyPressOnSelectedWidget(a):r.isCollapsed?l=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):e.shiftKey||(l=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),l&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,n=ky(e.document.selection);return e.change((e=>{if(!n)return e.setSelectionAttribute(fy,t?"after":"before"),!0;if(!(n===(t?"after":"before")))return e.removeSelectionAttribute(fy),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,n=e.model,o=n.schema,r=e.plugins.get("Widget"),i=r._getObjectElementNextToSelection(t);return!!by(e.editing.mapper.toViewElement(i),i,o)&&(n.change((e=>{r._setSelectionOverElement(i),e.setSelectionAttribute(fy,t?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,n=e.model,o=n.schema,r=e.editing.mapper,i=n.document.selection,s=t?i.getLastPosition().nodeBefore:i.getFirstPosition().nodeAfter;return!!by(r.toViewElement(s),s,o)&&(n.change((e=>{e.setSelection(s,"on"),e.setSelectionAttribute(fy,t?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",((n,o)=>{const r=o.domTarget.closest(".ck-widget__type-around__button");if(!r)return;const i=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(r),s=function(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}(r,e.domConverter),a=t.editing.mapper.toModelElement(s);this._insertParagraph(a,i),o.preventDefault(),n.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",((n,o)=>{if("atTarget"!=n.eventPhase)return;const r=e.getSelectedElement(),i=t.editing.mapper.toViewElement(r),s=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:by(i,r,s)&&(this._insertParagraph(r,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),n.stop())}),{context:ay})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",((e,n)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(n.selection=t.selection)}),{priority:"high"}),s.isAndroid?this._listenToIfEnabled(t,"keydown",((t,e)=>{229==e.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(t,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,n=t.model,o=n.schema;this._listenToIfEnabled(e.document,"delete",((e,r)=>{if("atTarget"!=e.eventPhase)return;const i=ky(n.document.selection);if(!i)return;const s=r.direction,a=n.document.selection.getSelectedElement(),c="forward"==s;if("before"===i===c)t.execute("delete",{selection:n.createSelection(a,"on")});else{const e=o.getNearestSelectionRange(n.createPositionAt(a,i),s);if(e)if(e.isCollapsed){const r=n.createSelection(e.start);if(n.modifySelection(r,{direction:s}),r.focus.isEqual(e.start)){const t=function(t,e){let n=e;for(const o of e.getAncestors({parentFirst:!0})){if(o.childCount>1||t.isLimit(o))break;n=o}return n}(o,e.start.parent);n.deleteContent(n.createSelection(t,"on"),{doNotAutoparagraph:!0})}else n.change((n=>{n.setSelection(e),t.execute(c?"deleteForward":"delete")}))}else n.change((n=>{n.setSelection(e),t.execute(c?"deleteForward":"delete")}))}r.preventDefault(),e.stop()}),{context:ay})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,n=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",((t,[o,r])=>{if(r&&!r.is("documentSelection"))return;const i=ky(n);return i?(t.stop(),e.change((t=>{const r=n.getSelectedElement(),s=e.createPositionAt(r,i),a=t.createSelection(s),c=e.insertContent(o,a);return t.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"insertObject",((t,n)=>{const[,o,r={}]=n;if(o&&!o.is("documentSelection"))return;const i=ky(e);i&&(r.findOptimalPosition=i,n[3]=r)}),{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",((t,[n])=>{if(n&&!n.is("documentSelection"))return;ky(e)&&t.stop()}),{priority:"high"})}}function Iy(t){const e=t.model;return(n,o)=>{const r=o.keyCode==br.arrowup,i=o.keyCode==br.arrowdown,s=o.shiftKey,a=e.document.selection;if(!r&&!i)return;const c=i;if(s&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,c))return;const l=function(t,e,n){const o=t.model;if(n){const t=e.isCollapsed?e.focus:e.getLastPosition(),n=Ey(o,t,"forward");if(!n)return null;const r=o.createRange(t,n),i=xy(o.schema,r,"backward");return i?o.createRange(t,i):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),n=Ey(o,t,"backward");if(!n)return null;const r=o.createRange(n,t),i=xy(o.schema,r,"forward");return i?o.createRange(i,t):null}}(t,a,c);if(l){if(l.isCollapsed){if(a.isCollapsed)return;if(s)return}(l.isCollapsed||function(t,e,n){const o=t.model,r=t.view.domConverter;if(n){const t=o.createSelection(e.start);o.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=o.createRange(t.focus,e.end))}const i=t.mapper.toViewRange(e),s=r.viewRangeToDom(i),a=zo.getDomRangeRects(s);let c;for(const t of a)if(void 0!==c){if(Math.round(t.top)>=c)return!1;c=Math.max(c,Math.round(t.bottom))}else c=Math.round(t.bottom);return!0}(t,l,c))&&(e.change((t=>{const n=c?l.end:l.start;if(s){const o=e.createSelection(a.anchor);o.setFocus(n),t.setSelection(o)}else t.setSelection(n)})),n.stop(),o.preventDefault(),o.stopPropagation())}}}function Ey(t,e,n){const o=t.schema,r=t.createRangeIn(e.root),i="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:t,item:s,type:a}of r.getWalker({startPosition:e,direction:n})){if(o.isLimit(s)&&!o.isInline(s))return t;if(a==i&&o.isBlock(s))return null}return null}function xy(t,e,n){const o="backward"==n?e.end:e.start;if(t.checkChild(o,"$text"))return o;for(const{nextPosition:o}of e.getWalker({direction:n}))if(t.checkChild(o,"$text"))return o;return null}var Ty=__webpack_require__(695),Dy={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(Ty.A,Dy);Ty.A.locals;class Sy extends ri{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[vy,v_]}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.t;this.editor.editing.downcastDispatcher.on("selection",((e,n,o)=>{const r=o.writer,i=n.selection;if(i.isCollapsed)return;const s=i.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);var c;ay(a)&&(o.consumable.consume(i,"selection")&&r.setSelection(r.createRangeOn(a),{fake:!0,label:(c=a,c.getCustomProperty("widgetLabel").reduce(((t,e)=>"function"==typeof e?t?t+". "+e():e():t?t+". "+e:e),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,r=o.document.selection;let i=null;for(const t of r.getRanges())for(const e of t){const t=e.item;ay(t)&&!Oy(t,i)&&(o.addClass(sy,t),this._previouslySelected.add(t),i=t)}}),{priority:"low"}),e.addObserver(Ch),this.listenTo(n,"mousedown",((...t)=>this._onMousedown(...t))),this.listenTo(n,"arrowKey",((...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)}),{context:[ay,"$text"]}),this.listenTo(n,"arrowKey",((...t)=>{this._preventDefaultOnArrowKeyPress(...t)}),{context:"$root"}),this.listenTo(n,"arrowKey",Iy(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",((t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())}),{context:"$root"}),this.listenTo(n,"tab",((t,e)=>{"atTarget"==t.eventPhase&&(e.shiftKey||this._selectFirstNestedEditable()&&(e.preventDefault(),t.stop()))}),{context:ay,priority:"low"}),this.listenTo(n,"tab",((t,e)=>{e.shiftKey&&this._selectAncestorWidget()&&(e.preventDefault(),t.stop())}),{priority:"low"}),this.listenTo(n,"keydown",((t,e)=>{e.keystroke==br.esc&&this._selectAncestorWidget()&&(e.preventDefault(),t.stop())}),{priority:"low"}),t.accessibility.addKeystrokeInfoGroup({id:"widget",label:o("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:o("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:o("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:o("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:o("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(t,e){const n=this.editor,o=n.editing.view,r=o.document;let i=e.target;if(e.domEvent.detail>=3)return void(this._selectBlockContent(i)&&e.preventDefault());if(function(t){let e=t;for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(ay(e))return!1;e=e.parent}return!1}(i))return;if(!ay(i)&&(i=i.findAncestor(ay),!i))return;s.isAndroid&&e.preventDefault(),r.isFocused||o.focus();const a=n.editing.mapper.toModelElement(i);this._setSelectionOverElement(a)}_selectBlockContent(t){const e=this.editor,n=e.model,o=e.editing.mapper,r=n.schema,i=o.findMappedViewAncestor(this.editor.editing.view.createPositionAt(t,0)),s=function(t,e){for(const n of t.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(n,"$text"))return n;if(e.isLimit(n)&&!e.isObject(n))break}return null}(o.toModelElement(i),n.schema);return!!s&&(n.change((t=>{const e=r.isLimit(s)?null:function(t,e){const n=new Nc({startPosition:t});for(const{item:t}of n){if(e.isLimit(t)||!t.is("element"))return null;if(e.checkChild(t,"$text"))return t}return null}(t.createPositionAfter(s),r),n=t.createPositionAt(s,0),o=e?t.createPositionAt(e,0):t.createPositionAt(s,"end");t.setSelection(t.createRange(n,o))})),!0)}_handleSelectionChangeOnArrowKeyPress(t,e){const n=e.keyCode,o=this.editor.model,r=o.schema,i=o.document.selection,s=i.getSelectedElement(),a=_r(n,this.editor.locale.contentLanguageDirection),c="down"==a||"right"==a,l="up"==a||"down"==a;if(s&&r.isObject(s)){const n=c?i.getLastPosition():i.getFirstPosition(),s=r.getNearestSelectionRange(n,c?"forward":"backward");return void(s&&(o.change((t=>{t.setSelection(s)})),e.preventDefault(),t.stop()))}if(!i.isCollapsed&&!e.shiftKey){const n=i.getFirstPosition(),s=i.getLastPosition(),a=n.nodeAfter,l=s.nodeBefore;return void((a&&r.isObject(a)||l&&r.isObject(l))&&(o.change((t=>{t.setSelection(c?s:n)})),e.preventDefault(),t.stop()))}if(!i.isCollapsed)return;const d=this._getObjectElementNextToSelection(c);if(d&&r.isObject(d)){if(r.isInline(d)&&l)return;this._setSelectionOverElement(d),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const n=this.editor.model,o=n.schema,r=n.document.selection.getSelectedElement();r&&o.isObject(r)&&(e.preventDefault(),t.stop())}_handleDelete(t){const e=this.editor.model.document.selection;if(!this.editor.model.canEditAt(e))return;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change((t=>{let o=e.anchor.parent;for(;o.isEmpty;){const e=o;o=e.parent,t.remove(e)}this._setSelectionOverElement(n)})),!0):void 0}_setSelectionOverElement(t){this.editor.model.change((e=>{e.setSelection(e.createRangeOn(t))}))}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,o=e.document.selection,r=e.createSelection(o);if(e.modifySelection(r,{direction:t?"forward":"backward"}),r.isEqual(o))return null;const i=t?r.focus.nodeBefore:r.focus.nodeAfter;return i&&n.isObject(i)?i:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(sy,e);this._previouslySelected.clear()}_selectFirstNestedEditable(){const t=this.editor,e=this.editor.editing.view.document;for(const n of e.selection.getFirstRange().getItems())if(n.is("editableElement")){const e=t.editing.mapper.toModelElement(n);if(!e)continue;const o=t.model.createPositionAt(e,0),r=t.model.schema.getNearestSelectionRange(o,"forward");return t.model.change((t=>{t.setSelection(r)})),!0}return!1}_selectAncestorWidget(){const t=this.editor,e=t.editing.mapper,n=t.editing.view.document.selection.getFirstPosition().parent,o=(n.is("$text")?n.parent:n).findAncestor(ay);if(!o)return!1;const r=e.toModelElement(o);return!!r&&(t.model.change((t=>{t.setSelection(r,"on")})),!0)}}function Oy(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class By extends ri{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Ok]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",(e=>{(function(t){const e=t.getSelectedElement();return!(!e||!ay(e))})(t.editing.view.document.selection)&&e.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:o,balloonClassName:r="ck-toolbar-container"}){if(!n.length)return void A("widget-toolbar-no-items",{toolbarId:t});const i=this.editor,s=i.t,a=new Vg(i.locale);if(a.ariaLabel=e||s("Widget toolbar"),this._toolbarDefinitions.has(t))throw new w("widget-toolbar-duplicated",this,{toolbarId:t});const c={view:a,getRelatedElement:o,balloonClassName:r,itemsConfig:n,initialized:!1};i.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const t=o(i.editing.view.document.selection);t&&this._showToolbar(c,t)},afterBlur:()=>{this._hideToolbar(c)}}),this._toolbarDefinitions.set(t,c)}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const o of this._toolbarDefinitions.values()){const r=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&r)if(this.editor.ui.focusTracker.isFocused){const i=r.getAncestors().length;i>t&&(t=i,e=r,n=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?My(this.editor,e):this._isToolbarInBalloon(t)||(t.initialized||(t.initialized=!0,t.view.fillFromConfig(t.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:t.view,position:Ny(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);My(this.editor,e)}})))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function My(t,e){const n=t.plugins.get("ContextualBalloon"),o=Ny(t,e);n.updatePosition(o)}function Ny(t,e){const n=t.editing.view,o=Lb.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}class Py extends(G()){constructor(t){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=t,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(t,e,n){const o=new zo(e);this.activeHandlePosition=function(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const n of e)if(t.classList.contains(Ry(n)))return n}(t),this._referenceCoordinates=function(t,e){const n=new zo(t),o=e.split("-"),r={x:"right"==o[1]?n.right:n.left,y:"bottom"==o[0]?n.bottom:n.top};return r.x+=t.ownerDocument.defaultView.scrollX,r.y+=t.ownerDocument.defaultView.scrollY,r}(e,function(t){const e=t.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[e[0]]}-${n[e[1]]}`}(this.activeHandlePosition)),this._originalWidth=o.width,this._originalHeight=o.height,this._aspectRatio=o.width/o.height;const r=n.style.width;r&&r.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(r):this._originalWidthPercents=function(t,e=new zo(t)){const n=gy(t);return n?e.width/n*100:0}(n,o)}update(t){this.proposedWidth=t.width,this.proposedHeight=t.height,this.proposedWidthPercents=t.widthPercents,this.proposedHandleHostWidth=t.handleHostWidth,this.proposedHandleHostHeight=t.handleHostHeight}}function Ry(t){return`ck-widget__resizer__handle-${t}`}class Ly extends wm{constructor(){super();const t=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",t.to("_viewPosition",(t=>t?`ck-orientation-${t}`:""))],style:{display:t.if("_isVisible","none",(t=>!t))}},children:[{text:t.to("_label")}]})}_bindToState(t,e){this.bind("_isVisible").to(e,"proposedWidth",e,"proposedHeight",((t,e)=>null!==t&&null!==e)),this.bind("_label").to(e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",e,"proposedWidthPercents",((e,n,o)=>"px"===t.unit?`${e}×${n}`:`${o}%`)),this.bind("_viewPosition").to(e,"activeHandlePosition",e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",((t,e,n)=>e<50||n<50?"above-center":t))}_dismiss(){this.unbind(),this._isVisible=!1}}var jy=Object.defineProperty,Vy=Object.defineProperties,zy=Object.getOwnPropertyDescriptors,Fy=Object.getOwnPropertySymbols,Uy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,qy=(t,e,n)=>e in t?jy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Gy extends(G()){constructor(t){super(),this._viewResizerWrapper=null,this._options=t,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((t,e)=>t&&e)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(t=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),t.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((t=>{t.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((t=>{t.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const t=this,e=this._options.viewElement;this._options.editor.editing.view.change((n=>{const o=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(e){const n=this.toDomElement(e);return t._appendHandles(n),t._appendSizeUI(n),n}));n.insert(n.createPositionAt(e,"end"),o),n.addClass("ck-widget_with-resizer",e),this._viewResizerWrapper=o,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(t){this._state=new Py(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(t,this._getHandleHost(),this._getResizeHost())}updateSize(t){const e=this._proposeNewSize(t);this._options.editor.editing.view.change((t=>{const n=this._options.unit||"%",o=("%"===n?e.widthPercents:e.width)+n;t.setStyle("width",o,this._options.viewElement)}));const n=this._getHandleHost(),o=new zo(n),r=Math.round(o.width),i=Math.round(o.height),s=new zo(n);e.width=Math.round(s.width),e.height=Math.round(s.height),this.redraw(o),this.state.update(((t,e)=>Vy(t,zy(e)))(((t,e)=>{for(var n in e||(e={}))Uy.call(e,n)&&qy(t,n,e[n]);if(Fy)for(var n of Fy(e))Hy.call(e,n)&&qy(t,n,e[n]);return t})({},e),{handleHostWidth:r,handleHostHeight:i}))}commit(){const t=this._options.unit||"%",e=("%"===t?this.state.proposedWidthPercents:this.state.proposedWidth)+t;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(e)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(t){const e=this._domResizerWrapper;if(!((n=e)&&n.ownerDocument&&n.ownerDocument.contains(n)))return;var n;const o=e.parentElement,r=this._getHandleHost(),i=this._viewResizerWrapper,s=[i.getStyle("width"),i.getStyle("height"),i.getStyle("left"),i.getStyle("top")];let a;if(o.isSameNode(r)){const e=t||new zo(r);a=[e.width+"px",e.height+"px",void 0,void 0]}else a=[r.offsetWidth+"px",r.offsetHeight+"px",r.offsetLeft+"px",r.offsetTop+"px"];"same"!==Z(s,a)&&this._options.editor.editing.view.change((t=>{t.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},i)}))}containsHandle(t){return this._domResizerWrapper.contains(t)}static isResizeHandle(t){return t.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(t){const e=this.state,n={x:(o=t).pageX,y:o.pageY};var o;const r=!this._options.isCentered||this._options.isCentered(this),i={x:e._referenceCoordinates.x-(n.x+e.originalWidth),y:n.y-e.originalHeight-e._referenceCoordinates.y};r&&e.activeHandlePosition.endsWith("-right")&&(i.x=n.x-(e._referenceCoordinates.x+e.originalWidth)),r&&(i.x*=2);let s=Math.abs(e.originalWidth+i.x),a=Math.abs(e.originalHeight+i.y);return"width"==(s/e.aspectRatio>a?"width":"height")?a=s/e.aspectRatio:s=a*e.aspectRatio,{width:Math.round(s),height:Math.round(a),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*s*100)/100,100)}}_getResizeHost(){const t=this._domResizerWrapper.parentElement;return this._options.getResizeHost(t)}_getHandleHost(){const t=this._domResizerWrapper.parentElement;return this._options.getHandleHost(t)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const o of e)t.appendChild(new $p({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(n=o,`ck-widget__resizer__handle-${n}`)}}).render());var n}_appendSizeUI(t){this._sizeView=new Ly,this._sizeView.render(),t.appendChild(this._sizeView.element)}}var Wy=__webpack_require__(4095),Ky={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(Wy.A,Ky);Wy.A.locals;class Yy extends ri{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const t=this.editor.editing,e=No.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),t.view.addObserver(Ch),this._observer=new(So()),this.listenTo(t.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(e,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(e,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=Op((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[t,e]of this._resizers)t.isAttached()||(this._resizers.delete(t),e.destroy())}),{priority:"lowest"}),this._observer.listenTo(No.window,"resize",this._redrawSelectedResizerThrottled);const n=this.editor.editing.view.document.selection;n.on("change",(()=>{const t=n.getSelectedElement(),e=this.getResizerByViewElement(t)||null;e?this.select(e):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const t of this._resizers.values())t.destroy();this._redrawSelectedResizerThrottled.cancel()}select(t){this.deselect(),this.selectedResizer=t,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(t){const e=new Gy(t),n=this.editor.plugins;if(e.attach(),n.has("WidgetToolbarRepository")){const t=n.get("WidgetToolbarRepository");e.on("begin",(()=>{t.forceDisabled("resize")}),{priority:"lowest"}),e.on("cancel",(()=>{t.clearForceDisabled("resize")}),{priority:"highest"}),e.on("commit",(()=>{t.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(t.viewElement,e);const o=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(o)==e&&this.select(e),e}getResizerByViewElement(t){return this._resizers.get(t)}_getResizerByHandle(t){for(const e of this._resizers.values())if(e.containsHandle(t))return e}_mouseDownListener(t,e){const n=e.domTarget;Gy.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n)||null,this._activeResizer&&(this._activeResizer.begin(n),t.stop(),e.preventDefault()))}_mouseMoveListener(t,e){this._activeResizer&&this._activeResizer.updateSize(e)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}const Jy=Yo("px");class $y extends wm{constructor(){super();const t=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",t.if("isVisible","ck-hidden",(t=>!t))],style:{left:t.to("left",(t=>Jy(t))),top:t.to("top",(t=>Jy(t))),width:t.to("width",(t=>Jy(t)))}}})}}class Qy extends ri{constructor(){super(...arguments),this.removeDropMarkerDelayed=Xr((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=Op((t=>this._updateDropMarker(t)),40),this._reconvertMarkerThrottled=Op((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new $y,this._domEmitter=new(So()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:t}of this._scrollables.values())t.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(t,e,n,o,r,i){this.removeDropMarkerDelayed.cancel();const s=Zy(this.editor,t,e,n,o,r,i);if(s)return i&&i.containsRange(s)?this.removeDropMarker():void this._updateDropMarkerThrottled(s)}getFinalDropRange(t,e,n,o,r,i){const s=Zy(this.editor,t,e,n,o,r,i);return this.removeDropMarker(),s}removeDropMarker(){const t=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,t.markers.has("drop-target")&&t.change((t=>{t.removeMarker("drop-target")}))}_setupDropMarker(){const t=this.editor;t.ui.view.body.add(this._dropTargetLineView),t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:n})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(n);e.markerRange.isCollapsed?this._updateDropTargetLine(e.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(t){const e=this.editor,n=e.model.markers;e.model.change((e=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(t){return t.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.append("⁠",t.createElement("span"),"⁠"),e}))}_updateDropTargetLine(t){const e=this.editor.editing,n=t.start.nodeBefore,o=t.start.nodeAfter,r=t.start.parent,i=n?e.mapper.toViewElement(n):null,s=i?e.view.domConverter.mapViewToDom(i):null,a=o?e.mapper.toViewElement(o):null,c=a?e.view.domConverter.mapViewToDom(a):null,l=e.mapper.toViewElement(r);if(!l)return;const d=e.view.domConverter.mapViewToDom(l),u=this._getScrollableRect(l),{scrollX:h,scrollY:p}=No.window,m=s?new zo(s):null,g=c?new zo(c):null,f=new zo(d).excludeScrollbarsAndBorders(),b=m?m.bottom:f.top,k=g?g.top:f.bottom,w=No.window.getComputedStyle(d),A=b<=k?(b+k)/2:k;if(u.topa.schema.checkChild(i,t)))){if(a.schema.checkChild(i,"$text"))return a.createRange(i);if(e)return tv(t,nv(t,e.parent),o,r)}}}else if(a.schema.isInline(l))return tv(t,l,o,r);if(a.schema.isBlock(l))return tv(t,l,o,r);if(a.schema.checkChild(l,"$block")){const e=Array.from(l.getChildren()).filter((e=>e.is("element")&&!Xy(t,e)));let n=0,i=e.length;if(0==i)return a.createRange(a.createPositionAt(l,"end"));for(;ne in t?ov(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class dv extends ri{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new(So())}static get pluginName(){return"DragDropBlockToolbar"}init(){const t=this.editor;if(this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),s.isAndroid&&this.forceDisabled("noAndroidSupport"),t.plugins.has("BlockToolbar")){const e=t.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(e,"dragstart",((t,e)=>this._handleBlockDragStart(e))),this._domEmitter.listenTo(No.document,"dragover",((t,e)=>this._handleBlockDragging(e))),this._domEmitter.listenTo(No.document,"drop",((t,e)=>this._handleBlockDragging(e))),this._domEmitter.listenTo(No.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&e.setAttribute("draggable","true"),this.on("change:isEnabled",((t,n,o)=>{e.setAttribute("draggable",o?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(t){if(!this.isEnabled)return;const e=this.editor.model,n=e.document.selection,o=this.editor.editing.view,r=Array.from(n.getSelectedBlocks()),i=e.createRange(e.createPositionBefore(r[0]),e.createPositionAfter(r[r.length-1]));e.change((t=>t.setSelection(i))),this._isBlockDragging=!0,o.focus(),o.getObserver(RC).onDomEvent(t)}_handleBlockDragging(t){if(!this.isEnabled||!this._isBlockDragging)return;const e=t.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),n=t.clientY,o=document.elementFromPoint(e,n),r=this.editor.editing.view;o&&o.closest(".ck-editor__editable")&&r.getObserver(RC).onDomEvent(((t,e)=>rv(t,iv(e)))(((t,e)=>{for(var n in e||(e={}))av.call(e,n)&&lv(t,n,e[n]);if(sv)for(var n of sv(e))cv.call(e,n)&&lv(t,n,e[n]);return t})({},t),{type:t.type,dataTransfer:t.dataTransfer,target:o,clientX:e,clientY:n,preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()}))}_handleBlockDragEnd(){this._isBlockDragging=!1}}var uv=__webpack_require__(7793),hv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(uv.A,hv);uv.A.locals;class pv extends ri{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=Xr((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new(So())}static get pluginName(){return"DragDrop"}static get requires(){return[d_,Sy,Qy,dv]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,e.addObserver(RC),e.addObserver(Ch),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((t,e,n)=>{n||this._finalizeDragging(!1)})),s.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,r=t.plugins.get(Qy);this.listenTo(o,"dragstart",((t,n)=>{if(n.target&&n.target.is("editableElement"))return void n.preventDefault();if(this._prepareDraggedRange(n.target),!this._draggedRange)return void n.preventDefault();this._draggingUid=g(),n.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",n.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const o=e.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(n.dataTransfer,o,"dragstart");const{dataTransfer:r,domTarget:i,domEvent:s}=n,{clientX:a}=s;this._updatePreview({dataTransfer:r,domTarget:i,clientX:a}),n.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(o,"dragend",((t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(No.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(o,"dragenter",(()=>{this.isEnabled&&n.focus()})),this.listenTo(o,"dragleave",(()=>{r.removeDropMarkerDelayed()})),this.listenTo(o,"dragging",((t,e)=>{if(!this.isEnabled)return void(e.dataTransfer.dropEffect="none");const{clientX:n,clientY:o}=e.domEvent;r.updateDropMarker(e.target,e.targetRanges,n,o,this._blockMode,this._draggedRange),this._draggedRange||(e.dataTransfer.dropEffect="copy"),s.isGecko||("copy"==e.dataTransfer.effectAllowed?e.dataTransfer.dropEffect="copy":["all","copyMove"].includes(e.dataTransfer.effectAllowed)&&(e.dataTransfer.dropEffect="move")),t.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get(Qy);this.listenTo(e,"clipboardInput",((e,o)=>{if("drop"!=o.method)return;const{clientX:r,clientY:i}=o.domEvent,s=n.getFinalDropRange(o.target,o.targetRanges,r,i,this._blockMode,this._draggedRange);if(!s)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==mv(o.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(s,!0))return this._finalizeDragging(!1),void e.stop();o.targetRanges=[t.editing.mapper.toViewRange(s)]}),{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(d_);t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n=e.targetRanges.map((t=>this.editor.editing.mapper.toModelRange(t)));this.editor.model.change((t=>t.setSelection(n)))}),{priority:"high"}),t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n="move"==mv(e.dataTransfer),o=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(o&&n)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,n=e.document;this.listenTo(n,"mousedown",((o,r)=>{if(s.isAndroid||!r)return;this._clearDraggableAttributesDelayed.cancel();let i=gv(r.target);if(s.isBlink&&!t.isReadOnly&&!i&&!n.selection.isCollapsed){const t=n.selection.getSelectedElement();t&&ay(t)||(i=n.selection.editableElement)}i&&(e.change((t=>{t.setAttribute("draggable","true",i)})),this._draggableElement=t.editing.mapper.toModelElement(i))})),this.listenTo(n,"mouseup",(()=>{s.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change((e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(t){const e=this.editor,n=e.model;if(e.plugins.get(Qy).removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(t&&this.isEnabled&&n.change((t=>{const e=n.createSelection(this._draggedRange);n.deleteContent(e,{doNotAutoparagraph:!0});const o=e.getFirstPosition().parent;o.isEmpty&&!n.schema.checkChild(o,"$text")&&n.schema.checkChild(o,"paragraph")&&t.insertElement("paragraph",o,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(t){const e=this.editor,n=e.model,o=n.document.selection,r=t?gv(t):null;if(r){const t=e.editing.mapper.toModelElement(r);if(this._draggedRange=ul.fromRange(n.createRangeOn(t)),this._blockMode=n.schema.isBlock(t),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(o.isCollapsed&&!o.getFirstPosition().parent.isEmpty)return;const i=Array.from(o.getSelectedBlocks()),s=o.getFirstRange();if(0==i.length)return void(this._draggedRange=ul.fromRange(s));const a=fv(n,i);if(i.length>1)this._draggedRange=ul.fromRange(a),this._blockMode=!0;else if(1==i.length){const t=s.start.isTouching(a.start)&&s.end.isTouching(a.end);this._draggedRange=ul.fromRange(t?a:s),this._blockMode=t}n.change((t=>t.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:t,domTarget:e,clientX:n}){const o=this.editor.editing.view,r=o.document.selection.editableElement,i=o.domConverter.mapViewToDom(r),a=No.window.getComputedStyle(i);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=ft(No.document,"div",{style:"position: fixed; left: -999999px;"}),No.document.body.appendChild(this._previewContainer));const c=new zo(i);if(i.contains(e))return;const l=parseFloat(a.paddingLeft),d=ft(No.document,"div");d.className="ck ck-content",d.style.width=a.width,d.style.paddingLeft=`${c.left-n+l}px`,s.isiOS&&(d.style.backgroundColor="white"),d.innerHTML=t.getData("text/html"),t.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function mv(t){return s.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function gv(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(ay);if(ay(t))return t;const e=t.findAncestor((t=>ay(t)||t.is("editableElement")));return ay(e)?e:null}function fv(t,e){const n=e[0],o=e[e.length-1],r=n.getCommonAncestor(o),i=t.createPositionBefore(n),s=t.createPositionAfter(o);if(r&&r.is("element")&&!t.schema.isLimit(r)){const e=t.createRangeOn(r),n=i.isTouching(e.start),o=s.isTouching(e.end);if(n&&o)return fv(t,[r])}return t.createRange(i,s)}class bv extends ri{static get pluginName(){return"PastePlainText"}static get requires(){return[d_]}init(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,r=e.document.selection;let i=!1;n.addObserver(RC),this.listenTo(o,"keydown",((t,e)=>{i=e.shiftKey})),t.plugins.get(d_).on("contentInsertion",((t,n)=>{(i||function(t,e){if(t.childCount>1)return!1;const n=t.getChild(0);if(e.isObject(n))return!1;return 0==Array.from(n.getAttributeKeys()).length}(n.content,e.schema))&&e.change((t=>{const o=Array.from(r.getAttributes()).filter((([t])=>e.schema.getAttributeProperties(t).isFormatting));r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0}),o.push(...r.getAttributes());const i=t.createRangeIn(n.content);for(const e of i.getItems())e.is("$textProxy")&&t.setAttributes(o,e)}))}))}}class kv extends ri{static get pluginName(){return"Clipboard"}static get requires(){return[l_,d_,pv,bv]}init(){const t=this.editor,e=this.editor.t;t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Copy selected content"),keystroke:"CTRL+C"},{label:e("Paste content"),keystroke:"CTRL+V"},{label:e("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}class wv extends si{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let n=t.schema.getLimitElement(e);if(e.containsEntireContent(n)||!Av(t.schema,n))do{if(n=n.parent,!n)return}while(!Av(t.schema,n));t.change((t=>{t.setSelection(n,"in")}))}}function Av(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const Cv=Ar("Ctrl+A");class _v extends ri{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.t,n=t.editing.view.document;t.commands.add("selectAll",new wv(t)),this.listenTo(n,"keydown",((e,n)=>{wr(n)===Cv&&(t.execute("selectAll"),n.preventDefault())})),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Select all"),keystroke:"CTRL+A"}]})}}class yv extends ri{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",(()=>{const t=this._createButton(Lm);return t.set({tooltip:!0}),t})),t.ui.componentFactory.add("menuBar:selectAll",(()=>this._createButton(Ew)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("selectAll"),r=new t(e.locale),i=n.t;return r.set({label:i("Select all"),icon:'',keystroke:"Ctrl+A"}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),r}}class vv extends ri{static get requires(){return[_v,yv]}static get pluginName(){return"SelectAll"}}var Iv=Object.defineProperty,Ev=Object.getOwnPropertySymbols,xv=Object.prototype.hasOwnProperty,Tv=Object.prototype.propertyIsEnumerable,Dv=(t,e,n)=>e in t?Iv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Sv extends si{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(t.data,"set",((t,e)=>{e[1]=((t,e)=>{for(var n in e||(e={}))xv.call(e,n)&&Dv(t,n,e[n]);if(Ev)for(var n of Ev(e))Tv.call(e,n)&&Dv(t,n,e[n]);return t})({},e[1]);const n=e[1];n.batchType||(n.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(t.data,"set",((t,e)=>{e[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const o=this.editor.model,r=o.document,i=[],s=t.map((t=>t.getTransformedByOperations(n))),a=s.flat();for(const t of s){const e=t.filter((t=>t.root!=r.graveyard)).filter((t=>!Bv(t,a)));e.length&&(Ov(e),i.push(e[0]))}i.length&&o.change((t=>{t.setSelection(i,{backward:e})}))}_undo(t,e){const n=this.editor.model,o=n.document;this._createdBatches.add(e);const r=t.operations.slice().filter((t=>t.isDocumentOperation));r.reverse();for(const t of r){const r=t.baseVersion+1,i=Array.from(o.history.getOperations(r)),s=ou([t.getReversed()],i,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let r of s){const i=r.affectedSelectable;i&&!n.canEditAt(i)&&(r=new Kd(r.baseVersion)),e.addOperation(r),n.applyOperation(r),o.history.setOperationAsUndone(t,r)}}}}function Ov(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;ee!==t&&e.containsRange(t,!0)))}class Mv extends Sv{execute(t=null){const e=t?this._stack.findIndex((e=>e.batch==t)):this._stack.length-1,n=this._stack.splice(e,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(n.batch,o);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t)})),this.fire("revert",n.batch,o),this.refresh()}}class Nv extends Sv{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(e,(()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o),this._undo(t.batch,e)})),this.refresh()}}class Pv extends ri{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const t=this.editor,e=t.t;this._undoCommand=new Mv(t),this._redoCommand=new Nv(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",((t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const o=n.batch,r=this._redoCommand.createdBatches.has(o),i=this._undoCommand.createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(r?this._undoCommand.addBatch(o):i||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((t,e,n)=>{this._redoCommand.addBatch(n)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Undo"),keystroke:"CTRL+Z"},{label:e("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class Rv extends ri{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?Ep.undo:Ep.redo,r="ltr"==e.uiLanguageDirection?Ep.redo:Ep.undo;this._addButtonsToFactory("undo",n("Undo"),"CTRL+Z",o),this._addButtonsToFactory("redo",n("Redo"),"CTRL+Y",r)}_addButtonsToFactory(t,e,n,o){const r=this.editor;r.ui.componentFactory.add(t,(()=>{const r=this._createButton(Lm,t,e,n,o);return r.set({tooltip:!0}),r})),r.ui.componentFactory.add("menuBar:"+t,(()=>this._createButton(Ew,t,e,n,o)))}_createButton(t,e,n,o,r){const i=this.editor,s=i.locale,a=i.commands.get(e),c=new t(s);return c.set({label:n,icon:r,keystroke:o}),c.bind("isEnabled").to(a,"isEnabled"),this.listenTo(c,"execute",(()=>{i.execute(e),i.editing.view.focus()})),c}}class Lv extends ri{static get requires(){return[Pv,Rv]}static get pluginName(){return"Undo"}}class jv extends si{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}refresh(){const t=this.editor.model,e=Jr(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&Vv(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document,o=t.selection||n.selection;e.canEditAt(o)&&e.change((t=>{const n=o.getSelectedBlocks();for(const o of n)!o.is("element","paragraph")&&Vv(o,e.schema)&&t.rename(o,"paragraph")}))}}function Vv(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class zv extends si{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}execute(t){const e=this.editor.model,n=t.attributes;let o=t.position;e.canEditAt(o)&&e.change((t=>{if(o=this._findPositionToInsertParagraph(o,t),!o)return;const r=t.createElement("paragraph");n&&e.schema.setAllowedAttributes(r,n,t),e.insertContent(r,o),t.setSelection(r,"in")}))}_findPositionToInsertParagraph(t,e){const n=this.editor.model;if(n.schema.checkChild(t,"paragraph"))return t;const o=n.schema.findAllowedParent(t,"paragraph");if(!o)return null;const r=t.parent,i=n.schema.checkChild(r,"$text");return r.isEmpty||i&&t.isAtEnd?n.createPositionAfter(r):!r.isEmpty&&i&&t.isAtStart?n.createPositionBefore(r):e.split(t,o).position}}const Fv=class extends ri{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new jv(t)),t.commands.add("insertParagraph",new zv(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>Fv.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}};let Uv=Fv;Uv.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);const Hv=Gv;function qv(){const t=["editing","placeholder","get","childCount","fire","view","config","set","3548512muLBqZ","52PMWwHJ","placeholderElement","461030otXpSb","_updatePlaceholder","plugins","4XqYToX","low","58326KzgFKa","create","end","destroy","init","2264862sjPJJb","245qSmOiA","10938FuUhMK","change:placeholder","assign","9YsJsLV","967120lBxBHh","initPlugins","setSelection","name","createRoot","document","initialData","getChild","22674636GNmIFa","defaultPlugins","data","then","model","ready","change","getRoot","11JFjlRJ","focus"];return(qv=function(){return t})()}function Gv(t,e){const n=qv();return(Gv=function(t,e){return n[t-=362]})(t,e)}!function(t,e){const n=Gv,o=t();for(;;)try{if(407037===-parseInt(n(400))/1*(-parseInt(n(386))/2)+-parseInt(n(398))/3*(parseInt(n(391))/4)+-parseInt(n(399))/5*(parseInt(n(393))/6)+-parseInt(n(404))/7+-parseInt(n(385))/8+parseInt(n(403))/9*(parseInt(n(388))/10)+-parseInt(n(375))/11*(-parseInt(n(367))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(qv);const Wv=[kv,J_,X_,vv,I_,Lv,Uv];class Kv extends(G(_p)){constructor(t={}){const e=Gv;(t=Object[e(402)]({},t))[e(390)]||(t[e(390)]=Kv[e(368)]),super(t),this.ui=new PC(this),this[e(384)](e(378),""),this[e(371)][e(364)].on(e(373),(()=>this[e(389)]()),{priority:e(392)}),this.on(e(401),(()=>this[e(389)]())),this[e(371)][e(364)][e(363)]()}[Hv(394)](){const t=Hv,e=this[t(383)][t(379)](t(365))||"";return this[t(405)]()[t(370)]((()=>this.ui[t(397)]()))[t(370)]((()=>this[t(369)][t(397)](e)))[t(370)]((()=>this[t(381)](t(372))))}[Hv(396)](){const t=Hv;return super[t(396)]()[t(370)]((()=>this.ui[t(396)]()))}[Hv(376)](){const t=Hv;this[t(371)][t(373)]((e=>{const n=t,o=this[n(371)][n(364)][n(374)](),r=o&&o[n(366)](o[n(380)]-1);e[n(406)](r,n(395)),this[n(377)][n(382)][n(376)]()}))}[Hv(389)](){const t=Hv,e=this[t(377)][t(382)],n=e[t(364)][t(374)](),o=n[t(366)](0);n[t(380)]>1||!o||"p"!=o[t(362)]?this[t(387)]&&this[t(387)][t(378)]&&(function(t,e){const n=e.document;Ai.has(n)&&t.change((t=>{const o=Ai.get(n),r=o.get(e);t.removeAttribute("data-placeholder",r.hostElement),vi(t,r.hostElement),o.delete(e)}))}(e,this[t(387)]),this[t(387)]=void 0):(this[t(378)]&&(o[t(378)]=this[t(378)]),_i({view:e,element:o,keepOnFocus:!0}),this[t(387)]=o)}}Kv[Hv(368)]=Wv;const Yv=Kv;function Jv(t,e){const n=$v();return(Jv=function(t,e){return n[t-=112]})(t,e)}function $v(){const t=["trim","view","document","ck-comment__input-actions","execute","stop","_editorCreationPromise","ck-comment__input-actions--active","_createSubmitButton","setData","label","1077SengDl","Reply...","low","_initializeFocusCycling","high","add","6539139zZxOzc","ck-comment__input-wrapper","submitLabel","change","model","isEnabled","submit","submitButtonView","170305xdTgdW","showButtons","insertBefore","bindTemplate","placeholder","_createCancelButton","TOO_LONG_COMMENT_ALERT","Reply","value","editorReady","cancelButtonView","313744NaccPi","extendTemplate","editorDestroyed","ck-comment__input-actions--cancel","disabledSubmit","focusPrevious","ck-comment__input-actions--submit","focus","fire","setTemplate","144foAgrP","length","keystrokes","create","shift + tab","destroy","_editorConfig","withText","cancel","132CMuqRl","Esc","forEach","1488146DjVqgm","tab","editor","createEditor","render","element","112PmKuKf","div","bind","110124PfCafW","10ukctyV","518589KWjosH","firstChild","Cancel","80hFNdEA","_isDestroyed","listenTo","then","set","focusNext","getData","focusTracker","initialData"];return($v=function(){return t})()}const Qv=Jv;!function(t,e){const n=Jv,o=t();for(;;)try{if(370546===-parseInt(n(140))/1*(parseInt(n(112))/2)+parseInt(n(117))/3+-parseInt(n(120))/4*(-parseInt(n(154))/5)+parseInt(n(175))/6*(parseInt(n(115))/7)+-parseInt(n(165))/8+parseInt(n(146))/9*(parseInt(n(116))/10)+-parseInt(n(187))/11*(parseInt(n(184))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}($v);class Zv extends wm{constructor(t,e={}){const n=Jv;super(t),this[n(189)]=null,this[n(181)]=e,this[n(177)]=new Qr,this[n(127)]=new $r,this[n(124)](n(162),e[n(128)]||""),this[n(124)](n(169),!1),this[n(124)](n(155),!0),this[n(124)](n(158),xC(t,n(141))),this[n(124)](n(148),xC(t,n(161))),this[n(153)]=this[n(137)](),this[n(164)]=this[n(159)](),this[n(174)]({tag:n(113),attributes:{class:[n(147)]},children:[{tag:n(113),attributes:{class:[n(132),this[n(157)].if(n(155),n(136))]},children:[this[n(153)],this[n(164)]]}]}),this[n(177)][n(124)](n(185),((t,e)=>{const o=n;this[o(164)][o(173)](o(133)),e()})),this.on(n(152),((e,o)=>{const r=n;o[r(176)]>65e3?(alert(xC(t,r(160),[o[r(176)],65e3])),e[r(134)]()):this[r(189)][r(138)]("")}),{priority:n(144)})}[Qv(191)](){const t=Qv;super[t(191)](),this[t(177)][t(122)](this[t(192)]),this[t(127)][t(145)](this[t(192)])}[Qv(190)](){const t=Qv;return this[t(189)]||(this[t(189)]=new Yv(this[t(181)]),this[t(135)]=this[t(189)][t(178)]()[t(123)]((()=>{const e=t;if(this[e(121)])return;const n=this[e(189)];this[e(192)][e(156)](n.ui[e(192)],this[e(192)][e(118)]),n[e(150)][e(131)].on(e(149),(()=>this[e(162)]=n[e(126)]())),n[e(114)](e(158)).to(this),this[e(143)](this[e(189)]),this[e(173)](e(163),this[e(189)])}))),this[t(135)]}[Qv(172)](){const t=Qv;this[t(189)]&&this[t(189)][t(172)]()}async[Qv(180)](){const t=Qv;this[t(121)]||(this[t(121)]=!0,this[t(189)]&&(await this[t(135)],await this[t(189)][t(180)](),this[t(173)](t(167),this[t(189)])),await super[t(180)]())}[Qv(137)](){const t=Qv,{locale:e}=this,n=new Lm(e);return n[t(166)]({attributes:{class:[t(171)]}}),n[t(182)]=!0,n[t(114)](t(139)).to(this,t(148)),n.on(t(133),(()=>{const e=t;this[e(173)](e(152),this[e(162)])})),n[t(114)](t(151)).to(this,t(162),this,t(169),((e,n)=>!n&&!!e[t(129)]())),n}[Qv(159)](){const t=Qv,{locale:e}=this,n=new Lm(e);return n[t(166)]({attributes:{class:[t(168)]}}),n[t(139)]=xC(e,t(119)),n[t(182)]=!0,n.on(t(133),(()=>{const e=t;this[e(189)][e(138)](""),this[e(173)](e(183))})),n}[Qv(143)](t){const e=Qv,n=this[e(127)],o=new Jp;[t.ui[e(130)],this[e(153)],this[e(164)]][e(186)]((t=>{const r=e;o[r(145)](t),n[r(145)](t[r(192)])}));const r=new yg({focusables:o,focusTracker:n});this[e(177)][e(124)](e(188),((t,n)=>{r[e(125)](),n()}),{priority:e(142)}),this[e(177)][e(124)](e(179),((t,n)=>{r[e(170)](),n()}),{priority:e(142)})}}var Xv=tI;function tI(t,e){var n=eI();return(tI=function(t,e){return n[t-=123]})(t,e)}function eI(){var t=["then","change:showInput","ck-comment__input-container--active","setTemplate","ck-thread__input","ck-thread__user","ck-comment__input-container","4771388hyjsdg","showInput","value","set","div","editorReady","280506eZIwTU","2759238jcigOT","isFocused","showButtons","160abWlcp","45704008ORCRTv","848001ZjMnnJ","bind","userView","editorDestroyed","editor","1778788qVernW","destroy","bindTemplate","delegate","createEditor","commentInputView","481214xsvgAG","extendTemplate","focusTracker"];return(eI=function(){return t})()}!function(t,e){for(var n=tI,o=t();;)try{if(854911===-parseInt(n(135))/1+-parseInt(n(129))/2+-parseInt(n(152))/3+-parseInt(n(145))/4+-parseInt(n(155))/5*(parseInt(n(151))/6)+parseInt(n(124))/7+parseInt(n(123))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(eI);class nI extends wm{constructor(t,e,n){var o=tI;super(t),this[o(134)]=new Zv(t,n),this[o(134)][o(125)](o(154)).to(this[o(134)][o(137)],o(153),this[o(134)],o(147),((t,e)=>t||!!e)),this[o(148)](o(146),!1),this.on(o(139),(()=>{var t=o;this[t(146)]&&!this[t(134)][t(128)]&&this[t(134)][t(133)]()})),this[o(134)][o(132)](o(150)).to(this),this[o(134)][o(132)](o(127)).to(this),this[o(126)]=new AA(t,e),this[o(126)][o(136)]({attributes:{class:o(143)}}),this[o(134)][o(136)]({attributes:{class:o(142)}}),this[o(141)]({tag:o(149),attributes:{class:[o(144),this[o(131)].if(o(146),o(140))]},children:[this[o(126)],this[o(134)]]})}[Xv(130)](){var t=Xv;return this[t(134)][t(130)]()[t(138)]((()=>super[t(130)]()))}}function oI(t,e){const n=rI();return(oI=function(t,e){return n[t-=141]})(t,e)}function rI(){const t=["812961NyQNJH","NUMBER_OF_COMMENTS","927887JDuoJi","5275818ZPPGMf","setTemplate","bindTemplate","144508veqeXY","set","608YmweWZ","119995VKmKYR","ck-thread__comment-count","2751816gySNhL","30lTQXmO","212LguHwl","1063826YzAMFP","count"];return(rI=function(){return t})()}!function(t,e){const n=oI,o=t();for(;;)try{if(904759===-parseInt(n(144))/1+-parseInt(n(156))/2+parseInt(n(153))/3+-parseInt(n(155))/4*(parseInt(n(151))/5)+parseInt(n(145))/6+parseInt(n(148))/7*(parseInt(n(150))/8)+parseInt(n(142))/9*(parseInt(n(154))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(rI);class iI extends wm{constructor(t){const e=oI;super(t);const n=this[e(147)];this[e(149)](e(141),void 0),this[e(146)]({tag:"li",attributes:{class:e(152)},children:[{text:n.to(e(141),(n=>xC(t,e(143),n)))}]})}}const sI=cI;function aI(){const t=["change:hasDirtyComment","get","ck-thread__comments","length","isEditMode","collapse","some","formatDateTime","visibleViews","_config","_collapsedCommentsView","viewUid","equal","resolvedAt","isActive","maxThreadTotalWeight","_calculatePosition","72564bLkiwe","7107009yFfFLE","commentUpdated","updateComment","hasDirtyComment","Marked as resolved","insert","focus","destroy","_shouldCollapse","resolveCommentThread","delete","change:isEditMode","createCollection","20yoeBMM","refreshVisibleViews","_findOptimalIndex","_handleInfoComment","resolvedBy","_updateHasDirtyComment","element","resolved","setTemplate","editorReady","count","change:isActive","6571056ppXkFy","5054863CJzFoq","24952xDEqpK","editorConfig","stopListening","resolvedCommentView","set","_handleNewCommentModel","bind","locale","removeComment","1552713ozDxoy","from","editorDestroyed","1061256djBwLL","_rearrangeCollapse","117xUqwlK","weight","24mGNtsm","10LzXqsU","maxCommentCharsWhenCollapsed","expand","4BsaFWr","comments","maxCommentsWhenCollapsed","listenTo","authoredAt","delegate","_model","add","change:isResolved","_rearrangeExpand","CommentView","render","commentViews","_handleRemoveCommentModel","remove"];return(aI=function(){return t})()}function cI(t,e){const n=aI();return(cI=function(t,e){return n[t-=366]})(t,e)}!function(t,e){const n=cI,o=t();for(;;)try{if(603817===parseInt(n(390))/1*(-parseInt(n(426))/2)+-parseInt(n(383))/3*(-parseInt(n(394))/4)+-parseInt(n(391))/5*(-parseInt(n(386))/6)+parseInt(n(427))/7+parseInt(n(374))/8*(-parseInt(n(388))/9)+parseInt(n(440))/10*(-parseInt(n(373))/11)+parseInt(n(372))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(aI);class lI extends wm{constructor(t,e,n){const o=cI;super(t),this[o(378)](o(430),!1),this[o(378)](o(412),e[o(395)][o(412)]),this[o(378)](o(423),!1),this[o(400)]=e,this[o(418)]=n,this[o(406)]=this[o(439)](),this[o(417)]=this[o(439)](),this[o(377)]=null,this[o(419)]=new iI(t),this[o(419)][o(380)](o(370)).to(this,o(412),(t=>t-this[o(418)][o(396)]));for(const t of e[o(395)])this[o(379)](t);this[o(443)](),this[o(397)](e[o(395)],o(401),((t,e)=>{const n=o,r=this[n(425)](e);this[n(412)]++,this[n(379)](e,r),this[n(441)]()})),this[o(397)](e[o(395)],o(408),((t,e)=>{const n=o;this[n(412)]--,this[n(407)](e),this[n(441)]()})),this[o(397)](e,o(428),(()=>this[o(441)]())),this[o(397)](e,o(402),(()=>this[o(443)]())),this.on(o(371),(()=>this[o(441)]())),this.on(o(409),(()=>this[o(441)]())),this[o(368)]({tag:"ul",attributes:{class:[o(411)]},children:this[o(417)]})}get[sI(435)](){const t=sI;return this[t(400)][t(389)]>this[t(418)][t(424)]&&!this[t(423)]&&!this[t(430)]}[sI(405)](){const t=sI;super[t(405)](),this[t(441)]()}[sI(433)](){const t=sI;this[t(366)][t(433)]()}[sI(434)](){const t=sI;this[t(419)][t(434)]();for(const e of this[t(406)])e[t(434)]();super[t(434)]()}[sI(441)](){const t=sI;this[t(435)]?this[t(387)]():this[t(403)]()}[sI(379)](t,e){const n=sI,o=new(this[n(418)][n(404)])(this[n(381)],t,{maxCommentCharsWhenCollapsed:this[n(418)][n(392)],formatDateTime:this[n(418)][n(416)],editorConfig:this[n(418)][n(375)]});o[n(420)]=t.id,o[n(399)](n(382)).to(this),o[n(399)](n(429)).to(this),o[n(399)](n(436)).to(this),o[n(399)](n(369)).to(this),o[n(399)](n(385)).to(this),this[n(397)](o,n(438),(()=>this[n(445)]())),this[n(406)][n(401)](o,e)}[sI(425)](t){const e=sI,n=this[e(400)][e(442)](t);return this[e(377)]?this[e(377)][e(398)]>t[e(398)]?n-1:n:n-1}[sI(443)](){const t=sI;if(this[t(400)][t(444)]&&this[t(400)][t(422)]){const e={id:t(367),author:this[t(400)][t(444)],authoredAt:this[t(400)][t(422)],content:xC(this[t(381)],t(431)),attributes:{}};this[t(377)]=new(this[t(418)][t(404)])(this[t(381)],e,{maxCommentCharsWhenCollapsed:this[t(418)][t(392)],formatDateTime:this[t(418)][t(416)],editorConfig:this[t(418)][t(375)],isSystemComment:!0}),this[t(406)][t(401)](this[t(377)],this[t(400)][t(442)](e))}else this[t(377)]&&(this[t(406)][t(408)](this[t(377)]),this[t(377)][t(434)](),this[t(377)]=null);this[t(441)]()}[sI(407)](t){const e=sI,n=this[e(406)][e(408)](t.id);this[e(376)](n),n[e(413)]&&this[e(445)](),n[e(434)]()}[sI(445)](){const t=sI;this[t(430)]=Array[t(384)](this[t(406)])[t(415)]((e=>e[t(413)]))}[sI(387)](){const t=sI,e=function(t){const e=cI,n=new Yr;for(const o of t)n[e(401)](o);return n}(this[t(406)]),n=this[t(419)][t(370)];for(let o=1;o<=n;o++)e[t(408)](1);for(const n of e)n[t(414)]();n>0&&e[t(401)](this[t(419)],1),dI(u(Array[t(384)](this[t(417)]),Array[t(384)](e)),this[t(417)],e)}[sI(403)](){const t=sI;dI(u(Array[t(384)](this[t(417)]),Array[t(384)](this[t(406)])),this[t(417)],this[t(406)]);for(const e of this[t(417)])e[t(393)]()}}function dI(t,e,n){const o=sI;let r=0;for(const i of t)switch(i){case o(432):e[o(401)](n[o(410)](r),r),r++;break;case o(437):e[o(408)](r);break;case o(421):r++}}const uI=pI;function hI(){const t=["reopenButtonView","...","hasContext","locale","label","bind","1065113zryMJF","118380CqzPOf","ck-context-wrapper","_attachContextActions","div","tooltip","lastIndexOf","context","contextValue","querySelector","2154483Ermujp","overlay","element","listenTo","_model","fire","108198jgtVMX","mouseenter","isVisible","Reopen","_trimContextValue","isResolvable","classList","isReadOnly","ck-thread__header","add","offsetWidth","Comment was made on an element","ck-context--quotes","render",".ck-context","span","remove","ck-annotation__actions",".ck-context__value","643872fImpnN","reopenCommentThread","ck-context__value","scrollWidth","341414qMHcKR","value","_createReopenButton","3EiCKOz","icon","bindTemplate","length","isResolved","30AYGsNo","883352NBAxEG","isEnabled","setTemplate","substring","mouseleave","ck-context","execute"];return(hI=function(){return t})()}!function(t,e){const n=pI,o=t();for(;;)try{if(127763===parseInt(n(112))/1+-parseInt(n(150))/2*(-parseInt(n(153))/3)+-parseInt(n(159))/4+-parseInt(n(158))/5*(parseInt(n(127))/6)+-parseInt(n(111))/7+parseInt(n(146))/8+parseInt(n(121))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(hI);function pI(t,e){const n=hI();return(pI=function(t,e){return n[t-=103]})(t,e)}class mI extends wm{constructor(t,e){const n=pI;super(t);const o=this[n(155)];this[n(125)]=e,this[n(105)]=this[n(152)](),this[n(110)](n(107)).to(this[n(125)],n(118),(t=>!!t)),this[n(110)](n(119)).to(this[n(125)],n(118),(t=>t&&t[n(151)]?this[n(131)](t[n(151)]):xC(this[n(108)],n(138)))),this[n(161)]({tag:n(115),attributes:{class:[n(135)]},children:[{tag:n(115),attributes:{class:[n(113)]},children:[{tag:n(115),attributes:{class:[n(103),o.if(n(107),n(139))]},children:[{tag:n(142),attributes:{class:[n(148)]},children:[{text:o.to(n(119))}]}]}]},{tag:n(115),attributes:{class:[n(144)]},children:[this[n(105)]]}]})}[uI(140)](){const t=uI;super[t(140)](),this[t(114)]()}[uI(152)](){const t=uI,e=new Lm(this[t(108)]);return e[t(109)]=xC(this[t(108)],t(130)),e[t(116)]=xC(this[t(108)],t(130)),e[t(154)]='',e[t(110)](t(160)).to(this[t(125)],t(134),(t=>!t)),e[t(110)](t(129)).to(this[t(125)],t(132),this[t(125)],t(157),((t,e)=>t&&e)),e.on(t(104),(()=>{const e=t;this[e(126)](e(147),this[e(125)].id)})),e}[uI(131)](t){const e=uI;if(t[e(156)]<150)return t;const n=t[e(117)](" ",147);return t[e(162)](0,n>-1?n:147)+e(106)}[uI(114)](){const t=uI,e=this[t(123)][t(120)](t(141)),n=e[t(120)](t(145));this[t(124)](e,t(128),(()=>{const o=t;n[o(137)]{const n=t;e[n(133)][n(143)](n(122))}))}}const gI=bI;function fI(){const t=["delegate","132930aLQDzd","bind","removeComment","unlinkedAt","334281XahCCD","listenTo","reopenCommentThread","cancel","submitLabel","isDirty","Reply...","_model","432CbFeSW","1208472XvIygD","submitCommentThread","_config","hasDirtyComment","locale","change:isActive","disabledSubmit","destroy","addComment","archivedAt","306198cdFLRP","10oAcevr","updateComment","editorReady","focus","assign","element","commentThreadHeaderView","isResolved","Reply","canComment","fire","commentsListView","editorDestroyed","stop","commentInputView","isUnlinked","submit","removeCommentThread","Comment","showInput","isReadOnly","value","isSubmitted","isResolvable","length","2549905GSGvxR","set","isActive","2066316JvEFTc","CommentView","_localUser","resolveCommentThread","Write a comment...","placeholder","Reply to reopen discussion...","_createCommentThreadInputView","editorConfig","1450414gdkbXT","commentThreadInputView"];return(fI=function(){return t})()}function bI(t,e){const n=fI();return(bI=function(t,e){return n[t-=243]})(t,e)}!function(t,e){const n=bI,o=t();for(;;)try{if(738068===parseInt(n(304))/1+-parseInt(n(264))/2*(parseInt(n(244))/3)+-parseInt(n(253))/4+-parseInt(n(289))/5+parseInt(n(292))/6+-parseInt(n(301))/7+parseInt(n(252))/8*(parseInt(n(263))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(fI);class kI extends wm{constructor(t,e,n,o){const r=bI;super(t),this[r(290)](r(291),!1),this[r(290)](r(249),!1),this[r(251)]=e,this[r(294)]=n,this[r(255)]=o,this[r(270)]=new mI(t,e),this[r(270)][r(303)](r(246)).to(this),this[r(245)](this,r(246),(()=>{this[r(267)]()})),this[r(275)]=new lI(t,e,Object[r(268)]({CommentView:this[r(255)][r(293)]},o)),this[r(275)][r(303)](r(306)).to(this),this[r(275)][r(303)](r(265)).to(this),this[r(275)][r(303)](r(295)).to(this),this[r(275)][r(303)](r(266)).to(this),this[r(275)][r(303)](r(276)).to(this),this[r(275)][r(305)](r(291)).to(this),this[r(245)](this,r(295),(()=>{this[r(267)]()})),this[r(290)](r(288),this[r(275)][r(288)]),this[r(305)](r(288)).to(this[r(275)],r(288)),this[r(302)]=this[r(299)](),this[r(302)][r(303)](r(266)).to(this),this[r(302)][r(303)](r(276)).to(this),this.on(r(306),(()=>this[r(267)]())),this[r(305)](r(249)).to(this[r(275)],r(256),this[r(302)][r(278)],r(285),((t,e)=>t||!!e)),this[r(305)](r(279)).to(e,r(243),(t=>!!t))}[gI(267)](){const t=gI;this[t(269)][t(267)]()}async[gI(260)](){const t=gI;this[t(249)]=!1,this[t(275)][t(260)](),await this[t(302)][t(260)](),super[t(260)]()}[gI(299)](){const t=gI,e=new nI(this[t(257)],this[t(294)],this[t(255)][t(300)]),n=e[t(278)];return e[t(305)](t(283)).to(this,t(291),this[t(251)],t(284),this[t(251)],t(273),this[t(251)],t(262),n,t(285),((t,e,n,o,r)=>!!r||!!o&&n&&!e||t&&n&&!e)),n[t(305)](t(297)).to(this,t(288),this[t(251)],t(287),this[t(251)],t(271),((e,n,o)=>{const r=t;let i;return i=r(o&&n?298:e?250:296),xC(this[r(257)],i)})),n[t(305)](t(248)).to(this,t(288),(e=>xC(this[t(257)],t(e?272:282)))),n.on(t(280),((e,n)=>{const o=t;this[o(274)](o(261),n),this[o(251)][o(271)]&&this[o(251)][o(287)]&&this[o(274)](o(246),this[o(251)].id),this[o(251)][o(286)]||this[o(274)](o(254))})),n.on(t(247),(()=>{this[t(267)]()})),n[t(305)](t(259)).to(this[t(251)],t(284)),n.on(t(247),(e=>{const n=t;0==this[n(288)]&&(this[n(274)](n(281)),e[n(277)]())})),this.on(t(258),((e,o,r)=>{const i=t;r||this[i(288)]||n[i(285)]||this[i(274)](i(281))})),e}}function wI(t,e){const n=AI();return(wI=function(t,e){return n[t-=426]})(t,e)}function AI(){const t=["tooltip","ck-reset_all-excluded","1219718eVNoyt","commentThreadHeaderView","removeCommentThread","ck-thread__container","9hWfSwZ","isVisible","check","Delete comment thread?","isUnlinked","getTemplate","label","createCollection","stop","remove","change:isReadOnly","commentThreadInputView","archivedAt","then","bindTemplate","get","unbind","set","5lhvdFE","isConfirm","_createResolveButton","1679018HbAvnv","setTemplate","cancelConfirm","935984SstKFJ","bind","has","change:archivedAt","14860512DyNFwB","ck-thread--","showConfirm",".ck-thread__container","resolveCommentThread","3976374MTazPB","Write a comment...","ck-thread--remove-confirmation","addMany","_bindFirstCommentView","_boundFirstCommentView","_cancelAllConfirms","icon","containerElement","div","removeButton","7405746SDUpiq","Resolve","placeholder","isResolvable","ck-comment--resolve","_model","add","resolveButton","isActive","length","locale","extendTemplate","ck-thread--unlinked","isEnabled","querySelector","execute","isSystemComment","change:isActive","commentViews","render","isResolved","ck-thread--active","actionIndicator","element","isReadOnly","high","actionBar","commentThreadChildren","ck-thread","fire","commentsListView","listenTo","866456yVTTzG"];return(AI=function(){return t})()}const CI=wI;!function(t,e){const n=wI,o=t();for(;;)try{if(672302===-parseInt(n(431))/1+parseInt(n(456))/2+parseInt(n(468))/3+parseInt(n(428))/4+parseInt(n(453))/5*(parseInt(n(479))/6)+parseInt(n(459))/7+-parseInt(n(463))/8*(parseInt(n(435))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(AI);class _I extends(UA(kI)){constructor(t,e,n,o){const r=wI;super(t,e,n,o),this[r(506)]=this[r(442)](),this[r(506)][r(471)]([this[r(426)],this[r(446)]]),this[r(484)][r(447)]&&this[r(506)][r(485)](this[r(432)],0),this[r(484)].on(r(462),((t,e,n)=>{const o=r;n?this[o(506)][o(461)](this[o(432)])||this[o(506)][o(485)](this[o(432)],0):this[o(506)][o(444)](this[o(432)])})),this[r(452)](r(501),null),this[r(476)]=null,this[r(473)]=null,this[r(489)]=t,this[r(486)]=this[r(455)](),this[r(457)](this[r(440)]()),this.on(r(496),((t,e,n)=>{n||this[r(474)]()})),this[r(427)](this[r(484)],r(445),((t,e,n)=>{n&&this[r(474)]()})),this[r(488)]>0&&this[r(472)](),this[r(427)](this[r(426)][r(497)],r(485),(()=>{this[r(472)]()}))}[CI(440)](){const t=CI,e=this[t(449)];return{tag:t(477),attributes:{class:[t(507),t(430),e.if(t(487),t(500)),e.if(t(439),t(491)),e.if(t(454),t(470)),e.to(t(501),(e=>e?t(464)+e:""))],"data-thread-id":this[t(484)].id,tabindex:-1},children:[{tag:t(477),attributes:{class:t(434)},children:this[t(506)]}]}}[CI(498)](){const t=CI;super[t(498)](),this[t(476)]=this[t(502)][t(493)](t(466))}[CI(474)](){const t=CI;this[t(458)]();for(const e of this[t(426)][t(497)])e[t(458)]()}[CI(472)](){const t=CI,{locale:e}=this,n=this[t(426)][t(497)][t(450)](0);n===this[t(473)]||n[t(495)]||(this[t(473)]=n,this[t(451)](t(501)),this[t(460)](t(501)).to(n,t(501),(e=>t(444)===e?t(444):null)),n[t(481)]=xC(e,t(469)),n[t(478)].on(t(494),(n=>{const o=t;n[o(443)](),this[o(465)](xC(e,o(438)),this[o(476)])[o(448)]((()=>{const t=o;this[t(508)](t(433))}))}),{priority:t(504)}),n[t(505)][t(485)](this[t(486)],0))}[CI(455)](){const t=CI,e=new Lm(this[t(489)]);return e[t(441)]=xC(this[t(489)],t(480)),e[t(429)]=xC(this[t(489)],t(480)),e[t(475)]=Ep[t(437)],e[t(490)]({attributes:{class:t(483)}}),e[t(460)](t(492)).to(this[t(484)],t(503),(t=>!t)),e[t(460)](t(436)).to(this[t(484)],t(482),this[t(484)],t(499),((t,e)=>t&&!e)),e.on(t(494),(()=>{const e=t;this[e(508)](e(467),this[e(484)].id)})),e}}function yI(t,e){var n=EI();return(yI=function(t,e){return n[t-=278]})(t,e)}var vI=yI;!function(t,e){for(var n=yI,o=t();;)try{if(342169===-parseInt(n(281))/1*(parseInt(n(283))/2)+-parseInt(n(299))/3*(parseInt(n(297))/4)+-parseInt(n(286))/5+-parseInt(n(295))/6*(parseInt(n(285))/7)+parseInt(n(291))/8+parseInt(n(282))/9*(parseInt(n(296))/10)+-parseInt(n(278))/11*(-parseInt(n(298))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(EI);class II extends wm{constructor(t){var e=yI;super(t),this[e(280)](e(293),""),this[e(290)]({tag:e(294),attributes:{class:[e(284),e(292)]}})}[vI(288)](){var t=vI;super[t(288)](),this.on(t(289),((e,n,o)=>{var r=t;this[r(279)][r(287)]=o})),this[t(279)][t(287)]=this[t(293)]}}function EI(){var t=["420JAfSZF","4426010yRNQga","991996sJJlAp","112752TJrNLO","6nvQpZe","1441ZVGKRM","element","set","505twtQqT","9kkCCsD","2194DHssrE","ck-comment__content","7217pVVRRD","1478185YkQWsN","innerHTML","render","change:content","setTemplate","691856rncwPo","ck-annotation__content","content","div"];return(EI=function(){return t})()}const xI=DI;function TI(){const t=["set","collapse","884742RUfCKV","isCollapsed","3834128OTnjWA","fire","value","visibleView","element","isReadOnly","4910390bpnvHQ","878KQHaCV","content","editorConfig","isEditMode","add","delegate","locale","disabledSubmit","destroy","4264024TNQZSM","2950FluGqb","initialData","get","remove","createEditor","Save","focus","editorDestroyed","_createCommentInputView","_createCommentContentView","createCollection","bind","once","_config","updateComment","expand","36ocurxH","9306aCVoCP","isSystemComment","switchToEditMode","maxCommentCharsWhenCollapsed","_model","submit","switchToDisplayMode","submitLabel","editorReady","361004tNnjyz","1193xexpSP","cancel"];return(TI=function(){return t})()}function DI(t,e){const n=TI();return(DI=function(t,e){return n[t-=358]})(t,e)}!function(t,e){const n=DI,o=t();for(;;)try{if(584564===-parseInt(n(381))/1*(parseInt(n(394))/2)+-parseInt(n(385))/3+parseInt(n(387))/4+parseInt(n(393))/5+-parseInt(n(370))/6*(parseInt(n(380))/7)+-parseInt(n(403))/8+parseInt(n(371))/9*(parseInt(n(404))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(TI);class SI extends wm{constructor(t,e,n){const o=DI;super(t),this[o(375)]=e,this[o(367)]=n,this[o(372)]=!!this[o(367)][o(372)],this[o(383)](o(397),!1),this[o(383)](o(386),!0),this[o(390)]=this[o(364)](),this[o(390)][o(398)](this[o(363)]())}[xI(369)](){this[xI(386)]=!1}[xI(384)](){const t=xI;this[t(397)]||(this[t(386)]=!0)}[xI(360)](){const t=xI;this[t(391)][t(360)]()}async[xI(402)](){const t=xI;await this[t(390)][t(406)](0)[t(402)](),super[t(402)]()}[xI(373)](){const t=xI;this[t(397)]||(this[t(397)]=!0,this[t(390)][t(407)](0)[t(402)](),this[t(390)][t(398)](this[t(362)]()))}[xI(377)](){const t=xI;this[t(397)]&&(this[t(397)]=!1,this[t(390)][t(407)](0)[t(402)](),this[t(390)][t(398)](this[t(363)]()))}[xI(363)](){const t=xI,e=new II(this[t(400)]);return e[t(365)](t(395)).to(this[t(375)],t(395),this,t(386),((e,n)=>n?NA(e,{limit:this[t(367)][t(374)]}):e)),e}[xI(362)](){const t=xI;this[t(367)][t(396)]||(this[t(367)][t(396)]={}),this[t(367)][t(396)][t(405)]=this[t(375)][t(395)];const e=new Zv(this[t(400)],this[t(367)][t(396)]);return e[t(389)]=this[t(375)][t(395)],e[t(365)](t(401)).to(this[t(375)],t(392)),e[t(378)]=xC(this[t(400)],t(359)),e.on(t(376),((e,n)=>{const o=t;this[o(388)](o(368),this[o(375)].id,n),this[o(377)](),this[o(360)]()})),e.on(t(382),(()=>{const e=t;this[e(377)](),this[e(360)]()})),e[t(366)](t(379),(()=>{e[t(360)]()})),e[t(358)](),e[t(399)](t(379)).to(this),e[t(399)](t(361)).to(this),e}}const OI=BI;function BI(t,e){const n=MI();return(BI=function(t,e){return n[t-=443]})(t,e)}function MI(){const t=["listenTo","render","importWord","Remove","locale","removeButton","4874836TUlDVE","change:isEnabled","setTemplate","then","panelPosition","Edit","pencil","edit","extendTemplate","editButton","mouseleave","showConfirm","span","element","author","authoredAt","EXTERNAL_IMPORT_WORD_AVATAR","isReadOnly","icon","getTemplate","resolvedAt","ck-annotation__info-name","5586700lZrWJk","ck-comment__main","ck-annotation__info","cancelConfirm","ck-comment--remove-confirmation","_model","switchToEditMode","ck-comment__actions--hidden","ck-comment--info","length","withText","isEnabled","visibleView","placeholder","add","userView","dropdown","2051793pauvso","attributes","21TlyFBZ","source","ck-comment__info-name","ck-comment__actions","isEditable","actionIndicator","isRemovable","mouseenter","items","fire","actionBar","panelView","_createEditButton","2afksnD","execute","change:isVisible","ck-comment--remove","addMany","focus","removeComment","change:isRemovable","@external","EXTERNAL_COMMENT","1184759Jyupdm","bindTemplate","blur","getUserViewNotificationText","ck-comment__wrapper","ck-annotation__main","ck-comment__external","Delete comment?","ck-comment__info-time","ck-annotation__actions--hidden","label","ck-comment__info","children","789546PIfnZJ","EXTERNAL_AVATAR","bind","Show more items","set","push","ck-comment--edit","name","isEditMode","div","ck-comment--","_createCommentInputView","ck-annotation__content-wrapper","ck-annotation","creator","ck-comment__user","_config","ck-annotation__actions","threeVerticalDots","ck-annotation__info-time","isSystemComment","buttonView","EXTERNAL_IMPORT_WORD_COMMENT","_createDropdown","21344886igzDjs","Reply...","ck-annotation__user","_createRemoveButton","remove","getExternalCommentNote","isExternal","_attachActions","createCollection","time","ck-comment","some","formatDateTime","5734120SSjkzr","isConfirm","isVisible"];return(MI=function(){return t})()}!function(t,e){const n=BI,o=t();for(;;)try{if(646315===-parseInt(n(446))/1*(parseInt(n(559))/2)+parseInt(n(544))/3+-parseInt(n(505))/4+-parseInt(n(527))/5+-parseInt(n(459))/6*(-parseInt(n(546))/7)+parseInt(n(496))/8+parseInt(n(483))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(MI);class NI extends(UA(SI)){constructor(t,e,n){const o=BI;super(t,e,n),this[o(463)](o(551),null),this[o(463)](o(540),xC(t,o(484))),this[o(461)](o(520)).to(e),this[o(461)](o(525)).to(e),this[o(556)]=this[o(491)](),this[o(479)]||(this[o(514)]=this[o(558)](),this[o(504)]=this[o(486)](),this[o(554)]=this[o(491)](),this[o(554)][o(563)]([this[o(514)],this[o(504)]]),this[o(543)]=this[o(482)](),this[o(556)][o(541)](this[o(543)])),this[o(542)]=new AA(t,e[o(519)],this[o(449)]()),this[o(542)][o(513)]({attributes:{class:[o(474),o(485)]}}),this[o(499)](e,o(443),(()=>this[o(530)]())),this[o(507)](this[o(524)]())}[OI(524)](){const t=OI,e=this[t(447)],n=[{tag:t(468),attributes:{class:[t(457),t(529)]},children:[{tag:t(517),children:[{text:this[t(542)][t(466)]}],attributes:{class:[t(548),t(526)]}},{tag:t(492),attributes:{datetime:e.to(t(520)),class:[t(454),t(478)]},children:[{text:e.to(t(520),(e=>this[t(475)][t(495)](e)))}]}]},{tag:t(468),attributes:{class:[t(549),t(476),e.if(t(467),t(534)),e.if(t(467),t(455))]},children:this[t(556)]},{tag:t(468),attributes:{class:[t(471)]},children:this[t(539)]}];return this[t(532)][t(489)]&&n[t(464)]({tag:t(468),attributes:{class:[t(452)]},children:[{text:this[t(488)]()}]}),{tag:"li",attributes:{class:[t(450),e.if(t(497),t(531))],tabindex:-1},children:[{tag:t(468),attributes:{class:[t(493),t(472),e.if(t(467),t(465)),e.if(t(479),t(535)),e.to(t(551),(e=>e?t(469)+e:""))],"data-author-id":this[t(532)][t(519)].id,"data-comment-id":this[t(532)].id},children:[this[t(542)],{tag:t(468),attributes:{class:[t(528),t(451)]},children:n}]}]}}[OI(558)](){const t=OI,e=new Lm(this[t(503)]);return e[t(456)]=xC(this[t(503)],t(510)),e[t(523)]=Ep[t(511)],e[t(537)]=!0,e[t(513)]({attributes:{class:t(465)}}),e[t(461)](t(538)).to(this[t(532)],t(522),(t=>!t)),e[t(461)](t(498)).to(this[t(532)],t(550)),e.on(t(560),(()=>this[t(533)]())),e}[OI(486)](){const t=OI,e=new Lm(this[t(503)]);return e[t(456)]=xC(this[t(503)],t(502)),e[t(523)]='\x3c!--\n\n What you\'re currently looking at is the source code of a legally protected, proprietary software.\n CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,\n all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.\n\n Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n\n!--\x3e\n\n\n',e[t(537)]=!0,e[t(513)]({attributes:{class:t(562)}}),e[t(461)](t(538)).to(this[t(532)],t(522),(t=>!t)),e[t(461)](t(498)).to(this[t(532)],t(552)),e.on(t(560),(()=>{const e=t;this[e(516)](xC(this[e(503)],e(453)),this[e(518)])[e(508)]((()=>{const t=e;this[t(555)](t(565),this[t(532)].id)}))})),e}[OI(482)](){const t=OI,e=nf(this[t(503)]),n=e[t(557)][t(458)],o=new Yg(this[t(503)]),r=(n,r=-1)=>{const i=t,s=new Hg(this[i(503)]);s[i(458)][i(541)](n);const a=r>-1?r:o[i(554)][i(536)];o[i(554)][i(541)](s,a),e[i(499)](n,i(506),(()=>{const t=i;e[t(538)]=[...this[t(554)]][t(494)]((e=>e[t(538)]))})),e[i(499)](n,i(561),(()=>{const t=i;e[t(480)][t(498)]=[...this[t(554)]][t(494)]((e=>e[t(498)]))}))};e[t(509)]="sw",e[t(480)][t(463)]({label:xC(this[t(503)],t(462)),icon:Ep[t(477)]}),e[t(538)]=[...this[t(554)]][t(494)]((e=>e[t(538)])),e[t(480)][t(498)]=[...this[t(554)]][t(494)]((e=>e[t(498)]));for(const e of this[t(554)])r(e);return n[t(541)](o),e[t(499)](this[t(554)],t(541),((t,e,n)=>{r(e,n)})),e[t(499)](this[t(554)],t(487),((e,n,r)=>{const i=t;o[i(554)][i(487)](r)})),e}[OI(490)](t,e){const n=OI,o=t&&t[n(518)];o&&(this[n(499)](o,n(553),(()=>this[n(551)]=e)),this[n(499)](o,n(564),(()=>this[n(551)]=e)),this[n(499)](o,n(515),(()=>this[n(551)]=null)),this[n(499)](o,n(448),(()=>this[n(551)]=null)))}[OI(470)](){const t=OI,e=super[t(470)]();return e[t(461)](t(540)).to(this),e}[OI(488)](){const t=OI;return t(501)===this[t(532)][t(545)][t(444)][t(547)]?xC(this[t(503)],t(481)):xC(this[t(503)],t(445))}[OI(449)](){const t=OI;return this[t(532)][t(489)]?t(501)===this[t(532)][t(545)][t(444)][t(547)]?xC(this[t(503)],t(521),this[t(532)][t(473)][t(466)]):xC(this[t(503)],t(460),this[t(532)][t(473)][t(466)]):null}[OI(500)](){const t=OI;super[t(500)](),this[t(490)](this[t(514)],t(512)),this[t(490)](this[t(504)],t(487))}}var PI=__webpack_require__(2846),RI={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(PI.A,RI);PI.A.locals;var LI=__webpack_require__(2358),jI={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(LI.A,jI);LI.A.locals;var VI=__webpack_require__(3496),zI={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(VI.A,zI);VI.A.locals;function FI(t,e){const n=HI();return(FI=function(t,e){return n[t-=349]})(t,e)}function UI(t){const e=Op(t,30),n=new MutationObserver((t=>{const n=FI;for(const o of t)(n(363)==o[n(355)]&&n(349)==o[n(356)]||n(362)==o[n(355)]||n(364)==o[n(355)])&&e()}));return{attach(t){n[FI(360)](t,{attributes:!0,childList:!0,subtree:!0,characterData:!0})},detach(){const t=FI;n[t(368)](),e[t(359)]()}}}function HI(){const t=["observe","12UiGwSv","childList","attributes","characterData","1182248TOqWBA","22690AmHLGR","43954174kOcPuS","disconnect","7078704pdqkoJ","class","1629OXFwzy","1102325nsfMBl","11628NOanzR","606ujdzZU","229obDewJ","type","attributeName","7ggyiaB","7386ePJrUt","cancel"];return(HI=function(){return t})()}!function(t,e){const n=FI,o=t();for(;;)try{if(899766===parseInt(n(354))/1*(-parseInt(n(358))/2)+-parseInt(n(353))/3*(parseInt(n(352))/4)+-parseInt(n(351))/5+-parseInt(n(369))/6+parseInt(n(357))/7*(parseInt(n(365))/8)+parseInt(n(350))/9*(-parseInt(n(366))/10)+-parseInt(n(367))/11*(-parseInt(n(361))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(HI);var qI=__webpack_require__(9898),GI={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(qI.A,GI);qI.A.locals;const WI=KI;function KI(t,e){const n=YI();return(KI=function(t,e){return n[t-=273]})(t,e)}function YI(){const t=["_updateHeight","detach","Esc","3292709AdPJRY","set","add","_mutationObserver","ck-annotation-wrapper","bindTemplate","mainView","6joHamw","422896zqldWX","type","content","createCollection","element","4697zwkLqE","attach","destroy","isActive","length","setTemplate","focusTracker","6727088eJGpoW","listenTo","4528647jTMkLr","height","clear","isDirty","div","3HmdEGV","targetRect","4338430zSldoK","focus","2912964IFbgSj","41170nnVKXN","4ZamDGX","keystrokes","ck-annotation-wrapper--active","clientHeight","ck-rounded-corners","fire","render"];return(YI=function(){return t})()}!function(t,e){const n=KI,o=t();for(;;)try{if(551076===-parseInt(n(294))/1*(-parseInt(n(312))/2)+-parseInt(n(288))/3*(-parseInt(n(292))/4)+parseInt(n(290))/5+-parseInt(n(311))/6*(parseInt(n(304))/7)+parseInt(n(281))/8+-parseInt(n(283))/9+-parseInt(n(293))/10*(parseInt(n(274))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(YI);class JI extends wm{constructor(t,e){const n=KI;super(t),this.id=g(),this[n(280)]=new $r,this[n(295)]=new Qr,this[n(295)][n(305)](n(303),((t,e)=>this[n(299)](n(303),e))),this[n(305)](n(289),{top:0,right:0,bottom:0,left:0}),this[n(305)](n(284),0),this[n(305)](n(277),!1),this[n(305)](n(286),!1),this[n(305)](n(278),0),this[n(305)](n(313),""),this[n(307)]=UI((()=>this[n(301)]())),this[n(314)]=this[n(315)](),this[n(314)][n(306)](e),this[n(310)]=e;const o=this[n(309)];this[n(279)]({tag:n(287),attributes:{class:["ck",n(308),n(298),o.if(n(277),n(296))],tabindex:-1},children:this[n(314)]})}[WI(300)](){const t=WI;super[t(300)](),this[t(280)][t(306)](this[t(273)]),this[t(295)][t(282)](this[t(273)]),this[t(307)][t(275)](this[t(273)])}[WI(276)](){const t=WI;this[t(314)][t(285)](),this[t(295)][t(276)](),this[t(280)][t(276)](),this[t(307)][t(302)](),super[t(276)]()}[WI(291)](){const t=WI;this[t(273)][t(291)]()}[WI(301)](){const t=WI,e=this[t(273)][t(297)];e&&(this[t(284)]=e)}}const $I=QI;function QI(t,e){const n=XI();return(QI=function(t,e){return n[t-=425]})(t,e)}!function(t,e){const n=QI,o=t();for(;;)try{if(685055===-parseInt(n(439))/1+parseInt(n(463))/2+parseInt(n(448))/3+-parseInt(n(457))/4*(-parseInt(n(453))/5)+parseInt(n(430))/6+parseInt(n(426))/7+-parseInt(n(461))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(XI);class ZI extends(G()){constructor({view:t,target:e,type:n,isVisible:o=!0}){const r=QI;super(),this[r(436)]=t,this[r(436)][r(438)]||this[r(436)][r(450)](),this[r(428)]=n,this[r(433)]=e,ZI[r(452)](this[r(456)]()),this[r(458)]=new Yr([this[r(436)][r(438)]],{idProperty:r(427)}),this[r(458)].on(r(454),((t,e)=>{const n=r;this[n(436)][n(446)][n(454)](e)})),this[r(458)].on(r(431),((t,e)=>{const n=r;this[n(436)][n(446)][n(431)](e)})),this[r(451)](r(464),o)}get[$I(460)](){const t=$I;return t(425)==typeof this[t(428)]?this[t(428)]():this[t(428)]}get[$I(429)](){const t=$I;return this[t(436)][t(466)]}get[$I(447)](){const t=$I,e=this[t(456)]();return ZI[t(452)](e),e}get[$I(432)](){const t=$I,e=this[t(447)];if(null===e)return null;if(e instanceof zo)return e;const n=e[t(455)]((e=>function(e){const n=t;if(e[n(467)])return!0;return!!e[n(441)]()[n(462)](0)}(e)));return 0===n[t(434)]?null:new zo(n[0][t(441)]()[t(462)](0))}get[$I(437)](){const t=$I;return this[t(436)][t(437)]}set[$I(437)](t){const e=$I;this[e(436)][e(437)]=t,this[e(436)][e(466)][e(437)]=t}[$I(449)](){const t=$I;this[t(436)][t(432)]=this[t(432)]}[$I(442)](){const t=$I;this[t(458)][t(465)](),this[t(458)][t(459)](),this[t(465)]()}[$I(468)](){const t=$I;this[t(464)]=!!this[t(432)]}static[$I(452)](t){const e=$I;if(!(null===t||t instanceof zo||Array[e(435)](t)&&t[e(444)]((t=>tE(t)))))throw new w(e(440),null,{target:t})}[$I(456)](){const t=$I,e=t(425)==typeof this[t(433)]?this[t(433)]():this[t(433)];return tE(e)?[e]:e}}function XI(){const t=["_id","_type","innerView","713796UIfPAS","remove","targetRect","_target","length","isArray","view","isActive","element","970367YfbgJy","annotation-invalid-target","getClientRects","destroy","object","every","nodeType","focusTracker","target","2662545HovjdK","updateTargetRect","render","set","_assertCorrectTarget","155tzwhvR","add","filter","_getNormalizedTarget","121468sCQBOH","focusableElements","clear","type","18873472ZqgXnf","item","2181934qjTmYP","isVisible","stopListening","mainView","offsetParent","refreshVisibility","function","6830467QwEKHh"];return(XI=function(){return t})()}function tE(t){const e=$I;return null!==t&&e(443)==typeof t&&e(445)in t&&1===t[e(445)]}const eE=oE;function nE(){const t=["sort","innerView","6608040hTACLc","_sort","refreshPositioning","isFocused","stopListening","remove","660918qtLNPQ","blur","from","updateTargetRect","1852704iZLDnx","set","focus","getByInnerView","left","targetRect","length","top","1376295CISWij","_getOrderInContent","annotationcollection-duplicated-item","getByView","_innerViewToAnnotation","1884TGtDFN","annotationcollection-not-existing-item","_viewToAnnotation","_focusTracker","2487877hTtGPd","280587oWGLOa","has","fire","focusTracker","change:isFocused","1466zRfDlI","get","add","delete","destroy","clear","focusableElements","view","listenTo","getIndex"];return(nE=function(){return t})()}function oE(t,e){const n=nE();return(oE=function(t,e){return n[t-=399]})(t,e)}!function(t,e){const n=oE,o=t();for(;;)try{if(337425===-parseInt(n(423))/1+-parseInt(n(428))/2*(-parseInt(n(418))/3)+parseInt(n(405))/4+parseInt(n(413))/5+-parseInt(n(401))/6+parseInt(n(422))/7+-parseInt(n(440))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nE);class rE extends Yr{constructor(t=[]){const e=oE;super(),this[e(417)]=new Map,this[e(420)]=new Map,this[e(421)]=new $r,this[e(421)].on(e(427),((t,n,o)=>{const r=e;o||this[r(425)](r(402))}));for(const n of t)this[e(430)](n)}get[eE(443)](){const t=eE;return this[t(421)][t(443)]}[eE(430)](t){const e=eE;if(this[e(424)](t))throw new w(e(415),null);this[e(417)][e(406)](t[e(439)],t),this[e(420)][e(406)](t[e(435)],t);for(const n of t[e(434)])this[e(421)][e(430)](n);this[e(436)](t[e(434)],e(430),((t,n)=>{const o=e;this[o(421)][o(430)](n)})),this[e(436)](t[e(434)],e(400),((t,n)=>{const o=e;this[o(421)][o(400)](n)})),this[e(436)](t[e(435)][e(426)],e(427),((n,o,r)=>{const i=e;r&&this[i(425)](i(407),t)})),t[e(404)]();const n=this[e(414)](t[e(435)][e(410)]);return super[e(430)](t,n)}[eE(400)](t){const e=eE;if(!this[e(424)](t))throw new w(e(419),null);this[e(399)](t[e(435)][e(426)]),this[e(399)](t[e(434)]);for(const n of t[e(434)])this[e(421)][e(400)](n);return this[e(420)][e(431)](t[e(435)]),this[e(417)][e(431)](t[e(439)]),super[e(400)](t)}[eE(408)](t){const e=eE;return this[e(417)][e(429)](t)}[eE(416)](t){const e=eE;return this[e(420)][e(429)](t)}[eE(432)](){const t=eE;super[t(433)](),this[t(399)](),this[t(417)][t(433)](),this[t(420)][t(433)](),this[t(421)][t(432)]()}[eE(442)](){const t=eE;for(const e of this)e[t(404)]();this[t(441)]()}[eE(441)](){const t=eE,e=Array[t(403)](this)[t(438)](((e,n)=>iE(e[t(435)][t(410)],n[t(435)][t(410)])));for(let n=e[t(411)]-1;n>0;n--){const o=e[n];n!==this[t(437)](o)&&(this[t(400)](o),this[t(430)](o))}}[eE(414)](t){const e=eE;let n=0;if(!t)return this[e(411)];for(const o of this){const r=o[e(435)][e(410)];if(r){if(iE(t,r)<0)return n;n++}}return n}}function iE(t,e){const n=eE;if(null===t&&null===e)return 0;if(null===t)return-1;if(null===e)return 1;const o=t[n(412)]-e[n(412)];return 0==o?t[n(409)]-e[n(409)]:o}const sE=aE;function aE(t,e){const n=cE();return(aE=function(t,e){return n[t-=377]})(t,e)}function cE(){const t=["_bindAnnotationsToVisibleAnnotations","deactivateAll","Annotations","element","destroy","_removeActiveAnnotation","createAnnotation","142703xwcodJ","_addActiveAnnotation","focusTracker","523638MDyUqp","delete","has","1384dlMCyK","fire","createAnnotationView","isVisible","2856258ioDnst","source","remove","_deactivateAllAnnotations","listenTo","84012maUUBp","set","37450DIqsTa","view","refreshVisibility","_visibleAnnotations","158215ihAard","add","activeAnnotations","8981GHZWCQ","_activateAnnotation","pluginName","collection","refreshPositioning","getByInnerView","change:isVisible","12owdxsa","stopListening","activate"];return(cE=function(){return t})()}!function(t,e){const n=aE,o=t();for(;;)try{if(163212===parseInt(n(401))/1+parseInt(n(377))/2+-parseInt(n(404))/3+parseInt(n(391))/4*(parseInt(n(381))/5)+-parseInt(n(416))/6+parseInt(n(384))/7*(-parseInt(n(407))/8)+parseInt(n(411))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(cE);class lE extends mi{static get[sE(386)](){return sE(396)}constructor(t){const e=sE;super(t),this[e(387)]=new rE,this[e(380)]=new rE,this[e(417)](e(383),new Set),this[e(394)]()}[sE(382)](t){const e=sE;this[e(387)][e(382)](t)}[sE(413)](t){const e=sE;this[e(387)][e(413)](t),t[e(398)]()}[sE(379)](){const t=sE;for(const e of this[t(387)])e[t(379)]()}[sE(388)](){const t=sE;this[t(380)][t(388)]()}[sE(389)](t){const e=sE;return this[e(387)][e(389)](t)}[sE(395)](){const t=sE;this[t(408)](t(414))}[sE(398)](){const t=sE;for(const e of this[t(387)])e[t(398)]();this[t(380)][t(398)](),this[t(387)][t(398)](),super[t(398)]()}[sE(393)](t){const e=sE;this[e(408)](e(385),t)}[sE(400)](t){return new ZI(t)}[sE(409)](t,e){return new JI(t,e)}[sE(402)](t){const e=sE,n=new Set(this[e(383)]);n[e(382)](t),this[e(383)]=n}[sE(399)](t){const e=sE,n=new Set(this[e(383)]);n[e(405)](t),this[e(383)]=n}[sE(394)](){const t=sE,e=this[t(387)],n=this[t(380)];function o(e){const o=t,r=e[o(412)];r[o(410)]&&!n[o(406)](r)?n[o(382)](r):!r[o(410)]&&n[o(406)](r)&&n[o(413)](r),r[o(378)][o(403)][o(413)](r[o(378)][o(397)]),r[o(378)][o(403)][o(382)](r[o(378)][o(397)])}this[t(415)](e,t(382),((e,r)=>{const i=t;r[i(410)]&&n[i(382)](r),this[i(415)](r,i(390),o)})),this[t(415)](e,t(413),((e,r)=>{const i=t;n[i(406)](r)&&n[i(413)](r),this[i(392)](r,i(390),o)}))}}const dE=uE;function uE(t,e){const n=hE();return(uE=function(t,e){return n[t-=170]})(t,e)}function hE(){const t=["editor","attachTo","refreshVisibility","_updateActiveAnnotation","bodyCollectionContainer","commentsrepository-invalid-commentid","change:authoredAt","1151516qcbbTV","admin","author","unlinkedAt","has","CommentThreadView","editorDestroyed","resolvedAt","attributes","setUnlinkedAt","commentUpdated","removeCommentThread","add","_resolveCommentThread","commentsrepository-active-not-attached","init","_isAttached","error","max","removeAttribute","updateComment","_repository","hasCommentThread","commentsrepository-add-comment-thread-internal-error","creator","createdAt","define","removeComment","isReadOnly","stopListening","locale","commentsrepository-active-missing-comment-thread","424UvJUkI","activeCommentThread","delete","set","innerHTML","comments.maxThreadTotalWeight","_readOnlyChannels","write","isDirty","fromCharCode","catch","reduce","destroy","commentsrepository-add-comment-internal-error","values","once","change:isDirty","submitCommentThread","switchReadOnly","comments.editorConfig","editorReady","_add","commentsrepository-resolve-comment-thread-internal-error","setAttribute","isEditable","commentsrepository-add-comment-user-not-exists","setPermissions","commentsrepository-get-comment-invalid-id","CommentView","getComment","commentsrepository-duplicated-comment-thread-id","isResolvable","getUser","updateCommentThread","forbiddenHandler","plugins","_removeCommentThread","56hAhJRT","getPermissions","_createNewComment","_findOptimalIndex","reopen","commentsrepository-invalid-comment-content","archivedAt","focusTracker","33378TJKAcb","highest","1690GNMtWJ","listenTo","bind","authorName","commentsrepository-update-comment-thread-internal-error","join","_bindAnnotationToEditors","isFromAdapter","commentsrepository-reopen-comment-thread-internal-error","commentsrepository-remove-missing-comment","281436LNaVGo","push","remove","getCommentThread","fetchCommentThread","commentsrepository-reopen-comment-thread","weight","model","_updateCommentThread","commentsrepository-resolved-comment-thread","resolveCommentThread","commentId","_permissions","355nZrPft","isActive","56189QqQbci","addCommentThread","commentsrepository-remove-comment-thread-internal-error","getIndex","reopenCommentThread","_viewToController","adapter","addComment","commentThreadInputView","div","modifyAll","288816OamWeW","innerView","focusableElements","commentsrepository-update-comment-missing-comment-thread","change:_readOnlyChannels","fire","commentsrepository-missing-thread-and-adapter","_submitCommentThread","comments.CommentView","view","_hasTargetInContent","getRevision","submit","_getExternalAuthor","threadId","setContext","commentsrepository-invalid-comment-thread-id","commentsrepository-update-comment-internal-error","requires","lowest","from","_unbindEditors","toJSON","pluginName","type","getCommentThreads","commentsrepository-remove-missing-comment-thread","commentsrepository-missing-target","update","1419rAQTWo","setActiveCommentThread","canComment","comments.CommentThreadView","comment","isResolved","_threadToController","Missing comments editor configuration (`comments.editorConfig`). Default configuration will be used instead.","body","assign","commentsrepository-remove-comment-missing-comment-thread","isAttached","resolvedBy","_createCommentThreadView","context","@external","resolve","isRemovable","commentsrepository-invalid-comment-authorid","createCommentThreadController","_attachCommentThread","commentInputView","PENDING_ACTION_COMMENT_THREAD","commentsrepository-fetch-comment-thread","function","commentsrepository-attach-missing-comment-thread","filter","createElement","220ASwTYf","warn","getTime","commentsrepository-adapter-already-set","openNewCommentThread","trim","map","_update","commentsrepository-missing-thread-and-adapter-method","commentsrepository-update-missing-comment","_threads","_reopenCommentThread","_addComment","then","deactivateAll","find","_adapter","commentsrepository-update-comment-invalid-content","10512omILDB","content","textContent","string","_removeComment","activate","commentsrepository-remove-comment-internal-error","noChannel","isSubmitted","CommentsRepository","isExternal","getByInnerView","_detachCommentThread","get","commentsrepository-add-comment-to-missing-comment-thread","_isSubmitted","change:activeAnnotations","addUser","config","comments.maxCommentCharsWhenCollapsed","comments.maxCommentsWhenCollapsed","comments.copyMarkers","getEarlierVisibleRevision","authoredAt","_updateComment","licenseKey","length","focus","afterInit","channelId","change:_permissions","_removeActiveAnnotation","isNaN","commentsrepository-missing-comment-thread","PendingActions","_addCommentThread","_remove","external:","comments"];return(hE=function(){return t})()}!function(t,e){const n=uE,o=t();for(;;)try{if(233207===-parseInt(n(196))/1*(parseInt(n(320))/2)+-parseInt(n(377))/3+parseInt(n(288))/4+parseInt(n(390))/5*(-parseInt(n(365))/6)+parseInt(n(392))/7*(parseInt(n(357))/8)+parseInt(n(242))/9*(parseInt(n(367))/10)+parseInt(n(224))/11*(parseInt(n(403))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(hE);const pE=Symbol(dE(249)),mE={admin:!0,modifyAll:!1,write:!0,resolve:!0};class gE extends mi{static get[dE(185)](){return[lE,Ip,pA]}static get[dE(190)](){return dE(251)}constructor(t){const e=dE;super(t),this[e(234)]=new Map,this[e(202)]=new Map,this[e(397)]=new Map,this[e(323)](e(326),new Set),this[e(323)](e(389),new Map),this[e(267)]=this[e(210)][e(260)][e(255)](e(267));const n=this[e(210)][e(260)];n[e(314)](e(262),2),n[e(314)](e(325),500),n[e(314)](e(261),140),n[e(314)](e(199),_I),n[e(314)](e(175),NI),n[e(255)](e(339))||console[e(225)](e(203))}[dE(303)](){const t=dE,e=this[t(210)][t(355)][t(255)](lE);this[t(323)](t(321),null),this.on(t(393),((e,n)=>this[t(277)](n))),this.on(t(337),((e,n)=>this[t(174)](n))),this.on(t(387),((e,n)=>this[t(301)](n))),this.on(t(387),((e,n)=>this[t(284)](n)),{priority:t(186)}),this.on(t(396),((e,n)=>this[t(235)](n))),this.on(t(396),((e,n)=>this[t(284)](n)),{priority:t(186)}),this.on(t(299),((e,n)=>this[t(356)](n))),this.on(t(353),((e,n)=>this[t(385)](n))),this.on(t(353),((e,n)=>this[t(284)](n)),{priority:t(186)}),this.on(t(399),((e,n)=>this[t(236)](n))),this.on(t(308),((e,n)=>this[t(266)](n))),this.on(t(315),((e,n)=>this[t(246)](n))),this.on(t(399),((e,{threadId:n,isFromAdapter:o})=>{const r=t;if(o)return;const i=this[r(380)](n),s=i&&this[r(202)][r(255)](i);s&&s[r(176)][r(269)]()}),{priority:t(186)}),this[t(368)](e,t(258),((e,n,o)=>{const r=t,i=Array[r(187)](o)[r(230)]((t=>this[r(397)][r(255)](t[r(404)])))[r(222)](Boolean)[0];this[r(321)]=i?i[r(384)]:null}))}[dE(270)](){!function(t){function e(t){const e=uE;return t[e(230)]((t=>String[e(329)](t)))[e(372)]("")}(t=>{const n=uE;function o(t){return e([112,108,117,103,105,110,78,97,109,101])in t}const r=[1,85,78,115,198,255,50,112,83,87,161],i=[127,34,6,211,167,86,146,199,132,160,18];function s(t){return function(t,n){const o=function(t){const n=atob(t),[o,r]=n[e([115,112,108,105,116])](e([45]));try{if(atob(r))return atob(o)}catch(t){}return n}(t),r=Array[e([102,114,111,109])](function(t){const n=new Uint8Array(t[e([108,101,110,103,116,104])]);for(let o=0;o=0;--t)i[t]=o%256,o=parseInt(o/256);let s=null,a=16;const c=new Uint8Array(n),l=[],d=[];!function(){const t=r[e([110,117,109,98,101,114,79,102,82,111,117,110,100,115])][c[e([108,101,110,103,116,104])]];for(let n=0;n<=t;n++)l[e([112,117,115,104])]([0,0,0,0]),d[e([112,117,115,104])]([0,0,0,0]);const n=4*(t+1),o=c[e([108,101,110,103,116,104])]/4,i=u(c);let s;for(let e=0;e>2,l[s][e%4]=i[e],d[t-s][e%4]=i[e];let a,h=0,p=o;for(;p>16&255]<<24^r[e([83])][a>>8&255]<<16^r[e([83])][255&a]<<8^r[e([83])][a>>24&255]^r[e([114,99,111,110])][h]<<24,h+=1;for(let t=1;t>8&255]<<8^r[e([83])][a>>16&255]<<16^r[e([83])][a>>24&255]<<24;for(let t=o/2+1;t>2,c=p%4,l[s][c]=i[u],d[t-s][c]=i[u++],p++}for(let n=1;n>24&255]^r[e([85,50])][a>>16&255]^r[e([85,51])][a>>8&255]^r[e([85,52])][255&a]}();for(let n=0;n=0;e--){if(255!==t[e]){t[e]++;break}t[e]=0}}function p(t){const n=l[e([108,101,110,103,116,104])]-1,o=[0,0,0,0];let i=u(t);for(let t=0;t<4;t++)i[t]^=l[0][t];for(let t=1;t>24&255]^r[e([84,50])][i[(n+1)%4]>>16&255]^r[e([84,51])][i[(n+2)%4]>>8&255]^r[e([84,52])][255&i[(n+3)%4]]^l[t][n];i=o[e([115,108,105,99,101])]()}const s=new Uint8Array(16);let a;for(let t=0;t<4;t++)a=l[n][t],s[4*t]=255&(r[e([83])][i[t]>>24&255]^a>>24),s[4*t+1]=255&(r[e([83])][i[(t+1)%4]>>16&255]^a>>16),s[4*t+2]=255&(r[e([83])][i[(t+2)%4]>>8&255]^a>>8),s[4*t+3]=255&(r[e([83])][255&i[(t+3)%4]]^a);return s}}(r,n,s+256*i))}(t,new Uint8Array([...r,29,221,175,90,231,133,239,240,75,180,...i]))}const a=function(){const t=[{[e([105,100])]:1,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([67,111,109,109,101,110,116,115]),[e([112,108,117,103,105,110,78,97,109,101])]:e([67,111,109,109,101,110,116,115,82,101,112,111,115,105,116,111,114,121]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([108,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([99,104,101,99,107,65,108,115,111])]:[{[e([105,100])]:2,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([84,114,97,99,107,32,67,104,97,110,103,101,115]),[e([112,108,117,103,105,110,78,97,109,101])]:e([84,114,97,99,107,67,104,97,110,103,101,115,69,100,105,116,105,110,103]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([108,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101,70,111,114,84,114,97,99,107,67,104,97,110,103,101,115]),[e([111,112,116,105,111,110,115])]:{[e([97,105,119,115,103,105,99])]:!0,[e([97,105,116,99,100,103,105,108])]:!0,[e([97,105,114,118,105,105,108])]:!0}}],[e([111,112,116,105,111,110,115])]:{[e([97,105,119,115,103,105,99])]:!0,[e([97,105,116,99,100,103,105,108])]:!0,[e([97,105,114,118,105,105,108])]:!0}},{[e([105,100])]:3,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([80,97,103,105,110,97,116,105,111,110]),[e([112,108,117,103,105,110,78,97,109,101])]:e([80,97,103,105,110,97,116,105,111,110,76,111,111,107,117,112]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([112,97,103,105,110,97,116,105,111,110,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101])},{[e([105,100])]:4,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([82,101,118,105,115,105,111,110,32,72,105,115,116,111,114,121]),[e([112,108,117,103,105,110,78,97,109,101])]:e([82,101,118,105,115,105,111,110,115,82,101,112,111,115,105,116,111,114,121]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([108,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101,70,111,114,82,101,118,105,115,105,111,110,72,105,115,116,111,114,121]),[e([111,112,116,105,111,110,115])]:{[e([97,105,119,115,103,105,99])]:!0,[e([97,105,116,99,100,103,105,108])]:!0,[e([97,105,114,118,105,105,108])]:!0}},{[e([105,100])]:5,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([68,111,99,117,109,101,110,116,32,79,117,116,108,105,110,101]),[e([112,108,117,103,105,110,78,97,109,101])]:e([68,111,99,117,109,101,110,116,79,117,116,108,105,110,101,85,73]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([100,111,99,117,109,101,110,116,79,117,116,108,105,110,101,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12]}},{[e([105,100])]:6,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([70,111,114,109,97,116,32,80,97,105,110,116,101,114]),[e([112,108,117,103,105,110,78,97,109,101])]:e([70,111,114,109,97,116,80,97,105,110,116,101,114,85,73]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([102,111,114,109,97,116,80,97,105,110,116,101,114,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12]}},{[e([105,100])]:7,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([83,108,97,115,104,32,67,111,109,109,97,110,100]),[e([112,108,117,103,105,110,78,97,109,101])]:e([83,108,97,115,104,67,111,109,109,97,110,100,85,73]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([115,108,97,115,104,67,111,109,109,97,110,100,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12]}},{[e([105,100])]:8,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([84,97,98,108,101,32,111,102,32,67,111,110,116,101,110,116,115]),[e([112,108,117,103,105,110,78,97,109,101])]:e([84,97,98,108,101,79,102,67,111,110,116,101,110,116,115,69,100,105,116,105,110,103]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([116,97,98,108,101,79,102,67,111,110,116,101,110,116,115,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12]}},{[e([105,100])]:9,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([84,101,109,112,108,97,116,101]),[e([112,108,117,103,105,110,78,97,109,101])]:e([84,101,109,112,108,97,116,101,85,73]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([116,101,109,112,108,97,116,101,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12,14]}},{[e([105,100])]:10,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([80,97,115,116,101,32,102,114,111,109,32,79,102,102,105,99,101,32,69,110,104,97,110,99,101,100]),[e([112,108,117,103,105,110,78,97,109,101])]:e([80,97,115,116,101,70,114,111,109,79,102,102,105,99,101,69,110,104,97,110,99,101,100,73,110,108,105,110,101,114]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([112,97,115,116,101,70,114,111,109,79,102,102,105,99,101,69,110,104,97,110,99,101,100,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12]}},{[e([105,100])]:11,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([65,73,32,65,115,115,105,115,116,97,110,116]),[e([112,108,117,103,105,110,78,97,109,101])]:e([65,73,65,115,115,105,115,116,97,110,116,85,73]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([97,105,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101])},{[e([105,100])]:12,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([80,114,111,100,117,99,116,105,118,105,116,121,32,112,97,99,107])},{[e([105,100])]:13,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([67,97,115,101,32,67,104,97,110,103,101]),[e([112,108,117,103,105,110,78,97,109,101])]:e([67,97,115,101,67,104,97,110,103,101,85,73]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([99,97,115,101,67,104,97,110,103,101,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101]),[e([111,112,116,105,111,110,115])]:{[e([102,103,105])]:[12]}},{[e([105,100])]:14,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([68,114,117,112,97,108,32,112,97,99,107]),[e([102,111,114,98,105,100,100,101,110,72,97,110,100,108,101,114])]:e([102,111,114,98,105,100,100,101,110,72,97,110,100,108,101,114,70,111,114,68,114,117,112,97,108])},{[e([105,100])]:15,[e([102,101,97,116,117,114,101,78,97,109,101])]:e([77,117,108,116,105,32,76,101,118,101,108,32,76,105,115,116]),[e([112,108,117,103,105,110,78,97,109,101])]:e([77,117,108,116,105,76,101,118,101,108,76,105,115,116,69,100,105,116,105,110,103]),[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]:e([109,117,108,116,105,76,101,118,101,108,76,105,115,116,76,105,99,101,110,115,101,75,101,121]),[e([104,97,110,100,108,101,114])]:e([99,104,101,99,107,76,105,99,101,110,115,101])}];return function t(n){n[e([102,111,114,69,97,99,104])]((n=>{n[e([112,101,114,109,105,115,115,105,111,110,77,97,115,107])]=1<t[e([101,120,112,105,114,97,116,105,111,110,68,97,116,101])])return b(n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100]))}return g(t,n)}catch(t){return b(n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100]))}}(t,n),n)},[e([99,104,101,99,107,76,105,99,101,110,115,101,70,111,114,82,101,118,105,115,105,111,110,72,105,115,116,111,114,121])]:function(t,n){const o=i[0]*r[1],s=i[0]*r[2],a=i[2]*r[2];function c(t,n){l(),b(n+e([84,114,105,97,108,76,105,109,105,116,58])+t),window[k()]=t===e([116,105,109,101])?o:s}function l(){const t=d;function n(){y(t,e([82,101,118,105,115,105,111,110,84,114,97,99,107,101,114]))&&(v(t,e([82,101,118,105,115,105,111,110,84,114,97,99,107,101,114]))[e([117,110,98,105,110,100])](e([105,115,69,110,97,98,108,101,100])),v(t,e([82,101,118,105,115,105,111,110,84,114,97,99,107,101,114]))[e([105,115,69,110,97,98,108,101,100])]=!1,v(t,e([82,101,118,105,115,105,111,110,84,114,97,99,107,101,114]))[e([117,112,100,97,116,101])]=C,v(t,e([82,101,118,105,115,105,111,110,84,114,97,99,107,101,114]))[e([115,97,118,101,82,101,118,105,115,105,111,110])]=C,t[e([109,111,100,101,108])][e([99,104,97,110,103,101])]=C,t[e([109,111,100,101,108])][e([101,110,113,117,101,117,101,67,104,97,110,103,101])]=C,t[e([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](e([109,111,100,101,108]))),y(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))&&(v(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))[e([117,110,98,105,110,100])](e([105,115,69,110,97,98,108,101,100])),v(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))[e([105,115,69,110,97,98,108,101,100])]=!1,v(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))[e([99,111,109,112,97,114,101])]=C,v(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))[e([95,103,101,116,68,105,102,102])]=C)}t[e([115,116,97,116,101])]==e([114,101,97,100,121])?n():t[e([111,110,99,101])](e([114,101,97,100,121]),(()=>{const o=uE;if(y(t,e([82,101,118,105,115,105,111,110,84,114,97,99,107,101,114]))&&n(),y(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))){const r=v(t,e([82,101,118,105,115,105,111,110,115,82,101,112,111,115,105,116,111,114,121])),i=r[o(178)](0),s=r[o(264)](i[e([105,100])]);v(t,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))[e([99,111,109,112,97,114,101])](i[e([105,100])],s?s[e([105,100])]:null,1)[o(237)]((()=>n()))}}))}y(d,e([87,101,98,83,111,99,107,101,116,71,97,116,101,119,97,121]))&&v(d,e([87,101,98,83,111,99,107,101,116,71,97,116,101,119,97,121]))[e([115,116,97,116,101])]==e([99,111,110,110,101,99,116,101,100])&&(window[k()]=a),function(t,n){if(t==n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100]))l();else if(t==n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108])){const t=function(){const t=uE;if(!y(d,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114])))return!1;for(const n in window)if(Number[t(274)](Number(n))){if(window[n]===o)return e([116,105,109,101]);if(window[n]===s)return e([114,101,118,105,115,105,111,110,115])}return!1}();t&&c(t,n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]);const a=function(){let t=i[6]*r[8]*r[6];return y(d,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114]))&&(t/=10),t}();window[e([115,101,116,84,105,109,101,111,117,116])]((()=>{c(e([116,105,109,101]),n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])])}),a);const l=v(d,e([82,101,118,105,115,105,111,110,115,82,101,112,111,115,105,116,111,114,121]))[e([95,114,101,118,105,115,105,111,110,115])];l[e([108,101,110,103,116,104])]>=7?c(e([114,101,118,105,115,105,111,110,115]),n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]):l.on(e([97,100,100]),(()=>{l[e([108,101,110,103,116,104])]>=7&&c(e([114,101,118,105,115,105,111,110,115]),n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])])}))}}(function(t,n){try{return function(){const t=uE;if(!y(d,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114])))return!1;for(const e in window)if(Number[t(274)](Number(e))&&window[e]===a)return!0;return!1}()?b(n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([86,97,108,105,100])):g(t,n)}catch(t){return b(n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100]))}}(t,n),n)}},l=t[e([99,111,110,115,116,114,117,99,116,111,114])][e([112,108,117,103,105,110,78,97,109,101])],d=e([99,111,110,116,101,120,116])in t?t[n(210)]:t[n(281)],u=e([52,48,52,56,48,56,51,50]),h=e([65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57]),p=d[n(260)][n(255)](e([108,105,99,101,110,115,101,75,101,121])),m=a[e([102,105,108,116,101,114])](o)[e([102,105,110,100])]((t=>t[e([112,108,117,103,105,110,78,97,109,101])]===l));function g(t,o){try{return function(t){if(!y(d,t[e([112,108,117,103,105,110,78,97,109,101])]))return!0;const n=t[e([111,112,116,105,111,110,115])]||{},o=n[e([97,105,119,115,103,105,99])]||!1,r=n[e([97,105,116,99,100,103,105,108])]||!1,i=n[e([97,105,114,118,105,105,108])]||!1;return!(!y(d,e([87,101,98,83,111,99,107,101,116,71,97,116,101,119,97,121]))||v(d,e([87,101,98,83,111,99,107,101,116,71,97,116,101,119,97,121]))[e([115,116,97,116,101])]!=e([99,111,110,110,101,99,116,101,100])||!o)||(!(!y(d,e([84,114,97,99,107,67,104,97,110,103,101,115,68,97,116,97,71,101,116,116,101,114]))||v(d,e([84,114,97,99,107,67,104,97,110,103,101,115,68,97,116,97,71,101,116,116,101,114]))[e([114,101,115,117,108,116])]!=e([101,110,100])||!r)||!(!y(d,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114,73,110,116,101,103,114,97,116,105,111,110]))||v(d,e([82,101,118,105,115,105,111,110,86,105,101,119,101,114,73,110,116,101,103,114,97,116,105,111,110]))[e([114,101,115,117,108,116])]!=e([101,110,100])||!i))}(o)?b(o[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([86,97,108,105,100])):t&&function(t,o){const r=!!(t&o[e([112,101,114,109,105,115,115,105,111,110,77,97,115,107])]),i=function(t,o){const r=(o[e([111,112,116,105,111,110,115])]||{})[e([102,103,105])]||null;return!!r&&a[e([102,105,108,116,101,114])]((t=>r[e([105,110,99,108,117,100,101,115])](t[e([105,100])])))[e([102,105,108,116,101,114])]((t=>!function(t){const o=n,r={[e([102,111,114,98,105,100,100,101,110,72,97,110,100,108,101,114,70,111,114,68,114,117,112,97,108])]:_};return!!t[o(354)]&&r[t[o(354)]]()}(t)))[e([115,111,109,101])]((n=>!!(t&n[e([112,101,114,109,105,115,115,105,111,110,77,97,115,107])])))}(t,o);return r||i}(t[e([97,108,108,111,119,101,100,80,108,117,103,105,110,115])],o)?t[e([105,115,73,110,116,101,114,110,97,108])]&&!window[e([111,112,101,110])][e([99,108,111,115,101,100])]||parseInt(u)/2>t[e([101,120,112,105,114,97,116,105,111,110,68,97,116,101])]?b(o[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100])):t[e([105,115,84,114,105,97,108])]?b(o[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108])):b(o[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([86,97,108,105,100])):b(o[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100]))}catch(t){return b(o[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100]))}}function f(t,n){if(d instanceof pi){const o=d;t==n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100])?w(o):t==n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108])&&window[e([115,101,116,84,105,109,101,111,117,116])]((()=>{w(o),b(n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108,76,105,109,105,116,58,116,105,109,101]))}),i[6]*r[8]*r[6]),o[e([101,100,105,116,111,114,115])][e([111,110])](e([97,100,100]),((o,r)=>{t!=n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100])&&t!=n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108,76,105,109,105,116,58,116,105,109,101])&&t!=n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108,76,105,109,105,116,58,111,112,101,114,97,116,105,111,110,115])||A(r)}))}else{const o=d;t==n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([73,110,118,97,108,105,100])?A(o):t==n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108])&&o[e([111,110])](e([114,101,97,100,121]),(()=>{let t=0;o[e([109,111,100,101,108])][e([111,110])](e([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),((r,i)=>{i[0][e([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504===t&&(A(o),b(n[e([108,105,99,101,110,115,101,83,116,97,116,117,115,80,114,101,102,105,120])]+e([84,114,105,97,108,76,105,109,105,116,58,111,112,101,114,97,116,105,111,110,115])),r[e([111,102,102])]())}),{priority:e([104,105,103,104,101,115,116])})}))}}function b(t){const e=k();return d[e]=t,t}function k(){const t=String(window[e([112,101,114,102,111,114,109,97,110,99,101])][e([110,111,119])]())[e([114,101,112,108,97,99,101])](e([46]),"");let n="";for(let o=0;o=h[e([108,101,110,103,116,104])]&&(r-=h[e([108,101,110,103,116,104])]),n+=h[r]}return n}function w(t){for(const n of t[e([101,100,105,116,111,114,115])])A(n);v(t,e([67,111,109,109,101,110,116,115,82,101,112,111,115,105,116,111,114,121]))[e([115,119,105,116,99,104,82,101,97,100,79,110,108,121])](!0),v(t,e([67,111,109,109,101,110,116,115,82,101,112,111,115,105,116,111,114,121]))[e([115,119,105,116,99,104,82,101,97,100,79,110,108,121])]=C}function A(t){function n(){t[e([109,111,100,101,108])][e([99,104,97,110,103,101])]=C,t[e([109,111,100,101,108])][e([101,110,113,117,101,117,101,67,104,97,110,103,101])]=C,t[e([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](e([109,111,100,101,108]))}t[e([115,116,97,116,101])]==e([114,101,97,100,121])?n():t[e([111,110,99,101])](e([114,101,97,100,121]),(()=>n()))}function C(){return null}function _(){return!window[e([68,114,117,112,97,108])]||!y(d,e([100,114,117,112,97,108,80,111,119,101,114,101,100,66,121]))}function y(t,n){return t[e([112,108,117,103,105,110,115])][e([104,97,115])](n)}function v(t,n){return t[e([112,108,117,103,105,110,115])][e([103,101,116])](n)}m&&function t(n,o){c[o[e([104,97,110,100,108,101,114])]](n,o),o[e([99,104,101,99,107,65,108,115,111])]&&o[e([99,104,101,99,107,65,108,115,111])][e([102,105,108,116,101,114])]((t=>y(d,t[e([112,108,117,103,105,110,78,97,109,101])])))[e([102,111,114,69,97,99,104])]((e=>t(n,e)))}(function(t){try{const n=s(t),o=JSON[e([112,97,114,115,101])](n),r=parseInt(o[e([49])]),i=o[e([50])]||"",a=parseInt(o[e([51])]),c=parseInt(o[e([52])])||0,l=parseInt(o[e([53])])||0;return{[e([112,114,111,100,117,99,116,78,97,109,101])]:i,[e([97,108,108,111,119,101,100,80,108,117,103,105,110,115])]:c,[e([101,120,112,105,114,97,116,105,111,110,68,97,116,101])]:r,[e([105,115,84,114,105,97,108])]:a,[e([105,115,73,110,116,101,114,110,97,108])]:l}}catch(t){return null}}(p),m)})(t)}(this)}set[dE(398)](t){const e=dE;if(this[e(240)])throw new w(e(227));this[e(240)]=t}get[dE(398)](){return this[dE(240)]}[dE(393)]({channelId:t=pE,threadId:e=g(),comments:n=[],unlinkedAt:o=null,resolvedAt:r=null,resolvedBy:i=null,target:s=null,context:a=null,attributes:c={},isResolvable:l=!0,isSubmitted:d=!1,isFromAdapter:u=!1}={}){const h=dE;return this[h(172)](kE(h(393),t),{channelId:t,threadId:e,comments:n,unlinkedAt:o,resolvedAt:r,resolvedBy:i,target:s,context:a,attributes:c,isFromAdapter:u,isResolvable:l,isSubmitted:d}),this[h(380)](e)}[dE(228)]({channelId:t=pE,threadId:e=g(),target:n,context:o=null,isResolvable:r=!0}){const i=dE;if(this[i(326)][i(292)](t)||this[i(326)][i(292)](void 0))return null;if(!n)throw new w(i(194));const s=this[i(393)]({channelId:t,threadId:e,target:n,context:o,isResolvable:r});if(!s)return null;const a=this[i(202)][i(255)](s),c=a[i(176)][i(400)][i(217)],l=this[i(210)][i(355)][i(255)](lE),d=l[i(253)](a[i(176)]);return l[i(247)](d),c[i(335)](i(340),(()=>c[i(269)]())),s}[dE(310)](t){const e=dE;if(e(245)!=typeof t)throw new w(e(183));return this[e(234)][e(292)](t)}[dE(353)]({channelId:t=pE,threadId:e,context:n,unlinkedAt:o,attributes:r,isFromAdapter:i=!1}){const s=dE;return this[s(172)](kE(s(353),t),{channelId:t,threadId:e,context:n,unlinkedAt:o,attributes:r,isFromAdapter:i}),this[s(380)](e)}[dE(380)](t){const e=dE;if(e(245)!=typeof t)throw new w(e(183));return this[e(234)][e(255)](t)}[dE(381)]({channelId:t,threadId:e}={}){const n=dE,o=this[n(380)](e);if(o)return Promise[n(212)](o);if(!this[n(398)])throw new w(n(173),this[n(210)]);if(n(220)!=typeof this[n(398)][n(380)])throw new w(n(232),this[n(210)]);return this[n(398)][n(380)]({channelId:t,threadId:e})[n(237)]((o=>this[n(310)](e)?this[n(380)](e):o?this[n(393)](Object[n(205)]({isFromAdapter:!0,channelId:t},o)):void 0))[n(330)]((t=>{const e=n;throw console[e(305)](t),new w(e(219),this[e(210)])}))}[dE(192)]({channelId:t,skipNotAttached:e=!1,skipEmpty:n=!1,toJSON:o=!1}={}){const r=dE,i=[];for(const o of this[r(234)][r(334)]())t&&o[r(271)]!==t||e&&!o[r(207)]||n&&0===o[r(268)]||i[r(378)](o);return o?i[r(230)]((t=>t[r(189)]())):i}[dE(197)](t){const e=dE,n=this[e(210)][e(355)][e(255)](lE);if(!t)return void(this[e(321)]&&n[e(238)]());const o=this[e(380)](t);if(!o)throw new w(e(319),null,{threadId:t});if(!this[e(202)][e(292)](o))throw new w(e(302),null,{threadId:t});const r=n[e(253)](this[e(202)][e(255)](o)[e(176)]);n[e(247)](r)}[dE(338)](t,e){const n=dE;t?this[n(326)][n(300)](e):this[n(326)][n(322)](e),this[n(172)](n(171),n(326),this[n(326)],this[n(326)])}[dE(316)](t){const e=dE;return this[e(326)][e(292)](t)||this[e(326)][e(292)](void 0)}[dE(215)](t,e){return new EC(t,e)}[dE(346)](t,e=pE){const n=dE;this[n(389)][n(323)](e,t),this[n(172)](n(272),n(389),this[n(389)],this[n(389)])}[dE(358)](t=pE){const e=dE;return this[e(389)][e(292)](t)?this[e(389)][e(255)](t):mE}[dE(277)]({channelId:t,threadId:e,comments:n,unlinkedAt:o,resolvedAt:r,resolvedBy:i,target:s,context:a,attributes:c,isFromAdapter:l,isResolvable:d,isSubmitted:u}){const h=dE;if(h(245)!=typeof e)throw new w(h(183),null,{threadId:e});if(this[h(310)](e))throw new w(h(350),null,{threadId:e});const p=new fE(this,{channelId:t,id:e,context:a,attributes:c,unlinkedAt:o,resolvedAt:r,resolvedBy:i?this[h(210)][h(355)][h(255)](pA)[h(352)](i):null,isResolvable:d,isSubmitted:u||l});this[h(234)][h(323)](e,p);for(const t of n)p[h(341)](this[h(359)]({threadId:e,...t}));return s&&p[h(282)](s),l||!p[h(268)]?Promise[h(212)]():this[h(174)]({channelId:t,threadId:e})}[dE(174)]({channelId:t,threadId:e}){const n=dE;if(!this[n(310)](e))throw new w(n(275),this);const o=this[n(380)](e);if(o[n(257)]=!0,!this[n(398)]||n(220)!=typeof this[n(398)][n(393)])return Promise[n(212)]();const{id:r,comments:i,resolvedAt:s,resolvedBy:a,context:c,attributes:l}=o,d=this[n(210)][n(355)][n(255)](n(276)),u=d[n(300)](xC(this[n(210)][n(318)],n(218)));return this[n(398)][n(393)]({channelId:t,threadId:r,comments:i[n(230)]((t=>t[n(189)]())),resolvedAt:s,resolvedBy:a?a.id:a,context:c,attributes:l})[n(237)]((({comments:o})=>{const r=n;d[r(379)](u);for(const n of o)this[r(266)]({channelId:t,threadId:e,commentId:n[r(388)],createdAt:n[r(313)],isFromAdapter:!0})}))[n(330)]((t=>{const e=n;throw console[e(305)](t),new w(e(311),this)}))}[dE(216)]({threadId:t,target:e}){const n=dE,o=this[n(380)](t);if(!o)throw new w(n(221),this);const r=this[n(210)][n(355)][n(255)](n(276)),i=this[n(210)][n(355)][n(255)](lE),s=this[n(209)](o),a=new EC(o,s);let c=null;s.on(n(336),((t,e,o)=>{const i=n;o?c=r[i(300)](xC(this[i(210)][i(318)],i(218))):c&&(r[i(379)](c),c=null)})),this[n(202)][n(323)](o,a),this[n(397)][n(323)](s,a);const l=new JI(this[n(210)][n(318)],s);l[n(369)](n(268)).to(s),l[n(369)](n(328)).to(s,n(328),s,n(268),((t,e)=>t||!e)),l[n(369)](n(391)).to(s),l[n(191)]=n(200);const d=new ZI({view:l,target:e,type:n(200),isVisible:!o[n(201)]});return this[n(373)](s,d),i[n(300)](d),d}[dE(373)](t,e){const n=dE;this[n(368)](t,n(340),((t,o)=>{const r=n,i=o.ui[r(176)][r(204)][r(285)];e[r(405)][r(300)](i),this[r(210)]instanceof _p&&this[r(210)].ui[r(364)][r(300)](i)}),{priority:n(366)}),this[n(368)](t,n(294),((t,o)=>{const r=n,i=o.ui[r(176)][r(204)][r(285)];e[r(405)][r(292)](i)&&e[r(405)][r(379)](i),this[r(210)]instanceof _p&&this[r(210)].ui[r(364)][r(379)](i)}))}[dE(188)](t){const e=dE;this[e(317)](t,e(340)),this[e(317)](t,e(294))}[dE(209)](t){const e=dE,n=this[e(210)][e(355)][e(255)](pA),{config:o,locale:r}=this[e(210)],i=xA(o[e(255)](e(318)));return new(0,o[e(255)](e(280))[e(293)])(r,t,n.me,{editorConfig:{...o[e(255)](e(339)),licenseKey:this[e(210)][e(260)][e(255)](e(267))},copyMarkers:o[e(255)](e(263)),maxCommentsWhenCollapsed:o[e(255)](e(262)),maxThreadTotalWeight:o[e(255)](e(325)),maxCommentCharsWhenCollapsed:o[e(255)](e(261)),formatDateTime:i,CommentView:o[e(255)](e(280))[e(348)]})}[dE(301)]({threadId:t,channelId:e,resolvedAt:n,resolvedBy:o,isFromAdapter:r}){const i=dE;if(!this[i(310)](t))throw new w(i(275),null,{threadId:t});const s=this[i(380)](t);if(s[i(201)])throw new w(i(386),null,{threadId:t});const a=this[i(210)][i(355)][i(255)](pA);if(s[i(208)]=a[i(352)](o),s[i(295)]=n,r||!this[i(398)]||i(220)!=typeof this[i(398)][i(387)])return Promise[i(212)]();const c=this[i(210)][i(355)][i(255)](i(276)),l=c[i(300)](xC(this[i(210)][i(318)],i(218)));return this[i(398)][i(387)]({channelId:e,threadId:t})[i(237)]((({resolvedAt:t,resolvedBy:e})=>{const n=i;c[n(379)](l),s[n(208)].id!==e&&(s[n(208)]=a[n(352)](e)),s[n(295)]=t}))[i(330)]((t=>{const e=i;throw console[e(305)](t),new w(e(342),this)}))}[dE(235)]({threadId:t,channelId:e,isFromAdapter:n}){const o=dE;if(!this[o(310)](t))throw new w(o(275),null,{threadId:t});const r=this[o(380)](t);if(!r[o(201)])throw new w(o(382),null,{threadId:t});if(r[o(208)]=null,r[o(295)]=null,n||!this[o(398)]||o(220)!=typeof this[o(398)][o(396)])return Promise[o(212)]();const i=this[o(210)][o(355)][o(255)](o(276)),s=i[o(300)](xC(this[o(210)][o(318)],o(218)));return this[o(398)][o(396)]({channelId:e,threadId:t})[o(237)]((()=>i[o(379)](s)))[o(330)]((t=>{const e=o;throw console[e(305)](t),new w(e(375),this)}))}[dE(356)]({threadId:t,isFromAdapter:e}){const n=dE,o=this[n(380)](t);if(!o)throw new w(n(193),this);if(this[n(254)](t),this[n(234)][n(322)](t),!o[n(250)]||e||!this[n(398)]||n(220)!=typeof this[n(398)][n(299)])return Promise[n(212)]();const r=this[n(210)][n(355)][n(255)](n(276)),{channelId:i}=o,s=r[n(300)](xC(this[n(210)][n(318)],n(218)));return this[n(398)][n(299)]({channelId:i,threadId:t})[n(237)]((()=>r[n(379)](s)))[n(330)]((t=>{const e=n;throw console[e(305)](t),new w(e(394),this)}))}[dE(385)]({threadId:t,unlinkedAt:e,context:n,attributes:o,isFromAdapter:r}){const i=dE;if(i(245)!=typeof t)throw new w(i(183),null,{threadId:t});if(!this[i(310)](t))throw new w(i(275),null,{threadId:t});const s=this[i(380)](t);let a=!1;if(void 0!==n&&s[i(210)]!==n&&(s[i(210)]=n,a=!0),void 0!==e&&s[i(291)]!==e&&(s[i(291)]=e,a=!0),o&&!Gd(o,s[i(296)])&&(s[i(296)]=o,a=!0),!a)return Promise[i(212)]();if(!s[i(250)]||r||!this[i(398)]||i(220)!=typeof this[i(398)][i(353)])return Promise[i(212)]();const c=this[i(210)][i(355)][i(255)](i(276)),{channelId:l}=s,d=c[i(300)](xC(this[i(210)][i(318)],i(218)));return this[i(398)][i(353)]({channelId:l,threadId:t,context:n,unlinkedAt:e,attributes:o})[i(237)]((()=>c[i(379)](d)))[i(330)]((t=>{const e=i;throw console[e(305)](t),new w(e(371),this)}))}[dE(254)](t){const e=dE,n=this[e(210)][e(355)][e(255)](lE),o=this[e(380)](t);if(this[e(202)][e(292)](o)){const t=this[e(202)][e(255)](o),r=t[e(176)],i=n[e(253)](r);this[e(202)][e(322)](o),this[e(397)][e(322)](r),i&&n[e(379)](i),t[e(332)](),r[e(332)]()[e(237)]((()=>{this[e(188)](r)}))}}[dE(284)]({threadId:t,resolvedAt:e}){const n=dE,o=!!e,r=this[n(210)][n(355)][n(255)](lE),i=this[n(380)](t);if(this[n(202)][n(292)](i)){const t=this[n(202)][n(255)](i)[n(176)],e=r[n(253)](t);e&&(o&&r[n(273)](e),e[n(283)]())}}[dE(180)](t){const e=dE,n=this[e(210)][e(355)][e(255)](pA),o=qA(e(279)+t);return n[e(352)](o)||n[e(259)]({id:o,name:t})}[dE(359)]({threadId:t,commentId:e=g(),content:n,authorId:o,createdAt:r,attributes:i}){const s=dE;if(s(245)!=typeof e)throw new w(s(286));if(s(245)!=typeof o)throw new w(s(214));if(s(245)!=typeof n||!n[s(229)]())throw new w(s(362));const a=this[s(210)][s(355)][s(255)](pA)[s(352)](o);if(!a)throw new w(s(345),null,{authorId:o});let c=null,l=r;return i&&i[s(211)]&&(c=this[s(180)](i[s(211)][s(370)]),l=new Date(i[s(211)][s(313)])),new bE(this,{threadId:t,id:e,author:c||a,creator:a,content:n,createdAt:r,authoredAt:l,attributes:i})}[dE(236)](t){const e=dE;let{threadId:n,content:o,attributes:r,isFromAdapter:i}=t;const s=this[e(380)](t[e(181)]);if(!s)throw new w(e(256),this);const a=this[e(359)](t),{id:c}=a;if(s[e(341)](a),i||!this[e(398)]||e(220)!=typeof this[e(398)][e(399)]||!s[e(250)])return Promise[e(212)]();const l=this[e(210)][e(355)][e(255)](e(276)),{channelId:d}=s,u=l[e(300)](xC(this[e(210)][e(318)],e(218)));return r||(r={}),this[e(398)][e(399)]({channelId:d,threadId:n,commentId:c,content:o,attributes:r})[e(237)]((t=>{const o=e;l[o(379)](u),t&&this[o(266)]({channelId:d,threadId:n,commentId:c,createdAt:t[o(313)],isFromAdapter:!0})}))[e(330)]((t=>{const n=e;throw console[n(305)](t),new w(n(333),this)}))}[dE(266)]({threadId:t,commentId:e,content:n,createdAt:o,attributes:r,isFromAdapter:i}){const s=dE;if(void 0!==n&&(s(245)!=typeof n||!n[s(229)]()[s(268)]))throw new w(s(241));const a=this[s(380)](t),c=a[s(349)](e);if(!c)throw new w(s(233),this);let l=!1;if(n&&n!==c[s(243)]&&(c[s(344)]||i)&&(c[s(243)]=n,l=!0),o&&o!==c[s(313)]&&(c[s(313)]=o,c[s(296)]&&c[s(296)][s(211)]||(c[s(265)]=o),l=!0),r&&!Gd(r,c[s(296)])&&(c[s(296)]=r,l=!0),!l)return Promise[s(212)]();if(a[s(172)](s(298)),i||!this[s(398)]||s(220)!=typeof this[s(398)][s(308)])return Promise[s(212)]();const d=this[s(210)][s(355)][s(255)](s(276)),{channelId:u}=this[s(380)](c[s(181)]),h=d[s(300)](xC(this[s(210)][s(318)],s(218)));return this[s(398)][s(308)]({channelId:u,threadId:t,commentId:e,content:n,attributes:r})[s(237)]((()=>d[s(379)](h)))[s(330)]((t=>{const e=s;throw console[e(305)](t),new w(e(184),this)}))}[dE(246)]({threadId:t,commentId:e,isFromAdapter:n}){const o=dE,r=this[o(380)](t),i=r[o(349)](e);if(!i)throw new w(o(376),this);if(r[o(278)](i),n||!this[o(398)]||o(220)!=typeof this[o(398)][o(315)])return Promise[o(212)]();const s=this[o(210)][o(355)][o(255)](o(276)),{channelId:a}=r,c=s[o(300)](xC(this[o(210)][o(318)],o(218)));return this[o(398)][o(315)]({channelId:a,threadId:t,commentId:e})[o(237)]((()=>s[o(379)](c)))[o(330)]((t=>{const e=o;throw console[e(305)](t),new w(e(248),this)}))}}class fE extends(G()){constructor(t,e){const n=dE;super();const o=e[n(351)];this[n(271)]=e[n(271)],this.id=e.id,this[n(280)]=new Yr,this[n(309)]=t,this[n(304)]=!1,this[n(257)]=e[n(250)],this[n(323)](n(177),!0),this[n(369)](n(316)).to(t,n(389),t,n(326),(()=>t[n(316)](this[n(271)]))),this[n(369)](n(213)).to(t,n(389),(()=>t[n(358)](this[n(271)])[n(289)])),this[n(369)](n(198)).to(t,n(389),(()=>{const e=n,o=t[e(358)](this[e(271)]);return o[e(327)]||o[e(289)]})),this[n(369)](n(351)).to(t,n(389),(()=>o&&t[n(358)](this[n(271)])[n(212)])),this[n(323)](n(210),e[n(210)]),this[n(369)](n(363)).to(this,n(295),this,n(291),((t,e)=>t?e?t!!t)),this[n(323)](n(296),e[n(296)]||{})}get[dE(383)](){const t=dE;return Array[t(187)](this[t(280)])[t(331)](((e,n)=>e+n[t(383)]),0)}get[dE(268)](){const t=dE;return this[t(280)][t(268)]}get[dE(207)](){return this[dE(304)]}get[dE(250)](){return this[dE(257)]}[dE(179)](){const t=dE,{channelId:e,id:n}=this;this[t(309)][t(172)](kE(t(337),e),{channelId:e,threadId:n})}[dE(297)](t){this[dE(231)]({unlinkedAt:t})}[dE(212)]({resolvedAt:t=new Date,resolvedBy:e=null,isFromAdapter:n=!1}={}){const o=dE,r=this[o(309)][o(210)][o(355)][o(255)](pA).me,{channelId:i,id:s}=this;this[o(309)][o(172)](kE(o(387),i),{channelId:i,threadId:s,resolvedAt:t,resolvedBy:e||r.id,isFromAdapter:n})}[dE(361)]({isFromAdapter:t=!1}={}){const e=dE,{channelId:n,id:o}=this;this[e(309)][e(172)](kE(e(396),n),{channelId:n,threadId:o,isFromAdapter:t})}[dE(182)](t){const e=dE;this[e(210)]||this[e(231)]({context:t})}[dE(343)](t,e){const n=dE,o=Ec(this[n(296)]);ls(o,t,e),this[n(231)]({attributes:o})}[dE(307)](t){const e=dE,n=Ec(this[e(296)]);ss(n,t),this[e(231)]({attributes:n})}[dE(379)]({isFromAdapter:t=!1}={}){const e=dE,{channelId:n,id:o}=this;this[e(309)][e(172)](kE(e(299),n),{channelId:n,threadId:o,isFromAdapter:t})}[dE(282)](t){const e=dE;return this[e(309)][e(216)]({threadId:this.id,target:t})}[dE(399)](t){const e=dE,{channelId:n,id:o}=this;this[e(309)][e(172)](kE(e(399),n,o),Object[e(205)]({channelId:n,threadId:o},t))}[dE(349)](t){const e=dE;if(e(245)!=typeof t)throw new w(e(347),null,{commentId:t});return this[e(280)][e(255)](t)}[dE(189)](){const t=dE;return{threadId:this.id,context:this[t(210)],unlinkedAt:this[t(291)],resolvedAt:this[t(295)],resolvedBy:this[t(208)]?this[t(208)].id:null,archivedAt:this[t(363)],comments:this[t(280)][t(230)]((e=>e[t(189)]())),attributes:this[t(296)]}}[dE(341)](t){const e=dE;return this[e(368)](t,e(287),(()=>{const n=e,o=this[n(360)](t),r=this[n(280)];o-1!=r[n(395)](t)&&o+1!=r[n(395)](t)&&(this[n(278)](t),this[n(341)](t))})),this[e(280)][e(300)](t,this[e(360)](t))}[dE(231)](t){const e=dE,{channelId:n,id:o}=this;this[e(309)][e(172)](kE(e(353),n),{...t,channelId:n,threadId:o})}[dE(278)](t){const e=dE;return this[e(317)](t),t[e(332)](),this[e(280)][e(379)](t)}[dE(360)](t){const e=dE,n=this[e(280)][e(239)]((n=>new Date(n[e(265)])[e(226)]()>new Date(t[e(265)])[e(226)]()));return n?this[e(280)][e(395)](n):this[e(268)]}}class bE extends(G()){constructor(t,e){const n=dE;super();const o=t[n(210)][n(355)][n(255)](pA).me,r=t[n(380)](e[n(181)]),i=0===r[n(280)][n(268)],s=o===e[n(290)];this.id=e.id,this[n(181)]=e[n(181)],this[n(290)]=e[n(290)],this[n(312)]=e[n(312)],this[n(252)]=Boolean(e[n(296)]&&e[n(296)][n(211)]),this[n(323)](n(243),e[n(243)]),this[n(313)]=e[n(313)]||new Date,this[n(323)](n(265),e[n(265)]||new Date),this[n(369)](n(295)).to(r,n(295)),this[n(323)](n(296),e[n(296)]||{}),this[n(369)](n(344)).to(t,n(389),(()=>{const e=n,o=t[e(358)](r[e(271)])[e(327)],i=t[e(358)](r[e(271)])[e(402)];return s&&o||!s&&i})),this[n(369)](n(213)).to(r,n(213),t,n(389),(e=>{const o=n,a=t[o(358)](r[o(271)])[o(327)],c=t[o(358)](r[o(271)])[o(402)];return s&&a||e&&i||!s&&c&&!i})),this[n(369)](n(316)).to(r,n(316)),this[n(309)]=t}get[dE(383)](){const t=dE;return Math[t(306)](function(e){const n=t,o=document[n(223)](n(401));return o[n(324)]=e,o[n(244)][n(268)]}(this[t(243)]),200)}[dE(195)](t){const e=dE,{threadId:n,id:o}=this;if(!this[e(309)][e(310)](n))throw new w(e(170),this);const{channelId:r}=this[e(309)][e(380)](n);this[e(309)][e(172)](kE(e(308),r,n),{channelId:r,threadId:n,commentId:o,...t})}[dE(343)](t,e){const n=dE,o=Ec(this[n(296)]);ls(o,t,e),this[n(195)]({attributes:o})}[dE(307)](t){const e=dE,n=Ec(this[e(296)]);ss(n,t),this[e(195)]({attributes:n})}[dE(379)](t={}){const e=dE;if(!t[e(374)]&&!this[e(213)])return;const{threadId:n,id:o}=this;if(!this[e(309)][e(310)](n))throw new w(e(206),this);const{channelId:r}=this[e(309)][e(380)](n);this[e(309)][e(172)](kE(e(315),r,n),{channelId:r,threadId:n,commentId:o,...t})}[dE(189)](){const t=dE;return{commentId:this.id,content:this[t(243)],createdAt:this[t(313)],authorId:this[t(312)].id,attributes:this[t(296)]}}[dE(332)](){this[dE(317)]()}}function kE(t,...e){for(const n of e)void 0!==n&&(t+=":"+String(n));return t}const wE=AE;function AE(t,e){const n=CE();return(AE=function(t,e){return n[t-=185]})(t,e)}function CE(){const t=["getItems","element","getLastMatchingPosition","comment:","addMarker","backward","change","document","item","20GuuNfv","3205006jcLsvL","1013655tJxOJs","model","tableCell","_hasContent","createRange","execute","substr","start","schema","selection","1452042ECboMm","146820vBxVsO","2976381sJwVum","386760uQviOx","end","_trimToContent","editor","isObject","$textProxy","isEnabled","19390648kLSvpi","push","_itemIsContent","getRanges","refresh"];return(CE=function(){return t})()}!function(t,e){const n=AE,o=t();for(;;)try{if(512176===parseInt(n(219))/1+-parseInt(n(216))/2+-parseInt(n(218))/3+-parseInt(n(204))/4*(parseInt(n(206))/5)+-parseInt(n(217))/6+parseInt(n(205))/7+parseInt(n(190))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(CE);class _E extends si{[wE(194)](){const t=wE,e=this[t(186)][t(207)][t(202)][t(215)];for(const n of e[t(193)]())if(this[t(209)](n))return void(this[t(189)]=!0);this[t(189)]=!1}[wE(211)]({threadId:t=g()}={}){const e=wE,n=this[e(186)][e(207)],o=[];for(const t of n[e(202)][e(215)][e(193)]())this[e(209)](t)&&o[e(191)](this[e(185)](t));n[e(201)]((n=>{const r=e;for(const e of o){const o=g()[r(212)](1,5),i=r(198)+t+":"+o;n[r(199)](i,{range:e,usingOperation:!1,affectsData:!1})}}))}[wE(209)](t){const e=wE;for(const n of t[e(195)]())if(this[e(192)](n))return!0;return!1}[wE(192)](t){const e=wE;return t.is(e(188))||this[e(186)][e(207)][e(214)][e(187)](t)&&!t.is(e(196),e(208))}[wE(185)](t){const e=wE,n=t=>!this[e(192)](t[e(203)]),o=t[e(213)][e(197)](n),r=t[e(220)][e(197)](n,{direction:e(200)});return this[e(186)][e(207)][e(210)](o,r)}}const yE=IE;function vE(){const t=["4202652yDBHxj","push","directChange","annotation","uiUpdate","from","editorannotations-invalid-source-callback","editing","refresh","hasDomSelection","727196VwbeHf","585KZFJNG","_dataCollectors","_editorAnnotationsData","listenTo","view","18076869RlPDBj","31134RWGibl","add","pluginName","containsRange","delete","set","collection","isCollapsed","has","486603imiAQF","EditorAnnotations","innerView","function","isEqual","map","registerAnnotation","range","4695488UWoxtS","isReadOnly","1244988PJfSDB","blur","focusTracker","addSourceCollector","getRanges","getByInnerView","refreshSelectedViews","getOrderedSelectedAnnotations","update","document","remove","change:range","sort","requires","cancel","fire","_editorAnnotations","selection","init","editor","8KskOxJ","plugins","get","change:isFocused","model","element"];return(vE=function(){return t})()}function IE(t,e){const n=vE();return(IE=function(t,e){return n[t-=341]})(t,e)}!function(t,e){const n=IE,o=t();for(;;)try{if(586344===-parseInt(n(364))/1+-parseInt(n(348))/2+parseInt(n(374))/3+-parseInt(n(400))/4+-parseInt(n(349))/5*(parseInt(n(355))/6)+parseInt(n(372))/7+-parseInt(n(394))/8*(-parseInt(n(354))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(vE);class EE extends ri{static get[yE(387)](){return[lE]}static get[yE(357)](){return yE(365)}constructor(t){const e=yE;super(t),this[e(350)]=new Set,this[e(390)]=new Set}[yE(392)](){const t=yE,e=this[t(393)],n=e[t(398)][t(383)][t(391)],o=Ka((()=>this[t(380)]()),10);n.on(t(385),((e,n)=>{const r=t;n[r(402)]&&(o[r(388)](),this[r(380)]())})),this[t(352)](e[t(345)][t(353)][t(383)],t(397),((t,e,n)=>{n&&o()})),this[t(352)](e.ui[t(376)],t(397),((n,o,r)=>{const i=t;r||e[i(373)]||this[i(389)](i(375),{isAnnotationTracked:t=>this[i(351)][i(363)](t[i(366)])})})),this[t(352)](this[t(393)].ui,t(382),(()=>this[t(389)](t(342))))}[yE(370)](t){const e=yE;if(this[e(390)][e(363)](t[e(353)]))return;this[e(390)][e(356)](t[e(353)]),this[e(393)].ui[e(376)][e(356)](t[e(353)][e(399)]);const n=this[e(393)][e(395)][e(396)](lE);this[e(352)](n[e(361)],e(384),((t,n)=>{const o=e;this[o(393)].ui[o(376)][o(384)](n[o(353)][o(399)]),this[o(390)][o(359)](n[o(353)])}))}[yE(347)](){const t=yE;return this[t(393)][t(345)][t(353)][t(347)]}[yE(377)](t){const e=yE;if(e(367)!=typeof t)throw new w(e(344));this[e(350)][e(356)](t)}[yE(380)](){const t=yE;this[t(389)](t(346))}[yE(381)]({activeAnnotation:t,annotations:e}){const n=yE,o=[],r=this[n(393)][n(398)][n(383)][n(391)],i=Array[n(343)](r[n(378)]());for(const[t,r]of this[n(351)]){const i=s(r),a=e[n(379)](t);i&&a&&o[n(401)]({annotation:a,range:i})}function s(t){const e=n;for(const n of t)for(const t of i)if(n[e(358)](t,!r[e(362)]))return n;return null}return o[n(386)](((e,o)=>{const r=n,i=e[r(371)],s=o[r(371)];if(!i[r(368)](s)){if(i[r(358)](s,!0))return 1;if(s[r(358)](i,!0))return-1}return e[r(341)]==t?-1:o[r(341)]==t?1:0}))[n(369)]((t=>t[n(341)]))}get[yE(351)](){const t=yE,e=new Map;for(const n of Array[t(343)](this[t(350)]))for(const[o,r]of n())e[t(360)](o,r);return e}}function xE(){const t=["48EmnoEq","afterInit","get","6064UOEqjn","enableCommand","addCommentThread","plugins","155aNfIJP","has","1187096cLPTKP","642853JBttqh","editor","1142694ylBNjy","RestrictedEditingModeEditing","3FiTMHQ","6696780psziwp","63927qVxvXv","1708284SnSQeF"];return(xE=function(){return t})()}const TE=DE;function DE(t,e){const n=xE();return(DE=function(t,e){return n[t-=372]})(t,e)}!function(t,e){const n=DE,o=t();for(;;)try{if(360641===parseInt(n(385))/1+-parseInt(n(384))/2*(parseInt(n(389))/3)+parseInt(n(378))/4*(parseInt(n(382))/5)+-parseInt(n(374))/6+-parseInt(n(387))/7+parseInt(n(375))/8*(parseInt(n(373))/9)+parseInt(n(372))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xE);class SE extends ri{[TE(376)](){const t=TE,e=this[t(386)];e[t(381)][t(383)](t(388))&&e[t(381)][t(377)](t(388))[t(379)](t(380))}}const OE=BE;function BE(t,e){const n=NE();return(BE=function(t,e){return n[t-=269]})(t,e)}!function(t,e){const n=BE,o=t();for(;;)try{if(300967===parseInt(n(291))/1*(-parseInt(n(292))/2)+-parseInt(n(282))/3+-parseInt(n(288))/4+parseInt(n(279))/5*(parseInt(n(277))/6)+-parseInt(n(297))/7+parseInt(n(298))/8+-parseInt(n(294))/9*(-parseInt(n(285))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(NE);class ME extends ri{constructor(t){const e=BE;super(t),this[e(274)][e(289)][e(269)](e(276),e(296))}[OE(271)](){const t=OE,e=this[t(274)],n=e[t(273)][t(275)](t(295)),o=e[t(286)][t(275)](pA);n&&(n.on(t(270),((e,[,n])=>{n[t(290)]={comments:!0,user_id:o.me.id}}),{priority:f[t(281)]+10}),this[t(287)](n,t(272),this[t(283)]))}[OE(283)](t,e){const n=OE,{comment_threads:o}=e;o&&o[n(293)]((({thread_id:t,comments:e,is_resolved:o})=>{const r=n,i=new Date,s=e[r(280)]((({author:t,content:e,created_at:n})=>({content:e,authorId:this[r(274)][r(286)][r(275)](pA).me.id,createdAt:i,attributes:{"@external":{authorName:t,createdAt:n?new Date(n):new Date,source:r(295)}}}))),a=this[r(274)][r(289)][r(275)](r(284));this[r(274)][r(286)][r(275)](gE)[r(278)]({channelId:a,threadId:t,comments:s,resolvedAt:o?i:null})}))}}function NE(){const t=["18rqiAIF","importWord","basic","253610NkZBlM","4317360RQaQmy","define","execute","afterInit","dataInsert","commands","editor","get","importWord.formatting.comments","23670FakeLZ","addCommentThread","415LexAnF","map","high","1012806TMoCrv","_handleImportedData","collaboration.channelId","1100760PclCns","plugins","listenTo","1606032rxNXIu","config","collaboration_features","73eRtzxa","300zToaqG","forEach"];return(NE=function(){return t})()}const PE=RE;function RE(t,e){const n=LE();return(RE=function(t,e){return n[t-=456]})(t,e)}function LE(){const t=["_registerMarkerToCopy","comments.copyMarkers","highest","comment","content","never","editor","afterInit","contentInsertion","cut","16NTJDAo","requires","define","split","ClipboardMarkersUtils","_mapCommentsCopyConfigToRegisterConfiguration","has","delete","hasCommentThread","123352yjJkZm","always","plugins","CommentsRepository","listenTo","config","131433AoYaiG","markers","_removeMarkersWithoutThreads","935448AmYLac","1969681PTIQeC","4991931wRacCR","88660SdHHQL","_registerMarkerInClipboardPipeline","15JgydfY","keys","get","ClipboardPipeline","662874omlGci","default","all","dragstart"];return(LE=function(){return t})()}!function(t,e){const n=RE,o=t();for(;;)try{if(213226===-parseInt(n(464))/1+-parseInt(n(484))/2*(parseInt(n(458))/3)+parseInt(n(493))/4+-parseInt(n(466))/5*(parseInt(n(470))/6)+parseInt(n(462))/7+parseInt(n(461))/8+parseInt(n(463))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(LE);class jE extends ri{constructor(t){const e=RE;super(t),this[e(480)][e(457)][e(486)](e(475),e(471))}static get[PE(485)](){return[l_,d_]}[PE(481)](){const t=PE,e=this[t(480)][t(495)][t(468)](t(469));this[t(465)](),this[t(456)](e,t(482),((e,n)=>this[t(460)](n[t(478)][t(459)])),{priority:t(476)})}[PE(460)](t){const e=PE;if(!this[e(480)][e(495)][e(490)](e(496)))return t;const n=this[e(480)][e(495)][e(468)](e(496));for(const o of t[e(467)]()){const[r,i]=o[e(487)](":");e(477)!=r||n[e(492)](i)||t[e(491)](o)}return t}[PE(465)](){const t=PE,e=this[t(480)][t(495)][t(468)](t(488)),n=this[t(489)](this[t(480)][t(457)][t(468)](t(475)));n&&e[t(474)](t(477),n)}[PE(489)](t){const e=PE;switch(t){case e(494):return{allowedActions:e(472),copyPartiallySelected:!1,duplicateOnPaste:!0};case e(471):return{allowedActions:[e(483),e(473)],copyPartiallySelected:!1,duplicateOnPaste:!1};case e(479):default:return null}}}var VE=__webpack_require__(5656),zE={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(VE.A,zE);VE.A.locals;const FE=UE;function UE(t,e){const n=GE();return(UE=function(t,e){return n[t-=225]})(t,e)}!function(t,e){const n=UE,o=t();for(;;)try{if(994063===-parseInt(n(368))/1*(parseInt(n(260))/2)+-parseInt(n(369))/3+parseInt(n(324))/4+parseInt(n(234))/5*(-parseInt(n(272))/6)+-parseInt(n(312))/7*(-parseInt(n(291))/8)+-parseInt(n(338))/9+parseInt(n(304))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(GE);class HE extends ri{static get[FE(264)](){return[gE,EE,SE,ME,jE]}static get[FE(305)](){return FE(345)}constructor(t){const e=FE;super(t),this[e(253)](e(286),!0),t[e(256)][e(263)](e(249),(()=>this[e(286)]=!1)),this[e(253)](e(374),null),this.on(e(307),((n,o,r,i)=>{const s=e,a=r?WE(r).id:null;if(t[s(347)][s(297)]((()=>{const e=s;if(a){const n=this[e(259)](a);for(const o of n)t[e(254)][e(299)](o)}if(i){const{id:n}=WE(i),o=this[e(259)](n);for(const n of o)t[e(254)][e(299)](n)}})),a){const e=t[s(326)][s(352)](gE)[s(228)](a);e&&e[s(273)]&&this[s(294)](a)}})),this[e(226)]()}[FE(246)](){const t=FE,e=this[t(233)],n=e[t(326)][t(352)](gE),o=e[t(349)][t(352)](t(276));e[t(355)][t(243)](t(363),new _E(e)),this[t(229)](e,t(287),((o,r,i)=>{const s=t;n[s(268)](i,e[s(349)][s(352)](s(276)))})),this[t(229)](n,qE(t(363),o),((e,{threadId:n})=>{const o=t,r=this[o(233)][o(326)][o(352)](gE)[o(228)](n);r&&r[o(280)]&&this[o(303)](n)})),this[t(229)](n,qE(t(325),o),((n,{threadId:o})=>{const r=t;e[r(347)][r(283)]({isUndoable:!1},(t=>{const e=r,n=this[e(259)](o);for(const o of n)t[e(250)](o)}))})),this[t(229)](n,qE(t(334),o),((e,{threadId:n})=>{const o=t;this[o(247)](n),this[o(233)][o(254)][o(336)][o(327)]&&(this[o(233)][o(326)][o(352)](gE)[o(228)](n)[o(280)]||this[o(233)][o(254)][o(336)][o(239)]())}),{priority:t(364)}),this[t(229)](n,qE(t(351),o),((e,{threadId:n})=>{this[t(247)](n)}),{priority:t(364)}),this[t(229)](n,qE(t(346),o),((o,{threadId:r,isFromAdapter:i})=>{const s=t,a=this[s(259)](r);!i&&0!=a[s(271)]&&n[s(339)](r)&&1===n[s(228)](r)[s(271)]&&e[s(347)][s(283)]({isUndoable:!1},(t=>{const e=s;for(const n of a)t[e(242)](n,{usingOperation:!0,affectsData:!0})}))}),{priority:t(364)}),this[t(314)](),this[t(309)]()}[FE(315)](){const t=FE,e=this[t(233)][t(326)][t(352)](gE),n=this[t(233)][t(349)][t(352)](t(276));for(const o of e[t(236)]({channelId:n}))e[t(360)](o.id),e[t(320)][t(277)](o.id);super[t(315)]()}[FE(357)](t){const e=FE;return this[e(259)](t)[e(271)]>0}[FE(259)](t){const e=FE,n=[];for(const o of this[e(233)][e(347)][e(274)])o[e(267)][e(230)](e(258)+t)&&n[e(337)](o);return n}[FE(294)](t){const e=FE,n=this[e(361)](t);n&&setTimeout((()=>{const o=e;this[o(374)]&&WE(this[o(374)]).id===t&&rr({target:n[0],viewportOffset:100,alignToTop:!0})}),50)}[FE(247)](t){const e=FE;this[e(233)][e(347)][e(297)]((()=>{const n=e;for(const e of this[n(259)](t))this[n(233)][n(254)][n(299)](e)}))}[FE(303)](t){const e=FE,n=this[e(233)][e(326)][e(352)](gE),o=this[e(233)][e(326)][e(352)](EE),r=n[e(228)](t);if(!r[e(225)]){const t=r[e(311)]((()=>this[e(361)](r.id)));o[e(308)](t),r[e(375)]=!1}}[FE(314)](){const t=FE,e=this[t(233)];e[t(333)][t(235)](t(298))[t(281)]({model:t(301),view:(n,o)=>{const r=t,{id:i}=WE(n[r(367)]),s=e[r(326)][r(352)](gE)[r(228)](i),a=this[r(374)]&&WE(this[r(374)]).id===i;if(s&&s[r(273)]&&!a&&n[r(358)])return o[r(373)][r(362)](n[r(358)],r(350)+n[r(367)]),o[r(373)][r(362)](n[r(358)],r(329)+n[r(367)]),null;const c=[r(289)];return a&&c[r(337)](r(265)),{classes:c,attributes:{"data-comment":i}}}}),e[t(333)][t(235)](t(330))[t(251)]({model:t(301),view:(n,{options:o})=>{const r=t,i=e[r(326)][r(352)](gE),s=e[r(347)][r(274)][r(352)](n),{id:a,part:c}=WE(n);if(s&&!s[r(302)])return null;if(o[r(237)]){const t=i[r(228)](a);if(t&&t[r(273)])return null}return{group:r(301),name:c?a+":"+c:a}}}),e[t(333)][t(235)](t(370))[t(231)]({view:{name:t(301),attributes:{id:/^\w/}},model:(e,{writer:n})=>n[t(241)](t(344),{"data-name":t(258)+e[t(342)]("id")})}),e[t(333)][t(235)](t(370))[t(371)]({view:t(301)})}[FE(309)](){const t=FE,e=this[t(233)],n=e[t(326)][t(352)](gE),o=new Set,r=new Set;e[t(347)][t(341)][t(366)]((n=>{const i=t;let s=!1;for(const{name:t,data:a}of e[i(347)][i(341)][i(356)][i(285)]()){const{group:c,id:l}=WE(t);let d=a[i(313)];if(i(301)!==c||!d)continue;const u=i(332)===d[i(323)][i(288)];u||(d=KE(d,e[i(347)]),!d||d[i(310)]||!a[i(313)]||d[i(290)](a[i(313)]))?e[i(347)][i(232)](d)&&!u?this[i(286)]?o[i(243)](t):this[i(227)](t,l):(r[i(243)](t),o[i(277)](t),n[i(250)](t),s=!0):(n[i(242)](t,{range:d}),s=!0)}return s})),this.on(t(335),((n,r,i)=>{const s=t;if(!i&&o[s(238)])for(const t of o){const{id:n}=WE(t);o[s(277)](t),e[s(347)][s(274)][s(352)](t)&&this[s(227)](t,n)}})),this[t(229)](e[t(347)][t(341)],t(297),((i,s)=>{const a=t;for(const{name:t,data:{newRange:i}}of e[a(347)][a(341)][a(356)][a(285)]()){const{group:s,id:c}=WE(t);if(a(301)!==s)continue;const l=n[a(228)](c),d=this[a(357)](c);l&&(l[a(375)]||e[a(254)][a(336)][a(263)](a(266),(()=>{const t=a,o=e[t(326)][t(352)](lE),r=n[t(353)][t(352)](l)[t(336)];o[t(275)](r)[t(322)]()}),{priority:a(364)}),l[a(375)]=d||!!i),i||(r[a(243)](t),o[a(277)](t))}if(s[a(270)])for(const t of r){const{id:e}=WE(t),r=n[a(228)](e),i=this[a(357)](e);o[a(277)](t),!r||i||r[a(280)]||r[a(354)](new Date)}r[a(269)]()}))}[FE(361)](t){const e=FE,n=this[e(233)],o=this[e(259)](t);return SA(n[e(254)],o)}[FE(257)](t){const e=FE,n=this[e(259)](t);let o="",r=!1;for(const t of n){const n=t[e(282)]();for(const t of Array[e(245)](n[e(278)]()))t.is(e(252))?(o&&r&&(o+=" ",r=!1),o+=t[e(256)]):r=!0;r=!0}return o[e(292)](0,150)}[FE(328)](t,e){const n=FE,o=this[n(233)],r=o[n(326)][n(352)](gE);let i=r[n(228)](e);const s=o[n(349)][n(352)](n(276)),a=o[n(326)][n(352)](EE);return i&&(i[n(280)]&&i[n(354)](null),i[n(225)])||(this[n(259)](e)[0][n(359)]?r[n(348)]({channelId:s,threadId:e})[n(316)]((t=>{const r=n;if(r(343)!==o[r(240)])if(i=t,i&&!i[r(225)]){const t=i[r(311)]((()=>this[r(361)](e)));a[r(308)](t),i[r(273)]&&this[r(247)](e)}else if(!i){const t=this[r(259)](e);o[r(347)][r(297)]((e=>{const n=r;for(const o of t)e[n(250)](o)}))}})):o[n(254)][n(336)][n(263)](n(266),(()=>{const t=n;if(r[t(228)](e))return;const c=o[t(326)][t(352)](lE);i=r[t(244)]({channelId:s,threadId:e,target:()=>this[t(361)](e),context:{type:t(372),value:this[t(257)](e)}});const l=r[t(353)][t(352)](i)[t(336)],d=c[t(275)](l);d&&a[t(308)](d)}),{priority:n(364)})),i}[FE(227)](t,e){const n=FE,o=this[n(328)](t,e);o&&!o[n(300)]&&o[n(279)]({type:n(372),value:this[n(257)](e)})}[FE(226)](){const t=FE,e=this[t(233)];eC(e[t(347)],(({left:n,entered:o})=>{const r=t,i=[];for(const t of n)if(YE(t)){i[r(337)](xC(e[r(317)],r(296)));break}for(const t of o)if(YE(t)){i[r(337)](xC(e[r(317)],r(262)));break}i[r(271)]&&e.ui[r(365)][r(319)](r(340),i[r(284)](" "))}))}}function qE(t,e){return e?t+":"+e:t}function GE(){const t=["isCollapsed","attachTo","14XgCENd","newRange","_initializeMarkerConverters","destroy","then","locale","split","announce","_threads","schema","refreshVisibility","root","3379768bVidal","removeCommentThread","plugins","hasDomSelection","_attachMarkerToThread","removeMarker:","dataDowncast","getWalker","$graveyard","conversion","resolveCommentThread","change:isThreadsLoadingPaused","view","push","16185114OatEtg","hasCommentThread","comments","document","getAttribute","destroyed","$marker","CommentsEditing","addComment","model","fetchCommentThread","config","addMarker:","reopenCommentThread","get","_threadToController","setUnlinkedAt","commands","differ","hasMarkerForId","item","managedUsingOperations","_detachCommentThread","_getTargetForId","consume","addCommentThread","low","ariaLiveAnnouncer","registerPostFixer","markerName","60iguKoZ","4942287YEnQHO","upcast","dataToMarker","text","consumable","activeMarker","_hasTargetInContent","isAttached","_initAriaMarkerChangeAnnouncements","_handleThreadMarker","getCommentThread","listenTo","startsWith","elementToElement","hasContent","editor","3913430eSsCWl","for","getCommentThreads","ignoreResolvedComments","size","focus","state","createElement","updateMarker","add","openNewCommentThread","from","init","_reconvertMarkers","group","ready","removeMarker","markerToData","$textProxy","set","editing","end","data","_getTextContext","comment:","getAllMarkersForId","59234gBsdmg","isObject","ENTER_COMMENT_ANNOUNCEMENT","once","requires","ck-comment-marker--active","render","name","switchReadOnly","clear","isLocal","length","6BiElnD","isResolved","markers","getByInnerView","collaboration.channelId","delete","getItems","setContext","unlinkedAt","markerToHighlight","getRange","enqueueChange","join","getChangedMarkers","isThreadsLoadingPaused","change:isReadOnly","rootName","ck-comment-marker","isEqual","2179168zAVPTA","substring","start","scrollToThreadMarker","createPositionBefore","LEAVE_COMMENT_ANNOUNCEMENT","change","editingDowncast","reconvertMarker","context","comment","affectsData","_attachArchivedThread","56098100vlzelk","pluginName","createRange","change:activeMarker","registerAnnotation","_handleMarkerAddAndRemove"];return(GE=function(){return t})()}function WE(t){const e=t[FE(318)](":");return{group:e[0],id:e[1],part:e[2]}}function KE(t,e){const n=FE,o=e[n(321)],r=e[n(306)](t[n(293)]);for(const i of t[n(331)]()){const{type:t,item:s,nextPosition:a}=i;if(n(372)===t||o[n(261)](s)){const t=e[n(295)](s);r[n(310)]&&(r[n(293)]=t),r[n(255)]=a}}return r}function YE(t){const e=FE;return e(301)===WE(t[e(267)])[e(248)]}const JE='\x3c!--\n\n What you\'re currently looking at is the source code of a legally protected, proprietary software.\n CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,\n all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.\n\n Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n\n!--\x3e\n\n\n';function $E(){const t=["activeMarker","bind","_viewToController","componentFactory","comment","plugins","change:activeAnnotations","getRange","15SwoVvz","isFocused","focusTracker","commands","length","map","2913235NDPlRy","CommentThreadInputView","editing","stop","focus","CommentsUI","find","790497bGCVDp","editor","execute","locale","addCommentThread","addSourceCollector","menuBar:comment","model","comment:","78277IoGqpq","hasCommentThread","add","174482qOTJqL","innerView","2321564ZQuWMF","set","112904IRMjHj","hasMarkerForId","getCommentThread","has","isEnabled","view","requires","getAllMarkersForId","10vtwWjm","low","_createUIButton","pluginName","from","removeCommentThread","Comment","listenTo","highest","addComment","432uQiVJR","get","push","12cXwBxM","_threadToController","init","3250214GLPsbS","CommentsListView","tooltip"];return($E=function(){return t})()}function QE(t,e){const n=$E();return(QE=function(t,e){return n[t-=224]})(t,e)}const ZE=QE;!function(t,e){const n=QE,o=t();for(;;)try{if(923468===-parseInt(n(281))/1+-parseInt(n(286))/2+-parseInt(n(259))/3*(parseInt(n(224))/4)+parseInt(n(265))/5*(parseInt(n(245))/6)+-parseInt(n(284))/7*(-parseInt(n(242))/8)+parseInt(n(272))/9*(parseInt(n(232))/10)+-parseInt(n(248))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}($E);class XE extends ri{static get[ZE(235)](){return ZE(270)}static get[ZE(230)](){return[gE,HE,EE,lE]}get[ZE(249)](){return lI}get[ZE(266)](){return nI}[ZE(247)](){const t=ZE,e=this[t(273)],n=e[t(256)][t(243)](gE),o=e[t(256)][t(243)](HE),r=e[t(256)][t(243)](lE),i=e[t(256)][t(243)](EE);e.ui[t(254)][t(283)](t(255),(()=>{const e=t,n=this[e(234)](Lm);return n[e(250)]=!0,n})),e.ui[t(254)][t(283)](t(278),(()=>this[t(234)](Ew))),i[t(277)]((()=>{const e=t,r=[];for(const[t,i]of n[e(246)]){const n=o[e(231)](t.id),s=n[e(264)]((t=>t[e(258)]()));n[e(263)]>0&&r[e(244)]([i[e(229)],s])}return r})),this[t(239)](r,t(257),((e,r,i)=>{const s=t,a=Array[s(236)](i)[s(264)]((t=>t[s(285)]))[s(271)]((t=>n[s(253)][s(227)](t)));if(!a)return void(o[s(251)]=null);const c=n[s(253)][s(243)](a)[s(279)].id,l=s(280)+c;c&&o[s(225)](c)?o[s(251)]=l:o[s(251)]&&(o[s(251)]=null)})),this[t(239)](n,t(237),((n,{threadId:r,isFromAdapter:i})=>{const s=t;!i&&e.ui[s(261)][s(260)]&&o[s(225)](r)&&e[s(267)][s(229)][s(269)]()}),{priority:t(240)}),this[t(239)](n,t(241),((r,{threadId:i,isFromAdapter:s})=>{const a=t;!s&&o[a(225)](i)&&n[a(282)](i)&&1===n[a(226)](i)[a(263)]&&(e[a(267)][a(229)][a(269)](),r[a(268)]())}),{priority:t(233)})}[ZE(234)](t){const e=ZE,n=this[e(273)],o=new t(n[e(275)]),r=n[e(262)][e(243)](e(276));return o[e(287)]({label:xC(n[e(275)],e(238)),icon:JE}),o[e(252)](e(228)).to(r),this[e(239)](o,e(274),(()=>r[e(274)]())),o}}const tx=ex;function ex(t,e){const n=ox();return(ex=function(t,e){return n[t-=341]})(t,e)}!function(t,e){const n=ex,o=t();for(;;)try{if(782056===parseInt(n(358))/1*(parseInt(n(349))/2)+parseInt(n(380))/3*(-parseInt(n(345))/4)+-parseInt(n(382))/5+parseInt(n(366))/6*(parseInt(n(359))/7)+-parseInt(n(351))/8+-parseInt(n(344))/9+parseInt(n(342))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ox);class nx extends ri{static get[tx(361)](){return tx(378)}static get[tx(341)](){return[HE]}constructor(t){const e=tx;super(t),this[e(348)](e(343),!1),this.on(e(355),((t,n,o)=>{const r=e;o?this[r(353)]():this[r(381)]()}))}[tx(347)](){const t=tx;!this[t(343)]&&this[t(372)][t(362)][t(346)](t(354))&&(this[t(343)]=!0)}[tx(353)](){const t=tx;for(const[e,n]of this[t(372)][t(374)])n[t(364)]&&t(373)!==e&&n[t(367)](t(365));this[t(372)][t(370)][t(376)](t(350))&&this[t(372)][t(370)][t(346)](t(350))[t(367)](t(365));const e=this[t(372)][t(352)][t(368)][t(360)];this[t(375)](e,t(379),(e=>e[t(363)]()),{priority:t(377)}),this[t(375)](e,t(371),(e=>e[t(363)]()),{priority:t(377)}),this[t(375)](e,t(356),(e=>e[t(363)]()),{priority:t(377)})}[tx(381)](){const t=tx;for(const[e,n]of this[t(372)][t(374)])n[t(364)]&&t(373)!==e&&n[t(369)](t(365));this[t(357)](this[t(372)][t(352)][t(368)][t(360)])}}function ox(){const t=["pluginName","config","stop","affectsData","commentsOnlyMode","1734AfNauL","forceDisabled","view","clearForceDisabled","plugins","clipboardInput","editor","addCommentThread","commands","listenTo","has","highest","CommentsOnly","cut","3DQOWQM","_disableCommentsOnlyMode","844755jhnLUW","requires","32857680aPhhya","isEnabled","7444575CoiXeW","5756312TrVVyx","get","afterInit","set","2373258DyeflQ","DragDrop","10431824JFrEWy","editing","_enableCommentsOnlyMode","commentsOnly","change:isEnabled","delete","stopListening","1ZuVJvW","1183qtkBar","document"];return(ox=function(){return t})()}function rx(t,e){const n=sx();return(rx=function(t,e){return n[t-=310]})(t,e)}const ix=rx;function sx(){const t=["317420TZfhLX","171934vsvCeH","1788iQZYYS","annotationsuis-register-invalid-interface","filter","deactivate","_assertAnnotationDoesNotBelongToMultipleUIs","requires","remove","setActiveAnnotation","5DqcQnX","register","activeUIs","function","annotationsuis-annotation-mismatch","_visibleAnnotations","from","get","hasActive","init","set","collection","has","18dnBxwL","annotationsuis-missing-ui","_setSelectedAnnotations","_deactivateAllAnnotations","length","delete","_uisData","_activateAnnotation","context","15zhJEjO","1874775fPqhBm","_uis","push","_addActiveAnnotation","activate","switchTo","_removeActiveAnnotation","activeAnnotations","47960NokXhb","refilterAnnotations","detach","size","plugins","find","stopListening","destroy","change:activeAnnotation","AnnotationsUIs","listenTo","type","isActive","2628234fFkLLs","deactivateAll","pluginName","116195YEAqLm","annotationsuis-register-already-registered","attach","add"];return(sx=function(){return t})()}!function(t,e){const n=rx,o=t();for(;;)try{if(255696===parseInt(n(368))/1+-parseInt(n(312))/2+parseInt(n(343))/3*(-parseInt(n(313))/4)+parseInt(n(321))/5*(parseInt(n(365))/6)+-parseInt(n(344))/7+-parseInt(n(352))/8+parseInt(n(334))/9*(parseInt(n(311))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(sx);class ax extends mi{static get[ix(318)](){return[lE]}static get[ix(367)](){return ix(361)}constructor(t){const e=ix;super(t),this[e(323)]=new Set,this[e(345)]=new Map,this[e(340)]=new Map}[ix(330)](){const t=ix,e=this[t(342)][t(356)][t(328)](lE);this[t(362)](e,t(341),((e,n)=>{const o=t;for(const t of this[o(323)]){const e=this[o(345)][o(328)](t);(0,this[o(340)][o(328)](t)[o(315)])(n)&&e[o(320)](n)}})),this[t(362)](e,t(337),(()=>{const e=t;for(const t of this[e(323)])this[e(345)][e(328)](t)[e(320)](null)})),this[t(362)](e[t(326)],t(310),((e,n)=>{this[t(317)](n)}))}[ix(329)](){const t=ix;return this[t(323)][t(355)]>0}[ix(364)](t){const e=ix;return this[e(323)][e(333)](t)}[ix(348)](t,e=(()=>!0)){const n=ix,o=this[n(342)][n(356)][n(328)](lE);if(!this[n(345)][n(333)](t))throw new w(n(335),this,{uiName:t});this[n(364)](t)&&this[n(316)](t),this[n(323)][n(310)](t);const r=new rE;(function({source:t,target:e,filter:n}){const o=eE;for(const r of t)n(r)&&e[o(430)](r);e[o(436)](t,o(430),((t,r)=>{const i=o;n(r)&&e[i(430)](r)})),e[o(436)](t,o(400),((t,n)=>{const r=o;e[r(424)](n)&&e[r(400)](n)}))})({source:o[n(326)],target:r,filter:e}),this[n(340)][n(331)](t,{collection:r,filter:e});const i=this[n(345)][n(328)](t);i[n(370)](r),this[n(362)](i,n(360),((t,e,r,i)=>{const s=n;i&&o[s(350)](i),r&&o[s(347)](r)}))}[ix(316)](t){const e=ix;if(this[e(323)][e(339)](t),!this[e(345)][e(333)](t))throw new w(e(335),this,{uiName:t});const n=this[e(345)][e(328)](t);n[e(354)](),this[e(358)](n),this[e(340)][e(328)](t)[e(332)][e(359)](),this[e(340)][e(339)](t)}[ix(349)](t){const e=ix;if(!this[e(345)][e(333)](t))throw new w(e(335),this,{uiName:t});const n=this[e(342)][e(356)][e(328)](lE),o=Array[e(327)](n[e(351)])[0]||null;this[e(366)](),this[e(348)](t);const r=this[e(345)][e(328)](t);r[e(320)](o),r[e(336)]&&o&&r[e(336)]([o])}[ix(366)](){const t=ix;for(const e of this[t(323)])this[t(316)](e)}[ix(322)](t,e){const n=ix;if(this[n(345)][n(333)](t))throw new w(n(369));if(n(324)!=typeof e[n(370)]||n(324)!=typeof e[n(354)]||n(324)!=typeof e[n(320)])throw new w(n(314),null);this[n(345)][n(331)](t,e)}[ix(353)](){const t=ix,e=this[t(342)][t(356)][t(328)](lE)[t(332)],n=new Map,o=Array[t(327)](this[t(323)]);for(const e of this[t(323)]){const o=this[t(340)][t(328)](e)[t(332)];for(const r of o)n[t(331)](r,e)}for(const r of e){const e=n[t(328)](r);this[t(317)](r);const i=o[t(357)]((e=>this[t(340)][t(328)](e)[t(315)](r)));e!==i&&(e&&this[t(340)][t(328)](e)[t(332)][t(319)](r),i&&this[t(340)][t(328)](i)[t(332)][t(310)](r))}}[ix(359)](){const t=ix;this[t(366)](),super[t(359)]()}[ix(317)](t){const e=ix,n=[];for(const o of this[e(323)])(0,this[e(340)][e(328)](o)[e(315)])(t)&&n[e(346)](o);if(n[e(338)]>1)throw new w(e(325),null,{matchedUIs:n,annotationType:t[e(363)]})}}var cx=__webpack_require__(201),lx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(cx.A,lx);cx.A.locals;function dx(){const t=["51AYoenK","ck-sidebar","number","bindTemplate","class","3991059OnKilI","minHeight","1937268cwSqCX","8rHHTTh","154AgowsQ","92568GXufEn","createCollection","472mWedDn","set","ck-reset","39487tZAEEe","list","279520IpbsJQ","div","187612sJOeJK","135hlwpgC","setTemplate"];return(dx=function(){return t})()}function ux(t,e){const n=dx();return(ux=function(t,e){return n[t-=434]})(t,e)}!function(t,e){const n=ux,o=t();for(;;)try{if(305867===parseInt(n(438))/1+-parseInt(n(453))/2*(-parseInt(n(441))/3)+parseInt(n(448))/4+parseInt(n(439))/5*(-parseInt(n(451))/6)+-parseInt(n(434))/7*(parseInt(n(449))/8)+parseInt(n(446))/9+-parseInt(n(436))/10*(parseInt(n(450))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(dx);const hx=Yo("px");class px extends wm{constructor(t){const e=ux;super(t);const n=this[e(444)];this[e(454)](e(447),0),this[e(454)](e(445),""),this[e(435)]=this[e(452)](),this[e(440)]({tag:e(437),attributes:{class:["ck",e(442),e(455),n.to(e(445))],style:{minHeight:n.to(e(447),(t=>e(443)==typeof t?hx(t+10):null))}},children:this[e(435)]})}}const mx=gx;function gx(t,e){const n=kx();return(gx=function(t,e){return n[t-=295]})(t,e)}!function(t,e){const n=gx,o=t();for(;;)try{if(656860===parseInt(n(318))/1*(parseInt(n(321))/2)+-parseInt(n(309))/3+-parseInt(n(315))/4+-parseInt(n(316))/5+-parseInt(n(306))/6+-parseInt(n(301))/7*(-parseInt(n(298))/8)+-parseInt(n(310))/9*(-parseInt(n(304))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(kx);const fx=Yo("px");class bx extends wm{constructor(t){const e=gx;super(t),this[e(320)](e(327),0),this[e(320)](e(307),0),this[e(314)](e(305)).to(this,e(327),this,e(307),((t,e)=>t+e)),this[e(320)](e(319),!1),this[e(296)]=UI((()=>this[e(295)]())),this[e(299)]=null,this[e(308)]=this[e(326)]();const n=this[e(324)];this[e(317)]({tag:e(313),attributes:{class:[e(311),n.to(e(319),(t=>t?e(325):""))],style:{top:n.to(e(327),(t=>fx(t)))}},children:this[e(308)]})}[mx(300)](){const t=mx;super[t(300)](),this[t(296)][t(312)](this[t(322)])}[mx(295)](){const t=mx,e=this[t(322)][t(297)];e&&(this[t(307)]=e)}[mx(323)](){const t=mx;this[t(308)][t(303)](),this[t(296)][t(302)](),super[t(323)]()}}function kx(){const t=["top","updateHeight","_mutationObserver","clientHeight","8ZWhTQM","_targetTop","render","4380691XlcgqA","detach","clear","30877070dmUfXp","bottom","7301862HlYVnE","height","content","2855937VGtNvK","9OxHMpA","ck-sidebar-item","attach","div","bind","4124640jozPEE","3292225YMtnHw","setTemplate","21673IQpoOa","isAnimationDisabled","set","74ChnWeK","element","destroy","bindTemplate","ck-sidebar-item--no-animation","createCollection"];return(kx=function(){return t})()}function wx(){const t=["target","_alignForBottomChange","define","4074045pqjTvh","clear","bottom","push","_setItemTop","remove","_alignAfterItem","object","_alignBeforeItem","setContainer","Sidebar","_spaceBetweenItems","stopListening","view","sidebar.container","1916490VJkwhd","destroy","getSidebarItemView","nodeType","context","348964dzdhqq","sidebar-attachtocontainer-missing-container","_alignToTargetRect","_detachFromContainer","change:bottom","locale","render","minHeight","height","addAnnotation","_lastItem","_sidebarItemViewToAnnotation","length","28bZQSnZ","get","_createSidebarView","max","_getItemBefore","unbind","change:_lastItem","_getItemAfter","bind","sidebar.preventScrollOutOfView","add","sidebar-setcontainer-invalid-element","21797xwBWse","_annotationToSidebarItemView","last","config","change:top","container","getIndex","change:targetRect","element","top","_annotations","_recalculate","listenTo","_targetTop","targetRect","2DSOSEL","_attachToContainer","3075777NOyiLT","updateHeight","_updateLastItem","_activeAnnotation","_getTargetTop","set","_recalculateBuffer","isActive","class","_destroySidebarItemView","20EDNrZp","delete","221973UGtrGm","init","_getMaxAvailableTop","pluginName","refresh","appendChild","list","rearrange","isAnimationDisabled","content","_alignForTopChange","1123184vEIRmJ"];return(wx=function(){return t})()}const Ax=Cx;function Cx(t,e){const n=wx();return(Cx=function(t,e){return n[t-=273]})(t,e)}!function(t,e){const n=Cx,o=t();for(;;)try{if(477873===parseInt(n(284))/1+-parseInt(n(299))/2*(parseInt(n(313))/3)+-parseInt(n(348))/4+parseInt(n(328))/5+-parseInt(n(343))/6+-parseInt(n(361))/7*(parseInt(n(324))/8)+parseInt(n(301))/9*(parseInt(n(311))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(wx);class _x extends mi{static get[Ax(316)](){return Ax(338)}constructor(t){const e=Ax;super(t),this[e(306)](e(358),void 0),this[e(341)]=this[e(274)](),this[e(306)](e(289),null),this[e(339)]=25,this[e(359)]=new Map,this[e(285)]=new Map,this[e(347)][e(287)][e(327)](e(281),!1),this[e(294)]=null,this[e(304)]=null,this[e(307)]=[]}[Ax(314)](){const t=Ax,e=this[t(347)][t(287)][t(273)](t(342));e&&this[t(337)](e)}[Ax(337)](t){const e=Ax;if(!vx(t))throw new w(e(283));this[e(289)]=t}[Ax(300)]({viewClass:t="",spaceBetweenItems:e=25}={}){const n=Ax;if(!vx(this[n(289)]))throw new w(n(349),this);this[n(289)][n(318)](this[n(341)][n(292)]),this[n(341)][n(309)]=t,this[n(339)]=e}[Ax(320)]({removedAnnotation:t,previousAnnotation:e,nextAnnotation:n}){const o=Ax,r=this[o(345)](t);this[o(341)][o(319)][o(333)](r),this[o(310)](t),e&&this[o(350)](this[o(345)](e)),n&&this[o(350)](this[o(345)](n)),this[o(303)]()}[Ax(317)]({blurredAnnotation:t,activatedAnnotation:e,disableAnimationOnActivatedAnnotation:n}){const o=Ax;if(this[o(304)]=e,t){t[o(308)]=!1;const e=this[o(345)](t);e&&n&&(e[o(321)]=!1)}if(e){const t=this[o(345)](e);t&&(e[o(308)]=!0,n&&(t[o(321)]=!0,t[o(293)]+=1),this[o(350)](t))}}[Ax(351)](t){const e=Ax;if(this[e(341)][e(292)][e(333)](),t)for(const n of t)this[e(310)](n);this[e(341)][e(319)][e(329)](),this[e(341)][e(309)]="",this[e(358)]=null}[Ax(357)](t,e){const n=Ax;e||(e=t[n(341)]);const o=new bx(this[n(347)][n(353)]);this[n(359)][n(306)](o,t),this[n(285)][n(306)](t,o),o[n(322)][n(282)](e),this[n(296)](t[n(341)],n(291),((e,r,i)=>{const s=n,a=this[s(305)](t,i);o[s(297)]!=a&&(o[s(297)]=a,this[s(332)](o,a))})),this[n(296)](o,n(288),(()=>{const t=n;this[t(295)](o,t(293))})),this[n(296)](o,n(352),(()=>{const t=n;this[t(295)](o,t(330))})),this[n(350)](o);const r=this[n(276)](o);return r&&this[n(334)](r,o)||this[n(350)](o),this[n(303)](),this[n(341)][n(319)][n(282)](o),o}[Ax(323)](t){const e=Ax;if(!t[e(322)][e(360)])return;const n=this[e(276)](t);if(!n)return;const o=this[e(359)][e(273)](n),r=this[e(304)];r&&r===o?this[e(334)](n,t):this[e(336)](t,n)}[Ax(326)](t){const e=Ax;if(!t[e(322)][e(360)])return;const n=this[e(279)](t);if(!n)return;const o=this[e(359)][e(273)](n),r=this[e(347)][e(287)][e(273)](e(281)),i=this[e(304)];i&&i===o&&r?(this[e(336)](n,t),this[e(334)](t,n)):i&&i===o?this[e(336)](n,t):this[e(334)](t,n)}[Ax(295)](t,e){const n=Ax;0===this[n(307)][n(360)]&&setTimeout((()=>{const t=n;for(const{sidebarItemView:e,changedProp:n}of this[t(307)])t(293)===n?this[t(323)](e):this[t(326)](e);this[t(307)]=[]}),10),this[n(307)][n(331)]({sidebarItemView:t,changedProp:e})}[Ax(345)](t){const e=Ax;return this[e(285)][e(273)](t)}[Ax(344)](){const t=Ax;this[t(340)](),this[t(341)][t(344)]()}[Ax(310)](t){const e=Ax,n=this[e(345)](t);this[e(340)](n),this[e(340)](t[e(341)]),n[e(344)](),this[e(285)][e(312)](t),this[e(359)][e(312)](n)}[Ax(274)](){const t=Ax,e=new px(this[t(347)][t(353)]);return e[t(354)](),this.on(t(278),((n,o,r,i)=>{const s=t;i&&e[s(277)](s(355)),r?e[s(280)](s(355)).to(r,s(330)):e[s(355)]=null})),e}[Ax(303)](){const t=Ax;var e;this[t(358)]=(null===(e=this[t(294)])||void 0===e?void 0:e[t(286)])?this[t(345)](this[t(294)][t(286)]):null}[Ax(276)](t){const e=Ax;var n;const o=this[e(359)][e(273)](t),r=o&&(null===(n=this[e(294)])||void 0===n?void 0:n[e(273)](this[e(294)][e(290)](o)-1));return r&&this[e(345)](r)||null}[Ax(279)](t){const e=Ax;var n;const o=this[e(359)][e(273)](t),r=o&&(null===(n=this[e(294)])||void 0===n?void 0:n[e(273)](this[e(294)][e(290)](o)+1));return r&&this[e(345)](r)||null}[Ax(336)](t,e){const n=Ax;t[n(302)]();const o=yx(e[n(330)]+this[n(339)],t[n(293)]);return!!o&&(this[n(332)](e,e[n(293)]-o),!0)}[Ax(334)](t,e){const n=Ax;t[n(302)]();const o=yx(t[n(330)]+this[n(339)],e[n(293)]);return!!o&&(this[n(332)](e,e[n(293)]+o,!1),!0)}[Ax(350)](t){const e=Ax,n=this[e(359)][e(273)](t);if(!n||!n[e(325)]||!n[e(298)])return;const o=this[e(305)](n,n[e(298)]);this[e(332)](t,o)}[Ax(305)](t,e){const n=Ax;if(null===e)return 0;if(t[n(325)]instanceof zo)return e[n(293)];{const t=new zo(this[n(341)][n(292)])[n(293)];return e[n(293)]-t}}[Ax(332)](t,e,n=this[Ax(347)][Ax(287)][Ax(273)](Ax(281))){const o=Ax;n&&(e=Math[o(275)](e,this[o(315)](t))),t[o(293)]=e}[Ax(315)](t){const e=Ax;let n=this[e(276)](t),o=0;for(;n;)n[e(302)](),o+=this[e(339)]+n[e(356)],n=this[e(276)](n);return o}}function yx(t,e){return Math[Ax(275)](t-e,0)}function vx(t){const e=Ax;return null!==t&&e(335)==typeof t&&1===t[e(346)]}function Ix(){const t=["register","wideSidebar","1210AEJBJS","1348149ZMpYKS","remove","11167618KaITDE","stopListening","destroy","high","refresh","2054523LWGLBR","widesidebar-detach-not-attached","widesidebar-attach-already-attached","off","addAnnotation","focus","isAttached","cancel","resize","blur","_destroyEditorAnnotationsIntegration","annotations","updateTargetRect","_integrateWithEditorAnnotations","context","attach","WideSidebar","_editorAnnotations","rearrange","ready","change:container","listenTo","_attachToContainer","_refreshPositioningDebounced","setActiveAnnotation","from","5800644VwmjTy","removeEventListener","EditorAnnotations","hasDomSelection","detach","set:container","refreshPositioning","_activeAnnotation","addEventListener","set","activeAnnotation","has","switchTo","_detachFromContainer","pluginName","2DnYoeZ","ck-sidebar--wide","plugins","uiUpdate","3848BjAOiB","container","add","editors","173133pdpzUZ","requires","_annotations","stop","8335iEpFgw","get","1001760SRbPKG","init","getOrderedSelectedAnnotations"];return(Ix=function(){return t})()}const Ex=xx;function xx(t,e){const n=Ix();return(xx=function(t,e){return n[t-=292]})(t,e)}!function(t,e){const n=xx,o=t();for(;;)try{if(805587===parseInt(n(319))/1*(parseInt(n(299))/2)+parseInt(n(326))/3+parseInt(n(303))/4*(parseInt(n(311))/5)+parseInt(n(352))/6+-parseInt(n(321))/7+parseInt(n(313))/8+parseInt(n(307))/9*(-parseInt(n(318))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Ix);class Tx extends mi{static get[Ex(308)](){return[_x,ax]}static get[Ex(298)](){return Ex(342)}constructor(t){const e=Ex;super(t),this[e(332)]=!1,this[e(293)](e(294),null),this[e(337)]=null,this[e(343)]=new Yr,this[e(349)]=Ka((()=>{const t=e;this[t(337)][t(358)]()}),250,{leading:!1})}[Ex(314)](){const t=Ex,e=this[t(340)][t(301)][t(312)](ax),n=this[t(340)][t(301)][t(312)](_x);e[t(316)](t(317),this),n[t(304)]&&e[t(296)](t(317))}[Ex(350)](t){const e=Ex;if(t===this[e(294)])return;const n=this[e(340)][e(301)][e(312)](_x);n[e(359)]=t;const o=this[e(294)];this[e(294)]=t,n[e(325)]({blurredAnnotation:o,activatedAnnotation:this[e(294)]})}[Ex(341)](t){const e=Ex;this[e(337)]=t;const n=this[e(340)][e(301)][e(312)](_x);if(n[e(309)]=t,this[e(332)])throw new w(e(328),this);this[e(332)]=!0,this[e(347)](n,e(357),(()=>{const o=e;this[o(356)](),this[o(347)](n,o(346),(e=>{const n=o;e[n(329)](),this[n(341)](t)}))})),n[e(348)]({viewClass:e(300)});const o=t=>{const o=e;t[o(338)](),n[o(330)](t)};for(const e of t)o(e);this[e(347)](t,e(305),((t,e)=>{o(e)})),this[e(347)](t,e(320),((o,r,i)=>{const s=e;n[s(344)]({removedAnnotation:r,previousAnnotation:t[s(312)](i-1),nextAnnotation:t[s(312)](i+1)}),r===this[s(294)]&&this[s(350)](null)}),{priority:e(324)}),this[e(347)](t,e(331),((t,n)=>{this[e(350)](n)})),this[e(347)](t,e(335),(()=>{this[e(350)](null)}));const r=this[e(340)]instanceof pi?this[e(340)][e(306)]:new Yr([this[e(340)]]);for(const t of r)this[e(339)](t);this[e(347)](r,e(305),((t,n)=>{const o=e;this[o(347)](n,o(345),(()=>{this[o(339)](n)}))})),this[e(347)](r,e(320),((t,n)=>{const o=e;n[o(301)][o(295)](o(354))&&this[o(336)](n[o(301)][o(312)](o(354)))})),window[e(292)](e(334),this[e(349)]),this[e(337)][e(358)]()}[Ex(356)](){const t=Ex;if(!this[t(332)])throw new w(t(327),this);this[t(350)](null);const e=this[t(340)][t(301)][t(312)](_x);e[t(297)](this[t(337)]),this[t(322)](e),this[t(322)](this[t(337)]),this[t(340)]instanceof pi&&this[t(322)](this[t(340)][t(306)]);for(const e of Array[t(351)](this[t(343)]))this[t(336)](e);window[t(353)](t(334),this[t(349)]),this[t(349)][t(333)](),this[t(294)]=null,this[t(332)]=!1,this[t(337)]=null}[Ex(323)](){const t=Ex;this[t(332)]&&this[t(356)]()}[Ex(339)](t){const e=Ex,n=t[e(301)][e(312)](EE);if(!n)return;const o=()=>{const t=e,o=n[t(315)]({annotations:this[t(337)],activeAnnotation:this[t(294)]});this[t(350)](o[0]||null)};this[e(347)](n,e(325),o),this[e(347)](n,e(335),((t,{isAnnotationTracked:n})=>{const o=e;this[o(294)]&&n(this[o(294)])&&this[o(350)](null)})),this[e(347)](n,e(302),(()=>{this[e(349)]()})),this[e(347)](this[e(337)],e(335),(t=>{const r=e;n[r(355)]()&&(o(),t[r(310)]())}),{priority:e(324)}),this[e(343)][e(305)](n)}[Ex(336)](t){const e=Ex;this[e(322)](t),this[e(343)][e(320)](t)}}function Dx(t,e){const n=Sx();return(Dx=function(t,e){return n[t-=180]})(t,e)}function Sx(){const t=["ck-annotation-counter__badge--","20gguMAd","94005AyvZiC","children","ck-annotation-counter","ck-annotation-counter__badge--edit-mode","bindTemplate","set","number","12proRDt","20450LtWFqJ","ck-annotation-counter__badge","2514504fBOeMy","extendTemplate","toString","686393UzteiE","span","2111460hegKgO","20EywqMH","isDirty","counterView","bind","357891DJDlTk","add","16VJvXwa","setTemplate","annotationType","21wTJtHZ","_badge","4652021tQeVyh","...","icon"];return(Sx=function(){return t})()}!function(t,e){const n=Dx,o=t();for(;;)try{if(679225===-parseInt(n(187))/1+-parseInt(n(190))/2*(-parseInt(n(194))/3)+-parseInt(n(196))/4*(parseInt(n(182))/5)+-parseInt(n(189))/6+-parseInt(n(199))/7*(-parseInt(n(184))/8)+-parseInt(n(206))/9*(-parseInt(n(205))/10)+parseInt(n(201))/11*(-parseInt(n(181))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Sx);class Ox extends Lm{constructor(t){const e=Dx;super(t);const n=this[e(210)];this[e(211)](e(191),!1),this[e(211)](e(180),0),this[e(193)](e(200)).to(this,e(191),this,e(180),((t,n)=>t?e(202):n[e(186)]())),this[e(211)](e(198),""),this[e(203)]=JE,this[e(185)]({attributes:{class:[e(208)]}}),this[e(192)]=new wm,this[e(192)][e(197)]({tag:e(188),attributes:{class:[e(183),n.to(e(198),(t=>e(204)+t)),n.if(e(191),e(209))]},children:[{text:n.to(e(200))}]}),this[e(207)][e(195)](this[e(192)])}}var Bx=__webpack_require__(5337),Mx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(Bx.A,Mx);Bx.A.locals;const Nx=Px;function Px(t,e){const n=Rx();return(Px=function(t,e){return n[t-=266]})(t,e)}function Rx(){const t=["northArrowSouthWest","_detachFromContainer","high","activeAnnotation","_attachListeners","change:height","refresh","_setSelectedAnnotations","values","pluginName","includes","focusableElements","refreshPositioning","437052iUnXAD","attach","view","esc","getByView","34494IphFbi","stop","_annotations","balloonPanelView","set:container","requires","has","editors","ready","focus","_manuallyClosedAnnotationViews","removeEventListener","12ljaasg","southArrowNorthEast","southArrowNorthWest","change:container","create","261684IPPvAN","_domEmitter","off","low","_integrateWithEditorAnnotations","pin","resize","3951evJypq","plugins","getSidebarItemView","from","stopListening","detach","context","element","rearrange","add","annotations","_annotationToNarrowView","_attachToContainer","northArrowSouth","1678470jKAewK","annotationType","_updateBalloonPosition","keydown","preventClosingBalloon","isAttached","_refreshPositioning","hasDomSelection","target","setActiveAnnotation","stopPropagation","attachToDom","keyCode","_hideBalloon","number","EditorAnnotations","mousedown","176fJzOng","getOrderedSelectedAnnotations","uiUpdate","register","length","addAnnotation","50mPxEqN","121310KcAyeX","bodyCollection","type","_editorAnnotations","narrowsidebar-attach-already-attached","northArrowSouthEast","defaultPositions","_detachListeners","blur","preventDefault","addEventListener","destroy","isVisible","locale","remove","_refreshPositioningDebounced","NarrowSidebar","southArrowNorth","ck-sidebar--narrow","_showBalloon","detachFromDom","cancel","narrowSidebar","execute","clear","first","content","unpin","49437YPhkMA","_selectedAnnotations","isDirty","find","contains","Esc","get","init","narrowsidebar-detach-not-attached","delete","set","listenTo","bind","_destroyEditorAnnotationsIntegration"];return(Rx=function(){return t})()}!function(t,e){const n=Px,o=t();for(;;)try{if(103154===parseInt(n(348))/1+-parseInt(n(298))/2*(-parseInt(n(376))/3)+parseInt(n(303))/4+-parseInt(n(347))/5*(-parseInt(n(286))/6)+-parseInt(n(281))/7+-parseInt(n(341))/8*(parseInt(n(310))/9)+-parseInt(n(324))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Rx);class Lx extends mi{static get[Nx(291)](){return[_x,ax]}static get[Nx(277)](){return Nx(364)}constructor(t){const e=Nx;super(t),this[e(329)]=!1,this[e(296)]=new Set,this[e(304)]=Object[e(302)](So),this[e(321)]=new Map,this[e(386)](e(271),null),this[e(320)]=null,this[e(377)]=[],this[e(351)]=new Yr,this[e(363)]=Ka((()=>{this[e(330)]()}),250,{leading:!1})}[Nx(383)](){const t=Nx;this[t(316)][t(311)][t(382)](ax)[t(344)](t(370),this),this[t(349)]=new Dm(this[t(316)][t(361)]),this[t(289)]=new Lb(this[t(316)][t(361)]),this[t(349)][t(335)](),this[t(349)][t(319)](this[t(289)])}[Nx(282)](t){const e=Nx;this[e(320)]=t;const n=this[e(316)][e(311)][e(382)](_x),o=this[e(289)];if(n[e(288)]=t,this[e(329)])throw new w(e(352),this);this[e(329)]=!0,this[e(387)](n,e(290),(()=>{const o=e;this[o(315)](),this[o(387)](n,o(301),(e=>{const n=o;e[n(305)](),this[n(282)](t)}))})),n[e(322)]({viewClass:e(366),spaceBetweenItems:5});const r=t=>{const r=e,i=new Ox(this[r(316)][r(361)]);n[r(346)](t,i),this[r(321)][r(386)](t,i),i[r(266)](r(378),r(325),r(338)).to(t[r(283)],r(378),r(350),r(345)),i.on(r(371),(()=>{const e=r;this[e(296)][e(372)](),o[e(374)][e(373)]!==t[e(283)]?(this[e(367)](t),t[e(283)][e(317)][e(295)](),this[e(333)](t)):this[e(333)](null)}))};for(const e of t)r(e);this[e(387)](t,e(319),((t,e)=>{r(e)})),this[e(387)](t,e(362),((o,r,i)=>{const s=e;this[s(321)][s(382)](r)[s(359)](),this[s(321)][s(385)](r),n[s(318)]({removedAnnotation:r,previousAnnotation:t[s(382)](i-1),nextAnnotation:t[s(382)](i+1)}),r===this[s(271)]&&this[s(333)](null)}),{priority:e(306)}),this[e(387)](t,e(295),((t,n)=>{this[e(333)](n)})),this[e(387)](t,e(356),(()=>{this[e(333)](null)})),this[e(304)][e(387)](document,e(327),((t,n)=>{const r=e;n[r(336)]===br[r(284)]&&o[r(360)]&&(this[r(296)][r(319)](o[r(374)][r(373)]),this[r(337)](),n[r(334)](),n[r(357)]())})),this[e(304)][e(387)](document,e(340),((t,r)=>{const i=e,s=r[i(332)];o[i(360)]&&o[i(317)][i(380)](s)||n[i(283)][i(317)][i(380)](s)||t[i(328)]||this[i(271)]&&this[i(271)][i(279)][i(379)]((t=>t[i(380)](s)))||(this[i(296)][i(372)](),this[i(337)](),this[i(333)](null))}));const i=this[e(316)]instanceof pi?this[e(316)][e(293)]:new Yr([this[e(316)]]);for(const t of i)this[e(307)](t);this[e(387)](i,e(319),((t,n)=>{const o=e;this[o(387)](n,o(294),(()=>{this[o(307)](n)}))})),this[e(387)](i,e(362),((t,n)=>{const o=e;n[o(311)][o(292)](o(339))&&this[o(267)](n[o(311)][o(382)](o(339)))})),window[e(358)](e(309),this[e(363)]),this[e(330)]()}[Nx(333)](t){const e=Nx;if(t===this[e(271)])return;const n=this[e(316)][e(311)][e(382)](_x);n[e(274)]({blurredAnnotation:this[e(271)],activatedAnnotation:t,disableAnimationOnActivatedAnnotation:!0}),t&&n[e(312)](t)?this[e(367)](t):this[e(337)](),this[e(271)]=t}[Nx(315)](){const t=Nx;if(!this[t(329)])throw new w(t(384),this);this[t(333)](null);const e=this[t(316)][t(311)][t(382)](_x);this[t(337)](),Array[t(313)](this[t(321)][t(276)](),(e=>e[t(359)]())),this[t(321)][t(372)](),e[t(269)](this[t(320)]),this[t(314)](),this[t(304)][t(314)](),this[t(316)]instanceof pi&&this[t(314)](this[t(316)][t(293)]);for(const e of Array[t(313)](this[t(351)]))this[t(267)](e);window[t(297)](t(309),this[t(363)]),this[t(363)][t(369)](),this[t(377)]=[],this[t(329)]=!1,this[t(320)]=null}[Nx(359)](){const t=Nx;this[t(329)]&&this[t(315)](),this[t(349)][t(368)]()}[Nx(307)](t){const e=Nx,n=t[e(311)][e(382)](EE),o=this[e(316)][e(311)][e(382)](_x),r=this[e(320)],i=this[e(289)],s=()=>{const t=e,o=n[t(342)]({annotations:this[t(320)],activeAnnotation:this[t(271)]});this[t(275)](o),this[t(333)](o[0]||null)};this[e(387)](n,e(274),s),this[e(387)](n,e(356),((t,{isAnnotationTracked:n})=>{const o=e;this[o(271)]&&n(this[o(271)])&&(this[o(275)]([]),this[o(333)](null))})),this[e(387)](n,e(343),(()=>{this[e(363)]()})),this[e(387)](r,e(356),(t=>{const o=e;n[o(331)]()&&t[o(287)]()}),{priority:e(270)}),this[e(387)](this[e(304)],e(340),((t,r)=>{const a=e,c=r[a(332)];i[a(360)]&&i[a(317)][a(380)](c)||o[a(283)][a(317)][a(380)](c)||this[a(271)]&&n[a(331)]()&&(s(),t[a(328)]=!0)}),{priority:e(270)}),this[e(351)][e(319)](n)}[Nx(267)](t){const e=Nx;t&&(this[e(314)](t),this[e(351)][e(362)](t))}[Nx(275)](t){const e=Nx;for(const n of this[e(377)])t[e(278)](n)||this[e(296)][e(385)](n[e(283)]);this[e(377)]=t}[Nx(330)](){const t=Nx,e=this[t(289)];this[t(320)][t(280)](),e[t(360)]&&this[t(326)]()}[Nx(367)](t){const e=Nx;if(this[e(296)][e(292)](t[e(283)]))return;const n=this[e(289)][e(374)][e(373)];n!==t[e(283)]?(n&&this[e(355)](n),this[e(272)](t[e(283)]),this[e(289)][e(374)][e(372)](),this[e(289)][e(374)][e(319)](t[e(283)]),this[e(326)]()):this[e(326)]()}[Nx(326)](){const t=Nx,e=this[t(289)][t(374)][t(373)],n=e&&this[t(320)][t(285)](e);if(!n||!this[t(321)][t(292)](n))return;const o=this[t(321)][t(382)](n)[t(317)],r=function(){const e=t,n=Lb[e(354)];return[n[e(299)],n[e(353)],n[e(365)],n[e(323)],n[e(300)],n[e(268)]]}();this[t(289)][t(308)]({target:o,positions:r})}[Nx(337)](){const t=Nx,e=this[t(289)],n=e[t(374)][t(373)];n&&(this[t(355)](n),e[t(375)](),e[t(374)][t(372)]())}[Nx(272)](t){const e=Nx;this[e(387)](t,e(273),(()=>this[e(326)]())),this[e(387)](t,e(381),((n,o)=>{const r=e;this[r(296)][r(319)](t),this[r(337)](),o()}))}[Nx(355)](t){this[Nx(314)](t)}}var jx=__webpack_require__(590),Vx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(jx.A,Vx);jx.A.locals;const zx=Fx;function Fx(t,e){const n=Ux();return(Fx=function(t,e){return n[t-=102]})(t,e)}function Ux(){const t=["4887iiAIMC","plugins","document","InlineAnnotations","2927112XrfGxd","detach","find","addObserver","update","inlineannotations-attach-already-attached","mousedown","get","attach","11KHzfZN","Esc","fromRect","502535AUAwjf","blur","24qgOBjQ","view","bottom","getBoundingClientRect","_getBalloonTargetForAnnotation","afterInit","_closeAnnotation","hasActive","length","change:height","refresh","activeAnnotation","_removeAnnotationFromBalloon","every","includes","set","_setSelectedAnnotations","change:isFocused","top","_balloon","delete","511761cDRGBr","getFirstRange","showStack","visibleView","remove","8lUPROS","_addedAnnotations","pluginName","_selectedAnnotations","register","right","getByView","992Sovwys","left","domConverter","switchTo","_manuallyClosed","_addAnnotationToBalloon","getOrderedSelectedAnnotations","inlineannotations-detach-not-attached","init","inline","stopListening","editableElement","116770zDGrbg","selection","updatePosition","map","editing","inlineannotations-not-allowed-with-context","has","viewRangeToDom","isActive","_forceRefresh","push","change:visibleView","destroy","324044YlpQQM","11TrRExl","clear","add","width","focusTracker","isFocused","editor","isAttached","listenTo","getClientRects","targetRect","collapse","annotations","125246JYYnSP","requires","setActiveAnnotation","from","keystrokes","context","hasView","focus","target"];return(Ux=function(){return t})()}!function(t,e){const n=Fx,o=t();for(;;)try{if(421417===-parseInt(n(153))/1*(-parseInt(n(131))/2)+-parseInt(n(179))/3*(-parseInt(n(184))/4)+-parseInt(n(156))/5+-parseInt(n(158))/6*(parseInt(n(117))/7)+parseInt(n(191))/8*(-parseInt(n(140))/9)+parseInt(n(104))/10*(-parseInt(n(118))/11)+-parseInt(n(144))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Ux);class Hx extends ri{static get[zx(132)](){return[EE,Ok,ax]}static get[zx(186)](){return zx(143)}constructor(t){const e=zx;super(t),t[e(108)][e(159)][e(147)](Ch),this[e(125)]=!1,this[e(173)](e(169),null),this[e(130)]=null,this[e(195)]=new Set,this[e(177)]=t[e(141)][e(151)](Ok),this[e(185)]=new Set,this[e(187)]=[],this[e(113)]=!1}[zx(199)](){const t=zx,e=this[t(124)][t(141)][t(151)](ax);e[t(136)]===this[t(124)]&&(e[t(188)](t(200),this),this[t(124)][t(135)][t(173)](t(154),((e,n)=>{const o=t,r=this[o(177)];if(this[o(125)]&&r[o(182)]){const t=this[o(130)][o(190)](r[o(182)]);t&&this[o(164)](t),n()}})))}[zx(163)](){const t=zx,e=this[t(124)][t(141)][t(151)](ax);e[t(136)]===this[t(124)]&&(e[t(165)]()||e[t(194)](t(200)))}[zx(133)](t){const e=zx;t!==this[e(169)]&&(this[e(169)]&&(this[e(169)][e(112)]=!1),t&&this[e(124)].ui[e(122)][e(123)]&&(this[e(130)][e(110)](t)&&this[e(196)](t,!0),t[e(112)]=!0),t||this[e(174)]([]),this[e(169)]=t)}[zx(152)](t){const e=zx;this[e(130)]=t;const n=this[e(124)][e(141)][e(151)](ax),o=this[e(177)];if(this[e(125)])throw new w(e(149),this);if(n[e(136)]!==this[e(124)])throw new w(e(109),this);const r=this[e(124)][e(141)][e(151)](EE);this[e(126)](r,e(168),(()=>{const t=e,n=r[t(197)]({annotations:this[t(130)],activeAnnotation:this[t(169)]});var o,i;!this[t(113)]&&(o=n,i=this[t(187)],o[t(166)]===i[t(166)]&&o[t(171)]((e=>i[t(172)](e))))||(this[t(113)]=!1,this[t(174)](n),this[t(133)](n[0]||null))})),this[e(126)](r,e(157),((t,{isAnnotationTracked:n})=>{const o=e;this[o(169)]&&n(this[o(169)])&&(this[o(174)]([]),this[o(133)](null))})),this[e(126)](this[e(124)].ui[e(122)],e(175),((t,n,o)=>{o||this[e(133)](null)})),this[e(126)](t,e(183),((t,n)=>{const o=e;this[o(170)](n),n===this[o(169)]&&this[o(133)](null)})),this[e(126)](o,e(115),((n,r,i,s)=>{const a=e;s&&this[a(102)](s);const c=t[a(190)](i);i&&c&&(this[a(126)](i,a(167),(()=>{o[a(106)]()})),this[a(126)](i,a(154),(()=>{const t=a;this[t(164)](c),this[t(124)][t(108)][t(159)][t(138)]()})),this[a(169)]!==c&&this[a(133)](c))})),this[e(126)](this[e(124)].ui,e(148),(()=>{const n=e;o[n(182)]&&t[n(190)](o[n(182)])&&o[n(106)]()})),this[e(126)](this[e(124)][e(108)][e(159)][e(142)],e(150),(()=>{const t=e;this[t(113)]=!0,this[t(195)][t(119)]()})),this[e(124)][e(108)][e(159)][e(142)][e(105)][e(103)]&&this[e(124)][e(108)][e(159)][e(138)](),this[e(125)]=!0}[zx(145)](){const t=zx;if(!this[t(125)])throw new w(t(198),this);this[t(133)](null);for(const e of this[t(185)])this[t(170)](e);this[t(102)](),this[t(125)]=!1,this[t(130)]=null}[zx(116)](){const t=zx;this[t(125)]&&this[t(145)]()}[zx(174)](t){const e=zx;for(const n of this[e(187)])t[e(172)](n)||this[e(195)][e(178)](n);for(const n of this[e(130)])t[e(172)](n)||this[e(170)](n);if(this[e(124)].ui[e(122)][e(123)])for(const n of t)this[e(196)](n);this[e(187)]=t}[zx(196)](t,e=!1){const n=zx;this[n(195)][n(110)](t)||(this[n(185)][n(110)](t)||this[n(177)][n(137)](t[n(159)])||(this[n(185)][n(120)](t),this[n(177)][n(120)]({stackId:t[n(159)].id,view:t[n(159)],position:{target:()=>this[n(162)](t)}})),e&&this[n(177)][n(181)](t[n(159)].id))}[zx(162)](t){const e=zx,n=t[e(139)],o=this[e(124)][e(108)][e(159)],r=o[e(142)][e(105)][e(180)](),i=o[e(193)][e(111)](r);if(i[e(129)](!0),n){if(n instanceof zo)return n;let t=[];for(const o of n)t[e(114)](...(s=o[e(127)](),Array[e(134)](s)[e(107)](DOMRect[e(155)])));t=function(t){const n=e,o=[];let r=t[0];for(let e=1;et[e(176)]<=o[e(176)]&&t[e(160)]>=o[e(160)]&&t[e(192)]<=o[e(192)]&&t[e(189)]>=o[e(189)]))||t[0]}var s;return t[e(128)]||i}[zx(170)](t){const e=zx;this[e(185)][e(110)](t)&&this[e(177)][e(137)](t[e(159)])&&(this[e(185)][e(178)](t),this[e(177)][e(183)](t[e(159)]))}[zx(164)](t){const e=zx;this[e(195)][e(120)](t),this[e(170)](t)}}function qx(t,e){const n=zx;return t[n(176)]===e[n(176)]&&t[n(160)]===e[n(160)]&&t[n(189)]===e[n(192)]}var Gx=__webpack_require__(981),Wx={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(Gx.A,Wx);Gx.A.locals;const Kx='\x3c!--\n\n What you\'re currently looking at is the source code of a legally protected, proprietary software.\n CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,\n all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.\n\n Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n\n!--\x3e\n\n\n',Yx=$x;function Jx(){const t=["arrowright","bindTemplate","isEmpty","ck-comments-archive__content","55hthnCM","1706bpJwiY","render","6058644lqzVMO","ck-comments-archive__info","7538980aGkAwm","_keystrokes","tab","selectstart","element","arrowdown","_focusTracker","focus","ck-comments-archive","EMPTY_COMMENTS_ARCHIVE","isActive","set","listenTo","stopPropagation","_focusables","auto","add","destroy","6ZhZYvC","remove","_focusCycler","6351bDDBbg","arrowleft","length","1459728PyTVRs","ck-hidden","50GoTWfS","231jXPyGD","high","shift + tab","3091554AmEKlp","div","arrowup","setTemplate","151472wLGrhS","177459jcumOs"];return(Jx=function(){return t})()}function $x(t,e){const n=Jx();return($x=function(t,e){return n[t-=482]})(t,e)}!function(t,e){const n=$x,o=t();for(;;)try{if(946249===parseInt(n(507))/1+parseInt(n(513))/2*(-parseInt(n(493))/3)+-parseInt(n(496))/4+parseInt(n(517))/5*(parseInt(n(490))/6)+-parseInt(n(499))/7*(-parseInt(n(506))/8)+-parseInt(n(502))/9*(parseInt(n(498))/10)+parseInt(n(512))/11*(parseInt(n(515))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Jx);class Qx extends wm{constructor(t,e){const n=$x;super(t),this[n(483)](n(510),!e[n(495)]),this[n(523)]=new $r,this[n(518)]=new Qr,this[n(486)]=e,this[n(492)]=new yg({focusables:this[n(486)],focusTracker:this[n(523)],keystrokeHandler:this[n(518)],actions:{focusPrevious:n(501),focusNext:n(519)}}),this[n(484)](e,n(488),(()=>{this[n(510)]=!1})),this[n(484)](e,n(491),((t,o)=>{const r=n;o[r(482)]&&this[r(524)](),e[r(495)]||(this[r(510)]=!0)}));const o=this[n(509)];this[n(505)]({tag:n(503),attributes:{dir:n(487),class:["ck",n(525)],tabindex:-1},children:[{tag:n(503),attributes:{class:[n(511)]},children:[{tag:n(503),children:e},{tag:"p",attributes:{class:[n(516),o.if(n(510),n(497),(t=>!t))]},children:[{text:xC(t,n(526))}]}]}]})}[Yx(514)](){const t=Yx;super[t(514)](),this[t(518)][t(484)](this[t(521)]);const e=e=>e[t(485)]();this[t(518)][t(483)](t(508),e),this[t(518)][t(483)](t(494),e),this[t(518)][t(483)](t(504),e),this[t(518)][t(483)](t(522),e),this[t(484)](this[t(521)],t(520),((e,n)=>{n[t(485)]()}),{priority:t(500)})}[Yx(489)](){const t=Yx;super[t(489)](),this[t(523)][t(489)](),this[t(518)][t(489)]()}[Yx(524)](){const t=Yx;this[t(521)][t(524)]()}}const Zx=tT;function Xx(){const t=["init","1894564MyMONO","plugins","length","remove","add","2457888nBUeMO","_calculatePosition","addCommentThread","4CiYnDr","620vHSWUq","3192kXzyRw","3284790eDJsdB","change:archivedAt","pluginName","findIndex","stopListening","highest","focus","CommentsArchive","get","159786EBMDbn","collection","archivedThreads","9GgcNrR","archivedAt","requires","has","listenTo","removeCommentThread","6378288rqWYTH","isActive","393YnaRoE","context","activate","2804085ifAmYQ","getCommentThread"];return(Xx=function(){return t})()}function tT(t,e){const n=Xx();return(tT=function(t,e){return n[t-=397]})(t,e)}!function(t,e){const n=tT,o=t();for(;;)try{if(535378===parseInt(n(416))/1*(-parseInt(n(432))/2)+parseInt(n(427))/3*(-parseInt(n(430))/4)+parseInt(n(419))/5+-parseInt(n(433))/6+parseInt(n(422))/7+-parseInt(n(414))/8*(-parseInt(n(408))/9)+-parseInt(n(431))/10*(-parseInt(n(405))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Xx);class eT extends mi{static get[Zx(398)](){return Zx(403)}static get[Zx(410)](){return[gE,lE]}constructor(t){const e=Zx;super(t),this[e(407)]=new Yr}[Zx(421)](){const t=Zx,e=this[t(417)],n=e[t(423)][t(404)](gE),o=e[t(423)][t(404)](lE);this[t(412)](n,t(429),((e,{threadId:o})=>{const r=t,i=n[r(420)](o);i[r(409)]&&this[r(407)][r(426)](i,this[r(428)](i[r(409)])),this[r(412)](i,r(397),((t,e,n)=>{const o=r;n?this[o(407)][o(411)](i)||this[o(407)][o(426)](i,this[o(428)](i[o(409)])):this[o(407)][o(411)](i)&&this[o(407)][o(425)](i)}))})),this[t(412)](n,t(413),((e,{threadId:o})=>{const r=t,i=n[r(420)](o);this[r(400)](i),this[r(407)][r(411)](i)&&this[r(407)][r(425)](i)}),{priority:t(401)}),this[t(412)](o[t(406)],t(402),((e,n)=>{const r=t;n[r(415)]=!0,o[r(418)](n)}))}[Zx(428)](t){const e=Zx,n=[...this[e(407)]][e(399)]((n=>n[e(409)]-1?n:this[e(407)][e(424)]}}const nT=rT;function oT(){const t=["56sQDrUE","length","archivedAt","locale","componentFactory","innerView","376069gaDemm","splice","getByInnerView","view","get","annotationViews","commentsArchiveView","stopListening","_pendingThreads","archivedThreads","446466QQwwPP","remove","228505VOwohN","Annotations","findIndex","commentsArchive","415084wqcrTP","Dialog","push","channelId","232432qntUqx","init","execute","_toggleDialog","CommentsRepository","CommentsArchiveUI","listenTo","_threadToController","show","COMMENTS_ARCHIVE","EDITOR_TOP_SIDE","tooltip","hide","419208VyeOEO","requires","bind","focusableElements","menuBar:commentsArchive","filter","_createCommentsArchiveButton","add","indexOf","isEnabled","_visibleAnnotations","collection","isVisible","set","editor","plugins","2197664CFUIpT","_calculatePosition","config","collaboration.channelId","pluginName","find"];return(oT=function(){return t})()}function rT(t,e){const n=oT();return(rT=function(t,e){return n[t-=329]})(t,e)}!function(t,e){const n=rT,o=t();for(;;)try{if(570697===parseInt(n(363))/1+-parseInt(n(383))/2+parseInt(n(335))/3+-parseInt(n(379))/4+-parseInt(n(375))/5+parseInt(n(373))/6*(parseInt(n(357))/7)+-parseInt(n(351))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(oT);class iT extends ri{static get[nT(355)](){return nT(388)}static get[nT(336)](){return[eT,vb]}constructor(t){const e=nT;super(t),this[e(368)]=new Jp,this[e(371)]=[]}[nT(384)](){const t=nT;this[t(349)].ui[t(361)][t(342)](t(378),(()=>this[t(341)](Lm,!0))),this[t(349)].ui[t(361)][t(342)](t(339),(()=>this[t(341)](Ew)));const e=this[t(349)][t(350)][t(367)](eT),n=this[t(349)][t(350)][t(367)](t(376)),o=this[t(349)][t(350)][t(367)](t(387));this[t(389)](e[t(372)],t(342),((e,r)=>{const i=t,s=this[i(349)][i(353)][i(367)](i(354));if(!s||r[i(382)]===s){const t=o[i(329)][i(367)](r);if(!t)return void this[i(371)][i(381)](r);const e=this[i(352)](r[i(359)]),s=n[i(365)](t[i(366)]);s[i(347)]&&n[i(345)][i(374)](s),this[i(368)][i(342)](s[i(366)],e)}})),this[t(389)](n[t(346)],t(342),((e,n)=>{const r=t,i=this[r(371)][r(356)]((t=>{const e=r,i=o[e(329)][e(367)](t);return i&&n[e(362)]===i[e(366)]}));if(i){const t=this[r(352)](i[r(359)]);this[r(368)][r(342)](n[r(366)],t),this[r(371)][r(364)](this[r(371)][r(343)](i),1)}})),this[t(389)](e[t(372)],t(374),((e,r)=>{const i=t,s=this[i(349)][i(353)][i(367)](i(354));if(!s||r[i(382)]===s){const t=o[i(329)][i(367)](r),e=n[i(365)](t[i(366)]);this[i(368)][i(374)](e[i(366)]),this[i(370)](e[i(338)])}}))}[nT(352)](t){const e=nT,n=this[e(349)][e(353)][e(367)](e(354)),o=[...this[e(349)][e(350)][e(367)](eT)[e(372)]][e(340)]((t=>t[e(382)]===n))[e(377)]((n=>n[e(359)]this[e(368)][e(358)]?this[e(368)][e(358)]:o-1}[nT(386)](){const t=nT,e=this[t(349)],n=e[t(350)][t(367)](t(380));this[t(369)]||(this[t(369)]=new Qx(e[t(360)],this[t(368)])),t(378)===n.id?n[t(334)]():n[t(330)]({id:t(378),title:xC(e[t(360)],t(331)),icon:Kx,hasCloseButton:!0,content:this[t(369)],position:Ab[t(332)]})}[nT(341)](t,e=!1){const n=nT,o=this[n(349)][n(360)],r=new t(o);return r[n(337)](n(344)).to(this,n(344)),r[n(348)]({label:xC(o,n(331)),icon:Kx}),e&&(r[n(333)]=!0),this[n(389)](r,n(385),(()=>this[n(386)]())),r}}var sT=cT;function aT(){var t=["425689YspxgO","249282wqlRQL","35fRLQlz","24330TSAaZI","69592HANQsL","pluginName","651390SYOtnB","867856glscQm","350181JYrBYg","requires","180aNYJda","215pEiKhq","Comments","78LRWhFT"];return(aT=function(){return t})()}function cT(t,e){var n=aT();return(cT=function(t,e){return n[t-=223]})(t,e)}!function(t,e){for(var n=cT,o=t();;)try{if(299998===parseInt(n(230))/1+parseInt(n(236))/2+parseInt(n(229))/3*(-parseInt(n(234))/4)+parseInt(n(227))/5*(parseInt(n(233))/6)+-parseInt(n(232))/7*(parseInt(n(223))/8)+-parseInt(n(224))/9+-parseInt(n(226))/10*(-parseInt(n(231))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(aT);class lT extends ri{static get[sT(225)](){return[gE,HE,XE,eT,iT,nx,Tx,Lx,Hx]}static get[sT(235)](){return sT(228)}}function dT(t,e){var n=uT();return(dT=function(t,e){return n[t-=302]})(t,e)}function uT(){var t=["1362EqxykD","1720160SXMdcu","64gRKPJI","682747iFomcS","492382pECbag","273470IEPiLr","15934284XLQTTp","23065hEgXCk","4741344qSBeGh"];return(uT=function(){return t})()}function hT(t,e,n,o){let r,i=null;"function"==typeof o?r=o:(i=t.commands.get(o),r=()=>{t.execute(o)}),t.model.document.on("change:data",((s,a)=>{if(i&&!i.isEnabled||!e.isEnabled)return;const c=Jr(t.model.document.selection.getRanges());if(!c.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const l=Array.from(t.model.document.differ.getChanges()),d=l[0];if(1!=l.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const u=d.position.parent;if(u.is("element","codeBlock"))return;if(u.is("element","listItem")&&"function"!=typeof o&&!["numberedList","bulletedList","todoList"].includes(o))return;if(i&&!0===i.value)return;const h=u.getChild(0),p=t.model.createRangeOn(h);if(!p.containsRange(c)&&!c.end.isEqual(p.end))return;const m=n.exec(h.data.substr(0,c.end.offset));m&&t.model.enqueueChange((e=>{const n=e.createPositionAt(u,0),o=e.createPositionAt(u,m[0].length),i=new ul(n,o);if(!1!==r({match:m})){e.remove(i);const n=t.model.document.selection.getFirstRange(),o=e.createRangeIn(u);!u.isEmpty||o.isEqual(n)||o.containsRange(n,!0)||e.remove(u)}i.detach(),t.model.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function pT(t,e,n,o){let r,i;n instanceof RegExp?r=n:i=n,i=i||(t=>{let e;const n=[],o=[];for(;null!==(e=r.exec(t))&&!(e&&e.length<4);){let{index:t,1:r,2:i,3:s}=e;const a=r+i+s;t+=e[0].length-a.length;const c=[t,t+r.length],l=[t+r.length+i.length,t+r.length+i.length+s.length];n.push(c),n.push(l),o.push([t+r.length,t+r.length+i.length])}return{remove:n,format:o}}),t.model.document.on("change:data",((n,r)=>{if(r.isUndo||!r.isLocal||!e.isEnabled)return;const s=t.model,a=s.document.selection;if(!a.isCollapsed)return;const c=Array.from(s.document.differ.getChanges()),l=c[0];if(1!=c.length||"insert"!==l.type||"$text"!=l.name||1!=l.length)return;const d=a.focus,u=d.parent,{text:h,range:p}=function(t,e){let n=t.start;const o=Array.from(t.getItems()).reduce(((t,o)=>!o.is("$text")&&!o.is("$textProxy")||o.getAttribute("code")?(n=e.createPositionAfter(o),""):t+o.data),"");return{text:o,range:e.createRange(n,t.end)}}(s.createRange(s.createPositionAt(u,0),d),s),m=i(h),g=mT(p.start,m.format,s),f=mT(p.start,m.remove,s);g.length&&f.length&&s.enqueueChange((e=>{if(!1!==o(e,g)){for(const t of f.reverse())e.remove(t);s.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function mT(t,e,n){return e.filter((t=>void 0!==t[0]&&void 0!==t[1])).map((e=>n.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1]))))}!function(t,e){for(var n=dT,o=t();;)try{if(826791===parseInt(n(305))/1+parseInt(n(306))/2+parseInt(n(310))/3+-parseInt(n(304))/4*(parseInt(n(307))/5)+parseInt(n(302))/6*(parseInt(n(309))/7)+parseInt(n(303))/8+-parseInt(n(308))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(uT);class gT extends ri{static get requires(){return[v_]}static get pluginName(){return"Autoformat"}afterInit(){const t=this.editor,e=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){const t=this.editor.commands;t.get("bulletedList")&&hT(this.editor,this,/^[*-]\s$/,"bulletedList"),t.get("numberedList")&&hT(this.editor,this,/^1[.|)]\s$/,"numberedList"),t.get("todoList")&&hT(this.editor,this,/^\[\s?\]\s$/,"todoList"),t.get("checkTodoList")&&hT(this.editor,this,/^\[\s?x\s?\]\s$/,(()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")}))}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get("bold")){const t=fT(this.editor,"bold");pT(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),pT(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(t.get("italic")){const t=fT(this.editor,"italic");pT(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),pT(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(t.get("code")){const t=fT(this.editor,"code");pT(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(t.get("strikethrough")){const t=fT(this.editor,"strikethrough");pT(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get("heading");t&&t.modelElements.filter((t=>t.match(/^heading[1-6]$/))).forEach((e=>{const n=e[7],o=new RegExp(`^(#{${n}})\\s$`);hT(this.editor,this,o,(()=>{if(!t.isEnabled||t.value===e)return!1;this.editor.execute("heading",{value:e})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&hT(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const t=this.editor,e=t.model.document.selection;t.commands.get("codeBlock")&&hT(t,this,/^```$/,(()=>{if(e.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&hT(this.editor,this,/^---$/,"horizontalLine")}}function fT(t,e){return(n,o)=>{if(!t.commands.get(e).isEnabled)return!1;const r=t.model.schema.getValidRanges(o,e);for(const t of r)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class bT extends si{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,o=e.document.selection,r=Array.from(o.getSelectedBlocks()),i=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(i){const e=r.filter((t=>kT(t)||AT(n,t)));this._applyQuote(t,e)}else this._removeQuote(t,r.filter(kT))}))}_getValue(){const t=Jr(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!kT(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=Jr(t.getSelectedBlocks());return!!n&&AT(e,n)}_removeQuote(t,e){wT(t,e).reverse().forEach((e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)}))}_applyQuote(t,e){const n=[];wT(t,e).reverse().forEach((e=>{let o=kT(e.start);o||(o=t.createElement("blockQuote"),t.wrap(e,o)),n.push(o)})),n.reverse().reduce(((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n))}}function kT(t){return"blockQuote"==t.parent.name?t.parent:null}function wT(t,e){let n,o=0;const r=[];for(;o{const o=t.model.document.differ.getChanges();for(const t of o)if("insert"==t.type){const o=t.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return n.remove(o),!0;if(o.is("element","blockQuote")&&!e.checkChild(t.position,o))return n.unwrap(o),!0;if(o.is("element")){const t=n.createRangeIn(o);for(const o of t.getItems())if(o.is("element","blockQuote")&&!e.checkChild(n.createPositionBefore(o),o))return n.unwrap(o),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1}));const n=this.editor.editing.view.document,o=t.model.document.selection,r=t.commands.get("blockQuote");this.listenTo(n,"enter",((e,n)=>{if(!o.isCollapsed||!r.value)return;o.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((e,n)=>{if("backward"!=n.direction||!o.isCollapsed||!r.value)return;const i=o.getLastPosition().parent;i.isEmpty&&!i.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"})}}var _T=__webpack_require__(8708),yT={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(_T.A,yT);_T.A.locals;class vT extends ri{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,e=t.commands.get("blockQuote");t.ui.componentFactory.add("blockQuote",(()=>{const t=this._createButton(Lm);return t.set({tooltip:!0}),t.bind("isOn").to(e,"value"),t})),t.ui.componentFactory.add("menuBar:blockQuote",(()=>this._createButton(Ew)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("blockQuote"),r=new t(e.locale),i=n.t;return r.set({label:i("Block quote"),icon:Ep.quote,isToggleable:!0}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),r}}class IT extends si{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const r=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of r)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const ET="bold";class xT extends ri{static get pluginName(){return"BoldEditing"}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:ET}),t.model.schema.setAttributeProperties(ET,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:ET,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e&&("bold"==e||Number(e)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(ET,new IT(t,ET)),t.keystrokes.set("CTRL+B",ET),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Bold text"),keystroke:"CTRL+B"}]})}}function TT({editor:t,commandName:e,plugin:n,icon:o,label:r,keystroke:i}){return s=>{const a=t.commands.get(e),c=new s(t.locale);return c.set({label:r,icon:o,keystroke:i,isToggleable:!0}),c.bind("isEnabled").to(a,"isEnabled"),n.listenTo(c,"execute",(()=>{t.execute(e),t.editing.view.focus()})),c}}const DT="bold";class ST extends ri{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.locale.t,n=t.commands.get(DT),o=TT({editor:t,commandName:DT,plugin:this,icon:Ep.bold,label:e("Bold"),keystroke:"CTRL+B"});t.ui.componentFactory.add(DT,(()=>{const t=o(Lm);return t.set({tooltip:!0}),t.bind("isOn").to(n,"value"),t})),t.ui.componentFactory.add("menuBar:"+DT,(()=>o(Ew)))}}class OT extends ri{static get requires(){return[xT,ST]}static get pluginName(){return"Bold"}}var BT=__webpack_require__(4199),MT={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(BT.A,MT);BT.A.locals;const NT="italic";class PT extends ri{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:NT}),t.model.schema.setAttributeProperties(NT,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:NT,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(NT,new IT(t,NT)),t.keystrokes.set("CTRL+I",NT),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Italic text"),keystroke:"CTRL+I"}]})}}const RT="italic";class LT extends ri{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.commands.get(RT),n=t.locale.t,o=TT({editor:t,commandName:RT,plugin:this,icon:'',keystroke:"CTRL+I",label:n("Italic")});t.ui.componentFactory.add(RT,(()=>{const t=o(Lm);return t.set({tooltip:!0}),t.bind("isOn").to(e,"value"),t})),t.ui.componentFactory.add("menuBar:"+RT,(()=>o(Ew)))}}class jT extends ri{static get requires(){return[PT,LT]}static get pluginName(){return"Italic"}}const VT="strikethrough";class zT extends ri{static get pluginName(){return"StrikethroughEditing"}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:VT}),t.model.schema.setAttributeProperties(VT,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:VT,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add(VT,new IT(t,VT)),t.keystrokes.set("CTRL+SHIFT+X","strikethrough"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const FT="strikethrough";class UT extends ri{static get pluginName(){return"StrikethroughUI"}init(){const t=this.editor,e=t.locale.t,n=TT({editor:t,commandName:FT,plugin:this,icon:'',keystroke:"CTRL+SHIFT+X",label:e("Strikethrough")});t.ui.componentFactory.add(FT,(()=>{const e=n(Lm),o=t.commands.get(FT);return e.set({tooltip:!0}),e.bind("isOn").to(o,"value"),e})),t.ui.componentFactory.add("menuBar:"+FT,(()=>n(Ew)))}}const HT="subscript";class qT extends ri{static get pluginName(){return"SubscriptEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:HT}),t.model.schema.setAttributeProperties(HT,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:HT,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),t.commands.add(HT,new IT(t,HT))}}const GT="subscript";class WT extends ri{static get pluginName(){return"SubscriptUI"}init(){const t=this.editor,e=t.locale.t,n=TT({editor:t,commandName:GT,plugin:this,icon:'',label:e("Subscript")});t.ui.componentFactory.add(GT,(()=>{const e=n(Lm),o=t.commands.get(GT);return e.set({tooltip:!0}),e.bind("isOn").to(o,"value"),e})),t.ui.componentFactory.add("menuBar:"+GT,(()=>n(Ew)))}}const KT="superscript";class YT extends ri{static get pluginName(){return"SuperscriptEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:KT}),t.model.schema.setAttributeProperties(KT,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:KT,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),t.commands.add(KT,new IT(t,KT))}}const JT="superscript";class $T extends ri{static get pluginName(){return"SuperscriptUI"}init(){const t=this.editor,e=t.locale.t,n=TT({editor:t,commandName:JT,plugin:this,icon:'',label:e("Superscript")});t.ui.componentFactory.add(JT,(()=>{const e=n(Lm),o=t.commands.get(JT);return e.set({tooltip:!0}),e.bind("isOn").to(o,"value"),e})),t.ui.componentFactory.add("menuBar:"+JT,(()=>n(Ew)))}}const QT="underline";class ZT extends ri{static get pluginName(){return"UnderlineEditing"}init(){const t=this.editor,e=this.editor.t;t.model.schema.extend("$text",{allowAttributes:QT}),t.model.schema.setAttributeProperties(QT,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:QT,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add(QT,new IT(t,QT)),t.keystrokes.set("CTRL+U","underline"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Underline text"),keystroke:"CTRL+U"}]})}}const XT="underline";class tD extends ri{static get pluginName(){return"UnderlineUI"}init(){const t=this.editor,e=t.commands.get(XT),n=t.locale.t,o=TT({editor:t,commandName:XT,plugin:this,icon:'',label:n("Underline"),keystroke:"CTRL+U"});t.ui.componentFactory.add(XT,(()=>{const t=o(Lm);return t.set({tooltip:!0}),t.bind("isOn").to(e,"value"),t})),t.ui.componentFactory.add("menuBar:"+XT,(()=>o(Ew)))}}class eD extends(G()){constructor(){super();const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise(((n,o)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{o("error")},e.onabort=()=>{o("aborted")},this._reader.readAsDataURL(t)}))}abort(){this._reader.abort()}}class nD extends ri{constructor(){super(...arguments),this.loaders=new Yr,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[Ip]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0))}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return A("filerepository-no-upload-adapter"),null;const e=new oD(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then((t=>{this._loadersMap.set(t,e)})).catch((()=>{})),e.on("change:uploaded",(()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t})),e.on("change:uploadTotal",(()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t})),e}destroyLoader(t){const e=t instanceof oD?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach(((t,n)=>{t===e&&this._loadersMap.delete(n)}))}_updatePendingAction(){const t=this.editor.plugins.get(Ip);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("Upload in progress")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}class oD extends(G()){constructor(t,e){super(),this.id=g(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new eD,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((t=>this._filePromiseWrapper?t:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new w("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((t=>this._reader.read(t))).then((t=>{if("reading"!==this.status)throw this.status;return this.status="idle",t})).catch((t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t}))}upload(){if("idle"!=this.status)throw new w("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((t=>(this.uploadResponse=t,this.status="idle",t))).catch((t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t}))}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(t){const e={};return e.promise=new Promise(((n,o)=>{e.rejecter=o,e.isFulfilled=!1,t.then((t=>{e.isFulfilled=!0,n(t)})).catch((t=>{e.isFulfilled=!0,o(t)}))})),e}}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const rD="ckCsrfToken",iD="abcdefghijklmnopqrstuvwxyz0123456789";function sD(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("=");if(decodeURIComponent(e[0].trim().toLowerCase())===t)return decodeURIComponent(e[1])}return null}(rD);return t&&40==t.length||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let t=0;t.5?o.toUpperCase():o}return e}(40),function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+";path=/"}(rD,t)),t}class aD{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const o=this.xhr,r=this.loader,i=(0,this.t)("Cannot upload file:")+` ${n.name}.`;o.addEventListener("error",(()=>e(i))),o.addEventListener("abort",(()=>e())),o.addEventListener("load",(()=>{const n=o.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:i);t({default:n.url})})),o.upload&&o.upload.addEventListener("progress",(t=>{t.lengthComputable&&(r.uploadTotal=t.total,r.uploaded=t.loaded)}))}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",sD()),this.xhr.send(e)}}var cD=Object.defineProperty,lD=Object.getOwnPropertySymbols,dD=Object.prototype.hasOwnProperty,uD=Object.prototype.propertyIsEnumerable,hD=(t,e,n)=>e in t?cD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pD=(t,e)=>{for(var n in e||(e={}))dD.call(e,n)&&hD(t,n,e[n]);if(lD)for(var n of lD(e))uD.call(e,n)&&hD(t,n,e[n]);return t};const mD={autoRefresh:!0},gD=36e5;class fD extends(G()){constructor(t,e={}){if(super(),!t)throw new w("token-missing-token-url",this);e.initValue&&this._validateTokenValue(e.initValue),this.set("value",e.initValue),this._refresh="function"==typeof t?t:()=>{return e=t,new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e),o.addEventListener("load",(()=>{const e=o.status,r=o.response;return e<200||e>299?n(new w("token-cannot-download-new-token",null)):t(r)})),o.addEventListener("error",(()=>n(new Error("Network Error")))),o.addEventListener("abort",(()=>n(new Error("Abort")))),o.send()}));var e},this._options=pD(pD({},mD),e)}init(){return new Promise(((t,e)=>{this.value?(this._options.autoRefresh&&this._registerRefreshTokenTimeout(),t(this)):this.refreshToken().then(t).catch(e)}))}refreshToken(){return this._refresh().then((t=>(this._validateTokenValue(t),this.set("value",t),this._options.autoRefresh&&this._registerRefreshTokenTimeout(),this)))}destroy(){clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(t){const e="string"==typeof t,n=!/^".*"$/.test(t),o=e&&3===t.split(".").length;if(!n||!o)throw new w("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(){const t=this._getTokenRefreshTimeoutTime();clearTimeout(this._tokenRefreshTimeout),this._tokenRefreshTimeout=setTimeout((()=>{this.refreshToken()}),t)}_getTokenRefreshTimeoutTime(){try{const[,t]=this.value.split("."),{exp:e}=JSON.parse(atob(t));if(!e)return gD;return Math.floor((1e3*e-Date.now())/2)}catch(t){return gD}}static create(t,e={}){return new fD(t,e).init()}}const bD=/^data:(\S*?);base64,/;class kD extends(S()){constructor(t,e,n){if(super(),!t)throw new w("fileuploader-missing-file",null);if(!e)throw new w("fileuploader-missing-token",null);if(!n)throw new w("fileuploader-missing-api-address",null);this.file=function(t){if("string"!=typeof t)return!1;const e=t.match(bD);return!(!e||!e.length)}(t)?function(t,e=512){try{const n=t.match(bD)[1],o=atob(t.replace(bD,"")),r=[];for(let t=0;tt(n))),this}onError(t){return this.once("error",((e,n)=>t(n))),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const t=new XMLHttpRequest;t.open("POST",this._apiAddress),t.setRequestHeader("Authorization",this._token.value),t.responseType="json",this.xhr=t}_attachXHRListeners(){const t=this.xhr,e=t=>()=>this.fire("error",t);t.addEventListener("error",e("Network Error")),t.addEventListener("abort",e("Abort")),t.upload&&t.upload.addEventListener("progress",(t=>{t.lengthComputable&&this.fire("progress",{total:t.total,uploaded:t.loaded})})),t.addEventListener("load",(()=>{const e=t.status,n=t.response;if(e<200||e>299)return this.fire("error",n.message||n.error)}))}_sendRequest(){const t=new FormData,e=this.xhr;return t.append("file",this.file),new Promise(((n,o)=>{e.addEventListener("load",(()=>{const t=e.status,r=e.response;return t<200||t>299?r.message?o(new w("fileuploader-uploading-data-failed",this,{message:r.message})):o(r.error):n(r)})),e.addEventListener("error",(()=>o(new Error("Network Error")))),e.addEventListener("abort",(()=>o(new Error("Abort")))),e.send(t)}))}}class wD{constructor(t,e){if(!t)throw new w("uploadgateway-missing-token",null);if(!e)throw new w("uploadgateway-missing-api-address",null);this._token=t,this._apiAddress=e}upload(t){return new kD(t,this._token,this._apiAddress)}}class AD extends mi{static get pluginName(){return"CloudServicesCore"}createToken(t,e){return new fD(t,e)}createUploadGateway(t,e){return new wD(t,e)}}var CD=(t,e,n)=>new Promise(((o,r)=>{var i=t=>{try{a(n.next(t))}catch(t){r(t)}},s=t=>{try{a(n.throw(t))}catch(t){r(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(i,s);a((n=n.apply(t,e)).next())}));var _D=__webpack_require__(2722),yD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(_D.A,yD);_D.A.locals;var vD=__webpack_require__(9627),ID={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(vD.A,ID);vD.A.locals;class ED extends wm{constructor(t){super(t);const e=t.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",((t,e)=>t>0&&!e)),this._findInputView=this._createInputField(e("Find in text…")),this._findPrevButtonView=this._createButton({label:e("Previous result"),class:"ck-button-prev",icon:Ep.previousArrow,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:e("Next result"),class:"ck-button-next",icon:Ep.previousArrow,keystroke:"F3",tooltip:!0}),this._replaceInputView=this._createInputField(e("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:e("Replace all"),class:"ck-button-replaceall",withText:!0}),this._replaceButtonView=this._createButton({label:e("Replace"),class:"ck-button-replace",withText:!0}),this._findButtonView=this._createButton({label:e("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._actionButtonsDivView=this._createActionButtonsDiv(),this._focusTracker=new $r,this._keystrokes=new Qr,this._focusables=new Jp,this.focusCycler=new yg({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(),Kp({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(t){-1===t?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 t=this.locale,e=t.t,n=new wm(t);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:t})=>t)),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",(({findNext:t})=>t)),this._injectFindResultsCounter(),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:t},e)=>t&&e)),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",((t,n)=>t||!n?"":e("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 t=this.t;this._findInputView.errorText=t("Text to find must not be empty.")}}_injectFindResultsCounter(){const t=this.locale,e=t.t,n=this.bindTemplate,o=new wm(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",((t,n)=>e("%0 of %1",[t,n]))),o.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",n.if("isDirty","ck-hidden")]},children:[{text:n.to("_resultsCounterText")}]});const r=()=>{const e=this._findInputView.fieldView.element;if(!e||!Zo(e))return;const n=new zo(o.element).width,r="ltr"===t.uiLanguageDirection?"paddingRight":"paddingLeft";e.style[r]=n?`calc( 2 * var(--ck-spacing-standard) + ${n}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 t=this.locale.t,e=new Wm(this.locale,[this._matchCaseSwitchView,this._wholeWordsOnlySwitchView]);return e.set({label:t("Advanced options"),isCollapsed:!0}),e}_createActionButtonsDiv(){const t=new wm(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replace:t},e)=>t&&e)),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",(({replaceAll:t},e)=>t&&e)),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)),t.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__actions"]},children:[this._replaceAllButtonView,this._replaceButtonView,this._findButtonView]}),t}_createMatchCaseSwitch(){const t=this.locale.t,e=new zm(this.locale);return e.set({label:t("Match case"),withText:!0}),e.bind("isOn").to(this,"_matchCase"),e.on("execute",(()=>{this._matchCase=!this._matchCase,this.isDirty=!0})),e}_createWholeWordsOnlySwitch(){const t=this.locale.t,e=new zm(this.locale);return e.set({label:t("Whole words only"),withText:!0}),e.bind("isOn").to(this,"_wholeWordsOnly"),e.on("execute",(()=>{this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0})),e}_initFocusCycling(){[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._advancedOptionsCollapsibleView.buttonView,this._matchCaseSwitchView,this._wholeWordsOnlySwitchView,this._replaceAllButtonView,this._replaceButtonView,this._findButtonView].forEach((t=>{this._focusables.add(t),this._focusTracker.add(t.element)}))}_initKeystrokeHandling(){const t=t=>t.stopPropagation(),e=t=>{t.stopPropagation(),t.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",(t=>{e(t),this._findNextButtonView.fire("execute")})),this._keystrokes.set("shift+f3",(t=>{e(t),this._findPrevButtonView.fire("execute")})),this._keystrokes.set("enter",(t=>{const n=t.target;n===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),e(t)):n!==this._replaceInputView.fieldView.element||this.isDirty||(this._replaceButtonView.fire("execute"),e(t))})),this._keystrokes.set("shift+enter",(t=>{t.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),e(t))})),this._keystrokes.set("arrowright",t),this._keystrokes.set("arrowleft",t),this._keystrokes.set("arrowup",t),this._keystrokes.set("arrowdown",t)}_createButton(t){const e=new Lm(this.locale);return e.set(t),e}_createInputField(t,e){const n=new cg(this.locale,df);return n.label=t,n.class=e,n}}const xD='';class TD extends ri{constructor(t){super(t),t.config.define("findAndReplace.uiType","dialog"),this.formView=null}static get requires(){return[vb]}static get pluginName(){return"FindAndReplaceUI"}init(){const t=this.editor,e="dropdown"===t.config.get("findAndReplace.uiType"),n=t.commands.get("find"),o=this.editor.t;t.ui.componentFactory.add("findAndReplace",(()=>{let o;return e?(o=this._createDropdown(),o.bind("isEnabled").to(n)):o=this._createDialogButtonForToolbar(),t.keystrokes.set("Ctrl+F",((e,r)=>{if(n.isEnabled){if(o instanceof Cg){const t=o.buttonView;t.isOn||t.fire("execute")}else o.isOn?t.plugins.get("Dialog").view.focus():o.fire("execute");r()}})),o})),e||t.ui.componentFactory.add("menuBar:findAndReplace",(()=>this._createDialogButtonForMenuBar())),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Find in the document"),keystroke:"CTRL+F"}]})}_createDropdown(){const t=this.editor,e=t.locale.t,n=nf(t.locale);return n.once("change:isOpen",(()=>{this.formView=this._createFormView(),this.formView.children.add(new pb(t.locale,{label:e("Find and replace")}),0),n.panelView.children.add(this.formView)})),n.on("change:isOpen",((t,e,n)=>{n?this._setupFormView():this.fire("searchReseted")}),{priority:"low"}),n.buttonView.set({icon:xD,label:e("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),n}_createDialogButtonForToolbar(){const t=this.editor,e=this._createButton(Lm),n=t.plugins.get("Dialog");return e.set({tooltip:!0}),e.bind("isOn").to(n,"id",(t=>"findAndReplace"===t)),e.on("execute",(()=>{e.isOn?n.hide():this._showDialog()})),e}_createDialogButtonForMenuBar(){const t=this._createButton(Ew),e=this.editor.plugins.get("Dialog");return t.on("execute",(()=>{"findAndReplace"!==e.id?this._showDialog():e.hide()})),t}_createButton(t){const e=this.editor,n=e.commands.get("find"),o=new t(e.locale),r=e.locale.t;return o.bind("isEnabled").to(n),o.set({icon:xD,label:r("Find and replace"),keystroke:"CTRL+F"}),o}_showDialog(){const t=this.editor,e=t.plugins.get("Dialog"),n=t.locale.t;this.formView||(this.formView=this._createFormView()),e.show({id:"findAndReplace",title:n("Find and replace"),content:this.formView,position:Ab.EDITOR_TOP_SIDE,onShow:()=>{this._setupFormView()},onHide:()=>{this.fire("searchReseted")}})}_createFormView(){const t=this.editor,e=new(Wp(ED))(t.locale),n=t.commands,o=this.editor.plugins.get("FindAndReplaceEditing").state;e.bind("highlightOffset").to(o,"highlightedOffset"),e.listenTo(o.results,"change",(()=>{e.matchCount=o.results.length}));const r=n.get("findNext"),i=n.get("findPrevious"),s=n.get("replace"),a=n.get("replaceAll");return e.bind("_areCommandsEnabled").to(r,"isEnabled",i,"isEnabled",s,"isEnabled",a,"isEnabled",((t,e,n,o)=>({findNext:t,findPrevious:e,replace:n,replaceAll:o}))),e.delegate("findNext","findPrevious","replace","replaceAll").to(this),e.on("change:isDirty",((t,e,n)=>{n&&this.fire("searchReseted")})),e}_setupFormView(){this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputView.fieldView.select(),this.formView.enableCssTransitions()}}class DD extends si{constructor(t,e){super(t),this.isEnabled=!0,this.affectsData=!1,this._state=e}execute(t,{matchCase:e,wholeWords:n}={}){const{editor:o}=this,{model:r}=o,i=o.plugins.get("FindAndReplaceUtils");let s;"string"==typeof t?(s=i.findByTextCallback(t,{matchCase:e,wholeWords:n}),this._state.searchText=t):s=t;const a=r.document.getRootNames().reduce(((t,e)=>i.updateFindResultFromRange(r.createRangeIn(r.document.getRoot(e)),r,s,t)),null);return this._state.clear(r),this._state.results.addMany(a),this._state.highlightedResult=a.get(0),"string"==typeof t&&(this._state.searchText=t),s&&(this._state.lastSearchCallback=s),this._state.matchCase=!!e,this._state.matchWholeWords=!!n,{results:a,findCallback:s}}}class SD extends si{constructor(t,e){super(t),this.isEnabled=!0,this._state=e,this._isEnabledBasedOnSelection=!1}_replace(t,e){const{model:n}=this.editor,o=e.marker.getRange();n.canEditAt(o)&&n.change((r=>{if("$graveyard"===o.root.rootName)return void this._state.results.remove(e);let i={};for(const t of o.getItems())if(t.is("$text")||t.is("$textProxy")){i=t.getAttributes();break}n.insertContent(r.createText(t,i),o),this._state.results.has(e)&&this._state.results.remove(e)}))}}class OD extends SD{execute(t,e){this._replace(t,e)}}class BD extends SD{execute(t,e){const{editor:n}=this,{model:o}=n,r=n.plugins.get("FindAndReplaceUtils"),i=e instanceof Yr?e:o.document.getRootNames().reduce(((t,n)=>r.updateFindResultFromRange(o.createRangeIn(o.document.getRoot(n)),o,r.findByTextCallback(e,this._state),t)),null);i.length&&o.change((()=>{[...i].forEach((e=>{this._replace(t,e)}))}))}}class MD extends si{constructor(t,e){super(t),this.affectsData=!1,this._state=e,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 t=this._state.results,e=t.getIndex(this._state.highlightedResult),n=e+1>=t.length?0:e+1;this._state.highlightedResult=this._state.results.get(n)}}class ND extends MD{execute(){const t=this._state.results.getIndex(this._state.highlightedResult),e=t-1<0?this._state.results.length-1:t-1;this._state.highlightedResult=this._state.results.get(e)}}class PD extends(G()){constructor(t){super(),this.set("results",new Yr),this.set("highlightedResult",null),this.set("highlightedOffset",0),this.set("searchText",""),this.set("replaceText",""),this.set("lastSearchCallback",null),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",((e,{removed:n,index:o})=>{if(Array.from(n).length){let e=!1;if(t.change((o=>{for(const r of n)this.highlightedResult===r&&(e=!0),t.markers.has(r.marker.name)&&o.removeMarker(r.marker)})),e){const t=o>=this.results.length?0:o;this.highlightedResult=this.results.get(t)}}})),this.on("change:highlightedResult",(()=>{this.refreshHighlightOffset()}))}clear(t){this.searchText="",t.change((e=>{if(this.highlightedResult){const n=this.highlightedResult.marker.name.split(":")[1],o=t.markers.get(`findResultHighlighted:${n}`);o&&e.removeMarker(o)}[...this.results].forEach((({marker:t})=>{e.removeMarker(t)}))})),this.results.clear()}refreshHighlightOffset(){const{highlightedResult:t,results:e}=this,n={before:-1,same:0,after:1,different:1};this.highlightedOffset=t?Array.from(e).sort(((t,e)=>n[t.marker.getStart().compareWith(e.marker.getStart())])).indexOf(t)+1:0}}class RD extends ri{static get pluginName(){return"FindAndReplaceUtils"}updateFindResultFromRange(t,e,n,o){const r=o||new Yr;return e.change((o=>{[...t].forEach((({type:t,item:i})=>{if("elementStart"===t&&e.schema.checkChild(i,"$text")){const t=n({item:i,text:this.rangeToText(e.createRangeIn(i))});if(!t)return;t.forEach((t=>{const e=`findResult:${g()}`,n=o.addMarker(e,{usingOperation:!1,affectsData:!1,range:o.createRange(o.createPositionAt(i,t.start),o.createPositionAt(i,t.end))}),s=function(t,e){const n=t.find((({marker:t})=>e.getStart().isBefore(t.getStart())));return n?t.getIndex(n):t.length}(r,n);(t=>r.find((e=>{const{marker:n}=e,o=n.getRange(),r=t.getRange();return o.isEqual(r)})))(n)||r.add({id:e,label:t.label,marker:n},s)}))}}))})),r}rangeToText(t){return Array.from(t.getItems()).reduce(((t,e)=>e.is("$text")||e.is("$textProxy")?t+e.data:`${t}\n`),"")}findByTextCallback(t,e){let n="gu";e.matchCase||(n+="i");let o=`(${Fk(t)})`;if(e.wholeWords){const e="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+e).test(t)||(o=`(^|${e}|_)${o}`),new RegExp(e+"$").test(t)||(o=`${o}(?=_|${e}|$)`)}const r=new RegExp(o,n);return function({text:t}){return[...t.matchAll(r)].map(LD)}}}function LD(t){const e=t.length-1;let n=t.index;return 3===t.length&&(n+=t[1].length),{label:t[e],start:n,end:n+t[e].length}}var jD=__webpack_require__(4341),VD={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(jD.A,VD);jD.A.locals;class zD extends ri{constructor(){super(...arguments),this._onDocumentChange=()=>{const t=new Set,e=new Set,n=this.editor.model,{results:o}=this.state,r=n.document.differ.getChanges(),i=n.document.differ.getChangedMarkers();r.forEach((o=>{o.position&&("$text"===o.name||o.position.nodeAfter&&n.schema.isInline(o.position.nodeAfter)?(t.add(o.position.parent),[...n.markers.getMarkersAtPosition(o.position)].forEach((t=>{e.add(t.name)}))):"insert"===o.type&&o.position.nodeAfter&&t.add(o.position.nodeAfter))})),i.forEach((({name:t,data:{newRange:n}})=>{n&&"$graveyard"===n.start.root.rootName&&e.add(t)})),t.forEach((t=>{[...n.markers.getMarkersIntersectingRange(n.createRangeIn(t))].forEach((t=>e.add(t.name)))})),e.forEach((t=>{o.has(t)&&(o.get(t)===this.state.highlightedResult&&(this.state.highlightedResult=null),o.remove(t))}));const s=[],a=this.editor.plugins.get("FindAndReplaceUtils");t.forEach((t=>{const e=a.updateFindResultFromRange(n.createRangeOn(t),n,this.state.lastSearchCallback,o);s.push(...e)})),i.forEach((t=>{if(t.data.newRange){const e=a.updateFindResultFromRange(t.data.newRange,n,this.state.lastSearchCallback,o);s.push(...e)}})),!this.state.highlightedResult&&s.length?this.state.highlightedResult=s[0]:this.state.refreshHighlightOffset()}}static get requires(){return[RD]}static get pluginName(){return"FindAndReplaceEditing"}init(){this.state=new PD(this.editor.model),this.set("_isSearchActive",!1),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",((t,e,n,o)=>{const{model:r}=this.editor;r.change((t=>{if(o){const e=o.marker.name.split(":")[1],n=r.markers.get(`findResultHighlighted:${e}`);n&&t.removeMarker(n)}if(n){const e=n.marker.name.split(":")[1];t.addMarker(`findResultHighlighted:${e}`,{usingOperation:!1,affectsData:!1,range:n.marker.getRange()})}}))}));const t=Ka(((t,e,n)=>{if(n){const t=this.editor.editing.view.domConverter,e=this.editor.editing.mapper.toViewRange(n.marker.getRange());rr({target:t.viewRangeToDom(e),viewportOffset:40})}}).bind(this),32);this.listenTo(this.state,"change:highlightedResult",t,{priority:"low"}),this.listenTo(this.editor,"destroy",t.cancel),this.on("change:_isSearchActive",((t,e,n)=>{n?this.listenTo(this.editor.model.document,"change:data",this._onDocumentChange):this.stopListening(this.editor.model.document,"change:data",this._onDocumentChange)}))}find(t,e){return this._isSearchActive=!0,this.editor.execute("find",t,e),this.state.results}stop(){this.state.clear(this.editor.model),this._isSearchActive=!1}_defineCommands(){this.editor.commands.add("find",new DD(this.editor,this.state)),this.editor.commands.add("findNext",new MD(this.editor,this.state)),this.editor.commands.add("findPrevious",new ND(this.editor,this.state)),this.editor.commands.add("replace",new OD(this.editor,this.state)),this.editor.commands.add("replaceAll",new BD(this.editor,this.state))}_defineConverters(){const{editor:t}=this;t.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:t})=>{const[,e]=t.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":e}}}}),t.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:t})=>{const[,e]=t.split(":");return{name:"span",classes:["ck-find-result_selected"],attributes:{"data-find-result":e}}}})}}class FD extends si{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute(this.attributeKey),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=t.value,r=t.batch,i=t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,o):t.removeSelectionAttribute(this.attributeKey);else{const r=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of r)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}};r?e.enqueueChange(r,(t=>{i(t)})):e.change((t=>{i(t)}))}}const UD="fontSize",HD="fontFamily",qD="fontColor",GD="fontBackgroundColor";function WD(t,e){const n={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const t of e)n.model.values.push(t.model),n.view[t.model]=t.view,t.upcastAlso&&(n.upcastAlso[t.model]=t.upcastAlso);return n}function KD(t){return e=>function(t){return t.replace(/\s/g,"")}(e.getStyle(t))}function YD(t){return(e,{writer:n})=>n.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}class JD extends FD{constructor(t){super(t,HD)}}function $D(t){return t.map(QD).filter((t=>void 0!==t))}function QD(t){return"object"==typeof t?t:"default"===t?{title:"Default",model:void 0}:"string"==typeof t?function(t){const e=t.replace(/"|'/g,"").split(","),n=e[0],o=e.map(ZD).join(", ");return{title:n,model:o,view:{name:"span",styles:{"font-family":o},priority:7}}}(t):void 0}function ZD(t){return(t=t.trim()).indexOf(" ")>0&&(t=`'${t}'`),t}class XD extends ri{static get pluginName(){return"FontFamilyEditing"}constructor(t){super(t),t.config.define(HD,{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 t=this.editor;t.model.schema.extend("$text",{allowAttributes:HD}),t.model.schema.setAttributeProperties(HD,{isFormatting:!0,copyOnEnter:!0});const e=$D(t.config.get("fontFamily.options")).filter((t=>t.model)),n=WD(HD,e);t.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(n),t.commands.add(HD,new JD(t))}_prepareAnyValueConverters(){const t=this.editor;t.conversion.for("downcast").attributeToElement({model:HD,view:(t,{writer:e})=>e.createAttributeElement("span",{style:"font-family:"+t},{priority:7})}),t.conversion.for("upcast").elementToAttribute({model:{key:HD,value:t=>t.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:HD,value:t=>t.getAttribute("face")}})}}const tS='';class eS extends ri{static get pluginName(){return"FontFamilyUI"}init(){const t=this.editor,e=t.t,n=this._getLocalizedOptions(),o=t.commands.get(HD),r=e("Font Family"),i=function(t,e){const n=new Yr;for(const o of t){const t={type:"button",model:new Ik({commandName:HD,commandParam:o.model,label:o.title,role:"menuitemradio",withText:!0})};t.model.bind("isOn").to(e,"value",(t=>t===o.model||!(!t||!o.model)&&t.split(",")[0].replace(/'/g,"").toLowerCase()===o.model.toLowerCase())),o.view&&"string"!=typeof o.view&&o.view.styles&&t.model.set("labelStyle",`font-family: ${o.view.styles["font-family"]}`),n.add(t)}return n}(n,o);t.ui.componentFactory.add(HD,(e=>{const n=nf(e);return sf(n,i,{role:"menu",ariaLabel:r}),n.buttonView.set({label:r,icon:tS,tooltip:!0}),n.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),n.bind("isEnabled").to(o),this.listenTo(n,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),n})),t.ui.componentFactory.add(`menuBar:${HD}`,(e=>{const n=new _w(e);n.buttonView.set({label:r,icon:tS}),n.bind("isEnabled").to(o);const s=new yw(e);for(const o of i){const r=new pw(e,n),i=new Ew(e);i.bind(...Object.keys(o.model)).to(o.model),i.bind("ariaChecked").to(i,"isOn"),i.delegate("execute").to(n),i.on("execute",(()=>{t.execute(o.model.commandName,{value:o.model.commandParam}),t.editing.view.focus()})),r.children.add(i),s.items.add(r)}return n.panelView.children.add(s),n}))}_getLocalizedOptions(){const t=this.editor,e=t.t;return $D(t.config.get(HD).options).map((t=>("Default"===t.title&&(t.title=e("Default")),t)))}}class nS extends FD{constructor(t){super(t,UD)}}function oS(t){return t.map((t=>function(t){"number"==typeof t&&(t=String(t));if("object"==typeof t&&(e=t,e.title&&e.model&&e.view))return iS(t);var e;const n=function(t){return"string"==typeof t?rS[t]:rS[t.model]}(t);if(n)return iS(n);if("default"===t)return{model:void 0,title:"Default"};if(function(t){let e;if("object"==typeof t){if(!t.model)throw new w("font-size-invalid-definition",null,t);e=parseFloat(t.model)}else e=parseFloat(t);return isNaN(e)}(t))return;return function(t){"string"==typeof t&&(t={title:t,model:`${parseFloat(t)}px`});return t.view={name:"span",styles:{"font-size":t.model}},iS(t)}(t)}(t))).filter((t=>void 0!==t))}const rS={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 iS(t){return t.view&&"string"!=typeof t.view&&!t.view.priority&&(t.view.priority=7),t}const sS=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class aS extends ri{static get pluginName(){return"FontSizeEditing"}constructor(t){super(t),t.config.define(UD,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:UD}),t.model.schema.setAttributeProperties(UD,{isFormatting:!0,copyOnEnter:!0});const e=t.config.get("fontSize.supportAllValues"),n=oS(this.editor.config.get("fontSize.options")).filter((t=>t.model)),o=WD(UD,n);e?(this._prepareAnyValueConverters(o),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(o),t.commands.add(UD,new nS(t))}_prepareAnyValueConverters(t){const e=this.editor,n=t.model.values.filter((t=>!Nh(String(t))&&!Rh(String(t))));if(n.length)throw new w("font-size-invalid-use-of-named-presets",null,{presets:n});e.conversion.for("downcast").attributeToElement({model:UD,view:(t,{writer:e})=>{if(t)return e.createAttributeElement("span",{style:"font-size:"+t},{priority:7})}}),e.conversion.for("upcast").elementToAttribute({model:{key:UD,value:t=>t.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:UD,value:t=>{const e=t.getAttribute("size"),n="-"===e[0]||"+"===e[0];let o=parseInt(e,10);n&&(o=3+o);const r=sS.length-1,i=Math.min(Math.max(o,0),r);return sS[i]}}})}}var cS=__webpack_require__(1058),lS={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(cS.A,lS);cS.A.locals;const dS='';class uS extends ri{static get pluginName(){return"FontSizeUI"}init(){const t=this.editor,e=t.t,n=this._getLocalizedOptions(),o=t.commands.get(UD),r=e("Font Size"),i=function(t,e){const n=new Yr;for(const o of t){const t={type:"button",model:new Ik({commandName:UD,commandParam:o.model,label:o.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};o.view&&"string"!=typeof o.view&&(o.view.styles&&t.model.set("labelStyle",`font-size:${o.view.styles["font-size"]}`),o.view.classes&&t.model.set("class",`${t.model.class} ${o.view.classes}`)),t.model.bind("isOn").to(e,"value",(t=>t===o.model)),n.add(t)}return n}(n,o);t.ui.componentFactory.add(UD,(e=>{const n=nf(e);return sf(n,i,{role:"menu",ariaLabel:r}),n.buttonView.set({label:r,icon:dS,tooltip:!0}),n.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),n.bind("isEnabled").to(o),this.listenTo(n,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),n})),t.ui.componentFactory.add(`menuBar:${UD}`,(e=>{const n=new _w(e);n.buttonView.set({label:r,icon:dS}),n.bind("isEnabled").to(o);const s=new yw(e);for(const o of i){const r=new pw(e,n),i=new Ew(e);i.bind(...Object.keys(o.model)).to(o.model),i.bind("ariaChecked").to(i,"isOn"),i.delegate("execute").to(n),i.on("execute",(()=>{t.execute(o.model.commandName,{value:o.model.commandParam}),t.editing.view.focus()})),r.children.add(i),s.items.add(r)}return n.panelView.children.add(s),n}))}_getLocalizedOptions(){const t=this.editor,e=t.t,n={Default:e("Default"),Tiny:e("Tiny"),Small:e("Small"),Big:e("Big"),Huge:e("Huge")};return oS(t.config.get(UD).options).map((t=>{const e=n[t.title];return e&&e!=t.title&&(t=Object.assign({},t,{title:e})),t}))}}class hS extends FD{constructor(t){super(t,qD)}}class pS extends ri{static get pluginName(){return"FontColorEditing"}constructor(t){super(t),t.config.define(qD,{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}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:qD,value:KD("color")}}),t.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:qD,value:t=>t.getAttribute("color")}}),t.conversion.for("downcast").attributeToElement({model:qD,view:YD("color")}),t.commands.add(qD,new hS(t)),t.model.schema.extend("$text",{allowAttributes:qD}),t.model.schema.setAttributeProperties(qD,{isFormatting:!0,copyOnEnter:!0})}}class mS extends ri{constructor(t,{commandName:e,componentName:n,icon:o,dropdownLabel:r}){super(t),this.commandName=e,this.componentName=n,this.icon=o,this.dropdownLabel=r,this.columns=t.config.get(`${this.componentName}.columns`)}init(){const t=this.editor,e=t.locale,n=e.t,o=t.commands.get(this.commandName),r=t.config.get(this.componentName),i=Km(e,Ym(r.colors)),s=r.documentColors,a=!1!==r.colorPicker;t.ui.componentFactory.add(this.componentName,(e=>{const c=nf(e);let l=!1;const d=function({dropdownView:t,colors:e,columns:n,removeButtonLabel:o,colorPickerLabel:r,documentColorsLabel:i,documentColorsCount:s,colorPickerViewConfig:a}){const c=t.locale,l=new cb(c,{colors:e,columns:n,removeButtonLabel:o,colorPickerLabel:r,documentColorsLabel:i,documentColorsCount:s,colorPickerViewConfig:a});return t.colorSelectorView=l,t.panelView.children.add(l),l}({dropdownView:c,colors:i.map((t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}}))),columns:this.columns,removeButtonLabel:n("Remove color"),colorPickerLabel:n("Color picker"),documentColorsLabel:0!==s?n("Document colors"):"",documentColorsCount:void 0===s?this.columns:s,colorPickerViewConfig:!!a&&(r.colorPicker||{})});return d.bind("selectedColor").to(o,"value"),c.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),c.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),c.bind("isEnabled").to(o),d.on("execute",((e,n)=>{c.isOpen&&t.execute(this.commandName,{value:n.value,batch:this._undoStepBatch}),"colorPicker"!==n.source&&t.editing.view.focus(),"colorPickerSaveButton"===n.source&&(c.isOpen=!1)})),d.on("colorPicker:show",(()=>{this._undoStepBatch=t.model.createBatch()})),d.on("colorPicker:cancel",(()=>{this._undoStepBatch.operations.length&&(c.isOpen=!1,t.execute("undo",this._undoStepBatch)),t.editing.view.focus()})),c.on("change:isOpen",((e,n,o)=>{l||(l=!0,c.colorSelectorView.appendUI()),o&&(0!==s&&d.updateDocumentColors(t.model,this.componentName),d.updateSelectedColors(),d.showColorGridsFragment())})),cf(c,(()=>c.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find((t=>t.isOn)))),c})),t.ui.componentFactory.add(`menuBar:${this.componentName}`,(e=>{const r=new _w(e);r.buttonView.set({label:this.dropdownLabel,icon:this.icon}),r.bind("isEnabled").to(o);let a=!1;const c=new cb(e,{colors:i.map((t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}}))),columns:this.columns,removeButtonLabel:n("Remove color"),colorPickerLabel:n("Color picker"),documentColorsLabel:0!==s?n("Document colors"):"",documentColorsCount:void 0===s?this.columns:s,colorPickerViewConfig:!1});return c.bind("selectedColor").to(o,"value"),c.delegate("execute").to(r),c.on("execute",((e,n)=>{t.execute(this.commandName,{value:n.value,batch:this._undoStepBatch}),t.editing.view.focus()})),r.on("change:isOpen",((e,n,o)=>{a||(a=!0,c.appendUI()),o&&(0!==s&&c.updateDocumentColors(t.model,this.componentName),c.updateSelectedColors(),c.showColorGridsFragment())})),r.panelView.children.add(c),r}))}}class gS extends mS{constructor(t){const e=t.locale.t;super(t,{commandName:qD,componentName:qD,icon:'',dropdownLabel:e("Font Color")})}static get pluginName(){return"FontColorUI"}}class fS extends FD{constructor(t){super(t,GD)}}class bS extends ri{static get pluginName(){return"FontBackgroundColorEditing"}constructor(t){super(t),t.config.define(GD,{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}),t.data.addStyleProcessorRules($h),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:GD,value:KD("background-color")}}),t.conversion.for("downcast").attributeToElement({model:GD,view:YD("background-color")}),t.commands.add(GD,new fS(t)),t.model.schema.extend("$text",{allowAttributes:GD}),t.model.schema.setAttributeProperties(GD,{isFormatting:!0,copyOnEnter:!0})}}class kS extends mS{constructor(t){const e=t.locale.t;super(t,{commandName:GD,componentName:GD,icon:'',dropdownLabel:e("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class wS extends si{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=Jr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((e=>AS(t,e,this.editor.model.schema)))}execute(t){const e=this.editor.model,n=e.document,o=t.value;e.change((t=>{const r=Array.from(n.selection.getSelectedBlocks()).filter((t=>AS(t,o,e.schema)));for(const e of r)e.is("element",o)||t.rename(e,o)}))}}function AS(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const CS="paragraph";class _S extends ri{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.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[Uv]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const o of e)"paragraph"!==o.model&&(t.model.schema.register(o.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(o),n.push(o.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new wS(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",((e,o)=>{const r=t.model.document.selection.getFirstPosition().parent;n.some((t=>r.is("element",t.model)))&&!r.is("element",CS)&&0===r.childCount&&o.writer.rename(r,CS)}))}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:f.low+1})}}var yS=__webpack_require__(6269),vS={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(yS.A,vS);yS.A.locals;class IS extends ri{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,e=t.t,n=function(t){const e=t.t,n={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return t.config.get("heading.options").map((t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t}))}(t),o=e("Choose heading"),r=e("Heading");t.ui.componentFactory.add("heading",(e=>{const i={},s=new Yr,a=t.commands.get("heading"),c=t.commands.get("paragraph"),l=[a];for(const t of n){const e={type:"button",model:new Ik({label:t.title,class:t.class,role:"menuitemradio",withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(c,"value"),e.model.set("commandName","paragraph"),l.push(c)):(e.model.bind("isOn").to(a,"value",(e=>e===t.model)),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),i[t.model]=t.title}const d=nf(e);return sf(d,s,{ariaLabel:r,role:"menu"}),d.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(l,"isEnabled",((...t)=>t.some((t=>t)))),d.buttonView.bind("label").to(a,"value",c,"value",((t,e)=>{const n=e?"paragraph":t;return"boolean"==typeof n?o:i[n]?i[n]:o})),d.buttonView.bind("ariaLabel").to(a,"value",c,"value",((t,e)=>{const n=e?"paragraph":t;return"boolean"==typeof n?r:i[n]?`${i[n]}, ${r}`:r})),this.listenTo(d,"execute",(e=>{const{commandName:n,commandValue:o}=e.source;t.execute(n,o?{value:o}:void 0),t.editing.view.focus()})),d})),t.ui.componentFactory.add("menuBar:heading",(o=>{const r=new _w(o),i=t.commands.get("heading"),s=t.commands.get("paragraph"),a=[i],c=new yw(o);r.set({class:"ck-heading-dropdown"}),c.set({ariaLabel:e("Heading"),role:"menu"}),r.buttonView.set({label:e("Heading")}),r.panelView.children.add(c);for(const e of n){const n=new pw(o,r),l=new Ew(o);n.children.add(l),c.items.add(n),l.set({label:e.title,role:"menuitemradio",class:e.class}),l.bind("ariaChecked").to(l,"isOn"),l.delegate("execute").to(r),l.on("execute",(()=>{const n="paragraph"===e.model?"paragraph":"heading";t.execute(n,{value:e.model}),t.editing.view.focus()})),"paragraph"===e.model?(l.bind("isOn").to(s,"value"),a.push(s)):l.bind("isOn").to(i,"value",(t=>t===e.model))}return r.bind("isEnabled").toMany(a,"isEnabled",((...t)=>t.some((t=>t)))),r}))}}class ES extends si{refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute("highlight"),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"highlight")}execute(t={}){const e=this.editor.model,n=e.document.selection,o=t.value;e.change((t=>{if(n.isCollapsed){const e=n.getFirstPosition();if(n.hasAttribute("highlight")){const n=t=>t.item.hasAttribute("highlight")&&t.item.getAttribute("highlight")===this.value,r=e.getLastMatchingPosition(n,{direction:"backward"}),i=e.getLastMatchingPosition(n),s=t.createRange(r,i);o&&this.value!==o?(e.isEqual(i)||t.setAttribute("highlight",o,s),t.setSelectionAttribute("highlight",o)):(e.isEqual(i)||t.removeAttribute("highlight",s),t.removeSelectionAttribute("highlight"))}else o&&t.setSelectionAttribute("highlight",o)}else{const r=e.schema.getValidRanges(n.getRanges(),"highlight");for(const e of r)o?t.setAttribute("highlight",o,e):t.removeAttribute("highlight",e)}}))}}class xS extends ri{static get pluginName(){return"HighlightEditing"}constructor(t){super(t),t.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"highlight"});const e=t.config.get("highlight.options");t.conversion.attributeToElement(function(t){const e={model:{key:"highlight",values:[]},view:{}};for(const n of t)e.model.values.push(n.model),e.view[n.model]={name:"mark",classes:n.class};return e}(e)),t.commands.add("highlight",new ES(t))}}var TS=__webpack_require__(1569),DS={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(TS.A,DS);TS.A.locals;class SS extends ri{get localizedOptionTitles(){const t=this.editor.t;return{"Yellow marker":t("Yellow marker"),"Green marker":t("Green marker"),"Pink marker":t("Pink marker"),"Blue marker":t("Blue marker"),"Red pen":t("Red pen"),"Green pen":t("Green pen")}}static get pluginName(){return"HighlightUI"}init(){const t=this.editor.config.get("highlight.options");for(const e of t)this._addHighlighterButton(e);this._addRemoveHighlightButton(),this._addDropdown(t),this._addMenuBarButton(t)}_addRemoveHighlightButton(){const t=this.editor.t,e=this.editor.commands.get("highlight");this._addButton("removeHighlight",t("Remove highlight"),Ep.eraser,null,(t=>{t.bind("isEnabled").to(e,"isEnabled")}))}_addHighlighterButton(t){const e=this.editor.commands.get("highlight");this._addButton("highlight:"+t.model,t.title,OS(t.type),t.model,(function(n){n.bind("isEnabled").to(e,"isEnabled"),n.bind("isOn").to(e,"value",(e=>e===t.model)),n.iconView.fillColor=t.color,n.isToggleable=!0}))}_addButton(t,e,n,o,r){const i=this.editor;i.ui.componentFactory.add(t,(t=>{const s=new Lm(t),a=this.localizedOptionTitles[e]?this.localizedOptionTitles[e]:e;return s.set({label:a,icon:n,tooltip:!0}),s.on("execute",(()=>{i.execute("highlight",{value:o}),i.editing.view.focus()})),r(s),s}))}_addDropdown(t){const e=this.editor,n=e.t,o=e.ui.componentFactory,r=t[0],i=t.reduce(((t,e)=>(t[e.model]=e,t)),{});o.add("highlight",(s=>{const a=e.commands.get("highlight"),c=nf(s,Qg),l=c.buttonView;l.set({label:n("Highlight"),tooltip:!0,lastExecuted:r.model,commandValue:r.model,isToggleable:!0}),l.bind("icon").to(a,"value",(t=>OS(d(t,"type")))),l.bind("color").to(a,"value",(t=>d(t,"color"))),l.bind("commandValue").to(a,"value",(t=>d(t,"model"))),l.bind("isOn").to(a,"value",(t=>!!t)),l.delegate("execute").to(c);function d(t,e){const n=t&&t!==l.lastExecuted?t:l.lastExecuted;return i[n][e]}return c.bind("isEnabled").to(a,"isEnabled"),of(c,(()=>{const e=t.map((t=>{const e=o.create("highlight:"+t.model);return this.listenTo(e,"execute",(()=>{c.buttonView.set({lastExecuted:t.model})})),e}));return e.push(new Eg),e.push(o.create("removeHighlight")),e}),{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:n("Text highlight toolbar")}),function(t){const e=t.buttonView.actionView;e.iconView.bind("fillColor").to(t.buttonView,"color")}(c),l.on("execute",(()=>{e.execute("highlight",{value:l.commandValue})})),this.listenTo(c,"execute",(()=>{e.editing.view.focus()})),c}))}_addMenuBarButton(t){const e=this.editor,n=e.t;e.ui.componentFactory.add("menuBar:highlight",(o=>{const r=e.commands.get("highlight"),i=new _w(o);i.buttonView.set({label:n("Highlight"),icon:OS("marker")}),i.bind("isEnabled").to(r),i.buttonView.iconView.fillColor="transparent";const s=new yw(o);for(const n of t){const t=new pw(o,i),a=new Ew(o);a.set({label:n.title,icon:OS(n.type)}),a.delegate("execute").to(i),a.bind("isOn").to(r,"value",(t=>t===n.model)),a.bind("ariaChecked").to(a,"isOn"),a.iconView.bind("fillColor").to(a,"isOn",(t=>t?"transparent":n.color)),a.on("execute",(()=>{e.execute("highlight",{value:n.model}),e.editing.view.focus()})),t.children.add(a),s.items.add(t)}s.items.add(new qg(o));const a=new pw(o,i),c=new Ew(o);return c.set({label:n("Remove highlight"),icon:Ep.eraser}),c.delegate("execute").to(i),c.on("execute",(()=>{e.execute("highlight",{value:null}),e.editing.view.focus()})),a.children.add(c),s.items.add(a),i.panelView.children.add(s),i}))}}function OS(t){return"marker"===t?'':''}class BS extends si{refresh(){const t=this.editor.model,e=t.schema,n=t.document.selection;this.isEnabled=function(t,e,n){const o=function(t,e){const n=py(t,e),o=n.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(t,n);return e.checkChild(o,"horizontalLine")}(n,e,t)}execute(){const t=this.editor.model;t.change((e=>{const n=e.createElement("horizontalLine");t.insertObject(n,null,null,{setSelection:"after"})}))}}var MS=__webpack_require__(2626),NS={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(MS.A,NS);MS.A.locals;class PS extends ri{static get pluginName(){return"HorizontalLineEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion;e.register("horizontalLine",{inheritAllFrom:"$blockObject"}),o.for("dataDowncast").elementToElement({model:"horizontalLine",view:(t,{writer:e})=>e.createEmptyElement("hr")}),o.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(t,{writer:e})=>{const o=n("Horizontal line"),r=e.createContainerElement("div",null,e.createEmptyElement("hr"));return e.addClass("ck-horizontal-line",r),e.setCustomProperty("hr",!0,r),function(t,e,n){return e.setCustomProperty("horizontalLine",!0,t),cy(t,e,{label:n})}(r,e,o)}}),o.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),t.commands.add("horizontalLine",new BS(t))}}class RS extends ri{static get pluginName(){return"HorizontalLineUI"}init(){const t=this.editor;t.ui.componentFactory.add("horizontalLine",(()=>{const t=this._createButton(Lm);return t.set({tooltip:!0}),t})),t.ui.componentFactory.add("menuBar:horizontalLine",(()=>this._createButton(Ew)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("horizontalLine"),r=new t(e.locale),i=n.t;return r.set({label:i("Horizontal line"),icon:Ep.horizontalLine}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("horizontalLine"),e.editing.view.focus()})),r}}function LS(t){return t.createContainerElement("figure",{class:"image"},[t.createEmptyElement("img"),t.createSlot("children")])}function jS(t,e){const n=t.plugins.get("ImageUtils"),o=t.plugins.has("ImageInlineEditing")&&t.plugins.has("ImageBlockEditing");return t=>{if(!n.isInlineImageView(t))return null;if(!o)return r(t);return("block"==t.getStyle("display")||t.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==e?null:r(t)};function r(t){const e={name:!0};return t.hasAttribute("src")&&(e.attributes=["src"]),e}}function VS(t,e){const n=Jr(e.getSelectedBlocks());return!n||t.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}function zS(t){return t&&t.endsWith("px")?parseInt(t):null}function FS(t){const e=zS(t.getStyle("width")),n=zS(t.getStyle("height"));return!(!e||!n)}var US=Object.defineProperty,HS=Object.getOwnPropertySymbols,qS=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable,WS=(t,e,n)=>e in t?US(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KS=(t,e)=>{for(var n in e||(e={}))qS.call(e,n)&&WS(t,n,e[n]);if(HS)for(var n of HS(e))GS.call(e,n)&&WS(t,n,e[n]);return t};const YS=/^(image|image-inline)$/;class JS extends ri{constructor(){super(...arguments),this._domEmitter=new(So())}static get pluginName(){return"ImageUtils"}isImage(t){return this.isInlineImage(t)||this.isBlockImage(t)}isInlineImageView(t){return!!t&&t.is("element","img")}isBlockImageView(t){return!!t&&t.is("element","figure")&&t.hasClass("image")}insertImage(t={},e=null,n=null,o={}){const r=this.editor,i=r.model,s=i.document.selection,a=$S(r,e||s,n);t=KS(KS({},Object.fromEntries(s.getAttributes())),t);for(const e in t)i.schema.checkAttribute(a,e)||delete t[e];return i.change((n=>{const{setImageSizes:r=!0}=o,s=n.createElement(a,t);return i.insertObject(s,e,null,{setSelection:"on",findOptimalPosition:e||"imageInline"==a?void 0:"auto"}),s.parent?(r&&this.setImageNaturalSizeAttributes(s),s):null}))}setImageNaturalSizeAttributes(t){const e=t.getAttribute("src");e&&(t.getAttribute("width")||t.getAttribute("height")||this.editor.model.change((n=>{const o=new No.window.Image;this._domEmitter.listenTo(o,"load",(()=>{t.getAttribute("width")||t.getAttribute("height")||this.editor.model.enqueueChange(n.batch,(e=>{e.setAttribute("width",o.naturalWidth,t),e.setAttribute("height",o.naturalHeight,t)})),this._domEmitter.stopListening(o,"load")})),o.src=e})))}getClosestSelectedImageWidget(t){const e=t.getFirstPosition();if(!e)return null;const n=t.getSelectedElement();if(n&&this.isImageWidget(n))return n;let o=e.parent;for(;o;){if(o.is("element")&&this.isImageWidget(o))return o;o=o.parent}return null}getClosestSelectedImageElement(t){const e=t.getSelectedElement();return this.isImage(e)?e:t.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(t){return t.findAncestor({classes:YS})}isImageAllowed(){const t=this.editor.model.document.selection;return function(t,e){const n=$S(t,e,null);if("imageBlock"==n){const n=function(t,e){const n=py(t,e),o=n.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(e,t.model);if(t.model.schema.checkChild(n,"imageBlock"))return!0}else if(t.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}(this.editor,t)&&function(t){return[...t.focus.getAncestors()].every((t=>!t.is("element","imageBlock")))}(t)}toImageWidget(t,e,n){e.setCustomProperty("image",!0,t);return cy(t,e,{label:()=>{const e=this.findViewImgElement(t).getAttribute("alt");return e?`${e} ${n}`:n}})}isImageWidget(t){return!!t.getCustomProperty("image")&&ay(t)}isBlockImage(t){return!!t&&t.is("element","imageBlock")}isInlineImage(t){return!!t&&t.is("element","imageInline")}findViewImgElement(t){if(this.isInlineImageView(t))return t;const e=this.editor.editing.view;for(const{item:n}of e.createRangeIn(t))if(this.isInlineImageView(n))return n}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function $S(t,e,n){const o=t.model.schema,r=t.config.get("image.insert.type");return t.plugins.has("ImageBlockEditing")?t.plugins.has("ImageInlineEditing")?n||("inline"===r?"imageInline":"auto"!==r?"imageBlock":e.is("selection")?VS(o,e):o.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;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 QS extends si{refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o=e.model,r=n.getClosestSelectedImageElement(o.document.selection);o.change((e=>{e.setAttribute("alt",t.newValue,r)}))}}class ZS extends ri{static get requires(){return[JS]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new QS(this.editor))}}var XS=__webpack_require__(4062),tO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(XS.A,tO);XS.A.locals;class eO extends wm{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new $r,this.keystrokes=new Qr,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("Save"),Ep.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("Cancel"),Ep.cancel,"ck-button-cancel","cancel"),this._focusables=new Jp,this._focusCycler=new yg({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),Kp({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,e,n,o){const r=new Lm(this.locale);return r.set({label:t,icon:e,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate("execute").to(this,o),r}_createLabeledInputView(){const t=this.locale.t,e=new cg(this.locale,df);return e.label=t("Text alternative"),e}}function nO(t){const e=t.editing.view,n=Lb.defaultPositions,o=t.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(e.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class oO extends ri{static get requires(){return[Ok]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",(n=>{const o=t.commands.get("imageTextAlternative"),r=new Lm(n);return r.set({label:e("Change image text alternative"),icon:Ep.textAlternative,tooltip:!0}),r.bind("isEnabled").to(o,"isEnabled"),r.bind("isOn").to(o,"value",(t=>!!t)),this.listenTo(r,"execute",(()=>{this._showForm()})),r}))}_createForm(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Wp(eO))(t.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{t.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",((t,e)=>{this._hideForm(!0),e()})),this.listenTo(t.ui,"update",(()=>{n.getClosestSelectedImageWidget(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(t.plugins.get("ImageUtils").getClosestSelectedImageWidget(t.editing.view.document.selection)){const n=nO(t);e.updatePosition(n)}}(t):this._hideForm(!0)})),Gp({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:nO(t)}),n.fieldView.value=n.fieldView.element.value=e.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&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 rO extends ri{static get requires(){return[ZS,oO]}static get pluginName(){return"ImageTextAlternative"}}function iO(t,e){const n=(e,n,o)=>{if(!o.consumable.consume(n.item,e.name))return;const r=o.writer,i=o.mapper.toViewElement(n.item),s=t.findViewImgElement(i);null===n.attributeNewValue?(r.removeAttribute("srcset",s),r.removeAttribute("sizes",s)):n.attributeNewValue&&(r.setAttribute("srcset",n.attributeNewValue,s),r.setAttribute("sizes","100vw",s))};return t=>{t.on(`attribute:srcset:${e}`,n)}}function sO(t,e,n){const o=(e,n,o)=>{if(!o.consumable.consume(n.item,e.name))return;const r=o.writer,i=o.mapper.toViewElement(n.item),s=t.findViewImgElement(i);r.setAttribute(n.attributeKey,n.attributeNewValue||"",s)};return t=>{t.on(`attribute:${n}:${e}`,o)}}class aO extends Sa{observe(t){this.listenTo(t,"load",((t,e)=>{const n=e.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(e)}),{useCapture:!0})}stopObserving(t){this.stopListening(t)}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}}var cO=Object.defineProperty,lO=Object.getOwnPropertySymbols,dO=Object.prototype.hasOwnProperty,uO=Object.prototype.propertyIsEnumerable,hO=(t,e,n)=>e in t?cO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pO=(t,e)=>{for(var n in e||(e={}))dO.call(e,n)&&hO(t,n,e[n]);if(lO)for(var n of lO(e))uO.call(e,n)&&hO(t,n,e[n]);return t};class mO extends si{constructor(t){super(t);const e=t.config.get("image.insert.type");t.plugins.has("ImageBlockEditing")||"block"===e&&A("image-block-plugin-required"),t.plugins.has("ImageInlineEditing")||"inline"===e&&A("image-inline-plugin-required")}refresh(){const t=this.editor.plugins.get("ImageUtils");this.isEnabled=t.isImageAllowed()}execute(t){const e=yr(t.source),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const i=n.getSelectedElement();if("string"==typeof t&&(t={src:t}),e&&i&&o.isImage(i)){const e=this.editor.model.createPositionAfter(i);o.insertImage(pO(pO({},t),r),e)}else o.insertImage(pO(pO({},t),r))}))}}class gO extends si{constructor(t){super(t),this.decorate("cleanupImage")}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(e),this.value=this.isEnabled?e.getAttribute("src"):null}execute(t){const e=this.editor.model.document.selection.getSelectedElement(),n=this.editor.plugins.get("ImageUtils");this.editor.model.change((o=>{o.setAttribute("src",t.source,e),this.cleanupImage(o,e),n.setImageNaturalSizeAttributes(e)}))}cleanupImage(t,e){t.removeAttribute("srcset",e),t.removeAttribute("sizes",e),t.removeAttribute("sources",e),t.removeAttribute("width",e),t.removeAttribute("height",e),t.removeAttribute("alt",e)}}class fO extends ri{static get requires(){return[JS]}static get pluginName(){return"ImageEditing"}init(){const t=this.editor,e=t.conversion;t.editing.view.addObserver(aO),e.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const n=new mO(t),o=new gO(t);t.commands.add("insertImage",n),t.commands.add("replaceImageSource",o),t.commands.add("imageInsert",n)}}class bO extends ri{static get requires(){return[JS]}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(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o="imageBlock"===t?"figure":"img";function r(e,o,r,i){e.on(`attribute:${o}:${t}`,((e,o,s)=>{if(!s.consumable.consume(o.item,e.name))return;const a=s.writer,c=s.mapper.toViewElement(o.item),l=n.findViewImgElement(c);if(null!==o.attributeNewValue?a.setAttribute(r,o.attributeNewValue,l):a.removeAttribute(r,l),o.item.hasAttribute("sources"))return;const d=o.item.hasAttribute("resizedWidth");if("imageInline"===t&&!d&&!i)return;const u=o.item.getAttribute("width"),h=o.item.getAttribute("height");u&&h&&a.setStyle("aspect-ratio",`${u}/${h}`,l)}))}e.conversion.for("upcast").attributeToAttribute({view:{name:o,styles:{width:/.+/}},model:{key:"width",value:t=>FS(t)?zS(t.getStyle("width")):null}}).attributeToAttribute({view:{name:o,key:"width"},model:"width"}).attributeToAttribute({view:{name:o,styles:{height:/.+/}},model:{key:"height",value:t=>FS(t)?zS(t.getStyle("height")):null}}).attributeToAttribute({view:{name:o,key:"height"},model:"height"}),e.conversion.for("editingDowncast").add((t=>{r(t,"width","width",!0),r(t,"height","height",!0)})),e.conversion.for("dataDowncast").add((t=>{r(t,"width","width",!1),r(t,"height","height",!1)}))}}class kO extends si{constructor(t,e){super(t),this._modelElementName=e}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=t.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=t.isInlineImage(e):this.isEnabled=t.isBlockImage(e)}execute(t={}){const e=this.editor,n=this.editor.model,o=e.plugins.get("ImageUtils"),r=o.getClosestSelectedImageElement(n.document.selection),i=Object.fromEntries(r.getAttributes());return i.src||i.uploadId?n.change((e=>{const{setImageSizes:s=!0}=t,a=Array.from(n.markers).filter((t=>t.getRange().containsItem(r))),c=o.insertImage(i,n.createSelection(r,"on"),this._modelElementName,{setImageSizes:s});if(!c)return null;const l=e.createRangeOn(c);for(const t of a){const n=t.getRange(),o="$graveyard"!=n.root.rootName?n.getJoined(l,!0):l;e.updateMarker(t,{range:o})}return{oldElement:r,newElement:c}})):null}}var wO=__webpack_require__(7378),AO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(wO.A,AO);wO.A.locals;class CO extends ri{static get requires(){return[JS]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const t=this.editor.model.schema;t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["placeholder"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const t=this.editor,e=t.conversion,n=t.plugins.get("ImageUtils");e.for("editingDowncast").add((t=>{t.on("attribute:placeholder",((t,e,o)=>{if(!o.consumable.test(e.item,t.name))return;if(!e.item.is("element","imageBlock")&&!e.item.is("element","imageInline"))return;o.consumable.consume(e.item,t.name);const r=o.writer,i=o.mapper.toViewElement(e.item),s=n.findViewImgElement(i);e.attributeNewValue?(r.addClass("image_placeholder",s),r.setStyle("background-image",`url(${e.attributeNewValue})`,s),r.setCustomProperty("editingPipeline:doNotReuseOnce",!0,s)):(r.removeClass("image_placeholder",s),r.removeStyle("background-image",s))}))}))}_setupLoadListener(){const t=this.editor,e=t.model,n=t.editing,o=n.view,r=t.plugins.get("ImageUtils");o.addObserver(aO),this.listenTo(o.document,"imageLoaded",((t,i)=>{const s=o.domConverter.mapDomToView(i.target);if(!s)return;const a=r.getImageWidgetFromImageView(s);if(!a)return;const c=n.mapper.toModelElement(a);c&&c.hasAttribute("placeholder")&&e.enqueueChange({isUndoable:!1},(t=>{t.removeAttribute("placeholder",c)}))}))}}class _O extends ri{static get requires(){return[fO,bO,JS,CO,d_]}static get pluginName(){return"ImageBlockEditing"}init(){const t=this.editor;t.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),t.plugins.has("ImageInlineEditing")&&(t.commands.add("imageTypeBlock",new kO(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:e})=>LS(e)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:n})=>o.toImageWidget(LS(n),n,e("image widget"))}),n.for("downcast").add(sO(o,"imageBlock","src")).add(sO(o,"imageBlock","alt")).add(iO(o,"imageBlock")),n.for("upcast").elementToElement({view:jS(t,"imageBlock"),model:(t,{writer:e})=>e.createElement("imageBlock",t.hasAttribute("src")?{src:t.getAttribute("src")}:void 0)}).add(function(t){const e=(e,n,o)=>{if(!o.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const r=t.findViewImgElement(n.viewItem);if(!r||!o.consumable.test(r,{name:!0}))return;o.consumable.consume(n.viewItem,{name:!0,classes:"image"});const i=Jr(o.convertItem(r,n.modelCursor).modelRange.getItems());i?(o.convertChildren(n.viewItem,i),o.updateConversionResult(i,n)):o.consumable.revert(n.viewItem,{name:!0,classes:"image"})};return t=>{t.on("element:figure",e)}}(o))}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils"),r=t.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",((r,i)=>{const s=Array.from(i.content.getChildren());let a;if(!s.every(o.isInlineImageView))return;a=i.targetRanges?t.editing.mapper.toModelRange(i.targetRanges[0]):e.document.selection.getFirstRange();const c=e.createSelection(a);if("imageBlock"===VS(e.schema,c)){const t=new _h(n.document),e=s.map((e=>t.createElement("figure",{class:"image"},e)));i.content=t.createDocumentFragment(e)}})),this.listenTo(r,"contentInsertion",((t,n)=>{"paste"===n.method&&e.change((t=>{const e=t.createRangeIn(n.content);for(const t of e.getItems())t.is("element","imageBlock")&&o.setImageNaturalSizeAttributes(t)}))}))}}var yO=__webpack_require__(3350),vO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(yO.A,vO);yO.A.locals;class IO extends wm{constructor(t,e=[]){super(t),this.focusTracker=new $r,this.keystrokes=new Qr,this._focusables=new Jp,this.children=this.createCollection(),this._focusCycler=new yg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const t of e)this.children.add(t),this._focusables.add(t),t instanceof Wm&&this._focusables.addMany(t.children);if(this._focusables.length>1)for(const t of this._focusables)EO(t)&&(t.focusCycler.on("forwardCycle",(t=>{this._focusCycler.focusNext(),t.stop()})),t.focusCycler.on("backwardCycle",(t=>{this._focusCycler.focusPrevious(),t.stop()})));this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),Kp({view:this});for(const t of this._focusables)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}function EO(t){return"focusCycler"in t}class xO extends ri{constructor(t){super(t),this._integrations=new Map,t.config.define("image.insert.integrations",["upload","assetManager","url"])}static get pluginName(){return"ImageInsertUI"}static get requires(){return[JS]}init(){const t=this.editor,e=t.model.document.selection,n=t.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(t.model.document,"change",(()=>{this.isImageSelected=n.isImage(e.getSelectedElement())}));const o=t=>this._createToolbarComponent(t);t.ui.componentFactory.add("insertImage",o),t.ui.componentFactory.add("imageInsert",o)}registerIntegration({name:t,observable:e,buttonViewCreator:n,formViewCreator:o,requiresForm:r}){this._integrations.has(t)&&A("image-insert-integration-exists",{name:t}),this._integrations.set(t,{observable:e,buttonViewCreator:n,formViewCreator:o,requiresForm:!!r})}_createToolbarComponent(t){const e=this.editor,n=t.t,o=this._prepareIntegrations();if(!o.length)return null;let r;const i=o[0];if(1==o.length){if(!i.requiresForm)return i.buttonViewCreator(!0);r=i.buttonViewCreator(!0)}else{const e=i.buttonViewCreator(!1);r=new Qg(t,e),r.tooltip=!0,r.bind("label").to(this,"isImageSelected",(t=>n(t?"Replace image":"Insert image")))}const s=this.dropdownView=nf(t,r),a=o.map((({observable:t})=>"function"==typeof t?t():t));return s.bind("isEnabled").toMany(a,"isEnabled",((...t)=>t.some((t=>t)))),s.once("change:isOpen",(()=>{const t=o.map((({formViewCreator:t})=>t(1==o.length))),n=new IO(e.locale,t);s.panelView.children.add(n)})),s}_prepareIntegrations(){const t=this.editor.config.get("image.insert.integrations"),e=[];if(!t.length)return A("image-insert-integrations-not-specified"),e;for(const n of t)this._integrations.has(n)?e.push(this._integrations.get(n)):["upload","assetManager","url"].includes(n)||A("image-insert-unknown-integration",{item:n});return e.length||A("image-insert-integrations-not-registered"),e}}var TO=__webpack_require__(265),DO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(TO.A,DO);TO.A.locals;class SO extends ri{static get requires(){return[_O,Sy,rO,xO]}static get pluginName(){return"ImageBlock"}}class OO extends ri{static get requires(){return[fO,bO,JS,CO,d_]}static get pluginName(){return"ImageInlineEditing"}init(){const t=this.editor,e=t.model.schema;e.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),e.addChildCheck(((t,e)=>{if(t.endsWith("caption")&&"imageInline"===e.name)return!1})),this._setupConversion(),t.plugins.has("ImageBlockEditing")&&(t.commands.add("imageTypeInline",new kO(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(t,{writer:e})=>e.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(t,{writer:n})=>o.toImageWidget(function(t){return t.createContainerElement("span",{class:"image-inline"},t.createEmptyElement("img"))}(n),n,e("image widget"))}),n.for("downcast").add(sO(o,"imageInline","src")).add(sO(o,"imageInline","alt")).add(iO(o,"imageInline")),n.for("upcast").elementToElement({view:jS(t,"imageInline"),model:(t,{writer:e})=>e.createElement("imageInline",t.hasAttribute("src")?{src:t.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils"),r=t.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",((r,i)=>{const s=Array.from(i.content.getChildren());let a;if(!s.every(o.isBlockImageView))return;a=i.targetRanges?t.editing.mapper.toModelRange(i.targetRanges[0]):e.document.selection.getFirstRange();const c=e.createSelection(a);if("imageInline"===VS(e.schema,c)){const t=new _h(n.document),e=s.map((e=>1===e.childCount?(Array.from(e.getAttributes()).forEach((n=>t.setAttribute(...n,o.findViewImgElement(e)))),e.getChild(0)):e));i.content=t.createDocumentFragment(e)}})),this.listenTo(r,"contentInsertion",((t,n)=>{"paste"===n.method&&e.change((t=>{const e=t.createRangeIn(n.content);for(const t of e.getItems())t.is("element","imageInline")&&o.setImageNaturalSizeAttributes(t)}))}))}}class BO extends ri{static get requires(){return[OO,Sy,rO,xO]}static get pluginName(){return"ImageInline"}}class MO extends ri{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[JS]}getCaptionFromImageModelElement(t){for(const e of t.getChildren())if(e&&e.is("element","caption"))return e;return null}getCaptionFromModelSelection(t){const e=this.editor.plugins.get("ImageUtils"),n=t.getFirstPosition().findAncestor("caption");return n&&e.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(t){const e=this.editor.plugins.get("ImageUtils");return"figcaption"==t.name&&e.isBlockImageView(t.parent)?{name:!0}:null}}class NO extends si{refresh(){const t=this.editor,e=t.plugins.get("ImageCaptionUtils"),n=t.plugins.get("ImageUtils");if(!t.plugins.has(_O))return this.isEnabled=!1,void(this.value=!1);const o=t.model.document.selection,r=o.getSelectedElement();if(!r){const t=e.getCaptionFromModelSelection(o);return this.isEnabled=!!t,void(this.value=!!t)}this.isEnabled=n.isImage(r),this.isEnabled?this.value=!!e.getCaptionFromImageModelElement(r):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideImageCaption(t):this._showImageCaption(t,e)}))}_showImageCaption(t,e){const n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing"),r=this.editor.plugins.get("ImageUtils");let i=n.getSelectedElement();const s=o._getSavedCaption(i);r.isInlineImage(i)&&(this.editor.execute("imageTypeBlock"),i=n.getSelectedElement());const a=s||t.createElement("caption");t.append(a,i),e&&t.setSelection(a,"in")}_hideImageCaption(t){const e=this.editor,n=e.model.document.selection,o=e.plugins.get("ImageCaptionEditing"),r=e.plugins.get("ImageCaptionUtils");let i,s=n.getSelectedElement();s?i=r.getCaptionFromImageModelElement(s):(i=r.getCaptionFromModelSelection(n),s=i.parent),o._saveCaption(s,i),t.setSelection(s,"on"),t.remove(i)}}class PO extends ri{constructor(t){super(t),this._savedCaptionsMap=new WeakMap}static get requires(){return[JS,MO]}static get pluginName(){return"ImageCaptionEditing"}init(){const t=this.editor,e=t.model.schema;e.isRegistered("caption")?e.extend("caption",{allowIn:"imageBlock"}):e.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleImageCaption",new NO(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils"),r=t.t;t.conversion.for("upcast").elementToElement({view:t=>o.matchImageCaptionViewElement(t),model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>n.isBlockImage(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:o})=>{if(!n.isBlockImage(t.parent))return null;const i=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,i),i.placeholder=r("Enter image caption"),_i({view:e,element:i,keepOnFocus:!0});const s=t.parent.getAttribute("alt");return hy(i,o,{label:s?r("Caption for image: %0",[s]):r("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.plugins.get("ImageCaptionUtils"),o=t.commands.get("imageTypeInline"),r=t.commands.get("imageTypeBlock"),i=t=>{if(!t.return)return;const{oldElement:o,newElement:r}=t.return;if(!o)return;if(e.isBlockImage(o)){const t=n.getCaptionFromImageModelElement(o);if(t)return void this._saveCaption(r,t)}const i=this._getSavedCaption(o);i&&this._saveCaption(r,i)};o&&this.listenTo(o,"execute",i,{priority:"low"}),r&&this.listenTo(r,"execute",i,{priority:"low"})}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?Mc.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}_registerCaptionReconversion(){const t=this.editor,e=t.model,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils");e.document.on("change:data",(()=>{const r=e.document.differ.getChanges();for(const e of r){if("alt"!==e.attributeKey)continue;const r=e.range.start.nodeAfter;if(n.isBlockImage(r)){const e=o.getCaptionFromImageModelElement(r);if(!e)return;t.editing.reconvertItem(e)}}}))}}class RO extends ri{static get requires(){return[MO]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageCaptionUtils"),o=t.t;t.ui.componentFactory.add("toggleImageCaption",(r=>{const i=t.commands.get("toggleImageCaption"),s=new Lm(r);return s.set({icon:Ep.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),s.bind("label").to(i,"value",(t=>o(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=n.getCaptionFromModelSelection(t.model.document.selection);if(o){const n=t.editing.mapper.toViewElement(o);e.scrollToTheSelection(),e.change((t=>{t.addClass("image__caption_highlighted",n)}))}t.editing.view.focus()})),s}))}}var LO=__webpack_require__(5247),jO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(LO.A,jO);LO.A.locals;function VO(t){const e=t.map((t=>t.replace("+","\\+")));return new RegExp(`^image\\/(${e.join("|")})$`)}function zO(t){return new Promise(((e,n)=>{const o=t.getAttribute("src");fetch(o).then((t=>t.blob())).then((t=>{const n=FO(t,o),r=n.replace("image/",""),i=new File([t],`image.${r}`,{type:n});e(i)})).catch((t=>t&&"TypeError"===t.name?function(t){return function(t){return new Promise(((e,n)=>{const o=No.document.createElement("img");o.addEventListener("load",(()=>{const t=No.document.createElement("canvas");t.width=o.width,t.height=o.height;t.getContext("2d").drawImage(o,0,0),t.toBlob((t=>t?e(t):n()))})),o.addEventListener("error",(()=>n())),o.src=t}))}(t).then((e=>{const n=FO(e,t),o=n.replace("image/","");return new File([e],`image.${o}`,{type:n})}))}(o).then(e).catch(n):n(t)))}))}function FO(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class UO extends ri{static get pluginName(){return"ImageUploadUI"}init(){const t=this.editor,e=t.t,n=()=>{const t=this._createButton(Fm);return t.set({label:e("Upload image from computer"),tooltip:!0}),t};if(t.ui.componentFactory.add("uploadImage",n),t.ui.componentFactory.add("imageUpload",n),t.ui.componentFactory.add("menuBar:uploadImage",(()=>{const t=this._createButton(xw);return t.label=e("Image from computer"),t})),t.plugins.has("ImageInsertUI")){const n=t.plugins.get("ImageInsertUI");n.registerIntegration({name:"upload",observable:()=>t.commands.get("uploadImage"),buttonViewCreator:()=>{const o=t.ui.componentFactory.create("uploadImage");return o.bind("label").to(n,"isImageSelected",(t=>e(t?"Replace image from computer":"Upload image from computer"))),o},formViewCreator:()=>{const o=t.ui.componentFactory.create("uploadImage");return o.withText=!0,o.bind("label").to(n,"isImageSelected",(t=>e(t?"Replace from computer":"Upload from computer"))),o.on("execute",(()=>{n.dropdownView.isOpen=!1})),o}})}}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("uploadImage"),r=e.config.get("image.upload.types"),i=VO(r),s=new t(e.locale),a=n.t;return s.set({acceptedType:r.map((t=>`image/${t}`)).join(","),allowMultipleFiles:!0,label:a("Upload image from computer"),icon:Ep.imageUpload}),s.bind("isEnabled").to(o),s.on("done",((t,n)=>{const o=Array.from(n).filter((t=>i.test(t.type)));o.length&&(e.execute("uploadImage",{file:o}),e.editing.view.focus())})),s}}var HO=__webpack_require__(2267),qO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(HO.A,qO);HO.A.locals;var GO=__webpack_require__(7693),WO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(GO.A,WO);GO.A.locals;var KO=__webpack_require__(1559),YO={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(KO.A,YO);KO.A.locals;class JO extends ri{constructor(t){super(t),this.uploadStatusChange=(t,e,n)=>{const o=this.editor,r=e.item,i=r.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(nD),c=i?e.attributeNewValue:null,l=this.placeholder,d=o.editing.mapper.toViewElement(r),u=n.writer;if("reading"==c)return $O(d,u),void QO(s,l,d,u);if("uploading"==c){const t=a.loaders.get(i);return $O(d,u),void(t?(ZO(d,u),function(t,e,n,o){const r=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),r),n.on("change:uploadedPercent",((t,e,n)=>{o.change((t=>{t.setStyle("width",n+"%",r)}))}))}(d,u,t,o.editing.view),function(t,e,n,o){if(o.data){const r=t.findViewImgElement(e);n.setAttribute("src",o.data,r)}}(s,d,u,t)):QO(s,l,d,u))}"complete"==c&&a.loaders.get(i)&&function(t,e,n){const o=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),o),setTimeout((()=>{n.change((t=>t.remove(t.createRangeOn(o))))}),3e3)}(d,u,o.editing.view),function(t,e){tB(t,e,"progressBar")}(d,u),ZO(d,u),function(t,e){e.removeClass("ck-appear",t)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}static get pluginName(){return"ImageUploadProgress"}init(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),t.plugins.has("ImageInlineEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function $O(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function QO(t,e,n,o){n.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",n);const r=t.findViewImgElement(n);r.getAttribute("src")!==e&&o.setAttribute("src",e,r),XO(n,"placeholder")||o.insert(o.createPositionAfter(r),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(o))}function ZO(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),tB(t,e,"placeholder")}function XO(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function tB(t,e,n){const o=XO(t,n);o&&e.remove(e.createRangeOn(o))}var eB=Object.defineProperty,nB=Object.defineProperties,oB=Object.getOwnPropertyDescriptors,rB=Object.getOwnPropertySymbols,iB=Object.prototype.hasOwnProperty,sB=Object.prototype.propertyIsEnumerable,aB=(t,e,n)=>e in t?eB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class cB extends si{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.model.document.selection.getSelectedElement();this.isEnabled=e.isImageAllowed()||e.isImage(n)}execute(t){const e=yr(t.file),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const i=n.getSelectedElement();if(e&&i&&o.isImage(i)){const e=this.editor.model.createPositionAfter(i);this._uploadImage(t,r,e)}else this._uploadImage(t,r)}))}_uploadImage(t,e,n){const o=this.editor,r=o.plugins.get(nD).createLoader(t),i=o.plugins.get("ImageUtils");r&&i.insertImage(((t,e)=>nB(t,oB(e)))(((t,e)=>{for(var n in e||(e={}))iB.call(e,n)&&aB(t,n,e[n]);if(rB)for(var n of rB(e))sB.call(e,n)&&aB(t,n,e[n]);return t})({},e),{uploadId:r.id}),n)}}class lB extends ri{constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}static get requires(){return[nD,vk,d_,JS]}static get pluginName(){return"ImageUploadEditing"}init(){const t=this.editor,e=t.model.document,n=t.conversion,o=t.plugins.get(nD),r=t.plugins.get("ImageUtils"),i=t.plugins.get("ClipboardPipeline"),s=VO(t.config.get("image.upload.types")),a=new cB(t);t.commands.add("uploadImage",a),t.commands.add("imageUpload",a),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",((e,n)=>{if(o=n.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const r=Array.from(n.dataTransfer.files).filter((t=>!!t&&s.test(t.type)));r.length&&(e.stop(),t.model.change((e=>{n.targetRanges&&e.setSelection(n.targetRanges.map((e=>t.editing.mapper.toModelRange(e)))),t.execute("uploadImage",{file:r})})))})),this.listenTo(i,"inputTransformation",((e,n)=>{const i=Array.from(t.editing.view.createRangeIn(n.content)).map((t=>t.item)).filter((t=>function(t,e){return!(!t.isInlineImageView(e)||!e.getAttribute("src")||!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!e.getAttribute("src").match(/^blob:/g))}(r,t)&&!t.getAttribute("uploadProcessed"))).map((t=>({promise:zO(t),imageElement:t})));if(!i.length)return;const s=new _h(t.editing.view.document);for(const t of i){s.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(s.setAttribute("src","",t.imageElement),s.setAttribute("uploadId",e.id,t.imageElement))}})),t.editing.view.document.on("dragover",((t,e)=>{e.preventDefault()})),e.on("change",(()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),r=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,i="$graveyard"==e.position.root.rootName;for(const e of dB(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(i?r.has(t)||n.abort():(r.add(t),this._uploadImageElements.set(t,e),"idle"==n.status&&this._readAndUpload(n)))}}})),this.on("uploadComplete",((t,{imageElement:e,data:n})=>{const o=n.urls?n.urls:n;this.editor.model.change((t=>{t.setAttribute("src",o.default,e),this._parseAndSetSrcsetAttributeOnImage(o,e,t),r.setImageNaturalSizeAttributes(e)}))}),{priority:"low"})}afterInit(){const t=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&t.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(t){const e=this.editor,n=e.model,o=e.locale.t,r=e.plugins.get(nD),i=e.plugins.get(vk),a=e.plugins.get("ImageUtils"),c=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","reading",c.get(t.id))})),t.read().then((()=>{const r=t.upload(),i=c.get(t.id);if(s.isSafari){const t=e.editing.mapper.toViewElement(i),n=a.findViewImgElement(t);e.editing.view.once("render",(()=>{if(!n.parent)return;const t=e.editing.view.domConverter.mapViewToDom(n.parent);if(!t)return;const o=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=o}))}return e.ui&&e.ui.ariaLiveAnnouncer.announce(o("Uploading image")),n.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","uploading",i)})),r})).then((r=>{n.enqueueChange({isUndoable:!1},(n=>{const i=c.get(t.id);n.setAttribute("uploadStatus","complete",i),e.ui&&e.ui.ariaLiveAnnouncer.announce(o("Image upload complete")),this.fire("uploadComplete",{data:r,imageElement:i})})),l()})).catch((r=>{if(e.ui&&e.ui.ariaLiveAnnouncer.announce(o("Error during image upload")),"error"!==t.status&&"aborted"!==t.status)throw r;"error"==t.status&&r&&i.showWarning(r,{title:o("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},(e=>{e.remove(c.get(t.id))})),l()}));function l(){n.enqueueChange({isUndoable:!1},(e=>{const n=c.get(t.id);e.removeAttribute("uploadId",n),e.removeAttribute("uploadStatus",n),c.delete(t.id)})),r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let o=0;const r=Object.keys(t).filter((t=>{const e=parseInt(t,10);if(!isNaN(e))return o=Math.max(o,e),!0})).map((e=>`${t[e]} ${e}w`)).join(", ");if(""!=r){const t={srcset:r};e.hasAttribute("width")||e.hasAttribute("height")||(t.width=o),n.setAttributes(t,e)}}}function dB(t,e){const n=t.plugins.get("ImageUtils");return Array.from(t.model.createRangeOn(e)).filter((t=>n.isImage(t.item))).map((t=>t.item))}const uB=function(t,e){return function(n,o){if(null==n)return n;if(!an(n))return t(n,o);for(var r=n.length,i=e?r:-1,s=Object(n);(e?i--:++i{e.setAttribute("resizedWidth",t.width,r),e.removeAttribute("resizedHeight",r),o.setImageNaturalSizeAttributes(r)}))}}class gB extends ri{static get requires(){return[JS]}static get pluginName(){return"ImageResizeEditing"}constructor(t){super(t),t.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const t=this.editor,e=new mB(t);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),t.commands.add("resizeImage",e),t.commands.add("imageResize",e)}afterInit(){this._registerSchema()}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]})}_registerConverters(t){const e=this.editor,n=e.plugins.get("ImageUtils");e.conversion.for("downcast").add((e=>e.on(`attribute:resizedWidth:${t}`,((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,r=n.mapper.toViewElement(e.item);null!==e.attributeNewValue?(o.setStyle("width",e.attributeNewValue,r),o.addClass("image_resized",r)):(o.removeStyle("width",r),o.removeClass("image_resized",r))})))),e.conversion.for("dataDowncast").attributeToAttribute({model:{name:t,key:"resizedHeight"},view:t=>({key:"style",value:{height:t}})}),e.conversion.for("editingDowncast").add((e=>e.on(`attribute:resizedHeight:${t}`,((e,o,r)=>{if(!r.consumable.consume(o.item,e.name))return;const i=r.writer,s=r.mapper.toViewElement(o.item),a="imageInline"===t?n.findViewImgElement(s):s;null!==o.attributeNewValue?i.setStyle("height",o.attributeNewValue,a):i.removeStyle("height",a)})))),e.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===t?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:t=>FS(t)?null:t.getStyle("width")}}),e.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===t?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:t=>FS(t)?null:t.getStyle("height")}})}}var fB=Object.defineProperty,bB=Object.defineProperties,kB=Object.getOwnPropertyDescriptors,wB=Object.getOwnPropertySymbols,AB=Object.prototype.hasOwnProperty,CB=Object.prototype.propertyIsEnumerable,_B=(t,e,n)=>e in t?fB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yB=(t,e)=>{for(var n in e||(e={}))AB.call(e,n)&&_B(t,n,e[n]);if(wB)for(var n of wB(e))CB.call(e,n)&&_B(t,n,e[n]);return t},vB=(t,e)=>bB(t,kB(e));const IB={small:Ep.objectSizeSmall,medium:Ep.objectSizeMedium,large:Ep.objectSizeLarge,custom:Ep.objectSizeCustom,original:Ep.objectSizeFull};class EB extends ri{constructor(t){super(t),this._resizeUnit=t.config.get("image.resizeUnit")}static get requires(){return[gB]}static get pluginName(){return"ImageResizeButtons"}init(){const t=this.editor,e=t.config.get("image.resizeOptions"),n=t.commands.get("resizeImage");this.bind("isEnabled").to(n);for(const t of e)this._registerImageResizeButton(t);this._registerImageResizeDropdown(e)}_registerImageResizeButton(t){const e=this.editor,{name:n,value:o,icon:r}=t;e.ui.componentFactory.add(n,(n=>{const i=new Lm(n),s=e.commands.get("resizeImage"),a=this._getOptionLabelValue(t,!0);if(!IB[r])throw new w("imageresizebuttons-missing-icon",e,t);if(i.set({label:a,icon:IB[r],tooltip:a,isToggleable:!0}),i.bind("isEnabled").to(this),e.plugins.has("ImageCustomResizeUI")&&xB(t)){const t=e.plugins.get("ImageCustomResizeUI");this.listenTo(i,"execute",(()=>{t._showForm(this._resizeUnit)}))}else{const t=o?o+this._resizeUnit:null;i.bind("isOn").to(s,"value",TB(t)),this.listenTo(i,"execute",(()=>{e.execute("resizeImage",{width:t})}))}return i}))}_registerImageResizeDropdown(t){const e=this.editor,n=e.t,o=t.find((t=>!t.value)),r=r=>{const i=e.commands.get("resizeImage"),s=nf(r,_g),a=s.buttonView,c=n("Resize image");return a.set({tooltip:c,commandValue:o.value,icon:IB.medium,isToggleable:!0,label:this._getOptionLabelValue(o),withText:!0,class:"ck-resize-image-button",ariaLabel:c,ariaLabelledBy:void 0}),a.bind("label").to(i,"value",(t=>t&&t.width?t.width:this._getOptionLabelValue(o))),s.bind("isEnabled").to(this),sf(s,(()=>this._getResizeDropdownListItemDefinitions(t,i)),{ariaLabel:n("Image resize list"),role:"menu"}),this.listenTo(s,"execute",(t=>{"onClick"in t.source?t.source.onClick():(e.execute(t.source.commandName,{width:t.source.commandValue}),e.editing.view.focus())})),s};e.ui.componentFactory.add("resizeImage",r),e.ui.componentFactory.add("imageResize",r)}_getOptionLabelValue(t,e=!1){const n=this.editor.t;return t.label?t.label:e?xB(t)?n("Custom image size"):t.value?n("Resize image to %0",t.value+this._resizeUnit):n("Resize image to the original size"):xB(t)?n("Custom"):t.value?t.value+this._resizeUnit:n("Original")}_getResizeDropdownListItemDefinitions(t,e){const{editor:n}=this,o=new Yr,r=t.map((t=>xB(t)?vB(yB({},t),{valueWithUnits:"custom"}):t.value?vB(yB({},t),{valueWithUnits:`${t.value}${this._resizeUnit}`}):vB(yB({},t),{valueWithUnits:null})));for(const t of r){let i=null;if(n.plugins.has("ImageCustomResizeUI")&&xB(t)){const o=n.plugins.get("ImageCustomResizeUI");i={type:"button",model:new Ik({label:this._getOptionLabelValue(t),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{o._showForm(this._resizeUnit)}})};const s=pB(r,"valueWithUnits");i.model.bind("isOn").to(e,"value",DB(s))}else i={type:"button",model:new Ik({commandName:"resizeImage",commandValue:t.valueWithUnits,label:this._getOptionLabelValue(t),role:"menuitemradio",withText:!0,icon:null})},i.model.bind("isOn").to(e,"value",TB(t.valueWithUnits));i.model.bind("isEnabled").to(e,"isEnabled"),o.add(i)}return o}}function xB(t){return"custom"===t.value}function TB(t){return e=>null===t&&e===t||null!==e&&e.width===t}function DB(t){return e=>!t.some((t=>TB(t)(e)))}const SB="image_resized";class OB extends ri{static get requires(){return[Yy,JS]}static get pluginName(){return"ImageResizeHandles"}init(){const t=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(t),this._setupResizerCreator()}_setupResizerCreator(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageUtils");e.addObserver(aO),this.listenTo(e.document,"imageLoaded",((o,r)=>{if(!r.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const i=t.editing.view.domConverter,s=i.domToView(r.target),a=n.getImageWidgetFromImageView(s);let c=this.editor.plugins.get(Yy).getResizerByViewElement(a);if(c)return void c.redraw();const l=t.editing.mapper,d=l.toModelElement(a);c=t.plugins.get(Yy).attachTo({unit:t.config.get("image.resizeUnit"),modelElement:d,viewElement:a,editor:t,getHandleHost:t=>t.querySelector("img"),getResizeHost:()=>i.mapViewToDom(l.toViewElement(d.parent)),isCentered:()=>"alignCenter"==d.getAttribute("imageStyle"),onCommit(n){e.change((t=>{t.removeClass(SB,a)})),t.execute("resizeImage",{width:n})}}),c.on("updateSize",(()=>{a.hasClass(SB)||e.change((t=>{t.addClass(SB,a)}));const t="imageInline"===d.name?s:a;t.getStyle("height")&&e.change((e=>{e.removeStyle("height",t)}))})),c.bind("isEnabled").to(this)}))}}function BB(t){if(!t)return null;const[,e,n]=t.trim().match(/([.,\d]+)(%|px)$/)||[],o=Number.parseFloat(e);return Number.isNaN(o)?null:{value:o,unit:n}}function MB(t,e,n){return"px"===n?{value:e.value,unit:"px"}:{value:e.value/t*100,unit:"%"}}function NB(t){const{editing:e}=t,n=t.plugins.get("ImageUtils").getClosestSelectedImageElement(t.model.document.selection);if(!n)return null;const o=e.mapper.toViewElement(n);return{model:n,view:o,dom:e.view.domConverter.mapViewToDom(o)}}var PB=__webpack_require__(4642),RB={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(PB.A,RB);PB.A.locals;class LB extends wm{constructor(t,e,n){super(t);const o=this.locale.t;this.focusTracker=new $r,this.keystrokes=new Qr,this.unit=e,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(o("Save"),Ep.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(o("Cancel"),Ep.cancel,"ck-button-cancel","cancel"),this._focusables=new Jp,this._validators=n,this._focusCycler=new yg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Kp({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,e,n,o){const r=new Lm(this.locale);return r.set({label:t,icon:e,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate("execute").to(this,o),r}_createLabeledInputView(){const t=this.locale.t,e=new cg(this.locale,uf);return e.label=t("Resize image (in %0)",this.unit),e.fieldView.set({step:.1}),e}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.labeledInput.errorText=e,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:t}=this.labeledInput.fieldView;return t?t.value:null}get parsedSize(){const{rawSize:t}=this;if(null===t)return null;const e=Number.parseFloat(t);return Number.isNaN(e)?null:e}get sizeWithUnits(){const{parsedSize:t,unit:e}=this;return null===t?null:`${t}${e}`}}class jB extends ri{static get requires(){return[Ok]}static get pluginName(){return"ImageCustomResizeUI"}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(t){const e=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Wp(LB))(e.locale,t,function(t){const e=t.t;return[t=>""===t.rawSize.trim()?e("The value must not be empty."):null===t.parsedSize?e("The value should be a plain number."):void 0]}(e)),this._form.render(),this.listenTo(this._form,"submit",(()=>{this._form.isValid()&&(e.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))})),this.listenTo(this._form.labeledInput,"change:errorText",(()=>{e.ui.update()})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((t,e)=>{this._hideForm(!0),e()})),Gp({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(t){if(this._isVisible)return;this._form||this._createForm(t);const e=this.editor,n=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:nO(e)});const o=function(t,e){const n=NB(t);if(!n)return null;const o=BB(n.model.getAttribute("resizedWidth")||null);return o?o.unit===e?o:MB(gy(n.dom),{unit:"px",value:new zo(n.dom).width},e):null}(e,t),r=o?o.value.toFixed(1):"",i=function(t,e){const n=NB(t);if(!n)return null;const o=gy(n.dom),r=BB(window.getComputedStyle(n.dom).minWidth)||{value:1,unit:"px"};return{unit:e,lower:Math.max(.1,MB(o,r,e).value),upper:"px"===e?o:100}}(e,t);n.fieldView.value=n.fieldView.element.value=r,i&&Object.assign(n.fieldView,{min:i.lower.toFixed(1),max:Math.ceil(i.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&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)}}var VB=__webpack_require__(3469),zB={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(VB.A,zB);VB.A.locals;class FB extends si{constructor(t,e){super(t),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(e.map((t=>{if(t.isDefault)for(const e of t.modelElements)this._defaultStyles[e]=t.name;return[t.name,t]})))}refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?t.hasAttribute("imageStyle")?this.value=t.getAttribute("imageStyle"):this.value=this._defaultStyles[t.name]:this.value=!1}execute(t={}){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils");n.change((e=>{const r=t.value,{setImageSizes:i=!0}=t;let s=o.getClosestSelectedImageElement(n.document.selection);r&&this.shouldConvertImageType(r,s)&&(this.editor.execute(o.isBlockImage(s)?"imageTypeInline":"imageTypeBlock",{setImageSizes:i}),s=o.getClosestSelectedImageElement(n.document.selection)),!r||this._styles.get(r).isDefault?e.removeAttribute("imageStyle",s):e.setAttribute("imageStyle",r,s),i&&o.setImageNaturalSizeAttributes(s)}))}shouldConvertImageType(t,e){return!this._styles.get(t).modelElements.includes(e.name)}}var UB=Object.defineProperty,HB=Object.getOwnPropertySymbols,qB=Object.prototype.hasOwnProperty,GB=Object.prototype.propertyIsEnumerable,WB=(t,e,n)=>e in t?UB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KB=(t,e)=>{for(var n in e||(e={}))qB.call(e,n)&&WB(t,n,e[n]);if(HB)for(var n of HB(e))GB.call(e,n)&&WB(t,n,e[n]);return t};const{objectFullWidth:YB,objectInline:JB,objectLeft:$B,objectRight:QB,objectCenter:ZB,objectBlockLeft:XB,objectBlockRight:tM}=Ep,eM={get inline(){return{name:"inline",title:"In line",icon:JB,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:$B,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:XB,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:ZB,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:QB,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:tM,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:ZB,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:QB,modelElements:["imageBlock"],className:"image-style-side"}}},nM={full:YB,left:XB,right:tM,center:ZB,inlineLeft:$B,inlineRight:QB,inline:JB},oM=[{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 rM(t){A("image-style-configuration-definition-invalid",t)}const iM={normalizeStyles:function(t){return(t.configuredStyles.options||[]).map((t=>function(t){t="string"==typeof t?eM[t]?KB({},eM[t]):{name:t}:function(t,e){const n=KB({},e);for(const o in t)Object.prototype.hasOwnProperty.call(e,o)||(n[o]=t[o]);return n}(eM[t.name],t);"string"==typeof t.icon&&(t.icon=nM[t.icon]||t.icon);return t}(t))).filter((e=>function(t,{isBlockPluginLoaded:e,isInlinePluginLoaded:n}){const{modelElements:o,name:r}=t;if(!(o&&o.length&&r))return rM({style:t}),!1;{const r=[e?"imageBlock":null,n?"imageInline":null];if(!o.some((t=>r.includes(t))))return A("image-style-missing-dependency",{style:t,missingPlugins:o.map((t=>"imageBlock"===t?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(e,t)))},getDefaultStylesConfiguration:function(t,e){return t&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:t?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(t){return t.has("ImageBlockEditing")&&t.has("ImageInlineEditing")?[...oM]:[]},warnInvalidStyle:rM,DEFAULT_OPTIONS:eM,DEFAULT_ICONS:nM,DEFAULT_DROPDOWN_DEFINITIONS:oM};function sM(t,e){for(const n of e)if(n.name===t)return n}class aM extends ri{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[JS]}init(){const{normalizeStyles:t,getDefaultStylesConfiguration:e}=iM,n=this.editor,o=n.plugins.has("ImageBlockEditing"),r=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",e(o,r)),this.normalizedStyles=t({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:r}),this._setupConversion(o,r),this._setupPostFixer(),n.commands.add("imageStyle",new FB(n,this.normalizedStyles))}_setupConversion(t,e){const n=this.editor,o=n.model.schema,r=(i=this.normalizedStyles,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=sM(e.attributeNewValue,i),r=sM(e.attributeOldValue,i),s=n.mapper.toViewElement(e.item),a=n.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)});var i;const s=function(t){const e={imageInline:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageInline"))),imageBlock:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageBlock")))};return(t,n,o)=>{if(!n.modelRange)return;const r=n.viewItem,i=Jr(n.modelRange.getItems());if(i&&o.schema.checkAttribute(i,"imageStyle"))for(const t of e[i.name])o.consumable.consume(r,{classes:t.className})&&o.writer.setAttribute("imageStyle",t.name,i)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",r),n.data.downcastDispatcher.on("attribute:imageStyle",r),t&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),e&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const t=this.editor,e=t.model.document,n=t.plugins.get(JS),o=new Map(this.normalizedStyles.map((t=>[t.name,t])));e.registerPostFixer((t=>{let r=!1;for(const i of e.differ.getChanges())if("insert"==i.type||"attribute"==i.type&&"imageStyle"==i.attributeKey){let e="insert"==i.type?i.position.nodeAfter:i.range.start.nodeAfter;if(e&&e.is("element","paragraph")&&e.childCount>0&&(e=e.getChild(0)),!n.isImage(e))continue;const s=e.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(e.name)||(t.removeAttribute("imageStyle",e),r=!0)}return r}))}}var cM=__webpack_require__(6386),lM={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(cM.A,lM);cM.A.locals;class dM extends ri{static get requires(){return[aM]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Wrap text":t("Wrap text"),"Break text":t("Break text"),"In line":t("In line"),"Full size image":t("Full size image"),"Side image":t("Side image"),"Left aligned image":t("Left aligned image"),"Centered image":t("Centered image"),"Right aligned image":t("Right aligned image")}}init(){const t=this.editor.plugins,e=this.editor.config.get("image.toolbar")||[],n=uM(t.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const t of n)this._createButton(t);const o=uM([...e.filter(j),...iM.getDefaultDropdownDefinitions(t)],this.localizedDefaultStylesTitles);for(const t of o)this._createDropdown(t,n)}_createDropdown(t,e){const n=this.editor.ui.componentFactory;n.add(t.name,(o=>{let r;const{defaultItem:i,items:s,title:a}=t,c=s.filter((t=>e.find((({name:e})=>hM(e)===t)))).map((t=>{const e=n.create(t);return t===i&&(r=e),e}));s.length!==c.length&&iM.warnInvalidStyle({dropdown:t});const l=nf(o,Qg),d=l.buttonView,u=d.arrowView;return of(l,c,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:pM(a,r.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(c,"isOn",((...t)=>{const e=t.findIndex(Or);return e<0?r.icon:c[e].icon})),d.bind("label").toMany(c,"isOn",((...t)=>{const e=t.findIndex(Or);return pM(a,e<0?r.label:c[e].label)})),d.bind("isOn").toMany(c,"isOn",((...t)=>t.some(Or))),d.bind("class").toMany(c,"isOn",((...t)=>t.some(Or)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{c.some((({isOn:t})=>t))?l.isOpen=!l.isOpen:r.fire("execute")})),l.bind("isEnabled").toMany(c,"isEnabled",((...t)=>t.some(Or))),this.listenTo(l,"execute",(()=>{this.editor.editing.view.focus()})),l}))}_createButton(t){const e=t.name;this.editor.ui.componentFactory.add(hM(e),(n=>{const o=this.editor.commands.get("imageStyle"),r=new Lm(n);return r.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),r.bind("isEnabled").to(o,"isEnabled"),r.bind("isOn").to(o,"value",(t=>t===e)),r.on("execute",this._executeCommand.bind(this,e)),r}))}_executeCommand(t){this.editor.execute("imageStyle",{value:t}),this.editor.editing.view.focus()}}function uM(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}function hM(t){return`imageStyle:${t}`}function pM(t,e){return(t?t+": ":"")+e}class mM extends ri{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new ci(t)),t.commands.add("outdent",new ci(t))}}class gM extends ri{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?Ep.indent:Ep.outdent,r="ltr"==e.uiLanguageDirection?Ep.outdent:Ep.indent;this._defineButton("indent",n("Increase indent"),o),this._defineButton("outdent",n("Decrease indent"),r)}_defineButton(t,e,n){const o=this.editor;o.ui.componentFactory.add(t,(()=>{const o=this._createButton(Lm,t,e,n);return o.set({tooltip:!0}),o})),o.ui.componentFactory.add("menuBar:"+t,(()=>this._createButton(Ew,t,e,n)))}_createButton(t,e,n,o){const r=this.editor,i=r.commands.get(e),s=new t(r.locale);return s.set({label:n,icon:o}),s.bind("isEnabled").to(i,"isEnabled"),this.listenTo(s,"execute",(()=>{r.execute(e),r.editing.view.focus()})),s}}class fM extends si{constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=Jr(this.editor.model.document.selection.getSelectedBlocks());t&&this._isIndentationChangeAllowed(t)?this.isEnabled=this._indentBehavior.checkEnabled(t.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const t=this.editor.model,e=this._getBlocksToChange();t.change((t=>{for(const n of e){const e=n.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(e);o?t.setAttribute("blockIndent",o,n):t.removeAttribute("blockIndent",n)}}))}_getBlocksToChange(){const t=this.editor.model.document.selection;return Array.from(t.getSelectedBlocks()).filter((t=>this._isIndentationChangeAllowed(t)))}_isIndentationChangeAllowed(t){const e=this.editor;if(!e.model.schema.checkAttribute(t,"blockIndent"))return!1;if(!e.plugins.has("ListUtils"))return!0;if(!this._indentBehavior.isForward)return!0;return!e.plugins.get("ListUtils").isListItemBlock(t)}}class bM{constructor(t){this.isForward="forward"===t.direction,this.offset=t.offset,this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||"0");return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||"0");if(!(!t||t.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const n=e+(this.isForward?this.offset:-this.offset);return n>0?n+this.unit:void 0}}class kM{constructor(t){this.isForward="forward"===t.direction,this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);return this.isForward?e=0}getNextIndent(t){const e=this.classes.indexOf(t),n=this.isForward?1:-1;return this.classes[e+n]}}const wM=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class AM{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach((t=>this._definitions.add(t))):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",((t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;if(!e.item.is("selection")&&!n.schema.isInline(e.item))return;const o=n.writer,r=o.document.selection;for(const t of this._definitions){const i=o.createAttributeElement("a",t.attributes,{priority:5});t.classes&&o.addClass(t.classes,i);for(const e in t.styles)o.setStyle(e,t.styles[e],i);o.setCustomProperty("link",!0,i),t.callback(e.attributeNewValue)?e.item.is("selection")?o.wrap(r.getFirstRange(),i):o.wrap(n.mapper.toViewRange(e.range),i):o.unwrap(n.mapper.toViewRange(e.range),i)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",((t,e,{writer:n,mapper:o})=>{const r=o.toViewElement(e.item),i=Array.from(r.getChildren()).find((t=>t.is("element","a")));for(const t of this._definitions){const o=Zr(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of o)"class"===t?n.addClass(e,i):n.setAttribute(t,e,i);t.classes&&n.addClass(t.classes,i);for(const e in t.styles)n.setStyle(e,t.styles[e],i)}else{for(const[t,e]of o)"class"===t?n.removeClass(e,i):n.removeAttribute(t,i);t.classes&&n.removeClass(t.classes,i);for(const e in t.styles)n.removeStyle(e,i)}}}))}}}const CM=function(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:os(t,e,n)};var _M=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const yM=function(t){return _M.test(t)};const vM=function(t){return t.split("")};var IM="\\ud800-\\udfff",EM="["+IM+"]",xM="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",TM="\\ud83c[\\udffb-\\udfff]",DM="[^"+IM+"]",SM="(?:\\ud83c[\\udde6-\\uddff]){2}",OM="[\\ud800-\\udbff][\\udc00-\\udfff]",BM="(?:"+xM+"|"+TM+")"+"?",MM="[\\ufe0e\\ufe0f]?",NM=MM+BM+("(?:\\u200d(?:"+[DM,SM,OM].join("|")+")"+MM+BM+")*"),PM="(?:"+[DM+xM+"?",xM,SM,OM,EM].join("|")+")",RM=RegExp(TM+"(?="+TM+")|"+PM+NM,"g");const LM=function(t){return t.match(RM)||[]};const jM=function(t){return yM(t)?LM(t):vM(t)};const VM=function(t){return function(e){e=Zi(e);var n=yM(e)?jM(e):void 0,o=n?n[0]:e.charAt(0),r=n?CM(n,1).join(""):e.slice(1);return o[t]()+r}}("toUpperCase"),zM=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,FM=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,UM=/^((\w+:(\/{2,})?)|(\W))/i,HM=["https?","ftps?","mailto"],qM="Ctrl+K";function GM(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function WM(t,e=HM){const n=String(t),o=e.join("|");return function(t,e){const n=t.replace(zM,"");return!!n.match(e)}(n,new RegExp(`${"^(?:(?:):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))".replace("",o)}`,"i"))?n:"#"}function KM(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function YM(t,e){const n=function(t){return FM.test(t)}(t)?"mailto:":e,o=!!n&&!JM(t);return t&&o?n+t:t}function JM(t){return UM.test(t)}function $M(t){window.open(t,"_blank","noopener")}class QM extends si{constructor(){super(...arguments),this.manualDecorators=new Yr,this.automaticDecorators=new AM}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement()||Jr(e.getSelectedBlocks());KM(n,t.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(n,"linkHref")):(this.value=e.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const n=this.editor.model,o=n.document.selection,r=[],i=[];for(const t in e)e[t]?r.push(t):i.push(t);n.change((e=>{if(o.isCollapsed){const s=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=ZM(o);let c=U_(s,"linkHref",o.getAttribute("linkHref"),n);o.getAttribute("linkHref")===a&&(c=this._updateLinkContent(n,e,c,t)),e.setAttribute("linkHref",t,c),r.forEach((t=>{e.setAttribute(t,!0,c)})),i.forEach((t=>{e.removeAttribute(t,c)})),e.setSelection(e.createPositionAfter(c.end.nodeBefore))}else if(""!==t){const i=Zr(o.getAttributes());i.set("linkHref",t),r.forEach((t=>{i.set(t,!0)}));const{end:a}=n.insertContent(e.createText(t,i),s);e.setSelection(a)}["linkHref",...r,...i].forEach((t=>{e.removeSelectionAttribute(t)}))}else{const s=n.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const t of o.getSelectedBlocks())n.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const c=a.slice();for(const t of s)this._isRangeToUpdate(t,a)&&c.push(t);for(const s of c){let a=s;if(1===c.length){const r=ZM(o);o.getAttribute("linkHref")===r&&(a=this._updateLinkContent(n,e,s,t),e.setSelection(e.createSelection(a)))}e.setAttribute("linkHref",t,a),r.forEach((t=>{e.setAttribute(t,!0,a)})),i.forEach((t=>{e.removeAttribute(t,a)}))}}}))}_getDecoratorStateFromModel(t){const e=this.editor.model,n=e.document.selection,o=n.getSelectedElement();return KM(o,e.schema)?o.getAttribute(t):n.getAttribute(t)}_isRangeToUpdate(t,e){for(const n of e)if(n.containsRange(t))return!1;return!0}_updateLinkContent(t,e,n,o){const r=e.createText(o,{linkHref:o});return t.insertContent(r,n)}}function ZM(t){if(t.isCollapsed){const e=t.getFirstPosition();return e.textNode&&e.textNode.data}{const e=Array.from(t.getFirstRange().getItems());if(e.length>1)return null;const n=e[0];return n.is("$text")||n.is("$textProxy")?n.data:null}}class XM extends si{refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement();KM(n,t.schema)?this.isEnabled=t.schema.checkAttribute(n,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,o=t.commands.get("link");e.change((t=>{const r=n.isCollapsed?[U_(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),e)]:e.schema.getValidRanges(n.getRanges(),"linkHref");for(const e of r)if(t.removeAttribute("linkHref",e),o)for(const n of o.manualDecorators)t.removeAttribute(n.id,e)}))}}class tN extends(G()){constructor({id:t,label:e,attributes:n,classes:o,styles:r,defaultValue:i}){super(),this.id=t,this.set("value",void 0),this.defaultValue=i,this.label=e,this.attributes=n,this.classes=o,this.styles=r}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var eN=__webpack_require__(7719),nN={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(eN.A,nN);eN.A.locals;var oN=Object.defineProperty,rN=Object.getOwnPropertySymbols,iN=Object.prototype.hasOwnProperty,sN=Object.prototype.propertyIsEnumerable,aN=(t,e,n)=>e in t?oN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cN=(t,e)=>{for(var n in e||(e={}))iN.call(e,n)&&aN(t,n,e[n]);if(rN)for(var n of rN(e))sN.call(e,n)&&aN(t,n,e[n]);return t};const lN="automatic",dN=/^(https?:)?\/\//;class uN extends ri{static get pluginName(){return"LinkEditing"}static get requires(){return[T_,g_,d_]}constructor(t){super(t),t.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const t=this.editor,e=this.editor.config.get("link.allowedProtocols");t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:GM}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,n)=>GM(WM(t,e),n)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new QM(t)),t.commands.add("unlink",new XM(t));const n=function(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach((t=>("label"in t&&n[t.label]&&(t.label=n[t.label]),t))),e}(t.t,function(t){const e=[];if(t)for(const[n,o]of Object.entries(t)){const t=Object.assign({},o,{id:`link${VM(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter((t=>t.mode===lN))),this._enableManualDecorators(n.filter((t=>"manual"===t.mode)));t.plugins.get(T_).registerAttribute("linkHref"),function(t,e,n,o){const r=t.editing.view,i=new Set;r.document.registerPostFixer((r=>{const s=t.model.document.selection;let a=!1;if(s.hasAttribute(e)){const c=U_(s.getFirstPosition(),e,s.getAttribute(e),t.model),l=t.editing.mapper.toViewRange(c);for(const t of l.getItems())t.is("element",n)&&!t.hasClass(o)&&(r.addClass(o,t),i.add(t),a=!0)}return a})),t.conversion.for("editingDowncast").add((t=>{function e(){r.change((t=>{for(const e of i.values())t.removeClass(o,e),i.delete(e)}))}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})}))}(t,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(t){const e=this.editor,n=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:lN,callback:t=>!!t&&dN.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach((t=>{e.model.schema.extend("$text",{allowAttributes:t.id});const o=new tN(t);n.add(o),e.conversion.for("downcast").attributeToElement({model:o.id,view:(t,{writer:e,schema:n},{item:r})=>{if((r.is("selection")||n.isInline(r))&&t){const t=e.createAttributeElement("a",o.attributes,{priority:5});o.classes&&e.addClass(o.classes,t);for(const n in o.styles)e.setStyle(n,o.styles[n],t);return e.setCustomProperty("link",!0,t),t}}}),e.conversion.for("upcast").elementToAttribute({view:cN({name:"a"},o._createPattern()),model:{key:o.id}})}))}_enableLinkOpen(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",((t,e)=>{if(!(s.isMac?e.domEvent.metaKey:e.domEvent.ctrlKey))return;let n=e.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const o=n.getAttribute("href");o&&(t.stop(),e.preventDefault(),$M(o))}),{context:"$capture"}),this.listenTo(e,"keydown",((e,n)=>{const o=t.commands.get("link").value;!!o&&n.keyCode===br.enter&&n.altKey&&(e.stop(),$M(o))}))}_enableSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(e,"change:attribute",((n,{attributeKeys:o})=>{o.includes("linkHref")&&!e.hasAttribute("linkHref")&&t.change((e=>{var n;!function(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}(e,(n=t.schema,n.getDefinition("$text").allowAttributes.filter((t=>t.startsWith("link")))))}))}))}_enableClipboardIntegration(){const t=this.editor,e=t.model,n=this.editor.config.get("link.defaultProtocol");n&&this.listenTo(t.plugins.get("ClipboardPipeline"),"contentInsertion",((t,o)=>{e.change((t=>{const e=t.createRangeIn(o.content);for(const o of e.getItems())if(o.hasAttribute("linkHref")){const e=YM(o.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,o)}}))}))}}var hN=__webpack_require__(3817),pN={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(hN.A,pN);hN.A.locals;class mN extends wm{constructor(t,e,n){super(t),this.focusTracker=new $r,this.keystrokes=new Qr,this._focusables=new Jp;const o=t.t;this._validators=n,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(o("Save"),Ep.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(o("Cancel"),Ep.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusCycler=new yg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const r=["ck","ck-link-form","ck-responsive-form"];e.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(((t,e)=>(t[e.name]=e.isOn,t)),{})}render(){super.render(),Kp({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createUrlInput(){const t=this.locale.t,e=new cg(this.locale,df);return e.label=t("Link URL"),e}_createButton(t,e,n,o){const r=new Lm(this.locale);return r.set({label:t,icon:e,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate("execute").to(this,o),r}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t.manualDecorators){const o=new zm(this.locale);o.set({name:n.id,label:n.label,withText:!0}),o.bind("isOn").toMany([n,t],"value",((t,e)=>void 0===e&&void 0===t?!!n.defaultValue:!!t)),o.on("execute",(()=>{n.set("value",!o.isOn)})),e.add(o)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new wm;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}get url(){const{element:t}=this.urlInputView.fieldView;return t?t.value.trim():null}}var gN=__webpack_require__(8762),fN={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(gN.A,fN);gN.A.locals;class bN extends wm{constructor(t,e={}){super(t),this.focusTracker=new $r,this.keystrokes=new Qr,this._focusables=new Jp;const n=t.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n("Unlink"),'',"unlink"),this.editButtonView=this._createButton(n("Edit link"),Ep.pencil,"edit"),this.set("href",void 0),this._linkConfig=e,this._focusCycler=new yg({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((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const o=new Lm(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.delegate("execute").to(this,n),o}_createPreviewButton(){const t=new Lm(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",(t=>t&&WM(t,this._linkConfig.allowedProtocols))),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",(t=>t||n("This link has no URL"))),t.bind("isEnabled").to(this,"href",(t=>!!t)),t.template.tag="a",t.template.eventListeners={},t}}const kN="link-ui";class wN extends ri{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Ok]}static get pluginName(){return"LinkUI"}init(){const t=this.editor,e=this.editor.t;t.editing.view.addObserver(Ah),this._balloon=t.plugins.get(Ok),this._createToolbarLinkButton(),this._enableBalloonActivators(),t.conversion.for("editingDowncast").markerToHighlight({model:kN,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:kN,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Create link"),keystroke:qM},{label:e("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}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 t=this.editor,e=new bN(t.locale,t.config.get("link")),n=t.commands.get("link"),o=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(e,"edit",(()=>{this._addFormView()})),this.listenTo(e,"unlink",(()=>{t.execute("unlink"),this._hideUI()})),e.keystrokes.set("Esc",((t,e)=>{this._hideUI(),e()})),e.keystrokes.set(qM,((t,e)=>{this._addFormView(),e()})),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=t.config.get("link.defaultProtocol"),o=new(Wp(mN))(t.locale,e,function(t){const e=t.t,n=t.config.get("link.allowCreatingEmptyLinks");return[t=>{if(!n&&!t.url.length)return e("Link URL must not be empty.")}]}(t));return o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.bind("isEnabled").to(e,"isEnabled"),o.saveButtonView.bind("isEnabled").to(e,"isEnabled"),this.listenTo(o,"submit",(()=>{if(o.isValid()){const{value:e}=o.urlInputView.fieldView.element,r=YM(e,n);t.execute("link",r,o.getDecoratorSwitchesState()),this._closeFormView()}})),this.listenTo(o.urlInputView,"change:errorText",(()=>{t.ui.update()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((t,e)=>{this._closeFormView(),e()})),o}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link");t.ui.componentFactory.add("link",(()=>{const t=this._createButton(Lm);return t.set({tooltip:!0,isToggleable:!0}),t.bind("isOn").to(e,"value",(t=>!!t)),t})),t.ui.componentFactory.add("menuBar:link",(()=>this._createButton(Ew)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("link"),r=new t(e.locale),i=n.t;return r.set({label:i("Link"),icon:'',keystroke:qM}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>this._showUI(!0))),r}_enableBalloonActivators(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),t.keystrokes.set(qM,((e,n)=>{n(),t.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),Gp({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 t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=t.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.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(t=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),o=i();const r=()=>{const t=this._getSelectedLinkElement(),e=i();n&&!t||!n&&e!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,o=e};function i(){return e.selection.focus.getAncestors().reverse().find((t=>t.is("element")))}this.listenTo(t.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}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 t=this._balloon.visibleView;return!!this.formView&&t==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=this.editor.model,n=t.document;let o;if(e.markers.has(kN)){const e=Array.from(this.editor.editing.mapper.markerNameToElements(kN)),n=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));o=t.domConverter.viewRangeToDom(n)}else o=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,n=e.getSelectedElement();if(e.isCollapsed||n&&ay(n))return AN(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),o=AN(n.start),r=AN(n.end);return o&&o==r&&t.createRangeIn(o).getTrimmed().isEqual(n)?o:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change((e=>{const n=t.document.selection.getFirstRange();if(t.markers.has(kN))e.updateMarker(kN,{range:n});else if(n.start.isAtEnd){const o=n.start.getLastMatchingPosition((({item:e})=>!t.schema.isContent(e)),{boundaries:n});e.addMarker(kN,{usingOperation:!1,affectsData:!1,range:e.createRange(o,n.end)})}else e.addMarker(kN,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(kN)&&t.change((t=>{t.removeMarker(kN)}))}}function AN(t){return t.getAncestors().find((t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e}))||null}const CN=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 _N extends ri{static get requires(){return[v_,uN]}static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(t,e){return e.textNode&&e.textNode.hasAttribute("linkHref")?U_(e,"linkHref",e.textNode.getAttribute("linkHref"),t):null}_selectEntireLinks(t,e){const n=this.editor.model,o=n.document.selection,r=o.getFirstPosition(),i=o.getLastPosition();let s=e.getJoined(this._expandLinkRange(n,r)||e);s&&(s=s.getJoined(this._expandLinkRange(n,i)||e)),s&&(s.start.isBefore(r)||s.end.isAfter(i))&&t.setSelection(s)}_enablePasteLinking(){const t=this.editor,e=t.model,n=e.document.selection,o=t.plugins.get("ClipboardPipeline"),r=t.commands.get("link");o.on("inputTransformation",((t,o)=>{if(!this.isEnabled||!r.isEnabled||n.isCollapsed||"paste"!==o.method)return;if(n.rangeCount>1)return;const i=n.getFirstRange(),s=o.dataTransfer.getData("text/plain");if(!s)return;const a=s.match(CN);a&&a[2]===s&&(e.change((t=>{this._selectEntireLinks(t,i),r.execute(s)})),t.stop())}),{priority:"high"})}_enableTypingHandling(){const t=this.editor,e=new x_(t.model,(t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=yN(t.substr(0,t.length-1));return e?{url:e}:void 0}));e.on("matched:data",((e,n)=>{const{batch:o,range:r,url:i}=n;if(!o.isTyping)return;const s=r.end.getShiftedBy(-1),a=s.getShiftedBy(-i.length),c=t.model.createRange(a,s);this._applyAutoLink(i,c)})),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("enter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const n=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("shiftEnter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition(),n=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:n,range:o}=E_(t,e),r=yN(n);if(r){const t=e.createRange(o.end.getShiftedBy(-r.length),o.end);this._applyAutoLink(r,t)}}_applyAutoLink(t,e){const n=this.editor.model,o=YM(t,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,n)&&JM(o)&&!function(t){const e=t.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}(e)&&this._persistAutoLink(o,e)}_persistAutoLink(t,e){const n=this.editor.model,o=this.editor.plugins.get("Delete");n.enqueueChange((r=>{r.setAttribute("linkHref",t,e),n.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function yN(t){const e=CN.exec(t);return e?e[2]:null}var vN=__webpack_require__(4808),IN={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(vN.A,IN);vN.A.locals;class EN{constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=yr(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){return Jr(new this(t,e)[Symbol.iterator]())}*[Symbol.iterator](){const t=[];for(const{node:e}of xN(this._getStartNode(),this._isForward?"forward":"backward")){const n=e.getAttribute("listIndent");if(nthis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some((t=>e.getAttribute(t)!==this._startElement.getAttribute(t))))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*xN(t,e="forward"){const n="forward"==e,o=[];let r=null;for(;VN(t);){let e=null;if(r){const n=t.getAttribute("listIndent"),i=r.getAttribute("listIndent");n>i?o[i]=r:ne in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RN=(t,e)=>{for(var n in e||(e={}))MN.call(e,n)&&PN(t,n,e[n]);if(BN)for(var n of BN(e))NN.call(e,n)&&PN(t,n,e[n]);return t},LN=(t,e)=>SN(t,ON(e));class jN{static next(){return g()}}function VN(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function zN(t,e={}){return[...FN(t,LN(RN({},e),{direction:"backward"})),...FN(t,LN(RN({},e),{direction:"forward"}))]}function FN(t,e={}){const n="forward"==e.direction,o=Array.from(new EN(t,LN(RN({},e),{includeSelf:n,sameIndent:!0,sameAttributes:"listItemId"})));return n?o:o.reverse()}function UN(t,e){const n=new EN(t,RN({sameIndent:!0,sameAttributes:"listType"},e)),o=new EN(t,RN({sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"},e));return[...Array.from(n).reverse(),...o]}function HN(t){return!EN.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function qN(t){return!EN.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function GN(t,e={}){t=yr(t);const n=!1!==e.withNested,o=new Set;for(const e of t)for(const t of zN(e,{higherIndent:n}))o.add(t);return ZN(o)}function WN(t){t=yr(t);const e=new Set;for(const n of t)for(const t of UN(n))e.add(t);return ZN(e)}function KN(t,e){const n=FN(t,{direction:"forward"}),o=jN.next();for(const t of n)e.setAttribute("listItemId",o,t);return n}function YN(t,e,n){const o={};for(const[t,n]of e.getAttributes())t.startsWith("list")&&(o[t]=n);const r=FN(t,{direction:"forward"});for(const t of r)n.setAttributes(o,t);return r}function JN(t,e,{expand:n,indentBy:o=1}={}){t=yr(t);const r=n?GN(t):t;for(const t of r){const n=t.getAttribute("listIndent")+o;n<0?$N(t,e):e.setAttribute("listIndent",n,t)}return r}function $N(t,e){t=yr(t);for(const n of t)n.is("element","listItem")&&e.rename(n,"paragraph");for(const n of t)for(const t of n.getAttributeKeys())t.startsWith("list")&&e.removeAttribute(t,n);return t}function QN(t){if(!t.length)return!1;const e=t[0].getAttribute("listItemId");return!!e&&!t.some((t=>t.getAttribute("listItemId")!=e))}function ZN(t){return Array.from(t).filter((t=>"$graveyard"!==t.root.rootName)).sort(((t,e)=>t.index-e.index))}function XN(t){const e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function tP(t,e){return e.checkChild(t.parent,"listItem")&&e.checkChild(t,"$text")&&!e.isObject(t)}function eP(t){return"numbered"==t||"customNumbered"==t}function nP(t,e,n){return FN(e,{direction:"forward"}).pop().index>t.index?YN(t,e,n):[]}class oP extends si{constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=rP(t.document.selection);t.change((t=>{const n=[];QN(e)&&!HN(e[0])?("forward"==this._direction&&n.push(...JN(e,t)),n.push(...KN(e[0],t))):"forward"==this._direction?n.push(...JN(e,t,{expand:!0})):n.push(...function(t,e){const n=GN(t=yr(t)),o=new Set,r=Math.min(...n.map((t=>t.getAttribute("listIndent")))),i=new Map;for(const t of n)i.set(t,EN.first(t,{lowerIndent:!0}));for(const t of n){if(o.has(t))continue;o.add(t);const n=t.getAttribute("listIndent")-1;if(n<0)$N(t,e);else{if(t.getAttribute("listIndent")==r){const n=nP(t,i.get(t),e);for(const t of n)o.add(t);if(n.length)continue}e.setAttribute("listIndent",n,t)}}return ZN(o)}(e,t));for(const e of n){if(!e.hasAttribute("listType"))continue;const n=EN.first(e,{sameIndent:!0});n&&t.setAttribute("listType",n.getAttribute("listType"),e)}this._fireAfterExecute(n)}))}_fireAfterExecute(t){this.fire("afterExecute",ZN(new Set(t)))}_checkEnabled(){let t=rP(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction)return!0;if(QN(t)&&!HN(t[0]))return!0;t=GN(t),e=t[0];const n=EN.first(e,{sameIndent:!0});return!!n&&n.getAttribute("listType")==e.getAttribute("listType")}}function rP(t){const e=Array.from(t.getSelectedBlocks()),n=e.findIndex((t=>!VN(t)));return-1!=n&&(e.length=n),e}var iP=Object.defineProperty,sP=Object.defineProperties,aP=Object.getOwnPropertyDescriptors,cP=Object.getOwnPropertySymbols,lP=Object.prototype.hasOwnProperty,dP=Object.prototype.propertyIsEnumerable,uP=(t,e,n)=>e in t?iP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hP=(t,e)=>{for(var n in e||(e={}))lP.call(e,n)&&uP(t,n,e[n]);if(cP)for(var n of cP(e))dP.call(e,n)&&uP(t,n,e[n]);return t},pP=(t,e)=>sP(t,aP(e));class mP extends si{constructor(t,e,n={}){super(t),this.type=e,this._listWalkerOptions=n.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.document,o=XN(e),r=Array.from(n.selection.getSelectedBlocks()).filter((t=>e.schema.checkAttribute(t,"listType")||tP(t,e.schema))),i=void 0!==t.forceValue?!t.forceValue:this.value;e.change((s=>{if(i){const t=r[r.length-1],e=FN(t,{direction:"forward"}),n=[];e.length>1&&n.push(...KN(e[1],s)),n.push(...$N(r,s)),n.push(...function(t,e){const n=[];let o=Number.POSITIVE_INFINITY;for(const{node:r}of xN(t.nextSibling,"forward")){const t=r.getAttribute("listIndent");if(0==t)break;t{const{firstElement:i,lastElement:s}=this._getMergeSubjectElements(n,t),a=i.getAttribute("listIndent")||0,c=s.getAttribute("listIndent"),l=s.getAttribute("listItemId");if(a!=c){const t=(d=s,Array.from(new EN(d,{direction:"forward",higherIndent:!0})));o.push(...JN([s,...t],r,{indentBy:a-c,expand:a{const e=KN(this._getStartBlock(),t);this._fireAfterExecute(e)}))}_fireAfterExecute(t){this.fire("afterExecute",ZN(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&VN(e)&&!HN(e)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}class bP extends ri{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(t){return WN(t)}isFirstBlockOfListItem(t){return HN(t)}isListItemBlock(t){return VN(t)}expandListBlocksToCompleteItems(t,e={}){return GN(t,e)}isNumberedListType(t){return eP(t)}}function kP(t){return t.is("element","ol")||t.is("element","ul")}function wP(t){return t.is("element","li")}function AP(t,e,n,o=yP(n,e)){return t.createAttributeElement(_P(n),null,{priority:2*e/100-100,id:o})}function CP(t,e,n){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:n})}function _P(t){return"numbered"==t||"customNumbered"==t?"ol":"ul"}function yP(t,e){return`list-${t}-${e}`}function vP(t,e){const n=t.nodeBefore;if(VN(n)){let t=n;for(const{node:n}of xN(t,"backward"))if(t=n,e.has(t))return;e.set(n,t)}else{const n=t.nodeAfter;VN(n)&&e.set(n,n)}}function IP(){return(t,e,n)=>{const{writer:o,schema:r}=n;if(!e.modelRange)return;const i=Array.from(e.modelRange.getItems({shallow:!0})).filter((t=>r.checkAttribute(t,"listItemId")));if(!i.length)return;const s=jN.next(),a=function(t){let e=0,n=t.parent;for(;n;){if(wP(n))e++;else{const t=n.previousSibling;t&&wP(t)&&e++}n=n.parent}return e}(e.viewItem);let c=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted";const l=i[0].getAttribute("listType");l&&(c=l);const d={listItemId:s,listIndent:a,listType:c};for(const t of i)t.hasAttribute("listItemId")||o.setAttributes(d,t);i.length>1&&i[1].getAttribute("listItemId")!=d.listItemId&&n.keepEmptyElement(i[0])}}function EP(){return(t,e,n)=>{if(!n.consumable.test(e.viewItem,{name:!0}))return;const o=new _h(e.viewItem.document);for(const t of Array.from(e.viewItem.getChildren()))wP(t)||kP(t)||o.remove(t)}}function xP(t,e,n,{dataPipeline:o}={}){const r=function(t){return(e,n)=>{const o=[];for(const n of t)e.hasAttribute(n)&&o.push(`attribute:${n}`);return!!o.every((t=>!1!==n.test(e,t)))&&(o.forEach((t=>n.consume(e,t))),!0)}}(t);return(i,s,a)=>{const{writer:c,mapper:l,consumable:d}=a,u=s.item;if(!t.includes(s.attributeKey))return;if(!r(u,d))return;const h=function(t,e,n){const o=n.createRangeOn(t),r=e.toViewRange(o).getTrimmed();return r.end.nodeBefore}(u,l,n);DP(h,c,l),function(t,e){let n=t.parent;for(;n.is("attributeElement")&&["ul","ol","li"].includes(n.name);){const o=n.parent;e.unwrap(e.createRangeOn(t),n),n=o}}(h,c);const p=function(t,e,n,o,{dataPipeline:r}){let i=o.createRangeOn(e);if(!HN(t))return i;for(const s of n){if("itemMarker"!=s.scope)continue;const n=s.createElement(o,t,{dataPipeline:r});if(!n)continue;if(o.setCustomProperty("listItemMarker",!0,n),s.canInjectMarkerIntoElement&&s.canInjectMarkerIntoElement(t)?o.insert(o.createPositionAt(e,0),n):(o.insert(i.start,n),i=o.createRange(o.createPositionBefore(n),o.createPositionAfter(e))),!s.createWrapperElement||!s.canWrapElement)continue;const a=s.createWrapperElement(o,t,{dataPipeline:r});o.setCustomProperty("listItemWrapper",!0,a),s.canWrapElement(t)?i=o.wrap(i,a):(i=o.wrap(o.createRangeOn(n),a),i=o.createRange(i.start,o.createPositionAfter(e)))}return i}(u,h,e,c,{dataPipeline:o});!function(t,e,n,o){if(!t.hasAttribute("listIndent"))return;const r=t.getAttribute("listIndent");let i=t;for(let t=r;t>=0;t--){const r=CP(o,t,i.getAttribute("listItemId")),s=AP(o,t,i.getAttribute("listType"));for(const t of n)"list"!=t.scope&&"item"!=t.scope||!i.hasAttribute(t.attributeName)||t.setAttributeOnDowncast(o,i.getAttribute(t.attributeName),"list"==t.scope?s:r);if(e=o.wrap(e,r),e=o.wrap(e,s),0==t)break;if(i=EN.first(i,{lowerIndent:!0}),!i)break}}(u,p,e,c)}}function TP(t,{dataPipeline:e}={}){return(n,{writer:o})=>{if(!SP(n,t))return null;if(!e)return o.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const r=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,r),r}}function DP(t,e,n){for(;t.parent.is("attributeElement")&&t.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(t),t.parent);const o=[];r(e.createPositionBefore(t).getWalker({direction:"backward"})),r(e.createRangeIn(t).getWalker());for(const t of o)e.remove(t);function r(t){for(const{item:e}of t){if(e.is("element")&&n.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&o.push(e)}}}function SP(t,e,n=zN(t)){if(!VN(t))return!1;for(const n of t.getAttributeKeys())if(!n.startsWith("selection:")&&!e.includes(n))return!1;return n.length<2}var OP=__webpack_require__(1232),BP={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(OP.A,BP);OP.A.locals;var MP=__webpack_require__(6903),NP={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(MP.A,NP);MP.A.locals;const PP=["listType","listIndent","listItemId"];class RP extends ri{constructor(t){super(t),this._downcastStrategies=[],t.config.define("list.multiBlock",!0)}static get pluginName(){return"ListEditing"}static get requires(){return[J_,v_,bP,d_]}init(){const t=this.editor,e=t.model,n=t.config.get("list.multiBlock");if(t.plugins.has("LegacyListEditing"))throw new w("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});e.schema.register("$listItem",{allowAttributes:PP}),n?(e.schema.extend("$container",{allowAttributesOf:"$listItem"}),e.schema.extend("$block",{allowAttributesOf:"$listItem"}),e.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):e.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const t of PP)e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new mP(t,"numbered")),t.commands.add("bulletedList",new mP(t,"bulleted")),t.commands.add("customNumberedList",new mP(t,"customNumbered",{multiLevel:!0})),t.commands.add("customBulletedList",new mP(t,"customBulleted",{multiLevel:!0})),t.commands.add("indentList",new oP(t,"forward")),t.commands.add("outdentList",new oP(t,"backward")),t.commands.add("splitListItemBefore",new fP(t,"before")),t.commands.add("splitListItemAfter",new fP(t,"after")),n&&(t.commands.add("mergeListItemBackward",new gP(t,"backward")),t.commands.add("mergeListItemForward",new gP(t,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration()}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),n&&n.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}getListAttributeNames(){return[...PP,...this._downcastStrategies.map((t=>t.attributeName))]}_setupDeleteIntegration(){const t=this.editor,e=t.commands.get("mergeListItemBackward"),n=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",((o,r)=>{const i=t.model.document.selection;XN(t.model)||t.model.change((()=>{const s=i.getFirstPosition();if(i.isCollapsed&&"backward"==r.direction){if(!s.isAtStart)return;const n=s.parent;if(!VN(n))return;if(EN.first(n,{sameAttributes:"listType",sameIndent:!0})||0!==n.getAttribute("listIndent")){if(!e||!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:LP(t.model,"backward")})}else qN(n)||t.execute("splitListItemAfter"),t.execute("outdentList");r.preventDefault(),o.stop()}else{if(i.isCollapsed&&!i.getLastPosition().isAtEnd)return;if(!n||!n.isEnabled)return;n.execute({shouldMergeOnBlocksContentLevel:LP(t.model,"forward")}),r.preventDefault(),o.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const t=this.editor,e=t.model,n=t.commands,o=n.get("enter");this.listenTo(t.editing.view.document,"enter",((n,o)=>{const r=e.document,i=r.selection.getFirstPosition().parent;if(r.selection.isCollapsed&&VN(i)&&i.isEmpty&&!o.isSoft){const e=HN(i),r=qN(i);e&&r?(t.execute("outdentList"),o.preventDefault(),n.stop()):e&&!r?(t.execute("splitListItemAfter"),o.preventDefault(),n.stop()):r&&(t.execute("splitListItemBefore"),o.preventDefault(),n.stop())}}),{context:"li"}),this.listenTo(o,"afterExecute",(()=>{const e=n.get("splitListItemBefore");if(e.refresh(),!e.isEnabled)return;2===zN(t.model.document.selection.getLastPosition().parent).length&&e.execute()}))}_setupTabIntegration(){const t=this.editor;this.listenTo(t.editing.view.document,"tab",((e,n)=>{const o=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(t.execute(o),n.stopPropagation(),n.preventDefault(),e.stop())}),{context:"li"})}_setupConversion(){const t=this.editor,e=t.model,n=this.getListAttributeNames(),o=t.config.get("list.multiBlock"),r=o?"paragraph":"listItem";t.conversion.for("upcast").elementToElement({view:"li",model:(t,{writer:e})=>e.createElement(r,{listType:""})}).elementToElement({view:"p",model:(t,{writer:e})=>t.parent&&t.parent.is("element","li")?e.createElement(r,{listType:""}):null,converterPriority:"high"}).add((t=>{t.on("element:li",IP()),t.on("element:ul",EP(),{priority:"high"}),t.on("element:ol",EP(),{priority:"high"})})),o||t.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),t.conversion.for("editingDowncast").elementToElement({model:r,view:TP(n),converterPriority:"high"}).add((t=>{var o;t.on("attribute",xP(n,this._downcastStrategies,e)),t.on("remove",(o=e.schema,(t,e,n)=>{const{writer:r,mapper:i}=n,s=t.name.split(":")[1];if(!o.checkAttribute(s,"listItemId"))return;const a=i.toViewPosition(e.position),c=e.position.getShiftedBy(e.length),l=i.toViewPosition(c,{isPhantom:!0}),d=r.createRange(a,l).getTrimmed().end.nodeBefore;d&&DP(d,r,i)}))})),t.conversion.for("dataDowncast").elementToElement({model:r,view:TP(n,{dataPipeline:!0}),converterPriority:"high"}).add((t=>{t.on("attribute",xP(n,this._downcastStrategies,e,{dataPipeline:!0}))}));const i=(s=this._downcastStrategies,a=t.editing.view,(t,e)=>{if(e.modelPosition.offset>0)return;const n=e.modelPosition.parent;if(!VN(n))return;if(!s.some((t=>"itemMarker"==t.scope&&t.canInjectMarkerIntoElement&&t.canInjectMarkerIntoElement(n))))return;const o=e.mapper.toViewElement(n),r=a.createRangeIn(o),i=r.getWalker();let c=r.start;for(const{item:t}of i){if(t.is("element")&&e.mapper.toModelElement(t)||t.is("$textProxy"))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&(c=a.createPositionAfter(t),i.skip((({previousPosition:t})=>!t.isEqual(c))))}e.viewPosition=c});var s,a;t.editing.mapper.on("modelToViewPosition",i),t.data.mapper.on("modelToViewPosition",i),this.listenTo(e.document,"change:data",function(t,e,n,o){return()=>{const o=t.document.differ.getChanges(),s=[],a=new Map,c=new Set;for(const t of o)if("insert"==t.type&&"$text"!=t.name)vP(t.position,a),t.attributes.has("listItemId")?c.add(t.position.nodeAfter):vP(t.position.getShiftedBy(t.length),a);else if("remove"==t.type&&t.attributes.has("listItemId"))vP(t.position,a);else if("attribute"==t.type){const e=t.range.start.nodeAfter;n.includes(t.attributeKey)?(vP(t.range.start,a),null===t.attributeNewValue?(vP(t.range.start.getShiftedBy(1),a),i(e)&&s.push(e)):c.add(e)):VN(e)&&i(e)&&s.push(e)}for(const t of a.values())s.push(...r(t,c));for(const t of new Set(s))e.reconvertItem(t)};function r(t,e){const o=[],r=new Set,a=[];for(const{node:c,previous:l}of xN(t,"forward")){if(r.has(c))continue;const t=c.getAttribute("listIndent");l&&tn.includes(t))));const d=FN(c,{direction:"forward"});for(const t of d)r.add(t),(i(t,d)||s(t,a,e))&&o.push(t)}return o}function i(t,r){const i=e.mapper.toViewElement(t);if(!i)return!1;if(o.fire("checkElement",{modelElement:t,viewElement:i}))return!0;if(!t.is("element","paragraph")&&!t.is("element","listItem"))return!1;const s=SP(t,n,r);return!(!s||!i.is("element","p"))||!(s||!i.is("element","span"))}function s(t,n,r){if(r.has(t))return!1;const i=e.mapper.toViewElement(t);let s=n.length-1;for(let t=i.parent;!t.is("editableElement");t=t.parent){const e=wP(t),r=kP(t);if(!r&&!e)continue;const i="checkAttributes:"+(e?"item":"list");if(o.fire(i,{viewElement:t,modelAttributes:n[s]}))break;if(r&&(s--,s<0))return!1}return!0}}(e,t.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",((t,{viewElement:e,modelAttributes:n})=>{e.id!=n.listItemId&&(t.return=!0,t.stop())})),this.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:n})=>{e.name==_P(n.listType)&&e.id==yP(n.listType,n.listIndent)||(t.return=!0,t.stop())}))}_setupModelPostFixing(){const t=this.editor.model,e=this.getListAttributeNames();t.document.registerPostFixer((n=>function(t,e,n,o){const r=t.document.differ.getChanges(),i=new Map,s=o.editor.config.get("list.multiBlock");let a=!1;for(const o of r){if("insert"==o.type&&"$text"!=o.name){const r=o.position.nodeAfter;if(!t.schema.checkAttribute(r,"listItemId"))for(const t of Array.from(r.getAttributeKeys()))n.includes(t)&&(e.removeAttribute(t,r),a=!0);vP(o.position,i),o.attributes.has("listItemId")||vP(o.position.getShiftedBy(o.length),i);for(const{item:e,previousPosition:n}of t.createRangeIn(r))VN(e)&&vP(n,i)}else"remove"==o.type?vP(o.position,i):"attribute"==o.type&&n.includes(o.attributeKey)&&(vP(o.range.start,i),null===o.attributeNewValue&&vP(o.range.start.getShiftedBy(1),i));if(!s&&"attribute"==o.type&&PP.includes(o.attributeKey)){const t=o.range.start.nodeAfter;null===o.attributeNewValue&&t&&t.is("element","listItem")?(e.rename(t,"paragraph"),a=!0):null===o.attributeOldValue&&t&&t.is("element")&&"listItem"!=t.name&&(e.rename(t,"listItem"),a=!0)}}const c=new Set;for(const t of i.values())a=o.fire("postFixer",{listNodes:new TN(t),listHead:t,writer:e,seenIds:c})||a;return a}(t,n,e,this))),this.on("postFixer",((t,{listNodes:e,writer:n})=>{t.return=function(t,e){let n=0,o=-1,r=null,i=!1;for(const{node:s}of t){const t=s.getAttribute("listIndent");if(t>n){let a;null===r?(r=t-n,a=n):(r>t&&(r=t),a=t-r),a>o+1&&(a=o+1),e.setAttribute("listIndent",a,s),i=!0,o=a}else r=null,n=t+1,o=t}return i}(e,n)||t.return}),{priority:"high"}),this.on("postFixer",((t,{listNodes:e,writer:n,seenIds:o})=>{t.return=function(t,e,n){const o=new Set;let r=!1;for(const{node:i}of t){if(o.has(i))continue;let t=i.getAttribute("listType"),s=i.getAttribute("listItemId");if(e.has(s)&&(s=jN.next()),e.add(s),i.is("element","listItem"))i.getAttribute("listItemId")!=s&&(n.setAttribute("listItemId",s,i),r=!0);else for(const e of FN(i,{direction:"forward"}))o.add(e),e.getAttribute("listType")!=t&&(s=jN.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=s&&(n.setAttribute("listItemId",s,e),r=!0)}return r}(e,o,n)||t.return}),{priority:"high"})}_setupClipboardIntegration(){const t=this.editor.model,e=this.editor.plugins.get("ClipboardPipeline");this.listenTo(t,"insertContent",function(t){return(e,[n,o])=>{const r=n.is("documentFragment")?Array.from(n.getChildren()):[n];if(!r.length)return;const i=(o?t.createSelection(o):t.document.selection).getFirstPosition();let s;if(VN(i.parent))s=i.parent;else{if(!VN(i.nodeBefore))return;s=i.nodeBefore}t.change((t=>{const e=s.getAttribute("listType"),n=s.getAttribute("listIndent"),o=r[0].getAttribute("listIndent")||0,i=Math.max(n-o,0);for(const n of r){const o=VN(n);s.is("element","listItem")&&n.is("element","paragraph")&&t.rename(n,"listItem"),t.setAttributes({listIndent:(o?n.getAttribute("listIndent"):0)+i,listItemId:o?n.getAttribute("listItemId"):jN.next(),listType:e},n)}}))}}(t),{priority:"high"}),this.listenTo(e,"outputTransformation",((e,n)=>{t.change((t=>{const e=Array.from(n.content.getChildren()),o=e[e.length-1];if(e.length>1&&o.is("element")&&o.isEmpty){e.slice(0,-1).every(VN)&&t.remove(o)}if("copy"==n.method||"cut"==n.method){const e=Array.from(n.content.getChildren());QN(e)&&$N(e,t)}}))}))}_setupAccessibilityIntegration(){const t=this.editor,e=t.t;t.accessibility.addKeystrokeInfoGroup({id:"list",label:e("Keystrokes that can be used in a list"),keystrokes:[{label:e("Increase list item indent"),keystroke:"Tab"},{label:e("Decrease list item indent"),keystroke:"Shift+Tab"}]})}}function LP(t,e){const n=t.document.selection;if(!n.isCollapsed)return!XN(t);if("forward"===e)return!0;const o=n.getFirstPosition().parent,r=o.previousSibling;return!t.schema.isObject(r)&&(!!r.isEmpty||QN([o,r]))}function jP(t,e,n,o){t.ui.componentFactory.add(e,(()=>{const r=VP(Lm,t,e,n,o);return r.set({tooltip:!0,isToggleable:!0}),r})),t.ui.componentFactory.add(`menuBar:${e}`,(()=>VP(Ew,t,e,n,o)))}function VP(t,e,n,o,r){const i=e.commands.get(n),s=new t(e.locale);return s.set({label:o,icon:r}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),s.on("execute",(()=>{e.execute(n),e.editing.view.focus()})),s}class zP extends ri{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;jP(this.editor,"numberedList",t("Numbered List"),Ep.numberedList),jP(this.editor,"bulletedList",t("Bulleted List"),Ep.bulletedList)}}class FP extends ri{static get requires(){return[RP,zP]}static get pluginName(){return"List"}}class UP extends si{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute({startIndex:t=1}={}){const e=this.editor.model,n=e.document;let o=Array.from(n.selection.getSelectedBlocks()).filter((t=>VN(t)&&eP(t.getAttribute("listType"))));o=WN(o),e.change((e=>{for(const n of o)e.setAttribute("listStart",t>=0?t:1,n)}))}_getValue(){const t=Jr(this.editor.model.document.selection.getSelectedBlocks());return t&&VN(t)&&eP(t.getAttribute("listType"))?t.getAttribute("listStart"):null}}const HP={},qP={},GP={},WP=[{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:t,typeAttribute:e,listType:n}of WP)HP[t]=n,qP[t]=e,e&&(GP[e]=t);function KP(){return WP.map((t=>t.listStyle))}function YP(t){return HP[t]||null}function JP(t){return GP[t]||null}function $P(t){return qP[t]||null}class QP extends si{constructor(t,e,n){super(t),this.defaultType=e,this._supportedTypes=n}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.document;e.change((e=>{this._tryToConvertItemsToList(t);let o=Array.from(n.selection.getSelectedBlocks()).filter((t=>t.hasAttribute("listType")));if(o.length){o=WN(o);for(const n of o)e.setAttribute("listStyle",t.type||this.defaultType,n)}}))}isStyleTypeSupported(t){return!this._supportedTypes||this._supportedTypes.includes(t)}_getValue(){const t=Jr(this.editor.model.document.selection.getSelectedBlocks());return VN(t)?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),n=t.commands.get("bulletedList");return e.isEnabled||n.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=YP(t.type);if(!e)return;const n=this.editor,o=`${e}List`;n.commands.get(o).value||n.execute(o)}}class ZP extends si{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,n=e.document;let o=Array.from(n.selection.getSelectedBlocks()).filter((t=>VN(t)&&"numbered"==t.getAttribute("listType")));o=WN(o),e.change((e=>{for(const n of o)e.setAttribute("listReversed",!!t.reversed,n)}))}_getValue(){const t=Jr(this.editor.model.document.selection.getSelectedBlocks());return VN(t)&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}function XP(t){return(e,n,o)=>{const{writer:r,schema:i,consumable:s}=o;if(!1===s.test(n.viewItem,t.viewConsumables))return;n.modelRange||Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor));let a=!1;for(const e of n.modelRange.getItems({shallow:!0}))i.checkAttribute(e,t.attributeName)&&t.appliesToListItem(e)&&(e.hasAttribute(t.attributeName)||(r.setAttribute(t.attributeName,t.getAttributeOnUpcast(n.viewItem),e),a=!0));a&&s.consume(n.viewItem,t.viewConsumables)}}class tR extends ri{static get pluginName(){return"ListPropertiesUtils"}getAllSupportedStyleTypes(){return KP()}getListTypeFromListStyleType(t){return YP(t)}getListStyleTypeFromTypeAttribute(t){return JP(t)}getTypeAttributeFromListStyleType(t){return $P(t)}}const eR="default";class nR extends ri{static get requires(){return[RP,tR]}static get pluginName(){return"ListPropertiesEditing"}constructor(t){super(t),t.config.define("list.properties",{styles:!0,startIndex:!1,reversed:!1})}init(){const t=this.editor,e=t.model,n=t.plugins.get(RP),o=function(t){const e=[];if(t.styles){const n="object"==typeof t.styles&&t.styles.useAttribute;e.push({attributeName:"listStyle",defaultValue:eR,viewConsumables:{styles:"list-style-type"},addCommand(t){let e=KP();n&&(e=e.filter((t=>!!$P(t)))),t.commands.add("listStyle",new QP(t,eR,e))},appliesToListItem:t=>"numbered"==t.getAttribute("listType")||"bulleted"==t.getAttribute("listType"),hasValidAttribute(t){if(!this.appliesToListItem(t))return!t.hasAttribute("listStyle");if(!t.hasAttribute("listStyle"))return!1;const e=t.getAttribute("listStyle");return e==eR||YP(e)==t.getAttribute("listType")},setAttributeOnDowncast(t,e,o){if(e&&e!==eR){if(!n)return void t.setStyle("list-style-type",e,o);{const n=$P(e);if(n)return void t.setAttribute("type",n,o)}}t.removeStyle("list-style-type",o),t.removeAttribute("type",o)},getAttributeOnUpcast(t){const e=t.getStyle("list-style-type");if(e)return e;const n=t.getAttribute("type");return n?JP(n):eR}})}t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(t){t.commands.add("listReversed",new ZP(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listReversed")},setAttributeOnDowncast(t,e,n){e?t.setAttribute("reversed","reversed",n):t.removeAttribute("reversed",n)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(t){t.commands.add("listStart",new UP(t))},appliesToListItem:t=>eP(t.getAttribute("listType")),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listStart")},setAttributeOnDowncast(t,e,n){0==e||e>1?t.setAttribute("start",e,n):t.removeAttribute("start",n)},getAttributeOnUpcast(t){const e=t.getAttribute("start");return e>=0?e:1}});return e}(t.config.get("list.properties"));for(const r of o)r.addCommand(t),e.schema.extend("$listItem",{allowAttributes:r.attributeName}),n.registerDowncastStrategy({scope:"list",attributeName:r.attributeName,setAttributeOnDowncast(t,e,n){r.setAttributeOnDowncast(t,e,n)}});t.conversion.for("upcast").add((t=>{for(const e of o)t.on("element:ol",XP(e)),t.on("element:ul",XP(e))})),n.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:n})=>{for(const r of o)r.getAttributeOnUpcast(e)!=n[r.attributeName]&&(t.return=!0,t.stop())})),this.listenTo(t.commands.get("indentList"),"afterExecute",((t,n)=>{e.change((t=>{for(const e of n)for(const n of o)n.appliesToListItem(e)&&t.setAttribute(n.attributeName,n.defaultValue,e)}))})),n.on("postFixer",((t,{listNodes:e,writer:n})=>{for(const{node:r}of e)for(const e of o)e.hasValidAttribute(r)||(e.appliesToListItem(r)?n.setAttribute(e.attributeName,e.defaultValue,r):n.removeAttribute(e.attributeName,r),t.return=!0)})),n.on("postFixer",((t,{listNodes:e,writer:n})=>{for(const{node:r,previousNodeInList:i}of e)if(i&&i.getAttribute("listType")==r.getAttribute("listType"))for(const e of o){const{attributeName:o}=e;if(!e.appliesToListItem(r))continue;const s=i.getAttribute(o);r.getAttribute(o)!=s&&(n.setAttribute(o,s,r),t.return=!0)}}))}}var oR=__webpack_require__(9968),rR={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(oR.A,rR);oR.A.locals;class iR extends wm{constructor(t,{enabledProperties:e,styleButtonViews:n,styleGridAriaLabel:o}){super(t),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new $r,this.keystrokes=new Qr,this.focusables=new Jp;const r=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new yg({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),e.styles?(this.stylesView=this._createStylesView(n,o),this.children.add(this.stylesView)):r.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e),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 t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);Yp({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>No.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const n=new wm(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){this.children.first.focus()},n.focusTracker=new $r,n.keystrokes=new Qr,n.render(),n.keystrokes.listenTo(n.element),n}_addNumberedListPropertyViews(t){const e=this.locale.t,n=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),n.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),n.push(this.reversedSwitchButtonView)),t.styles?(this.additionalPropertiesCollapsibleView=new Wm(this.locale,n),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(n,"isEnabled",((...t)=>t.some((t=>t)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((t,e,n)=>{n||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(n)}_createStartIndexField(){const t=this.locale.t,e=new cg(this.locale,uf);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",(()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid start index value."):n.checkValidity()?this.fire("listStart",{startIndex:o}):e.errorText=t("Start index must be greater than 0.")})),e}_createReversedSwitchButton(){const t=this.locale.t,e=new zm(this.locale);return e.set({withText:!0,label:t("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),e.delegate("execute").to(this,"listReversed"),e}}var sR=__webpack_require__(7141),aR={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(sR.A,aR);sR.A.locals;var cR=Object.defineProperty,lR=Object.defineProperties,dR=Object.getOwnPropertyDescriptors,uR=Object.getOwnPropertySymbols,hR=Object.prototype.hasOwnProperty,pR=Object.prototype.propertyIsEnumerable,mR=(t,e,n)=>e in t?cR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gR=(t,e)=>{for(var n in e||(e={}))hR.call(e,n)&&mR(t,n,e[n]);if(uR)for(var n of uR(e))pR.call(e,n)&&mR(t,n,e[n]);return t},fR=(t,e)=>lR(t,dR(e));class bR extends ri{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,e=t.locale.t,n=t.config.get("list.properties");if(n.styles){const o=[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:''},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:''},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:''}],r=e("Bulleted List"),i=e("Bulleted list styles toolbar"),s="bulletedList";t.ui.componentFactory.add(s,kR({editor:t,propertiesConfig:n,parentCommandName:s,buttonLabel:r,buttonIcon:Ep.bulletedList,styleGridAriaLabel:i,styleDefinitions:o})),t.ui.componentFactory.add(`menuBar:${s}`,AR({editor:t,propertiesConfig:n,parentCommandName:s,buttonLabel:r,styleGridAriaLabel:i,styleDefinitions:o}))}if(n.styles||n.startIndex||n.reversed){const o=[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:''},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:''},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:''},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:''},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:''},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:''}],r=e("Numbered List"),i=e("Numbered list styles toolbar"),s="numberedList";t.ui.componentFactory.add(s,kR({editor:t,propertiesConfig:n,parentCommandName:s,buttonLabel:r,buttonIcon:Ep.numberedList,styleGridAriaLabel:i,styleDefinitions:o})),n.styles&&t.ui.componentFactory.add(`menuBar:${s}`,AR({editor:t,propertiesConfig:n,parentCommandName:s,buttonLabel:r,styleGridAriaLabel:i,styleDefinitions:o}))}}}function kR({editor:t,propertiesConfig:e,parentCommandName:n,buttonLabel:o,buttonIcon:r,styleGridAriaLabel:i,styleDefinitions:s}){const a=t.commands.get(n);return c=>{const l=nf(c,Qg),d=l.buttonView;return l.bind("isEnabled").to(a),l.class="ck-list-styles-dropdown",d.on("execute",(()=>{t.execute(n),t.editing.view.focus()})),d.set({label:o,icon:r,tooltip:!0,isToggleable:!0}),d.bind("isOn").to(a,"value",(t=>!!t)),l.once("change:isOpen",(()=>{const o=function({editor:t,propertiesConfig:e,dropdownView:n,parentCommandName:o,styleDefinitions:r,styleGridAriaLabel:i}){const s=t.locale,a=gR({},e);"numberedList"!=o&&(a.startIndex=!1,a.reversed=!1);let c=null;if(a.styles){const e=t.commands.get("listStyle"),n=wR({editor:t,parentCommandName:o,listStyleCommand:e}),i=CR(e);c=r.filter(i).map(n)}const l=new iR(s,{styleGridAriaLabel:i,enabledProperties:a,styleButtonViews:c});a.styles&&cf(n,(()=>l.stylesView.children.find((t=>t.isOn))));if(a.startIndex){const e=t.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(e),l.startIndexFieldView.fieldView.bind("value").to(e),l.on("listStart",((e,n)=>t.execute("listStart",n)))}if(a.reversed){const e=t.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(e),l.reversedSwitchButtonView.bind("isOn").to(e,"value",(t=>!!t)),l.on("listReversed",(()=>{const n=e.value;t.execute("listReversed",{reversed:!n})}))}return l.delegate("execute").to(n),l}({editor:t,propertiesConfig:e,dropdownView:l,parentCommandName:n,styleGridAriaLabel:i,styleDefinitions:s});l.panelView.children.add(o)})),l.on("execute",(()=>{t.editing.view.focus()})),l}}function wR({editor:t,listStyleCommand:e,parentCommandName:n}){const o=t.locale,r=t.commands.get(n);return({label:i,type:s,icon:a,tooltip:c})=>{const l=new Lm(o);return l.set({label:i,icon:a,tooltip:c}),e.on("change:value",(()=>{l.isOn=e.value===s})),l.on("execute",(()=>{r.value?e.value===s?t.execute(n):e.value!==s&&t.execute("listStyle",{type:s}):t.model.change((()=>{t.execute("listStyle",{type:s})}))})),l}}function AR({editor:t,propertiesConfig:e,parentCommandName:n,buttonLabel:o,styleGridAriaLabel:r,styleDefinitions:i}){return s=>{const a=new _w(s),c=t.commands.get(n),l=t.commands.get("listStyle"),d=CR(l),u=wR({editor:t,parentCommandName:n,listStyleCommand:l}),h=i.filter(d).map(u),p=new iR(s,{styleGridAriaLabel:r,enabledProperties:fR(gR({},e),{startIndex:!1,reversed:!1}),styleButtonViews:h});return p.delegate("execute").to(a),a.buttonView.set({label:o,icon:Ep[n]}),a.panelView.children.add(p),a.bind("isEnabled").to(c,"isEnabled"),a.on("execute",(()=>{t.editing.view.focus()})),a}}function CR(t){return"function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0}class _R extends ri{static get requires(){return[nR,bR]}static get pluginName(){return"ListProperties"}}class yR extends si{constructor(t){super(t),this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){const t=this._getSelectedItems();this.value=this._getValue(t),this.isEnabled=!!t.length}execute(t={}){this.editor.model.change((e=>{const n=this._getSelectedItems(),o=void 0===t.forceValue?!this._getValue(n):t.forceValue;for(const t of n)o?e.setAttribute("todoListChecked",!0,t):e.removeAttribute("todoListChecked",t)}))}_getValue(t){return t.every((t=>t.getAttribute("todoListChecked")))}_getSelectedItems(){const t=this.editor.model,e=t.schema,n=t.document.selection.getFirstRange(),o=n.start.parent,r=[];e.checkAttribute(o,"todoListChecked")&&r.push(...zN(o));for(const t of n.getItems({shallow:!0}))e.checkAttribute(t,"todoListChecked")&&!r.includes(t)&&r.push(...zN(t));return r}}class vR extends Ma{constructor(){super(...arguments),this.domEventType=["change"]}onDomEvent(t){if(t.target){const e=this.view.domConverter.mapDomToView(t.target);e&&e.is("element","input")&&"checkbox"==e.getAttribute("type")&&e.findAncestor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",t)}}}var IR=Object.defineProperty,ER=Object.getOwnPropertySymbols,xR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,DR=(t,e,n)=>e in t?IR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SR=(t,e)=>{for(var n in e||(e={}))xR.call(e,n)&&DR(t,n,e[n]);if(ER)for(var n of ER(e))TR.call(e,n)&&DR(t,n,e[n]);return t};const OR=Ar("Ctrl+Enter");class BR extends ri{static get pluginName(){return"TodoListEditing"}static get requires(){return[RP]}init(){const t=this.editor,e=t.model,n=t.editing,o=t.plugins.get(RP),r=t.config.get("list.multiBlock")?"paragraph":"listItem";t.commands.add("todoList",new mP(t,"todo")),t.commands.add("checkTodoList",new yR(t)),n.view.addObserver(vR),e.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),e.schema.addAttributeCheck(((t,e)=>{const n=t.last;if("todoListChecked"==e)return!(!n.getAttribute("listItemId")||"todo"!=n.getAttribute("listType"))&&void 0})),t.conversion.for("upcast").add((t=>{t.on("element:input",((t,e,n)=>{const o=e.modelCursor,r=o.parent,i=e.viewItem;if(!n.consumable.test(i,{name:!0}))return;if("checkbox"!=i.getAttribute("type")||!o.isAtStart||!r.hasAttribute("listType"))return;n.consumable.consume(i,{name:!0});const s=n.writer;s.setAttribute("listType","todo",r),e.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,r),e.modelRange=s.createRange(o)})),t.on("element:label",MR({name:"label",classes:"todo-list__label"})),t.on("element:label",MR({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),t.on("element:span",MR({name:"span",classes:"todo-list__label__description"})),t.on("element:ul",function(t){const e=new Ni(t);return(t,n,o)=>{const r=e.match(n.viewItem);if(!r)return;const i=r.match;i.name=!1,o.consumable.consume(n.viewItem,i)}}({name:"ul",classes:"todo-list"}))})),t.conversion.for("downcast").elementToElement({model:r,view:(t,{writer:e})=>{if(NR(t,o.getListAttributeNames()))return e.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),o.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(t,e,n){"todo"==e?t.addClass("todo-list",n):t.removeClass("todo-list",n)}}),o.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(t,e,{dataPipeline:n}){if("todo"!=e.getAttribute("listType"))return null;const o=t.createUIElement("input",SR(SR({type:"checkbox"},e.getAttribute("todoListChecked")?{checked:"checked"}:null),n?{disabled:"disabled"}:{tabindex:"-1"}));if(n)return o;const r=t.createContainerElement("span",{contenteditable:"false"},o);return r.getFillerOffset=()=>null,r},canWrapElement:t=>NR(t,o.getListAttributeNames()),createWrapperElement(t,e,{dataPipeline:n}){const r=["todo-list__label"];return NR(e,o.getListAttributeNames())||r.push("todo-list__label_without-description"),t.createAttributeElement(n?"label":"span",{class:r.join(" ")})}}),o.on("checkElement",((t,{modelElement:e,viewElement:n})=>{const r=NR(e,o.getListAttributeNames());n.hasClass("todo-list__label__description")!=r&&(t.return=!0,t.stop())})),o.on("checkElement",((e,{modelElement:n,viewElement:o})=>{const r="todo"==n.getAttribute("listType")&&HN(n);let i=!1;const s=t.editing.view.createPositionBefore(o).getWalker({direction:"backward"});for(const{item:e}of s){if(e.is("element")&&t.editing.mapper.toModelElement(e))break;e.is("element","input")&&"checkbox"==e.getAttribute("type")&&(i=!0)}i!=r&&(e.return=!0,e.stop())})),o.on("postFixer",((t,{listNodes:e,writer:n})=>{for(const{node:o,previousNodeInList:r}of e){if(!r)continue;if(r.getAttribute("listItemId")!=o.getAttribute("listItemId"))continue;const e=r.hasAttribute("todoListChecked"),i=o.hasAttribute("todoListChecked");i&&!e?(n.removeAttribute("todoListChecked",o),t.return=!0):!i&&e&&(n.setAttribute("todoListChecked",!0,o),t.return=!0)}})),e.document.registerPostFixer((t=>{const n=e.document.differ.getChanges();let o=!1;for(const e of n)if("attribute"==e.type&&"listType"==e.attributeKey){const n=e.range.start.nodeAfter;"todo"==e.attributeOldValue&&n.hasAttribute("todoListChecked")&&(t.removeAttribute("todoListChecked",n),o=!0)}else if("insert"==e.type&&"$text"!=e.name)for(const{item:n}of t.createRangeOn(e.position.nodeAfter))n.is("element")&&"todo"!=n.getAttribute("listType")&&n.hasAttribute("todoListChecked")&&(t.removeAttribute("todoListChecked",n),o=!0);return o})),this.listenTo(n.view.document,"keydown",((e,n)=>{wr(n)===OR&&(t.execute("checkTodoList"),e.stop())}),{priority:"high"}),this.listenTo(n.view.document,"todoCheckboxChange",((t,e)=>{const o=e.target;if(!o||!o.is("element","input"))return;const r=n.view.createPositionAfter(o),i=n.mapper.toModelPosition(r).parent;i&&VN(i)&&"todo"==i.getAttribute("listType")&&this._handleCheckmarkChange(i)})),this.listenTo(n.view.document,"arrowKey",function(t,e){return(n,o)=>{const r=_r(o.keyCode,e.contentLanguageDirection),i=t.schema,s=t.document.selection;if(!s.isCollapsed)return;const a=s.getFirstPosition(),c=a.parent;if("right"==r&&a.isAtEnd){const e=i.getNearestSelectionRange(t.createPositionAfter(c),"forward");if(!e)return;const r=e.start.parent;r&&VN(r)&&"todo"==r.getAttribute("listType")&&(t.change((t=>t.setSelection(e))),o.preventDefault(),o.stopPropagation(),n.stop())}else if("left"==r&&a.isAtStart&&VN(c)&&"todo"==c.getAttribute("listType")){const e=i.getNearestSelectionRange(t.createPositionBefore(c),"backward");if(!e)return;t.change((t=>t.setSelection(e))),o.preventDefault(),o.stopPropagation(),n.stop()}}}(e,t.locale),{context:"$text"}),this.listenTo(n.mapper,"viewToModelPosition",((t,n)=>{const o=n.viewPosition.parent,r=o.is("attributeElement","li")&&0==n.viewPosition.offset,i=PR(o)&&n.viewPosition.offset<=1,s=o.is("element","span")&&"false"==o.getAttribute("contenteditable")&&PR(o.parent);if(!r&&!i&&!s)return;const a=n.modelPosition.nodeAfter;a&&"todo"==a.getAttribute("listType")&&(n.modelPosition=e.createPositionAt(a,0))}),{priority:"low"}),this._initAriaAnnouncements()}_handleCheckmarkChange(t){const e=this.editor,n=e.model,o=Array.from(n.document.selection.getRanges());n.change((n=>{n.setSelection(t,"end"),e.execute("checkTodoList"),n.setSelection(o)}))}_initAriaAnnouncements(){const{model:t,ui:e,t:n}=this.editor;let o=null;e&&t.document.selection.on("change:range",(()=>{const r=t.document.selection.focus.parent,i=RR(o),s=RR(r);i&&!s?e.ariaLiveAnnouncer.announce(n("Leaving a to-do list")):!i&&s&&e.ariaLiveAnnouncer.announce(n("Entering a to-do list")),o=r}))}}function MR(t){const e=new Ni(t);return(t,n,o)=>{const r=e.match(n.viewItem);r&&o.consumable.consume(n.viewItem,r.match)&&Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor))}}function NR(t,e){return(t.is("element","paragraph")||t.is("element","listItem"))&&"todo"==t.getAttribute("listType")&&HN(t)&&function(t,e){for(const n of t.getAttributeKeys())if(!n.startsWith("selection:")&&!e.includes(n))return!1;return!0}(t,e)}function PR(t){return!!t&&t.is("attributeElement")&&t.hasClass("todo-list__label")}function RR(t){return!!t&&(!(!t.is("element","paragraph")&&!t.is("element","listItem"))&&"todo"==t.getAttribute("listType"))}class LR extends ri{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;jP(this.editor,"todoList",t("To-do List"),Ep.todoList)}}var jR=__webpack_require__(8991),VR={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(jR.A,VR);jR.A.locals;class zR extends ri{static get requires(){return[BR,LR]}static get pluginName(){return"TodoList"}}Ar("Ctrl+Enter");function FR(t,e){const n=(n,o,r)=>{if(!r.consumable.consume(o.item,n.name))return;const i=o.attributeNewValue,s=r.writer,a=r.mapper.toViewElement(o.item),c=[...a.getChildren()].find((t=>t.getCustomProperty("media-content")));s.remove(c);const l=t.getMediaViewElement(s,i,e);s.insert(s.createPositionAt(a,0),l)};return t=>{t.on("attribute:url:media",n)}}function UR(t,e,n,o){return t.createContainerElement("figure",{class:"media"},[e.getMediaViewElement(t,n,o),t.createSlot()])}function HR(t){const e=t.getSelectedElement();return e&&e.is("element","media")?e:null}function qR(t,e,n,o){t.change((r=>{const i=r.createElement("media",{url:e});t.insertObject(i,n,null,{setSelection:"on",findOptimalPosition:o?"auto":void 0})}))}class GR extends si{refresh(){const t=this.editor.model,e=t.document.selection,n=HR(e);this.value=n?n.getAttribute("url"):void 0,this.isEnabled=function(t){const e=t.getSelectedElement();return!!e&&"media"===e.name}(e)||function(t,e){const n=py(t,e);let o=n.start.parent;o.isEmpty&&!e.schema.isLimit(o)&&(o=o.parent);return e.schema.checkChild(o,"media")}(e,t)}execute(t){const e=this.editor.model,n=e.document.selection,o=HR(n);o?e.change((e=>{e.setAttribute("url",t,o)})):qR(e,t,n,!0)}}class WR{constructor(t,e){const n=e.providers,o=e.extraProviders||[],r=new Set(e.removeProviders),i=n.concat(o).filter((t=>{const e=t.name;return e?!r.has(e):(A("media-embed-no-provider-name",{provider:t}),!1)}));this.locale=t,this.providerDefinitions=i}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,n){return this._getMedia(e).getViewElement(t,n)}_getMedia(t){if(!t)return new KR(this.locale);t=t.trim();for(const e of this.providerDefinitions){const n=e.html,o=yr(e.url);for(const e of o){const o=this._getUrlMatches(t,e);if(o)return new KR(this.locale,t,o,n)}}return null}_getUrlMatches(t,e){let n=t.match(e);if(n)return n;let o=t.replace(/^https?:\/\//,"");return n=o.match(e),n||(o=o.replace(/^www\./,""),n=o.match(e),n||null)}}class KR{constructor(t,e,n,o){this.url=this._getValidUrl(e),this._locale=t,this._match=n,this._previewRenderer=o}getViewElement(t,e){const n={};let o;if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),e.renderForEditingView&&(n.class="ck-media__wrapper");const r=this._getPreviewHtml(e);o=t.createRawElement("div",n,((t,e)=>{e.setContentOf(t,r)}))}else this.url&&(n.url=this.url),o=t.createEmptyElement(e.elementName,n);return t.setCustomProperty("media-content",!0,o),o}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const t=new Mm,e=this._locale.t;t.content='',t.viewBox="0 0 64 42";return new $p({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":e("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:"https://"+t:null}}var YR=__webpack_require__(7048),JR={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(YR.A,JR);YR.A.locals;class $R extends ri{constructor(t){super(t),t.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:t=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>`
`},{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:t=>{const e=t[1],n=t[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:t=>`
`},{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 WR(t.locale,t.config.get("mediaEmbed"))}static get pluginName(){return"MediaEmbedEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion,r=t.config.get("mediaEmbed.previewsInData"),i=t.config.get("mediaEmbed.elementName"),s=this.registry;t.commands.add("mediaEmbed",new GR(t)),e.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),o.for("dataDowncast").elementToStructure({model:"media",view:(t,{writer:e})=>{const n=t.getAttribute("url");return UR(e,s,n,{elementName:i,renderMediaPreview:!!n&&r})}}),o.for("dataDowncast").add(FR(s,{elementName:i,renderMediaPreview:r})),o.for("editingDowncast").elementToStructure({model:"media",view:(t,{writer:e})=>{const o=t.getAttribute("url");return function(t,e,n){return e.setCustomProperty("media",!0,t),cy(t,e,{label:n})}(UR(e,s,o,{elementName:i,renderForEditingView:!0}),e,n("media widget"))}}),o.for("editingDowncast").add(FR(s,{elementName:i,renderForEditingView:!0})),o.for("upcast").elementToElement({view:t=>["oembed",i].includes(t.name)&&t.getAttribute("url")?{name:!0}:null,model:(t,{writer:e})=>{const n=t.getAttribute("url");return s.hasMedia(n)?e.createElement("media",{url:n}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(t,{writer:e})=>{const n=t.getAttribute("data-oembed-url");return s.hasMedia(n)?e.createElement("media",{url:n}):null}}).add((t=>{t.on("element:figure",((t,e,n)=>{if(!n.consumable.consume(e.viewItem,{name:!0,classes:"media"}))return;const{modelRange:o,modelCursor:r}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=o,e.modelCursor=r;Jr(o.getItems())||n.consumable.revert(e.viewItem,{name:!0,classes:"media"})}))}))}}const QR=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class ZR extends ri{constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}static get requires(){return[kv,v_,Lv]}static get pluginName(){return"AutoMediaEmbed"}init(){const t=this.editor,e=t.model.document,n=t.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",(()=>{const t=e.selection.getFirstRange(),n=du.fromPosition(t.start);n.stickiness="toPrevious";const o=du.fromPosition(t.end);o.stickiness="toNext",e.once("change:data",(()=>{this._embedMediaBetweenPositions(n,o),n.detach(),o.detach()}),{priority:"high"})}));t.commands.get("undo").on("execute",(()=>{this._timeoutId&&(No.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedMediaBetweenPositions(t,e){const n=this.editor,o=n.plugins.get($R).registry,r=new ul(t,e),i=r.getWalker({ignoreElementEnd:!0});let s="";for(const t of i)t.item.is("$textProxy")&&(s+=t.item.data);if(s=s.trim(),!s.match(QR))return void r.detach();if(!o.hasMedia(s))return void r.detach();n.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=du.fromPosition(t),this._timeoutId=No.window.setTimeout((()=>{n.model.change((t=>{this._timeoutId=null,t.remove(r),r.detach();let e=null;"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),qR(n.model,s,e,!1),this._positionToInsert.detach(),this._positionToInsert=null})),n.plugins.get(v_).requestUndoOnBackspace()}),100)):r.detach()}}var XR=__webpack_require__(5651),tL={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(XR.A,tL);XR.A.locals;class eL extends wm{constructor(t,e){super(e);const n=e.t;this.focusTracker=new $r,this.keystrokes=new Qr,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Ep.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Ep.cancel,"ck-button-cancel","cancel"),this._focusables=new Jp,this._focusCycler=new yg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=t,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(),Kp({view:this});[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(t){this.urlInputView.fieldView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,e=new cg(this.locale,df),n=e.fieldView;return this._urlInputViewInfoDefault=t("Paste the media URL in the input."),this._urlInputViewInfoTip=t("Tip: Paste the URL into the content to embed faster."),e.label=t("Media URL"),e.infoText=this._urlInputViewInfoDefault,n.on("input",(()=>{e.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()})),e}_createButton(t,e,n,o){const r=new Lm(this.locale);return r.set({label:t,icon:e,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate("execute").to(this,o),r}}class nL extends ri{static get requires(){return[$R]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor,e=t.commands.get("mediaEmbed");t.ui.componentFactory.add("mediaEmbed",(t=>{const n=nf(t);return this._setUpDropdown(n,e),n}))}_setUpDropdown(t,e){const n=this.editor,o=n.t,r=t.buttonView,i=n.plugins.get($R).registry;t.once("change:isOpen",(()=>{const o=new(Wp(eL))(function(t,e){return[e=>{if(!e.url.length)return t("The URL must not be empty.")},n=>{if(!e.hasMedia(n.url))return t("This media URL is not supported.")}]}(n.t,i),n.locale);t.panelView.children.add(o),r.on("open",(()=>{o.disableCssTransitions(),o.url=e.value||"",o.urlInputView.fieldView.select(),o.enableCssTransitions()}),{priority:"low"}),t.on("submit",(()=>{o.isValid()&&(n.execute("mediaEmbed",o.url),n.editing.view.focus())})),t.on("change:isOpen",(()=>o.resetFormStatus())),t.on("cancel",(()=>{n.editing.view.focus()})),o.delegate("submit","cancel").to(t),o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.on("change:errorText",(()=>{n.ui.update()})),o.urlInputView.bind("isEnabled").to(e,"isEnabled")})),t.bind("isEnabled").to(e),r.set({label:o("Insert media"),icon:'',tooltip:!0})}}var oL=__webpack_require__(70),rL={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(oL.A,rL);oL.A.locals;const iL={"(":")","[":"]","{":"}"};class sL extends si{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"mention")}execute(t){const e=this.editor.model,n=e.document.selection,o="string"==typeof t.mention?{id:t.mention}:t.mention,r=o.id,i=t.range||n.getFirstRange();if(!e.canEditAt(i))return;const s=t.text||r,a=cL({_text:s,id:r},o);if(1!=t.marker.length)throw new w("mentioncommand-incorrect-marker",this);if(r.charAt(0)!=t.marker)throw new w("mentioncommand-incorrect-id",this);e.change((t=>{const o=Zr(n.getAttributes()),r=new Map(o.entries());r.set("mention",a);const c=e.insertContent(t.createText(s,r),i),l=c.start.nodeBefore,d=c.end.nodeAfter,u=d&&d.is("$text")&&d.data.startsWith(" ");let h=!1;if(l&&d&&l.is("$text")&&d.is("$text")){const t=l.data.slice(-1),e=t in iL,n=e&&d.data.startsWith(iL[t]);h=e&&n}h||u||e.insertContent(t.createText(" ",o),i.start.getShiftedBy(s.length))}))}}class aL extends ri{static get pluginName(){return"MentionEditing"}init(){const t=this.editor,e=t.model,n=e.document;e.schema.extend("$text",{allowAttributes:"mention"}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",key:"data-mention",classes:"mention"},model:{key:"mention",value:t=>lL(t)}}),t.conversion.for("downcast").attributeToElement({model:"mention",view:uL}),t.conversion.for("downcast").add(dL),n.registerPostFixer((t=>function(t,e,n){const o=e.differ.getChanges();let r=!1;for(const e of o){if("attribute"==e.type)continue;const o=e.position;if("$text"==e.name){const e=o.textNode&&o.textNode.nextSibling;r=pL(o.textNode,t)||r,r=pL(e,t)||r,r=pL(o.nodeBefore,t)||r,r=pL(o.nodeAfter,t)||r}if("$text"!=e.name&&"insert"==e.type){const e=o.nodeAfter;for(const n of t.createRangeIn(e).getItems())r=pL(n,t)||r}if("insert"==e.type&&n.isInline(e.name)){const e=o.nodeAfter&&o.nodeAfter.nextSibling;r=pL(o.nodeBefore,t)||r,r=pL(e,t)||r}}return r}(t,n,e.schema))),n.registerPostFixer((t=>function(t,e){const n=e.differ.getChanges();let o=!1;for(const e of n)if("attribute"===e.type&&"mention"!=e.attributeKey){const n=e.range.start.nodeBefore,r=e.range.end.nodeAfter;for(const i of[n,r])hL(i)&&i.getAttribute(e.attributeKey)!=e.attributeNewValue&&(t.setAttribute(e.attributeKey,e.attributeNewValue,i),o=!0)}return o}(t,n))),n.registerPostFixer((t=>function(t,e){const n=e.selection,o=n.focus;if(n.isCollapsed&&n.hasAttribute("mention")&&function(t){const e=t.isAtStart;return t.nodeBefore&&t.nodeBefore.is("$text")||e}(o))return t.removeSelectionAttribute("mention"),!0;return!1}(t,n))),t.commands.add("mention",new sL(t))}}function cL(t,e){return Object.assign({uid:g()},t,e||{})}function lL(t,e){const n=t.getAttribute("data-mention"),o=t.getChild(0);if(!o)return;return cL({id:n,_text:o.data},e)}function dL(t){t.on("attribute:mention",((t,e,n)=>{const o=e.attributeNewValue;if(!e.item.is("$textProxy")||!o)return;const r=e.range.start;(r.textNode||r.nodeAfter).data!=o._text&&n.consumable.consume(e.item,t.name)}),{priority:"highest"})}function uL(t,{writer:e}){if(!t)return;const n={class:"mention","data-mention":t.id},o={id:t.uid,priority:20};return e.createAttributeElement("span",n,o)}function hL(t){if(!t||!t.is("$text")&&!t.is("$textProxy")||!t.hasAttribute("mention"))return!1;return t.data!=t.getAttribute("mention")._text}function pL(t,e){return!!hL(t)&&(e.removeAttribute("mention",t),!0)}var mL=__webpack_require__(9055),gL={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(mL.A,gL);mL.A.locals;class fL extends Yg{constructor(t){super(t),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const t=this.selected,e=this.items.getIndex(t);this.select(e+1)}selectPrevious(){const t=this.selected,e=this.items.getIndex(t);this.select(e-1)}select(t){let e=0;t>0&&t{n?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))})),this.listenTo(this.domElement,"click",(()=>{this.fire("execute")}))}render(){super.render(),this.element=this.domElement}focus(){this.domElement.focus()}}class kL extends Hg{highlight(){this.children.first.isOn=!0}removeHighlight(){this.children.first.isOn=!1}}var wL=Object.defineProperty,AL=Object.defineProperties,CL=Object.getOwnPropertyDescriptors,_L=Object.getOwnPropertySymbols,yL=Object.prototype.hasOwnProperty,vL=Object.prototype.propertyIsEnumerable,IL=(t,e,n)=>e in t?wL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;const EL=[br.arrowup,br.arrowdown,br.esc],xL=[br.enter,br.tab];class TL extends ri{constructor(t){super(t),this._items=new Yr,this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=Ka(this._requestFeed,100),t.config.define("mention",{feeds:[]})}static get pluginName(){return"MentionUI"}static get requires(){return[Ok]}init(){const t=this.editor,e=t.config.get("mention.commitKeys")||xL,n=EL.concat(e);this._balloon=t.plugins.get(Ok),t.editing.view.document.on("keydown",((t,o)=>{var r;r=o.keyCode,n.includes(r)&&this._isUIVisible&&(o.preventDefault(),t.stop(),o.keyCode==br.arrowdown&&this._mentionsView.selectNext(),o.keyCode==br.arrowup&&this._mentionsView.selectPrevious(),e.includes(o.keyCode)&&this._mentionsView.executeSelected(),o.keyCode==br.esc&&this._hideUIAndRemoveMarker())}),{priority:"highest"}),Gp({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const o=t.config.get("mention.feeds");for(const t of o){const{feed:e,marker:n,dropdownLimit:o}=t;if(!ML(n))throw new w("mentionconfig-incorrect-marker",null,{marker:n});const r={marker:n,feedCallback:"function"==typeof e?e.bind(this.editor):BL(e),itemRenderer:t.itemRenderer,dropdownLimit:o};this._mentionsConfigurations.set(n,r)}this._setupTextWatcher(o),this.listenTo(t,"change:isReadOnly",(()=>{this._hideUIAndRemoveMarker()})),this.on("requestFeed:response",((t,e)=>this._handleFeedResponse(e))),this.on("requestFeed:error",(()=>this._hideUIAndRemoveMarker()))}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const t=this.editor.locale,e=new fL(t);return e.items.bindTo(this._items).using((n=>{const{item:o,marker:r}=n,{dropdownLimit:i}=this._mentionsConfigurations.get(r),s=i||this.editor.config.get("mention.dropdownLimit")||10;if(e.items.length>=s)return null;const a=new kL(t),c=this._renderItem(o,r);return c.delegate("execute").to(a),a.children.add(c),a.item=o,a.marker=r,a.on("execute",(()=>{e.fire("execute",{item:o,marker:r})})),a})),e.on("execute",((t,e)=>{const n=this.editor,o=n.model,r=e.item,i=e.marker,s=n.model.markers.get("mention"),a=o.createPositionAt(o.document.selection.focus),c=o.createPositionAt(s.getStart()),l=o.createRange(c,a);this._hideUIAndRemoveMarker(),n.execute("mention",{mention:r,text:r.text,marker:i,range:l}),n.editing.view.focus()})),e}_getItemRenderer(t){const{itemRenderer:e}=this._mentionsConfigurations.get(t);return e}_requestFeed(t,e){this._lastRequested=e;const{feedCallback:n}=this._mentionsConfigurations.get(t),o=n(e);o instanceof Promise?o.then((n=>{this._lastRequested==e?this.fire("requestFeed:response",{feed:n,marker:t,feedText:e}):this.fire("requestFeed:discarded",{feed:n,marker:t,feedText:e})})).catch((e=>{this.fire("requestFeed:error",{error:e}),A("mention-feed-callback-error",{marker:t})})):this.fire("requestFeed:response",{feed:o,marker:t,feedText:e})}_setupTextWatcher(t){const e=this.editor,n=t.map((t=>((t,e)=>AL(t,CL(e)))(((t,e)=>{for(var n in e||(e={}))yL.call(e,n)&&IL(t,n,e[n]);if(_L)for(var n of _L(e))vL.call(e,n)&&IL(t,n,e[n]);return t})({},t),{pattern:OL(t.marker,t.minimumCharacters||0)}))),o=new x_(e.model,function(t){const e=e=>{const n=SL(t,e);if(!n)return!1;let o=0;0!==n.position&&(o=n.position-1);const r=e.substring(o);return n.pattern.test(r)};return e}(n));o.on("matched",((t,o)=>{const r=SL(n,o.text),i=e.model.document.selection.focus,s=e.model.createPositionAt(i.parent,r.position);if(function(t){const e=t.textNode&&t.textNode.hasAttribute("mention"),n=t.nodeBefore;return e||n&&n.is("$text")&&n.hasAttribute("mention")}(i)||function(t){const e=t.nodeAfter;return e&&e.is("$text")&&e.hasAttribute("mention")}(s))return void this._hideUIAndRemoveMarker();const a=function(t,e){let n=0;0!==t.position&&(n=t.position-1);const o=OL(t.marker,0),r=e.substring(n);return r.match(o)[2]}(r,o.text),c=r.marker.length+a.length,l=i.getShiftedBy(-c),d=i.getShiftedBy(-a.length),u=e.model.createRange(l,d);if(NL(e)){const t=e.model.markers.get("mention");e.model.change((e=>{e.updateMarker(t,{range:u})}))}else e.model.change((t=>{t.addMarker("mention",{range:u,usingOperation:!1,affectsData:!1})}));this._requestFeedDebounced(r.marker,a)})),o.on("unmatched",(()=>{this._hideUIAndRemoveMarker()}));const r=e.commands.get("mention");return o.bind("isEnabled").to(r),o}_handleFeedResponse(t){const{feed:e,marker:n}=t;if(!NL(this.editor))return;this._items.clear();for(const t of e){const e="object"!=typeof t?{id:t,text:t}:t;this._items.add({item:e,marker:n})}const o=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(o):this._hideUIAndRemoveMarker()}_showOrUpdateUI(t){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(t,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(t,this._mentionsView.position),singleViewMode:!0}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),NL(this.editor)&&this.editor.model.change((t=>t.removeMarker("mention"))),this._mentionsView.position=void 0}_renderItem(t,e){const n=this.editor;let o,r=t.id;const i=this._getItemRenderer(e);if(i){const e=i(t);"string"!=typeof e?o=new bL(n.locale,e):r=e}if(!o){const t=new Lm(n.locale);t.label=r,t.withText=!0,o=t}return o}_getBalloonPanelPositionData(t,e){const n=this.editor,o=n.editing,r=o.view.domConverter,i=o.mapper;return{target:()=>{let e=t.getRange();"$graveyard"==e.start.root.rootName&&(e=n.model.document.selection.getFirstRange());const o=i.toViewRange(e);return zo.getDomRangeRects(r.viewRangeToDom(o)).pop()},limiter:()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},positions:DL(e,n.locale.uiLanguageDirection)}}}function DL(t,e){const n={caret_se:t=>({top:t.bottom+3,left:t.right,name:"caret_se",config:{withArrow:!1}}),caret_ne:(t,e)=>({top:t.top-e.height-3,left:t.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(t,e)=>({top:t.bottom+3,left:t.right-e.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(t,e)=>({top:t.top-e.height-3,left:t.right-e.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(n,t)?[n[t]]:"rtl"!==e?[n.caret_se,n.caret_sw,n.caret_ne,n.caret_nw]:[n.caret_sw,n.caret_se,n.caret_nw,n.caret_ne]}function SL(t,e){let n;for(const o of t){const t=e.lastIndexOf(o.marker);t>0&&!e.substring(t-1).match(o.pattern)||(!n||t>=n.position)&&(n={marker:o.marker,position:t,minimumCharacters:o.minimumCharacters,pattern:o.pattern})}return n}function OL(t,e){const n=0==e?"*":`{${e},}`,o=s.features.isRegExpUnicodePropertySupported?"\\p{Ps}\\p{Pi}\"'":"\\(\\[{\"'";return new RegExp(`(?:^|[ ${o}])([${t}])(.${n})$`,"u")}function BL(t){return e=>t.filter((t=>("string"==typeof t?t:String(t.id)).toLowerCase().includes(e.toLowerCase())))}function ML(t){return t&&1==t.length}function NL(t){return t.model.markers.has("mention")}var PL=__webpack_require__(9409),RL={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(PL.A,RL);PL.A.locals;class LL extends si{refresh(){const t=this.editor.model,e=t.schema,n=t.document.selection;this.isEnabled=function(t,e,n){const o=function(t,e){const n=py(t,e),o=n.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(t,n);return e.checkChild(o,"pageBreak")}(n,e,t)}execute(){const t=this.editor.model;t.change((e=>{const n=e.createElement("pageBreak");t.insertObject(n,null,null,{setSelection:"after"})}))}}var jL=__webpack_require__(6426),VL={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};bi()(jL.A,VL);jL.A.locals;class zL extends ri{static get pluginName(){return"PageBreakEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion;e.register("pageBreak",{inheritAllFrom:"$blockObject"}),o.for("dataDowncast").elementToStructure({model:"pageBreak",view:(t,{writer:e})=>e.createContainerElement("div",{class:"page-break",style:"page-break-after: always"},e.createContainerElement("span",{style:"display: none"}))}),o.for("editingDowncast").elementToStructure({model:"pageBreak",view:(t,{writer:e})=>{const o=n("Page break"),r=e.createContainerElement("div"),i=e.createRawElement("span",{class:"page-break__label"},(function(t){t.innerText=n("Page break")}));return e.addClass("page-break",r),e.insert(e.createPositionAt(r,0),i),function(t,e,n){return e.setCustomProperty("pageBreak",!0,t),cy(t,e,{label:n})}(r,e,o)}}),o.for("upcast").elementToElement({view:t=>{const e="always"==t.getStyle("page-break-before"),n="always"==t.getStyle("page-break-after");if(!e&&!n)return null;if(1==t.childCount){const e=t.getChild(0);if(!e.is("element","span")||"none"!=e.getStyle("display"))return null}else if(t.childCount>1)return null;return{name:!0}},model:"pageBreak",converterPriority:"high"}),t.commands.add("pageBreak",new LL(t))}}class FL extends ri{static get pluginName(){return"PageBreakUI"}init(){const t=this.editor;t.ui.componentFactory.add("pageBreak",(()=>{const t=this._createButton(Lm);return t.set({tooltip:!0}),t})),t.ui.componentFactory.add("menuBar:pageBreak",(()=>this._createButton(Ew)))}_createButton(t){const e=this.editor,n=e.locale,o=e.commands.get("pageBreak"),r=new t(e.locale),i=n.t;return r.set({label:i("Page break"),icon:''}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("pageBreak"),e.editing.view.focus()})),r}}function UL(t){return void 0!==t&&t.endsWith("px")}function HL(t){return t.toFixed(2).replace(/\.?0+$/,"")+"px"}var qL=Object.defineProperty,GL=Object.defineProperties,WL=Object.getOwnPropertyDescriptors,KL=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,JL=Object.prototype.propertyIsEnumerable,$L=(t,e,n)=>e in t?qL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QL=(t,e)=>{for(var n in e||(e={}))YL.call(e,n)&&$L(t,n,e[n]);if(KL)for(var n of KL(e))JL.call(e,n)&&$L(t,n,e[n]);return t},ZL=(t,e)=>GL(t,WL(e));function XL(t,e,n){if(!t.childCount)return;const o=new _h(t.document),r=function(t,e){const n=e.createRangeIn(t),o=[],r=new Set;for(const t of n.getItems()){if(!t.is("element")||!t.name.match(/^(p|h\d+|li|div)$/))continue;let e=aj(t);if(void 0===e||0!=parseFloat(e)||Array.from(t.getClassNames()).find((t=>t.startsWith("MsoList")))||(e=void 0),t.hasStyle("mso-list")||void 0!==e&&r.has(e)){const n=ij(t);o.push({element:t,id:n.id,order:n.order,indent:n.indent,marginLeft:e}),void 0!==e&&r.add(e)}else r.clear()}return o}(t,o);if(!r.length)return;const i={},s=[];for(const t of r)if(void 0!==t.indent){tj(t)||(s.length=0);const r=`${t.id}:${t.indent}`,a=Math.min(t.indent-1,s.length);if(as.length-1||s[a].listElement.name!=c.type){0==a&&"ol"==c.type&&void 0!==t.id&&i[r]&&(c.startIndex=i[r]);const e=rj(c,o,n);if(UL(t.marginLeft)&&(0==a||UL(s[a-1].marginLeft))){let n=t.marginLeft;a>0&&(n=HL(parseFloat(n)-parseFloat(s[a-1].marginLeft))),o.setStyle("padding-left",n,e)}if(0==s.length){const n=t.element.parent,r=n.getChildIndex(t.element)+1;o.insertChild(r,e,n)}else{const t=s[a-1].listItemElements;o.appendChild(e,t[t.length-1])}s[a]=ZL(QL({},t),{listElement:e,listItemElements:[]}),0==a&&void 0!==t.id&&(i[r]=c.startIndex||1)}}const c="li"==t.element.name?t.element:o.createElement("li");o.appendChild(c,s[a].listElement),s[a].listItemElements.push(c),0==a&&void 0!==t.id&&i[r]++,t.element!=c&&o.appendChild(t.element,c),sj(t.element,o),o.removeStyle("text-indent",t.element),o.removeStyle("margin-left",t.element)}else{const e=s.find((e=>e.marginLeft==t.marginLeft));if(e){const n=e.listItemElements;o.appendChild(t.element,n[n.length-1]),o.removeStyle("margin-left",t.element)}else s.length=0}}function tj(t){const e=t.element.previousSibling;return ej(e||t.element.parent)}function ej(t){return t.is("element","ol")||t.is("element","ul")}function nj(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),o=/mso-level-number-format:([^;]{0,100});/gi,r=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,i=new RegExp(`@list\\s+l${t.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),s=new RegExp(`@list l${t.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),a=i.exec(e),c=s.exec(e),l=a&&!c,d=n.exec(e);let u="decimal",h="ol",p=null;if(d&&d[1]){const e=o.exec(d[1]);if(e&&e[1]&&(u=e[1].trim(),h="bullet"!==u&&"image"!==u?"ol":"ul"),"bullet"===u){const e=function(t){if("li"==t.name&&"ul"==t.parent.name&&t.parent.hasAttribute("type"))return t.parent.getAttribute("type");const e=function(t){if(t.getChild(0).is("$text"))return null;for(const e of t.getChildren()){if(!e.is("element","span"))continue;const t=e.getChild(0);if(t)return t.is("$text")?t:t.getChild(0)}return null}(t);if(!e)return null;const n=e._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(t.element);e&&(u=e)}else{const t=r.exec(d[1]);t&&t[1]&&(p=parseInt(t[1]))}l&&(h="ol")}return{type:h,startIndex:p,style:oj(u),isLegalStyleList:l}}function oj(t){if(t.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(t){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 t;default:return null}}function rj(t,e,n){const o=e.createElement(t.type);return t.style&&e.setStyle("list-style-type",t.style,o),t.startIndex&&t.startIndex>1&&e.setAttribute("start",t.startIndex,o),t.isLegalStyleList&&n&&e.addClass("legal-list",o),o}function ij(t){const e=t.getStyle("mso-list");if(void 0===e)return{};const n=e.match(/(^|\s{1,100})l(\d+)/i),o=e.match(/\s{0,100}lfo(\d+)/i),r=e.match(/\s{0,100}level(\d+)/i);return n&&o&&r?{id:n[2],order:o[1],indent:parseInt(r[1])}:{indent:1}}function sj(t,e){const n=new Ni({name:"span",styles:{"mso-list":"Ignore"}}),o=e.createRangeIn(t);for(const t of o)"elementStart"===t.type&&n.match(t.item)&&e.remove(t.item)}function aj(t){const e=t.getStyle("margin-left");return void 0===e||e.endsWith("px")?e:function(t){const e=parseFloat(t);return t.endsWith("pt")?HL(96*e/72):t.endsWith("pc")?HL(12*e*96/72):t.endsWith("in")?HL(96*e):t.endsWith("cm")?HL(96*e/2.54):t.endsWith("mm")?HL(e/10*96/2.54):t}(e)}function cj(t,e){if(!t.childCount)return;const n=new _h(t.document),o=function(t,e){const n=e.createRangeIn(t),o=new Ni({name:/v:(.+)/}),r=[];for(const t of n){if("elementStart"!=t.type)continue;const e=t.item,n=e.previousSibling,i=n&&n.is("element")?n.name:null,s=["Chart"],a=o.match(e),c=e.getAttribute("o:gfxdata"),l="v:shapetype"===i,d=c&&s.some((t=>e.getAttribute("id").includes(t)));a&&c&&!l&&!d&&r.push(t.item.getAttribute("id"))}return r}(t,n);!function(t,e,n){const o=n.createRangeIn(e),r=new Ni({name:"img"}),i=[];for(const e of o)if(e.item.is("element")&&r.match(e.item)){const n=e.item,o=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];o.length&&o.every((e=>t.indexOf(e)>-1))?i.push(n):n.getAttribute("src")||i.push(n)}for(const t of i)n.remove(t)}(o,t,n),function(t,e,n){const o=n.createRangeIn(e),r=[];for(const e of o)if("elementStart"==e.type&&e.item.is("element","v:shape")){const n=e.item.getAttribute("id");if(t.includes(n))continue;i(e.item.parent.getChildren(),n)||r.push(e.item)}for(const t of r){const e={src:s(t)};t.hasAttribute("alt")&&(e.alt=t.getAttribute("alt"));const o=n.createElement("img",e);n.insertChild(t.index+1,o,t.parent)}function i(t,e){for(const n of t)if(n.is("element")){if("img"==n.name&&n.getAttribute("v:shapes")==e)return!0;if(i(n.getChildren(),e))return!0}return!1}function s(t){for(const e of t.getChildren())if(e.is("element")&&e.getAttribute("src"))return e.getAttribute("src")}}(o,t,n),function(t,e){const n=e.createRangeIn(t),o=new Ni({name:/v:(.+)/}),r=[];for(const t of n)"elementStart"==t.type&&o.match(t.item)&&r.push(t.item);for(const t of r)e.remove(t)}(t,n);const r=function(t,e){const n=e.createRangeIn(t),o=new Ni({name:"img"}),r=[];for(const t of n)t.item.is("element")&&o.match(t.item)&&t.item.getAttribute("src").startsWith("file://")&&r.push(t.item);return r}(t,n);r.length&&function(t,e,n){if(t.length===e.length)for(let o=0;oString.fromCharCode(parseInt(t,16)))).join(""))}const dj=//i,uj=/xmlns:o="urn:schemas-microsoft-com/i;class hj{constructor(t,e=!1){this.document=t,this.hasMultiLevelListPlugin=e}isActive(t){return dj.test(t)||uj.test(t)}execute(t){const{body:e,stylesString:n}=t._parsedData;XL(e,n,this.hasMultiLevelListPlugin),cj(e,t.dataTransfer.getData("text/rtf")),function(t){const e=[],n=new _h(t.document);for(const{item:o}of n.createRangeIn(t))if(o.is("element")){for(const t of o.getClassNames())/\bmso/gi.exec(t)&&n.removeClass(t,o);for(const t of o.getStyleNames())/\bmso/gi.exec(t)&&n.removeStyle(t,o);(o.is("element","w:sdt")||o.is("element","w:sdtpr")&&o.isEmpty||o.is("element","o:p")&&o.isEmpty)&&e.push(o)}for(const t of e){const e=t.parent,o=e.getChildIndex(t);n.insertChild(o,t.getChildren(),e),n.remove(t)}}(e),t.content=e}}function pj(t,e,n,{blockElements:o,inlineObjectElements:r}){let i=n.createPositionAt(t,"forward"==e?"after":"before");return i=i.getLastMatchingPosition((({item:t})=>t.is("element")&&!o.includes(t.name)&&!r.includes(t.name)),{direction:e}),"forward"==e?i.nodeAfter:i.nodeBefore}function mj(t,e){return!!t&&t.is("element")&&e.includes(t.name)}const gj=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class fj{constructor(t){this.document=t}isActive(t){return gj.test(t)}execute(t){const e=new _h(this.document),{body:n}=t._parsedData;!function(t,e){for(const n of t.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const o=t.getChildIndex(n);e.remove(n),e.insertChild(o,n.getChildren(),t)}}(n,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","li")){const n=t.getChild(0);n&&n.is("element","p")&&e.unwrapElement(n)}}}(n,e),function(t,e){const n=new Ns(e.document.stylesProcessor),o=new Ia(n,{renderingMode:"data"}),r=o.blockElements,i=o.inlineObjectElements,s=[];for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","br")){const n=pj(t,"forward",e,{blockElements:r,inlineObjectElements:i}),o=pj(t,"backward",e,{blockElements:r,inlineObjectElements:i}),a=mj(n,r);(mj(o,r)||a)&&s.push(t)}}for(const t of s)t.hasClass("Apple-interchange-newline")?e.remove(t):e.replace(t,e.createElement("p"))}(n,e),t.content=n}}const bj=/(\s+)<\/span>/g,((t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length)))}function Aj(t,e){const n=new DOMParser,o=function(t){return wj(wj(t)).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(t){const e="",n="",o=t.indexOf(e);if(o<0)return t;const r=t.indexOf(n,o+e.length);return t.substring(0,o+e.length)+(r>=0?t.substring(r):"")}(t=(t=t.replace(/

abc

\n\t\t\t//\n\t\t\tif ( isAttribute && this._wrapAttributeElement( wrapElement, child ) ) {\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// Wrap the child if it is not an attribute element or if it is an attribute element that should be inside\n\t\t\t// `wrapElement` (due to priority).\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//

abc

-->

abc

\n\t\t\telse if ( isText || !isAttribute || shouldABeOutsideB( wrapElement, child ) ) {\n\t\t\t\t// Clone attribute.\n\t\t\t\tconst newAttribute = wrapElement._clone();\n\n\t\t\t\t// Wrap current node with new attribute.\n\t\t\t\tchild._remove();\n\t\t\t\tnewAttribute._appendChild( child );\n\n\t\t\t\tparent._insertChild( i, newAttribute );\n\t\t\t\tthis._addToClonedElementsGroup( newAttribute );\n\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// If other nested attribute is found and it wasn't wrapped (see above), continue wrapping inside it.\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//\n\t\t\telse /* if ( isAttribute ) */ {\n\t\t\t\tthis._wrapChildren( child, 0, child.childCount, wrapElement );\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each wrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of wrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be unwrapped.\n\t */\n\tprivate _unwrapChildren( parent: Element, startOffset: number, endOffset: number, unwrapElement: AttributeElement ) {\n\t\tlet i = startOffset;\n\t\tconst unwrapPositions: Array = [];\n\n\t\t// Iterate over each element between provided offsets inside parent.\n\t\t// We don't use tree walker or range iterator because we will be removing and merging potentially multiple nodes,\n\t\t// so it could get messy. It is safer to it manually in this case.\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i )!;\n\n\t\t\t// Skip all text nodes. There should be no container element's here either.\n\t\t\tif ( !child.is( 'attributeElement' ) ) {\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `unwrapElement` is `` element.)\n\t\t\t//\n\t\t\t// If the child is similar to the given attribute element, unwrap it - it will be completely removed.\n\t\t\t//\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//\n\t\t\tif ( child.isSimilar( unwrapElement ) ) {\n\t\t\t\tconst unwrapped = child.getChildren();\n\t\t\t\tconst count = child.childCount;\n\n\t\t\t\t// Replace wrapper element with its children\n\t\t\t\tchild._remove();\n\t\t\t\tparent._insertChild( i, unwrapped );\n\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\n\t\t\t\t// Save start and end position of moved items.\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + count )\n\t\t\t\t);\n\n\t\t\t\t// Skip elements that were unwrapped. Assuming there won't be another element to unwrap in child elements.\n\t\t\t\ti += count;\n\t\t\t\tendOffset += count - 1;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If the child is not similar but is an attribute element, try partial unwrapping - remove the same attributes/styles/classes.\n\t\t\t// Partial unwrapping will happen only if the elements have the same name.\n\t\t\t//\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//\n\t\t\tif ( this._unwrapAttributeElement( unwrapElement, child ) ) {\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + 1 )\n\t\t\t\t);\n\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If other nested attribute is found, look through it's children for elements to unwrap.\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//\n\t\t\tthis._unwrapChildren( child, 0, child.childCount, unwrapElement );\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each unwrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of unwrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset || position.offset == endOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @returns New range after wrapping, spanning over wrapping attribute element.\n\t */\n\tprivate _wrapRange( range: Range, attribute: AttributeElement ): Range {\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent as Element;\n\n\t\t// Wrap all children with attribute.\n\t\tconst newRange = this._wrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @returns New position after wrapping.\n\t */\n\tprivate _wrapPosition( position: Position, attribute: AttributeElement ): Position {\n\t\t// Return same position when trying to wrap with attribute similar to position parent.\n\t\tif ( attribute.isSimilar( position.parent as any ) ) {\n\t\t\treturn movePositionToTextNode( position.clone() );\n\t\t}\n\n\t\t// When position is inside text node - break it and place new position between two text nodes.\n\t\tif ( position.parent.is( '$text' ) ) {\n\t\t\tposition = breakTextNode( position );\n\t\t}\n\n\t\t// Create fake element that will represent position, and will not be merged with other attributes.\n\t\tconst fakeElement = this.createAttributeElement( '_wrapPosition-fake-element' );\n\t\t( fakeElement as any )._priority = Number.POSITIVE_INFINITY;\n\t\tfakeElement.isSimilar = () => false;\n\n\t\t// Insert fake element in position location.\n\t\t( position.parent as Element )._insertChild( position.offset, fakeElement );\n\n\t\t// Range around inserted fake attribute element.\n\t\tconst wrapRange = new Range( position, position.getShiftedBy( 1 ) );\n\n\t\t// Wrap fake element with attribute (it will also merge if possible).\n\t\tthis.wrap( wrapRange, attribute );\n\n\t\t// Remove fake element and place new position there.\n\t\tconst newPosition = new Position( fakeElement.parent!, fakeElement.index! );\n\t\tfakeElement._remove();\n\n\t\t// If position is placed between text nodes - merge them and return position inside.\n\t\tconst nodeBefore = newPosition.nodeBefore;\n\t\tconst nodeAfter = newPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof Text && nodeAfter instanceof Text ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\n\t\t// If position is next to text node - move position inside.\n\t\treturn movePositionToTextNode( newPosition );\n\t}\n\n\t/**\n\t * Wraps one {@link module:engine/view/attributeelement~AttributeElement AttributeElement} into another by\n\t * merging them if possible. When merging is possible - all attributes, styles and classes are moved from wrapper\n\t * element to element being wrapped.\n\t *\n\t * @param wrapper Wrapper AttributeElement.\n\t * @param toWrap AttributeElement to wrap using wrapper element.\n\t * @returns Returns `true` if elements are merged.\n\t */\n\tprivate _wrapAttributeElement( wrapper: AttributeElement, toWrap: AttributeElement ): boolean {\n\t\tif ( !canBeJoined( wrapper, toWrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't merge if name or priority differs.\n\t\tif ( wrapper.name !== toWrap.name || wrapper.priority !== toWrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes can be merged.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are different we cannot wrap.\n\t\t\tif ( toWrap.hasAttribute( key ) && toWrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if styles can be merged.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( toWrap.hasStyle( key ) && toWrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Move all attributes/classes/styles from wrapper to wrapped AttributeElement.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Move only these attributes that are not present - other are similar.\n\t\t\tif ( !toWrap.hasAttribute( key ) ) {\n\t\t\t\tthis.setAttribute( key, wrapper.getAttribute( key )!, toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( !toWrap.hasStyle( key ) ) {\n\t\t\t\tthis.setStyle( key, wrapper.getStyle( key )!, toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getClassNames() ) {\n\t\t\tif ( !toWrap.hasClass( key ) ) {\n\t\t\t\tthis.addClass( key, toWrap );\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Unwraps {@link module:engine/view/attributeelement~AttributeElement AttributeElement} from another by removing\n\t * corresponding attributes, classes and styles. All attributes, classes and styles from wrapper should be present\n\t * inside element being unwrapped.\n\t *\n\t * @param wrapper Wrapper AttributeElement.\n\t * @param toUnwrap AttributeElement to unwrap using wrapper element.\n\t * @returns Returns `true` if elements are unwrapped.\n\t **/\n\tprivate _unwrapAttributeElement( wrapper: AttributeElement, toUnwrap: AttributeElement ): boolean {\n\t\tif ( !canBeJoined( wrapper, toUnwrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't unwrap if name or priority differs.\n\t\tif ( wrapper.name !== toUnwrap.name || wrapper.priority !== toUnwrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper attributes.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasAttribute( key ) || toUnwrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper classes.\n\t\tif ( !toUnwrap.hasClass( ...wrapper.getClassNames() ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper styles.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\t// If some styles are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasStyle( key ) || toUnwrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Remove all wrapper's attributes from unwrapped element.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.removeAttribute( key, toUnwrap );\n\t\t}\n\n\t\t// Remove all wrapper's classes from unwrapped element.\n\t\tthis.removeClass( Array.from( wrapper.getClassNames() ), toUnwrap );\n\n\t\t// Remove all wrapper's styles from unwrapped element.\n\t\tthis.removeStyle( Array.from( wrapper.getStyleNames() ), toUnwrap );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t *\n\t * @param range Range which `start` and `end` positions will be used to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New range with located at break positions.\n\t */\n\tprivate _breakAttributesRange( range: Range, forceSplitText: boolean = false ) {\n\t\tconst rangeStart = range.start;\n\t\tconst rangeEnd = range.end;\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Break at the collapsed position. Return new collapsed range.\n\t\tif ( range.isCollapsed ) {\n\t\t\tconst position = this._breakAttributes( range.start, forceSplitText );\n\n\t\t\treturn new Range( position, position );\n\t\t}\n\n\t\tconst breakEnd = this._breakAttributes( rangeEnd, forceSplitText );\n\t\tconst count = ( breakEnd.parent as Element ).childCount;\n\t\tconst breakStart = this._breakAttributes( rangeStart, forceSplitText );\n\n\t\t// Calculate new break end offset.\n\t\tbreakEnd.offset += ( breakEnd.parent as Element ).childCount - count;\n\n\t\treturn new Range( breakStart, breakEnd );\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at given position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t * is placed inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t * is placed inside {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @param position Position where to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New position after breaking the attributes.\n\t */\n\tprivate _breakAttributes( position: Position, forceSplitText: boolean = false ): Position {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// If position is placed inside EmptyElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'emptyElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break an `EmptyElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-empty-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-empty-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside UIElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'uiElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `UIElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-ui-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-ui-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside RawElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'rawElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `RawElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-raw-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-raw-element', this.document );\n\t\t}\n\n\t\t// There are no attributes to break and text nodes breaking is not forced.\n\t\tif ( !forceSplitText && positionParent.is( '$text' ) && isContainerOrFragment( positionParent.parent! ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Position's parent is container, so no attributes to break.\n\t\tif ( isContainerOrFragment( positionParent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Break text and start again in new position.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn this._breakAttributes( breakTextNode( position ), forceSplitText );\n\t\t}\n\n\t\tconst length = ( positionParent as any ).childCount;\n\n\t\t//

foobar{}

\n\t\t//

foobar[]

\n\t\t//

foobar[]

\n\t\tif ( positionOffset == length ) {\n\t\t\tconst newPosition = new Position( positionParent.parent as any, ( positionParent as any ).index + 1 );\n\n\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t} else {\n\t\t\t//

foo{}bar

\n\t\t\t//

foo[]bar

\n\t\t\t//

foo{}bar

\n\t\t\tif ( positionOffset === 0 ) {\n\t\t\t\tconst newPosition = new Position( positionParent.parent as Element, ( positionParent as any ).index );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t\t//

foob{}ar

\n\t\t\t//

foob[]ar

\n\t\t\t//

foob[]ar

\n\t\t\t//

foob[]ar

\n\t\t\telse {\n\t\t\t\tconst offsetAfter = ( positionParent as any ).index + 1;\n\n\t\t\t\t// Break element.\n\t\t\t\tconst clonedNode = ( positionParent as any )._clone();\n\n\t\t\t\t// Insert cloned node to position's parent node.\n\t\t\t\t( positionParent.parent as any )._insertChild( offsetAfter, clonedNode );\n\t\t\t\tthis._addToClonedElementsGroup( clonedNode );\n\n\t\t\t\t// Get nodes to move.\n\t\t\t\tconst count = ( positionParent as any ).childCount - positionOffset;\n\t\t\t\tconst nodesToMove = ( positionParent as any )._removeChildren( positionOffset, count );\n\n\t\t\t\t// Move nodes to cloned node.\n\t\t\t\tclonedNode._appendChild( nodesToMove );\n\n\t\t\t\t// Create new position to work on.\n\t\t\t\tconst newPosition = new Position( ( positionParent as any ).parent, offsetAfter );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information that an {@link module:engine/view/attributeelement~AttributeElement attribute element} was\n\t * added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t * from the group now keep a reference to the given attribute element.\n\t *\n\t * The clones group can be obtained using {@link module:engine/view/attributeelement~AttributeElement#getElementsWithSameId}.\n\t *\n\t * Does nothing if added element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @param element Attribute element to save.\n\t */\n\tprivate _addToClonedElementsGroup( element: Node ): void {\n\t\t// Add only if the element is in document tree.\n\t\tif ( !element.root.is( 'rootElement' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Traverse the element's children recursively to find other attribute elements that also might got inserted.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._addToClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = ( element as any ).id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\tgroup = new Set();\n\t\t\tthis._cloneGroups.set( id, group );\n\t\t}\n\n\t\tgroup.add( element as AttributeElement );\n\t\t( element as any )._clonesGroup = group;\n\t}\n\n\t/**\n\t * Removes all the information about the given {@link module:engine/view/attributeelement~AttributeElement attribute element}\n\t * from its clones group.\n\t *\n\t * Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t * This allows to reference the whole group even if the element was already removed from the tree.\n\t *\n\t * Does nothing if the element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @param element Attribute element to remove.\n\t */\n\tprivate _removeFromClonedElementsGroup( element: Node ) {\n\t\t// Traverse the element's children recursively to find other attribute elements that also got removed.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = ( element as any ).id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgroup.delete( element as AttributeElement );\n\t\t// Not removing group from element on purpose!\n\t\t// If other parts of code have reference to this element, they will be able to get references to other elements from the group.\n\t}\n}\n\n// Helper function for `view.writer.wrap`. Checks if given element has any children that are not ui elements.\nfunction _hasNonUiChildren( parent: Element ): boolean {\n\treturn Array.from( parent.getChildren() ).some( child => !child.is( 'uiElement' ) );\n}\n\n/**\n * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`}\n * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n *\n * @error view-writer-wrap-invalid-attribute\n */\n\n/**\n * Returns first parent container of specified {@link module:engine/view/position~Position Position}.\n * Position's parent node is checked as first, then next parents are checked.\n * Note that {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n *\n * @param position Position used as a start point to locate parent container.\n * @returns Parent container element or `undefined` if container is not found.\n */\nfunction getParentContainer( position: Position ): ContainerElement | DocumentFragment | undefined {\n\tlet parent = position.parent;\n\n\twhile ( !isContainerOrFragment( parent ) ) {\n\t\tif ( !parent ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tparent = parent.parent as any;\n\t}\n\n\treturn ( parent as ContainerElement | DocumentFragment );\n}\n\n/**\n * Checks if first {@link module:engine/view/attributeelement~AttributeElement AttributeElement} provided to the function\n * can be wrapped outside second element. It is done by comparing elements'\n * {@link module:engine/view/attributeelement~AttributeElement#priority priorities}, if both have same priority\n * {@link module:engine/view/element~Element#getIdentity identities} are compared.\n */\nfunction shouldABeOutsideB( a: AttributeElement, b: AttributeElement ): boolean {\n\tif ( a.priority < b.priority ) {\n\t\treturn true;\n\t} else if ( a.priority > b.priority ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use identities.\n\treturn a.getIdentity() < b.getIdentity();\n}\n\n/**\n * Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n * specified position.\n *\n * ```html\n *

foo[]

->

foo{}

\n *

[]foo

->

{}foo

\n * ```\n *\n * @returns Position located inside text node or same position if there is no text nodes\n * before or after position location.\n */\nfunction movePositionToTextNode( position: Position ): Position {\n\tconst nodeBefore = position.nodeBefore;\n\n\tif ( nodeBefore && nodeBefore.is( '$text' ) ) {\n\t\treturn new Position( nodeBefore, nodeBefore.data.length );\n\t}\n\n\tconst nodeAfter = position.nodeAfter;\n\n\tif ( nodeAfter && nodeAfter.is( '$text' ) ) {\n\t\treturn new Position( nodeAfter, 0 );\n\t}\n\n\treturn position;\n}\n\n/**\n * Breaks text node into two text nodes when possible.\n *\n * ```html\n *

foo{}bar

->

foo[]bar

\n *

{}foobar

->

[]foobar

\n *

foobar{}

->

foobar[]

\n * ```\n *\n * @param position Position that need to be placed inside text node.\n * @returns New position after breaking text node.\n */\nfunction breakTextNode( position: Position ): Position {\n\tif ( position.offset == ( position.parent as Text ).data.length ) {\n\t\treturn new Position( position.parent.parent as any, ( position.parent as Text ).index! + 1 );\n\t}\n\n\tif ( position.offset === 0 ) {\n\t\treturn new Position( position.parent.parent as any, ( position.parent as Text ).index! );\n\t}\n\n\t// Get part of the text that need to be moved.\n\tconst textToMove = ( position.parent as Text ).data.slice( position.offset );\n\n\t// Leave rest of the text in position's parent.\n\t( position.parent as Text )._data = ( position.parent as Text ).data.slice( 0, position.offset );\n\n\t// Insert new text node after position's parent text node.\n\t( position.parent.parent as any )._insertChild(\n\t\t( position.parent as Text ).index! + 1,\n\t\tnew Text( position.root.document, textToMove )\n\t);\n\n\t// Return new position between two newly created text nodes.\n\treturn new Position( position.parent.parent as any, ( position.parent as Text ).index! + 1 );\n}\n\n/**\n * Merges two text nodes into first node. Removes second node and returns merge position.\n *\n * @param t1 First text node to merge. Data from second text node will be moved at the end of this text node.\n * @param t2 Second text node to merge. This node will be removed after merging.\n * @returns Position after merging text nodes.\n */\nfunction mergeTextNodes( t1: Text, t2: Text ): Position {\n\t// Merge text data into first text node and remove second one.\n\tconst nodeBeforeLength = t1.data.length;\n\tt1._data += t2.data;\n\tt2._remove();\n\n\treturn new Position( t1, nodeBeforeLength );\n}\n\nconst validNodesToInsert = [ Text, AttributeElement, ContainerElement, EmptyElement, RawElement, UIElement ];\n\n/**\n * Checks if provided nodes are valid to insert.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n * contains instances that are not supported ones (see error description for valid ones.\n */\nfunction validateNodesToInsert( nodes: Iterable, errorContext: Document ): void {\n\tfor ( const node of nodes ) {\n\t\tif ( !validNodesToInsert.some( ( validNode => node instanceof validNode ) ) ) { // eslint-disable-line no-use-before-define\n\t\t\t/**\n\t\t\t * One of the nodes to be inserted is of an invalid type.\n\t\t\t *\n\t\t\t * Nodes to be inserted with {@link module:engine/view/downcastwriter~DowncastWriter#insert `DowncastWriter#insert()`} should be\n\t\t\t * of the following types:\n\t\t\t *\n\t\t\t * * {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n\t\t\t * * {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n\t\t\t * * {@link module:engine/view/emptyelement~EmptyElement EmptyElement},\n\t\t\t * * {@link module:engine/view/uielement~UIElement UIElement},\n\t\t\t * * {@link module:engine/view/rawelement~RawElement RawElement},\n\t\t\t * * {@link module:engine/view/text~Text Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node-type\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-insert-invalid-node-type', errorContext );\n\t\t}\n\n\t\tif ( !node.is( '$text' ) ) {\n\t\t\tvalidateNodesToInsert( ( node as Element ).getChildren(), errorContext );\n\t\t}\n\t}\n}\n\n/**\n * Checks if node is ContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n *\n * @returns Returns `true` if node is instance of ContainerElement or DocumentFragment.\n */\nfunction isContainerOrFragment( node: Node | DocumentFragment ): boolean {\n\treturn node && ( node.is( 'containerElement' ) || node.is( 'documentFragment' ) );\n}\n\n/**\n * Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed\n * inside same {@link module:engine/view/containerelement~ContainerElement container element}.\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n */\nfunction validateRangeContainer( range: Range, errorContext: Document ) {\n\tconst startContainer = getParentContainer( range.start );\n\tconst endContainer = getParentContainer( range.end );\n\n\tif ( !startContainer || !endContainer || startContainer !== endContainer ) {\n\t\t/**\n\t\t * The container of the given range is invalid.\n\t\t *\n\t\t * This may happen if {@link module:engine/view/range~Range#start range start} and\n\t\t * {@link module:engine/view/range~Range#end range end} positions are not placed inside the same container element or\n\t\t * a parent container for these positions cannot be found.\n\t\t *\n\t\t * Methods like {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#remove()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#clean()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#unwrap()`} need to be called\n\t\t * on a range that has its start and end positions located in the same container element. Both positions can be\n\t\t * nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-range-container', errorContext );\n\t}\n}\n\n/**\n * Checks if two attribute elements can be joined together. Elements can be joined together if, and only if\n * they do not have ids specified.\n */\nfunction canBeJoined( a: AttributeElement, b: AttributeElement ) {\n\treturn a.id === null && b.id === 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\nimport { keyCodes, isText, type KeystrokeInfo } from '@ckeditor/ckeditor5-utils';\nimport type View from './view.js';\nimport type DomEventData from './observer/domeventdata.js';\nimport type { ViewDocumentArrowKeyEvent } from './observer/arrowkeysobserver.js';\n\n/**\n * Set of utilities related to handling block and inline fillers.\n *\n * Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n * empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n * universal filler, this is why two types are uses:\n *\n * * Block filler is an element which fill block elements, like `

`. CKEditor uses `
` as a block filler during the editing,\n * as browsers do natively. So instead of an empty `

` there will be `


`. The advantage of block filler is that\n * it is transparent for the selection, so when the caret is before the `
` and user presses right arrow he will be\n * moved to the next paragraph, not after the `
`. The disadvantage is that it breaks a block, so it can not be used\n * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `
` filler} can be replaced with any other\n * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n *\n * * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n * `` surrendered by text: `foobar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n * spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n * {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n * avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n * transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n * code is needed to handle the caret.\n *\n * Both inline and block fillers are handled by the {@link module:engine/view/renderer~Renderer renderer} and are not present in the\n * view.\n *\n * @module engine/view/filler\n */\n\n/**\n * Non-breaking space filler creator. This function creates the ` ` text node.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n */\nexport const NBSP_FILLER = ( domDocument: Document ): Text => domDocument.createTextNode( '\\u00A0' );\n\n/**\n * Marked non-breaking space filler creator. This function creates the ` ` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n */\nexport const MARKED_NBSP_FILLER = ( domDocument: Document ): HTMLSpanElement => {\n\tconst span = domDocument.createElement( 'span' );\n\tspan.dataset.ckeFiller = 'true';\n\tspan.innerText = '\\u00A0';\n\n\treturn span;\n};\n\n/**\n * `
` filler creator. This function creates the `
` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n */\nexport const BR_FILLER = ( domDocument: Document ): HTMLBRElement => {\n\tconst fillerBr = domDocument.createElement( 'br' );\n\tfillerBr.dataset.ckeFiller = 'true';\n\n\treturn fillerBr;\n};\n\n/**\n * Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n */\nexport const INLINE_FILLER_LENGTH = 7;\n\n/**\n * Inline filler which is a sequence of the word joiners.\n */\nexport const INLINE_FILLER = '\\u2060'.repeat( INLINE_FILLER_LENGTH );\n\n/**\n * Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * startsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * startsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n * startsWithFiller( document.createTextNode( 'foo' ) ); // false\n * startsWithFiller( document.createElement( 'p' ) ); // false\n * ```\n *\n * @param domNode DOM node.\n * @returns True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function startsWithFiller( domNode: Node | string ): boolean {\n\tif ( typeof domNode == 'string' ) {\n\t\treturn domNode.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER;\n\t}\n\n\treturn isText( domNode ) && ( domNode.data.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER );\n}\n\n/**\n * Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * isInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * isInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n * ```\n *\n * @param domText DOM text node.\n * @returns True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function isInlineFiller( domText: Text ): boolean {\n\treturn domText.data.length == INLINE_FILLER_LENGTH && startsWithFiller( domText );\n}\n\n/**\n * Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n * if text node contains it.\n *\n * ```ts\n * getDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n * getDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n * ```\n *\n * @param domText DOM text node, possible with inline filler.\n * @returns Data without filler.\n */\nexport function getDataWithoutFiller( domText: Text | string ): string {\n\tconst data = typeof domText == 'string' ? domText : domText.data;\n\n\tif ( startsWithFiller( domText ) ) {\n\t\treturn data.slice( INLINE_FILLER_LENGTH );\n\t}\n\n\treturn data;\n}\n\n/**\n * Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n * the left arrow is pressed, so the filler does not break navigation.\n *\n * @param view View controller instance we should inject quirks handling on.\n */\nexport function injectQuirksHandling( view: View ): void {\n\tview.document.on( 'arrowKey', jumpOverInlineFiller, { priority: 'low' } );\n}\n\n/**\n * Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\n */\nfunction jumpOverInlineFiller( evt: unknown, data: DomEventData & KeystrokeInfo ) {\n\tif ( data.keyCode == keyCodes.arrowleft ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView!.getSelection()!;\n\n\t\tif ( domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed ) {\n\t\t\tconst domParent = domSelection.getRangeAt( 0 ).startContainer;\n\t\t\tconst domOffset = domSelection.getRangeAt( 0 ).startOffset;\n\n\t\t\tif ( startsWithFiller( domParent ) && domOffset <= INLINE_FILLER_LENGTH ) {\n\t\t\t\tdomSelection.collapse( domParent, 0 );\n\t\t\t}\n\t\t}\n\t}\n}\n","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./renderer.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/**\n * @module engine/view/renderer\n */\n\nimport ViewText from './text.js';\nimport ViewPosition from './position.js';\nimport { INLINE_FILLER, INLINE_FILLER_LENGTH, startsWithFiller, isInlineFiller } from './filler.js';\n\nimport {\n\tCKEditorError,\n\tObservableMixin,\n\tdiff,\n\tenv,\n\tfastDiff,\n\tinsertAt,\n\tisComment,\n\tisNode,\n\tisText,\n\tremove,\n\ttype DiffResult,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { ChangeType } from './document.js';\nimport type DocumentSelection from './documentselection.js';\nimport type DomConverter from './domconverter.js';\nimport type ViewElement from './element.js';\nimport type ViewNode from './node.js';\n\nimport '../../theme/renderer.css';\n\ntype DomText = globalThis.Text;\ntype DomNode = globalThis.Node;\ntype DomDocument = globalThis.Document;\ntype DomElement = globalThis.HTMLElement;\ntype DomSelection = globalThis.Selection;\n\n/**\n * Renderer is responsible for updating the DOM structure and the DOM selection based on\n * the {@link module:engine/view/renderer~Renderer#markToSync information about updated view nodes}.\n * In other words, it renders the view to the DOM.\n *\n * Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n * virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n * that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n * affected as little as possible.\n *\n * Renderer uses {@link module:engine/view/domconverter~DomConverter} to transform view nodes and positions\n * to and from the DOM.\n */\nexport default class Renderer extends ObservableMixin() {\n\t/**\n\t * Set of DOM Documents instances.\n\t */\n\tpublic readonly domDocuments: Set = new Set();\n\n\t/**\n\t * Converter instance.\n\t */\n\tpublic readonly domConverter: DomConverter;\n\n\t/**\n\t * Set of nodes which attributes changed and may need to be rendered.\n\t */\n\tpublic readonly markedAttributes: Set = new Set();\n\n\t/**\n\t * Set of elements which child lists changed and may need to be rendered.\n\t */\n\tpublic readonly markedChildren: Set = new Set();\n\n\t/**\n\t * Set of text nodes which text data changed and may need to be rendered.\n\t */\n\tpublic readonly markedTexts: Set = new Set();\n\n\t/**\n\t * View selection. Renderer updates DOM selection based on the view selection.\n\t */\n\tpublic readonly selection: DocumentSelection;\n\n\t/**\n\t * Indicates if the view document is focused and selection can be rendered. Selection will not be rendered if\n\t * this is set to `false`.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isFocused: boolean;\n\n\t/**\n\t * Indicates whether the user is making a selection in the document (e.g. holding the mouse button and moving the cursor).\n\t * When they stop selecting, the property goes back to `false`.\n\t *\n\t * Note: In some browsers, the renderer will stop rendering the selection and inline fillers while the user is making\n\t * a selection to avoid glitches in DOM selection\n\t * (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isSelecting: boolean;\n\n\t/**\n\t * True if composition is in progress inside the document.\n\t *\n\t * This property is bound to the {@link module:engine/view/document~Document#isComposing `Document#isComposing`} property.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isComposing: boolean;\n\n\t/**\n\t * The text node in which the inline filler was rendered.\n\t */\n\tprivate _inlineFiller: DomText | null = null;\n\n\t/**\n\t * DOM element containing fake selection.\n\t */\n\tprivate _fakeSelectionContainer: DomElement | null = null;\n\n\t/**\n\t * Creates a renderer instance.\n\t *\n\t * @param domConverter Converter instance.\n\t * @param selection View selection.\n\t */\n\tconstructor( domConverter: DomConverter, selection: DocumentSelection ) {\n\t\tsuper();\n\n\t\tthis.domConverter = domConverter;\n\t\tthis.selection = selection;\n\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'isSelecting', false );\n\n\t\t// Rendering the selection and inline filler manipulation should be postponed in (non-Android) Blink until the user finishes\n\t\t// creating the selection in DOM to avoid accidental selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\t// When the user stops selecting, all pending changes should be rendered ASAP, though.\n\t\tif ( env.isBlink && !env.isAndroid ) {\n\t\t\tthis.on( 'change:isSelecting', () => {\n\t\t\t\tif ( !this.isSelecting ) {\n\t\t\t\t\tthis.render();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis.set( 'isComposing', false );\n\n\t\tthis.on( 'change:isComposing', () => {\n\t\t\tif ( !this.isComposing ) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t *\n\t * Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t *\n\t * @see #markedAttributes\n\t * @see #markedChildren\n\t * @see #markedTexts\n\t *\n\t * @param type Type of the change.\n\t * @param node ViewNode to be marked.\n\t */\n\tpublic markToSync( type: ChangeType, node: ViewNode ): void {\n\t\tif ( type === 'text' ) {\n\t\t\tif ( this.domConverter.mapViewToDom( node.parent! ) ) {\n\t\t\t\tthis.markedTexts.add( node );\n\t\t\t}\n\t\t} else {\n\t\t\t// If the node has no DOM element it is not rendered yet,\n\t\t\t// its children/attributes do not need to be marked to be sync.\n\t\t\tif ( !this.domConverter.mapViewToDom( node as ViewElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( type === 'attributes' ) {\n\t\t\t\tthis.markedAttributes.add( node as ViewElement );\n\t\t\t} else if ( type === 'children' ) {\n\t\t\t\tthis.markedChildren.add( node as ViewElement );\n\t\t\t} else {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t\tconst unreachable: never = type;\n\n\t\t\t\t/**\n\t\t\t\t * Unknown type passed to Renderer.markToSync.\n\t\t\t\t *\n\t\t\t\t * @error view-renderer-unknown-type\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-renderer-unknown-type', this );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t * the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t *\n\t * Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t * so it does as little as it is needed to update the DOM.\n\t *\n\t * Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t * at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t * removed as long as the selection is in the text node which needed it at first.\n\t */\n\tpublic render(): void {\n\t\t// Ignore rendering while in the composition mode. Composition events are not cancellable and browser will modify the DOM tree.\n\t\t// All marked elements, attributes, etc. will wait until next render after the composition ends.\n\t\t// On Android composition events are immediately applied to the model, so we don't need to skip rendering,\n\t\t// and we should not do it because the difference between view and DOM could lead to position mapping problems.\n\t\tif ( this.isComposing && !env.isAndroid ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Rendering aborted while isComposing',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Rendering',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tlet inlineFillerPosition: ViewPosition | null = null;\n\t\tconst isInlineFillerRenderingPossible = env.isBlink && !env.isAndroid ? !this.isSelecting : true;\n\n\t\t// Refresh mappings.\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildrenMappings( element );\n\t\t}\n\n\t\t// Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\t// There was inline filler rendered in the DOM but it's not\n\t\t\t// at the selection position any more, so we can remove it\n\t\t\t// (cause even if it's needed, it must be placed in another location).\n\t\t\tif ( this._inlineFiller && !this._isSelectionInInlineFiller() ) {\n\t\t\t\tthis._removeInlineFiller();\n\t\t\t}\n\n\t\t\t// If we've got the filler, let's try to guess its position in the view.\n\t\t\tif ( this._inlineFiller ) {\n\t\t\t\tinlineFillerPosition = this._getInlineFillerPosition();\n\t\t\t}\n\t\t\t// Otherwise, if it's needed, create it at the selection position.\n\t\t\telse if ( this._needsInlineFillerAtSelection() ) {\n\t\t\t\tinlineFillerPosition = this.selection.getFirstPosition()!;\n\n\t\t\t\t// Do not use `markToSync` so it will be added even if the parent is already added.\n\t\t\t\tthis.markedChildren.add( inlineFillerPosition.parent as ViewElement );\n\t\t\t}\n\t\t}\n\t\t// Make sure the inline filler has any parent, so it can be mapped to view position by DomConverter.\n\t\telse if ( this._inlineFiller && this._inlineFiller.parentNode ) {\n\t\t\t// While the user is making selection, preserve the inline filler at its original position.\n\t\t\tinlineFillerPosition = this.domConverter.domPositionToView( this._inlineFiller )!;\n\n\t\t\t// While down-casting the document selection attributes, all existing empty\n\t\t\t// attribute elements (for selection position) are removed from the view and DOM,\n\t\t\t// so make sure that we were able to map filler position.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/12026\n\t\t\tif ( inlineFillerPosition && inlineFillerPosition.parent.is( '$text' ) ) {\n\t\t\t\t// The inline filler position is expected to be before the text node.\n\t\t\t\tinlineFillerPosition = ViewPosition._createBefore( inlineFillerPosition.parent );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const element of this.markedAttributes ) {\n\t\t\tthis._updateAttrs( element );\n\t\t}\n\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildren( element, { inlineFillerPosition } );\n\t\t}\n\n\t\tfor ( const node of this.markedTexts ) {\n\t\t\tif ( !this.markedChildren.has( node.parent as ViewElement ) && this.domConverter.mapViewToDom( node.parent as ViewElement ) ) {\n\t\t\t\tthis._updateText( node as ViewText, { inlineFillerPosition } );\n\t\t\t}\n\t\t}\n\n\t\t// * Check whether the inline filler is required and where it really is in the DOM.\n\t\t// At this point in most cases it will be in the DOM, but there are exceptions.\n\t\t// For example, if the inline filler was deep in the created DOM structure, it will not be created.\n\t\t// Similarly, if it was removed at the beginning of this function and then neither text nor children were updated,\n\t\t// it will not be present. Fix those and similar scenarios.\n\t\t// * Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\tif ( inlineFillerPosition ) {\n\t\t\t\tconst fillerDomPosition = this.domConverter.viewPositionToDom( inlineFillerPosition )!;\n\t\t\t\tconst domDocument = fillerDomPosition.parent.ownerDocument!;\n\n\t\t\t\tif ( !startsWithFiller( fillerDomPosition.parent ) ) {\n\t\t\t\t\t// Filler has not been created at filler position. Create it now.\n\t\t\t\t\tthis._inlineFiller = addInlineFiller( domDocument, fillerDomPosition.parent, fillerDomPosition.offset );\n\t\t\t\t} else {\n\t\t\t\t\t// Filler has been found, save it.\n\t\t\t\t\tthis._inlineFiller = fillerDomPosition.parent as DomText;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no filler needed.\n\t\t\t\tthis._inlineFiller = null;\n\t\t\t}\n\t\t}\n\n\t\t// First focus the new editing host, then update the selection.\n\t\t// Otherwise, FF may throw an error (https://github.com/ckeditor/ckeditor5/issues/721).\n\t\tthis._updateFocus();\n\t\tthis._updateSelection();\n\n\t\tthis.domConverter._clearTemporaryCustomProperties();\n\n\t\tthis.markedTexts.clear();\n\t\tthis.markedAttributes.clear();\n\t\tthis.markedChildren.clear();\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Updates mappings of view element's children.\n\t *\n\t * Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t * This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t * Thanks to that these elements do not need to be re-rendered completely.\n\t *\n\t * @param viewElement The view element whose children mappings will be updated.\n\t */\n\tprivate _updateChildrenMappings( viewElement: ViewElement ): void {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM and there is no need to process it.\n\t\t\treturn;\n\t\t}\n\n\t\t// Removing nodes from the DOM as we iterate can cause `actualDomChildren`\n\t\t// (which is a live-updating `NodeList`) to get out of sync with the\n\t\t// indices that we compute as we iterate over `actions`.\n\t\t// This would produce incorrect element mappings.\n\t\t//\n\t\t// Converting live list to an array to make the list static.\n\t\tconst actualDomChildren = Array.from(\n\t\t\tdomElement.childNodes\n\t\t);\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, { withChildren: false } )\n\t\t);\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\t\tconst actions = this._findUpdateActions( diff, actualDomChildren, expectedDomChildren, areSimilarElements );\n\n\t\tif ( actions.indexOf( 'update' ) !== -1 ) {\n\t\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action === 'update' ) {\n\t\t\t\t\tconst insertIndex = counter.equal + counter.insert;\n\t\t\t\t\tconst deleteIndex = counter.equal + counter.delete;\n\t\t\t\t\tconst viewChild = viewElement.getChild( insertIndex );\n\n\t\t\t\t\t// UIElement and RawElement are special cases. Their children are not stored in a view (#799)\n\t\t\t\t\t// so we cannot use them with replacing flow (since they use view children during rendering\n\t\t\t\t\t// which will always result in rendering empty elements).\n\t\t\t\t\tif ( viewChild && !viewChild.is( 'uiElement' ) && !viewChild.is( 'rawElement' ) ) {\n\t\t\t\t\t\tthis._updateElementMappings( viewChild as ViewElement, actualDomChildren[ deleteIndex ] as DomElement );\n\t\t\t\t\t}\n\n\t\t\t\t\tremove( expectedDomChildren[ insertIndex ] );\n\t\t\t\t\tcounter.equal++;\n\t\t\t\t} else {\n\t\t\t\t\tcounter[ action ]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Updates mappings of a given view element.\n\t *\n\t * @param viewElement The view element whose mappings will be updated.\n\t * @param domElement The DOM element representing the given view element.\n\t */\n\tprivate _updateElementMappings( viewElement: ViewElement, domElement: DomElement ): void {\n\t\t// Remap 'DomConverter' bindings.\n\t\tthis.domConverter.unbindDomElement( domElement );\n\t\tthis.domConverter.bindElements( domElement, viewElement );\n\n\t\t// View element may have children which needs to be updated, but are not marked, mark them to update.\n\t\tthis.markedChildren.add( viewElement );\n\n\t\t// Because we replace new view element mapping with the existing one, the corresponding DOM element\n\t\t// will not be rerendered. The new view element may have different attributes than the previous one.\n\t\t// Since its corresponding DOM element will not be rerendered, new attributes will not be added\n\t\t// to the DOM, so we need to mark it here to make sure its attributes gets updated. See #1427 for more\n\t\t// detailed case study.\n\t\t// Also there are cases where replaced element is removed from the view structure and then has\n\t\t// its attributes changed or removed. In such cases the element will not be present in `markedAttributes`\n\t\t// and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.\n\t\t// To prevent such situations we always mark reused element to have its attributes rerenderd (#1560).\n\t\tthis.markedAttributes.add( viewElement );\n\t}\n\n\t/**\n\t * Gets the position of the inline filler based on the current selection.\n\t * Here, we assume that we know that the filler is needed and\n\t * {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t * it is somewhere at the selection position.\n\t *\n\t * Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t * when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t * bindings are only dependable after rendering.\n\t */\n\tprivate _getInlineFillerPosition(): ViewPosition {\n\t\tconst firstPos = this.selection.getFirstPosition()!;\n\n\t\tif ( firstPos.parent.is( '$text' ) ) {\n\t\t\treturn ViewPosition._createBefore( firstPos.parent );\n\t\t} else {\n\t\t\treturn firstPos;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the selection has not left the inline filler's text node.\n\t * If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t * leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t *\n\t * @returns `true` if the inline filler and selection are in the same place.\n\t */\n\tprivate _isSelectionInInlineFiller(): boolean {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note, we can't check if selection's position equals position of the\n\t\t// this._inlineFiller node, because of #663. We may not be able to calculate\n\t\t// the filler's position in the view at this stage.\n\t\t// Instead, we check it the other way – whether selection is anchored in\n\t\t// that text node or next to it.\n\n\t\t// Possible options are:\n\t\t// \"FILLER{}\"\n\t\t// \"FILLERadded-text{}\"\n\t\tconst selectionPosition = this.selection.getFirstPosition()!;\n\t\tconst position = this.domConverter.viewPositionToDom( selectionPosition );\n\n\t\tif ( position && isText( position.parent ) && startsWithFiller( position.parent ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Removes the inline filler.\n\t */\n\tprivate _removeInlineFiller(): void {\n\t\tconst domFillerNode = this._inlineFiller!;\n\n\t\t// Something weird happened and the stored node doesn't contain the filler's text.\n\t\tif ( !startsWithFiller( domFillerNode ) ) {\n\t\t\t/**\n\t\t\t * The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t\t * in the DOM.\n\t\t\t *\n\t\t\t * @error view-renderer-filler-was-lost\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-renderer-filler-was-lost', this );\n\t\t}\n\n\t\tif ( isInlineFiller( domFillerNode ) ) {\n\t\t\tdomFillerNode.remove();\n\t\t} else {\n\t\t\tdomFillerNode.data = domFillerNode.data.substr( INLINE_FILLER_LENGTH );\n\t\t}\n\n\t\tthis._inlineFiller = null;\n\t}\n\n\t/**\n\t * Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t *\n\t * @returns `true` if the inline filler should be added.\n\t */\n\tprivate _needsInlineFillerAtSelection(): boolean {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectionPosition = this.selection.getFirstPosition()!;\n\t\tconst selectionParent = selectionPosition.parent;\n\t\tconst selectionOffset = selectionPosition.offset;\n\n\t\t// If there is no DOM root we do not care about fillers.\n\t\tif ( !this.domConverter.mapViewToDom( selectionParent.root ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !( selectionParent.is( 'element' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Prevent adding inline filler inside elements with contenteditable=false.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/1170\n\t\tif ( !isEditable( selectionParent ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We have block filler, we do not need inline one.\n\t\tif ( selectionOffset === selectionParent.getFillerOffset!() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst nodeBefore = selectionPosition.nodeBefore;\n\t\tconst nodeAfter = selectionPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof ViewText || nodeAfter instanceof ViewText ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do not use inline filler while typing outside inline elements on Android.\n\t\t// The deleteContentBackward would remove part of the inline filler instead of removing last letter in a link.\n\t\tif ( env.isAndroid && ( nodeBefore || nodeAfter ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if text needs to be updated and possibly updates it.\n\t *\n\t * @param viewText View text to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */\n\tprivate _updateText( viewText: ViewText, options: { inlineFillerPosition?: ViewPosition | null } ) {\n\t\tconst domText = this.domConverter.findCorrespondingDomText( viewText )!;\n\t\tconst newDomText = this.domConverter.viewToDom( viewText );\n\n\t\tlet expectedText = newDomText.data;\n\t\tconst filler = options.inlineFillerPosition;\n\n\t\tif ( filler && filler.parent == viewText.parent && filler.offset == viewText.index ) {\n\t\t\texpectedText = INLINE_FILLER + expectedText;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update text',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tupdateTextNode( domText, expectedText );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Checks if attribute list needs to be updated and possibly updates it.\n\t *\n\t * @param viewElement The view element to update.\n\t */\n\tprivate _updateAttrs( viewElement: ViewElement ): void {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that 'viewElement' is outdated as its mapping was updated\n\t\t\t// in 'this._updateChildrenMappings()'. There is no need to process it as new view element which\n\t\t\t// replaced old 'viewElement' mapping was also added to 'this.markedAttributes'\n\t\t\t// in 'this._updateChildrenMappings()' so it will be processed separately.\n\t\t\treturn;\n\t\t}\n\n\t\tconst domAttrKeys = Array.from( ( domElement as DomElement ).attributes ).map( attr => attr.name );\n\t\tconst viewAttrKeys = viewElement.getAttributeKeys();\n\n\t\t// Add or overwrite attributes.\n\t\tfor ( const key of viewAttrKeys ) {\n\t\t\tthis.domConverter.setDomElementAttribute( domElement as DomElement, key, viewElement.getAttribute( key )!, viewElement );\n\t\t}\n\n\t\t// Remove from DOM attributes which do not exists in the view.\n\t\tfor ( const key of domAttrKeys ) {\n\t\t\t// All other attributes not present in the DOM should be removed.\n\t\t\tif ( !viewElement.hasAttribute( key ) ) {\n\t\t\t\tthis.domConverter.removeDomElementAttribute( domElement as DomElement, key );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if elements child list needs to be updated and possibly updates it.\n\t *\n\t * Note that on Android, to reduce the risk of composition breaks, it tries to update data of an existing\n\t * child text nodes instead of replacing them completely.\n\t *\n\t * @param viewElement View element to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */\n\tprivate _updateChildren( viewElement: ViewElement, options: { inlineFillerPosition: ViewPosition | null } ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM.\n\t\t\t// There is no need to process it. It will be processed when re-inserted.\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update children',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t// IME on Android inserts a new text node while typing after a link\n\t\t// instead of updating an existing text node that follows the link.\n\t\t// We must normalize those text nodes so the diff won't get confused.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/12574.\n\t\tif ( env.isAndroid ) {\n\t\t\tlet previousDomNode = null;\n\n\t\t\tfor ( const domNode of Array.from( domElement.childNodes ) ) {\n\t\t\t\tif ( previousDomNode && isText( previousDomNode ) && isText( domNode ) ) {\n\t\t\t\t\tdomElement.normalize();\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tpreviousDomNode = domNode;\n\t\t\t}\n\t\t}\n\n\t\tconst inlineFillerPosition = options.inlineFillerPosition;\n\t\tconst actualDomChildren = domElement.childNodes;\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, { bind: true } )\n\t\t);\n\n\t\t// Inline filler element has to be created as it is present in the DOM, but not in the view. It is required\n\t\t// during diffing so text nodes could be compared correctly and also during rendering to maintain\n\t\t// proper order and indexes while updating the DOM.\n\t\tif ( inlineFillerPosition && inlineFillerPosition.parent === viewElement ) {\n\t\t\taddInlineFiller( ( domElement as DomElement ).ownerDocument, expectedDomChildren, inlineFillerPosition.offset );\n\t\t}\n\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\n\t\t// We need to make sure that we update the existing text node and not replace it with another one.\n\t\t// The composition and different \"language\" browser extensions are fragile to text node being completely replaced.\n\t\tconst actions = this._findUpdateActions( diff, actualDomChildren, expectedDomChildren, areTextNodes );\n\n\t\tlet i = 0;\n\t\tconst nodesToUnbind: Set = new Set();\n\n\t\t// Handle deletions first.\n\t\t// This is to prevent a situation where an element that already exists in `actualDomChildren` is inserted at a different\n\t\t// index in `actualDomChildren`. Since `actualDomChildren` is a `NodeList`, this works like move, not like an insert,\n\t\t// and it disrupts the whole algorithm. See https://github.com/ckeditor/ckeditor5/issues/6367.\n\t\t//\n\t\t// It doesn't matter in what order we remove or add nodes, as long as we remove and add correct nodes at correct indexes.\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'delete' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Remove node',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '', actualDomChildren[ i ]\n\t\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t\tnodesToUnbind.add( actualDomChildren[ i ] as DomElement );\n\t\t\t\tremove( actualDomChildren[ i ] );\n\t\t\t} else if ( action === 'equal' || action === 'update' ) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\ti = 0;\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Insert node',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '', expectedDomChildren[ i ]\n\t\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tinsertAt( domElement as DomElement, i, expectedDomChildren[ i ] );\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Update the existing text node data. Note that replace action is generated only for Android for now.\n\t\t\telse if ( action === 'update' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update text node',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tupdateTextNode( actualDomChildren[ i ] as DomText, ( expectedDomChildren[ i ] as DomText ).data );\n\t\t\t\ti++;\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\t// Force updating text nodes inside elements which did not change and do not need to be re-rendered (#1125).\n\t\t\t\t// Do it here (not in the loop above) because only after insertions the `i` index is correct.\n\t\t\t\tthis._markDescendantTextToSync( this.domConverter.domToView( expectedDomChildren[ i ] ) as any );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\t// Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during\n\t\t// comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,\n\t\t// it was moved to DOM tree out of the removed node.\n\t\tfor ( const node of nodesToUnbind ) {\n\t\t\tif ( !node.parentNode ) {\n\t\t\t\tthis.domConverter.unbindDomElement( node as DomElement );\n\t\t\t}\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Shorthand for diffing two arrays or node lists of DOM nodes.\n\t *\n\t * @param actualDomChildren Actual DOM children\n\t * @param expectedDomChildren Expected DOM children.\n\t * @returns The list of actions based on the {@link module:utils/diff~diff} function.\n\t */\n\tprivate _diffNodeLists( actualDomChildren: Array | NodeList, expectedDomChildren: Array | NodeList ) {\n\t\tactualDomChildren = filterOutFakeSelectionContainer( actualDomChildren, this._fakeSelectionContainer );\n\n\t\treturn diff( actualDomChildren, expectedDomChildren, sameNodes.bind( null, this.domConverter ) );\n\t}\n\n\t/**\n\t * Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t * within one `insert`/`delete` action group, for example:\n\t *\n\t * ```\n\t * Actual DOM:\t\t

FooBarBazBax

\n\t * Expected DOM:\t

Bar123Baz456

\n\t * Input actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t * Output actions:\t[ insert, replace, delete, equal, replace ]\n\t * ```\n\t *\n\t * @param actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t * @param actualDom Actual DOM children\n\t * @param expectedDom Expected DOM children.\n\t * @param comparator A comparator function that should return `true` if the given node should be reused\n\t * (either by the update of a text node data or an element children list for similar elements).\n\t * @returns Actions array modified with the `update` actions.\n\t */\n\tprivate _findUpdateActions(\n\t\tactions: Array,\n\t\tactualDom: Array | NodeList,\n\t\texpectedDom: Array,\n\t\tcomparator: ( a: DomNode, b: DomNode ) => boolean\n\t): Array {\n\t\t// If there is no both 'insert' and 'delete' actions, no need to check for replaced elements.\n\t\tif ( actions.indexOf( 'insert' ) === -1 || actions.indexOf( 'delete' ) === -1 ) {\n\t\t\treturn actions;\n\t\t}\n\n\t\tlet newActions: Array = [];\n\t\tlet actualSlice = [];\n\t\tlet expectedSlice = [];\n\n\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\texpectedSlice.push( expectedDom[ counter.equal + counter.insert ] );\n\t\t\t} else if ( action === 'delete' ) {\n\t\t\t\tactualSlice.push( actualDom[ counter.equal + counter.delete ] );\n\t\t\t} else { // equal\n\t\t\t\tnewActions = newActions.concat(\n\t\t\t\t\tdiff( actualSlice, expectedSlice, comparator )\n\t\t\t\t\t\t.map( action => action === 'equal' ? 'update' : action )\n\t\t\t\t);\n\n\t\t\t\tnewActions.push( 'equal' );\n\n\t\t\t\t// Reset stored elements on 'equal'.\n\t\t\t\tactualSlice = [];\n\t\t\t\texpectedSlice = [];\n\t\t\t}\n\t\t\tcounter[ action ]++;\n\t\t}\n\n\t\treturn newActions.concat(\n\t\t\tdiff( actualSlice, expectedSlice, comparator )\n\t\t\t\t.map( action => action === 'equal' ? 'update' : action )\n\t\t);\n\t}\n\n\t/**\n\t * Marks text nodes to be synchronized.\n\t *\n\t * If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t *\n\t * @param viewNode View node to sync.\n\t */\n\tprivate _markDescendantTextToSync( viewNode: ViewNode | undefined ): void {\n\t\tif ( !viewNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tthis.markedTexts.add( viewNode );\n\t\t} else if ( viewNode.is( 'element' ) ) {\n\t\t\tfor ( const child of viewNode.getChildren() ) {\n\t\t\t\tthis._markDescendantTextToSync( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the selection needs to be updated and possibly updates it.\n\t */\n\tprivate _updateSelection(): void {\n\t\t// Block updating DOM selection in (non-Android) Blink while the user is selecting to prevent accidental selection collapsing.\n\t\t// Note: Structural changes in DOM must trigger selection rendering, though. Nodes the selection was anchored\n\t\t// to, may disappear in DOM which would break the selection (e.g. in real-time collaboration scenarios).\n\t\t// https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723\n\t\tif ( env.isBlink && !env.isAndroid && this.isSelecting && !this.markedChildren.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is no selection - remove DOM and fake selections.\n\t\tif ( this.selection.rangeCount === 0 ) {\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst domRoot = this.domConverter.mapViewToDom( this.selection.editableElement! );\n\n\t\t// Do nothing if there is no focus, or there is no DOM element corresponding to selection's editable element.\n\t\tif ( !this.isFocused || !domRoot ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Render fake selection - create the fake selection container (if needed) and move DOM selection to it.\n\t\tif ( this.selection.isFake ) {\n\t\t\tthis._updateFakeSelection( domRoot );\n\t\t}\n\t\t// There was a fake selection so remove it and update the DOM selection.\n\t\t// This is especially important on Android because otherwise IME will try to compose over the fake selection container.\n\t\telse if ( this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected ) {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t\t// Update the DOM selection in case of a plain selection change (no fake selection is involved).\n\t\t// On non-Android the whole rendering is disabled in composition mode (including DOM selection update),\n\t\t// but updating DOM selection should be also disabled on Android if in the middle of the composition\n\t\t// (to not interrupt it).\n\t\telse if ( !( this.isComposing && env.isAndroid ) ) {\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Updates the fake selection.\n\t *\n\t * @param domRoot A valid DOM root where the fake selection container should be added.\n\t */\n\tprivate _updateFakeSelection( domRoot: DomElement ): void {\n\t\tconst domDocument = domRoot.ownerDocument;\n\n\t\tif ( !this._fakeSelectionContainer ) {\n\t\t\tthis._fakeSelectionContainer = createFakeSelectionContainer( domDocument );\n\t\t}\n\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\t// Bind fake selection container with the current selection *position*.\n\t\tthis.domConverter.bindFakeSelection( container, this.selection );\n\n\t\tif ( !this._fakeSelectionNeedsUpdate( domRoot ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !container.parentElement || container.parentElement != domRoot ) {\n\t\t\tdomRoot.appendChild( container );\n\t\t}\n\n\t\tcontainer.textContent = this.selection.fakeSelectionLabel || '\\u00A0';\n\n\t\tconst domSelection = domDocument.getSelection()!;\n\t\tconst domRange = domDocument.createRange();\n\n\t\tdomSelection.removeAllRanges();\n\t\tdomRange.selectNodeContents( container );\n\t\tdomSelection.addRange( domRange );\n\t}\n\n\t/**\n\t * Updates the DOM selection.\n\t *\n\t * @param domRoot A valid DOM root where the DOM selection should be rendered.\n\t */\n\tprivate _updateDomSelection( domRoot: DomElement ) {\n\t\tconst domSelection = domRoot.ownerDocument.defaultView!.getSelection()!;\n\n\t\t// Let's check whether DOM selection needs updating at all.\n\t\tif ( !this._domSelectionNeedsUpdate( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Multi-range selection is not available in most browsers, and, at least in Chrome, trying to\n\t\t// set such selection, that is not continuous, throws an error. Because of that, we will just use anchor\n\t\t// and focus of view selection.\n\t\t// Since we are not supporting multi-range selection, we also do not need to check if proper editable is\n\t\t// selected. If there is any editable selected, it is okay (editable is taken from selection anchor).\n\t\tconst anchor = this.domConverter.viewPositionToDom( this.selection.anchor! )!;\n\t\tconst focus = this.domConverter.viewPositionToDom( this.selection.focus! )!;\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Update DOM selection:',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '', anchor, focus\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tdomSelection.setBaseAndExtent( anchor.parent, anchor.offset, focus.parent, focus.offset );\n\n\t\t// Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n\t\tif ( env.isGecko ) {\n\t\t\tfixGeckoSelectionAfterBr( focus, domSelection );\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a given DOM selection needs to be updated.\n\t *\n\t * @param domSelection The DOM selection to check.\n\t */\n\tprivate _domSelectionNeedsUpdate( domSelection: Selection ): boolean {\n\t\tif ( !this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\t// Current DOM selection is in incorrect position. We need to update it.\n\t\t\treturn true;\n\t\t}\n\n\t\tconst oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );\n\n\t\tif ( oldViewSelection && this.selection.isEqual( oldViewSelection ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If selection is not collapsed, it does not need to be updated if it is similar.\n\t\tif ( !this.selection.isCollapsed && this.selection.isSimilar( oldViewSelection ) ) {\n\t\t\t// Selection did not changed and is correct, do not update.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Selections are not similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the fake selection needs to be updated.\n\t *\n\t * @param domRoot A valid DOM root where a new fake selection container should be added.\n\t */\n\tprivate _fakeSelectionNeedsUpdate( domRoot: DomElement ): boolean {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tconst domSelection = domRoot.ownerDocument.getSelection()!;\n\n\t\t// Fake selection needs to be updated if there's no fake selection container, or the container currently sits\n\t\t// in a different root.\n\t\tif ( !container || container.parentElement !== domRoot ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Make sure that the selection actually is within the fake selection.\n\t\tif ( domSelection.anchorNode !== container && !container.contains( domSelection.anchorNode ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn container.textContent !== this.selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Removes the DOM selection.\n\t */\n\tprivate _removeDomSelection(): void {\n\t\tfor ( const doc of this.domDocuments ) {\n\t\t\tconst domSelection = doc.getSelection()!;\n\n\t\t\tif ( domSelection.rangeCount ) {\n\t\t\t\tconst activeDomElement = doc.activeElement!;\n\t\t\t\tconst viewElement = this.domConverter.mapDomToView( activeDomElement as DomElement );\n\n\t\t\t\tif ( activeDomElement && viewElement ) {\n\t\t\t\t\tdomSelection.removeAllRanges();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes the fake selection.\n\t */\n\tprivate _removeFakeSelection(): void {\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\tif ( container ) {\n\t\t\tcontainer.remove();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if focus needs to be updated and possibly updates it.\n\t */\n\tprivate _updateFocus(): void {\n\t\tif ( this.isFocused ) {\n\t\t\tconst editable = this.selection.editableElement;\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Checks if provided element is editable.\n */\nfunction isEditable( element: ViewElement ): boolean {\n\tif ( element.getAttribute( 'contenteditable' ) == 'false' ) {\n\t\treturn false;\n\t}\n\n\tconst parent = element.findAncestor( element => element.hasAttribute( 'contenteditable' ) );\n\n\treturn !parent || parent.getAttribute( 'contenteditable' ) == 'true';\n}\n\n/**\n * Adds inline filler at a given position.\n *\n * The position can be given as an array of DOM nodes and an offset in that array,\n * or a DOM parent element and an offset in that element.\n *\n * @returns The DOM text node that contains an inline filler.\n */\nfunction addInlineFiller( domDocument: DomDocument, domParentOrArray: DomNode | Array, offset: number ): DomText {\n\tconst childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n\tconst nodeAfterFiller = childNodes[ offset ];\n\n\tif ( isText( nodeAfterFiller ) ) {\n\t\tnodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n\n\t\treturn nodeAfterFiller;\n\t} else {\n\t\tconst fillerNode = domDocument.createTextNode( INLINE_FILLER );\n\n\t\tif ( Array.isArray( domParentOrArray ) ) {\n\t\t\t( childNodes as Array ).splice( offset, 0, fillerNode );\n\t\t} else {\n\t\t\tinsertAt( domParentOrArray as DomElement, offset, fillerNode );\n\t\t}\n\n\t\treturn fillerNode;\n\t}\n}\n\n/**\n * Whether two DOM nodes should be considered as similar.\n * Nodes are considered similar if they have the same tag name.\n */\nfunction areSimilarElements( node1: DomNode, node2: DomNode ): boolean {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\t!isText( node1 ) && !isText( node2 ) &&\n\t\t!isComment( node1 ) && !isComment( node2 ) &&\n\t\t( node1 as DomElement ).tagName.toLowerCase() === ( node2 as DomElement ).tagName.toLowerCase();\n}\n\n/**\n * Whether two DOM nodes are text nodes.\n */\nfunction areTextNodes( node1: DomNode, node2: DomNode ): boolean {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\tisText( node1 ) && isText( node2 );\n}\n\n/**\n * Whether two dom nodes should be considered as the same.\n * Two nodes which are considered the same are:\n *\n * * Text nodes with the same text.\n * * Element nodes represented by the same object.\n * * Two block filler elements.\n *\n * @param blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~DomConverter#blockFillerMode}.\n */\nfunction sameNodes( domConverter: DomConverter, actualDomChild: DomNode, expectedDomChild: DomNode ): boolean {\n\t// Elements.\n\tif ( actualDomChild === expectedDomChild ) {\n\t\treturn true;\n\t}\n\t// Texts.\n\telse if ( isText( actualDomChild ) && isText( expectedDomChild ) ) {\n\t\treturn actualDomChild.data === expectedDomChild.data;\n\t}\n\t// Block fillers.\n\telse if ( domConverter.isBlockFiller( actualDomChild ) &&\n\t\tdomConverter.isBlockFiller( expectedDomChild ) ) {\n\t\treturn true;\n\t}\n\n\t// Not matching types.\n\treturn false;\n}\n\n/**\n * The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n * When the native DOM selection is at the end of the block and preceded by
e.g.\n *\n * ```html\n *

foo
[]

\n * ```\n *\n * which happens a lot when using the soft line break, the browser fails to (visually) move the\n * caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\n */\nfunction fixGeckoSelectionAfterBr( focus: ReturnType, domSelection: DomSelection ) {\n\tconst parent = focus!.parent;\n\n\t// This fix works only when the focus point is at the very end of an element.\n\t// There is no point in running it in cases unrelated to the browser bug.\n\tif ( parent.nodeType != Node.ELEMENT_NODE || focus!.offset != parent.childNodes.length - 1 ) {\n\t\treturn;\n\t}\n\n\tconst childAtOffset = parent.childNodes[ focus!.offset ];\n\n\t// To stay on the safe side, the fix being as specific as possible, it targets only the\n\t// selection which is at the very end of the element and preceded by
.\n\tif ( childAtOffset && ( childAtOffset as DomElement ).tagName == 'BR' ) {\n\t\tdomSelection.addRange( domSelection.getRangeAt( 0 ) );\n\t}\n}\n\nfunction filterOutFakeSelectionContainer( domChildList: Array | NodeList, fakeSelectionContainer: DomElement | null ) {\n\tconst childList = Array.from( domChildList );\n\n\tif ( childList.length == 0 || !fakeSelectionContainer ) {\n\t\treturn childList;\n\t}\n\n\tconst last = childList[ childList.length - 1 ];\n\n\tif ( last == fakeSelectionContainer ) {\n\t\tchildList.pop();\n\t}\n\n\treturn childList;\n}\n\n/**\n * Creates a fake selection container for a given document.\n */\nfunction createFakeSelectionContainer( domDocument: DomDocument ): DomElement {\n\tconst container = domDocument.createElement( 'div' );\n\n\tcontainer.className = 'ck-fake-selection-container';\n\n\tObject.assign( container.style, {\n\t\tposition: 'fixed',\n\t\ttop: 0,\n\t\tleft: '-9999px',\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/752.\n\t\twidth: '42px'\n\t} );\n\n\t// Fill it with a text node so we can update it later.\n\tcontainer.textContent = '\\u00A0';\n\n\treturn container;\n}\n\n/**\n * Checks if text needs to be updated and possibly updates it by removing and inserting only parts\n * of the data from the existing text node to reduce impact on the IME composition.\n *\n * @param domText DOM text node to update.\n * @param expectedText The expected data of a text node.\n */\nfunction updateTextNode( domText: DomText, expectedText: string ) {\n\tconst actualText = domText.data;\n\n\tif ( actualText == expectedText ) {\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Text node does not need update:',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '',\n\t\t// @if CK_DEBUG_TYPING // \t\t`\"${ domText.data }\" (${ domText.data.length })`\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\treturn;\n\t}\n\n\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Update text node:',\n\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '',\n\t// @if CK_DEBUG_TYPING // \t\t`\"${ domText.data }\" (${ domText.data.length }) -> \"${ expectedText }\" (${ expectedText.length })`\n\t// @if CK_DEBUG_TYPING // \t);\n\t// @if CK_DEBUG_TYPING // }\n\n\tconst actions = fastDiff( actualText, expectedText );\n\n\tfor ( const action of actions ) {\n\t\tif ( action.type === 'insert' ) {\n\t\t\tdomText.insertData( action.index, action.values.join( '' ) );\n\t\t} else { // 'delete'\n\t\t\tdomText.deleteData( action.index, action.howMany );\n\t\t}\n\t}\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/**\n * @module engine/view/domconverter\n */\n\n/* globals Node, NodeFilter, DOMParser */\n\nimport ViewText from './text.js';\nimport ViewElement from './element.js';\nimport ViewUIElement from './uielement.js';\nimport ViewPosition from './position.js';\nimport ViewRange from './range.js';\nimport ViewSelection from './selection.js';\nimport ViewDocumentFragment from './documentfragment.js';\nimport ViewTreeWalker from './treewalker.js';\nimport { default as Matcher, type MatcherPattern } from './matcher.js';\nimport {\n\tBR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER,\n\tgetDataWithoutFiller, isInlineFiller, startsWithFiller\n} from './filler.js';\n\nimport {\n\tglobal,\n\tlogWarning,\n\tindexOf,\n\tgetAncestors,\n\tisText,\n\tisComment,\n\tisValidAttributeName,\n\tfirst,\n\tenv\n} from '@ckeditor/ckeditor5-utils';\n\nimport type ViewNode from './node.js';\nimport type Document from './document.js';\nimport type DocumentSelection from './documentselection.js';\nimport type EditableElement from './editableelement.js';\nimport type ViewTextProxy from './textproxy.js';\nimport type ViewRawElement from './rawelement.js';\n\ntype DomNode = globalThis.Node;\ntype DomElement = globalThis.HTMLElement;\ntype DomDocument = globalThis.Document;\ntype DomDocumentFragment = globalThis.DocumentFragment;\ntype DomComment = globalThis.Comment;\ntype DomRange = globalThis.Range;\ntype DomText = globalThis.Text;\ntype DomSelection = globalThis.Selection;\n\nconst BR_FILLER_REF = BR_FILLER( global.document ); // eslint-disable-line new-cap\nconst NBSP_FILLER_REF = NBSP_FILLER( global.document ); // eslint-disable-line new-cap\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER( global.document ); // eslint-disable-line new-cap\nconst UNSAFE_ATTRIBUTE_NAME_PREFIX = 'data-ck-unsafe-attribute-';\nconst UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';\n\n/**\n * `DomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n * {@link module:engine/view/domconverter~DomConverter#bindElements bindings} between these nodes.\n *\n * An instance of the DOM converter is available under\n * {@link module:engine/view/view~View#domConverter `editor.editing.view.domConverter`}.\n *\n * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~Renderer}), does not keep the\n * state of a tree nor keeps the synchronization between the tree view and the DOM tree (use {@link module:engine/view/document~Document}).\n *\n * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n */\nexport default class DomConverter {\n\tpublic readonly document: Document;\n\n\t/**\n\t * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.\n\t */\n\tpublic readonly renderingMode: 'data' | 'editing';\n\n\t/**\n\t * The mode of a block filler used by the DOM converter.\n\t */\n\tpublic blockFillerMode: BlockFillerMode;\n\n\t/**\n\t * Elements which are considered pre-formatted elements.\n\t */\n\tpublic readonly preElements: Array;\n\n\t/**\n\t * Elements which are considered block elements (and hence should be filled with a\n\t * {@link #isBlockFiller block filler}).\n\t *\n\t * Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t *\n\t * You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t */\n\tpublic readonly blockElements: Array;\n\n\t/**\n\t * A list of elements that exist inline (in text) but their inner structure cannot be edited because\n\t * of the way they are rendered by the browser. They are mostly HTML form elements but there are other\n\t * elements such as `` or `' +\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'spotify',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(album\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(track\\/\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'youtube',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)(?:&t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^youtube\\.com\\/embed\\/([\\w-]+)(?:\\?start=(\\d+))?/,\n\t\t\t\t\t\t/^youtu\\.be\\/([\\w-]+)(?:\\?t=(\\d+))?/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\t\t\t\t\t\tconst time = match[ 2 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'vimeo',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^vimeo\\.com\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^player\\.vimeo\\.com\\/video\\/(\\d+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'instagram',\n\t\t\t\t\turl: /^instagram\\.com\\/p\\/(\\w+)/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'twitter',\n\t\t\t\t\turl: /^twitter\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'googleMaps',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^google\\.com\\/maps/,\n\t\t\t\t\t\t/^goo\\.gl\\/maps/,\n\t\t\t\t\t\t/^maps\\.google\\.com/,\n\t\t\t\t\t\t/^maps\\.app\\.goo\\.gl/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'flickr',\n\t\t\t\t\turl: /^flickr\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'facebook',\n\t\t\t\t\turl: /^facebook\\.com/\n\t\t\t\t}\n\t\t\t]\n\t\t} as MediaEmbedConfig );\n\n\t\tthis.registry = new MediaRegistry( editor.locale, editor.config.get( 'mediaEmbed' )! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst renderMediaPreview = editor.config.get( 'mediaEmbed.previewsInData' );\n\t\tconst elementName = editor.config.get( 'mediaEmbed.elementName' )!;\n\n\t\tconst registry = this.registry;\n\n\t\teditor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );\n\n\t\t// Configure the schema.\n\t\tschema.register( 'media', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [ 'url' ]\n\t\t} );\n\n\t\t// Model -> Data\n\t\tconversion.for( 'dataDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\n\t\t\t\treturn createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderMediaPreview: !!url && renderMediaPreview\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> Data (url -> data-oembed-url)\n\t\tconversion.for( 'dataDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderMediaPreview\n\t\t\t} ) );\n\n\t\t// Model -> View (element)\n\t\tconversion.for( 'editingDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\t\t\t\tconst figure = createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderForEditingView: true\n\t\t\t\t} );\n\n\t\t\t\treturn toMediaWidget( figure, writer, t( 'media widget' ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> View (url -> data-oembed-url)\n\t\tconversion.for( 'editingDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderForEditingView: true\n\t\t\t} ) );\n\n\t\t// View -> Model (data-oembed-url -> url)\n\t\tconversion.for( 'upcast' )\n\t\t\t// Upcast semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: element => [ 'oembed', elementName ].includes( element.name ) && element.getAttribute( 'url' ) ?\n\t\t\t\t\t{ name: true } :\n\t\t\t\t\tnull,\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Upcast non-semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t'data-oembed-url': true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'data-oembed-url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Consume `
` elements, that were left after upcast.\n\t\t\t.add( dispatcher => {\n\t\t\t\tconst converter: GetCallback = ( evt, data, conversionApi ) => {\n\t\t\t\t\tif ( !conversionApi.consumable.consume( data.viewItem, { name: true, classes: 'media' } ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\t\tdata.modelCursor = modelCursor;\n\n\t\t\t\t\tconst modelElement = first( modelRange!.getItems() );\n\n\t\t\t\t\tif ( !modelElement ) {\n\t\t\t\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'media' } );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdispatcher.on( 'element:figure', converter );\n\t\t\t} );\n\t}\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/**\n * @module media-embed/automediaembed\n */\n\nimport { type Editor, Plugin } from 'ckeditor5/src/core.js';\nimport { LiveRange, LivePosition } from 'ckeditor5/src/engine.js';\nimport { Clipboard, type ClipboardPipeline } from 'ckeditor5/src/clipboard.js';\nimport { Delete } from 'ckeditor5/src/typing.js';\nimport { Undo, type UndoCommand } from 'ckeditor5/src/undo.js';\nimport { global } from 'ckeditor5/src/utils.js';\n\nimport MediaEmbedEditing from './mediaembedediting.js';\nimport { insertMedia } from './utils.js';\nimport type MediaEmbedCommand from './mediaembedcommand.js';\n\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n\n/**\n * The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */\nexport default class AutoMediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ Clipboard, Delete, Undo ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AutoMediaEmbed' as const;\n\t}\n\n\t/**\n\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t * cleaning of the timeout.\n\t */\n\tprivate _timeoutId: number | null;\n\n\t/**\n\t * The position where the `` element will be inserted after the timeout,\n\t * determined each time the new content is pasted into the document.\n\t */\n\tprivate _positionToInsert: LivePosition | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._timeoutId = null;\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into media.\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tthis.listenTo( clipboardPipeline, 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange()!;\n\n\t\t\tconst leftLivePosition = LivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = LivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedMediaBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\tconst undoCommand: UndoCommand = editor.commands.get( 'undo' )!;\n\t\tundoCommand.on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert!.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing media.\n\t * When the URL is found, it is automatically converted into media.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */\n\tprivate _embedMediaBetweenPositions( leftPosition: LivePosition, rightPosition: LivePosition ): void {\n\t\tconst editor = this.editor;\n\t\tconst mediaRegistry = editor.plugins.get( MediaEmbedEditing ).registry;\n\t\t// TODO: Use marker instead of LiveRange & LivePositions.\n\t\tconst urlRange = new LiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\n\t\tlet url = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\turl += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\turl = url.trim();\n\n\t\t// If the URL does not match to universal URL regexp, let's skip that.\n\t\tif ( !url.match( URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If the URL represents a media, let's use it.\n\t\tif ( !mediaRegistry.hasMedia( url ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaEmbedCommand: MediaEmbedCommand = editor.commands.get( 'mediaEmbed' )!;\n\n\t\t// Do not anything if media element cannot be inserted at the current position (#47).\n\t\tif ( !mediaEmbedCommand.isEnabled ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position won't be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = LivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = global.window.setTimeout( () => {\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition: LivePosition | null = null;\n\n\t\t\t\t// Check if position where the media element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use document.selection - default behavior of model.insertContent().\n\t\t\t\tif ( this._positionToInsert!.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert;\n\t\t\t\t}\n\n\t\t\t\tinsertMedia( editor.model, url, insertionPosition, false );\n\n\t\t\t\tthis._positionToInsert!.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\n\t\t\teditor.plugins.get( Delete ).requestUndoOnBackspace();\n\t\t}, 100 );\n\t}\n}\n","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./mediaform.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/**\n * @module media-embed/ui/mediaformview\n */\n\nimport {\n\ttype InputTextView,\n\tButtonView,\n\tFocusCycler,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tsubmitHandler,\n\ttype FocusableView\n} from 'ckeditor5/src/ui.js';\nimport { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';\nimport { icons } from 'ckeditor5/src/core.js';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/mediaform.css';\n\n/**\n * The media form view controller class.\n *\n * See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n */\nexport default class MediaFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * The value of the URL input.\n\t */\n\tdeclare public mediaURLInputValue: string;\n\n\t/**\n\t * The URL input view.\n\t */\n\tpublic urlInputView: LabeledFieldView;\n\n\t/**\n\t * The Save button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * The Cancel button view.\n\t */\n\tpublic cancelButtonView: ButtonView;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprivate readonly _focusables: ViewCollection;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<( v: MediaFormView ) => string | undefined>;\n\n\t/**\n\t * The default info text for the {@link #urlInputView}.\n\t */\n\tprivate _urlInputViewInfoDefault?: string;\n\n\t/**\n\t * The info text with an additional tip for the {@link #urlInputView},\n\t * displayed when the input has some value.\n\t */\n\tprivate _urlInputViewInfoTip?: string;\n\n\t/**\n\t * @param validators Form validators used by {@link #isValid}.\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( validators: Array<( v: MediaFormView ) => string | undefined>, locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set( 'mediaURLInputValue', '' );\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\tthis.saveButtonView = this._createButton( t( 'Save' ), icons.check, 'ck-button-save' );\n\t\tthis.saveButtonView.type = 'submit';\n\t\tthis.saveButtonView.bind( 'isEnabled' ).to( this, 'mediaURLInputValue', value => !!value );\n\n\t\tthis.cancelButtonView = this._createButton( t( 'Cancel' ), icons.cancel, 'ck-button-cancel', 'cancel' );\n\n\t\tthis._focusables = new ViewCollection();\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis._validators = validators;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-media-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView,\n\t\t\t\tthis.saveButtonView,\n\t\t\t\tthis.cancelButtonView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.urlInputView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.cancelButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tconst stopPropagation = ( data: KeyboardEvent ) => data.stopPropagation();\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * The native DOM `value` of the {@link #urlInputView} element.\n\t *\n\t * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t * which works one way only and may not represent the actual state of the component in the DOM.\n\t */\n\tpublic get url(): string {\n\t\treturn this.urlInputView.fieldView.element!.value.trim();\n\t}\n\n\tpublic set url( url: string ) {\n\t\tthis.urlInputView.fieldView.element!.value = url.trim();\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetFormStatus(): void {\n\t\tthis.urlInputView.errorText = null;\n\t\tthis.urlInputView.infoText = this._urlInputViewInfoDefault!;\n\t}\n\n\t/**\n\t * Creates a labeled input view.\n\t *\n\t * @returns Labeled input view instance.\n\t */\n\tprivate _createUrlInput(): LabeledFieldView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst inputField = labeledInput.fieldView;\n\n\t\tthis._urlInputViewInfoDefault = t( 'Paste the media URL in the input.' );\n\t\tthis._urlInputViewInfoTip = t( 'Tip: Paste the URL into the content to embed faster.' );\n\n\t\tlabeledInput.label = t( 'Media URL' );\n\t\tlabeledInput.infoText = this._urlInputViewInfoDefault;\n\n\t\tinputField.on( 'input', () => {\n\t\t\t// Display the tip text only when there is some value. Otherwise fall back to the default info text.\n\t\t\tlabeledInput.infoText = inputField.element!.value ? this._urlInputViewInfoTip! : this._urlInputViewInfoDefault!;\n\t\t\tthis.mediaURLInputValue = inputField.element!.value.trim();\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Creates a button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t * @param className The additional button CSS class name.\n\t * @param eventName An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns The button view instance.\n\t */\n\tprivate _createButton( label: string, icon: string, className: string, eventName?: string ): ButtonView {\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: className\n\t\t\t}\n\t\t} );\n\n\t\tif ( eventName ) {\n\t\t\tbutton.delegate( 'execute' ).to( this, eventName );\n\t\t}\n\n\t\treturn button;\n\t}\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/**\n * @module media-embed/mediaembedui\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { createDropdown, CssTransitionDisablerMixin, type DropdownView } from 'ckeditor5/src/ui.js';\n\nimport MediaFormView from './ui/mediaformview.js';\nimport MediaEmbedEditing from './mediaembedediting.js';\nimport mediaIcon from '../theme/icons/media.svg';\nimport type MediaEmbedCommand from './mediaembedcommand.js';\nimport type { LocaleTranslate } from 'ckeditor5/src/utils.js';\nimport type MediaRegistry from './mediaregistry.js';\n\n/**\n * The media embed UI plugin.\n */\nexport default class MediaEmbedUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ MediaEmbedEditing ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst command: MediaEmbedCommand = editor.commands.get( 'mediaEmbed' )!;\n\n\t\teditor.ui.componentFactory.add( 'mediaEmbed', locale => {\n\t\t\tconst dropdown = createDropdown( locale );\n\n\t\t\tthis._setUpDropdown( dropdown, command );\n\n\t\t\treturn dropdown;\n\t\t} );\n\t}\n\n\tprivate _setUpDropdown( dropdown: DropdownView, command: MediaEmbedCommand ): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst button = dropdown.buttonView;\n\t\tconst registry = editor.plugins.get( MediaEmbedEditing ).registry;\n\n\t\tdropdown.once( 'change:isOpen', () => {\n\t\t\tconst form = new ( CssTransitionDisablerMixin( MediaFormView ) )( getFormValidators( editor.t, registry ), editor.locale );\n\n\t\t\tdropdown.panelView.children.add( form );\n\n\t\t\t// Note: Use the low priority to make sure the following listener starts working after the\n\t\t\t// default action of the drop-down is executed (i.e. the panel showed up). Otherwise, the\n\t\t\t// invisible form/input cannot be focused/selected.\n\t\t\tbutton.on( 'open', () => {\n\t\t\t\tform.disableCssTransitions();\n\n\t\t\t\t// Make sure that each time the panel shows up, the URL field remains in sync with the value of\n\t\t\t\t// the command. If the user typed in the input, then canceled (`urlInputView#fieldView#value` stays\n\t\t\t\t// unaltered) and re-opened it without changing the value of the media command (e.g. because they\n\t\t\t\t// didn't change the selection), they would see the old value instead of the actual value of the\n\t\t\t\t// command.\n\t\t\t\tform.url = command.value || '';\n\t\t\t\tform.urlInputView.fieldView.select();\n\t\t\t\tform.enableCssTransitions();\n\t\t\t}, { priority: 'low' } );\n\n\t\t\tdropdown.on( 'submit', () => {\n\t\t\t\tif ( form.isValid() ) {\n\t\t\t\t\teditor.execute( 'mediaEmbed', form.url );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdown.on( 'change:isOpen', () => form.resetFormStatus() );\n\t\t\tdropdown.on( 'cancel', () => {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tform.delegate( 'submit', 'cancel' ).to( dropdown );\n\t\t\tform.urlInputView.fieldView.bind( 'value' ).to( command, 'value' );\n\n\t\t\t// Form elements should be read-only when corresponding commands are disabled.\n\t\t\tform.urlInputView.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t} );\n\n\t\tdropdown.bind( 'isEnabled' ).to( command );\n\n\t\tbutton.set( {\n\t\t\tlabel: t( 'Insert media' ),\n\t\t\ticon: mediaIcon,\n\t\t\ttooltip: true\n\t\t} );\n\t}\n}\n\nfunction getFormValidators( t: LocaleTranslate, registry: MediaRegistry ): Array<( v: MediaFormView ) => string | undefined> {\n\treturn [\n\t\tform => {\n\t\t\tif ( !form.url.length ) {\n\t\t\t\treturn t( 'The URL must not be empty.' );\n\t\t\t}\n\t\t},\n\t\tform => {\n\t\t\tif ( !registry.hasMedia( form.url ) ) {\n\t\t\t\treturn t( 'This media URL is not supported.' );\n\t\t\t}\n\t\t}\n\t];\n}\n","export default \"\";","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./mediaembed.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/**\n * @module paste-from-office/filters/utils\n */\n\n/**\n * Normalizes CSS length value to 'px'.\n *\n * @internal\n */\nexport function convertCssLengthToPx( value: string ): string {\n\tconst numericValue = parseFloat( value );\n\n\tif ( value.endsWith( 'pt' ) ) {\n\t\t// 1pt = 1in / 72\n\t\treturn toPx( numericValue * 96 / 72 );\n\t}\n\telse if ( value.endsWith( 'pc' ) ) {\n\t\t// 1pc = 12pt = 1in / 6.\n\t\treturn toPx( numericValue * 12 * 96 / 72 );\n\t}\n\telse if ( value.endsWith( 'in' ) ) {\n\t\t// 1in = 2.54cm = 96px\n\t\treturn toPx( numericValue * 96 );\n\t}\n\telse if ( value.endsWith( 'cm' ) ) {\n\t\t// 1cm = 96px / 2.54\n\t\treturn toPx( numericValue * 96 / 2.54 );\n\t}\n\telse if ( value.endsWith( 'mm' ) ) {\n\t\t// 1mm = 1cm / 10\n\t\treturn toPx( numericValue / 10 * 96 / 2.54 );\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true for value with 'px' unit.\n *\n * @internal\n */\nexport function isPx( value?: string ): value is string {\n\treturn value !== undefined && value.endsWith( 'px' );\n}\n\n/**\n * Returns a rounded 'px' value.\n *\n * @internal\n */\nexport function toPx( value: number ): string {\n\treturn value.toFixed( 2 ).replace( /\\.?0+$/, '' ) + 'px';\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/**\n * @module paste-from-office/filters/list\n */\n\nimport {\n\tMatcher,\n\tUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode,\n\ttype ViewText\n} from 'ckeditor5/src/engine.js';\n\nimport {\n\tconvertCssLengthToPx,\n\tisPx,\n\ttoPx\n} from './utils.js';\n\n/**\n * Transforms Word specific list-like elements to the semantic HTML lists.\n *\n * Lists in Word are represented by block elements with special attributes like:\n *\n * ```xml\n *

...

// Paragraph based list.\n *

...

// Heading 1 based list.\n * ```\n *\n * @param documentFragment The view structure to be transformed.\n * @param stylesString Styles from which list-like elements styling will be extracted.\n */\nexport function transformListItemLikeElementsIntoLists(\n\tdocumentFragment: ViewDocumentFragment,\n\tstylesString: string,\n\thasMultiLevelListPlugin: boolean\n): void {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst writer = new UpcastWriter( documentFragment.document );\n\tconst itemLikeElements = findAllItemLikeElements( documentFragment, writer );\n\n\tif ( !itemLikeElements.length ) {\n\t\treturn;\n\t}\n\n\tconst encounteredLists: Record = {};\n\n\tconst stack: Array;\n\t}> = [];\n\n\tfor ( const itemLikeElement of itemLikeElements ) {\n\t\tif ( itemLikeElement.indent !== undefined ) {\n\t\t\tif ( !isListContinuation( itemLikeElement ) ) {\n\t\t\t\tstack.length = 0;\n\t\t\t}\n\n\t\t\t// Combined list ID for addressing encounter lists counters.\n\t\t\tconst originalListId = `${ itemLikeElement.id }:${ itemLikeElement.indent }`;\n\n\t\t\t// Normalized list item indentation.\n\t\t\tconst indent = Math.min( itemLikeElement.indent - 1, stack.length );\n\n\t\t\t// Trimming of the list stack on list ID change.\n\t\t\tif ( indent < stack.length && stack[ indent ].id !== itemLikeElement.id ) {\n\t\t\t\tstack.length = indent;\n\t\t\t}\n\n\t\t\t// Trimming of the list stack on lower indent list encountered.\n\t\t\tif ( indent < stack.length - 1 ) {\n\t\t\t\tstack.length = indent + 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst listStyle = detectListStyle( itemLikeElement, stylesString );\n\n\t\t\t\t// Create a new OL/UL if required (greater indent or different list type).\n\t\t\t\tif ( indent > stack.length - 1 || stack[ indent ].listElement.name != listStyle.type ) {\n\t\t\t\t\t// Check if there is some start index to set from a previous list.\n\t\t\t\t\tif (\n\t\t\t\t\t\tindent == 0 &&\n\t\t\t\t\t\tlistStyle.type == 'ol' &&\n\t\t\t\t\t\titemLikeElement.id !== undefined &&\n\t\t\t\t\t\tencounteredLists[ originalListId ]\n\t\t\t\t\t) {\n\t\t\t\t\t\tlistStyle.startIndex = encounteredLists[ originalListId ];\n\t\t\t\t\t}\n\n\t\t\t\t\tconst listElement = createNewEmptyList( listStyle, writer, hasMultiLevelListPlugin );\n\n\t\t\t\t\t// Apply list padding only if we have margins for the item and the parent item.\n\t\t\t\t\tif (\n\t\t\t\t\t\tisPx( itemLikeElement.marginLeft ) &&\n\t\t\t\t\t\t( indent == 0 || isPx( stack[ indent - 1 ].marginLeft ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\tlet marginLeft = itemLikeElement.marginLeft;\n\n\t\t\t\t\t\tif ( indent > 0 ) {\n\t\t\t\t\t\t\t// Convert the padding from absolute to relative.\n\t\t\t\t\t\t\tmarginLeft = toPx( parseFloat( marginLeft ) - parseFloat( stack[ indent - 1 ].marginLeft! ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twriter.setStyle( 'padding-left', marginLeft, listElement );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Insert the new OL/UL.\n\t\t\t\t\tif ( stack.length == 0 ) {\n\t\t\t\t\t\tconst parent = itemLikeElement.element.parent!;\n\t\t\t\t\t\tconst index = parent.getChildIndex( itemLikeElement.element ) + 1;\n\n\t\t\t\t\t\twriter.insertChild( index, listElement, parent );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst parentListItems = stack[ indent - 1 ].listItemElements;\n\n\t\t\t\t\t\twriter.appendChild( listElement, parentListItems[ parentListItems.length - 1 ] );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the list stack for other items to reference.\n\t\t\t\t\tstack[ indent ] = {\n\t\t\t\t\t\t...itemLikeElement,\n\t\t\t\t\t\tlistElement,\n\t\t\t\t\t\tlistItemElements: []\n\t\t\t\t\t};\n\n\t\t\t\t\t// Prepare list counter for start index.\n\t\t\t\t\tif ( indent == 0 && itemLikeElement.id !== undefined ) {\n\t\t\t\t\t\tencounteredLists[ originalListId ] = listStyle.startIndex || 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Use LI if it is already it or create a new LI element.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/15964\n\t\t\tconst listItem = itemLikeElement.element.name == 'li' ? itemLikeElement.element : writer.createElement( 'li' );\n\n\t\t\t// Append the LI to OL/UL.\n\t\t\twriter.appendChild( listItem, stack[ indent ].listElement );\n\t\t\tstack[ indent ].listItemElements.push( listItem );\n\n\t\t\t// Increment list counter.\n\t\t\tif ( indent == 0 && itemLikeElement.id !== undefined ) {\n\t\t\t\tencounteredLists[ originalListId ]++;\n\t\t\t}\n\n\t\t\t// Append list block to LI.\n\t\t\tif ( itemLikeElement.element != listItem ) {\n\t\t\t\twriter.appendChild( itemLikeElement.element, listItem );\n\t\t\t}\n\n\t\t\t// Clean list block.\n\t\t\tremoveBulletElement( itemLikeElement.element, writer );\n\t\t\twriter.removeStyle( 'text-indent', itemLikeElement.element ); // #12361\n\t\t\twriter.removeStyle( 'margin-left', itemLikeElement.element );\n\t\t}\n\t\telse {\n\t\t\t// Other blocks in a list item.\n\t\t\tconst stackItem = stack.find( stackItem => stackItem.marginLeft == itemLikeElement.marginLeft );\n\n\t\t\t// This might be a paragraph that has known margin, but it is not a real list block.\n\t\t\tif ( stackItem ) {\n\t\t\t\tconst listItems = stackItem.listItemElements;\n\n\t\t\t\t// Append block to LI.\n\t\t\t\twriter.appendChild( itemLikeElement.element, listItems[ listItems.length - 1 ] );\n\t\t\t\twriter.removeStyle( 'margin-left', itemLikeElement.element );\n\t\t\t} else {\n\t\t\t\tstack.length = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Removes paragraph wrapping content inside a list item.\n */\nexport function unwrapParagraphInListItem(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): void {\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'li' ) ) {\n\t\t\t// Google Docs allows for single paragraph inside LI.\n\t\t\tconst firstChild = element.getChild( 0 );\n\n\t\t\tif ( firstChild && firstChild.is( 'element', 'p' ) ) {\n\t\t\t\twriter.unwrapElement( firstChild );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds all list-like elements in a given document fragment.\n *\n * @param documentFragment Document fragment in which to look for list-like nodes.\n * @returns Array of found list-like items. Each item is an object containing:\n */\nfunction findAllItemLikeElements(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): Array {\n\tconst range = writer.createRangeIn( documentFragment );\n\tconst itemLikeElements: Array = [];\n\tconst foundMargins = new Set();\n\n\tfor ( const item of range.getItems() ) {\n\t\t// https://github.com/ckeditor/ckeditor5/issues/15964\n\t\tif ( !item.is( 'element' ) || !item.name.match( /^(p|h\\d+|li|div)$/ ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Try to rely on margin-left style to find paragraphs visually aligned with previously encountered list item.\n\t\tlet marginLeft = getMarginLeftNormalized( item );\n\n\t\t// Ignore margin-left 0 style if there is no MsoList... class.\n\t\tif (\n\t\t\tmarginLeft !== undefined &&\n\t\t\tparseFloat( marginLeft ) == 0 &&\n\t\t\t!Array.from( item.getClassNames() ).find( className => className.startsWith( 'MsoList' ) )\n\t\t) {\n\t\t\tmarginLeft = undefined;\n\t\t}\n\n\t\t// List item or a following list item block.\n\t\tif ( item.hasStyle( 'mso-list' ) || marginLeft !== undefined && foundMargins.has( marginLeft ) ) {\n\t\t\tconst itemData = getListItemData( item );\n\n\t\t\titemLikeElements.push( {\n\t\t\t\telement: item,\n\t\t\t\tid: itemData.id,\n\t\t\t\torder: itemData.order,\n\t\t\t\tindent: itemData.indent,\n\t\t\t\tmarginLeft\n\t\t\t} );\n\n\t\t\tif ( marginLeft !== undefined ) {\n\t\t\t\tfoundMargins.add( marginLeft );\n\t\t\t}\n\t\t}\n\t\t// Clear found margins as we found block after a list.\n\t\telse {\n\t\t\tfoundMargins.clear();\n\t\t}\n\t}\n\n\treturn itemLikeElements;\n}\n\n/**\n * Whether the given element is possibly a list continuation. Previous element was wrapped into a list\n * or the current element already is inside a list.\n */\nfunction isListContinuation( currentItem: ListLikeElement ) {\n\tconst previousSibling = currentItem.element.previousSibling;\n\n\tif ( !previousSibling ) {\n\t\t// If it's a li inside ul or ol like in here: https://github.com/ckeditor/ckeditor5/issues/15964.\n\t\treturn isList( currentItem.element.parent as ViewElement );\n\t}\n\n\t// Even with the same id the list does not have to be continuous (#43).\n\treturn isList( previousSibling );\n}\n\nfunction isList( element: ViewNode ) {\n\treturn element.is( 'element', 'ol' ) || element.is( 'element', 'ul' );\n}\n\n/**\n * Extracts list item style from the provided CSS.\n *\n * List item style is extracted from the CSS stylesheet. Each list with its specific style attribute\n * value (`mso-list:l1 level1 lfo1`) has its dedicated properties in a CSS stylesheet defined with a selector like:\n *\n * ```css\n * @list l1:level1 { ... }\n * ```\n *\n * It contains `mso-level-number-format` property which defines list numbering/bullet style. If this property\n * is not defined it means default `decimal` numbering.\n *\n * Here CSS string representation is used as `mso-level-number-format` property is an invalid CSS property\n * and will be removed during CSS parsing.\n *\n * @param listLikeItem List-like item for which list style will be searched for. Usually\n * a result of `findAllItemLikeElements()` function.\n * @param stylesString CSS stylesheet.\n * @returns An object with properties:\n *\n * * type - List type, could be `ul` or `ol`.\n * * startIndex - List start index, valid only for ordered lists.\n * * style - List style, for example: `decimal`, `lower-roman`, etc. It is extracted\n * directly from Word stylesheet and adjusted to represent proper values for the CSS `list-style-type` property.\n * If it cannot be adjusted, the `null` value is returned.\n */\nfunction detectListStyle( listLikeItem: ListLikeElement, stylesString: string ) {\n\tconst listStyleRegexp = new RegExp( `@list l${ listLikeItem.id }:level${ listLikeItem.indent }\\\\s*({[^}]*)`, 'gi' );\n\tconst listStyleTypeRegex = /mso-level-number-format:([^;]{0,100});/gi;\n\tconst listStartIndexRegex = /mso-level-start-at:\\s{0,100}([0-9]{0,10})\\s{0,100};/gi;\n\tconst legalStyleListRegex = new RegExp( `@list\\\\s+l${ listLikeItem.id }:level\\\\d\\\\s*{[^{]*mso-level-text:\"%\\\\d\\\\\\\\.`, 'gi' );\n\tconst multiLevelNumberFormatTypeRegex = new RegExp( `@list l${ listLikeItem.id }:level\\\\d\\\\s*{[^{]*mso-level-number-format:`, 'gi' );\n\n\tconst legalStyleListMatch = legalStyleListRegex.exec( stylesString );\n\tconst multiLevelNumberFormatMatch = multiLevelNumberFormatTypeRegex.exec( stylesString );\n\n\t// Multi level lists in Word have mso-level-number-format attribute except legal lists,\n\t// so we used that. If list has legal list match and doesn't has mso-level-number-format\n\t// then this is legal-list.\n\tconst islegalStyleList = legalStyleListMatch && !multiLevelNumberFormatMatch;\n\n\tconst listStyleMatch = listStyleRegexp.exec( stylesString );\n\n\tlet listStyleType = 'decimal'; // Decimal is default one.\n\tlet type = 'ol'; //
    is default list.\n\tlet startIndex = null;\n\n\tif ( listStyleMatch && listStyleMatch[ 1 ] ) {\n\t\tconst listStyleTypeMatch = listStyleTypeRegex.exec( listStyleMatch[ 1 ] );\n\n\t\tif ( listStyleTypeMatch && listStyleTypeMatch[ 1 ] ) {\n\t\t\tlistStyleType = listStyleTypeMatch[ 1 ].trim();\n\t\t\ttype = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';\n\t\t}\n\n\t\t// Styles for the numbered lists are always defined in the Word CSS stylesheet.\n\t\t// Unordered lists MAY contain a value for the Word CSS definition `mso-level-text` but sometimes\n\t\t// this tag is missing. And because of that, we cannot depend on that. We need to predict the list style value\n\t\t// based on the list style marker element.\n\t\tif ( listStyleType === 'bullet' ) {\n\t\t\tconst bulletedStyle = findBulletedListStyle( listLikeItem.element );\n\n\t\t\tif ( bulletedStyle ) {\n\t\t\t\tlistStyleType = bulletedStyle;\n\t\t\t}\n\t\t} else {\n\t\t\tconst listStartIndexMatch = listStartIndexRegex.exec( listStyleMatch[ 1 ] );\n\n\t\t\tif ( listStartIndexMatch && listStartIndexMatch[ 1 ] ) {\n\t\t\t\tstartIndex = parseInt( listStartIndexMatch[ 1 ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( islegalStyleList ) {\n\t\t\ttype = 'ol';\n\t\t}\n\t}\n\n\treturn {\n\t\ttype,\n\t\tstartIndex,\n\t\tstyle: mapListStyleDefinition( listStyleType ),\n\t\tisLegalStyleList: islegalStyleList\n\t};\n}\n\n/**\n * Tries to extract the `list-style-type` value based on the marker element for bulleted list.\n */\nfunction findBulletedListStyle( element: ViewElement ) {\n\t// https://github.com/ckeditor/ckeditor5/issues/15964\n\tif ( element.name == 'li' && element.parent!.name == 'ul' && element.parent!.hasAttribute( 'type' ) ) {\n\t\treturn element.parent!.getAttribute( 'type' );\n\t}\n\n\tconst listMarkerElement = findListMarkerNode( element );\n\n\tif ( !listMarkerElement ) {\n\t\treturn null;\n\t}\n\n\tconst listMarker = listMarkerElement._data;\n\n\tif ( listMarker === 'o' ) {\n\t\treturn 'circle';\n\t} else if ( listMarker === '·' ) {\n\t\treturn 'disc';\n\t}\n\t// Word returns '§' instead of '■' for the square list style.\n\telse if ( listMarker === '§' ) {\n\t\treturn 'square';\n\t}\n\n\treturn null;\n}\n\n/**\n * Tries to find a text node that represents the marker element (list-style-type).\n */\nfunction findListMarkerNode( element: ViewElement ): ViewText | null {\n\t// If the first child is a text node, it is the data for the element.\n\t// The list-style marker is not present here.\n\tif ( element.getChild( 0 )!.is( '$text' ) ) {\n\t\treturn null;\n\t}\n\n\tfor ( const childNode of element.getChildren() ) {\n\t\t// The list-style marker will be inside the `` element. Let's ignore all non-span elements.\n\t\t// It may happen that the `` element is added as the first child. Most probably, it's an anchor element.\n\t\tif ( !childNode.is( 'element', 'span' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst textNodeOrElement = childNode.getChild( 0 );\n\n\t\tif ( !textNodeOrElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If already found the marker element, use it.\n\t\tif ( textNodeOrElement.is( '$text' ) ) {\n\t\t\treturn textNodeOrElement;\n\t\t}\n\n\t\treturn ( textNodeOrElement as any ).getChild( 0 );\n\t}\n\n\t/* istanbul ignore next -- @preserve */\n\treturn null;\n}\n\n/**\n * Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.\n */\nfunction mapListStyleDefinition( value: string ) {\n\tif ( value.startsWith( 'arabic-leading-zero' ) ) {\n\t\treturn 'decimal-leading-zero';\n\t}\n\n\tswitch ( value ) {\n\t\tcase 'alpha-upper':\n\t\t\treturn 'upper-alpha';\n\t\tcase 'alpha-lower':\n\t\t\treturn 'lower-alpha';\n\t\tcase 'roman-upper':\n\t\t\treturn 'upper-roman';\n\t\tcase 'roman-lower':\n\t\t\treturn 'lower-roman';\n\t\tcase 'circle':\n\t\tcase 'disc':\n\t\tcase 'square':\n\t\t\treturn value;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates a new list OL/UL element.\n */\nfunction createNewEmptyList(\n\tlistStyle: ReturnType,\n\twriter: UpcastWriter,\n\thasMultiLevelListPlugin: boolean\n) {\n\tconst list = writer.createElement( listStyle.type );\n\n\t// We do not support modifying the marker for a particular list item.\n\t// Set the value for the `list-style-type` property directly to the list container.\n\tif ( listStyle.style ) {\n\t\twriter.setStyle( 'list-style-type', listStyle.style, list );\n\t}\n\n\tif ( listStyle.startIndex && listStyle.startIndex > 1 ) {\n\t\twriter.setAttribute( 'start', listStyle.startIndex, list );\n\t}\n\n\tif ( listStyle.isLegalStyleList && hasMultiLevelListPlugin ) {\n\t\twriter.addClass( 'legal-list', list );\n\t}\n\n\treturn list;\n}\n\n/**\n * Extracts list item information from Word specific list-like element style:\n *\n * ```\n * `style=\"mso-list:l1 level1 lfo1\"`\n * ```\n *\n * where:\n *\n * ```\n * * `l1` is a list id (however it does not mean this is a continuous list - see #43),\n * * `level1` is a list item indentation level,\n * * `lfo1` is a list insertion order in a document.\n * ```\n *\n * @param element Element from which style data is extracted.\n */\nfunction getListItemData( element: ViewElement ): ListItemData {\n\tconst listStyle = element.getStyle( 'mso-list' );\n\n\tif ( listStyle === undefined ) {\n\t\treturn {};\n\t}\n\n\tconst idMatch = listStyle.match( /(^|\\s{1,100})l(\\d+)/i );\n\tconst orderMatch = listStyle.match( /\\s{0,100}lfo(\\d+)/i );\n\tconst indentMatch = listStyle.match( /\\s{0,100}level(\\d+)/i );\n\n\tif ( idMatch && orderMatch && indentMatch ) {\n\t\treturn {\n\t\t\tid: idMatch[ 2 ],\n\t\t\torder: orderMatch[ 1 ],\n\t\t\tindent: parseInt( indentMatch[ 1 ] )\n\t\t};\n\t}\n\n\treturn {\n\t\tindent: 1 // Handle empty mso-list style as a marked for default list item.\n\t};\n}\n\n/**\n * Removes span with a numbering/bullet from a given element.\n */\nfunction removeBulletElement( element: ViewElement, writer: UpcastWriter ) {\n\t// Matcher for finding `span` elements holding lists numbering/bullets.\n\tconst bulletMatcher = new Matcher( {\n\t\tname: 'span',\n\t\tstyles: {\n\t\t\t'mso-list': 'Ignore'\n\t\t}\n\t} );\n\n\tconst range = writer.createRangeIn( element );\n\n\tfor ( const value of range ) {\n\t\tif ( value.type === 'elementStart' && bulletMatcher.match( value.item as ViewElement ) ) {\n\t\t\twriter.remove( value.item as ViewElement );\n\t\t}\n\t}\n}\n\n/**\n * Returns element left margin normalized to 'px' if possible.\n */\nfunction getMarginLeftNormalized( element: ViewElement ): string | undefined {\n\tconst value = element.getStyle( 'margin-left' );\n\n\tif ( value === undefined || value.endsWith( 'px' ) ) {\n\t\treturn value;\n\t}\n\n\treturn convertCssLengthToPx( value );\n}\n\ninterface ListItemData {\n\n\t/**\n\t * Parent list id.\n\t */\n\tid?: string;\n\n\t/**\n\t * List item creation order.\n\t */\n\torder?: string;\n\n\t/**\n\t * List item indentation level.\n\t */\n\tindent?: number;\n}\n\ninterface ListLikeElement extends ListItemData {\n\n\t/**\n\t * List-like element.\n\t */\n\telement: ViewElement;\n\n\t/**\n\t * The margin-left normalized to 'px' if possible.\n\t */\n\tmarginLeft?: string;\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/**\n * @module paste-from-office/filters/image\n */\n\n/* globals btoa */\n\nimport {\n\tMatcher,\n\tUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode\n} from 'ckeditor5/src/engine.js';\n\n/**\n * Replaces source attribute of all `` elements representing regular\n * images (not the Word shapes) with inlined base64 image representation extracted from RTF or Blob data.\n *\n * @param documentFragment Document fragment on which transform images.\n * @param rtfData The RTF data from which images representation will be used.\n */\nexport function replaceImagesSourceWithBase64( documentFragment: ViewDocumentFragment, rtfData: string ): void {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst upcastWriter = new UpcastWriter( documentFragment.document );\n\tconst shapesIds = findAllShapesIds( documentFragment, upcastWriter );\n\n\tremoveAllImgElementsRepresentingShapes( shapesIds, documentFragment, upcastWriter );\n\tinsertMissingImgs( shapesIds, documentFragment, upcastWriter );\n\tremoveAllShapeElements( documentFragment, upcastWriter );\n\n\tconst images = findAllImageElementsWithLocalSource( documentFragment, upcastWriter );\n\n\tif ( images.length ) {\n\t\treplaceImagesFileSourceWithInlineRepresentation( images, extractImageDataFromRtf( rtfData ), upcastWriter );\n\t}\n}\n\n/**\n * Converts given HEX string to base64 representation.\n *\n * @internal\n * @param hexString The HEX string to be converted.\n * @returns Base64 representation of a given HEX string.\n */\nexport function _convertHexToBase64( hexString: string ): string {\n\treturn btoa( hexString.match( /\\w{2}/g )!.map( char => {\n\t\treturn String.fromCharCode( parseInt( char, 16 ) );\n\t} ).join( '' ) );\n}\n\n/**\n * Finds all shapes (`...`) ids. Shapes can represent images (canvas)\n * or Word shapes (which does not have RTF or Blob representation).\n *\n * @param documentFragment Document fragment from which to extract shape ids.\n * @returns Array of shape ids.\n */\nfunction findAllShapesIds( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): Array {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapeElementsMatcher = new Matcher( {\n\t\tname: /v:(.+)/\n\t} );\n\n\tconst shapesIds = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type != 'elementStart' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst el = value.item as ViewElement;\n\t\tconst previousSibling = el.previousSibling;\n\t\tconst prevSiblingName = previousSibling && previousSibling.is( 'element' ) ? previousSibling.name : null;\n\t\t// List of ids which should not be considered as shapes.\n\t\t// https://github.com/ckeditor/ckeditor5/pull/15847#issuecomment-1941543983\n\t\tconst exceptionIds = [ 'Chart' ];\n\n\t\tconst isElementAShape = shapeElementsMatcher.match( el );\n\t\tconst hasElementGfxdataAttribute = el.getAttribute( 'o:gfxdata' );\n\t\tconst isPreviousSiblingAShapeType = prevSiblingName === 'v:shapetype';\n\t\tconst isElementIdInExceptionsArray = hasElementGfxdataAttribute &&\n\t\t\texceptionIds.some( item => el.getAttribute( 'id' )!.includes( item ) );\n\n\t\t// If shape element has 'o:gfxdata' attribute and is not directly before\n\t\t// `` element it means that it represents a Word shape.\n\t\tif (\n\t\t\tisElementAShape &&\n\t\t\thasElementGfxdataAttribute &&\n\t\t\t!isPreviousSiblingAShapeType &&\n\t\t\t!isElementIdInExceptionsArray\n\t\t) {\n\t\t\tshapesIds.push( ( value.item as ViewElement ).getAttribute( 'id' )! );\n\t\t}\n\t}\n\n\treturn shapesIds;\n}\n\n/**\n * Removes all `` elements which represents Word shapes and not regular images.\n *\n * @param shapesIds Shape ids which will be checked against `` elements.\n * @param documentFragment Document fragment from which to remove `` elements.\n */\nfunction removeAllImgElementsRepresentingShapes(\n\tshapesIds: Array,\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): void {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst imageElementsMatcher = new Matcher( {\n\t\tname: 'img'\n\t} );\n\n\tconst imgs = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'element' ) && imageElementsMatcher.match( value.item ) ) {\n\t\t\tconst el = value.item;\n\t\t\tconst shapes = el.getAttribute( 'v:shapes' ) ? el.getAttribute( 'v:shapes' )!.split( ' ' ) : [];\n\n\t\t\tif ( shapes.length && shapes.every( shape => shapesIds.indexOf( shape ) > -1 ) ) {\n\t\t\t\timgs.push( el );\n\t\t\t// Shapes may also have empty source while content is paste in some browsers (Safari).\n\t\t\t} else if ( !el.getAttribute( 'src' ) ) {\n\t\t\t\timgs.push( el );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const img of imgs ) {\n\t\twriter.remove( img );\n\t}\n}\n\n/**\n * Removes all shape elements (`...`) so they do not pollute the output structure.\n *\n * @param documentFragment Document fragment from which to remove shape elements.\n */\nfunction removeAllShapeElements( documentFragment: ViewDocumentFragment, writer: UpcastWriter ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapeElementsMatcher = new Matcher( {\n\t\tname: /v:(.+)/\n\t} );\n\n\tconst shapes = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type == 'elementStart' && shapeElementsMatcher.match( value.item as ViewElement ) ) {\n\t\t\tshapes.push( value.item as ViewElement );\n\t\t}\n\t}\n\n\tfor ( const shape of shapes ) {\n\t\twriter.remove( shape );\n\t}\n}\n\n/**\n * Inserts `img` tags if there is none after a shape.\n */\nfunction insertMissingImgs( shapeIds: Array, documentFragment: ViewDocumentFragment, writer: UpcastWriter ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapes: Array = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type == 'elementStart' && value.item.is( 'element', 'v:shape' ) ) {\n\t\t\tconst id = value.item.getAttribute( 'id' )!;\n\n\t\t\tif ( shapeIds.includes( id ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !containsMatchingImg( value.item.parent!.getChildren(), id ) ) {\n\t\t\t\tshapes.push( value.item );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const shape of shapes ) {\n\t\tconst attrs: Record = {\n\t\t\tsrc: findSrc( shape )\n\t\t};\n\n\t\tif ( shape.hasAttribute( 'alt' ) ) {\n\t\t\tattrs.alt = shape.getAttribute( 'alt' );\n\t\t}\n\n\t\tconst img = writer.createElement( 'img', attrs );\n\n\t\twriter.insertChild( shape.index! + 1, img, shape.parent! );\n\t}\n\n\tfunction containsMatchingImg( nodes: Iterable, id: string ): boolean {\n\t\tfor ( const node of nodes ) {\n\t\t\t/* istanbul ignore else -- @preserve */\n\t\t\tif ( node.is( 'element' ) ) {\n\t\t\t\tif ( node.name == 'img' && node.getAttribute( 'v:shapes' ) == id ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( containsMatchingImg( node.getChildren(), id ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction findSrc( shape: ViewElement ) {\n\t\tfor ( const child of shape.getChildren() ) {\n\t\t\t/* istanbul ignore else -- @preserve */\n\t\t\tif ( child.is( 'element' ) && child.getAttribute( 'src' ) ) {\n\t\t\t\treturn child.getAttribute( 'src' );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds all `` elements in a given document fragment which have source pointing to local `file://` resource.\n *\n * @param documentFragment Document fragment in which to look for `` elements.\n * @returns result All found images grouped by source type.\n */\nfunction findAllImageElementsWithLocalSource(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): Array {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst imageElementsMatcher = new Matcher( {\n\t\tname: 'img'\n\t} );\n\n\tconst imgs = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'element' ) && imageElementsMatcher.match( value.item ) ) {\n\t\t\tif ( value.item.getAttribute( 'src' )!.startsWith( 'file://' ) ) {\n\t\t\t\timgs.push( value.item );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn imgs;\n}\n\n/**\n * Extracts all images HEX representations from a given RTF data.\n *\n * @param rtfData The RTF data from which to extract images HEX representation.\n * @returns Array of found HEX representations. Each array item is an object containing:\n *\n * * hex Image representation in HEX format.\n * * type Type of image, `image/png` or `image/jpeg`.\n */\nfunction extractImageDataFromRtf( rtfData: string ): Array<{ hex: string; type: string }> {\n\tif ( !rtfData ) {\n\t\treturn [];\n\t}\n\n\tconst regexPictureHeader = /{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/;\n\tconst regexPicture = new RegExp( '(?:(' + regexPictureHeader.source + '))([\\\\da-fA-F\\\\s]+)\\\\}', 'g' );\n\tconst images = rtfData.match( regexPicture );\n\tconst result = [];\n\n\tif ( images ) {\n\t\tfor ( const image of images ) {\n\t\t\tlet imageType: string | false = false;\n\n\t\t\tif ( image.includes( '\\\\pngblip' ) ) {\n\t\t\t\timageType = 'image/png';\n\t\t\t} else if ( image.includes( '\\\\jpegblip' ) ) {\n\t\t\t\timageType = 'image/jpeg';\n\t\t\t}\n\n\t\t\tif ( imageType ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\thex: image.replace( regexPictureHeader, '' ).replace( /[^\\da-fA-F]/g, '' ),\n\t\t\t\t\ttype: imageType\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Replaces `src` attribute value of all given images with the corresponding base64 image representation.\n *\n * @param imageElements Array of image elements which will have its source replaced.\n * @param imagesHexSources Array of images hex sources (usually the result of `extractImageDataFromRtf()` function).\n * The array should be the same length as `imageElements` parameter.\n */\nfunction replaceImagesFileSourceWithInlineRepresentation(\n\timageElements: Array,\n\timagesHexSources: ReturnType,\n\twriter: UpcastWriter\n) {\n\t// Assume there is an equal amount of image elements and images HEX sources so they can be matched accordingly based on existing order.\n\tif ( imageElements.length === imagesHexSources.length ) {\n\t\tfor ( let i = 0; i < imageElements.length; i++ ) {\n\t\t\tconst newSrc = `data:${ imagesHexSources[ i ].type };base64,${ _convertHexToBase64( imagesHexSources[ i ].hex ) }`;\n\t\t\twriter.setAttribute( 'src', newSrc, imageElements[ i ] );\n\t\t}\n\t}\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/**\n * @module paste-from-office/normalizers/mswordnormalizer\n */\n\nimport { transformListItemLikeElementsIntoLists } from '../filters/list.js';\nimport { replaceImagesSourceWithBase64 } from '../filters/image.js';\nimport removeMSAttributes from '../filters/removemsattributes.js';\nimport type { ViewDocument } from 'ckeditor5/src/engine.js';\nimport type { Normalizer, NormalizerData } from '../normalizer.js';\n\nconst msWordMatch1 = //i;\nconst msWordMatch2 = /xmlns:o=\"urn:schemas-microsoft-com/i;\n\n/**\n * Normalizer for the content pasted from Microsoft Word.\n */\nexport default class MSWordNormalizer implements Normalizer {\n\tpublic readonly document: ViewDocument;\n\n\tpublic readonly hasMultiLevelListPlugin: boolean;\n\n\t/**\n\t * Creates a new `MSWordNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor( document: ViewDocument, hasMultiLevelListPlugin: boolean = false ) {\n\t\tthis.document = document;\n\t\tthis.hasMultiLevelListPlugin = hasMultiLevelListPlugin;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn msWordMatch1.test( htmlString ) || msWordMatch2.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: NormalizerData ): void {\n\t\tconst { body: documentFragment, stylesString } = data._parsedData;\n\n\t\ttransformListItemLikeElementsIntoLists( documentFragment, stylesString, this.hasMultiLevelListPlugin );\n\t\treplaceImagesSourceWithBase64( documentFragment, data.dataTransfer.getData( 'text/rtf' ) );\n\t\tremoveMSAttributes( documentFragment );\n\n\t\tdata.content = documentFragment;\n\t}\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/**\n * @module paste-from-office/filters/removemsattributes\n */\n\nimport { UpcastWriter, type ViewDocumentFragment, type ViewElement } from 'ckeditor5/src/engine.js';\n\n/**\n * Cleanup MS attributes like styles, attributes and elements.\n *\n * @param documentFragment element `data.content` obtained from clipboard.\n */\nexport default function removeMSAttributes( documentFragment: ViewDocumentFragment ): void {\n\tconst elementsToUnwrap: Array = [];\n\n\tconst writer = new UpcastWriter( documentFragment.document );\n\n\tfor ( const { item } of writer.createRangeIn( documentFragment ) ) {\n\t\tif ( !item.is( 'element' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor ( const className of item.getClassNames() ) {\n\t\t\tif ( /\\bmso/gi.exec( className ) ) {\n\t\t\t\twriter.removeClass( className, item );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const styleName of item.getStyleNames() ) {\n\t\t\tif ( /\\bmso/gi.exec( styleName ) ) {\n\t\t\t\twriter.removeStyle( styleName, item );\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\titem.is( 'element', 'w:sdt' ) ||\n\t\t\titem.is( 'element', 'w:sdtpr' ) && item.isEmpty ||\n\t\t\titem.is( 'element', 'o:p' ) && item.isEmpty\n\t\t) {\n\t\t\telementsToUnwrap.push( item );\n\t\t}\n\t}\n\n\tfor ( const item of elementsToUnwrap ) {\n\t\tconst itemParent = item.parent!;\n\t\tconst childIndex = itemParent.getChildIndex( item );\n\n\t\twriter.insertChild( childIndex, item.getChildren(), itemParent );\n\t\twriter.remove( item );\n\t}\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/**\n * @module paste-from-office/filters/br\n */\n\nimport {\n\tDomConverter,\n\tViewDocument,\n\ttype UpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode\n} from 'ckeditor5/src/engine.js';\n\n/**\n * Transforms `
    ` elements that are siblings to some block element into a paragraphs.\n *\n * @param documentFragment The view structure to be transformed.\n */\nexport default function transformBlockBrsToParagraphs(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): void {\n\tconst viewDocument = new ViewDocument( writer.document.stylesProcessor );\n\tconst domConverter = new DomConverter( viewDocument, { renderingMode: 'data' } );\n\n\tconst blockElements = domConverter.blockElements;\n\tconst inlineObjectElements = domConverter.inlineObjectElements;\n\n\tconst elementsToReplace = [];\n\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'br' ) ) {\n\t\t\tconst nextSibling = findSibling( element, 'forward', writer, { blockElements, inlineObjectElements } );\n\t\t\tconst previousSibling = findSibling( element, 'backward', writer, { blockElements, inlineObjectElements } );\n\n\t\t\tconst nextSiblingIsBlock = isBlockViewElement( nextSibling, blockElements );\n\t\t\tconst previousSiblingIsBlock = isBlockViewElement( previousSibling, blockElements );\n\n\t\t\t// If the
    is surrounded by blocks then convert it to a paragraph:\n\t\t\t// *

    foo

    [
    ]

    bar

    ->

    foo

    [

    ]

    bar

    \n\t\t\t// *

    foo

    [
    ] ->

    foo

    [

    ]\n\t\t\t// * [
    ]

    foo

    -> [

    ]

    foo

    \n\t\t\tif ( previousSiblingIsBlock || nextSiblingIsBlock ) {\n\t\t\t\telementsToReplace.push( element );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const element of elementsToReplace ) {\n\t\tif ( element.hasClass( 'Apple-interchange-newline' ) ) {\n\t\t\twriter.remove( element );\n\t\t} else {\n\t\t\twriter.replace( element, writer.createElement( 'p' ) );\n\t\t}\n\t}\n}\n\n/**\n * Returns sibling node, threats inline elements as transparent (but should stop on an inline objects).\n */\nfunction findSibling(\n\tviewElement: ViewElement,\n\tdirection: 'forward' | 'backward',\n\twriter: UpcastWriter,\n\t{ blockElements, inlineObjectElements }: { blockElements: Array; inlineObjectElements: Array }\n) {\n\tlet position = writer.createPositionAt( viewElement, direction == 'forward' ? 'after' : 'before' );\n\n\t// Find first position that is just before a first:\n\t// * text node,\n\t// * block element,\n\t// * inline object element.\n\t// It's ignoring any inline (non-object) elements like span, strong, etc.\n\tposition = position.getLastMatchingPosition( ( { item } ) => (\n\t\titem.is( 'element' ) &&\n\t\t!blockElements.includes( item.name ) &&\n\t\t!inlineObjectElements.includes( item.name )\n\t), { direction } );\n\n\treturn direction == 'forward' ? position.nodeAfter : position.nodeBefore;\n}\n\n/**\n * Returns true for view elements that are listed as block view elements.\n */\nfunction isBlockViewElement( node: ViewNode | null, blockElements: Array ) {\n\treturn !!node && node.is( 'element' ) && blockElements.includes( node.name );\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/**\n * @module paste-from-office/normalizers/googledocsnormalizer\n */\n\nimport { UpcastWriter, type ViewDocument } from 'ckeditor5/src/engine.js';\n\nimport removeBoldWrapper from '../filters/removeboldwrapper.js';\nimport transformBlockBrsToParagraphs from '../filters/br.js';\nimport { unwrapParagraphInListItem } from '../filters/list.js';\nimport type { Normalizer, NormalizerData } from '../normalizer.js';\n\nconst googleDocsMatch = /id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;\n\n/**\n * Normalizer for the content pasted from Google Docs.\n */\nexport default class GoogleDocsNormalizer implements Normalizer {\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Creates a new `GoogleDocsNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn googleDocsMatch.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: NormalizerData ): void {\n\t\tconst writer = new UpcastWriter( this.document );\n\t\tconst { body: documentFragment } = data._parsedData;\n\n\t\tremoveBoldWrapper( documentFragment, writer );\n\t\tunwrapParagraphInListItem( documentFragment, writer );\n\t\ttransformBlockBrsToParagraphs( documentFragment, writer );\n\n\t\tdata.content = documentFragment;\n\t}\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/**\n * @module paste-from-office/filters/removeboldwrapper\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine.js';\n\n/**\n * Removes the `` tag wrapper added by Google Docs to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeBoldWrapper( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'b' ) && child.getStyle( 'font-weight' ) === 'normal' ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\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/**\n * @module paste-from-office/normalizers/googlesheetsnormalizer\n */\n\nimport { UpcastWriter, type ViewDocument } from 'ckeditor5/src/engine.js';\n\nimport removeXmlns from '../filters/removexmlns.js';\nimport removeGoogleSheetsTag from '../filters/removegooglesheetstag.js';\nimport removeInvalidTableWidth from '../filters/removeinvalidtablewidth.js';\nimport removeStyleBlock from '../filters/removestyleblock.js';\nimport type { Normalizer, NormalizerData } from '../normalizer.js';\n\nconst googleSheetsMatch = /` tag wrapper added by Google Sheets to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeGoogleSheetsTag( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'google-sheets-html-origin' ) ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removexmlns\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine.js';\n\n/**\n * Removes the `xmlns` attribute from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeXmlns( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'table' ) && child.hasAttribute( 'xmlns' ) ) {\n\t\t\twriter.removeAttribute( 'xmlns', child );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removeinvalidtablewidth\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine.js';\n\n/**\n * Removes the `width:0px` style from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeInvalidTableWidth( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'table' ) && child.getStyle( 'width' ) === '0px' ) {\n\t\t\twriter.removeStyle( 'width', child );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removestyleblock\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine.js';\n\n/**\n * Removes ``);\n const root = this.attachShadow({ mode: 'open' });\n root.appendChild(template.content.cloneNode(true));\n root.addEventListener('move', this);\n this[$parts] = this[$sliders].map((slider) => new slider(root));\n }\n connectedCallback() {\n // A user may set a property on an _instance_ of an element,\n // before its prototype has been connected to this class.\n // If so, we need to run it through the proper class setter.\n if (this.hasOwnProperty('color')) {\n const value = this.color;\n delete this['color'];\n this.color = value;\n }\n else if (!this.color) {\n this.color = this.colorModel.defaultColor;\n }\n }\n attributeChangedCallback(_attr, _oldVal, newVal) {\n const color = this.colorModel.fromAttr(newVal);\n if (!this[$isSame](color)) {\n this.color = color;\n }\n }\n handleEvent(event) {\n // Merge the current HSV color object with updated params.\n const oldHsva = this[$hsva];\n const newHsva = { ...oldHsva, ...event.detail };\n this[$update](newHsva);\n let newColor;\n if (!equalColorObjects(newHsva, oldHsva) &&\n !this[$isSame]((newColor = this.colorModel.fromHsva(newHsva)))) {\n this[$color] = newColor;\n fire(this, 'color-changed', { value: newColor });\n }\n }\n [$isSame](color) {\n return this.color && this.colorModel.equal(color, this.color);\n }\n [$update](hsva) {\n this[$hsva] = hsva;\n this[$parts].forEach((part) => part.update(hsva));\n }\n}\n//# sourceMappingURL=color-picker.js.map","export default `[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}`;\n//# sourceMappingURL=hue.js.map","export default `[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}`;\n//# sourceMappingURL=saturation.js.map","import { ColorPicker } from '../components/color-picker.js';\nimport { hexToHsva, hsvaToHex } from '../utils/convert.js';\nimport { equalHex } from '../utils/compare.js';\nconst colorModel = {\n defaultColor: '#000',\n toHsva: hexToHsva,\n fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n equal: equalHex,\n fromAttr: (color) => color\n};\nexport class HexBase extends ColorPicker {\n get colorModel() {\n return colorModel;\n }\n}\n//# sourceMappingURL=hex.js.map","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./colorpicker.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/**\n * @module ui/colorpicker/colorpickerview\n */\n\nimport { convertColor, convertToHex, registerCustomElement, type ColorPickerViewConfig } from './utils.js';\n\nimport type { HexColor } from '@ckeditor/ckeditor5-core';\nimport { type Locale, global, env } from '@ckeditor/ckeditor5-utils';\nimport { debounce, type DebouncedFunc } from 'lodash-es';\nimport View from '../view.js';\nimport type InputTextView from '../inputtext/inputtextview.js';\nimport type ViewCollection from '../viewcollection.js';\nimport LabeledFieldView from '../labeledfield/labeledfieldview.js';\nimport { createLabeledInputText } from '../labeledfield/utils.js';\n\n// Custom export due to https://github.com/ckeditor/ckeditor5/issues/15698.\nimport { HexBase } from 'vanilla-colorful/lib/entrypoints/hex';\nimport '../../theme/components/colorpicker/colorpicker.css';\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'hex-color-picker': HexBase;\n\t}\n}\n\nconst waitingTime = 150;\n\n/**\n * A class which represents a color picker with an input field for defining custom colors.\n */\nexport default class ColorPickerView extends View {\n\t/**\n\t * Element with saturation and hue sliders.\n\t */\n\tdeclare public picker: HexBase;\n\n\t/**\n\t * Container for a `#` sign prefix and an input for displaying and defining custom colors\n\t * in HEX format.\n\t */\n\tpublic hexInputRow: ColorPickerInputRowView;\n\n\t/**\n\t * Current color selected in the color picker. It can be set by the component itself\n\t * (through the palette or input) or from the outside (e.g. to reflect the current selection color).\n\t */\n\tdeclare public color: string;\n\n\t/**\n\t * List of slider views of the color picker.\n\t */\n\tdeclare public slidersView: ViewCollection;\n\n\t/**\n\t * An internal representation of a color.\n\t *\n\t * Since the picker uses a hex format, that's how we store it.\n\t *\n\t * Since this is unified color format it won't fire a change event if color is changed\n\t * from `#f00` to `#ff0000` (same value, different format).\n\t *\n\t * @observable\n\t * @private\n\t */\n\tdeclare public _hexColor: string;\n\n\t/**\n\t * Debounced function updating the `color` property in the component\n\t * and firing the `ColorPickerColorSelectedEvent`. Executed whenever color in component\n\t * is changed by the user interaction (through the palette or input).\n\t *\n\t * @private\n\t */\n\tprivate _debounceColorPickerEvent: DebouncedFunc<( arg: string ) => void>;\n\n\t/**\n\t * A reference to the configuration of the color picker specified in the constructor.\n\t *\n\t * @private\n\t */\n\tprivate _config: ColorPickerViewConfig;\n\n\t/**\n\t * Creates a view of color picker.\n\t *\n\t * @param locale\n\t * @param config\n\t */\n\tconstructor( locale: Locale | undefined, config: ColorPickerViewConfig = {} ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\tcolor: '',\n\t\t\t_hexColor: ''\n\t\t} );\n\n\t\tthis.hexInputRow = this._createInputRow();\n\t\tconst children = this.createCollection();\n\n\t\tif ( !config.hideInput ) {\n\t\t\tchildren.add( this.hexInputRow );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-color-picker' ],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren\n\t\t} );\n\n\t\tthis._config = config;\n\n\t\tthis._debounceColorPickerEvent = debounce( ( color: string ) => {\n\t\t\t// At first, set the color internally in the component. It's converted to the configured output format.\n\t\t\tthis.set( 'color', color );\n\n\t\t\t// Then let the outside world know that the user changed the color.\n\t\t\tthis.fire( 'colorSelected', { color: this.color } );\n\t\t}, waitingTime, {\n\t\t\tleading: true\n\t\t} );\n\n\t\t// The `color` property holds the color in the configured output format.\n\t\t// Ensure it before actually setting the value.\n\t\tthis.on( 'set:color', ( evt, propertyName, newValue ) => {\n\t\t\tevt.return = convertColor( newValue, this._config.format || 'hsl' );\n\t\t} );\n\n\t\t// The `_hexColor` property is bound to the `color` one, but requires conversion.\n\t\tthis.on( 'change:color', () => {\n\t\t\tthis._hexColor = convertColorToCommonHexFormat( this.color );\n\t\t} );\n\n\t\tthis.on( 'change:_hexColor', () => {\n\t\t\t// Update the selected color in the color picker palette when it's not focused.\n\t\t\t// It means the user typed the color in the input.\n\t\t\tif ( document.activeElement !== this.picker ) {\n\t\t\t\tthis.picker.setAttribute( 'color', this._hexColor );\n\t\t\t}\n\n\t\t\t// There has to be two way binding between properties.\n\t\t\t// Extra precaution has to be taken to trigger change back only when the color really changes.\n\t\t\tif ( convertColorToCommonHexFormat( this.color ) != convertColorToCommonHexFormat( this._hexColor ) ) {\n\t\t\t\tthis.color = this._hexColor;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Renders color picker in the view.\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Extracted to the helper to make it testable.\n\t\tregisterCustomElement( 'hex-color-picker', HexBase );\n\n\t\tthis.picker = global.document.createElement( 'hex-color-picker' );\n\t\tthis.picker.setAttribute( 'class', 'hex-color-picker' );\n\t\tthis.picker.setAttribute( 'tabindex', '-1' );\n\n\t\tthis._createSlidersView();\n\n\t\tif ( this.element ) {\n\t\t\tif ( this.hexInputRow.element ) {\n\t\t\t\tthis.element.insertBefore( this.picker, this.hexInputRow.element );\n\t\t\t} else {\n\t\t\t\tthis.element.appendChild( this.picker );\n\t\t\t}\n\n\t\t\t// Create custom stylesheet with a look of focused pointer in color picker and append it into the color picker shadowDom\n\t\t\tconst styleSheetForFocusedColorPicker = document.createElement( 'style' );\n\n\t\t\tstyleSheetForFocusedColorPicker.textContent = '[role=\"slider\"]:focus [part$=\"pointer\"] {' +\n\t\t\t\t'border: 1px solid #fff;' +\n\t\t\t\t'outline: 1px solid var(--ck-color-focus-border);' +\n\t\t\t\t'box-shadow: 0 0 0 2px #fff;' +\n\t\t\t\t'}';\n\t\t\tthis.picker.shadowRoot!.appendChild( styleSheetForFocusedColorPicker );\n\t\t}\n\n\t\tthis.picker.addEventListener( 'color-changed', event => {\n\t\t\tconst color = event.detail.value;\n\t\t\tthis._debounceColorPickerEvent( color );\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first pointer in color picker.\n\t *\n\t */\n\tpublic focus(): void {\n\t\t// In some browsers we need to move the focus to the input first.\n\t\t// Otherwise, the color picker doesn't behave as expected.\n\t\t// In FF, after selecting the color via slider, it instantly moves back to the previous color.\n\t\t// In all iOS browsers and desktop Safari, once the saturation slider is moved for the first time,\n\t\t// editor collapses the selection and doesn't apply the color change.\n\t\t// See: https://github.com/cksource/ckeditor5-internal/issues/3245, https://github.com/ckeditor/ckeditor5/issues/14119,\n\t\t// https://github.com/cksource/ckeditor5-internal/issues/3268.\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif ( !this._config.hideInput && ( env.isGecko || env.isiOS || env.isSafari ) ) {\n\t\t\tconst input: LabeledFieldView = this.hexInputRow!.children.get( 1 )! as LabeledFieldView;\n\n\t\t\tinput.focus();\n\t\t}\n\n\t\tconst firstSlider = this.slidersView.first!;\n\n\t\tfirstSlider.focus();\n\t}\n\n\t/**\n\t * Creates collection of sliders in color picker.\n\t *\n\t * @private\n\t */\n\tprivate _createSlidersView(): void {\n\t\tconst colorPickersChildren = [ ...this.picker.shadowRoot!.children ] as Array;\n\t\tconst sliders = colorPickersChildren.filter( item => item.getAttribute( 'role' ) === 'slider' );\n\n\t\tconst slidersView = sliders.map( slider => {\n\t\t\tconst view = new SliderView( slider );\n\n\t\t\treturn view;\n\t\t} );\n\n\t\tthis.slidersView = this.createCollection();\n\n\t\tslidersView.forEach( item => {\n\t\t\tthis.slidersView.add( item );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates input row for defining custom colors in color picker.\n\t *\n\t * @private\n\t */\n\tprivate _createInputRow(): ColorPickerInputRowView {\n\t\tconst colorInput = this._createColorInput();\n\n\t\treturn new ColorPickerInputRowView( this.locale!, colorInput );\n\t}\n\n\t/**\n\t * Creates the input where user can type or paste the color in hex format.\n\t *\n\t * @private\n\t */\n\tprivate _createColorInput(): LabeledFieldView {\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst { t } = this.locale!;\n\n\t\tlabeledInput.set( {\n\t\t\tlabel: t( 'HEX' ),\n\t\t\tclass: 'color-picker-hex-input'\n\t\t} );\n\n\t\tlabeledInput.fieldView.bind( 'value' ).to( this, '_hexColor', pickerColor => {\n\t\t\tif ( labeledInput.isFocused ) {\n\t\t\t\t// Text field shouldn't be updated with color change if the text field is focused.\n\t\t\t\t// Imagine user typing hex code and getting the value of field changed.\n\t\t\t\treturn labeledInput.fieldView.value;\n\t\t\t} else {\n\t\t\t\treturn pickerColor.startsWith( '#' ) ? pickerColor.substring( 1 ) : pickerColor;\n\t\t\t}\n\t\t} );\n\n\t\t// Only accept valid hex colors as input.\n\t\tlabeledInput.fieldView.on( 'input', () => {\n\t\t\tconst inputValue = labeledInput.fieldView.element!.value;\n\n\t\t\tif ( inputValue ) {\n\t\t\t\tconst maybeHexColor = tryParseHexColor( inputValue );\n\n\t\t\t\tif ( maybeHexColor ) {\n\t\t\t\t\t// If so, set the color.\n\t\t\t\t\t// Otherwise, do nothing.\n\t\t\t\t\tthis._debounceColorPickerEvent( maybeHexColor );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Validates the view and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tconst { t } = this.locale!;\n\n\t\tthis.resetValidationStatus();\n\n\t\t// One error per field is enough.\n\t\tif ( !this.hexInputRow.getParsedColor() ) {\n\t\t\t// Apply updated error.\n\t\t\tthis.hexInputRow.inputView.errorText = t( 'Please enter a valid color (e.g. \"ff0000\").' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of input inside the {@link #hexInputRow}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetValidationStatus(): void {\n\t\tthis.hexInputRow.inputView.errorText = null;\n\t}\n}\n\n// Converts any color format to a unified hex format.\n//\n// @param inputColor\n// @returns An unified hex string.\nfunction convertColorToCommonHexFormat( inputColor: string ): string {\n\tlet ret = convertToHex( inputColor );\n\n\tif ( !ret ) {\n\t\tret = '#000';\n\t}\n\n\tif ( ret.length === 4 ) {\n\t\t// Unfold shortcut format.\n\t\tret = '#' + [ ret[ 1 ], ret[ 1 ], ret[ 2 ], ret[ 2 ], ret[ 3 ], ret[ 3 ] ].join( '' );\n\t}\n\n\treturn ret.toLowerCase();\n}\n\n// View abstraction over pointer in color picker.\nclass SliderView extends View {\n\t/**\n\t * @param element HTML element of slider in color picker.\n\t */\n\tconstructor( element: HTMLElement ) {\n\t\tsuper();\n\t\tthis.element = element;\n\t}\n\n\t/**\n\t * Focuses element.\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\n}\n\n// View abstraction over the `#` character before color input.\nclass HashView extends View {\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-picker__hash-view'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: '#'\n\t\t} );\n\t}\n}\n\n// The class representing a row containing hex color input field.\n// **Note**: For now this class is private. When more use cases appear (beyond `ckeditor5-table` and `ckeditor5-image`),\n// it will become a component in `ckeditor5-ui`.\n//\n// @private\nclass ColorPickerInputRowView extends View {\n\t/**\n\t * A collection of row items (buttons, dropdowns, etc.).\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * Hex input view element.\n\t */\n\tpublic readonly inputView: LabeledFieldView;\n\n\t/**\n\t * Creates an instance of the form row class.\n\t *\n\t * @param locale The locale instance.\n\t * @param inputView Hex color input element.\n\t */\n\tconstructor( locale: Locale, inputView: LabeledFieldView ) {\n\t\tsuper( locale );\n\n\t\tthis.inputView = inputView;\n\t\tthis.children = this.createCollection( [\n\t\t\tnew HashView(),\n\t\t\tthis.inputView\n\t\t] );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-picker__row'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * Returns false if color input value is not in hex format.\n\t */\n\tpublic getParsedColor(): HexColor | null {\n\t\treturn tryParseHexColor( this.inputView.fieldView.element!.value );\n\t}\n}\n\n/**\n * An event fired whenever the color was selected through the color picker palette\n * or the color picker input.\n *\n * This even fires only when the user changes the color. It does not fire when the color\n * is changed programmatically, e.g. via\n * {@link module:ui/colorpicker/colorpickerview~ColorPickerView#color}.\n *\n * @eventName ~ColorPickerView#colorSelected\n */\nexport type ColorPickerColorSelectedEvent = {\n\tname: 'colorSelected';\n\targs: [ {\n\t\tcolor: string;\n\t} ];\n};\n\n/**\n * Trim spaces from provided color and check if hex is valid.\n *\n * @param color Unsafe color string.\n * @returns Null if provided color is not hex value.\n * @export\n */\nexport function tryParseHexColor( color: S | null | undefined ): HexColor | null {\n\tif ( !color ) {\n\t\treturn null;\n\t}\n\n\tconst hashLessColor = color.trim().replace( /^#/, '' );\n\n\t// Incorrect length.\n\tif ( ![ 3, 4, 6, 8 ].includes( hashLessColor.length ) ) {\n\t\treturn null;\n\t}\n\n\t// Incorrect characters.\n\tif ( !/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test( hashLessColor ) ) {\n\t\treturn null;\n\t}\n\n\treturn `#${ hashLessColor }` as `#${ S }`;\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/**\n * @module ui/colorselector/documentcolorcollection\n */\n\nimport type { ColorDefinition } from '../colorgrid/colorgridview.js';\nimport {\n\tCollection,\n\tObservableMixin,\n\ttype CollectionAddEvent,\n\ttype CollectionRemoveEvent,\n\ttype CollectionChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * A collection to store document colors. It enforces colors to be unique.\n */\nexport default class DocumentColorCollection extends ObservableMixin( Collection ) {\n\t/**\n\t * Indicates whether the document color collection is empty.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isEmpty: boolean;\n\n\tconstructor( options?: any ) {\n\t\tsuper( options );\n\n\t\tthis.set( 'isEmpty', true );\n\n\t\tthis.on( 'change', () => {\n\t\t\tthis.set( 'isEmpty', this.length === 0 );\n\t\t} );\n\t}\n\n\t/**\n\t * Adds a color to the document color collection.\n\t *\n\t * This method ensures that no color duplicates are inserted (compared using\n\t * the color value of the {@link module:ui/colorgrid/colorgridview~ColorDefinition}).\n\t *\n\t * If the item does not have an ID, it will be automatically generated and set on the item.\n\t *\n\t * @param index The position of the item in the collection. The item is pushed to the collection when `index` is not specified.\n\t * @fires add\n\t * @fires change\n\t */\n\tpublic override add( item: ColorDefinition, index?: number ): this {\n\t\tif ( this.find( element => element.color === item.color ) ) {\n\t\t\t// No duplicates are allowed.\n\t\t\treturn this;\n\t\t}\n\n\t\treturn super.add( item, index );\n\t}\n\n\t/**\n\t * Checks if an object with given colors is present in the document color collection.\n\t */\n\tpublic hasColor( color: string ): boolean {\n\t\treturn !!this.find( item => item.color === color );\n\t}\n}\n\n/**\n * Fired when the collection was changed due to adding or removing items.\n *\n * @eventName ~DocumentColorCollection#change\n * @param data Changed items.\n */\nexport type DocumentColorCollectionChangeEvent = CollectionChangeEvent;\n\n/**\n * Fired when an item is added to the collection.\n *\n * @eventName ~DocumentColorCollection#add\n * @param item The added item.\n * @param index An index where the addition occurred.\n */\nexport type DocumentColorCollectionAddEvent = CollectionAddEvent;\n\n/**\n * Fired when an item is removed from the collection.\n *\n * @eventName ~DocumentColorCollection#remove\n * @param item The removed item.\n * @param index Index from which item was removed.\n */\nexport type DocumentColorCollectionRemoveEvent = CollectionRemoveEvent;\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/**\n * @module ui/colorselector/colorgridsfragmentview\n */\n\nimport View from '../view.js';\nimport ButtonView from '../button/buttonview.js';\nimport ColorGridView, { type ColorDefinition } from '../colorgrid/colorgridview.js';\nimport ColorTileView from '../colorgrid/colortileview.js';\nimport LabelView from '../label/labelview.js';\nimport Template from '../template.js';\n\nimport DocumentColorCollection from './documentcolorcollection.js';\n\nimport type { Model } from '@ckeditor/ckeditor5-engine';\nimport type { FocusTracker, Locale } from '@ckeditor/ckeditor5-utils';\nimport type ViewCollection from '../viewcollection.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport type { ColorSelectorExecuteEvent, ColorSelectorColorPickerShowEvent } from './colorselectorview.js';\nimport { icons } from '@ckeditor/ckeditor5-core';\n\nconst { eraser: removeButtonIcon, colorPalette: colorPaletteIcon } = icons;\n\n/**\n * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n *\n * It provides a UI that allows users to select colors from the a predefined set and from existing document colors.\n *\n * It consists of the following sub–components:\n *\n * * A \"Remove color\" button,\n * * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,\n * * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.\n * * If color picker is configured, the \"Color Picker\" button is visible too.\n */\nexport default class ColorGridsFragmentView extends View {\n\t/**\n\t * A collection of the children of the table.\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * An array with objects representing colors to be displayed in the grid.\n\t */\n\tpublic colorDefinitions: Array;\n\n\t/**\n\t * Tracks information about the DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * The number of columns in the color grid.\n\t */\n\tpublic columns: number;\n\n\t/**\n\t * Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect\n\t * definitions that store the document colors.\n\t *\n\t * @readonly\n\t */\n\tpublic documentColors: DocumentColorCollection;\n\n\t/**\n\t * The maximum number of colors in the document colors section.\n\t * If it equals 0, the document colors section is not added.\n\t *\n\t * @readonly\n\t */\n\tpublic documentColorsCount?: number;\n\n\t/**\n\t * Keeps the value of the command associated with the table for the current selection.\n\t */\n\tdeclare public selectedColor: string;\n\n\t/**\n\t * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t * the default (static) color set.\n\t *\n\t * The property is loaded once the the parent dropdown is opened the first time.\n\t *\n\t * @readonly\n\t */\n\tpublic staticColorsGrid: ColorGridView | undefined;\n\n\t/**\n\t * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t * the document colors. It remains undefined if the document colors feature is disabled.\n\t *\n\t * The property is loaded once the the parent dropdown is opened the first time.\n\t *\n\t * @readonly\n\t */\n\tpublic documentColorsGrid: ColorGridView | undefined;\n\n\t/**\n\t * The \"Color picker\" button view.\n\t */\n\tpublic colorPickerButtonView?: ButtonView;\n\n\t/**\n\t * The \"Remove color\" button view.\n\t */\n\tpublic removeColorButtonView: ButtonView;\n\n\t/**\n\t * The property which is responsible for is component visible or not.\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusables: ViewCollection;\n\n\t/**\n\t * Document color section's label.\n\t *\n\t * @readonly\n\t */\n\tprivate _documentColorsLabel?: string;\n\n\t/**\n\t * The label of the button responsible for removing color attributes.\n\t */\n\tprivate _removeButtonLabel: string;\n\n\t/**\n\t * The label of the button responsible for switching to the color picker component.\n\t */\n\tprivate _colorPickerLabel: string;\n\n\t/**\n\t * Creates an instance of the view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param colors An array with definitions of colors to be displayed in the table.\n\t * @param columns The number of columns in the color grid.\n\t * @param removeButtonLabel The label of the button responsible for removing the color.\n\t * @param colorPickerLabel The label of the button responsible for color picker appearing.\n\t * @param documentColorsLabel The label for the section with the document colors.\n\t * @param documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t * @param focusTracker Tracks information about the DOM focus in the list.\n\t * @param focusables A collection of views that can be focused in the view.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{\n\t\t\tcolors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount,\n\t\t\tcolorPickerLabel, focusTracker, focusables\n\t\t}: {\n\t\t\tcolors: Array;\n\t\t\tcolumns: number;\n\t\t\tremoveButtonLabel: string;\n\t\t\tcolorPickerLabel: string;\n\t\t\tdocumentColorsLabel?: string;\n\t\t\tdocumentColorsCount?: number;\n\t\t\tfocusTracker: FocusTracker;\n\t\t\tfocusables: ViewCollection;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isVisible', true );\n\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.items = this.createCollection();\n\t\tthis.colorDefinitions = colors;\n\t\tthis.columns = columns;\n\t\tthis.documentColors = new DocumentColorCollection();\n\t\tthis.documentColorsCount = documentColorsCount;\n\n\t\tthis._focusables = focusables;\n\t\tthis._removeButtonLabel = removeButtonLabel;\n\t\tthis._colorPickerLabel = colorPickerLabel;\n\t\tthis._documentColorsLabel = documentColorsLabel;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-color-grids-fragment',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t} );\n\n\t\tthis.removeColorButtonView = this._createRemoveColorButton();\n\n\t\tthis.items.add( this.removeColorButtonView );\n\t}\n\n\t/**\n\t * Scans through the editor model and searches for text node attributes with the given attribute name.\n\t * Found entries are set as document colors.\n\t *\n\t * All the previously stored document colors will be lost in the process.\n\t *\n\t * @param model The model used as a source to obtain the document colors.\n\t * @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t */\n\tpublic updateDocumentColors( model: Model, attributeName: string ): void {\n\t\tconst document = model.document;\n\t\tconst maxCount = this.documentColorsCount;\n\n\t\tthis.documentColors.clear();\n\n\t\tfor ( const root of document.getRoots() ) {\n\t\t\tconst range = model.createRangeIn( root );\n\n\t\t\tfor ( const node of range.getItems() ) {\n\t\t\t\tif ( node.is( '$textProxy' ) && node.hasAttribute( attributeName ) ) {\n\t\t\t\t\tthis._addColorToDocumentColors( node.getAttribute( attributeName ) as string );\n\n\t\t\t\t\tif ( this.documentColors.length >= maxCount! ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s\n\t * available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will\n\t * occur only in one of them.\n\t */\n\tpublic updateSelectedColors(): void {\n\t\tconst documentColorsGrid = this.documentColorsGrid;\n\t\tconst staticColorsGrid = this.staticColorsGrid!;\n\t\tconst selectedColor = this.selectedColor;\n\n\t\tstaticColorsGrid.selectedColor = selectedColor;\n\n\t\tif ( documentColorsGrid ) {\n\t\t\tdocumentColorsGrid.selectedColor = selectedColor;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.staticColorsGrid = this._createStaticColorsGrid();\n\n\t\tthis.items.add( this.staticColorsGrid );\n\n\t\tif ( this.documentColorsCount ) {\n\t\t\t// Create a label for document colors.\n\t\t\tconst bind = Template.bind( this.documentColors, this.documentColors );\n\t\t\tconst label = new LabelView( this.locale );\n\t\t\tlabel.text = this._documentColorsLabel;\n\t\t\tlabel.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-color-grid__label',\n\t\t\t\t\t\tbind.if( 'isEmpty', 'ck-hidden' )\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.items.add( label );\n\t\t\tthis.documentColorsGrid = this._createDocumentColorsGrid();\n\n\t\t\tthis.items.add( this.documentColorsGrid );\n\t\t}\n\t\tthis._createColorPickerButton();\n\n\t\tthis._addColorSelectorElementsToFocusTracker();\n\t}\n\n\t/**\n\t * Focuses the component.\n\t */\n\tpublic focus(): void {\n\t\tthis.removeColorButtonView.focus();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Handles displaying the color picker button (if it was previously created) and making it focusable.\n\t */\n\tpublic addColorPickerButton(): void {\n\t\tif ( this.colorPickerButtonView ) {\n\t\t\tthis.items.add( this.colorPickerButtonView );\n\t\t\tthis.focusTracker.add( this.colorPickerButtonView.element! );\n\t\t\tthis._focusables.add( this.colorPickerButtonView );\n\t\t}\n\t}\n\n\t/**\n\t * Adds color selector elements to focus tracker.\n\t */\n\tprivate _addColorSelectorElementsToFocusTracker(): void {\n\t\tthis.focusTracker.add( this.removeColorButtonView.element! );\n\t\tthis._focusables.add( this.removeColorButtonView );\n\n\t\tif ( this.staticColorsGrid ) {\n\t\t\tthis.focusTracker.add( this.staticColorsGrid.element! );\n\t\t\tthis._focusables.add( this.staticColorsGrid );\n\t\t}\n\n\t\tif ( this.documentColorsGrid ) {\n\t\t\tthis.focusTracker.add( this.documentColorsGrid.element! );\n\t\t\tthis._focusables.add( this.documentColorsGrid );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the button responsible for displaying the color picker component.\n\t */\n\tprivate _createColorPickerButton(): void {\n\t\tthis.colorPickerButtonView = new ButtonView();\n\n\t\tthis.colorPickerButtonView.set( {\n\t\t\tlabel: this._colorPickerLabel,\n\t\t\twithText: true,\n\t\t\ticon: colorPaletteIcon,\n\t\t\tclass: 'ck-color-selector__color-picker'\n\t\t} );\n\n\t\tthis.colorPickerButtonView.on( 'execute', () => {\n\t\t\tthis.fire( 'colorPicker:show' );\n\t\t} );\n\t}\n\n\t/**\n\t * Adds the remove color button as a child of the current view.\n\t */\n\tprivate _createRemoveColorButton(): ButtonView {\n\t\tconst buttonView = new ButtonView();\n\n\t\tbuttonView.set( {\n\t\t\twithText: true,\n\t\t\ticon: removeButtonIcon,\n\t\t\tlabel: this._removeButtonLabel\n\t\t} );\n\n\t\tbuttonView.class = 'ck-color-selector__remove-color';\n\t\tbuttonView.on( 'execute', () => {\n\t\t\tthis.fire( 'execute', {\n\t\t\t\tvalue: null,\n\t\t\t\tsource: 'removeColorButton'\n\t\t\t} );\n\t\t} );\n\n\t\tbuttonView.render();\n\n\t\treturn buttonView;\n\t}\n\n\t/**\n\t * Creates a static color grid based on the editor configuration.\n\t */\n\tprivate _createStaticColorsGrid(): ColorGridView {\n\t\tconst colorGrid = new ColorGridView( this.locale, {\n\t\t\tcolorDefinitions: this.colorDefinitions,\n\t\t\tcolumns: this.columns\n\t\t} );\n\n\t\tcolorGrid.on( 'execute', ( evt, data ) => {\n\t\t\tthis.fire( 'execute', {\n\t\t\t\tvalue: data.value,\n\t\t\t\tsource: 'staticColorsGrid'\n\t\t\t} );\n\t\t} );\n\n\t\treturn colorGrid;\n\t}\n\n\t/**\n\t * Creates the document colors section view and binds it to {@link #documentColors}.\n\t */\n\tprivate _createDocumentColorsGrid(): ColorGridView {\n\t\tconst bind = Template.bind( this.documentColors, this.documentColors );\n\t\tconst documentColorsGrid = new ColorGridView( this.locale, {\n\t\t\tcolumns: this.columns\n\t\t} );\n\n\t\tdocumentColorsGrid.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: bind.if( 'isEmpty', 'ck-hidden' )\n\t\t\t}\n\t\t} );\n\n\t\tdocumentColorsGrid.items.bindTo( this.documentColors ).using(\n\t\t\tcolorObj => {\n\t\t\t\tconst colorTile = new ColorTileView();\n\n\t\t\t\tcolorTile.set( {\n\t\t\t\t\tcolor: colorObj.color,\n\t\t\t\t\thasBorder: colorObj.options && colorObj.options.hasBorder\n\t\t\t\t} );\n\n\t\t\t\tif ( colorObj.label ) {\n\t\t\t\t\tcolorTile.set( {\n\t\t\t\t\t\tlabel: colorObj.label,\n\t\t\t\t\t\ttooltip: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tcolorTile.on( 'execute', () => {\n\t\t\t\t\tthis.fire( 'execute', {\n\t\t\t\t\t\tvalue: colorObj.color,\n\t\t\t\t\t\tsource: 'documentColorsGrid'\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t\treturn colorTile;\n\t\t\t}\n\t\t);\n\n\t\t// Selected color should be cleared when document colors became empty.\n\t\tthis.documentColors.on( 'change:isEmpty', ( evt, name, val ) => {\n\t\t\tif ( val ) {\n\t\t\t\tdocumentColorsGrid.selectedColor = null;\n\t\t\t}\n\t\t} );\n\n\t\treturn documentColorsGrid;\n\t}\n\n\t/**\n\t * Adds a given color to the document colors list. If possible, the method will attempt to use\n\t * data from the {@link #colorDefinitions} (label, color options).\n\t *\n\t * @param color A string that stores the value of the recently applied color.\n\t */\n\tprivate _addColorToDocumentColors( color: string ): void {\n\t\tconst predefinedColor = this.colorDefinitions\n\t\t\t.find( definition => definition.color === color );\n\n\t\tif ( !predefinedColor ) {\n\t\t\tthis.documentColors.add( {\n\t\t\t\tcolor,\n\t\t\t\tlabel: color,\n\t\t\t\toptions: {\n\t\t\t\t\thasBorder: false\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.documentColors.add( Object.assign( {}, predefinedColor ) );\n\t\t}\n\t}\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/**\n * @module ui/colorselector/colorpickerfragmentview\n */\n\nimport View from '../view.js';\nimport ButtonView from '../button/buttonview.js';\nimport type ViewCollection from '../viewcollection.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport type LabeledFieldView from '../labeledfield/labeledfieldview.js';\nimport type InputTextView from '../inputtext/inputtextview.js';\nimport {\n\tdefault as ColorPickerView,\n\ttype ColorPickerColorSelectedEvent\n} from '../colorpicker/colorpickerview.js';\n\nimport type { FocusTracker, KeystrokeHandler, Locale } from '@ckeditor/ckeditor5-utils';\nimport type { ColorPickerViewConfig } from '../colorpicker/utils.js';\nimport type { ColorSelectorColorPickerCancelEvent, ColorSelectorExecuteEvent } from './colorselectorview.js';\n\nimport { icons } from '@ckeditor/ckeditor5-core';\n\n/**\n * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n *\n * It allows users to select a color from a color picker.\n *\n * It consists of the following sub–components:\n *\n * * A color picker saturation and hue sliders,\n * * A text input accepting colors in HEX format,\n * * \"Save\" and \"Cancel\" action buttons.\n */\nexport default class ColorPickerFragmentView extends View {\n\t/**\n\t * A collection of component's children.\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * A view with saturation and hue sliders and color input.\n\t */\n\tpublic colorPickerView?: ColorPickerView;\n\n\t/**\n\t * The \"Save\" button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * The \"Cancel\" button view.\n\t */\n\tpublic cancelButtonView: ButtonView;\n\n\t/**\n\t * The action bar where are \"Save\" button and \"Cancel\" button.\n\t */\n\tpublic actionBarView: View;\n\n\t/**\n\t * Tracks information about the DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Indicates whether the component is visible or not.\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Keeps the value of the command associated with the component for the current selection.\n\t */\n\tdeclare public selectedColor?: string;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusables: ViewCollection;\n\n\t/**\n\t * A reference to the configuration of {@link #colorPickerView}. `false` when the view was\n\t * configured without a color picker.\n\t *\n\t * @readonly\n\t */\n\tprivate _colorPickerViewConfig: ColorPickerViewConfig | false;\n\n\t/**\n\t * Creates an instance of the view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param focusTracker Tracks information about the DOM focus in the list.\n\t * @param focusables A collection of views that can be focused in the view..\n\t * @param keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t * @param colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker\n\t * will not be rendered.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{\n\t\t\tfocusTracker,\n\t\t\tfocusables,\n\t\t\tkeystrokes,\n\t\t\tcolorPickerViewConfig\n\t\t}:\n\t\t{\n\t\t\tfocusTracker: FocusTracker;\n\t\t\tfocusables: ViewCollection;\n\t\t\tkeystrokes: KeystrokeHandler;\n\t\t\tcolorPickerViewConfig: ColorPickerViewConfig | false;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.keystrokes = keystrokes;\n\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'selectedColor', undefined );\n\n\t\tthis._focusables = focusables;\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.actionBarView = this._createActionBarView( { saveButtonView, cancelButtonView } );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-color-picker-fragment',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tconst colorPickerView = new ColorPickerView( this.locale, {\n\t\t\t...this._colorPickerViewConfig\n\t\t} as ColorPickerViewConfig );\n\n\t\tthis.colorPickerView = colorPickerView;\n\t\tthis.colorPickerView.render();\n\n\t\tif ( this.selectedColor ) {\n\t\t\tcolorPickerView.color = this.selectedColor;\n\t\t}\n\n\t\tthis.listenTo( this, 'change:selectedColor', ( evt, name, value ) => {\n\t\t\tcolorPickerView.color = value;\n\t\t} );\n\n\t\tthis.items.add( this.colorPickerView );\n\t\tthis.items.add( this.actionBarView );\n\n\t\tthis._addColorPickersElementsToFocusTracker();\n\t\tthis._stopPropagationOnArrowsKeys();\n\t\tthis._executeOnEnterPress();\n\t\tthis._executeUponColorChange();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Focuses the color picker.\n\t */\n\tpublic focus(): void {\n\t\tthis.colorPickerView!.focus();\n\t}\n\n\t/**\n\t * Reset validation messages.\n\t */\n\tpublic resetValidationStatus(): void {\n\t\tthis.colorPickerView!.resetValidationStatus();\n\t}\n\n\t/**\n\t * When color picker is focused and \"enter\" is pressed it executes command.\n\t */\n\tprivate _executeOnEnterPress(): void {\n\t\tthis.keystrokes.set( 'enter', evt => {\n\t\t\tif ( this.isVisible && this.focusTracker.focusedElement !== this.cancelButtonView.element && this.colorPickerView!.isValid() ) {\n\t\t\t\tthis.fire( 'execute', {\n\t\t\t\t\tvalue: this.selectedColor!\n\t\t\t\t} );\n\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Removes default behavior of arrow keys in dropdown.\n\t */\n\tprivate _stopPropagationOnArrowsKeys(): void {\n\t\tconst stopPropagation = ( data: KeyboardEvent ) => data.stopPropagation();\n\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * Adds color picker elements to focus tracker.\n\t */\n\tprivate _addColorPickersElementsToFocusTracker(): void {\n\t\tfor ( const slider of this.colorPickerView!.slidersView ) {\n\t\t\tthis.focusTracker.add( slider.element! );\n\t\t\tthis._focusables.add( slider );\n\t\t}\n\n\t\tconst input = this.colorPickerView!.hexInputRow.children.get( 1 ) as LabeledFieldView;\n\n\t\tif ( input.element! ) {\n\t\t\tthis.focusTracker.add( input.element );\n\t\t\tthis._focusables.add( input );\n\t\t}\n\n\t\tthis.focusTracker.add( this.saveButtonView.element! );\n\t\tthis._focusables.add( this.saveButtonView );\n\n\t\tthis.focusTracker.add( this.cancelButtonView.element! );\n\t\tthis._focusables.add( this.cancelButtonView );\n\t}\n\n\t/**\n\t * Creates bar containing \"Save\" and \"Cancel\" buttons.\n\t */\n\tprivate _createActionBarView( { saveButtonView, cancelButtonView }: {\n\t\tsaveButtonView: ButtonView;\n\t\tcancelButtonView: ButtonView;\n\t} ): View {\n\t\tconst actionBarRow = new View();\n\t\tconst children = this.createCollection();\n\n\t\tchildren.add( saveButtonView );\n\t\tchildren.add( cancelButtonView );\n\n\t\tactionBarRow.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-selector_action-bar'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren\n\t\t} );\n\n\t\treturn actionBarRow;\n\t}\n\n\t/**\n\t * Creates \"Save\" and \"Cancel\" buttons.\n\t */\n\tprivate _createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = locale!.t;\n\t\tconst saveButtonView = new ButtonView( locale );\n\t\tconst cancelButtonView = new ButtonView( locale );\n\n\t\tsaveButtonView.set( {\n\t\t\ticon: icons.check,\n\t\t\tclass: 'ck-button-save',\n\t\t\ttype: 'button',\n\t\t\twithText: false,\n\t\t\tlabel: t( 'Accept' )\n\t\t} );\n\n\t\tcancelButtonView.set( {\n\t\t\ticon: icons.cancel,\n\t\t\tclass: 'ck-button-cancel',\n\t\t\ttype: 'button',\n\t\t\twithText: false,\n\t\t\tlabel: t( 'Cancel' )\n\t\t} );\n\n\t\tsaveButtonView.on( 'execute', () => {\n\t\t\tif ( this.colorPickerView!.isValid() ) {\n\t\t\t\tthis.fire( 'execute', {\n\t\t\t\t\tsource: 'colorPickerSaveButton',\n\t\t\t\t\tvalue: this.selectedColor!\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tcancelButtonView.on( 'execute', () => {\n\t\t\tthis.fire( 'colorPicker:cancel' );\n\t\t} );\n\n\t\treturn {\n\t\t\tsaveButtonView, cancelButtonView\n\t\t};\n\t}\n\n\t/**\n\t * Fires the `execute` event if color in color picker has been changed\n\t * by the user.\n\t */\n\tprivate _executeUponColorChange() {\n\t\tthis.colorPickerView!.on( 'colorSelected', ( evt, data ) => {\n\t\t\tthis.fire( 'execute', {\n\t\t\t\tvalue: data.color,\n\t\t\t\tsource: 'colorPicker'\n\t\t\t} );\n\t\t\tthis.set( 'selectedColor', data.color );\n\t\t} );\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./colorselector.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/**\n * @module ui/colorselector/colorselectorview\n */\n\nimport FocusCycler, { type FocusableView } from '../focuscycler.js';\nimport View from '../view.js';\nimport ViewCollection from '../viewcollection.js';\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport type { ColorPickerViewConfig } from '../colorpicker/utils.js';\nimport type { ColorDefinition } from '../colorgrid/colorgridview.js';\nimport type { Model } from '@ckeditor/ckeditor5-engine';\n\nimport ColorGridsFragmentView from './colorgridsfragmentview.js';\nimport ColorPickerFragmentView from './colorpickerfragmentview.js';\n\nimport '../../theme/components/colorselector/colorselector.css';\n\n/**\n * The configurable color selector view class. It allows users to select colors from a predefined set of colors as well as from\n * a color picker.\n *\n * This meta-view is is made of two components (fragments):\n *\n * * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorGridsFragmentView},\n * * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n *\n * ```ts\n * const colorDefinitions = [\n * \t{ color: '#000', label: 'Black', options: { hasBorder: false } },\n * \t{ color: 'rgb(255, 255, 255)', label: 'White', options: { hasBorder: true } },\n * \t{ color: 'red', label: 'Red', options: { hasBorder: false } }\n * ];\n *\n * const selectorView = new ColorSelectorView( locale, {\n * \tcolors: colorDefinitions,\n * \tcolumns: 5,\n * \tremoveButtonLabel: 'Remove color',\n * \tdocumentColorsLabel: 'Document colors',\n * \tdocumentColorsCount: 4,\n * \tcolorPickerViewConfig: {\n * \t\tformat: 'hsl'\n * \t}\n * } );\n *\n * selectorView.appendUI();\n * selectorView.selectedColor = 'red';\n * selectorView.updateSelectedColors();\n *\n * selectorView.on( 'execute', ( evt, data ) => {\n * \tconsole.log( 'Color changed', data.value, data.source );\n * } );\n *\n * selectorView.on( 'colorPicker:show', ( evt ) => {\n * \tconsole.log( 'Color picker showed up', evt );\n * } );\n *\n * selectorView.on( 'colorPicker:cancel', ( evt ) => {\n * \tconsole.log( 'Color picker cancel', evt );\n * } );\n *\n * selectorView.render();\n *\n * document.body.appendChild( selectorView.element );\n * ```\n */\nexport default class ColorSelectorView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A collection of components.\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * A fragment that allows users to select colors from the a predefined set and from existing document colors.\n\t */\n\tpublic readonly colorGridsFragmentView: ColorGridsFragmentView;\n\n\t/**\n\t * A fragment that allows users to select a color from a color picker.\n\t */\n\tpublic readonly colorPickerFragmentView: ColorPickerFragmentView;\n\n\t/**\n\t * Keeps the value of the command associated with the component for the current selection.\n\t */\n\tdeclare public selectedColor?: string;\n\n\t/**\n\t * Reflects the visibility state of the color grids fragment.\n\t *\n\t * @internal\n\t */\n\tdeclare public _isColorGridsFragmentVisible: boolean;\n\n\t/**\n\t * Reflects the visibility state of the color picker fragment.\n\t *\n\t * @internal\n\t */\n\tdeclare public _isColorPickerFragmentVisible: boolean;\n\n\t/**\n\t * Helps cycling over focusable {@link #items} in the list.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusCycler: FocusCycler;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusables: ViewCollection;\n\n\t/**\n\t * The configuration of color picker sub-component.\n\t */\n\tprivate _colorPickerViewConfig: ColorPickerViewConfig | false;\n\n\t/**\n\t * Creates a view to be inserted as a child of {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param colors An array with definitions of colors to be displayed in the table.\n\t * @param columns The number of columns in the color grid.\n\t * @param removeButtonLabel The label of the button responsible for removing the color.\n\t * @param colorPickerLabel The label of the button responsible for color picker appearing.\n\t * @param documentColorsLabel The label for the section with the document colors.\n\t * @param documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t * @param colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker will be hidden.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{\n\t\t\tcolors,\n\t\t\tcolumns,\n\t\t\tremoveButtonLabel,\n\t\t\tdocumentColorsLabel,\n\t\t\tdocumentColorsCount,\n\t\t\tcolorPickerLabel,\n\t\t\tcolorPickerViewConfig\n\t\t}: {\n\t\t\tcolors: Array;\n\t\t\tcolumns: number;\n\t\t\tremoveButtonLabel: string;\n\t\t\tdocumentColorsLabel?: string;\n\t\t\tdocumentColorsCount?: number;\n\t\t\tcolorPickerLabel: string;\n\t\t\tcolorPickerViewConfig: ColorPickerViewConfig | false;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\t\tthis.items = this.createCollection();\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate list items backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate list items forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.colorGridsFragmentView = new ColorGridsFragmentView( locale, {\n\t\t\tcolors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tfocusables: this._focusables\n\t\t} );\n\n\t\tthis.colorPickerFragmentView = new ColorPickerFragmentView( locale, {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokes: this.keystrokes,\n\t\t\tcolorPickerViewConfig\n\t\t} );\n\n\t\tthis.set( '_isColorGridsFragmentVisible', true );\n\t\tthis.set( '_isColorPickerFragmentVisible', false );\n\n\t\tthis.set( 'selectedColor', undefined );\n\n\t\tthis.colorGridsFragmentView.bind( 'isVisible' ).to( this, '_isColorGridsFragmentVisible' );\n\t\tthis.colorPickerFragmentView.bind( 'isVisible' ).to( this, '_isColorPickerFragmentVisible' );\n\n\t\t/**\n\t\t * This is kind of bindings. Unfortunately we could not use this.bind() method because the same property\n\t\t * can not be bound twice. So this is work around how to bind 'selectedColor' property between components.\n\t\t */\n\t\tthis.on( 'change:selectedColor', ( evt, evtName, data ) => {\n\t\t\tthis.colorGridsFragmentView.set( 'selectedColor', data );\n\t\t\tthis.colorPickerFragmentView.set( 'selectedColor', data );\n\t\t} );\n\n\t\tthis.colorGridsFragmentView.on( 'change:selectedColor', ( evt, evtName, data ) => {\n\t\t\tthis.set( 'selectedColor', data );\n\t\t} );\n\n\t\tthis.colorPickerFragmentView.on( 'change:selectedColor', ( evt, evtName, data ) => {\n\t\t\tthis.set( 'selectedColor', data );\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-selector'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Renders the internals of the component on demand:\n\t * * {@link #colorPickerFragmentView},\n\t * * {@link #colorGridsFragmentView}.\n\t *\n\t * It allows for deferring component initialization to improve the performance.\n\t *\n\t * See {@link #showColorPickerFragment}, {@link #showColorGridsFragment}.\n\t */\n\tpublic appendUI(): void {\n\t\tthis._appendColorGridsFragment();\n\n\t\tif ( this._colorPickerViewConfig ) {\n\t\t\tthis._appendColorPickerFragment();\n\t\t}\n\t}\n\n\t/**\n\t * Shows the {@link #colorPickerFragmentView} and hides the {@link #colorGridsFragmentView}.\n\t *\n\t * **Note**: It requires {@link #appendUI} to be called first.\n\t *\n\t * See {@link #showColorGridsFragment}, {@link ~ColorSelectorView#event:colorPicker:show}.\n\t */\n\tpublic showColorPickerFragment(): void {\n\t\tif ( !this.colorPickerFragmentView.colorPickerView || this._isColorPickerFragmentVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isColorPickerFragmentVisible = true;\n\t\tthis.colorPickerFragmentView.focus();\n\t\tthis.colorPickerFragmentView.resetValidationStatus();\n\t\tthis._isColorGridsFragmentVisible = false;\n\t}\n\n\t/**\n\t * Shows the {@link #colorGridsFragmentView} and hides the {@link #colorPickerFragmentView}.\n\t *\n\t * See {@link #showColorPickerFragment}.\n\t *\n\t * **Note**: It requires {@link #appendUI} to be called first.\n\t */\n\tpublic showColorGridsFragment(): void {\n\t\tif ( this._isColorGridsFragmentVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isColorGridsFragmentVisible = true;\n\t\tthis.colorGridsFragmentView.focus();\n\t\tthis._isColorPickerFragmentVisible = false;\n\t}\n\n\t/**\n\t * Focuses the first focusable element in {@link #items}.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the last focusable element in {@link #items}.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focusCycler.focusLast();\n\t}\n\n\t/**\n\t * Scans through the editor model and searches for text node attributes with the given `attributeName`.\n\t * Found entries are set as document colors in {@link #colorGridsFragmentView}.\n\t *\n\t * All the previously stored document colors will be lost in the process.\n\t *\n\t * @param model The model used as a source to obtain the document colors.\n\t * @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t */\n\tpublic updateDocumentColors( model: Model, attributeName: string ): void {\n\t\tthis.colorGridsFragmentView.updateDocumentColors( model, attributeName );\n\t}\n\n\t/**\n\t * Refreshes the state of the selected color in one or both grids located in {@link #colorGridsFragmentView}.\n\t *\n\t * It guarantees that the selection will occur only in one of them.\n\t */\n\tpublic updateSelectedColors(): void {\n\t\tthis.colorGridsFragmentView.updateSelectedColors();\n\t}\n\n\t/**\n\t * Appends the view containing static and document color grid views.\n\t */\n\tprivate _appendColorGridsFragment(): void {\n\t\tif ( this.items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.items.add( this.colorGridsFragmentView );\n\t\tthis.colorGridsFragmentView.delegate( 'execute' ).to( this );\n\t\tthis.colorGridsFragmentView.delegate( 'colorPicker:show' ).to( this );\n\t}\n\n\t/**\n\t * Appends the view with the color picker.\n\t */\n\tprivate _appendColorPickerFragment(): void {\n\t\tif ( this.items.length === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.items.add( this.colorPickerFragmentView );\n\n\t\tif ( this.colorGridsFragmentView.colorPickerButtonView ) {\n\t\t\tthis.colorGridsFragmentView.colorPickerButtonView.on( 'execute', () => {\n\t\t\t\tthis.showColorPickerFragment();\n\t\t\t} );\n\t\t}\n\n\t\tthis.colorGridsFragmentView.addColorPickerButton();\n\t\tthis.colorPickerFragmentView.delegate( 'execute' ).to( this );\n\t\tthis.colorPickerFragmentView.delegate( 'colorPicker:cancel' ).to( this );\n\t}\n}\n\n/**\n * Fired whenever the color was changed. There are multiple sources of this event and you can distinguish them\n * using the `source` property passed along this event.\n *\n * @eventName ~ColorSelectorView#execute\n */\nexport type ColorSelectorExecuteEvent = {\n\tname: 'execute';\n\targs: [ {\n\t\tvalue: string;\n\t\tsource: 'staticColorsGrid' | 'documentColorsGrid' | 'removeColorButton' | 'colorPicker' | 'colorPickerSaveButton';\n\t} ];\n};\n\n/**\n * Fired when the user pressed the \"Cancel\" button in the\n * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n *\n * @eventName ~ColorSelectorView#colorPicker:cancel\n */\nexport type ColorSelectorColorPickerCancelEvent = {\n\tname: 'colorPicker:cancel';\n\targs: [];\n};\n\n/**\n * Fired whenever {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView} is shown.\n *\n * See {@link ~ColorSelectorView#showColorPickerFragment}.\n *\n * @eventName ~ColorSelectorView#colorPicker:show\n */\nexport type ColorSelectorColorPickerShowEvent = {\n\tname: 'colorPicker:show';\n\targs: [];\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/**\n * @module ui/componentfactory\n */\n\nimport { CKEditorError, type Locale } from '@ckeditor/ckeditor5-utils';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport type View from './view.js';\n\n/**\n * A helper class implementing the UI component ({@link module:ui/view~View view}) factory.\n *\n * It allows functions producing specific UI components to be registered under their unique names\n * in the factory. A registered component can be then instantiated by providing its name.\n * Note that the names are case insensitive.\n *\n * ```ts\n * // The editor provides localization tools for the factory.\n * const factory = new ComponentFactory( editor );\n *\n * factory.add( 'foo', locale => new FooView( locale ) );\n * factory.add( 'bar', locale => new BarView( locale ) );\n *\n * // An instance of FooView.\n * const fooInstance = factory.create( 'foo' );\n *\n * // Names are case insensitive so this is also allowed:\n * const barInstance = factory.create( 'Bar' );\n * ```\n *\n * The {@link module:core/editor/editor~Editor#locale editor locale} is passed to the factory\n * function when {@link module:ui/componentfactory~ComponentFactory#create} is called.\n */\nexport default class ComponentFactory {\n\t/**\n\t * The editor instance that the factory belongs to.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * Registered component factories.\n\t */\n\tprivate readonly _components = new Map View }>();\n\n\t/**\n\t * Creates an instance of the factory.\n\t *\n\t * @param editor The editor instance.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\t}\n\n\t/**\n\t * Returns an iterator of registered component names. Names are returned in lower case.\n\t */\n\tpublic* names(): IterableIterator {\n\t\tfor ( const value of this._components.values() ) {\n\t\t\tyield value.originalName;\n\t\t}\n\t}\n\n\t/**\n\t * Registers a component factory function that will be used by the\n\t * {@link #create create} method and called with the\n\t * {@link module:core/editor/editor~Editor#locale editor locale} as an argument,\n\t * allowing localization of the {@link module:ui/view~View view}.\n\t *\n\t * @param name The name of the component.\n\t * @param callback The callback that returns the component.\n\t */\n\tpublic add( name: string, callback: ( locale: Locale ) => View ): void {\n\t\tthis._components.set( getNormalized( name ), { callback, originalName: name } );\n\t}\n\n\t/**\n\t * Creates an instance of a component registered in the factory under a specific name.\n\t *\n\t * When called, the {@link module:core/editor/editor~Editor#locale editor locale} is passed to\n\t * the previously {@link #add added} factory function, allowing localization of the\n\t * {@link module:ui/view~View view}.\n\t *\n\t * @param name The name of the component.\n\t * @returns The instantiated component view.\n\t */\n\tpublic create( name: string ): View {\n\t\tif ( !this.has( name ) ) {\n\t\t\t/**\n\t\t\t * The required component is not registered in the component factory. Please make sure\n\t\t\t * the provided name is correct and the component has been correctly\n\t\t\t * {@link module:ui/componentfactory~ComponentFactory#add added} to the factory.\n\t\t\t *\n\t\t\t * @error componentfactory-item-missing\n\t\t\t * @param name The name of the missing component.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'componentfactory-item-missing',\n\t\t\t\tthis,\n\t\t\t\t{ name }\n\t\t\t);\n\t\t}\n\n\t\treturn this._components.get( getNormalized( name ) )!.callback( this.editor.locale );\n\t}\n\n\t/**\n\t * Checks if a component of a given name is registered in the factory.\n\t *\n\t * @param name The name of the component.\n\t */\n\tpublic has( name: string ): boolean {\n\t\treturn this._components.has( getNormalized( name ) );\n\t}\n}\n\n/**\n * Ensures that the component name used as the key in the internal map is in lower case.\n */\nfunction getNormalized( name: unknown ) {\n\treturn String( name ).toLowerCase();\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./formheader.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/**\n * @module ui/formheader/formheaderview\n */\n\nimport View from '../view.js';\nimport type ViewCollection from '../viewcollection.js';\nimport IconView from '../icon/iconview.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport '../../theme/components/formheader/formheader.css';\n\n/**\n * The class component representing a form header view. It should be used in more advanced forms to\n * describe the main purpose of the form.\n *\n * By default the component contains a bolded label view that has to be set. The label is usually a short (at most 3-word) string.\n * The component can also be extended by any other elements, like: icons, dropdowns, etc.\n *\n * It is used i.a.\n * by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}\n * and {@link module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}.\n *\n * The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.\n */\nexport default class FormHeaderView extends View {\n\t/**\n\t * A collection of header items.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * The label of the header.\n\t *\n\t * @observable\n\t */\n\tpublic declare label: string;\n\n\t/**\n\t * An additional CSS class added to the {@link #element}.\n\t *\n\t * @observable\n\t */\n\tpublic declare class: string | null;\n\n\t/**\n\t * The icon view instance. Defined only if icon was passed in the constructor's options.\n\t */\n\tpublic readonly iconView?: IconView;\n\n\t/**\n\t * Creates an instance of the form header class.\n\t *\n\t * @param locale The locale instance.\n\t * @param options.label A label.\n\t * @param options.class An additional class.\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined,\n\t\toptions: {\n\t\t\tlabel?: string | null;\n\t\t\tclass?: string | null;\n\t\t\ticon?: string | null;\n\t\t} = {}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'label', options.label || '' );\n\t\tthis.set( 'class', options.class || null );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form__header',\n\t\t\t\t\tbind.to( 'class' )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\n\t\tif ( options.icon ) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = options.icon;\n\n\t\t\tthis.children.add( this.iconView );\n\t\t}\n\n\t\tconst label = new View( locale );\n\n\t\tlabel.setTemplate( {\n\t\t\ttag: 'h2',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form__header__label'\n\t\t\t\t],\n\t\t\t\trole: 'presentation'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{ text: bind.to( 'label' ) }\n\t\t\t]\n\t\t} );\n\n\t\tthis.children.add( label );\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./dialogactions.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/**\n * @module ui/dialog/dialogactionsview\n */\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\nimport type { default as Button, ButtonExecuteEvent } from '../button/button.js';\nimport ButtonView from '../button/buttonview.js';\nimport View from '../view.js';\nimport ViewCollection from '../viewcollection.js';\nimport FocusCycler, { type FocusableView } from '../focuscycler.js';\n\nimport '../../theme/components/dialog/dialogactions.css';\n\n/**\n * A dialog actions view class. It contains button views which are used to execute dialog actions.\n */\nexport default class DialogActionsView extends View {\n\t/**\n\t * A collection of button views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A keystroke handler instance.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A focus cycler instance.\n\t */\n\tpublic readonly focusCycler: FocusCycler;\n\n\t/**\n\t * A focus tracker instance.\n\t */\n\tprivate readonly _focusTracker: FocusTracker;\n\n\t/**\n\t * A collection of focusable views.\n\t */\n\tprivate readonly _focusables: ViewCollection;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this._focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-dialog__actions'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * Creates the button views based on the given definitions.\n\t * Then adds them to the {@link #children} collection and to the focus cycler.\n\t */\n\tpublic setButtons( definitions: Array ): void {\n\t\tfor ( const definition of definitions ) {\n\t\t\tconst button = new ButtonView( this.locale );\n\n\t\t\tlet property: keyof DialogActionButtonDefinition;\n\t\t\tbutton.on( 'execute', () => definition.onExecute() );\n\n\t\t\tif ( definition.onCreate ) {\n\t\t\t\tdefinition.onCreate( button );\n\t\t\t}\n\n\t\t\tfor ( property in definition ) {\n\t\t\t\tif ( property != 'onExecute' && property != 'onCreate' ) {\n\t\t\t\t\tbutton.set( property, definition[ property ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.children.add( button );\n\t\t}\n\n\t\tthis._updateFocusCyclableItems();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus( direction?: 1 | -1 ): void {\n\t\tif ( direction === -1 ) {\n\t\t\tthis.focusCycler.focusLast();\n\t\t} else {\n\t\t\tthis.focusCycler.focusFirst();\n\t\t}\n\t}\n\n\t/**\n\t * Adds all elements from the {@link #children} collection to the {@link #_focusables} collection\n\t * and to the {@link #_focusTracker} instance.\n\t */\n\tprivate _updateFocusCyclableItems() {\n\t\tArray.from( this.children ).forEach( v => {\n\t\t\tthis._focusables.add( v );\n\t\t\tthis._focusTracker.add( v.element! );\n\t\t} );\n\t}\n}\n\n/**\n * A dialog action button definition. It is a slightly modified version\n * of the {@link module:ui/button/button~Button} definition.\n */\nexport type DialogActionButtonDefinition =\n\tPick &\n\tPartial> &\n\t{\n\t\tonExecute: Function;\n\t\tonCreate?: ( button: ButtonView ) => void;\n\t};\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/**\n * @module ui/dialog/dialogcontentview\n */\n\nimport View from '../view.js';\nimport type ViewCollection from '../viewcollection.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A dialog content view class.\n */\nexport default class DialogContentView extends View {\n\t/**\n\t * A collection of content items.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-dialog__content' ]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * Removes all the child views.\n\t */\n\tpublic reset(): void {\n\t\twhile ( this.children.length ) {\n\t\t\tthis.children.remove( 0 );\n\t\t}\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./dialog.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/**\n * @module ui/dialog/dialogview\n */\n\nimport {\n\tKeystrokeHandler,\n\tFocusTracker,\n\tRect,\n\tglobal,\n\ttoUnit,\n\ttype EventInfo,\n\ttype Locale,\n\ttype DecoratedMethodEvent\n} from '@ckeditor/ckeditor5-utils';\nimport { icons } from '@ckeditor/ckeditor5-core';\nimport ViewCollection from '../viewcollection.js';\nimport View from '../view.js';\nimport FormHeaderView from '../formheader/formheaderview.js';\nimport ButtonView from '../button/buttonview.js';\nimport { type ButtonExecuteEvent } from '../button/button.js';\nimport FocusCycler, { isViewWithFocusCycler,\n\ttype FocusCyclerBackwardCycleEvent,\n\ttype FocusCyclerForwardCycleEvent,\n\ttype FocusableView,\n\tisFocusable\n}\n\tfrom '../focuscycler.js';\nimport DraggableViewMixin, { type DraggableView, type DraggableViewDragEvent } from '../bindings/draggableviewmixin.js';\nimport DialogActionsView, { type DialogActionButtonDefinition } from './dialogactionsview.js';\nimport DialogContentView from './dialogcontentview.js';\nimport type EditorUI from '../editorui/editorui.js';\n\nimport '../../theme/components/dialog/dialog.css';\n// @if CK_DEBUG_DIALOG // const RectDrawer = require( '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer' ).default;\n\n/**\n * Available dialog view positions:\n *\n * * `DialogViewPosition.SCREEN_CENTER` – A fixed position in the center of the screen.\n * * `DialogViewPosition.EDITOR_CENTER` – A dynamic position in the center of the editor editable area.\n * * `DialogViewPosition.EDITOR_TOP_SIDE` – A dynamic position at the top-right (for the left-to-right languages)\n * or top-left (for right-to-left languages) corner of the editor editable area.\n * * `DialogViewPosition.EDITOR_TOP_CENTER` – A dynamic position at the top-center of the editor editable area.\n * * `DialogViewPosition.EDITOR_BOTTOM_CENTER` – A dynamic position at the bottom-center of the editor editable area.\n * * `DialogViewPosition.EDITOR_ABOVE_CENTER` – A dynamic position centered above the editor editable area.\n * * `DialogViewPosition.EDITOR_BELOW_CENTER` – A dynamic position centered below the editor editable area.\n *\n * The position of a dialog is specified by a {@link module:ui/dialog/dialog~DialogDefinition#position `position` property} of a\n * definition passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n */\nexport const DialogViewPosition = {\n\tSCREEN_CENTER: 'screen-center',\n\tEDITOR_CENTER: 'editor-center',\n\tEDITOR_TOP_SIDE: 'editor-top-side',\n\tEDITOR_TOP_CENTER: 'editor-top-center',\n\tEDITOR_BOTTOM_CENTER: 'editor-bottom-center',\n\tEDITOR_ABOVE_CENTER: 'editor-above-center',\n\tEDITOR_BELOW_CENTER: 'editor-below-center'\n} as const;\n\nconst toPx = toUnit( 'px' );\n\n/**\n * A dialog view class.\n */\nexport default class DialogView extends DraggableViewMixin( View ) implements DraggableView {\n\t/**\n\t * A collection of the child views inside of the dialog.\n\t * A dialog can have 3 optional parts: header, content, and actions.\n\t */\n\tpublic readonly parts: ViewCollection;\n\n\t/**\n\t * A header view of the dialog. It is also a drag handle of the dialog.\n\t */\n\tpublic headerView?: FormHeaderView;\n\n\t/**\n\t * A close button view. It is automatically added to the header view if present.\n\t */\n\tpublic closeButtonView?: ButtonView;\n\n\t/**\n\t * A view with the action buttons available to the user.\n\t */\n\tpublic actionsView?: DialogActionsView;\n\n\t/**\n\t * A default dialog element offset from the reference element (e.g. editor editable area).\n\t */\n\tpublic static defaultOffset: number = 15;\n\n\t/**\n\t * A view with the dialog content.\n\t */\n\tpublic contentView?: DialogContentView;\n\n\t/**\n\t * A keystroke handler instance.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A focus tracker instance.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * A flag indicating if the dialog was moved manually. If so, its position\n\t * will not be updated automatically upon window resize or document scroll.\n\t */\n\tpublic wasMoved: boolean = false;\n\n\t/**\n\t * A flag indicating if this dialog view is a modal.\n\t *\n\t * @observable\n\t */\n\tdeclare public isModal: boolean;\n\n\t/**\n\t * A label for the view dialog element to be used by the assistive technologies.\n\t *\n\t * @observable\n\t */\n\tdeclare public ariaLabel: string;\n\n\t/**\n\t * A custom class name to be added to the dialog element.\n\t *\n\t * @observable\n\t */\n\tdeclare public className: string | undefined;\n\n\t/**\n\t * The position of the dialog view.\n\t *\n\t * @observable\n\t */\n\tdeclare public position: typeof DialogViewPosition[ keyof typeof DialogViewPosition ];\n\n\t/**\n\t * A flag indicating that the dialog should be shown. Once set to `true`, the dialog will be shown\n\t * after its position is calculated. Until then, the dialog is transparent and not visible.\n\t *\n\t * See {@link #_isTransparent} property.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _isVisible: boolean;\n\n\t/**\n\t * A flag indicating if a dialog is transparent. It is used to prevent the dialog from being visible\n\t * before its position is calculated.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _isTransparent: boolean;\n\n\t/**\n\t * The calculated dialog `top` CSS property used for positioning.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _top: number;\n\n\t/**\n\t * The calculated dialog `left` CSS property used for positioning.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _left: number;\n\n\t/**\n\t * A callback returning the DOM root that requested the dialog.\n\t */\n\tprivate _getCurrentDomRoot: () => HTMLElement;\n\n\t/**\n\t * A callback returning the configured editor viewport offset.\n\t */\n\tprivate _getViewportOffset: () => EditorUI[ 'viewportOffset' ];\n\n\t/**\n\t * The list of the focusable elements inside the dialog view.\n\t */\n\tprivate readonly _focusables: ViewCollection;\n\n\t/**\n\t * The focus cycler instance.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale,\n\t\t{\n\t\t\tgetCurrentDomRoot,\n\t\t\tgetViewportOffset\n\t\t}: {\n\t\t\tgetCurrentDomRoot: () => HTMLElement;\n\t\t\tgetViewportOffset: () => EditorUI[ 'viewportOffset' ];\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = locale.t;\n\n\t\tthis.set( 'className', '' );\n\t\tthis.set( 'ariaLabel', t( 'Editor dialog' ) );\n\t\tthis.set( 'isModal', false );\n\t\tthis.set( 'position', DialogViewPosition.SCREEN_CENTER );\n\t\tthis.set( '_isVisible', false );\n\t\tthis.set( '_isTransparent', false );\n\t\tthis.set( '_top', 0 );\n\t\tthis.set( '_left', 0 );\n\t\tthis._getCurrentDomRoot = getCurrentDomRoot;\n\t\tthis._getViewportOffset = getViewportOffset;\n\n\t\tthis.decorate( 'moveTo' );\n\n\t\tthis.parts = this.createCollection();\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-dialog-overlay',\n\t\t\t\t\tbind.if( 'isModal', 'ck-dialog-overlay__transparent', isModal => !isModal ),\n\t\t\t\t\tbind.if( '_isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\t// Prevent from editor losing focus when clicking on the modal overlay.\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\ttabindex: '-1',\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-dialog',\n\t\t\t\t\t\t\tbind.to( 'className' )\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: 'dialog',\n\t\t\t\t\t\t'aria-label': bind.to( 'ariaLabel' ),\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\ttop: bind.to( '_top', top => toPx( top ) ),\n\t\t\t\t\t\t\tleft: bind.to( '_left', left => toPx( left ) ),\n\t\t\t\t\t\t\tvisibility: bind.if( '_isTransparent', 'hidden' )\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.parts\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis.fire( 'close', { source: 'escKeyPress' } );\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Support for dragging the modal.\n\t\tthis.on( 'drag', ( evt: EventInfo, { deltaX, deltaY } ) => {\n\t\t\tthis.wasMoved = true;\n\t\t\tthis.moveBy( deltaX, deltaY );\n\t\t} );\n\n\t\t// Update dialog position upon window resize, if the position was not changed manually.\n\t\tthis.listenTo( global.window, 'resize', () => {\n\t\t\tif ( this._isVisible && !this.wasMoved ) {\n\t\t\t\tthis.updatePosition();\n\t\t\t}\n\t\t} );\n\n\t\t// Update dialog position upon document scroll, if the position was not changed manually.\n\t\tthis.listenTo( global.document, 'scroll', () => {\n\t\t\tif ( this._isVisible && !this.wasMoved ) {\n\t\t\t\tthis.updatePosition();\n\t\t\t}\n\t\t} );\n\n\t\tthis.on( 'change:_isVisible', ( evt, name, isVisible ) => {\n\t\t\tif ( isVisible ) {\n\t\t\t\t// Let the content render first, then apply the position. Otherwise, the calculated DOM Rects\n\t\t\t\t// will not reflect the final look of the dialog. Note that we're not using #_moveOffScreen() here because\n\t\t\t\t// it causes a violent movement of the viewport on iOS (because the dialog still keeps the DOM focus).\n\t\t\t\tthis._isTransparent = true;\n\n\t\t\t\t// FYI: RAF is too short. We need to wait a bit longer.\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\tthis.updatePosition();\n\n\t\t\t\t\tthis._isTransparent = false;\n\n\t\t\t\t\t// The view must get the focus after it gets visible. But this is only possible\n\t\t\t\t\t// after the dialog is no longer transparent.\n\t\t\t\t\tthis.focus();\n\t\t\t\t}, 10 );\n\t\t\t}\n\t\t} );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * Returns the element that should be used as a drag handle.\n\t */\n\tpublic override get dragHandleElement(): HTMLElement | null {\n\t\tif ( this.headerView ) {\n\t\t\treturn this.headerView.element;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Creates the dialog parts. Which of them are created depends on the arguments passed to the method.\n\t * There are no rules regarding the dialog construction, that is, no part is mandatory.\n\t * Each part can only be created once.\n\t *\n\t * @internal\n\t */\n\tpublic setupParts( { icon, title, hasCloseButton = true, content, actionButtons }: {\n\t\ticon?: string;\n\t\ttitle?: string;\n\t\thasCloseButton?: boolean;\n\t\tcontent?: View | Array;\n\t\tactionButtons?: Array;\n\t} ): void {\n\t\tif ( title ) {\n\t\t\tthis.headerView = new FormHeaderView( this.locale, { icon } );\n\n\t\t\tif ( hasCloseButton ) {\n\t\t\t\tthis.closeButtonView = this._createCloseButton();\n\t\t\t\tthis.headerView.children.add( this.closeButtonView );\n\t\t\t}\n\n\t\t\tthis.headerView.label = title;\n\t\t\tthis.ariaLabel = title;\n\t\t\tthis.parts.add( this.headerView, 0 );\n\t\t}\n\n\t\tif ( content ) {\n\t\t\t// Normalize the content specified in the arguments.\n\t\t\tif ( content instanceof View ) {\n\t\t\t\tcontent = [ content ];\n\t\t\t}\n\n\t\t\tthis.contentView = new DialogContentView( this.locale );\n\t\t\tthis.contentView.children.addMany( content );\n\t\t\tthis.parts.add( this.contentView );\n\t\t}\n\n\t\tif ( actionButtons ) {\n\t\t\tthis.actionsView = new DialogActionsView( this.locale );\n\t\t\tthis.actionsView.setButtons( actionButtons );\n\t\t\tthis.parts.add( this.actionsView );\n\t\t}\n\n\t\tthis._updateFocusCyclableItems();\n\t}\n\n\t/**\n\t * Focuses the first focusable element inside the dialog.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Normalizes the passed coordinates to make sure the dialog view\n\t * is displayed within the visible viewport and moves it there.\n\t *\n\t * @internal\n\t */\n\tpublic moveTo( left: number, top: number ): void {\n\t\tconst viewportRect = this._getViewportRect();\n\t\tconst dialogRect = this._getDialogRect();\n\n\t\t// Don't let the dialog go beyond the right edge of the viewport.\n\t\tif ( left + dialogRect.width > viewportRect.right ) {\n\t\t\tleft = viewportRect.right - dialogRect.width;\n\t\t}\n\n\t\t// Don't let the dialog go beyond the left edge of the viewport.\n\t\tif ( left < viewportRect.left ) {\n\t\t\tleft = viewportRect.left;\n\t\t}\n\n\t\t// Don't let the dialog go beyond the top edge of the viewport.\n\t\tif ( top < viewportRect.top ) {\n\t\t\ttop = viewportRect.top;\n\t\t}\n\n\t\t// Note: We don't do the same for the bottom edge to allow users to resize the window vertically\n\t\t// and let the dialog to stay put instead of covering the editing root.\n\n\t\tthis._moveTo( left, top );\n\t}\n\n\t/**\n\t * Moves the dialog to the specified coordinates.\n\t */\n\tprivate _moveTo( left: number, top: number ): void {\n\t\tthis._left = left;\n\t\tthis._top = top;\n\t}\n\n\t/**\n\t * Moves the dialog by the specified offset.\n\t *\n\t * @internal\n\t */\n\tpublic moveBy( left: number, top: number ): void {\n\t\tthis.moveTo( this._left + left, this._top + top );\n\t}\n\n\t/**\n\t * Moves the dialog view to the off-screen position.\n\t * Used when there is no space to display the dialog.\n\t */\n\tprivate _moveOffScreen(): void {\n\t\tthis._moveTo( -9999, -9999 );\n\t}\n\n\t/**\n\t * Recalculates the dialog according to the set position and viewport,\n\t * and moves it to the new position.\n\t */\n\tpublic updatePosition(): void {\n\t\tif ( !this.element || !this.element.parentNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewportRect = this._getViewportRect();\n\n\t\t// Actual position may be different from the configured one if there's no DOM root.\n\t\tlet configuredPosition = this.position;\n\t\tlet domRootRect;\n\n\t\tif ( !this._getCurrentDomRoot() ) {\n\t\t\tconfiguredPosition = DialogViewPosition.SCREEN_CENTER;\n\t\t} else {\n\t\t\tdomRootRect = this._getVisibleDomRootRect( viewportRect );\n\t\t}\n\n\t\tconst defaultOffset = DialogView.defaultOffset;\n\t\tconst dialogRect = this._getDialogRect();\n\n\t\t// @if CK_DEBUG_DIALOG // RectDrawer.clear();\n\t\t// @if CK_DEBUG_DIALOG // RectDrawer.draw( viewportRect, { outlineColor: 'blue' }, 'Viewport' );\n\n\t\tswitch ( configuredPosition ) {\n\t\t\tcase DialogViewPosition.EDITOR_TOP_SIDE: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( domRootRect ) {\n\t\t\t\t\tconst leftCoordinate = this.locale!.contentLanguageDirection === 'ltr' ?\n\t\t\t\t\t\tdomRootRect.right - dialogRect.width - defaultOffset :\n\t\t\t\t\t\tdomRootRect.left + defaultOffset;\n\n\t\t\t\t\tthis.moveTo( leftCoordinate, domRootRect.top + defaultOffset );\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_CENTER: {\n\t\t\t\tif ( domRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tMath.round( domRootRect.top + domRootRect.height / 2 - dialogRect.height / 2 )\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.SCREEN_CENTER: {\n\t\t\t\tthis.moveTo(\n\t\t\t\t\tMath.round( ( viewportRect.width - dialogRect.width ) / 2 ),\n\t\t\t\t\tMath.round( ( viewportRect.height - dialogRect.height ) / 2 )\n\t\t\t\t);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_TOP_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( domRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tdomRootRect.top + defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_BOTTOM_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( domRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tdomRootRect.bottom - dialogRect.height - defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_ABOVE_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( domRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tdomRootRect.top - dialogRect.height - defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_BELOW_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( domRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tdomRootRect.bottom + defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the visible DOM root part.\n\t */\n\tprivate _getVisibleDomRootRect( viewportRect: Rect ): Rect | null {\n\t\tlet visibleDomRootRect = new Rect( this._getCurrentDomRoot() ).getVisible();\n\n\t\tif ( !visibleDomRootRect ) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tvisibleDomRootRect = viewportRect.getIntersection( visibleDomRootRect );\n\n\t\t\tif ( !visibleDomRootRect ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn visibleDomRootRect;\n\t}\n\n\t/**\n\t * Calculates the dialog element rect.\n\t */\n\tprivate _getDialogRect() {\n\t\treturn new Rect( this.element!.firstElementChild as HTMLElement );\n\t}\n\n\t/**\n\t * Calculates the viewport rect.\n\t */\n\tprivate _getViewportRect() {\n\t\treturn getConstrainedViewportRect( this._getViewportOffset() );\n\t}\n\n\t/**\n\t * Collects all focusable elements inside the dialog parts\n\t * and adds them to the focus tracker and focus cycler.\n\t */\n\tprivate _updateFocusCyclableItems() {\n\t\tconst focusables: Array = [];\n\n\t\tif ( this.contentView ) {\n\t\t\tfor ( const child of this.contentView.children ) {\n\t\t\t\tif ( isFocusable( child ) ) {\n\t\t\t\t\tfocusables.push( child );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.actionsView ) {\n\t\t\tfocusables.push( this.actionsView );\n\t\t}\n\n\t\tif ( this.closeButtonView ) {\n\t\t\tfocusables.push( this.closeButtonView );\n\t\t}\n\n\t\tfocusables.forEach( focusable => {\n\t\t\tthis._focusables.add( focusable );\n\t\t\tthis.focusTracker.add( focusable.element! );\n\n\t\t\tif ( isViewWithFocusCycler( focusable ) ) {\n\t\t\t\tthis.listenTo( focusable.focusCycler, 'forwardCycle', evt => {\n\t\t\t\t\tthis._focusCycler.focusNext();\n\n\t\t\t\t\t// Stop the event propagation only if there are more focusables.\n\t\t\t\t\tif ( this._focusCycler.next !== this._focusCycler.focusables.get( this._focusCycler.current! ) ) {\n\t\t\t\t\t\tevt.stop();\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tthis.listenTo( focusable.focusCycler, 'backwardCycle', evt => {\n\t\t\t\t\tthis._focusCycler.focusPrevious();\n\n\t\t\t\t\t// Stop the event propagation only if there are more focusables.\n\t\t\t\t\tif ( this._focusCycler.previous !== this._focusCycler.focusables.get( this._focusCycler.current! ) ) {\n\t\t\t\t\t\tevt.stop();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the close button view that is displayed in the header view corner.\n\t */\n\tprivate _createCloseButton(): ButtonView {\n\t\tconst buttonView = new ButtonView( this.locale );\n\t\tconst t = this.locale!.t;\n\n\t\tbuttonView.set( {\n\t\t\tlabel: t( 'Close' ),\n\t\t\ttooltip: true,\n\t\t\ticon: icons.cancel\n\t\t} );\n\n\t\tbuttonView.on( 'execute', () => this.fire( 'close', { source: 'closeButton' } ) );\n\n\t\treturn buttonView;\n\t}\n}\n\n/**\n * An event fired when the dialog is closed.\n *\n * @eventName ~DialogView#close\n */\nexport type DialogViewCloseEvent = {\n\tname: 'close';\n\targs: [ { source: 'closeButton' | 'escKeyPress' } ];\n};\n\n/**\n * An event fired when the dialog is moved.\n *\n * @eventName ~DialogView#moveTo\n */\nexport type DialogViewMoveToEvent = DecoratedMethodEvent;\n\n// Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n// TODO: This is a duplicate from position.ts module. It should either be exported there or land somewhere in utils.\nfunction getConstrainedViewportRect( viewportOffset: EditorUI[ 'viewportOffset' ] ): Rect {\n\tviewportOffset = Object.assign( { top: 0, bottom: 0, left: 0, right: 0 }, viewportOffset );\n\n\tconst viewportRect = new Rect( global.window );\n\n\tviewportRect.top += viewportOffset.top!;\n\tviewportRect.height -= viewportOffset.top!;\n\tviewportRect.bottom -= viewportOffset.bottom!;\n\tviewportRect.height -= viewportOffset.bottom!;\n\tviewportRect.left += viewportOffset.left!;\n\tviewportRect.right -= viewportOffset.right!;\n\tviewportRect.width -= viewportOffset.left! + viewportOffset.right!;\n\n\treturn viewportRect;\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/**\n * @module ui/bindings/draggableviewmixin\n */\n\nimport type View from '../view.js';\nimport { global, type Constructor, type Mixed, type EventInfo } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A mixin that brings the possibility to observe dragging of the view element.\n * The view has to implement the {@link ~DraggableView} interface to use it:\n *\n * ```js\n * export default class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {\n * \t\t// ...\n * }\n * ```\n *\n * Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:\n * * `mousedown` and `touchstart` on the view element - starting the dragging.\n * * `mousemove` and `touchmove` on the document - updating the view coordinates.\n * * `mouseup` and `touchend` on the document - stopping the dragging.\n *\n * The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -\n * it is up to the developer to implement it.\n */\nexport default function DraggableViewMixin>( view: Base ): Mixed {\n\tabstract class DraggableMixin extends view implements DraggableView {\n\t\t/**\n\t\t * A flag indicating whether the view is currently being dragged.\n\t\t *\n\t\t * @observable\n\t\t */\n\t\tdeclare public isDragging: boolean;\n\n\t\t/**\n\t\t * A bound version of {@link #_onDrag}.\n\t\t */\n\t\tprivate _onDragBound = this._onDrag.bind( this );\n\n\t\t/**\n\t\t * A bound version of {@link #_onDragEnd}.\n\t\t */\n\t\tprivate _onDragEndBound = this._onDragEnd.bind( this );\n\n\t\t/**\n\t\t * The last coordinates of the view. It is updated on every mouse move.\n\t\t */\n\t\tprivate _lastDraggingCoordinates: { x: number; y: number } = { x: 0, y: 0 };\n\n\t\t/**\n\t\t * @inheritdoc\n\t\t */\n\t\tconstructor( ...args: Array ) {\n\t\t\tsuper( ...args );\n\n\t\t\tthis.on( 'render', () => {\n\t\t\t\tthis._attachListeners();\n\t\t\t} );\n\n\t\t\tthis.set( 'isDragging', false );\n\t\t}\n\n\t\t/**\n\t\t * Attaches the listeners for the drag start.\n\t\t */\n\t\tprivate _attachListeners() {\n\t\t\tthis.listenTo( this.element!, 'mousedown', this._onDragStart.bind( this ) );\n\t\t\tthis.listenTo( this.element!, 'touchstart', this._onDragStart.bind( this ) );\n\t\t}\n\n\t\t/**\n\t\t * Attaches the listeners for the dragging and drag end.\n\t\t */\n\t\tprivate _attachDragListeners() {\n\t\t\tthis.listenTo( global.document, 'mouseup', this._onDragEndBound );\n\t\t\tthis.listenTo( global.document, 'touchend', this._onDragEndBound );\n\t\t\tthis.listenTo( global.document, 'mousemove', this._onDragBound );\n\t\t\tthis.listenTo( global.document, 'touchmove', this._onDragBound );\n\t\t}\n\n\t\t/**\n\t\t * Detaches the listeners after the drag end.\n\t\t */\n\t\tprivate _detachDragListeners() {\n\t\t\tthis.stopListening( global.document, 'mouseup', this._onDragEndBound );\n\t\t\tthis.stopListening( global.document, 'touchend', this._onDragEndBound );\n\t\t\tthis.stopListening( global.document, 'mousemove', this._onDragBound );\n\t\t\tthis.stopListening( global.document, 'touchmove', this._onDragBound );\n\t\t}\n\n\t\t/**\n\t\t * Starts the dragging listeners and sets the initial view coordinates.\n\t\t */\n\t\tprivate _onDragStart( evt: EventInfo, domEvt: MouseEvent | TouchEvent ) {\n\t\t\tif ( !this._isHandleElementPressed( domEvt ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._attachDragListeners();\n\n\t\t\tlet x = 0;\n\t\t\tlet y = 0;\n\n\t\t\t// If dragging is performed with a mouse, there is only one set of coordinates available.\n\t\t\t// But when using a touch device, there may be many of them, so use the coordinates from the first touch.\n\t\t\tif ( domEvt instanceof MouseEvent ) {\n\t\t\t\tx = domEvt.clientX;\n\t\t\t\ty = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tx = domEvt.touches[ 0 ].clientX;\n\t\t\t\ty = domEvt.touches[ 0 ].clientY;\n\t\t\t}\n\n\t\t\tthis._lastDraggingCoordinates = { x, y };\n\n\t\t\tthis.isDragging = true;\n\t\t}\n\n\t\t/**\n\t\t * Updates the view coordinates and fires the `drag` event.\n\t\t */\n\t\tprivate _onDrag( evt: EventInfo, domEvt: MouseEvent | TouchEvent ) {\n\t\t\t// If dragging was stopped by some external intervention, stop listening.\n\t\t\tif ( !this.isDragging ) {\n\t\t\t\tthis._detachDragListeners();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newX = 0;\n\t\t\tlet newY = 0;\n\n\t\t\t// If dragging is performed with a mouse, there is only one set of coordinates available.\n\t\t\t// But when using a touch device, there may be many of them, so use the coordinates from the first touch.\n\t\t\tif ( domEvt instanceof MouseEvent ) {\n\t\t\t\tnewX = domEvt.clientX;\n\t\t\t\tnewY = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tnewX = domEvt.touches[ 0 ].clientX;\n\t\t\t\tnewY = domEvt.touches[ 0 ].clientY;\n\t\t\t}\n\n\t\t\t// Prevents selection of text while dragging on Safari.\n\t\t\tdomEvt.preventDefault();\n\n\t\t\tthis.fire( 'drag', {\n\t\t\t\tdeltaX: Math.round( newX - this._lastDraggingCoordinates.x ),\n\t\t\t\tdeltaY: Math.round( newY - this._lastDraggingCoordinates.y )\n\t\t\t} );\n\n\t\t\tthis._lastDraggingCoordinates = { x: newX, y: newY };\n\t\t}\n\n\t\t/**\n\t\t * Stops the dragging and detaches the listeners.\n\t\t */\n\t\tprivate _onDragEnd() {\n\t\t\tthis._detachDragListeners();\n\n\t\t\tthis.isDragging = false;\n\t\t}\n\n\t\t/**\n\t\t * Checks if the drag handle element was pressed.\n\t\t */\n\t\tprivate _isHandleElementPressed( domEvt: MouseEvent | TouchEvent ) {\n\t\t\tif ( !this.dragHandleElement ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this.dragHandleElement === domEvt.target ||\n\t\t\t\t( domEvt.target instanceof HTMLElement && this.dragHandleElement.contains( domEvt.target ) );\n\t\t}\n\n\t\tpublic abstract get dragHandleElement(): HTMLElement | null;\n\t}\n\n\treturn DraggableMixin as any;\n}\n\n/**\n * An interface that should be implemented by views that want to be draggable.\n */\nexport interface DraggableView extends View {\n\tget dragHandleElement(): HTMLElement | null;\n}\n\n/**\n * An event data object for the {@link ~DraggableView} `drag` event. Fired when the view is dragged.\n */\nexport type DraggableViewDragEvent = {\n\tname: 'drag';\n\targs: [ {\n\t\tdeltaX: number;\n\t\tdeltaY: number;\n\t} ];\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/**\n * @module ui/dialog/dialog\n */\n\nimport type View from '../view.js';\nimport { type Editor, Plugin } from '@ckeditor/ckeditor5-core';\nimport DialogView, { type DialogViewCloseEvent, DialogViewPosition } from './dialogview.js';\nimport type { DialogActionButtonDefinition } from './dialogactionsview.js';\nimport type { DocumentChangeEvent } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The dialog controller class. It is used to show and hide the {@link module:ui/dialog/dialogview~DialogView}.\n */\nexport default class Dialog extends Plugin {\n\t/**\n\t * The name of the currently visible dialog view instance.\n\t *\n\t * @observable\n\t */\n\tdeclare public id: string | null;\n\n\t/**\n\t * The currently visible dialog view instance.\n\t */\n\tpublic view?: DialogView;\n\n\t/**\n\t * The `Dialog` plugin instance which most recently showed the dialog.\n\t *\n\t * Only one dialog can be visible at once, even if there are many editor instances on the page.\n\t * If an editor wants to show a dialog, it should first hide the dialog that is already opened.\n\t * But only the `Dialog` instance that showed the dialog is able able to properly hide it.\n\t * This is why we need to store it in a globally available space (static property).\n\t * This way every `Dialog` plugin in every editor is able to correctly close any open dialog window.\n\t */\n\tprivate static _visibleDialogPlugin: Dialog | null;\n\n\t/**\n\t * A flag indicating whether the dialog is currently visible.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * A configurable callback called when the dialog is hidden.\n\t */\n\tprivate _onHide: ( ( dialog: Dialog ) => void ) | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Dialog' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tconst t = editor.t;\n\n\t\tthis._initShowHideListeners();\n\t\tthis._initFocusToggler();\n\t\tthis._initMultiRootIntegration();\n\n\t\tthis.set( 'id', null );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tcategoryId: 'navigation',\n\t\t\tkeystrokes: [ {\n\t\t\t\tlabel: t( 'Move focus in and out of an active dialog window' ),\n\t\t\t\tkeystroke: 'Ctrl+F6',\n\t\t\t\tmayRequireFn: true\n\t\t\t} ]\n\t\t} );\n\t}\n\n\t/**\n\t * Initiates listeners for the `show` and `hide` events emitted by this plugin.\n\t *\n\t * We could not simply decorate the {@link #show} and {@link #hide} methods to fire events,\n\t * because they would be fired in the wrong order – first would be `show` and then `hide`\n\t * (because showing the dialog actually starts with hiding the previously visible one).\n\t * Hence, we added private methods {@link #_show} and {@link #_hide} which are called on events\n\t * in the desired sequence.\n\t */\n\tprivate _initShowHideListeners() {\n\t\tthis.on( 'show', ( evt, args ) => {\n\t\t\tthis._show( args );\n\t\t} );\n\n\t\t// 'low' priority allows to add custom callback between `_show()` and `onShow()`.\n\t\tthis.on( 'show', ( evt, args ) => {\n\t\t\tif ( args.onShow ) {\n\t\t\t\targs.onShow( this );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\tthis.on( 'hide', () => {\n\t\t\tif ( Dialog._visibleDialogPlugin ) {\n\t\t\t\tDialog._visibleDialogPlugin._hide();\n\t\t\t}\n\t\t} );\n\n\t\t// 'low' priority allows to add custom callback between `_hide()` and `onHide()`.\n\t\tthis.on( 'hide', () => {\n\t\t\tif ( this._onHide ) {\n\t\t\t\tthis._onHide( this );\n\t\t\t\tthis._onHide = undefined;\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Initiates keystroke handler for toggling the focus between the editor and the dialog view.\n\t */\n\tprivate _initFocusToggler() {\n\t\tconst editor = this.editor;\n\n\t\teditor.keystrokes.set( 'Ctrl+F6', ( data, cancel ) => {\n\t\t\tif ( !this.isOpen || this.view!.isModal ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.view!.focusTracker.isFocused ) {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} else {\n\t\t\t\tthis.view!.focus();\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Provides an integration between the root attaching and detaching and positioning of the view.\n\t */\n\tprivate _initMultiRootIntegration() {\n\t\tconst model = this.editor.model;\n\n\t\tmodel.document.on( 'change:data', () => {\n\t\t\tif ( !this.view ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst changedRoots = model.document.differ.getChangedRoots();\n\n\t\t\tfor ( const changes of changedRoots ) {\n\t\t\t\tif ( changes.state ) {\n\t\t\t\t\tthis.view.updatePosition();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Displays a dialog window.\n\t *\n\t * This method requires a {@link ~DialogDefinition} that defines the dialog's content, title, icon, action buttons, etc.\n\t *\n\t * For example, the following definition will create a dialog with:\n\t * * A header consisting of an icon, a title, and a \"Close\" button (it is added by default).\n\t * * A content consisting of a view with a single paragraph.\n\t * * A footer consisting of two buttons: \"Yes\" and \"No\".\n\t *\n\t * ```js\n\t * // Create the view that will be used as the dialog's content.\n\t * const textView = new View( locale );\n\t *\n\t * textView.setTemplate( {\n\t * \ttag: 'div',\n\t * \tattributes: {\n\t * \t\tstyle: {\n\t * \t\t\tpadding: 'var(--ck-spacing-large)',\n\t * \t\t\twhiteSpace: 'initial',\n\t * \t\t\twidth: '100%',\n\t * \t\t\tmaxWidth: '500px'\n\t * \t\t},\n\t * \t\ttabindex: -1\n\t * \t},\n\t * \tchildren: [\n\t * \t\t'Lorem ipsum dolor sit amet...'\n\t * \t]\n\t * } );\n\t *\n\t * // Show the dialog.\n\t * editor.plugins.get( 'Dialog' ).show( {\n\t *\tid: 'myDialog',\n\t * \ticon: 'myIcon', // This should be an SVG string.\n\t * \ttitle: 'My dialog',\n\t * \tcontent: textView,\n\t * \tactionButtons: [\n\t *\t\t{\n\t *\t\t\tlabel: t( 'Yes' ),\n\t *\t\t\tclass: 'ck-button-action',\n\t *\t\t\twithText: true,\n\t *\t\t\tonExecute: () => dialog.hide()\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tlabel: t( 'No' ),\n\t *\t\t\twithText: true,\n\t *\t\t\tonExecute: () => dialog.hide()\n\t *\t\t}\n\t *\t]\n\t * } );\n\t * ```\n\t *\n\t * By specifying the {@link ~DialogDefinition#onShow} and {@link ~DialogDefinition#onHide} callbacks\n\t * it is also possible to add callbacks that will be called when the dialog is shown or hidden.\n\t *\n\t * For example, the callbacks in the following definition:\n\t * * Disable the default behavior of the Esc key.\n\t * * Fire a custom event when the dialog gets hidden.\n\t *\n\t * ```js\n\t * editor.plugins.get( 'Dialog' ).show( {\n\t * \t// ...\n\t * \tonShow: dialog => {\n\t * \t\tdialog.view.on( 'close', ( evt, data ) => {\n\t * \t\t\t// Only prevent the event from the \"Esc\" key - do not affect the other ways of closing the dialog.\n\t * \t\t\tif ( data.source === 'escKeyPress' ) {\n\t * \t\t\t\tevt.stop();\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t},\n\t * \tonHide: dialog => {\n\t * \t\tdialog.fire( 'dialogDestroyed' );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Internally, calling this method:\n\t * 1. Hides the currently visible dialog (if any) calling the {@link #hide} method\n\t * (fires the {@link ~DialogHideEvent hide event}).\n\t * 2. Fires the {@link ~DialogShowEvent show event} which allows for adding callbacks that customize the\n\t * behavior of the dialog.\n\t * 3. Shows the dialog.\n\t */\n\tpublic show( dialogDefinition: DialogDefinition ): void {\n\t\tthis.hide();\n\n\t\tthis.fire( `show:${ dialogDefinition.id }`, dialogDefinition );\n\t}\n\n\t/**\n\t * Handles creating the {@link module:ui/dialog/dialogview~DialogView} instance and making it visible.\n\t */\n\tprivate _show( {\n\t\tid,\n\t\ticon,\n\t\ttitle,\n\t\thasCloseButton = true,\n\t\tcontent,\n\t\tactionButtons,\n\t\tclassName,\n\t\tisModal,\n\t\tposition,\n\t\tonHide\n\t}: DialogDefinition ) {\n\t\tconst editor = this.editor;\n\n\t\tthis.view = new DialogView( editor.locale, {\n\t\t\tgetCurrentDomRoot: () => {\n\t\t\t\treturn editor.editing.view.getDomRoot( editor.model.document.selection.anchor!.root.rootName )!;\n\t\t\t},\n\t\t\tgetViewportOffset: () => {\n\t\t\t\treturn editor.ui.viewportOffset;\n\t\t\t}\n\t\t} );\n\n\t\tconst view = this.view;\n\n\t\tview.on( 'close', () => {\n\t\t\tthis.hide();\n\t\t} );\n\n\t\teditor.ui.view.body.add( view );\n\t\teditor.ui.focusTracker.add( view.element! );\n\t\teditor.keystrokes.listenTo( view.element! );\n\n\t\t// Unless the user specified a position, modals should always be centered on the screen.\n\t\t// Otherwise, let's keep dialogs centered in the editing root by default.\n\t\tif ( !position ) {\n\t\t\tposition = isModal ? DialogViewPosition.SCREEN_CENTER : DialogViewPosition.EDITOR_CENTER;\n\t\t}\n\n\t\tview.set( {\n\t\t\tposition,\n\t\t\t_isVisible: true,\n\t\t\tclassName,\n\t\t\tisModal\n\t\t} );\n\n\t\tview.setupParts( {\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\thasCloseButton,\n\t\t\tcontent,\n\t\t\tactionButtons\n\t\t} );\n\n\t\tthis.id = id;\n\n\t\tif ( onHide ) {\n\t\t\tthis._onHide = onHide;\n\t\t}\n\n\t\tthis.isOpen = true;\n\t\tDialog._visibleDialogPlugin = this;\n\t}\n\n\t/**\n\t * Hides the dialog. This method is decorated to enable interacting on the {@link ~DialogHideEvent hide event}.\n\t *\n\t * See {@link #show}.\n\t */\n\tpublic hide(): void {\n\t\tif ( Dialog._visibleDialogPlugin ) {\n\t\t\tDialog._visibleDialogPlugin.fire( `hide:${ Dialog._visibleDialogPlugin.id }` );\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the {@link module:ui/dialog/dialogview~DialogView} and cleans up the stored dialog state.\n\t */\n\tprivate _hide(): void {\n\t\tif ( !this.view ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\n\t\t// Reset the content view to prevent its children from being destroyed in the standard\n\t\t// View#destroy() (and collections) chain. If the content children were left in there,\n\t\t// they would have to be re-created by the feature using the dialog every time the dialog\n\t\t// shows up.\n\t\tif ( view.contentView ) {\n\t\t\tview.contentView.reset();\n\t\t}\n\n\t\teditor.ui.view.body.remove( view );\n\t\teditor.ui.focusTracker.remove( view.element! );\n\t\teditor.keystrokes.stopListening( view.element! );\n\n\t\tview.destroy();\n\t\teditor.editing.view.focus();\n\n\t\tthis.id = null;\n\t\tthis.isOpen = false;\n\t\tDialog._visibleDialogPlugin = null;\n\t}\n}\n\n/**\n * The definition that describes a dialog window and its content. Passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n */\nexport interface DialogDefinition {\n\n\t/**\n\t * A unique identifier of the dialog. It allows for distinguishing between different dialogs and their visibility.\n\t * For instance, when open, the ID of the currently visible dialog is stored in {@link module:ui/dialog/dialog~Dialog#id}.\n\t *\n\t * The `id` is also passed along the {@link module:ui/dialog/dialog~DialogShowEvent} and {@link module:ui/dialog/dialog~DialogHideEvent}\n\t * events.\n\t */\n\tid: string;\n\n\t/**\n\t * The SVG string of an icon displayed in dialogs's header. Used only when {@link #title} is also set\n\t * and the header is displayed.\n\t *\n\t * See more in {@link module:ui/icon/iconview~IconView#content}.\n\t */\n\ticon?: string;\n\n\t/**\n\t * A title displayed in the dialogs's header. It also works as an accessible name of the dialog used by assistive technologies.\n\t *\n\t * When not set, the header is not displayed. Affects {@link #icon} and {@link #hasCloseButton}.\n\t */\n\ttitle?: string;\n\n\t/**\n\t * A flag indicating whether the dialog should have a close button in the header.\n\t * `true` by default. Works when {@link #title} is also set and the header is displayed.\n\t *\n\t * **Note**: If you hide the close button, make sure that the dialog can be closed in another way.\n\t */\n\thasCloseButton?: boolean;\n\n\t/**\n\t * The content of the dialog. It can be a single {@link module:ui/view~View} or an array of views.\n\t */\n\tcontent?: View | Array;\n\n\t/**\n\t * The action buttons displayed in the dialog's footer.\n\t */\n\tactionButtons?: Array;\n\n\t/**\n\t * An additional CSS class set on the outermost (`.ck.ck-dialog`) container element allowing for visual customization.\n\t */\n\tclassName?: string;\n\n\t/**\n\t * When set to `true`, the dialog will become a modal, that is, it will block the UI until it is closed.\n\t */\n\tisModal?: boolean;\n\n\t/**\n\t * Available dialog positions. By default `DialogViewPosition.EDITOR_CENTER` is used for {@link #isModal non-modals}\n\t * and `DialogViewPosition.SCREEN_CENTER` for modals.\n\t *\n\t * {@link module:ui/dialog/dialogview#DialogViewPosition Learn more} about available positions.\n\t */\n\tposition?: typeof DialogViewPosition[ keyof typeof DialogViewPosition ];\n\n\t/**\n\t * A callback called when the dialog shows up with a `low` priority. It allows for setting up the dialog's {@link #content}.\n\t */\n\tonShow?: ( dialog: Dialog ) => void;\n\n\t/**\n\t * A callback called when the dialog hides with a `low` priority.\n\t * It allows for cleaning up (for example, resetting) the dialog's {@link #content}.\n\t */\n\tonHide?: ( dialog: Dialog ) => void;\n}\n\n/**\n * An event fired after {@link module:ui/dialog/dialog~Dialog#show} is called. You can use it to customize the behavior\n * of any dialog.\n *\n * ```js\n * import { DialogViewPosition } from 'ckeditor5/src/ui.js';\n *\n * // ...\n *\n * // Changes the position of the \"Find and Replace\" dialog.\n * editor.plugins.get( 'Dialog' ).on( 'show:findAndReplace', ( evt, data ) => {\n * \tObject.assign( data, { position: DialogViewPosition.EDITOR_BOTTOM_CENTER } );\n * }, { priority: 'high' } );\n * ```\n *\n * @eventName ~Dialog#show\n */\nexport type DialogShowEvent = {\n\tname: 'show' | `show:${ string }`;\n\targs: [ dialogDefinition: DialogDefinition ];\n};\n\n/**\n * An event fired after {@link module:ui/dialog/dialog~Dialog#hide} is called. You can use it to customize the behavior\n * of any dialog.\n *\n * ```js\n * // Logs after the \"Find and Replace\" dialog gets hidden\n * editor.plugins.get( 'Dialog' ).on( 'hide:findAndReplace', () => {\n * \tconsole.log( 'The \"Find and Replace\" dialog was hidden.' );\n * } );\n * ```\n *\n * @eventName ~Dialog#hide\n */\nexport type DialogHideEvent = {\n\tname: 'hide' | `hide:${ string }`;\n\targs: [];\n};\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./balloonpanel.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/**\n * @module ui/panel/balloon/balloonpanelview\n */\n\nimport View from '../../view.js';\nimport type ViewCollection from '../../viewcollection.js';\n\nimport {\n\tgetOptimalPosition,\n\tglobal,\n\tisRange,\n\ttoUnit,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype DomPoint,\n\ttype PositionOptions,\n\ttype PositioningFunction,\n\ttype Rect\n} from '@ckeditor/ckeditor5-utils';\n\nimport { isElement } from 'lodash-es';\nimport '../../../theme/components/panel/balloonpanel.css';\n\nconst toPx = toUnit( 'px' );\nconst defaultLimiterElement = global.document.body;\n\n// A static balloon panel positioning function that moves the balloon far off the viewport.\n// It is used as a fallback when there is no way to position the balloon using provided\n// positioning functions (see: `getOptimalPosition()`), for instance, when the target the\n// balloon should be attached to gets obscured by scrollable containers or the viewport.\n//\n// It prevents the balloon from being attached to the void and possible degradation of the UX.\n// At the same time, it keeps the balloon physically visible in the DOM so the focus remains\n// uninterrupted.\nconst POSITION_OFF_SCREEN: DomPoint = {\n\ttop: -99999,\n\tleft: -99999,\n\tname: 'arrowless',\n\tconfig: {\n\t\twithArrow: false\n\t}\n};\n\n/**\n * The balloon panel view class.\n *\n * A floating container which can\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#pin pin} to any\n * {@link module:utils/dom/position~Options#target target} in the DOM and remain in that position\n * e.g. when the web page is scrolled.\n *\n * The balloon panel can be used to display contextual, non-blocking UI like forms, toolbars and\n * the like in its {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#content} view\n * collection.\n *\n * There is a number of {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}\n * that the balloon can use, automatically switching from one to another when the viewport space becomes\n * scarce to keep the balloon visible to the user as long as it is possible. The balloon will also\n * accept any custom position set provided by the user compatible with the\n * {@link module:utils/dom/position~Options options}.\n *\n * ```ts\n * const panel = new BalloonPanelView( locale );\n * const childView = new ChildView();\n * const positions = BalloonPanelView.defaultPositions;\n *\n * panel.render();\n *\n * // Add a child view to the panel's content collection.\n * panel.content.add( childView );\n *\n * // Start pinning the panel to an element with the \"target\" id DOM.\n * // The balloon will remain pinned until unpin() is called.\n * panel.pin( {\n * \ttarget: document.querySelector( '#target' ),\n * \tpositions: [\n * \t\tpositions.northArrowSouth,\n * \t\tpositions.southArrowNorth\n * \t]\n * } );\n * ```\n */\nexport default class BalloonPanelView extends View {\n\t/**\n\t * A collection of the child views that creates the balloon panel contents.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * The absolute top position of the balloon panel in pixels.\n\t *\n\t * @observable\n\t * @default 0\n\t */\n\tdeclare public top: number;\n\n\t/**\n\t * The absolute left position of the balloon panel in pixels.\n\t *\n\t * @observable\n\t * @default 0\n\t */\n\tdeclare public left: number;\n\n\t/**\n\t * The balloon panel's current position. The position name is reflected in the CSS class set\n\t * to the balloon, i.e. `.ck-balloon-panel_arrow_nw` for the \"arrow_nw\" position. The class\n\t * controls the minor aspects of the balloon's visual appearance like the placement\n\t * of an {@link #withArrow arrow}. To support a new position, an additional CSS must be created.\n\t *\n\t * Default position names correspond with\n\t * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t *\n\t * See the {@link #attachTo} and {@link #pin} methods to learn about custom balloon positions.\n\t *\n\t * @observable\n\t * @default 'arrow_nw'\n\t */\n\tdeclare public position: 'arrow_nw' | 'arrow_ne' | 'arrow_sw' | 'arrow_se';\n\n\t/**\n\t * Controls whether the balloon panel is visible or not.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Controls whether the balloon panel has an arrow. The presence of the arrow\n\t * is reflected in the `ck-balloon-panel_with-arrow` CSS class.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public withArrow: boolean;\n\n\t/**\n\t * An additional CSS class added to the {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * A callback that starts pinning the panel when {@link #isVisible} gets\n\t * `true`. Used by {@link #pin}.\n\t *\n\t * @private\n\t */\n\tprivate _pinWhenIsVisibleCallback: ( () => void ) | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'top', 0 );\n\t\tthis.set( 'left', 0 );\n\t\tthis.set( 'position', 'arrow_nw' );\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'withArrow', true );\n\t\tthis.set( 'class', undefined );\n\n\t\tthis._pinWhenIsVisibleCallback = null;\n\t\tthis.content = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-balloon-panel',\n\t\t\t\t\tbind.to( 'position', value => `ck-balloon-panel_${ value }` ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-balloon-panel_visible' ),\n\t\t\t\t\tbind.if( 'withArrow', 'ck-balloon-panel_with-arrow' ),\n\t\t\t\t\tbind.to( 'class' )\n\t\t\t\t],\n\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to( 'top', toPx ),\n\t\t\t\t\tleft: bind.to( 'left', toPx )\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tchildren: this.content\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the panel.\n\t *\n\t * See {@link #isVisible}.\n\t */\n\tpublic show(): void {\n\t\tthis.isVisible = true;\n\t}\n\n\t/**\n\t * Hides the panel.\n\t *\n\t * See {@link #isVisible}.\n\t */\n\tpublic hide(): void {\n\t\tthis.isVisible = false;\n\t}\n\n\t/**\n\t * Attaches the panel to a specified {@link module:utils/dom/position~Options#target} with a\n\t * smart positioning heuristics that chooses from available positions to make sure the panel\n\t * is visible to the user i.e. within the limits of the viewport.\n\t *\n\t * This method accepts configuration {@link module:utils/dom/position~Options options}\n\t * to set the `target`, optional `limiter` and `positions` the balloon should choose from.\n\t *\n\t * ```ts\n\t * const panel = new BalloonPanelView( locale );\n\t * const positions = BalloonPanelView.defaultPositions;\n\t *\n\t * panel.render();\n\t *\n\t * // Attach the panel to an element with the \"target\" id DOM.\n\t * panel.attachTo( {\n\t * \ttarget: document.querySelector( '#target' ),\n\t * \tpositions: [\n\t * \t\tpositions.northArrowSouth,\n\t * \t\tpositions.southArrowNorth\n\t * \t]\n\t * } );\n\t * ```\n\t *\n\t * **Note**: Attaching the panel will also automatically {@link #show} it.\n\t *\n\t * **Note**: An attached panel will not follow its target when the window is scrolled or resized.\n\t * See the {@link #pin} method for a more permanent positioning strategy.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t */\n\tpublic attachTo( options: Partial ): void {\n\t\tthis.show();\n\n\t\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\t\tconst positionOptions = Object.assign( {}, {\n\t\t\telement: this.element,\n\t\t\tpositions: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleWest,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.northArrowSouth,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleWest,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleEast,\n\t\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\t\tdefaultPositions.viewportStickyNorth\n\t\t\t],\n\t\t\tlimiter: defaultLimiterElement,\n\t\t\tfitInViewport: true\n\t\t}, options ) as PositionOptions;\n\n\t\tconst optimalPosition = BalloonPanelView._getOptimalPosition( positionOptions ) || POSITION_OFF_SCREEN;\n\n\t\t// Usually browsers make some problems with super accurate values like 104.345px\n\t\t// so it is better to use int values.\n\t\tconst left = parseInt( optimalPosition.left as any );\n\t\tconst top = parseInt( optimalPosition.top as any );\n\n\t\tconst position = optimalPosition.name as this[ 'position' ];\n\t\tconst config: { withArrow?: boolean } = optimalPosition.config || {};\n\t\tconst { withArrow = true } = config;\n\n\t\tthis.top = top;\n\t\tthis.left = left;\n\t\tthis.position = position;\n\t\tthis.withArrow = withArrow;\n\t}\n\n\t/**\n\t * Works the same way as the {@link #attachTo} method except that the position of the panel is\n\t * continuously updated when:\n\t *\n\t * * any ancestor of the {@link module:utils/dom/position~Options#target}\n\t * or {@link module:utils/dom/position~Options#limiter} is scrolled,\n\t * * the browser window gets resized or scrolled.\n\t *\n\t * Thanks to that, the panel always sticks to the {@link module:utils/dom/position~Options#target}\n\t * and is immune to the changing environment.\n\t *\n\t * ```ts\n\t * const panel = new BalloonPanelView( locale );\n\t * const positions = BalloonPanelView.defaultPositions;\n\t *\n\t * panel.render();\n\t *\n\t * // Pin the panel to an element with the \"target\" id DOM.\n\t * panel.pin( {\n\t * \ttarget: document.querySelector( '#target' ),\n\t * \tpositions: [\n\t * \t\tpositions.northArrowSouth,\n\t * \t\tpositions.southArrowNorth\n\t * \t]\n\t * } );\n\t * ```\n\t *\n\t * To leave the pinned state, use the {@link #unpin} method.\n\t *\n\t * **Note**: Pinning the panel will also automatically {@link #show} it.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t */\n\tpublic pin( options: Partial ): void {\n\t\tthis.unpin();\n\n\t\tthis._pinWhenIsVisibleCallback = () => {\n\t\t\tif ( this.isVisible ) {\n\t\t\t\tthis._startPinning( options );\n\t\t\t} else {\n\t\t\t\tthis._stopPinning();\n\t\t\t}\n\t\t};\n\n\t\tthis._startPinning( options );\n\n\t\t// Control the state of the listeners depending on whether the panel is visible\n\t\t// or not.\n\t\t// TODO: Use on() (https://github.com/ckeditor/ckeditor5-utils/issues/144).\n\t\tthis.listenTo( this, 'change:isVisible', this._pinWhenIsVisibleCallback );\n\t}\n\n\t/**\n\t * Stops pinning the panel, as set up by {@link #pin}.\n\t */\n\tpublic unpin(): void {\n\t\tif ( this._pinWhenIsVisibleCallback ) {\n\t\t\t// Deactivate listeners attached by pin().\n\t\t\tthis._stopPinning();\n\n\t\t\t// Deactivate the panel pin() control logic.\n\t\t\t// TODO: Use off() (https://github.com/ckeditor/ckeditor5-utils/issues/144).\n\t\t\tthis.stopListening( this, 'change:isVisible', this._pinWhenIsVisibleCallback );\n\n\t\t\tthis._pinWhenIsVisibleCallback = null;\n\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\t/**\n\t * Starts managing the pinned state of the panel. See {@link #pin}.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t */\n\tprivate _startPinning( options: Partial ) {\n\t\tthis.attachTo( options );\n\n\t\tconst targetElement = getDomElement( options.target );\n\t\tconst limiterElement = options.limiter ? getDomElement( options.limiter ) : defaultLimiterElement;\n\n\t\t// Then we need to listen on scroll event of eny element in the document.\n\t\tthis.listenTo( global.document, 'scroll', ( evt, domEvt ) => {\n\t\t\tconst scrollTarget = domEvt.target as Element;\n\n\t\t\t// The position needs to be updated if the positioning target is within the scrolled element.\n\t\t\tconst isWithinScrollTarget = targetElement && scrollTarget.contains( targetElement );\n\n\t\t\t// The position needs to be updated if the positioning limiter is within the scrolled element.\n\t\t\tconst isLimiterWithinScrollTarget = limiterElement && scrollTarget.contains( limiterElement );\n\n\t\t\t// The positioning target and/or limiter can be a Rect, object etc..\n\t\t\t// There's no way to optimize the listener then.\n\t\t\tif ( isWithinScrollTarget || isLimiterWithinScrollTarget || !targetElement || !limiterElement ) {\n\t\t\t\tthis.attachTo( options );\n\t\t\t}\n\t\t}, { useCapture: true } );\n\n\t\t// We need to listen on window resize event and update position.\n\t\tthis.listenTo( global.window, 'resize', () => {\n\t\t\tthis.attachTo( options );\n\t\t} );\n\t}\n\n\t/**\n\t * Stops managing the pinned state of the panel. See {@link #pin}.\n\t */\n\tprivate _stopPinning(): void {\n\t\tthis.stopListening( global.document, 'scroll' );\n\t\tthis.stopListening( global.window, 'resize' );\n\t}\n\n\t/**\n\t * A side offset of the arrow tip from the edge of the balloon. Controlled by CSS.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────┐\n\t *\t\t │ │\n\t *\t\t │ Balloon │\n\t *\t\t │ Content │\n\t *\t\t │ │\n\t *\t\t └──+ +───────────────┘\n\t *\t\t | \\ /\n\t *\t\t | \\/\n\t *\t\t>┼─────┼< ─────────────────────── side offset\n\t *\n\t * ```\n\t *\n\t * @default 25\n\t */\n\tpublic static arrowSideOffset = 25;\n\n\t/**\n\t * A height offset of the arrow from the edge of the balloon. Controlled by CSS.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────┐\n\t *\t\t │ │\n\t *\t\t │ Balloon │\n\t *\t\t │ Content │ ╱-- arrow height offset\n\t *\t\t │ │ V\n\t *\t\t └──+ +───────────────┘ --- ─┼───────\n\t *\t\t \\ / │\n\t *\t\t \\/ │\n\t *\t\t────────────────────────────────┼───────\n\t *\t\t ^\n\t *\n\t *\n\t *\t\t>┼────┼< arrow height offset\n\t *\t\t │ │\n\t *\t\t │ ┌────────────────────────┐\n\t *\t\t │ │ │\n\t *\t\t │ ╱ │\n\t *\t\t │ ╱ Balloon │\n\t *\t\t │ ╲ Content │\n\t *\t\t │ ╲ │\n\t *\t\t │ │ │\n\t *\t\t │ └────────────────────────┘\n\t * ```\n\t *\n\t * @default 10\n\t*/\n\tpublic static arrowHeightOffset = 10;\n\n\t/**\n\t * A vertical offset of the balloon panel from the edge of the viewport if sticky.\n\t * It helps in accessing toolbar buttons underneath the balloon panel.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────────────────────────────────┐\n\t *\t\t │ Target │\n\t *\t\t │ │\n\t *\t\t │ /── vertical offset │\n\t *\t\t┌─────────────────────────────V─────────────────────────┐\n\t *\t\t│ Toolbar ┌─────────────┐ │\n\t *\t\t├────────────────────│ Balloon │────────────────────┤\n\t *\t\t│ │ └─────────────┘ │ │\n\t *\t\t│ │ │ │\n\t *\t\t│ │ │ │\n\t *\t\t│ │ │ │\n\t *\t\t│ └───────────────────────────────────────────────────┘ │\n\t *\t\t│ Viewport │\n\t *\t\t└───────────────────────────────────────────────────────┘\n\t * ```\n\t *\n\t * @default 20\n\t */\n\tpublic static stickyVerticalOffset = 20;\n\n\t/**\n\t * Function used to calculate the optimal position for the balloon.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\n\n\t/**\n\t * A default set of positioning functions used by the balloon panel view\n\t * when attaching using the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo} method.\n\t *\n\t * The available positioning functions are as follows:\n\t *\n\t * **North west**\n\t *\n\t * * `northWestArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * **North**\n\t *\n\t * * `northArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t *\t\t V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t *\t\t V\n\t *\t\t[ Target ]\n\t * ```\n\t * * `northArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * **North east**\n\t *\n\t * * `northEastArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t *\t\t V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t *\t\t V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * **South**\n\t *\n\t * * `southArrowNorthWest`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t ^\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorth`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **South west**\n\t *\n\t * * `southWestArrowNorthWest`\n\t *\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorth`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **South east**\n\t *\n\t * * `southEastArrowNorthWest`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t ^\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t +-----------------+\n\t *\t\t | Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorth`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **West**\n\t *\n\t * * `westArrowEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t| Balloon |>[ Target ]\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **East**\n\t *\n\t * * `eastArrowWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t[ Target ]<| Balloon |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * **Sticky**\n\t *\n\t * * `viewportStickyNorth`\n\t *\n\t * ```\n\t *\t\t +---------------------------+\n\t *\t\t | [ Target ] |\n\t *\t\t | |\n\t *\t\t+-----------------------------------+\n\t *\t\t| | +-----------------+ | |\n\t *\t\t| | | Balloon | | |\n\t *\t\t| | +-----------------+ | |\n\t *\t\t| | | |\n\t *\t\t| | | |\n\t *\t\t| | | |\n\t *\t\t| | | |\n\t *\t\t| +---------------------------+ |\n\t *\t\t| Viewport |\n\t *\t\t+-----------------------------------+\n\t * ```\n\t *\n\t * See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.\n\t *\n\t * Positioning functions must be compatible with {@link module:utils/dom/position~DomPoint}.\n\t *\n\t * Default positioning functions with customized offsets can be generated using\n\t * {@link module:ui/panel/balloon/balloonpanelview~generatePositions}.\n\t *\n\t * The name that the position function returns will be reflected in the balloon panel's class that\n\t * controls the placement of the \"arrow\". See {@link #position} to learn more.\n\t */\n\tpublic static defaultPositions = generatePositions();\n}\n\n/**\n * Returns the DOM element for given object or null, if there is none,\n * e.g. when the passed object is a Rect instance or so.\n */\nfunction getDomElement( object: any ): HTMLElement | null {\n\tif ( isElement( object ) ) {\n\t\treturn object;\n\t}\n\n\tif ( isRange( object ) ) {\n\t\treturn object.commonAncestorContainer as any;\n\t}\n\n\tif ( typeof object == 'function' ) {\n\t\treturn getDomElement( object() );\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns available {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n * {@link module:utils/dom/position~PositioningFunction positioning functions} adjusted by the specific offsets.\n *\n * @internal\n * @param options Options to generate positions. If not specified, this helper will simply return\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n * @param options.sideOffset A custom side offset (in pixels) of each position. If\n * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowSideOffset the default value}\n * will be used.\n * @param options.heightOffset A custom height offset (in pixels) of each position. If\n * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowHeightOffset the default value}\n * will be used.\n * @param options.stickyVerticalOffset A custom offset (in pixels) of the `viewportStickyNorth` positioning function.\n * If not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.stickyVerticalOffset the default value}\n * will be used.\n * @param options.config Additional configuration of the balloon balloon panel view.\n * Currently only {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#withArrow} is supported. Learn more\n * about {@link module:utils/dom/position~PositioningFunction positioning functions}.\n */\nexport function generatePositions( options: {\n\tsideOffset?: number;\n\theightOffset?: number;\n\tstickyVerticalOffset?: number;\n\tconfig?: object;\n} = {} ): Record {\n\tconst {\n\t\tsideOffset = BalloonPanelView.arrowSideOffset,\n\t\theightOffset = BalloonPanelView.arrowHeightOffset,\n\t\tstickyVerticalOffset = BalloonPanelView.stickyVerticalOffset,\n\t\tconfig\n\t} = options;\n\n\treturn {\n\t\t// ------- North west\n\n\t\tnorthWestArrowSouthWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left - sideOffset,\n\t\t\tname: 'arrow_sw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthWestArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\tname: 'arrow_smw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthWestArrowSouth: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\tname: 'arrow_s',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthWestArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\tname: 'arrow_sme',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthWestArrowSouthEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\tname: 'arrow_se',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- North\n\n\t\tnorthArrowSouthWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\tname: 'arrow_sw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\tname: 'arrow_smw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthArrowSouth: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\tname: 'arrow_s',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\tname: 'arrow_sme',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthArrowSouthEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\tname: 'arrow_se',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- North east\n\n\t\tnorthEastArrowSouthWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.right - sideOffset,\n\t\t\tname: 'arrow_sw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthEastArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.right - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\tname: 'arrow_smw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthEastArrowSouth: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\tname: 'arrow_s',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthEastArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.right - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\tname: 'arrow_sme',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tnorthEastArrowSouthEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\tname: 'arrow_se',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- South west\n\n\t\tsouthWestArrowNorthWest: targetRect => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left - sideOffset,\n\t\t\tname: 'arrow_nw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthWestArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\tname: 'arrow_nmw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthWestArrowNorth: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\tname: 'arrow_n',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthWestArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\tname: 'arrow_nme',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthWestArrowNorthEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\tname: 'arrow_ne',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- South\n\n\t\tsouthArrowNorthWest: targetRect => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\tname: 'arrow_nw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * 0.25 ) - sideOffset,\n\t\t\tname: 'arrow_nmw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthArrowNorth: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\tname: 'arrow_n',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * 0.75 ) + sideOffset,\n\t\t\tname: 'arrow_nme',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthArrowNorthEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\tname: 'arrow_ne',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- South east\n\n\t\tsouthEastArrowNorthWest: targetRect => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.right - sideOffset,\n\t\t\tname: 'arrow_nw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthEastArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.right - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\tname: 'arrow_nmw',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthEastArrowNorth: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\tname: 'arrow_n',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthEastArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.right - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\tname: 'arrow_nme',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\tsouthEastArrowNorthEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: getSouthTop( targetRect ),\n\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\tname: 'arrow_ne',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- West\n\n\t\twestArrowEast: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\tleft: targetRect.left - balloonRect.width - heightOffset,\n\t\t\tname: 'arrow_e',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- East\n\n\t\teastArrowWest: ( targetRect, balloonRect ) => ( {\n\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\tleft: targetRect.right + heightOffset,\n\t\t\tname: 'arrow_w',\n\t\t\t...( config && { config } )\n\t\t} ),\n\n\t\t// ------- Sticky\n\n\t\tviewportStickyNorth: ( targetRect, balloonRect, viewportRect, limiterRect ) => {\n\t\t\tconst boundaryRect = limiterRect || viewportRect;\n\n\t\t\tif ( !targetRect.getIntersection( boundaryRect ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Engage when the target top and bottom edges are close or off the boundary.\n\t\t\t// By close, it means there's not enough space for the balloon arrow (offset).\n\t\t\tif ( boundaryRect.height - targetRect.height > stickyVerticalOffset ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttop: boundaryRect.top + stickyVerticalOffset,\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: 'arrowless',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false,\n\t\t\t\t\t...config\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\n\t/**\n\t * Returns the top coordinate for positions starting with `north*`.\n\t *\n\t * @param targetRect A rect of the target.\n\t * @param balloonRect A rect of the balloon.\n\t */\n\tfunction getNorthTop( targetRect: Rect, balloonRect: Rect ) {\n\t\treturn targetRect.top - balloonRect.height - heightOffset;\n\t}\n\n\t/**\n\t * Returns the top coordinate for positions starting with `south*`.\n\t *\n\t * @param targetRect A rect of the target.\n\t */\n\tfunction getSouthTop( targetRect: Rect ) {\n\t\treturn targetRect.bottom + heightOffset;\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./tooltip.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/**\n * @module ui/tooltipmanager\n */\n\nimport View from './view.js';\nimport BalloonPanelView, { generatePositions } from './panel/balloon/balloonpanelview.js';\nimport type { EditorUIUpdateEvent } from './editorui/editorui.js';\n\nimport {\n\tDomEmitterMixin,\n\tResizeObserver,\n\tfirst,\n\tglobal,\n\tisVisible,\n\ttype EventInfo,\n\ttype PositioningFunction\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { isElement, debounce, type DebouncedFunc } from 'lodash-es';\n\nimport '../theme/components/tooltip/tooltip.css';\n\nconst BALLOON_CLASS = 'ck-tooltip';\n\n/**\n * A tooltip manager class for the UI of the editor.\n *\n * **Note**: Most likely you do not have to use the `TooltipManager` API listed below in order to display tooltips. Popular\n * {@glink framework/architecture/ui-library UI components} support tooltips out-of-the-box via observable properties\n * (see {@link module:ui/button/buttonview~ButtonView#tooltip} and {@link module:ui/button/buttonview~ButtonView#tooltipPosition}).\n *\n * # Displaying tooltips\n *\n * To display a tooltip, set `data-cke-tooltip-text` attribute on any DOM element:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'My tooltip';\n * ```\n *\n * The tooltip will show up whenever the user moves the mouse over the element or the element gets focus in DOM.\n *\n * # Positioning tooltips\n *\n * To change the position of the tooltip, use the `data-cke-tooltip-position` attribute (`s`, `se`, `sw`, `n`, `e`, or `w`):\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Tooltip to the north';\n * domElement.dataset.ckeTooltipPosition = 'n';\n * ```\n *\n * # Disabling tooltips\n *\n * In order to disable the tooltip temporarily, use the `data-cke-tooltip-disabled` attribute:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Disabled. For now.';\n * domElement.dataset.ckeTooltipDisabled = 'true';\n * ```\n *\n * # Styling tooltips\n *\n * By default, the tooltip has `.ck-tooltip` class and its text inner `.ck-tooltip__text`.\n *\n * If your tooltip requires custom styling, using `data-cke-tooltip-class` attribute will add additional class to the balloon\n * displaying the tooltip:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Tooltip with a red text';\n * domElement.dataset.ckeTooltipClass = 'my-class';\n * ```\n *\n * ```css\n * .ck.ck-tooltip.my-class { color: red }\n * ```\n *\n * **Note**: This class is a singleton. All editor instances re-use the same instance loaded by\n * {@link module:ui/editorui/editorui~EditorUI} of the first editor.\n */\nexport default class TooltipManager extends DomEmitterMixin() {\n\t/**\n\t * The view rendering text of the tooltip.\n\t */\n\tpublic readonly tooltipTextView!: View & { text: string };\n\n\t/**\n\t * The instance of the balloon panel that renders and positions the tooltip.\n\t */\n\tpublic readonly balloonPanelView!: BalloonPanelView;\n\n\t/**\n\t * A set of default {@link module:utils/dom/position~PositioningFunction positioning functions} used by the `TooltipManager`\n\t * to pin tooltips in different positions.\n\t */\n\tpublic static defaultBalloonPositions = generatePositions( {\n\t\theightOffset: 5,\n\t\tsideOffset: 13\n\t} );\n\n\t/**\n\t * Stores the reference to the DOM element the tooltip is attached to. `null` when there's no tooltip\n\t * in the UI.\n\t */\n\tprivate _currentElementWithTooltip: HTMLElement | null = null;\n\n\t/**\n\t * Stores the current tooltip position. `null` when there's no tooltip in the UI.\n\t */\n\tprivate _currentTooltipPosition: TooltipPosition | null = null;\n\n\t/**\n\t * An instance of the resize observer that keeps track on target element visibility,\n\t * when it hides the tooltip should also disappear.\n\t *\n\t * {@link module:core/editor/editorconfig~EditorConfig#balloonToolbar configuration}.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null = null;\n\n\t/**\n\t * An instance of the mutation observer that keeps track on target element attributes changes.\n\t */\n\tprivate _mutationObserver: MutationObserverWrapper | null = null;\n\n\t/**\n\t * A debounced version of {@link #_pinTooltip}. Tooltips show with a delay to avoid flashing and\n\t * to improve the UX.\n\t */\n\tprivate _pinTooltipDebounced!: DebouncedFunc<( targetDomElement: HTMLElement, data: TooltipData ) => void>;\n\n\t/**\n\t * A debounced version of {@link #_unpinTooltip}. Tooltips hide with a delay to allow hovering of their titles.\n\t */\n\tprivate _unpinTooltipDebounced!: DebouncedFunc;\n\n\tprivate readonly _watchdogExcluded!: true;\n\n\t/**\n\t * A set of editors the single tooltip manager instance must listen to.\n\t * This is mostly to handle `EditorUI#update` listeners from individual editors.\n\t */\n\tprivate static _editors = new Set();\n\n\t/**\n\t * A reference to the `TooltipManager` instance. The class is a singleton and as such,\n\t * successive attempts at creating instances should return this instance.\n\t */\n\tprivate static _instance: TooltipManager | null = null;\n\n\t/**\n\t * Creates an instance of the tooltip manager.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tTooltipManager._editors.add( editor );\n\n\t\t// TooltipManager must be a singleton. Multiple instances would mean multiple tooltips attached\n\t\t// to the same DOM element with data-cke-tooltip-* attributes.\n\t\tif ( TooltipManager._instance ) {\n\t\t\treturn TooltipManager._instance;\n\t\t}\n\n\t\tTooltipManager._instance = this;\n\n\t\tthis.tooltipTextView = new View( editor.locale ) as any;\n\t\tthis.tooltipTextView.set( 'text', '' );\n\t\tthis.tooltipTextView.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-tooltip__text'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: this.tooltipTextView.bindTemplate.to( 'text' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\tthis.balloonPanelView = new BalloonPanelView( editor.locale );\n\t\tthis.balloonPanelView.class = BALLOON_CLASS;\n\t\tthis.balloonPanelView.content.add( this.tooltipTextView );\n\n\t\tthis._mutationObserver = createMutationObserver( () => {\n\t\t\tthis._updateTooltipPosition();\n\t\t} );\n\n\t\tthis._pinTooltipDebounced = debounce( this._pinTooltip, 600 );\n\t\tthis._unpinTooltipDebounced = debounce( this._unpinTooltip, 400 );\n\n\t\tthis.listenTo( global.document, 'keydown', this._onKeyDown.bind( this ), { useCapture: true } );\n\t\tthis.listenTo( global.document, 'mouseenter', this._onEnterOrFocus.bind( this ), { useCapture: true } );\n\t\tthis.listenTo( global.document, 'mouseleave', this._onLeaveOrBlur.bind( this ), { useCapture: true } );\n\n\t\tthis.listenTo( global.document, 'focus', this._onEnterOrFocus.bind( this ), { useCapture: true } );\n\t\tthis.listenTo( global.document, 'blur', this._onLeaveOrBlur.bind( this ), { useCapture: true } );\n\n\t\tthis.listenTo( global.document, 'scroll', this._onScroll.bind( this ), { useCapture: true } );\n\n\t\t// Because this class is a singleton, its only instance is shared across all editors and connects them through the reference.\n\t\t// This causes issues with the ContextWatchdog. When an error is thrown in one editor, the watchdog traverses the references\n\t\t// and (because of shared tooltip manager) figures that the error affects all editors and restarts them all.\n\t\t// This flag, excludes tooltip manager instance from the traversal and brings ContextWatchdog back to normal.\n\t\t// More in https://github.com/ckeditor/ckeditor5/issues/12292.\n\t\tthis._watchdogExcluded = true;\n\t}\n\n\t/**\n\t * Destroys the tooltip manager.\n\t *\n\t * **Note**: The manager singleton cannot be destroyed until all editors that use it are destroyed.\n\t *\n\t * @param editor The editor the manager was created for.\n\t */\n\tpublic destroy( editor: Editor ): void {\n\t\tconst editorBodyViewCollection = editor.ui.view && editor.ui.view.body;\n\n\t\tTooltipManager._editors.delete( editor );\n\t\tthis.stopListening( editor.ui );\n\n\t\t// Prevent the balloon panel from being destroyed in the EditorUI#destroy() cascade. It should be destroyed along\n\t\t// with the last editor only (https://github.com/ckeditor/ckeditor5/issues/12602).\n\t\tif ( editorBodyViewCollection && editorBodyViewCollection.has( this.balloonPanelView ) ) {\n\t\t\teditorBodyViewCollection.remove( this.balloonPanelView );\n\t\t}\n\n\t\tif ( !TooltipManager._editors.size ) {\n\t\t\tthis._unpinTooltip();\n\t\t\tthis.balloonPanelView.destroy();\n\t\t\tthis.stopListening();\n\n\t\t\tTooltipManager._instance = null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns {@link #balloonPanelView} {@link module:utils/dom/position~PositioningFunction positioning functions} for a given position\n\t * name.\n\t *\n\t * @param position Name of the position (`s`, `se`, `sw`, `n`, `e`, or `w`).\n\t * @returns Positioning functions to be used by the {@link #balloonPanelView}.\n\t */\n\tpublic static getPositioningFunctions( position: TooltipPosition ): Array {\n\t\tconst defaultPositions = TooltipManager.defaultBalloonPositions;\n\n\t\treturn {\n\t\t\t// South is most popular. We can use positioning heuristics to avoid clipping by the viewport with the sane fallback.\n\t\t\ts: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest\n\t\t\t],\n\t\t\tn: [ defaultPositions.northArrowSouth ],\n\t\t\te: [ defaultPositions.eastArrowWest ],\n\t\t\tw: [ defaultPositions.westArrowEast ],\n\t\t\tsw: [ defaultPositions.southArrowNorthEast ],\n\t\t\tse: [ defaultPositions.southArrowNorthWest ]\n\t\t}[ position ];\n\t}\n\n\t/**\n\t * Handles hiding tooltips on `keydown` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onKeyDown( evt: EventInfo, domEvent: KeyboardEvent ) {\n\t\tif ( domEvent.key === 'Escape' && this._currentElementWithTooltip ) {\n\t\t\tthis._unpinTooltip();\n\t\t\tdomEvent.stopPropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Handles displaying tooltips on `mouseenter` and `focus` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onEnterOrFocus( evt: EventInfo, { target }: any ) {\n\t\tconst elementWithTooltipAttribute = getDescendantWithTooltip( target );\n\n\t\t// Abort when there's no descendant needing tooltip.\n\t\tif ( !elementWithTooltipAttribute ) {\n\t\t\t// Unpin if element is focused, regardless of whether it contains a label or not.\n\t\t\t// It also prevents tooltips from overlapping the menu bar\n\t\t\tif ( evt.name === 'focus' ) {\n\t\t\t\tthis._unpinTooltip();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Abort to avoid flashing when, for instance:\n\t\t// * a tooltip is displayed for a focused element, then the same element gets mouseentered,\n\t\t// * a tooltip is displayed for an element via mouseenter, then the focus moves to the same element.\n\t\tif ( elementWithTooltipAttribute === this._currentElementWithTooltip ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._unpinTooltip();\n\t\tthis._pinTooltipDebounced( elementWithTooltipAttribute, getTooltipData( elementWithTooltipAttribute ) );\n\t}\n\n\t/**\n\t * Handles hiding tooltips on `mouseleave` and `blur` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onLeaveOrBlur( evt: EventInfo, { target, relatedTarget }: any ) {\n\t\tif ( evt.name === 'mouseleave' ) {\n\t\t\t// Don't act when the event does not concern a DOM element (e.g. a mouseleave out of an entire document),\n\t\t\tif ( !isElement( target ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst balloonElement = this.balloonPanelView.element;\n\t\t\tconst isEnteringBalloon = balloonElement && ( balloonElement === relatedTarget || balloonElement.contains( relatedTarget ) );\n\t\t\tconst isLeavingBalloon = !isEnteringBalloon && target === balloonElement;\n\n\t\t\t// Do not hide the tooltip when the user moves the cursor over it.\n\t\t\tif ( isEnteringBalloon ) {\n\t\t\t\tthis._unpinTooltipDebounced.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a tooltip is currently visible, don't act for a targets other than the one it is attached to.\n\t\t\t// The only exception is leaving balloon, in this scenario tooltip should be closed.\n\t\t\t// For instance, a random mouseleave far away in the page should not unpin the tooltip that was pinned because\n\t\t\t// of a previous focus. Only leaving the same element should hide the tooltip.\n\t\t\tif ( !isLeavingBalloon && this._currentElementWithTooltip && target !== this._currentElementWithTooltip ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst descendantWithTooltip = getDescendantWithTooltip( target );\n\t\t\tconst relatedDescendantWithTooltip = getDescendantWithTooltip( relatedTarget );\n\n\t\t\t// Unpin when the mouse was leaving element with a tooltip to a place which does not have or has a different tooltip.\n\t\t\t// Note that this should happen whether the tooltip is already visible or not, for instance,\n\t\t\t// it could be invisible but queued (debounced): it should get canceled.\n\t\t\tif ( isLeavingBalloon || ( descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip ) ) {\n\t\t\t\tthis._unpinTooltipDebounced();\n\t\t\t}\n\t\t} else {\n\t\t\t// If a tooltip is currently visible, don't act for a targets other than the one it is attached to.\n\t\t\t// For instance, a random blur in the web page should not unpin the tooltip that was pinned because of a previous mouseenter.\n\t\t\tif ( this._currentElementWithTooltip && target !== this._currentElementWithTooltip ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Note that unpinning should happen whether the tooltip is already visible or not, for instance, it could be invisible but\n\t\t\t// queued (debounced): it should get canceled (e.g. quick focus then quick blur using the keyboard).\n\t\t\tthis._unpinTooltipDebounced();\n\t\t}\n\t}\n\n\t/**\n\t * Handles hiding tooltips on `scroll` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onScroll( evt: unknown, { target }: any ) {\n\t\t// No tooltip, no reason to react on scroll.\n\t\tif ( !this._currentElementWithTooltip ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When scrolling a container that has both the balloon and the current element (common ancestor), the balloon can remain\n\t\t// visible (e.g. scrolling ≤body>). Otherwise, to avoid glitches (clipping, lagging) better just hide the tooltip.\n\t\t// Also, don't do anything when scrolling an unrelated DOM element that has nothing to do with the current element and the balloon.\n\t\tif ( target.contains( this.balloonPanelView.element ) && target.contains( this._currentElementWithTooltip ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._unpinTooltip();\n\t}\n\n\t/**\n\t * Pins the tooltip to a specific DOM element.\n\t *\n\t * @param options.text Text of the tooltip to display.\n\t * @param options.position The position of the tooltip.\n\t * @param options.cssClass Additional CSS class of the balloon with the tooltip.\n\t */\n\tprivate _pinTooltip(\n\t\ttargetDomElement: HTMLElement,\n\t\t{ text, position, cssClass }: TooltipData\n\t): void {\n\t\tthis._unpinTooltip();\n\n\t\t// Use the body collection of the first editor.\n\t\tconst bodyViewCollection = first( TooltipManager._editors.values() )!.ui.view.body;\n\n\t\tif ( !bodyViewCollection.has( this.balloonPanelView ) ) {\n\t\t\tbodyViewCollection.add( this.balloonPanelView );\n\t\t}\n\n\t\tthis.tooltipTextView.text = text;\n\n\t\tthis.balloonPanelView.pin( {\n\t\t\ttarget: targetDomElement,\n\t\t\tpositions: TooltipManager.getPositioningFunctions( position )\n\t\t} );\n\n\t\tthis._resizeObserver = new ResizeObserver( targetDomElement, () => {\n\t\t\t// The ResizeObserver will call its callback when the target element hides and the tooltip\n\t\t\t// should also disappear (https://github.com/ckeditor/ckeditor5/issues/12492).\n\t\t\tif ( !isVisible( targetDomElement ) ) {\n\t\t\t\tthis._unpinTooltip();\n\t\t\t}\n\t\t} );\n\n\t\tthis._mutationObserver!.attach( targetDomElement );\n\n\t\tthis.balloonPanelView.class = [ BALLOON_CLASS, cssClass ]\n\t\t\t.filter( className => className )\n\t\t\t.join( ' ' );\n\n\t\t// Start responding to changes in editor UI or content layout. For instance, when collaborators change content\n\t\t// and a contextual toolbar attached to a content starts to move (and so should move the tooltip).\n\t\t// Note: Using low priority to let other listeners that position contextual toolbars etc. to react first.\n\t\tfor ( const editor of TooltipManager._editors ) {\n\t\t\tthis.listenTo( editor.ui, 'update', this._updateTooltipPosition.bind( this ), { priority: 'low' } );\n\t\t}\n\n\t\tthis._currentElementWithTooltip = targetDomElement;\n\t\tthis._currentTooltipPosition = position;\n\t}\n\n\t/**\n\t * Unpins the tooltip and cancels all queued pinning.\n\t */\n\tprivate _unpinTooltip() {\n\t\tthis._unpinTooltipDebounced.cancel();\n\t\tthis._pinTooltipDebounced.cancel();\n\n\t\tthis.balloonPanelView.unpin();\n\n\t\tfor ( const editor of TooltipManager._editors ) {\n\t\t\tthis.stopListening( editor.ui, 'update' );\n\t\t}\n\n\t\tthis._currentElementWithTooltip = null;\n\t\tthis._currentTooltipPosition = null;\n\t\tthis.tooltipTextView.text = '';\n\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t}\n\n\t\tthis._mutationObserver!.detach();\n\t}\n\n\t/**\n\t * Updates the position of the tooltip so it stays in sync with the element it is pinned to.\n\t *\n\t * Hides the tooltip when the element is no longer visible in DOM or the tooltip text was removed.\n\t */\n\tprivate _updateTooltipPosition() {\n\t\tconst tooltipData = getTooltipData( this._currentElementWithTooltip! );\n\n\t\t// This could happen if the tooltip was attached somewhere in a contextual content toolbar and the toolbar\n\t\t// disappeared (e.g. removed an image), or the tooltip text was removed.\n\t\tif ( !isVisible( this._currentElementWithTooltip ) || !tooltipData.text ) {\n\t\t\tthis._unpinTooltip();\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.balloonPanelView.pin( {\n\t\t\ttarget: this._currentElementWithTooltip!,\n\t\t\tpositions: TooltipManager.getPositioningFunctions( tooltipData.position )\n\t\t} );\n\t}\n}\n\nexport type TooltipPosition = 's' | 'n' | 'e' | 'w' | 'sw' | 'se';\n\nfunction getDescendantWithTooltip( element: HTMLElement ) {\n\tif ( !isElement( element ) ) {\n\t\treturn null;\n\t}\n\n\treturn element.closest( '[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])' ) as HTMLElement;\n}\n\ninterface TooltipData {\n\ttext: string;\n\tposition: TooltipPosition;\n\tcssClass: string;\n}\n\nfunction getTooltipData( element: HTMLElement ): TooltipData {\n\treturn {\n\t\ttext: element.dataset.ckeTooltipText!,\n\t\tposition: ( element.dataset.ckeTooltipPosition || 's' ) as TooltipPosition,\n\t\tcssClass: element.dataset.ckeTooltipClass || ''\n\t};\n}\n\n// Creates a simple `MutationObserver` instance wrapper that observes changes in the tooltip-related attributes of the given element.\n// Used instead of the `MutationObserver` from the engine for simplicity.\nfunction createMutationObserver( callback: ( ...args: Array ) => unknown ): MutationObserverWrapper {\n\tconst mutationObserver = new MutationObserver( () => {\n\t\tcallback();\n\t} );\n\n\treturn {\n\t\tattach( element ) {\n\t\t\tmutationObserver.observe( element, {\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: [ 'data-cke-tooltip-text', 'data-cke-tooltip-position' ]\n\t\t\t} );\n\t\t},\n\n\t\tdetach() {\n\t\t\tmutationObserver.disconnect();\n\t\t}\n\t};\n}\n\ninterface MutationObserverWrapper {\n\tattach: ( element: Node ) => void;\n\tdetach: () => void;\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/**\n * @module ui/editorui/poweredby\n */\n\nimport type { Editor, UiConfig } from '@ckeditor/ckeditor5-core';\nimport {\n\tDomEmitterMixin,\n\tRect,\n\tverifyLicense,\n\ttype PositionOptions,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\nimport BalloonPanelView from '../panel/balloon/balloonpanelview.js';\nimport IconView from '../icon/iconview.js';\nimport View from '../view.js';\nimport { throttle, type DebouncedFunc } from 'lodash-es';\n\nimport poweredByIcon from '../../theme/icons/project-logo.svg';\n\nconst ICON_WIDTH = 53;\nconst ICON_HEIGHT = 10;\n// ⚠ Note, whenever changing the threshold, make sure to update the docs/support/managing-ckeditor-logo.md docs\n// as this information is also mentioned there ⚠.\nconst NARROW_ROOT_HEIGHT_THRESHOLD = 50;\nconst NARROW_ROOT_WIDTH_THRESHOLD = 350;\nconst DEFAULT_LABEL = 'Powered by';\n\ntype PoweredByConfig = Required[ 'poweredBy' ];\n\n/**\n * A helper that enables the \"powered by\" feature in the editor and renders a link to the project's\n * webpage next to the bottom of the editable element (editor root, source editing area, etc.) when the editor is focused.\n *\n * @private\n */\nexport default class PoweredBy extends DomEmitterMixin() {\n\t/**\n\t * Editor instance the helper was created for.\n\t */\n\tprivate readonly editor: Editor;\n\n\t/**\n\t * A reference to the balloon panel hosting and positioning the \"powered by\" link and logo.\n\t */\n\tprivate _balloonView: BalloonPanelView | null;\n\n\t/**\n\t * A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.\n\t */\n\tprivate _showBalloonThrottled: DebouncedFunc<() => void>;\n\n\t/**\n\t * A reference to the last editable element (root, source editing area, etc.) focused by the user.\n\t * Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the\n\t * right element whether the user is typing or using the UI.\n\t */\n\tprivate _lastFocusedEditableElement: HTMLElement | null;\n\n\t/**\n\t * Creates a \"powered by\" helper for a given editor. The feature is initialized on Editor#ready\n\t * event.\n\t *\n\t * @param editor\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tthis.editor = editor;\n\t\tthis._balloonView = null;\n\t\tthis._lastFocusedEditableElement = null;\n\t\tthis._showBalloonThrottled = throttle( this._showBalloon.bind( this ), 50, { leading: true } );\n\n\t\teditor.on( 'ready', this._handleEditorReady.bind( this ) );\n\t}\n\n\t/**\n\t * Destroys the \"powered by\" helper along with its view.\n\t */\n\tpublic destroy(): void {\n\t\tconst balloon = this._balloonView;\n\n\t\tif ( balloon ) {\n\t\t\t// Balloon gets destroyed by the body collection.\n\t\t\t// The powered by view gets destroyed by the balloon.\n\t\t\tballoon.unpin();\n\t\t\tthis._balloonView = null;\n\t\t}\n\n\t\tthis._showBalloonThrottled.cancel();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Enables \"powered by\" label once the editor (ui) is ready.\n\t */\n\tprivate _handleEditorReady(): void {\n\t\tconst editor = this.editor;\n\t\tconst forceVisible = !!editor.config.get( 'ui.poweredBy.forceVisible' );\n\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif ( !forceVisible && verifyLicense( editor.config.get( 'licenseKey' ) ) === 'VALID' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// No view means no body collection to append the powered by balloon to.\n\t\tif ( !editor.ui.view ) {\n\t\t\treturn;\n\t\t}\n\n\t\teditor.ui.focusTracker.on( 'change:isFocused', ( evt, data, isFocused ) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\n\t\t\tif ( isFocused ) {\n\t\t\t\tthis._showBalloon();\n\t\t\t} else {\n\t\t\t\tthis._hideBalloon();\n\t\t\t}\n\t\t} );\n\n\t\teditor.ui.focusTracker.on( 'change:focusedElement', ( evt, data, focusedElement ) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\n\t\t\tif ( focusedElement ) {\n\t\t\t\tthis._showBalloon();\n\t\t\t}\n\t\t} );\n\n\t\teditor.ui.on( 'update', () => {\n\t\t\tthis._showBalloonThrottled();\n\t\t} );\n\t}\n\n\t/**\n\t * Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}\n\t * with the \"powered by\" view inside ready for positioning.\n\t */\n\tprivate _createBalloonView(): void {\n\t\tconst editor = this.editor;\n\t\tconst balloon = this._balloonView = new BalloonPanelView();\n\t\tconst poweredByConfig = getNormalizedConfig( editor );\n\t\tconst view = new PoweredByView( editor.locale, poweredByConfig.label );\n\n\t\tballoon.content.add( view );\n\t\tballoon.set( {\n\t\t\tclass: 'ck-powered-by-balloon'\n\t\t} );\n\n\t\teditor.ui.view.body.add( balloon );\n\t\teditor.ui.focusTracker.add( balloon.element! );\n\n\t\tthis._balloonView = balloon;\n\t}\n\n\t/**\n\t * Attempts to display the balloon with the \"powered by\" view.\n\t */\n\tprivate _showBalloon(): void {\n\t\tif ( !this._lastFocusedEditableElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst attachOptions = getBalloonAttachOptions( this.editor, this._lastFocusedEditableElement );\n\n\t\tif ( attachOptions ) {\n\t\t\tif ( !this._balloonView ) {\n\t\t\t\tthis._createBalloonView();\n\t\t\t}\n\n\t\t\tthis._balloonView!.pin( attachOptions );\n\t\t}\n\t}\n\n\t/**\n\t * Hides the \"powered by\" balloon if already visible.\n\t */\n\tprivate _hideBalloon(): void {\n\t\tif ( this._balloonView ) {\n\t\t\tthis._balloonView!.unpin();\n\t\t}\n\t}\n\n\t/**\n\t * Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.\n\t */\n\tprivate _updateLastFocusedEditableElement(): void {\n\t\tconst editor = this.editor;\n\t\tconst isFocused = editor.ui.focusTracker.isFocused;\n\t\tconst focusedElement = editor.ui.focusTracker.focusedElement! as HTMLElement;\n\n\t\tif ( !isFocused || !focusedElement ) {\n\t\t\tthis._lastFocusedEditableElement = null;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst editableEditorElements = Array.from( editor.ui.getEditableElementsNames() ).map( name => {\n\t\t\treturn editor.ui.getEditableElement( name );\n\t\t} );\n\n\t\tif ( editableEditorElements.includes( focusedElement ) ) {\n\t\t\tthis._lastFocusedEditableElement = focusedElement;\n\t\t} else {\n\t\t\t// If it's none of the editable element, then the focus is somewhere in the UI. Let's display powered by\n\t\t\t// over the first element then.\n\t\t\tthis._lastFocusedEditableElement = editableEditorElements[ 0 ]!;\n\t\t}\n\t}\n}\n\n/**\n * A view displaying a \"powered by\" label and project logo wrapped in a link.\n */\nclass PoweredByView extends View {\n\t/**\n\t * Created an instance of the \"powered by\" view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param label The label text.\n\t */\n\tconstructor( locale: Locale, label: string | null ) {\n\t\tsuper( locale );\n\n\t\tconst iconView = new IconView();\n\t\tconst bind = this.bindTemplate;\n\n\t\ticonView.set( {\n\t\t\tcontent: poweredByIcon,\n\t\t\tisColorInherited: false\n\t\t} );\n\n\t\ticonView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: ICON_WIDTH + 'px',\n\t\t\t\t\theight: ICON_HEIGHT + 'px'\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-powered-by' ],\n\t\t\t\t'aria-hidden': true\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\thref: 'https://ckeditor.com/?utm_source=ckeditor&' +\n\t\t\t\t\t\t\t'utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo',\n\t\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\t\ttabindex: '-1'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t...label ? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttag: 'span',\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\tclass: [ 'ck', 'ck-powered-by__label' ]\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tchildren: [ label ]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t] : [],\n\t\t\t\t\t\ticonView\n\t\t\t\t\t],\n\t\t\t\t\ton: {\n\t\t\t\t\t\tdragstart: bind.to( evt => evt.preventDefault() )\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n}\n\nfunction getBalloonAttachOptions( editor: Editor, focusedEditableElement: HTMLElement ): Partial | null {\n\tconst poweredByConfig = getNormalizedConfig( editor )!;\n\tconst positioningFunction = poweredByConfig.side === 'right' ?\n\t\tgetLowerRightCornerPosition( focusedEditableElement, poweredByConfig ) :\n\t\tgetLowerLeftCornerPosition( focusedEditableElement, poweredByConfig );\n\n\treturn {\n\t\ttarget: focusedEditableElement,\n\t\tpositions: [ positioningFunction ]\n\t};\n}\n\nfunction getLowerRightCornerPosition( focusedEditableElement: HTMLElement, config: PoweredByConfig ) {\n\treturn getLowerCornerPosition( focusedEditableElement, config, ( rootRect, balloonRect ) => {\n\t\treturn rootRect.left + rootRect.width - balloonRect.width - config.horizontalOffset;\n\t} );\n}\n\nfunction getLowerLeftCornerPosition( focusedEditableElement: HTMLElement, config: PoweredByConfig ) {\n\treturn getLowerCornerPosition( focusedEditableElement, config, rootRect => rootRect.left + config.horizontalOffset );\n}\n\nfunction getLowerCornerPosition(\n\tfocusedEditableElement: HTMLElement,\n\tconfig: PoweredByConfig,\n\tgetBalloonLeft: ( visibleEditableElementRect: Rect, balloonRect: Rect ) => number\n) {\n\treturn ( visibleEditableElementRect: Rect, balloonRect: Rect ) => {\n\t\tconst editableElementRect = new Rect( focusedEditableElement );\n\n\t\tif ( editableElementRect.width < NARROW_ROOT_WIDTH_THRESHOLD || editableElementRect.height < NARROW_ROOT_HEIGHT_THRESHOLD ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet balloonTop;\n\n\t\tif ( config.position === 'inside' ) {\n\t\t\tballoonTop = editableElementRect.bottom - balloonRect.height;\n\t\t}\n\t\telse {\n\t\t\tballoonTop = editableElementRect.bottom - balloonRect.height / 2;\n\t\t}\n\n\t\tballoonTop -= config.verticalOffset;\n\n\t\tconst balloonLeft = getBalloonLeft( editableElementRect, balloonRect );\n\n\t\t// Clone the editable element rect and place it where the balloon would be placed.\n\t\t// This will allow getVisible() to work from editable element's perspective (rect source).\n\t\t// and yield a result as if the balloon was on the same (scrollable) layer as the editable element.\n\t\tconst newBalloonPositionRect = visibleEditableElementRect\n\t\t\t.clone()\n\t\t\t.moveTo( balloonLeft, balloonTop )\n\t\t\t.getIntersection( balloonRect.clone().moveTo( balloonLeft, balloonTop ) )!;\n\n\t\tconst newBalloonPositionVisibleRect = newBalloonPositionRect.getVisible();\n\n\t\tif ( !newBalloonPositionVisibleRect || newBalloonPositionVisibleRect.getArea() < balloonRect.getArea() ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn {\n\t\t\ttop: balloonTop,\n\t\t\tleft: balloonLeft,\n\t\t\tname: `position_${ config.position }-side_${ config.side }`,\n\t\t\tconfig: {\n\t\t\t\twithArrow: false\n\t\t\t}\n\t\t};\n\t};\n}\n\nfunction getNormalizedConfig( editor: Editor ): PoweredByConfig {\n\tconst userConfig = editor.config.get( 'ui.poweredBy' );\n\tconst position = userConfig && userConfig.position || 'border';\n\n\treturn {\n\t\tposition,\n\t\tlabel: DEFAULT_LABEL,\n\t\tverticalOffset: position === 'inside' ? 5 : 0,\n\t\thorizontalOffset: 5,\n\n\t\tside: editor.locale.contentLanguageDirection === 'ltr' ? 'right' : 'left',\n\t\t...userConfig\n\t};\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/**\n * @module utils/verifylicense\n */\n\nimport { releaseDate } from './version.js';\n\n/**\n * Possible states of the key after verification.\n */\nexport type VerifiedKeyStatus = 'VALID' | 'INVALID';\n\n/**\n * Checks whether the given string contains information that allows you to verify the license status.\n *\n * @param token The string to check.\n * @returns String that represents the state of given `token` parameter.\n */\nexport default function verifyLicense( token: string | undefined ): VerifiedKeyStatus {\n\t// This function implements naive and partial license key check mechanism,\n\t// used only to decide whether to show or hide the \"Powered by CKEditor\" logo.\n\t//\n\t// You can read the reasoning behind showing the logo to unlicensed (GPL) users\n\t// in this thread: https://github.com/ckeditor/ckeditor5/issues/14082.\n\t//\n\t// We firmly believe in the values behind creating open-source software, even when that\n\t// means keeping the license verification logic open for everyone to see.\n\t//\n\t// Please keep this code intact. Thank you for your understanding.\n\n\tfunction oldTokenCheck( token: string ): VerifiedKeyStatus {\n\t\tif ( token.length >= 40 && token.length <= 255 ) {\n\t\t\treturn 'VALID';\n\t\t} else {\n\t\t\treturn 'INVALID';\n\t\t}\n\t}\n\n\t// TODO: issue ci#3175\n\n\tif ( !token ) {\n\t\treturn 'INVALID';\n\t}\n\n\tlet decryptedData = '';\n\n\ttry {\n\t\tdecryptedData = atob( token );\n\t} catch ( e ) {\n\t\treturn 'INVALID';\n\t}\n\n\tconst splittedDecryptedData = decryptedData.split( '-' );\n\n\tconst firstElement = splittedDecryptedData[ 0 ];\n\tconst secondElement = splittedDecryptedData[ 1 ];\n\n\tif ( !secondElement ) {\n\t\treturn oldTokenCheck( token );\n\t}\n\n\ttry {\n\t\tatob( secondElement );\n\t} catch ( e ) {\n\t\ttry {\n\t\t\tatob( firstElement );\n\n\t\t\tif ( !atob( firstElement ).length ) {\n\t\t\t\treturn oldTokenCheck( token );\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\treturn oldTokenCheck( token );\n\t\t}\n\t}\n\n\tif ( firstElement.length < 40 || firstElement.length > 255 ) {\n\t\treturn 'INVALID';\n\t}\n\n\tlet decryptedSecondElement = '';\n\n\ttry {\n\t\tatob( firstElement );\n\t\tdecryptedSecondElement = atob( secondElement );\n\t} catch ( e ) {\n\t\treturn 'INVALID';\n\t}\n\n\tif ( decryptedSecondElement.length !== 8 ) {\n\t\treturn 'INVALID';\n\t}\n\n\tconst year = Number( decryptedSecondElement.substring( 0, 4 ) );\n\tconst monthIndex = Number( decryptedSecondElement.substring( 4, 6 ) ) - 1;\n\tconst day = Number( decryptedSecondElement.substring( 6, 8 ) );\n\n\tconst date = new Date( year, monthIndex, day );\n\n\tif ( date < releaseDate || isNaN( Number( date ) ) ) {\n\t\treturn 'INVALID';\n\t}\n\n\treturn 'VALID';\n}\n","export default \"\\n\";","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./arialiveannouncer.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/**\n * @module ui/arialiveannouncer\n */\n\nimport type { DomConverter } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport type ViewCollection from './viewcollection.js';\nimport View from './view.js';\n\nimport '../theme/components/arialiveannouncer/arialiveannouncer.css';\n\n/**\n * The politeness level of an `aria-live` announcement.\n *\n * Available keys are:\n * * `AriaLiveAnnouncerPoliteness.POLITE`,\n * * `AriaLiveAnnouncerPoliteness.ASSERTIVE`\n *\n * [Learn more](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Politeness_levels).\n */\nexport const AriaLiveAnnouncerPoliteness = {\n\tPOLITE: 'polite',\n\tASSERTIVE: 'assertive'\n} as const;\n\n/**\n * An accessibility helper that manages all ARIA live regions associated with an editor instance. ARIA live regions announce changes\n * to the state of the editor features.\n *\n * These announcements are consumed and propagated by screen readers and give users a better understanding of the current\n * state of the editor.\n *\n * To announce a state change to an editor use the {@link #announce} method:\n *\n * ```ts\n * editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );\n * ```\n */\nexport default class AriaLiveAnnouncer {\n\t/**\n\t * The editor instance.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * The view that aggregates all `aria-live` regions.\n\t */\n\tpublic view?: AriaLiveAnnouncerView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\n\t\t/**\n\t\t * Some screen readers only look at changes in the aria-live region.\n\t\t * They might not read a region that already has content when it is added.\n\t\t * To stop this problem, make sure to set up regions for all politeness settings when the editor starts.\n\t\t */\n\t\teditor.once( 'ready', () => {\n\t\t\tfor ( const politeness of Object.values( AriaLiveAnnouncerPoliteness ) ) {\n\t\t\t\tthis.announce( '', politeness );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets an announcement text to an aria region that is then announced by a screen reader to the user.\n\t *\n\t * If the aria region of a specified politeness does not exist, it will be created and can be re-used later.\n\t *\n\t * The default announcement politeness level is `'polite'`.\n\t *\n\t * ```ts\n\t * // Most screen readers will queue announcements from multiple aria-live regions and read them out in the order they were emitted.\n \t * editor.ui.ariaLiveAnnouncer.announce( 'Image uploaded.' );\n \t * editor.ui.ariaLiveAnnouncer.announce( 'Connection lost. Reconnecting.' );\n \t * ```\n\t */\n\tpublic announce(\n\t\tannouncement: string,\n\t\tattributes: AriaLiveAnnouncerPolitenessValue | AriaLiveAnnounceConfig = AriaLiveAnnouncerPoliteness.POLITE\n\t): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( !editor.ui.view ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this.view ) {\n\t\t\tthis.view = new AriaLiveAnnouncerView( editor.locale );\n\t\t\teditor.ui.view.body.add( this.view );\n\t\t}\n\n\t\tconst { politeness, isUnsafeHTML }: AriaLiveAnnounceConfig = typeof attributes === 'string' ? {\n\t\t\tpoliteness: attributes\n\t\t} : attributes;\n\n\t\tlet politenessRegionView = this.view.regionViews.find( view => view.politeness === politeness );\n\n\t\tif ( !politenessRegionView ) {\n\t\t\tpolitenessRegionView = new AriaLiveAnnouncerRegionView( editor, politeness );\n\t\t\tthis.view.regionViews.add( politenessRegionView );\n\t\t}\n\n\t\tpolitenessRegionView.announce( {\n\t\t\tannouncement,\n\t\t\tisUnsafeHTML\n\t\t} );\n\t}\n}\n\n/**\n * The view that aggregates all `aria-live` regions.\n */\nexport class AriaLiveAnnouncerView extends View {\n\t/**\n\t * A collection of all views that represent individual `aria-live` regions.\n\t */\n\tpublic readonly regionViews: ViewCollection;\n\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.regionViews = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-aria-live-announcer'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.regionViews\n\t\t} );\n\t}\n}\n\n/**\n * The view that represents a single `aria-live`.\n */\nexport class AriaLiveAnnouncerRegionView extends View {\n\t/**\n\t * Current politeness level of the region.\n\t */\n\tpublic readonly politeness: AriaLiveAnnouncerPolitenessValue;\n\n\t/**\n\t * DOM converter used to sanitize unsafe HTML passed to {@link #announce} method.\n\t */\n\tprivate _domConverter: DomConverter;\n\n\t/**\n\t * Interval used to remove additions. It prevents accumulation of added nodes in region.\n\t */\n\tprivate _pruneAnnouncementsInterval: ReturnType | null;\n\n\tconstructor( editor: Editor, politeness: AriaLiveAnnouncerPolitenessValue ) {\n\t\tsuper( editor.locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\trole: 'region',\n\t\t\t\t'aria-live': politeness,\n\t\t\t\t'aria-relevant': 'additions'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'ul',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-aria-live-region-list'\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\teditor.on( 'destroy', () => {\n\t\t\tif ( this._pruneAnnouncementsInterval !== null ) {\n\t\t\t\tclearInterval( this._pruneAnnouncementsInterval! );\n\t\t\t\tthis._pruneAnnouncementsInterval = null;\n\t\t\t}\n\t\t} );\n\n\t\tthis.politeness = politeness;\n\t\tthis._domConverter = editor.data.htmlProcessor.domConverter;\n\t\tthis._pruneAnnouncementsInterval = setInterval( () => {\n\t\t\tif ( this.element && this._listElement!.firstChild ) {\n\t\t\t\tthis._listElement!.firstChild!.remove();\n\t\t\t}\n\t\t}, 5000 );\n\t}\n\n\t/**\n\t * Appends new announcement to region.\n\t */\n\tpublic announce( { announcement, isUnsafeHTML }: AriaLiveAppendContentAttributes ): void {\n\t\tif ( !announcement.trim().length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst messageListItem = document.createElement( 'li' );\n\n\t\tif ( isUnsafeHTML ) {\n\t\t\tthis._domConverter.setContentOf( messageListItem, announcement );\n\t\t} else {\n\t\t\tmessageListItem.innerText = announcement;\n\t\t}\n\n\t\tthis._listElement!.appendChild( messageListItem );\n\t}\n\n\t/**\n\t * Return current announcements list HTML element.\n\t */\n\tprivate get _listElement(): HTMLElement | null {\n\t\treturn this.element!.querySelector( 'ul' )!;\n\t}\n}\n\ntype AriaLiveAnnouncerPolitenessValue = typeof AriaLiveAnnouncerPoliteness[ keyof typeof AriaLiveAnnouncerPoliteness ];\n\ntype AriaLiveAppendContentAttributes = {\n\tannouncement: string;\n\tisUnsafeHTML?: boolean;\n};\n\ntype AriaLiveAnnounceConfig = {\n\tpoliteness: AriaLiveAnnouncerPolitenessValue;\n\tisUnsafeHTML?: boolean;\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/**\n * @module ui/editorui/editorui\n */\n\n/* globals console */\n\nimport ComponentFactory from '../componentfactory.js';\nimport TooltipManager from '../tooltipmanager.js';\nimport PoweredBy from './poweredby.js';\nimport AriaLiveAnnouncer from '../arialiveannouncer.js';\n\nimport type EditorUIView from './editoruiview.js';\nimport type ToolbarView from '../toolbar/toolbarview.js';\nimport type { UIViewRenderEvent } from '../view.js';\n\nimport {\n\tObservableMixin,\n\tisVisible,\n\tFocusTracker,\n\ttype EventInfo\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ViewDocumentLayoutChangedEvent, ViewScrollToTheSelectionEvent } from '@ckeditor/ckeditor5-engine';\n\n/**\n * A class providing the minimal interface that is required to successfully bootstrap any editor UI.\n */\nexport default abstract class EditorUI extends ObservableMixin() {\n\t/**\n\t * The editor that the UI belongs to.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins\n\t * to register factories of specific UI components.\n\t */\n\tpublic readonly componentFactory: ComponentFactory;\n\n\t/**\n\t * Stores the information about the editor UI focus and propagates it so various plugins and components\n\t * are unified as a focus group.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Manages the tooltips displayed on mouseover and focus across the UI.\n\t */\n\tpublic readonly tooltipManager: TooltipManager;\n\n\t/**\n\t * A helper that enables the \"powered by\" feature in the editor and renders a link to the project's webpage.\n\t */\n\tpublic readonly poweredBy: PoweredBy;\n\n\t/**\n\t * A helper that manages the content of an `aria-live` regions used by editor features to announce status changes\n\t * to screen readers.\n\t */\n\tpublic readonly ariaLiveAnnouncer: AriaLiveAnnouncer;\n\n\t/**\n\t * Indicates the UI is ready. Set `true` after {@link #event:ready} event is fired.\n\t *\n\t * @readonly\n\t * @default false\n\t */\n\tpublic isReady: boolean = false;\n\n\tpublic abstract get view(): EditorUIView;\n\n\t/**\n\t * Stores viewport offsets from every direction.\n\t *\n\t * Viewport offset can be used to constrain balloons or other UI elements into an element smaller than the viewport.\n\t * This can be useful if there are any other absolutely positioned elements that may interfere with editor UI.\n\t *\n\t * Example `editor.ui.viewportOffset` returns:\n\t *\n\t * ```js\n\t * {\n\t * \ttop: 50,\n\t * \tright: 50,\n\t * \tbottom: 50,\n\t * \tleft: 50\n\t * }\n\t * ```\n\t *\n\t * This property can be overriden after editor already being initialized:\n\t *\n\t * ```js\n\t * editor.ui.viewportOffset = {\n\t * \ttop: 100,\n\t * \tright: 0,\n\t * \tbottom: 0,\n\t * \tleft: 0\n\t * };\n\t * ```\n\t *\n\t * @observable\n\t */\n\tpublic declare viewportOffset: {\n\t\tleft?: number;\n\t\tright?: number;\n\t\ttop?: number;\n\t\tbottom?: number;\n\t};\n\n\t/**\n\t * Stores all editable elements used by the editor instance.\n\t */\n\tprivate _editableElementsMap = new Map();\n\n\t/**\n\t * All available & focusable toolbars.\n\t */\n\tprivate _focusableToolbarDefinitions: Array = [];\n\n\t/**\n\t * Creates an instance of the editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tconst editingView = editor.editing.view;\n\n\t\tthis.editor = editor;\n\t\tthis.componentFactory = new ComponentFactory( editor );\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.tooltipManager = new TooltipManager( editor );\n\t\tthis.poweredBy = new PoweredBy( editor );\n\t\tthis.ariaLiveAnnouncer = new AriaLiveAnnouncer( editor );\n\n\t\tthis.set( 'viewportOffset', this._readViewportOffsetFromConfig() );\n\n\t\tthis.once( 'ready', () => {\n\t\t\tthis.isReady = true;\n\t\t} );\n\n\t\t// Informs UI components that should be refreshed after layout change.\n\t\tthis.listenTo( editingView.document, 'layoutChanged', this.update.bind( this ) );\n\t\tthis.listenTo( editingView, 'scrollToTheSelection', this._handleScrollToTheSelection.bind( this ) );\n\n\t\tthis._initFocusTracking();\n\t}\n\n\t/**\n\t * The main (outermost) DOM element of the editor UI.\n\t *\n\t * For example, in {@link module:editor-classic/classiceditor~ClassicEditor} it is a `
    ` which\n\t * wraps the editable element and the toolbar. In {@link module:editor-inline/inlineeditor~InlineEditor}\n\t * it is the editable element itself (as there is no other wrapper). However, in\n\t * {@link module:editor-decoupled/decouplededitor~DecoupledEditor} it is set to `null` because this editor does not\n\t * come with a single \"main\" HTML element (its editable element and toolbar are separate).\n\t *\n\t * This property can be understood as a shorthand for retrieving the element that a specific editor integration\n\t * considers to be its main DOM element.\n\t */\n\tpublic get element(): HTMLElement | null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.\n\t *\n\t * This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to\n\t * some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).\n\t */\n\tpublic update(): void {\n\t\tthis.fire( 'update' );\n\t}\n\n\t/**\n\t * Destroys the UI.\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.tooltipManager.destroy( this.editor );\n\t\tthis.poweredBy.destroy();\n\n\t\t// Clean–up the references to the CKEditor instance stored in the native editable DOM elements.\n\t\tfor ( const domElement of this._editableElementsMap.values() ) {\n\t\t\t( domElement as any ).ckeditorInstance = null;\n\t\t\tthis.editor.keystrokes.stopListening( domElement );\n\t\t}\n\n\t\tthis._editableElementsMap = new Map();\n\t\tthis._focusableToolbarDefinitions = [];\n\t}\n\n\t/**\n\t * Stores the native DOM editable element used by the editor under a unique name.\n\t *\n\t * Also, registers the element in the editor to maintain the accessibility of the UI. When the user is editing text in a focusable\n\t * editable area, they can use the Alt + F10 keystroke to navigate over editor toolbars. See {@link #addToolbar}.\n\t *\n\t * @param rootName The unique name of the editable element.\n\t * @param domElement The native DOM editable element.\n\t */\n\tpublic setEditableElement( rootName: string, domElement: HTMLElement ): void {\n\t\tthis._editableElementsMap.set( rootName, domElement );\n\n\t\t// Put a reference to the CKEditor instance in the editable native DOM element.\n\t\t// It helps 3rd–party software (browser extensions, other libraries) access and recognize\n\t\t// CKEditor 5 instances (editing roots) and use their API (there is no global editor\n\t\t// instance registry).\n\t\tif ( !( domElement as any ).ckeditorInstance ) {\n\t\t\t( domElement as any ).ckeditorInstance = this.editor;\n\t\t}\n\n\t\t// Register the element, so it becomes available for Alt+F10 and Esc navigation.\n\t\tthis.focusTracker.add( domElement );\n\n\t\tconst setUpKeystrokeHandler = () => {\n\t\t\t// The editing view of the editor is already listening to keystrokes from DOM roots (see: KeyObserver).\n\t\t\t// Do not duplicate listeners.\n\t\t\tif ( this.editor.editing.view.getDomRoot( rootName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.keystrokes.listenTo( domElement );\n\t\t};\n\n\t\t// For editable elements set by features after EditorUI is ready (e.g. source editing).\n\t\tif ( this.isReady ) {\n\t\t\tsetUpKeystrokeHandler();\n\t\t}\n\t\t// For editable elements set while the editor is being created (e.g. DOM roots).\n\t\telse {\n\t\t\tthis.once( 'ready', setUpKeystrokeHandler );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the editable from the editor UI. Removes all handlers added by {@link #setEditableElement}.\n\t *\n\t * @param rootName The name of the editable element to remove.\n\t */\n\tpublic removeEditableElement( rootName: string ): void {\n\t\tconst domElement = this._editableElementsMap.get( rootName );\n\n\t\tif ( !domElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._editableElementsMap.delete( rootName );\n\n\t\tthis.editor.keystrokes.stopListening( domElement );\n\t\tthis.focusTracker.remove( domElement );\n\n\t\t( domElement as any ).ckeditorInstance = null;\n\t}\n\n\t/**\n\t * Returns the editable editor element with the given name or null if editable does not exist.\n\t *\n\t * @param rootName The editable name.\n\t */\n\tpublic getEditableElement( rootName: string = 'main' ): HTMLElement | undefined {\n\t\treturn this._editableElementsMap.get( rootName );\n\t}\n\n\t/**\n\t * Returns array of names of all editor editable elements.\n\t */\n\tpublic getEditableElementsNames(): IterableIterator {\n\t\treturn this._editableElementsMap.keys();\n\t}\n\n\t/**\n\t * Adds a toolbar to the editor UI. Used primarily to maintain the accessibility of the UI.\n\t *\n\t * Focusable toolbars can be accessed (focused) by users by pressing the Alt + F10 keystroke.\n\t * Successive keystroke presses navigate over available toolbars.\n\t *\n\t * @param toolbarView A instance of the toolbar to be registered.\n\t */\n\tpublic addToolbar( toolbarView: ToolbarView, options: FocusableToolbarOptions = {} ): void {\n\t\tif ( toolbarView.isRendered ) {\n\t\t\tthis.focusTracker.add( toolbarView.element! );\n\t\t\tthis.editor.keystrokes.listenTo( toolbarView.element! );\n\t\t} else {\n\t\t\ttoolbarView.once( 'render', () => {\n\t\t\t\tthis.focusTracker.add( toolbarView.element! );\n\t\t\t\tthis.editor.keystrokes.listenTo( toolbarView.element! );\n\t\t\t} );\n\t\t}\n\n\t\tthis._focusableToolbarDefinitions.push( { toolbarView, options } );\n\t}\n\n\t/**\n\t * Stores all editable elements used by the editor instance.\n\t *\n\t * @deprecated\n\t */\n\tprotected get _editableElements(): unknown {\n\t\t/**\n\t\t * The {@link module:ui/editorui/editorui~EditorUI#_editableElements `EditorUI#_editableElements`} property has been\n\t\t * deprecated and will be removed in the near future. Please use\n\t\t * {@link module:ui/editorui/editorui~EditorUI#setEditableElement `setEditableElement()`} and\n\t\t * {@link module:ui/editorui/editorui~EditorUI#getEditableElement `getEditableElement()`} methods instead.\n\t\t *\n\t\t * @error editor-ui-deprecated-editable-elements\n\t\t * @param editorUI Editor UI instance the deprecated property belongs to.\n\t\t */\n\t\tconsole.warn(\n\t\t\t'editor-ui-deprecated-editable-elements: ' +\n\t\t\t'The EditorUI#_editableElements property has been deprecated and will be removed in the near future.',\n\t\t\t{ editorUI: this } );\n\n\t\treturn this._editableElementsMap;\n\t}\n\n\t/**\n\t * Returns viewport offsets object:\n\t *\n\t * ```js\n\t * {\n\t * \ttop: Number,\n\t * \tright: Number,\n\t * \tbottom: Number,\n\t * \tleft: Number\n\t * }\n\t * ```\n\t *\n\t * Only top property is currently supported.\n\t */\n\tprivate _readViewportOffsetFromConfig() {\n\t\tconst editor = this.editor;\n\t\tconst viewportOffsetConfig = editor.config.get( 'ui.viewportOffset' );\n\n\t\tif ( viewportOffsetConfig ) {\n\t\t\treturn viewportOffsetConfig;\n\t\t}\n\n\t\t// Not present in EditorConfig type, because it's legacy. Hence the `as` expression.\n\t\tconst legacyOffsetConfig = editor.config.get( 'toolbar.viewportTopOffset' ) as number | undefined;\n\n\t\t// Fall back to deprecated toolbar config.\n\t\tif ( legacyOffsetConfig ) {\n\t\t\t/**\n\t\t\t * The {@link module:core/editor/editorconfig~EditorConfig#toolbar `EditorConfig#toolbar.viewportTopOffset`}\n\t\t\t * property has been deprecated and will be removed in the near future. Please use\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset`} instead.\n\t\t\t *\n\t\t\t * @error editor-ui-deprecated-viewport-offset-config\n\t\t\t */\n\t\t\tconsole.warn(\n\t\t\t\t'editor-ui-deprecated-viewport-offset-config: ' +\n\t\t\t\t'The `toolbar.vieportTopOffset` configuration option is deprecated. ' +\n\t\t\t\t'It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead.'\n\t\t\t);\n\n\t\t\treturn { top: legacyOffsetConfig };\n\t\t}\n\n\t\t// More keys to come in the future.\n\t\treturn { top: 0 };\n\t}\n\n\t/**\n\t * Starts listening for Alt + F10 and Esc keystrokes in the context of focusable\n\t * {@link #setEditableElement editable elements} and {@link #addToolbar toolbars}\n\t * to allow users navigate across the UI.\n\t */\n\tprivate _initFocusTracking(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\tlet lastFocusedForeignElement: HTMLElement | null;\n\t\tlet candidateDefinitions: Array;\n\n\t\t// Focus the next focusable toolbar on Alt + F10.\n\t\teditor.keystrokes.set( 'Alt+F10', ( data, cancel ) => {\n\t\t\tconst focusedElement = this.focusTracker.focusedElement as HTMLElement;\n\n\t\t\t// Focus moved out of a DOM element that\n\t\t\t// * is not a toolbar,\n\t\t\t// * does not belong to the editing view (e.g. source editing).\n\t\t\tif (\n\t\t\t\tArray.from( this._editableElementsMap.values() ).includes( focusedElement ) &&\n\t\t\t\t!Array.from( editingView.domRoots.values() ).includes( focusedElement )\n\t\t\t) {\n\t\t\t\tlastFocusedForeignElement = focusedElement;\n\t\t\t}\n\n\t\t\tconst currentFocusedToolbarDefinition = this._getCurrentFocusedToolbarDefinition();\n\n\t\t\t// * When focusing a toolbar for the first time, set the array of definitions for successive presses of Alt+F10.\n\t\t\t// This ensures, the navigation works always the same and no pair of toolbars takes over\n\t\t\t// (e.g. image and table toolbars when a selected image is inside a cell).\n\t\t\t// * It could be that the focus went to the toolbar by clicking a toolbar item (e.g. a dropdown). In this case,\n\t\t\t// there were no candidates so they must be obtained (#12339).\n\t\t\tif ( !currentFocusedToolbarDefinition || !candidateDefinitions ) {\n\t\t\t\tcandidateDefinitions = this._getFocusableCandidateToolbarDefinitions();\n\t\t\t}\n\n\t\t\t// In a single Alt+F10 press, check all candidates but if none were focused, don't go any further.\n\t\t\t// This prevents an infinite loop.\n\t\t\tfor ( let i = 0; i < candidateDefinitions.length; i++ ) {\n\t\t\t\tconst candidateDefinition = candidateDefinitions.shift()!;\n\n\t\t\t\t// Put the first definition to the back of the array. This allows circular navigation over all toolbars\n\t\t\t\t// on successive presses of Alt+F10.\n\t\t\t\tcandidateDefinitions.push( candidateDefinition );\n\n\t\t\t\t// Don't focus the same toolbar again. If you did, this would move focus from the nth focused toolbar item back to the\n\t\t\t\t// first item as per ToolbarView#focus() if the user navigated inside the toolbar.\n\t\t\t\tif (\n\t\t\t\t\tcandidateDefinition !== currentFocusedToolbarDefinition &&\n\t\t\t\t\tthis._focusFocusableCandidateToolbar( candidateDefinition )\n\t\t\t\t) {\n\t\t\t\t\t// Clean up after a current visible toolbar when switching to the next one.\n\t\t\t\t\tif ( currentFocusedToolbarDefinition && currentFocusedToolbarDefinition.options.afterBlur ) {\n\t\t\t\t\t\tcurrentFocusedToolbarDefinition.options.afterBlur();\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Blur the focused toolbar on Esc and bring the focus back to its origin.\n\t\teditor.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tconst focusedToolbarDef = this._getCurrentFocusedToolbarDefinition();\n\n\t\t\tif ( !focusedToolbarDef ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Bring focus back to where it came from before focusing the toolbar:\n\t\t\t// 1. If it came from outside the engine view (e.g. source editing), move it there.\n\t\t\tif ( lastFocusedForeignElement ) {\n\t\t\t\tlastFocusedForeignElement.focus();\n\t\t\t\tlastFocusedForeignElement = null;\n\t\t\t}\n\t\t\t// 2. There are two possibilities left:\n\t\t\t// 2.1. It could be that the focus went from an editable element in the view (root or nested).\n\t\t\t// 2.2. It could be the focus went straight to the toolbar before even focusing the editing area.\n\t\t\t// In either case, just focus the view editing. The focus will land where it belongs.\n\t\t\telse {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t}\n\n\t\t\t// Clean up after the toolbar if there is anything to do there.\n\t\t\tif ( focusedToolbarDef.options.afterBlur ) {\n\t\t\t\tfocusedToolbarDef.options.afterBlur();\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Returns definitions of toolbars that could potentially be focused, sorted by their importance for the user.\n\t *\n\t * Focusable toolbars candidates are either:\n\t * * already visible,\n\t * * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that\n\t * they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible\n\t * at this stage because it depends on its implementation, that in turn depends on the editing context (selection).\n\t *\n\t * **Note**: Contextual toolbars take precedence over regular toolbars.\n\t */\n\tprivate _getFocusableCandidateToolbarDefinitions(): Array {\n\t\tconst definitions: Array = [];\n\n\t\tfor ( const toolbarDef of this._focusableToolbarDefinitions ) {\n\t\t\tconst { toolbarView, options } = toolbarDef;\n\n\t\t\tif ( isVisible( toolbarView.element ) || options.beforeFocus ) {\n\t\t\t\tdefinitions.push( toolbarDef );\n\t\t\t}\n\t\t}\n\n\t\t// Contextual and already visible toolbars have higher priority. If both are true, the toolbar will always focus first.\n\t\t// For instance, a selected widget toolbar vs inline editor toolbar: both are visible but the widget toolbar is contextual.\n\t\tdefinitions.sort( ( defA, defB ) => getToolbarDefinitionWeight( defA ) - getToolbarDefinitionWeight( defB ) );\n\n\t\treturn definitions;\n\t}\n\n\t/**\n\t * Returns a definition of the toolbar that is currently visible and focused (one of its children has focus).\n\t *\n\t * `null` is returned when no toolbar is currently focused.\n\t */\n\tprivate _getCurrentFocusedToolbarDefinition(): FocusableToolbarDefinition | null {\n\t\tfor ( const definition of this._focusableToolbarDefinitions ) {\n\t\t\tif ( definition.toolbarView.element && definition.toolbarView.element.contains( this.focusTracker.focusedElement ) ) {\n\t\t\t\treturn definition;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Focuses a focusable toolbar candidate using its definition.\n\t *\n\t * @param candidateToolbarDefinition A definition of the toolbar to focus.\n\t * @returns `true` when the toolbar candidate was focused. `false` otherwise.\n\t */\n\tprivate _focusFocusableCandidateToolbar( candidateToolbarDefinition: FocusableToolbarDefinition ): boolean {\n\t\tconst { toolbarView, options: { beforeFocus } } = candidateToolbarDefinition;\n\n\t\tif ( beforeFocus ) {\n\t\t\tbeforeFocus();\n\t\t}\n\n\t\t// If it didn't show up after beforeFocus(), it's not focusable at all.\n\t\tif ( !isVisible( toolbarView.element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttoolbarView.focus();\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Provides an integration between {@link #viewportOffset} and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t * It allows the UI-agnostic engine method to consider user-configured viewport offsets specific for the integration.\n\t *\n\t * @param evt The `scrollToTheSelection` event info.\n\t * @param data The payload carried by the `scrollToTheSelection` event.\n\t */\n\tprivate _handleScrollToTheSelection(\n\t\tevt: EventInfo<'scrollToTheSelection'>,\n\t\tdata: ViewScrollToTheSelectionEvent[ 'args' ][ 0 ]\n\t): void {\n\t\tconst configuredViewportOffset = {\n\t\t\ttop: 0,\n\t\t\tbottom: 0,\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\t...this.viewportOffset\n\t\t};\n\n\t\tdata.viewportOffset.top += configuredViewportOffset.top;\n\t\tdata.viewportOffset.bottom += configuredViewportOffset.bottom;\n\t\tdata.viewportOffset.left += configuredViewportOffset.left;\n\t\tdata.viewportOffset.right += configuredViewportOffset.right;\n\t}\n}\n\n/**\n * Fired when the editor UI is ready.\n *\n * Fired before {@link module:engine/controller/datacontroller~DataController#event:ready}.\n *\n * @eventName ~EditorUI#ready\n */\nexport type EditorUIReadyEvent = {\n\tname: 'ready';\n\targs: [];\n};\n\n/**\n * Fired whenever the UI (all related components) should be refreshed.\n *\n * **Note:**: The event is fired after each {@link module:engine/view/document~Document#event:layoutChanged}.\n * It can also be fired manually via the {@link module:ui/editorui/editorui~EditorUI#update} method.\n *\n * @eventName ~EditorUI#update\n */\nexport type EditorUIUpdateEvent = {\n\tname: 'update';\n\targs: [];\n};\n\n/**\n * A definition of a focusable toolbar. Used by {@link module:ui/editorui/editorui~EditorUI#addToolbar}.\n */\nexport interface FocusableToolbarDefinition {\n\n\t/**\n\t * An instance of a focusable toolbar view.\n\t */\n\ttoolbarView: ToolbarView;\n\n\t/**\n\t * Options of a focusable toolbar view:\n\t *\n\t * * `isContextual`: Marks the higher priority toolbar. For example when there are 2 visible toolbars,\n\t * it allows to distinguish which toolbar should be focused first after the `alt+f10` keystroke\n\t * * `beforeFocus`: A callback executed before the `ToolbarView` gains focus upon the `Alt+F10` keystroke.\n\t * * `afterBlur`: A callback executed after `ToolbarView` loses focus upon `Esc` keystroke but before\n\t * the focus goes back to the `origin`.\n\t */\n\toptions: FocusableToolbarOptions;\n}\n\nexport interface FocusableToolbarOptions {\n\n\t/**\n\t * Set `true` if the toolbar is attached to the content of the editor. Such toolbar takes\n\t * a precedence over other toolbars when a user pressed Alt + F10.\n\t */\n\tisContextual?: boolean;\n\n\t/**\n\t * Specify a callback executed before the toolbar instance DOM element gains focus\n\t * upon the Alt + F10 keystroke.\n\t */\n\tbeforeFocus?: () => void;\n\n\t/**\n\t * Specify a callback executed after the toolbar instance DOM element loses focus upon\n\t * Esc keystroke but before the focus goes back to the {@link ~EditorUI#setEditableElement editable element}.\n\t */\n\tafterBlur?: () => void;\n}\n\n/**\n * Returns a number (weight) for a toolbar definition. Visible toolbars have a higher priority and so do\n * contextual toolbars (displayed in the context of a content, for instance, an image toolbar).\n *\n * A standard invisible toolbar is the heaviest. A visible contextual toolbar is the lightest.\n *\n * @param toolbarDef A toolbar definition to be weighted.\n */\nfunction getToolbarDefinitionWeight( toolbarDef: FocusableToolbarDefinition ): number {\n\tconst { toolbarView, options } = toolbarDef;\n\tlet weight = 10;\n\n\t// Prioritize already visible toolbars. They should get focused first.\n\tif ( isVisible( toolbarView.element ) ) {\n\t\tweight--;\n\t}\n\n\t// Prioritize contextual toolbars. They are displayed at the selection.\n\tif ( options.isContextual ) {\n\t\tweight--;\n\t}\n\n\treturn weight;\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./editorui.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/**\n * @module ui/editorui/editoruiview\n */\n\nimport View from '../view.js';\nimport BodyCollection from './bodycollection.js';\nimport type EditableUIView from '../editableui/editableuiview.js';\n\nimport type { Locale, LocaleTranslate } from '@ckeditor/ckeditor5-utils';\n\nimport '../../theme/components/editorui/editorui.css';\n\n/**\n * The editor UI view class. Base class for the editor main views.\n */\nexport default abstract class EditorUIView extends View {\n\t/**\n\t * Collection of the child views, detached from the DOM\n\t * structure of the editor, like panels, icons etc.\n\t */\n\tpublic readonly body: BodyCollection;\n\n\tdeclare public locale: Locale;\n\tdeclare public t: LocaleTranslate;\n\n\tpublic abstract get editable(): EditableUIView;\n\n\t/**\n\t * Creates an instance of the editor UI view class.\n\t *\n\t * @param locale The locale instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.body = new BodyCollection( locale );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.body.attachToDom();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis.body.detachFromDom();\n\n\t\treturn super.destroy();\n\t}\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/**\n * @module ui/editableui/editableuiview\n */\n\nimport View from '../view.js';\n\nimport type { EditingView } from '@ckeditor/ckeditor5-engine';\nimport type { Locale, ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The editable UI view class.\n */\nexport default class EditableUIView extends View {\n\t/**\n\t * The name of the editable UI view.\n\t */\n\tpublic name: string | null = null;\n\n\t/**\n\t * Controls whether the editable is focused, i.e. the user is typing in it.\n\t *\n\t * @observable\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * The editing view instance the editable is related to. Editable uses the editing\n\t * view to dynamically modify its certain DOM attributes after {@link #render rendering}.\n\t *\n\t * **Note**: The DOM attributes are performed by the editing view and not UI\n\t * {@link module:ui/view~View#bindTemplate template bindings} because once rendered,\n\t * the editable DOM element must remain under the full control of the engine to work properly.\n\t */\n\tprotected _editingView: EditingView;\n\n\t/**\n\t * The element which is the main editable element (usually the one with `contentEditable=\"true\"`).\n\t */\n\tprivate _editableElement: HTMLElement | null | undefined;\n\n\t/**\n\t * Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t * the view will not render its {@link #template}.\n\t */\n\tprivate _hasExternalElement: boolean;\n\n\t/**\n\t * Creates an instance of EditableUIView class.\n\t *\n\t * @param locale The locale instance.\n\t * @param editingView The editing view instance the editable is related to.\n\t * @param editableElement The editable element. If not specified, this view\n\t * should create it. Otherwise, the existing element should be used.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableElement?: HTMLElement\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-content',\n\t\t\t\t\t'ck-editor__editable',\n\t\t\t\t\t'ck-rounded-corners'\n\t\t\t\t],\n\t\t\t\tlang: locale.contentLanguage,\n\t\t\t\tdir: locale.contentLanguageDirection\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( 'isFocused', false );\n\n\t\tthis._editableElement = editableElement;\n\t\tthis._hasExternalElement = !!this._editableElement;\n\t\tthis._editingView = editingView;\n\t}\n\n\t/**\n\t * Renders the view by either applying the {@link #template} to the existing\n\t * {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}\n\t * as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this._hasExternalElement ) {\n\t\t\tthis.template!.apply( this.element = this._editableElement! );\n\t\t} else {\n\t\t\tthis._editableElement = this.element;\n\t\t}\n\n\t\tthis.on( 'change:isFocused', () => this._updateIsFocusedClasses() );\n\t\tthis._updateIsFocusedClasses();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._hasExternalElement ) {\n\t\t\tthis.template!.revert( this._editableElement! );\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t * the view will not render its {@link #template}.\n\t */\n\tpublic get hasExternalElement(): boolean {\n\t\treturn this._hasExternalElement;\n\t}\n\n\t/**\n\t * Updates the `ck-focused` and `ck-blurred` CSS classes on the {@link #element} according to\n\t * the {@link #isFocused} property value using the {@link #_editingView editing view} API.\n\t */\n\tprivate _updateIsFocusedClasses() {\n\t\tconst editingView = this._editingView;\n\n\t\tif ( editingView.isRenderingInProgress ) {\n\t\t\tupdateAfterRender( this );\n\t\t} else {\n\t\t\tupdate( this );\n\t\t}\n\n\t\tfunction update( view: EditableUIView ) {\n\t\t\teditingView.change( writer => {\n\t\t\t\tconst viewRoot = editingView.document.getRoot( view.name! )!;\n\n\t\t\t\twriter.addClass( view.isFocused ? 'ck-focused' : 'ck-blurred', viewRoot );\n\t\t\t\twriter.removeClass( view.isFocused ? 'ck-blurred' : 'ck-focused', viewRoot );\n\t\t\t} );\n\t\t}\n\n\t\t// In a case of a multi-root editor, a callback will be attached more than once (one callback for each root).\n\t\t// While executing one callback the `isRenderingInProgress` observable is changing what causes executing another\n\t\t// callback and render is called inside the already pending render.\n\t\t// We need to be sure that callback is executed only when the value has changed from `true` to `false`.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1676.\n\t\tfunction updateAfterRender( view: EditableUIView ) {\n\t\t\teditingView.once>( 'change:isRenderingInProgress', ( evt, name, value ) => {\n\t\t\t\tif ( !value ) {\n\t\t\t\t\tupdate( view );\n\t\t\t\t} else {\n\t\t\t\t\tupdateAfterRender( view );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module ui/editableui/inline/inlineeditableuiview\n */\n\nimport EditableUIView from '../editableuiview.js';\n\nimport type { EditingView } from '@ckeditor/ckeditor5-engine';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The inline editable UI class implementing an inline {@link module:ui/editableui/editableuiview~EditableUIView}.\n */\nexport default class InlineEditableUIView extends EditableUIView {\n\t/**\n\t * A function that gets called with the instance of this view as an argument and should return a string that\n\t * represents the label of the editable for assistive technologies.\n\t */\n\tprivate readonly _generateLabel: ( view: InlineEditableUIView ) => string;\n\n\t/**\n\t * Creates an instance of the InlineEditableUIView class.\n\t *\n\t * @param locale The locale instance.\n\t * @param editingView The editing view instance the editable is related to.\n\t * @param editableElement The editable element. If not specified, the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}\n\t * will create it. Otherwise, the existing element will be used.\n\t * @param options Additional configuration of the view.\n\t * @param options.label A function that gets called with the instance of this view as an argument\n\t * and should return a string that represents the label of the editable for assistive technologies. If not provided,\n\t * a default label generator is used.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableElement?: HTMLElement,\n\t\toptions: { label?: ( view: InlineEditableUIView ) => string } = {}\n\t) {\n\t\tsuper( locale, editingView, editableElement );\n\n\t\tconst t = locale.t;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\trole: 'textbox',\n\t\t\t\tclass: 'ck-editor__editable_inline'\n\t\t\t}\n\t\t} );\n\n\t\tthis._generateLabel = options.label || ( () => t( 'Editor editing area: %0', this.name! ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tconst editingView = this._editingView;\n\n\t\teditingView.change( writer => {\n\t\t\tconst viewRoot = editingView.document.getRoot( this.name! );\n\n\t\t\twriter.setAttribute( 'aria-label', this._generateLabel( this ), viewRoot! );\n\t\t} );\n\t}\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/**\n * @module ui/notification/notification\n */\n\n/* globals window */\n\nimport { ContextPlugin } from '@ckeditor/ckeditor5-core';\n\n/**\n * The Notification plugin.\n *\n * This plugin sends a few types of notifications: `success`, `info` and `warning`. The notifications need to be\n * handled and displayed by a plugin responsible for showing the UI of the notifications. Using this plugin for dispatching\n * notifications makes it possible to switch the notifications UI.\n *\n * Note that every unhandled and not stopped `warning` notification will be displayed as a system alert.\n * See {@link module:ui/notification/notification~Notification#showWarning}.\n */\nexport default class Notification extends ContextPlugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Notification' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\t// Each unhandled and not stopped `show:warning` event is displayed as a system alert.\n\t\tthis.on( 'show:warning', ( evt, data ) => {\n\t\t\twindow.alert( data.message ); // eslint-disable-line no-alert\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Shows a success notification.\n\t *\n\t * By default, it fires the {@link #event:show:success `show:success` event} with the given `data`. The event namespace can be extended\n\t * using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showSuccess( 'Image is uploaded.', {\n\t * \tnamespace: 'upload:image'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:success:upload:image` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showSuccess( 'Image is uploaded.', {\n\t * \ttitle: 'Image upload success'\n\t * } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tpublic showSuccess(\n\t\tmessage: string,\n\t\tdata: { namespace?: string; title?: string } = {}\n\t): void {\n\t\tthis._showNotification( {\n\t\t\tmessage,\n\t\t\ttype: 'success',\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t} );\n\t}\n\n\t/**\n\t * Shows an information notification.\n\t *\n\t * By default, it fires the {@link #event:show:info `show:info` event} with the given `data`. The event namespace can be extended\n\t * using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showInfo( 'Editor is offline.', {\n\t * \tnamespace: 'editor:status'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:info:editor:status` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showInfo( 'Editor is offline.', {\n\t * \ttitle: 'Network information'\n\t * } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tpublic showInfo(\n\t\tmessage: string,\n\t\tdata: { namespace?: string; title?: string } = {}\n\t): void {\n\t\tthis._showNotification( {\n\t\t\tmessage,\n\t\t\ttype: 'info',\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t} );\n\t}\n\n\t/**\n\t * Shows a warning notification.\n\t *\n\t * By default, it fires the {@link #event:show:warning `show:warning` event}\n\t * with the given `data`. The event namespace can be extended using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showWarning( 'Image upload error.', {\n\t * \tnamespace: 'upload:image'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:warning:upload:image` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showWarning( 'Image upload error.', {\n\t * \ttitle: 'Upload failed'\n\t * } );\n\t * ```\n\t *\n\t * Note that each unhandled and not stopped `warning` notification will be displayed as a system alert.\n\t * The plugin responsible for displaying warnings should `stop()` the event to prevent displaying it as an alert:\n\t *\n\t * ```ts\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Do something with the data.\n\t *\n\t * \t// Stop this event to prevent displaying it as an alert.\n\t * \tevt.stop();\n\t * } );\n\t * ```\n\t *\n\t * You can attach many listeners to the same event and `stop()` this event in a listener with a low priority:\n\t *\n\t * ```ts\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Show the warning in the UI, but do not stop it.\n\t * } );\n\t *\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Log the warning to some error tracker.\n\t *\n\t * \t// Stop this event to prevent displaying it as an alert.\n\t * \tevt.stop();\n\t * }, { priority: 'low' } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tpublic showWarning(\n\t\tmessage: string,\n\t\tdata: { namespace?: string; title?: string } = {}\n\t): void {\n\t\tthis._showNotification( {\n\t\t\tmessage,\n\t\t\ttype: 'warning',\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t} );\n\t}\n\n\t/**\n\t * Fires the `show` event with the specified type, namespace and message.\n\t *\n\t * @param data The message data.\n\t * @param data.message The content of the notification.\n\t * @param data.type The type of the message.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tprivate _showNotification( data: {\n\t\tmessage: string;\n\t\ttype: NotificationEventType;\n\t\tnamespace?: string;\n\t\ttitle?: string;\n\t} ): void {\n\t\tconst event = data.namespace ?\n\t\t\t`show:${ data.type }:${ data.namespace }` as const :\n\t\t\t`show:${ data.type }` as const;\n\n\t\tthis.fire>( event, {\n\t\t\tmessage: data.message,\n\t\t\ttype: data.type,\n\t\t\ttitle: data.title || ''\n\t\t} );\n\t}\n}\n\nexport type NotificationEventType = 'success' | 'info' | 'warning';\n\n/**\n * Fired when one of the `showSuccess()`, `showInfo()`, `showWarning()` methods is called.\n *\n * @eventName ~Notification#show\n * @param data The notification data.\n */\nexport type NotificationShowEvent = {\n\tname: 'show';\n\targs: [ data: NotificationShowEventData ];\n};\n\n/**\n * Fired when the `showSuccess()` method is called.\n *\n * @eventName ~Notification#show:success\n * @param data The notification data.\n */\nexport type NotificationShowSuccessEvent = NotificationShowTypeEvent<'success'>;\n\n/**\n * Fired when the `showInfo()` method is called.\n *\n * @eventName ~Notification#show:info\n * @param data The notification data.\n */\nexport type NotificationShowInfoEvent = NotificationShowTypeEvent<'info'>;\n\n/**\n * Fired when the `showWarning()` method is called.\n *\n * When this event is not handled or stopped by `event.stop()`, the `data.message` of this event will\n * be automatically displayed as a system alert.\n *\n * @eventName ~Notification#show:warning\n * @param data The notification data.\n */\nexport type NotificationShowWarningEvent = NotificationShowTypeEvent<'warning'>;\n\nexport type NotificationShowTypeEvent = {\n\tname: `show:${ NotificationType }` | `show:${ NotificationType }:${ string }`;\n\targs: [ data: NotificationShowEventData ];\n};\n\nexport type NotificationShowEventData = {\n\n\t/**\n\t * The content of the notification.\n\t */\n\tmessage: string;\n\n\t/**\n\t * The title of the notification.\n\t */\n\ttitle: string;\n\n\t/**\n\t * The type of the notification.\n\t */\n\ttype: NotificationType;\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/**\n * @module ui/model\n */\n\nimport { ObservableMixin } from '@ckeditor/ckeditor5-utils';\nimport { extend } from 'lodash-es';\n\n/**\n * The base MVC model class.\n */\nexport default class Model extends ObservableMixin() {\n\t[ x: string ]: unknown;\n\n\t/**\n\t * Creates a new Model instance.\n\t *\n\t * @param attributes The model state attributes to be defined during the instance creation.\n\t * @param properties The (out of state) properties to be appended to the instance during creation.\n\t */\n\tconstructor( attributes?: Record, properties?: Record ) {\n\t\tsuper();\n\n\t\t// Extend this instance with the additional (out of state) properties.\n\t\tif ( properties ) {\n\t\t\textend( this, properties );\n\t\t}\n\n\t\t// Initialize the attributes.\n\t\tif ( attributes ) {\n\t\t\tthis.set( attributes );\n\t\t}\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./balloonrotator.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 || {};","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./fakepanel.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/**\n * @module ui/panel/balloon/contextualballoon\n */\n\nimport BalloonPanelView from './balloonpanelview.js';\nimport View from '../../view.js';\nimport ButtonView from '../../button/buttonview.js';\nimport type { ButtonExecuteEvent } from '../../button/button.js';\nimport type ViewCollection from '../../viewcollection.js';\n\nimport { Plugin, icons, type Editor } from '@ckeditor/ckeditor5-core';\nimport {\n\tCKEditorError,\n\tFocusTracker,\n\tRect,\n\ttoUnit,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype PositionOptions\n} from '@ckeditor/ckeditor5-utils';\n\nimport '../../../theme/components/panel/balloonrotator.css';\nimport '../../../theme/components/panel/fakepanel.css';\n\nconst toPx = toUnit( 'px' );\n\n/**\n * Provides the common contextual balloon for the editor.\n *\n * The role of this plugin is to unify the contextual balloons logic, simplify views management and help\n * avoid the unnecessary complexity of handling multiple {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n * instances in the editor.\n *\n * This plugin allows for creating single or multiple panel stacks.\n *\n * Each stack may have multiple views, with the one on the top being visible. When the visible view is removed from the stack,\n * the previous view becomes visible.\n *\n * It might be useful to implement nested navigation in a balloon. For instance, a toolbar view may contain a link button.\n * When you click it, a link view (which lets you set the URL) is created and put on top of the toolbar view, so the link panel\n * is displayed. When you finish editing the link and close (remove) the link view, the toolbar view is visible again.\n *\n * However, there are cases when there are multiple independent balloons to be displayed, for instance, if the selection\n * is inside two inline comments at the same time. For such cases, you can create two independent panel stacks.\n * The contextual balloon plugin will create a navigation bar to let the users switch between these panel stacks using the \"Next\"\n * and \"Previous\" buttons.\n *\n * If there are no views in the current stack, the balloon panel will try to switch to the next stack. If there are no\n * panels in any stack, the balloon panel will be hidden.\n *\n * **Note**: To force the balloon panel to show only one view, even if there are other stacks, use the `singleViewMode=true` option\n * when {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon#add adding} a view to a panel.\n *\n * From the implementation point of view, the contextual ballon plugin is reusing a single\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} instance to display multiple contextual balloon\n * panels in the editor. It also creates a special {@link module:ui/panel/balloon/contextualballoon~RotatorView rotator view},\n * used to manage multiple panel stacks. Rotator view is a child of the balloon panel view and the parent of the specific\n * view you want to display. If there is more than one panel stack to be displayed, the rotator view will add a\n * navigation bar. If there is only one stack, the rotator view is transparent (it does not add any UI elements).\n */\nexport default class ContextualBalloon extends Plugin {\n\t/**\n\t * The {@link module:utils/dom/position~Options#limiter position limiter}\n\t * for the {@link #view balloon}, used when no `limiter` has been passed into {@link #add}\n\t * or {@link #updatePosition}.\n\t *\n\t * By default, a function that obtains the farthest DOM\n\t * {@link module:engine/view/rooteditableelement~RootEditableElement}\n\t * of the {@link module:engine/view/document~Document#selection}.\n\t */\n\tpublic positionLimiter: PositionOptions[ 'limiter' ];\n\n\tpublic visibleStack?: string;\n\n\t/**\n\t * The currently visible view or `null` when there are no views in any stack.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public visibleView: View | null;\n\n\t/**\n\t * A total number of all stacks in the balloon.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _numberOfStacks: number;\n\n\t/**\n\t * A flag that controls the single view mode.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _singleViewMode: boolean;\n\n\t/**\n\t * The map of views and their stacks.\n\t */\n\tprivate _viewToStack = new Map();\n\n\t/**\n\t * The map of IDs and stacks.\n\t */\n\tprivate _idToStack = new Map();\n\n\t/**\n\t * The common balloon panel view.\n\t */\n\tprivate _view: BalloonPanelView | null = null;\n\n\t/**\n\t * Rotator view embedded in the contextual balloon.\n\t * Displays the currently visible view in the balloon and provides navigation for switching stacks.\n\t */\n\tprivate _rotatorView: RotatorView | null = null;\n\n\t/**\n\t * Displays fake panels under the balloon panel view when multiple stacks are added to the balloon.\n\t */\n\tprivate _fakePanelsView: FakePanelsView | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ContextualBalloon' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.positionLimiter = () => {\n\t\t\tconst view = this.editor.editing.view;\n\t\t\tconst viewDocument = view.document;\n\t\t\tconst editableElement = viewDocument.selection.editableElement;\n\n\t\t\tif ( editableElement ) {\n\t\t\t\treturn view.domConverter.mapViewToDom( editableElement.root ) as HTMLElement;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\n\t\tthis.set( 'visibleView', null );\n\t\tthis.set( '_numberOfStacks', 0 );\n\t\tthis.set( '_singleViewMode', false );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tif ( this._view ) {\n\t\t\tthis._view.destroy();\n\t\t}\n\n\t\tif ( this._rotatorView ) {\n\t\t\tthis._rotatorView.destroy();\n\t\t}\n\n\t\tif ( this._fakePanelsView ) {\n\t\t\tthis._fakePanelsView.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * The common balloon panel view.\n\t */\n\tpublic get view(): BalloonPanelView {\n\t\tif ( !this._view ) {\n\t\t\tthis._createPanelView();\n\t\t}\n\n\t\treturn this._view!;\n\t}\n\n\t/**\n\t * Returns `true` when the given view is in one of the stacks. Otherwise returns `false`.\n\t */\n\tpublic hasView( view: View ): boolean {\n\t\treturn Array.from( this._viewToStack.keys() ).includes( view );\n\t}\n\n\t/**\n\t * Adds a new view to the stack and makes it visible if the current stack is visible\n\t * or it is the first view in the balloon.\n\t *\n\t * @param data The configuration of the view.\n\t * @param data.stackId The ID of the stack that the view is added to. Defaults to `'main'`.\n\t * @param data.view The content of the balloon.\n\t * @param data.position Positioning options.\n\t * @param data.balloonClassName An additional CSS class added to the {@link #view balloon} when visible.\n\t * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow. Defaults to `true`.\n\t * @param data.singleViewMode Whether the view should be the only visible view even if other stacks were added. Defaults to `false`.\n\t */\n\tpublic add( data: ViewConfiguration ): void {\n\t\tif ( !this._view ) {\n\t\t\tthis._createPanelView();\n\t\t}\n\n\t\tif ( this.hasView( data.view ) ) {\n\t\t\t/**\n\t\t\t * Trying to add configuration of the same view more than once.\n\t\t\t *\n\t\t\t * @error contextualballoon-add-view-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'contextualballoon-add-view-exist',\n\t\t\t\t[ this, data ]\n\t\t\t);\n\t\t}\n\n\t\tconst stackId = data.stackId || 'main';\n\n\t\t// If new stack is added, creates it and show view from this stack.\n\t\tif ( !this._idToStack.has( stackId ) ) {\n\t\t\tthis._idToStack.set( stackId, new Map( [ [ data.view, data ] ] ) );\n\t\t\tthis._viewToStack.set( data.view, this._idToStack.get( stackId )! );\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\n\t\t\tif ( !this._visibleStack || data.singleViewMode ) {\n\t\t\t\tthis.showStack( stackId );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst stack = this._idToStack.get( stackId )!;\n\n\t\tif ( data.singleViewMode ) {\n\t\t\tthis.showStack( stackId );\n\t\t}\n\n\t\t// Add new view to the stack.\n\t\tstack.set( data.view, data );\n\t\tthis._viewToStack.set( data.view, stack );\n\n\t\t// And display it if is added to the currently visible stack.\n\t\tif ( stack === this._visibleStack ) {\n\t\t\tthis._showView( data );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given view from the stack. If the removed view was visible,\n\t * the view preceding it in the stack will become visible instead.\n\t * When there is no view in the stack, the next stack will be displayed.\n\t * When there are no more stacks, the balloon will hide.\n\t *\n\t * @param view A view to be removed from the balloon.\n\t */\n\tpublic remove( view: View ): void {\n\t\tif ( !this.hasView( view ) ) {\n\t\t\t/**\n\t\t\t * Trying to remove the configuration of the view not defined in the stack.\n\t\t\t *\n\t\t\t * @error contextualballoon-remove-view-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'contextualballoon-remove-view-not-exist',\n\t\t\t\t[ this, view ]\n\t\t\t);\n\t\t}\n\n\t\tconst stack = this._viewToStack.get( view )!;\n\n\t\tif ( this._singleViewMode && this.visibleView === view ) {\n\t\t\tthis._singleViewMode = false;\n\t\t}\n\n\t\t// When visible view will be removed we need to show a preceding view or next stack\n\t\t// if a view is the only view in the stack.\n\t\tif ( this.visibleView === view ) {\n\t\t\tif ( stack.size === 1 ) {\n\t\t\t\tif ( this._idToStack.size > 1 ) {\n\t\t\t\t\tthis._showNextStack();\n\t\t\t\t} else {\n\t\t\t\t\tthis.view.hide();\n\t\t\t\t\tthis.visibleView = null;\n\t\t\t\t\tthis._rotatorView!.hideView();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._showView( Array.from( stack.values() )[ stack.size - 2 ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( stack.size === 1 ) {\n\t\t\tthis._idToStack.delete( this._getStackId( stack ) );\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\t\t} else {\n\t\t\tstack.delete( view );\n\t\t}\n\n\t\tthis._viewToStack.delete( view );\n\t}\n\n\t/**\n\t * Updates the position of the balloon using the position data of the first visible view in the stack.\n\t * When new position data is given, the position data of the currently visible view will be updated.\n\t *\n\t * @param position Position options.\n\t */\n\tpublic updatePosition( position?: Partial ): void {\n\t\tif ( position ) {\n\t\t\tthis._visibleStack.get( this.visibleView! )!.position = position;\n\t\t}\n\n\t\tthis.view.pin( this._getBalloonPosition()! );\n\t\tthis._fakePanelsView!.updatePosition();\n\t}\n\n\t/**\n\t * Shows the last view from the stack of a given ID.\n\t */\n\tpublic showStack( id: string ): void {\n\t\tthis.visibleStack = id;\n\t\tconst stack = this._idToStack.get( id );\n\n\t\tif ( !stack ) {\n\t\t\t/**\n\t\t\t * Trying to show a stack that does not exist.\n\t\t\t *\n\t\t\t * @error contextualballoon-showstack-stack-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'contextualballoon-showstack-stack-not-exist',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tif ( this._visibleStack === stack ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showView( Array.from( stack.values() ).pop()! );\n\t}\n\n\t/**\n\t * Initializes view instances.\n\t */\n\tprivate _createPanelView(): void {\n\t\tthis._view = new BalloonPanelView( this.editor.locale );\n\n\t\tthis.editor.ui.view.body.add( this._view );\n\t\tthis.editor.ui.focusTracker.add( this._view.element! );\n\n\t\tthis._rotatorView = this._createRotatorView();\n\t\tthis._fakePanelsView = this._createFakePanelsView();\n\t}\n\n\t/**\n\t * Returns the stack of the currently visible view.\n\t */\n\tprivate get _visibleStack() {\n\t\treturn this._viewToStack.get( this.visibleView! )!;\n\t}\n\n\t/**\n\t * Returns the ID of the given stack.\n\t */\n\tprivate _getStackId( stack: Stack ) {\n\t\tconst entry = Array.from( this._idToStack.entries() ).find( entry => entry[ 1 ] === stack )!;\n\n\t\treturn entry[ 0 ];\n\t}\n\n\t/**\n\t * Shows the last view from the next stack.\n\t */\n\tprivate _showNextStack() {\n\t\tconst stacks = Array.from( this._idToStack.values() );\n\n\t\tlet nextIndex = stacks.indexOf( this._visibleStack ) + 1;\n\n\t\tif ( !stacks[ nextIndex ] ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\n\t\tthis.showStack( this._getStackId( stacks[ nextIndex ] ) );\n\t}\n\n\t/**\n\t * Shows the last view from the previous stack.\n\t */\n\tprivate _showPrevStack() {\n\t\tconst stacks = Array.from( this._idToStack.values() );\n\n\t\tlet nextIndex = stacks.indexOf( this._visibleStack ) - 1;\n\n\t\tif ( !stacks[ nextIndex ] ) {\n\t\t\tnextIndex = stacks.length - 1;\n\t\t}\n\n\t\tthis.showStack( this._getStackId( stacks[ nextIndex ] ) );\n\t}\n\n\t/**\n\t * Creates a rotator view.\n\t */\n\tprivate _createRotatorView() {\n\t\tconst view = new RotatorView( this.editor.locale );\n\t\tconst t = this.editor.locale.t;\n\n\t\tthis.view.content.add( view );\n\n\t\t// Hide navigation when there is only a one stack & not in single view mode.\n\t\tview.bind( 'isNavigationVisible' ).to( this, '_numberOfStacks', this, '_singleViewMode', ( value, isSingleViewMode ) => {\n\t\t\treturn !isSingleViewMode && value > 1;\n\t\t} );\n\n\t\t// Update balloon position after toggling navigation.\n\t\tview.on( 'change:isNavigationVisible', () => ( this.updatePosition() ), { priority: 'low' } );\n\n\t\t// Update stacks counter value.\n\t\tview.bind( 'counter' ).to( this, 'visibleView', this, '_numberOfStacks', ( visibleView, numberOfStacks ) => {\n\t\t\tif ( numberOfStacks < 2 ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst current = Array.from( this._idToStack.values() ).indexOf( this._visibleStack ) + 1;\n\n\t\t\treturn t( '%0 of %1', [ current, numberOfStacks ] );\n\t\t} );\n\n\t\tview.buttonNextView.on( 'execute', () => {\n\t\t\t// When current view has a focus then move focus to the editable before removing it,\n\t\t\t// otherwise editor will lost focus.\n\t\t\tif ( view.focusTracker.isFocused ) {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t}\n\n\t\t\tthis._showNextStack();\n\t\t} );\n\n\t\tview.buttonPrevView.on( 'execute', () => {\n\t\t\t// When current view has a focus then move focus to the editable before removing it,\n\t\t\t// otherwise editor will lost focus.\n\t\t\tif ( view.focusTracker.isFocused ) {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t}\n\n\t\t\tthis._showPrevStack();\n\t\t} );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Creates a fake panels view.\n\t */\n\tprivate _createFakePanelsView() {\n\t\tconst view = new FakePanelsView( this.editor.locale, this.view );\n\n\t\tview.bind( 'numberOfPanels' ).to( this, '_numberOfStacks', this, '_singleViewMode', ( number, isSingleViewMode ) => {\n\t\t\tconst showPanels = !isSingleViewMode && number >= 2;\n\n\t\t\treturn showPanels ? Math.min( number - 1, 2 ) : 0;\n\t\t} );\n\n\t\tview.listenTo( this.view, 'change:top', () => view.updatePosition() );\n\t\tview.listenTo( this.view, 'change:left', () => view.updatePosition() );\n\n\t\tthis.editor.ui.view.body.add( view );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Sets the view as the content of the balloon and attaches the balloon using position\n\t * options of the first view.\n\t *\n\t * @param data Configuration.\n\t * @param data.view The view to show in the balloon.\n\t * @param data.balloonClassName Additional class name which will be added to the {@link #view balloon}.\n\t * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow.\n\t */\n\tprivate _showView( { view, balloonClassName = '', withArrow = true, singleViewMode = false }: ViewConfiguration ) {\n\t\tthis.view.class = balloonClassName;\n\t\tthis.view.withArrow = withArrow;\n\n\t\tthis._rotatorView!.showView( view );\n\t\tthis.visibleView = view;\n\t\tthis.view.pin( this._getBalloonPosition()! );\n\t\tthis._fakePanelsView!.updatePosition();\n\n\t\tif ( singleViewMode ) {\n\t\t\tthis._singleViewMode = true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns position options of the last view in the stack.\n\t * This keeps the balloon in the same position when the view is changed.\n\t */\n\tprivate _getBalloonPosition() {\n\t\tlet position = Array.from( this._visibleStack.values() ).pop()!.position;\n\n\t\tif ( position ) {\n\t\t\t// Use the default limiter if none has been specified.\n\t\t\tif ( !position.limiter ) {\n\t\t\t\t// Don't modify the original options object.\n\t\t\t\tposition = Object.assign( {}, position, {\n\t\t\t\t\tlimiter: this.positionLimiter\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Don't modify the original options object.\n\t\t\tposition = Object.assign( {}, position, {\n\t\t\t\tviewportOffsetConfig: this.editor.ui.viewportOffset\n\t\t\t} );\n\t\t}\n\n\t\treturn position;\n\t}\n}\n\n/**\n * The configuration of the view.\n */\nexport interface ViewConfiguration {\n\n\t/**\n\t * The ID of the stack that the view is added to.\n\t *\n\t * @default 'main'\n\t */\n\tstackId?: string;\n\n\t/**\n\t * The content of the balloon.\n\t */\n\tview: View;\n\n\t/**\n\t * Positioning options.\n\t */\n\tposition?: Partial;\n\n\t/**\n\t * An additional CSS class added to the {@link #view balloon} when visible.\n\t */\n\tballoonClassName?: string;\n\n\t/**\n\t * Whether the {@link #view balloon} should be rendered with an arrow.\n\t *\n\t * @default true\n\t */\n\twithArrow?: boolean;\n\n\t/**\n\t * Whether the view should be the only visible view even if other stacks were added.\n\t *\n\t * @default false\n\t */\n\tsingleViewMode?: boolean;\n}\n\ntype Stack = Map;\n\n/**\n * Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.\n * It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.\n * See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.\n */\nexport class RotatorView extends View {\n\t/**\n\t * Used for checking if a view is focused or not.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Navigation button for switching the stack to the previous one.\n\t */\n\tpublic readonly buttonPrevView: ButtonView;\n\n\t/**\n\t * Navigation button for switching the stack to the next one.\n\t */\n\tpublic readonly buttonNextView: ButtonView;\n\n\t/**\n\t * A collection of the child views that creates the rotator content.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * Defines whether navigation is visible or not.\n\t *\n\t * @observable\n\t */\n\tdeclare public isNavigationVisible: boolean;\n\n\t/**\n\t * @observable\n\t */\n\tdeclare public counter: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isNavigationVisible', true );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.buttonPrevView = this._createButtonView( t( 'Previous' ), icons.previousArrow );\n\t\tthis.buttonNextView = this._createButtonView( t( 'Next' ), icons.nextArrow );\n\t\tthis.content = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-balloon-rotator'\n\t\t\t\t],\n\t\t\t\t'z-index': '-1'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck-balloon-rotator__navigation',\n\t\t\t\t\t\t\tbind.to( 'isNavigationVisible', value => value ? '' : 'ck-hidden' )\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tthis.buttonPrevView,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttag: 'span',\n\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t\t\t'ck-balloon-rotator__counter'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttext: bind.to( 'counter' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t},\n\t\t\t\t\t\tthis.buttonNextView\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-balloon-rotator__content'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.content\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t}\n\n\t/**\n\t * Shows a given view.\n\t *\n\t * @param view The view to show.\n\t */\n\tpublic showView( view: View ): void {\n\t\tthis.hideView();\n\t\tthis.content.add( view );\n\t}\n\n\t/**\n\t * Hides the currently displayed view.\n\t */\n\tpublic hideView(): void {\n\t\tthis.content.clear();\n\t}\n\n\t/**\n\t * Creates a navigation button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t */\n\tprivate _createButtonView( label: string, icon: string ) {\n\t\tconst view = new ButtonView( this.locale );\n\n\t\tview.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\treturn view;\n\t}\n}\n\n/**\n * Displays additional layers under the balloon when multiple stacks are added to the balloon.\n */\nclass FakePanelsView extends View {\n\t/**\n\t * Collection of the child views which creates fake panel content.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * Fake panels top offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public top: number;\n\n\t/**\n\t * Fake panels left offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public left: number;\n\n\t/**\n\t * Fake panels height.\n\t *\n\t * @observable\n\t */\n\tdeclare public height: number;\n\n\t/**\n\t * Fake panels width.\n\t *\n\t * @observable\n\t */\n\tdeclare public width: number;\n\n\t/**\n\t * Number of rendered fake panels.\n\t *\n\t * @observable\n\t */\n\tdeclare public numberOfPanels: number;\n\n\t/**\n\t * Context.\n\t */\n\tprivate readonly _balloonPanelView: BalloonPanelView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, balloonPanelView: BalloonPanelView ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'top', 0 );\n\t\tthis.set( 'left', 0 );\n\t\tthis.set( 'height', 0 );\n\t\tthis.set( 'width', 0 );\n\t\tthis.set( 'numberOfPanels', 0 );\n\n\t\tthis.content = this.createCollection();\n\t\tthis._balloonPanelView = balloonPanelView;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-fake-panel',\n\t\t\t\t\tbind.to( 'numberOfPanels', number => number ? '' : 'ck-hidden' )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to( 'top', toPx ),\n\t\t\t\t\tleft: bind.to( 'left', toPx ),\n\t\t\t\t\twidth: bind.to( 'width', toPx ),\n\t\t\t\t\theight: bind.to( 'height', toPx )\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t} );\n\n\t\tthis.on>( 'change:numberOfPanels', ( evt, name, next, prev ) => {\n\t\t\tif ( next > prev ) {\n\t\t\t\tthis._addPanels( next - prev );\n\t\t\t} else {\n\t\t\t\tthis._removePanels( prev - next );\n\t\t\t}\n\n\t\t\tthis.updatePosition();\n\t\t} );\n\t}\n\n\tprivate _addPanels( number: number ) {\n\t\twhile ( number-- ) {\n\t\t\tconst view = new View();\n\n\t\t\tview.setTemplate( { tag: 'div' } );\n\n\t\t\tthis.content.add( view );\n\t\t\tthis.registerChild( view );\n\t\t}\n\t}\n\n\tprivate _removePanels( number: number ) {\n\t\twhile ( number-- ) {\n\t\t\tconst view = this.content.last!;\n\n\t\t\tthis.content.remove( view );\n\t\t\tthis.deregisterChild( view );\n\t\t\tview.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Updates coordinates of fake panels.\n\t */\n\tpublic updatePosition() {\n\t\tif ( this.numberOfPanels ) {\n\t\t\tconst { top, left } = this._balloonPanelView;\n\t\t\tconst { width, height } = new Rect( this._balloonPanelView.element! );\n\n\t\t\tObject.assign( this, { top, left, width, height } );\n\t\t}\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./stickypanel.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/**\n * @module ui/panel/sticky/stickypanelview\n */\n\nimport View from '../../view.js';\nimport Template from '../../template.js';\n\nimport type ViewCollection from '../../viewcollection.js';\n\nimport {\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\tglobal,\n\ttoUnit,\n\tRect\n} from '@ckeditor/ckeditor5-utils';\n\n// @if CK_DEBUG_STICKYPANEL // const {\n// @if CK_DEBUG_STICKYPANEL // \tdefault: RectDrawer,\n// @if CK_DEBUG_STICKYPANEL // \tdiagonalStylesBlack\n// @if CK_DEBUG_STICKYPANEL // } = require( '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer' );\n\nimport '../../../theme/components/panel/stickypanel.css';\n\nconst toPx = toUnit( 'px' );\n\n/**\n * The sticky panel view class.\n */\nexport default class StickyPanelView extends View {\n\t/**\n\t * Collection of the child views which creates balloon panel contents.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * Controls whether the sticky panel should be active.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isActive: boolean;\n\n\t/**\n\t * Controls whether the sticky panel is in the \"sticky\" state.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isSticky: boolean;\n\n\t/**\n\t * The limiter element for the sticky panel instance. Its bounding rect limits\n\t * the \"stickyness\" of the panel, i.e. when the panel reaches the bottom\n\t * edge of the limiter, it becomes sticky to that edge and does not float\n\t * off the limiter. It is mandatory for the panel to work properly and once\n\t * set, it cannot be changed.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public limiterElement: HTMLElement | null;\n\n\t/**\n\t * The offset from the bottom edge of {@link #limiterElement}\n\t * which stops the panel from stickying any further to prevent limiter's content\n\t * from being completely covered.\n\t *\n\t * @readonly\n\t * @observable\n\t * @default 50\n\t */\n\tdeclare public limiterBottomOffset: number;\n\n\t/**\n\t * The offset from the top edge of the web browser's viewport which makes the\n\t * panel become sticky. The default value is `0`, which means the panel becomes\n\t * sticky when it's upper edge touches the top of the page viewport.\n\t *\n\t * This attribute is useful when the web page has UI elements positioned to the top\n\t * either using `position: fixed` or `position: sticky`, which would cover the\n\t * sticky panel or vice–versa (depending on the `z-index` hierarchy).\n\t *\n\t * Bound to {@link module:ui/editorui/editorui~EditorUI#viewportOffset `EditorUI#viewportOffset`}.\n\t *\n\t * If {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset.top`} is defined, then\n\t * it will override the default value.\n\t *\n\t * @observable\n\t * @default 0\n\t */\n\tdeclare public viewportTopOffset: number;\n\n\t/**\n\t * The panel which accepts children into {@link #content} collection.\n\t * Also an element which is positioned when {@link #isSticky}.\n\t */\n\tpublic contentPanelElement: HTMLElement;\n\n\t/**\n\t * Controls the `margin-left` CSS style of the panel.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _marginLeft: string | null;\n\n\t/**\n\t * Set `true` if the sticky panel reached the bottom edge of the\n\t * {@link #limiterElement}.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _isStickyToTheBottomOfLimiter: boolean;\n\n\t/**\n\t * The `top` CSS position of the panel when it is sticky to the top of the viewport or scrollable\n\t * ancestors of the {@link #limiterElement}.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _stickyTopOffset: number | null;\n\n\t/**\n\t * The `bottom` CSS position of the panel when it is sticky to the bottom of the {@link #limiterElement}.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _stickyBottomOffset: number | null;\n\n\t/**\n\t * A dummy element which visually fills the space as long as the\n\t * actual panel is sticky. It prevents flickering of the UI.\n\t */\n\tprivate _contentPanelPlaceholder: HTMLElement;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isActive', false );\n\t\tthis.set( 'isSticky', false );\n\t\tthis.set( 'limiterElement', null );\n\t\tthis.set( 'limiterBottomOffset', 50 );\n\t\tthis.set( 'viewportTopOffset', 0 );\n\n\t\tthis.set( '_marginLeft', null );\n\t\tthis.set( '_isStickyToTheBottomOfLimiter', false );\n\n\t\tthis.set( '_stickyTopOffset', null );\n\t\tthis.set( '_stickyBottomOffset', null );\n\n\t\tthis.content = this.createCollection();\n\n\t\tthis._contentPanelPlaceholder = new Template( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-sticky-panel__placeholder'\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: bind.to( 'isSticky', isSticky => isSticky ? 'block' : 'none' ),\n\t\t\t\t\theight: bind.to( 'isSticky', isSticky => {\n\t\t\t\t\t\treturn isSticky ? toPx( this._contentPanelRect.height ) : null;\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t}\n\t\t} ).render() as HTMLElement;\n\n\t\tthis.contentPanelElement = new Template( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-sticky-panel__content',\n\t\t\t\t\t// Toggle class of the panel when \"sticky\" state changes in the view.\n\t\t\t\t\tbind.if( 'isSticky', 'ck-sticky-panel__content_sticky' ),\n\t\t\t\t\tbind.if( '_isStickyToTheBottomOfLimiter', 'ck-sticky-panel__content_sticky_bottom-limit' )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: bind.to( 'isSticky', isSticky => {\n\t\t\t\t\t\treturn isSticky ? toPx( this._contentPanelPlaceholder.getBoundingClientRect().width ) : null;\n\t\t\t\t\t} ),\n\n\t\t\t\t\ttop: bind.to( '_stickyTopOffset', value => value ? toPx( value ) : value ),\n\t\t\t\t\tbottom: bind.to( '_stickyBottomOffset', value => value ? toPx( value ) : value ),\n\n\t\t\t\t\tmarginLeft: bind.to( '_marginLeft' )\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tchildren: this.content\n\t\t} ).render() as HTMLElement;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-sticky-panel'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis._contentPanelPlaceholder,\n\t\t\t\tthis.contentPanelElement\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Check if the panel should go into the sticky state immediately.\n\t\tthis.checkIfShouldBeSticky();\n\n\t\t// Update sticky state of the panel as the window and ancestors are being scrolled.\n\t\tthis.listenTo( global.document, 'scroll', () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t}, { useCapture: true } );\n\n\t\t// Synchronize with `model.isActive` because sticking an inactive panel is pointless.\n\t\tthis.listenTo( this, 'change:isActive', () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t} );\n\t}\n\n\t/**\n\t * Analyzes the environment to decide whether the panel should be sticky or not.\n\t * Then handles the positioning of the panel.\n\t */\n\tpublic checkIfShouldBeSticky(): void {\n\t\t// @if CK_DEBUG_STICKYPANEL // RectDrawer.clear();\n\n\t\tif ( !this.limiterElement || !this.isActive ) {\n\t\t\tthis._unstick();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst limiterRect = new Rect( this.limiterElement );\n\n\t\tlet visibleLimiterRect = limiterRect.getVisible();\n\n\t\tif ( visibleLimiterRect ) {\n\t\t\tconst windowRect = new Rect( global.window );\n\n\t\t\twindowRect.top += this.viewportTopOffset;\n\t\t\twindowRect.height -= this.viewportTopOffset;\n\n\t\t\tvisibleLimiterRect = visibleLimiterRect.getIntersection( windowRect );\n\t\t}\n\n\t\t// @if CK_DEBUG_STICKYPANEL // if ( visibleLimiterRect ) {\n\t\t// @if CK_DEBUG_STICKYPANEL // \tRectDrawer.draw( visibleLimiterRect,\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t{ outlineWidth: '3px', opacity: '.8', outlineColor: 'red', outlineOffset: '-3px' },\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t'Visible anc'\n\t\t// @if CK_DEBUG_STICKYPANEL // \t);\n\t\t// @if CK_DEBUG_STICKYPANEL // }\n\t\t// @if CK_DEBUG_STICKYPANEL //\n\t\t// @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( limiterRect,\n\t\t// @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '3px', opacity: '.8', outlineColor: 'green', outlineOffset: '-3px' },\n\t\t// @if CK_DEBUG_STICKYPANEL // \t'Limiter'\n\t\t// @if CK_DEBUG_STICKYPANEL // );\n\n\t\t// Stick the panel only if\n\t\t// * the limiter's ancestors are intersecting with each other so that some of their rects are visible,\n\t\t// * and the limiter's top edge is above the visible ancestors' top edge.\n\t\tif ( visibleLimiterRect && limiterRect.top < visibleLimiterRect.top ) {\n\t\t\t// @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( visibleLimiterRect,\n\t\t\t// @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '3px', opacity: '.8', outlineColor: 'fuchsia', outlineOffset: '-3px',\n\t\t\t// @if CK_DEBUG_STICKYPANEL // \t\tbackgroundColor: 'rgba(255, 0, 255, .3)' },\n\t\t\t// @if CK_DEBUG_STICKYPANEL // \t'Visible limiter'\n\t\t\t// @if CK_DEBUG_STICKYPANEL // );\n\n\t\t\tconst visibleLimiterTop = visibleLimiterRect.top;\n\n\t\t\t// Check if there's a change the panel can be sticky to the bottom of the limiter.\n\t\t\tif ( visibleLimiterTop + this._contentPanelRect.height + this.limiterBottomOffset > visibleLimiterRect.bottom ) {\n\t\t\t\tconst stickyBottomOffset = Math.max( limiterRect.bottom - visibleLimiterRect.bottom, 0 ) + this.limiterBottomOffset;\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // const stickyBottomOffsetRect = new Rect( {\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \ttop: limiterRect.bottom - stickyBottomOffset, left: 0, right: 2000,\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \tbottom: limiterRect.bottom - stickyBottomOffset, width: 2000, height: 1\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // } );\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( stickyBottomOffsetRect,\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '1px', opacity: '.8', outlineColor: 'black' },\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \t'Sticky bottom offset'\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // );\n\n\t\t\t\t// Check if sticking the panel to the bottom of the limiter does not cause it to suddenly\n\t\t\t\t// move upwards if there's not enough space for it.\n\t\t\t\tif ( limiterRect.bottom - stickyBottomOffset > limiterRect.top + this._contentPanelRect.height ) {\n\t\t\t\t\tthis._stickToBottomOfLimiter( stickyBottomOffset );\n\t\t\t\t} else {\n\t\t\t\t\tthis._unstick();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( this._contentPanelRect.height + this.limiterBottomOffset < limiterRect.height ) {\n\t\t\t\t\tthis._stickToTopOfAncestors( visibleLimiterTop );\n\t\t\t\t} else {\n\t\t\t\t\tthis._unstick();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis._unstick();\n\t\t}\n\n\t\t// @if CK_DEBUG_STICKYPANEL // console.clear();\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( 'isSticky', this.isSticky );\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( '_isStickyToTheBottomOfLimiter', this._isStickyToTheBottomOfLimiter );\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( '_stickyTopOffset', this._stickyTopOffset );\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( '_stickyBottomOffset', this._stickyBottomOffset );\n\t\t// @if CK_DEBUG_STICKYPANEL // if ( visibleLimiterRect ) {\n\t\t// @if CK_DEBUG_STICKYPANEL // \tRectDrawer.draw( visibleLimiterRect,\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t{ ...diagonalStylesBlack,\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t\toutlineWidth: '3px', opacity: '.8', outlineColor: 'orange', outlineOffset: '-3px',\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t\tbackgroundColor: 'rgba(0, 0, 255, .2)' },\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t'visibleLimiterRect'\n\t\t// @if CK_DEBUG_STICKYPANEL // \t);\n\t\t// @if CK_DEBUG_STICKYPANEL // }\n\t}\n\n\t/**\n\t * Sticks the panel at the given CSS `top` offset.\n\t *\n\t * @private\n\t * @param topOffset\n\t */\n\tprivate _stickToTopOfAncestors( topOffset: number ) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = topOffset;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = toPx( -global.window.scrollX );\n\t}\n\n\t/**\n\t * Sticks the panel at the bottom of the limiter with a given CSS `bottom` offset.\n\t *\n\t * @private\n\t * @param stickyBottomOffset\n\t */\n\tprivate _stickToBottomOfLimiter( stickyBottomOffset: number ) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = true;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = stickyBottomOffset;\n\t\tthis._marginLeft = toPx( -global.window.scrollX );\n\t}\n\n\t/**\n\t * Unsticks the panel putting it back to its original position.\n\t *\n\t * @private\n\t */\n\tprivate _unstick() {\n\t\tthis.isSticky = false;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = null;\n\t}\n\n\t/**\n\t * Returns the bounding rect of the {@link #contentPanelElement}.\n\t *\n\t * @private\n\t */\n\tprivate get _contentPanelRect(): Rect {\n\t\treturn new Rect( this.contentPanelElement );\n\t}\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/**\n * @module ui/search/text/searchtextqueryview\n */\n\nimport ButtonView from '../../button/buttonview.js';\nimport IconView from '../../icon/iconview.js';\nimport LabeledFieldView, { type LabeledFieldViewCreator } from '../../labeledfield/labeledfieldview.js';\nimport { createLabeledInputText } from '../../labeledfield/utils.js';\nimport type InputBase from '../../input/inputbase.js';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { icons } from '@ckeditor/ckeditor5-core';\n\n/**\n * A search input field for the {@link module:ui/search/text/searchtextview~SearchTextView} component.\n *\n * @internal\n * @extends module:ui/labeledfield/labeledfieldview~LabeledFieldView\n */\nexport default class SearchTextQueryView<\n\tTQueryFieldView extends InputBase\n> extends LabeledFieldView {\n\t/**\n\t * The loupe icon displayed next to the {@link #fieldView}.\n\t */\n\tpublic iconView?: IconView;\n\n\t/**\n\t * The button that clears and focuses the {@link #fieldView}.\n\t */\n\tpublic resetButtonView?: ButtonView;\n\n\t/**\n\t * A reference to the view configuration.\n\t */\n\tprivate readonly _viewConfig: SearchTextQueryViewConfig;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, config: SearchTextQueryViewConfig ) {\n\t\tconst t = locale.t;\n\t\tconst viewConfig = Object.assign( {}, {\n\t\t\tshowResetButton: true,\n\t\t\tshowIcon: true,\n\t\t\tcreator: createLabeledInputText\n\t\t}, config );\n\n\t\tsuper( locale, viewConfig.creator as any );\n\n\t\tthis.label = config.label;\n\t\tthis._viewConfig = viewConfig;\n\n\t\tif ( this._viewConfig.showIcon ) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = icons.loupe;\n\t\t\tthis.fieldWrapperChildren.add( this.iconView, 0 );\n\n\t\t\tthis.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-search__query_with-icon'\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tif ( this._viewConfig.showResetButton ) {\n\t\t\tthis.resetButtonView = new ButtonView( locale );\n\t\t\tthis.resetButtonView.set( {\n\t\t\t\tlabel: t( 'Clear' ),\n\t\t\t\ticon: icons.cancel,\n\t\t\t\tclass: 'ck-search__reset',\n\t\t\t\tisVisible: false,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tthis.resetButtonView.on( 'execute', () => {\n\t\t\t\tthis.reset();\n\t\t\t\tthis.focus();\n\t\t\t\tthis.fire( 'reset' );\n\t\t\t} );\n\n\t\t\tthis.resetButtonView.bind( 'isVisible' ).to( this.fieldView, 'isEmpty', isEmpty => !isEmpty );\n\n\t\t\tthis.fieldWrapperChildren.add( this.resetButtonView );\n\n\t\t\tthis.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-search__query_with-reset'\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Resets the search field to its default state.\n\t */\n\tpublic reset(): void {\n\t\tthis.fieldView.reset();\n\n\t\tif ( this._viewConfig.showResetButton ) {\n\t\t\tthis.resetButtonView!.isVisible = false;\n\t\t}\n\t}\n}\n\n/**\n * An event fired when the field is reset using the\n * {@link module:ui/search/text/searchtextqueryview~SearchTextQueryView#resetButtonView}.\n *\n * @eventName ~SearchTextQueryView#reset\n */\nexport type SearchTextQueryViewResetEvent = {\n\tname: 'reset';\n\targs: [];\n};\n\n/**\n * The configuration of the {@link module:ui/search/text/searchtextqueryview~SearchTextQueryView} view.\n */\nexport interface SearchTextQueryViewConfig> {\n\n\t/**\n\t * The human-readable label of the search field.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Determines whether the button that resets the search should be visible.\n\t *\n\t * @default true\n\t */\n\tshowResetButton?: boolean;\n\n\t/**\n\t * Determines whether the loupe icon should be visible.\n\t *\n\t * @default true\n\t */\n\tshowIcon?: boolean;\n\n\t/**\n\t * The function that creates the search field input view. By default, a plain\n\t * {@link module:ui/inputtext/inputtextview~InputTextView} is used for this purpose.\n\t */\n\tcreator?: LabeledFieldViewCreator;\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/**\n * @module ui/search/searchinfoview\n*/\n\nimport type { FocusableView } from '../focuscycler.js';\nimport View from '../view.js';\n\n/**\n * A view displaying an information text related to different states of {@link module:ui/search/text/searchtextview~SearchTextView}.\n *\n * @internal\n */\nexport default class SearchInfoView extends View implements FocusableView {\n\t/**\n\t * Controls whether the view is visible.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Controls the primary line of text in the info.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public primaryText: string;\n\n\t/**\n\t * Controls the secondary line of text in the info.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public secondaryText: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\tisVisible: false,\n\t\t\tprimaryText: '',\n\t\t\tsecondaryText: ''\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-search__info',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( 'primaryText' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( 'secondaryText' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the view\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\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/**\n * @module ui/search/searchresultsview\n */\n\nimport View from '../view.js';\nimport type ViewCollection from '../viewcollection.js';\nimport { FocusTracker, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { default as FocusCycler, type FocusableView } from '../focuscycler.js';\n\n/**\n * A sub-component of {@link module:ui/search/text/searchtextview~SearchTextView}. It hosts the filtered and the information views.\n */\nexport default class SearchResultsView extends View implements FocusableView {\n\t/**\n\t * Tracks information about the DOM focus in the view.\n\t *\n\t * @readonly\n\t */\n\tpublic focusTracker: FocusTracker;\n\n\t/**\n\t * The collection of the child views inside of the list item {@link #element}.\n\t *\n\t * @readonly\n\t */\n\tpublic children: ViewCollection;\n\n\t/**\n\t * Provides the focus management (keyboard navigation) in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusCycler: FocusCycler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-search__results'\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.children,\n\t\t\tfocusTracker: this.focusTracker\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tfor ( const child of this.children ) {\n\t\t\tthis.focusTracker.add( child.element! );\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the view.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the first child view.\n\t */\n\tpublic focusFirst(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the last child view.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focusCycler.focusLast();\n\t}\n}\n","import toString from './toString.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n}\n\nexport default escapeRegExp;\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./search.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/**\n * @module ui/search/text/searchtextview\n*/\n\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\nimport View from '../../view.js';\nimport { default as SearchTextQueryView, type SearchTextQueryViewConfig } from './searchtextqueryview.js';\nimport SearchInfoView from '../searchinfoview.js';\nimport SearchResultsView from '../searchresultsview.js';\nimport FocusCycler, { type FocusableView } from '../../focuscycler.js';\nimport { escapeRegExp } from 'lodash-es';\n\nimport type FilteredView from '../filteredview.js';\nimport type ViewCollection from '../../viewcollection.js';\nimport type InputBase from '../../input/inputbase.js';\nimport type InputTextView from '../../inputtext/inputtextview.js';\n\nimport '../../../theme/components/search/search.css';\n\n/**\n * A search component that allows filtering of an arbitrary view based on a search query\n * specified by the user in a text field.\n *\n *```ts\n * // This view must specify the `filter()` and `focus()` methods.\n * const filteredView = ...;\n *\n * const searchView = new SearchTextView( locale, {\n * \tsearchFieldLabel: 'Search list items',\n * \tfilteredView\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */\nexport default class SearchTextView<\n\tTQueryFieldView extends InputBase = InputTextView\n> extends View {\n\t/**\n\t * Tracks information about the DOM focus in the view.\n\t *\n\t * @readonly\n\t */\n\tpublic focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the keystroke handler managing user interaction and accessibility.\n\t *\n\t * @readonly\n\t */\n\tpublic keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A view hosting the {@link #filteredView} passed in the configuration and the {@link #infoView}.\n\t */\n\tpublic resultsView: SearchResultsView;\n\n\t/**\n\t * The view that is filtered by the search query.\n\t */\n\tpublic filteredView: FilteredView;\n\n\t/**\n\t * The view that displays the information about the search results.\n\t */\n\tpublic infoView: FocusableView | undefined;\n\n\t/**\n\t * The view that allows the user to enter the search query.\n\t */\n\tpublic queryView: SearchTextQueryView;\n\n\t/**\n\t * Controls whether the component is in read-only mode.\n\t *\n\t * @default true\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * The number of results found for the current search query. Updated upon the {@link #search} event.\n\t *\n\t * @default 0\n\t * @observable\n\t */\n\tdeclare public resultsCount: number;\n\n\t/**\n\t * The number of the items that can be searched in the {@link #filteredView}. Updated upon the {@link #search} event.\n\t *\n\t * @default 0\n\t * @observable\n\t */\n\tdeclare public totalItemsCount: number;\n\n\t/**\n\t * The collection of children of the view.\n\t *\n\t * @readonly\n\t */\n\tdeclare public readonly children: ViewCollection;\n\n\t/**\n\t * The collection of focusable children of the view. Used by the focus management logic.\n\t *\n\t * @readonly\n\t */\n\tdeclare public readonly focusableChildren: ViewCollection;\n\n\tpublic declare locale: Locale;\n\n\t/**\n\t * Provides the focus management (keyboard navigation) between {@link #queryView} and {@link #filteredView}.\n\t *\n\t * @readonly\n\t */\n\tpublic focusCycler: FocusCycler;\n\n\t/**\n\t * The cached configuration object.\n\t *\n\t * @internal\n\t */\n\tprotected _config: SearchTextViewConfig;\n\n\t/**\n\t * Creates an instance of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n\t *\n\t * @param locale The localization services instance.\n\t * @param config Configuration of the view.\n\t */\n\tconstructor( locale: Locale, config: SearchTextViewConfig ) {\n\t\tsuper( locale );\n\n\t\tthis._config = config;\n\n\t\tthis.filteredView = config.filteredView;\n\t\tthis.queryView = this._createSearchTextQueryView();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.resultsView = new SearchResultsView( locale );\n\t\tthis.children = this.createCollection();\n\t\tthis.focusableChildren = this.createCollection( [ this.queryView, this.resultsView ] );\n\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'resultsCount', 0 );\n\t\tthis.set( 'totalItemsCount', 0 );\n\n\t\tif ( config.infoView && config.infoView.instance ) {\n\t\t\tthis.infoView = config.infoView.instance;\n\t\t} else {\n\t\t\tthis.infoView = new SearchInfoView();\n\t\t\tthis._enableDefaultInfoViewBehavior();\n\n\t\t\tthis.on( 'render', () => {\n\t\t\t\t// Initial search that determines if there are any searchable items\n\t\t\t\t// and displays the corresponding info text.\n\t\t\t\tthis.search( '' );\n\t\t\t} );\n\t\t}\n\n\t\tthis.resultsView.children.addMany( [ this.infoView, this.filteredView ] );\n\n\t\tthis.focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.focusableChildren,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.on( 'search', ( evt, { resultsCount, totalItemsCount } ) => {\n\t\t\tthis.resultsCount = resultsCount;\n\t\t\tthis.totalItemsCount = totalItemsCount;\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-search',\n\t\t\t\t\tconfig.class || null\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.addMany( [\n\t\t\tthis.queryView,\n\t\t\tthis.resultsView\n\t\t] );\n\n\t\tconst stopPropagation = ( data: Event ) => data.stopPropagation();\n\n\t\tfor ( const focusableChild of this.focusableChildren ) {\n\t\t\tthis.focusTracker.add( focusableChild.element as Element );\n\t\t}\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element as HTMLElement );\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * Focuses the {@link #queryView}.\n\t */\n\tpublic focus(): void {\n\t\tthis.queryView.focus();\n\t}\n\n\t/**\n\t * Resets the component to its initial state.\n\t */\n\tpublic reset(): void {\n\t\tthis.queryView.reset();\n\t\tthis.search( '' );\n\t}\n\n\t/**\n\t * Searches the {@link #filteredView} for the given query.\n\t *\n\t * @internal\n\t * @param query The search query string.\n\t */\n\tpublic search( query: string ): void {\n\t\tconst regExp = query ? new RegExp( escapeRegExp( query ), 'ig' ) : null;\n\t\tconst filteringResults = this.filteredView.filter( regExp );\n\n\t\tthis.fire( 'search', { query, ...filteringResults } );\n\t}\n\n\t/**\n\t * Creates a search field view based on configured creator..\n\t */\n\tprivate _createSearchTextQueryView(): SearchTextQueryView {\n\t\tconst queryView = new SearchTextQueryView( this.locale, this._config.queryView );\n\n\t\tthis.listenTo( queryView.fieldView, 'input', () => {\n\t\t\tthis.search( queryView.fieldView.element!.value );\n\t\t} );\n\n\t\tqueryView.on( 'reset', () => this.reset() );\n\t\tqueryView.bind( 'isEnabled' ).to( this );\n\n\t\treturn queryView;\n\t}\n\n\t/**\n\t * Initializes the default {@link #infoView} behavior with default text labels when no custom info view\n\t * was specified in the view config.\n\t */\n\tprivate _enableDefaultInfoViewBehavior(): void {\n\t\tconst t = this.locale.t;\n\t\tconst infoView = this.infoView as SearchInfoView;\n\n\t\tthis.on( 'search', ( evt, data ) => {\n\t\t\tif ( !data.resultsCount ) {\n\t\t\t\tconst defaultTextConfig = this._config.infoView && this._config.infoView.text;\n\t\t\t\tlet primaryText, secondaryText;\n\n\t\t\t\tif ( data.totalItemsCount ) {\n\t\t\t\t\tif ( defaultTextConfig && defaultTextConfig.notFound ) {\n\t\t\t\t\t\tprimaryText = defaultTextConfig.notFound.primary;\n\t\t\t\t\t\tsecondaryText = defaultTextConfig.notFound.secondary;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprimaryText = t( 'No results found' );\n\t\t\t\t\t\tsecondaryText = '';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( defaultTextConfig && defaultTextConfig.noSearchableItems ) {\n\t\t\t\t\t\tprimaryText = defaultTextConfig.noSearchableItems.primary;\n\t\t\t\t\t\tsecondaryText = defaultTextConfig.noSearchableItems.secondary;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprimaryText = t( 'No searchable items' );\n\t\t\t\t\t\tsecondaryText = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tinfoView.set( {\n\t\t\t\t\tprimaryText: normalizeInfoText( primaryText, data ),\n\t\t\t\t\tsecondaryText: normalizeInfoText( secondaryText!, data ),\n\t\t\t\t\tisVisible: true\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tinfoView.set( {\n\t\t\t\t\tisVisible: false\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tfunction normalizeInfoText(\n\t\t\ttext: SearchTextViewDefaultInfoText,\n\t\t\t{ query, resultsCount, totalItemsCount }: SearchTextViewSearchEvent[ 'args' ][ 0 ]\n\t\t) {\n\t\t\treturn typeof text === 'function' ? text( query, resultsCount, totalItemsCount ) : text;\n\t\t}\n\t}\n}\n\n/**\n * The configuration of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n */\nexport interface SearchTextViewConfig> {\n\n\t/**\n\t * The configuration of the view's query field.\n\t */\n\tqueryView: SearchTextQueryViewConfig;\n\n\t/**\n\t * The view that is filtered by the search query.\n\t */\n\tfilteredView: FilteredView;\n\n\t/**\n\t * The view that displays the information about the search results.\n\t */\n\tinfoView?: {\n\n\t\t/**\n\t\t * The view that displays the information about the search results. If not specified,\n\t\t * {@link module:ui/search/searchinfoview~SearchInfoView} is used.\n\t\t */\n\t\tinstance?: FocusableView;\n\n\t\t/**\n\t\t * The configuration of text labels displayed in the {@link #infoView} in different states\n\t\t * of the search component.\n\t\t *\n\t\t * **Note**: This configuration is only used when the {@link #infoView} is **not** specified.\n\t\t * In other cases, please use the {@link module:ui/search/searchview~SearchTextViewSearchEvent} to bring about\n\t\t * your own info text logic.\n\t\t */\n\t\ttext?: {\n\t\t\tnotFound?: {\n\t\t\t\tprimary: SearchTextViewDefaultInfoText;\n\t\t\t\tsecondary?: SearchTextViewDefaultInfoText;\n\t\t\t};\n\t\t\tnoSearchableItems?: {\n\t\t\t\tprimary: SearchTextViewDefaultInfoText;\n\t\t\t\tsecondary?: SearchTextViewDefaultInfoText;\n\t\t\t};\n\t\t};\n\t};\n\n\t/**\n\t * The custom CSS class name to be added to the search view element.\n\t */\n\tclass?: string;\n}\n\n/**\n * Describes value of a info text configuration in {@link module:ui/search/text/searchtextview~SearchTextViewConfig}.\n * A string or a function that returns a string with the information about the search results.\n */\nexport type SearchTextViewDefaultInfoText = string | ( ( query: string, resultsCount: number, totalItemsCount: number ) => string );\n\n/**\n * An event fired when the search query changes fired by {@link module:ui/search/text/searchtextview~SearchTextView#search}.\n *\n * @eventName ~SearchTextView#search\n */\nexport type SearchTextViewSearchEvent = {\n\tname: 'search';\n\targs: [ SearchTextViewSearchEventData ];\n};\n\nexport type SearchTextViewSearchEventData = {\n\n\t/**\n\t * The search query string.\n\t */\n\tquery: string;\n\n\t/**\n\t * The number of results found for the current search query.\n\t */\n\tresultsCount: number;\n\n\t/**\n\t * The number of the items that can be searched.\n\t */\n\ttotalItemsCount: number;\n};\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./autocomplete.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/**\n * @module ui/autocomplete/autocompleteview\n*/\n\nimport { getOptimalPosition, type PositioningFunction, type Locale, global, toUnit, Rect } from '@ckeditor/ckeditor5-utils';\nimport SearchTextView, { type SearchTextViewConfig } from '../search/text/searchtextview.js';\nimport type SearchResultsView from '../search/searchresultsview.js';\nimport type InputBase from '../input/inputbase.js';\nimport type { FilteredViewExecuteEvent } from '../search/filteredview.js';\n\nimport '../../theme/components/autocomplete/autocomplete.css';\n\n/**\n * The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class\n * with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur\n * the component.\n */\nexport default class AutocompleteView<\n\tTQueryFieldView extends InputBase\n> extends SearchTextView {\n\t/**\n\t * The configuration of the autocomplete view.\n\t */\n\tprotected override _config: AutocompleteViewConfig;\n\n\tdeclare public resultsView: AutocompleteResultsView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, config: AutocompleteViewConfig ) {\n\t\tsuper( locale, config );\n\n\t\tthis._config = config;\n\n\t\tconst toPx = toUnit( 'px' );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-autocomplete' ]\n\t\t\t}\n\t\t} );\n\n\t\tconst bindResultsView = this.resultsView.bindTemplate;\n\n\t\tthis.resultsView.set( 'isVisible', false );\n\t\tthis.resultsView.set( '_position', 's' );\n\t\tthis.resultsView.set( '_width', 0 );\n\n\t\tthis.resultsView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\tbindResultsView.if( 'isVisible', 'ck-hidden', value => !value ),\n\t\t\t\t\tbindResultsView.to( '_position', value => `ck-search__results_${ value }` )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: bindResultsView.to( '_width', toPx )\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Update the visibility of the results view when the user focuses or blurs the component.\n\t\t// This is also integration for the `resetOnBlur` configuration.\n\t\tthis.focusTracker.on( 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tthis._updateResultsVisibility();\n\n\t\t\tif ( isFocused ) {\n\t\t\t\t// Reset the scroll position of the results view whenever the autocomplete reopens.\n\t\t\t\tthis.resultsView.element!.scrollTop = 0;\n\t\t\t} else if ( config.resetOnBlur ) {\n\t\t\t\tthis.queryView.reset();\n\t\t\t}\n\t\t} );\n\n\t\t// Update the visibility of the results view when the user types in the query field.\n\t\t// This is an integration for `queryMinChars` configuration.\n\t\t// This is an integration for search results changing length and the #resultsView requiring to be repositioned.\n\t\tthis.on( 'search', () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t} );\n\n\t\t// Hide the results view when the user presses the ESC key.\n\t\tthis.keystrokes.set( 'esc', ( evt, cancel ) => {\n\t\t\t// Let the DOM event pass through if the focus is in the query view.\n\t\t\tif ( !this.resultsView.isVisible ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Focus the query view first and only then close the results view. Otherwise, if the focus\n\t\t\t// was in the results view, it will get lost.\n\t\t\tthis.queryView.focus();\n\t\t\tthis.resultsView.isVisible = false;\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Update the position of the results view when the user scrolls the page.\n\t\t// TODO: This needs to be debounced down the road.\n\t\tthis.listenTo( global.document, 'scroll', () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t} );\n\n\t\t// Hide the results when the component becomes disabled.\n\t\tthis.on( 'change:isEnabled', () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t} );\n\n\t\t// Update the value of the query field when the user selects a result.\n\t\tthis.filteredView.on( 'execute', ( evt, { value } ) => {\n\t\t\t// Focus the query view first to avoid losing the focus.\n\t\t\tthis.focus();\n\n\t\t\t// Resetting the view will ensure that the #queryView will update its empty state correctly.\n\t\t\t// This prevents bugs related to dynamic labels or auto-grow when re-setting the same value\n\t\t\t// to #queryView.fieldView.value (which does not trigger empty state change) to an\n\t\t\t// #queryView.fieldView.element that has been changed by the user.\n\t\t\tthis.reset();\n\n\t\t\t// Update the value of the query field.\n\t\t\tthis.queryView.fieldView.value = this.queryView.fieldView.element!.value = value;\n\n\t\t\t// Finally, hide the results view. The focus has been moved earlier so this is safe.\n\t\t\tthis.resultsView.isVisible = false;\n\t\t} );\n\n\t\t// Update the position and width of the results view when it becomes visible.\n\t\tthis.resultsView.on( 'change:isVisible', () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t} );\n\t}\n\n\t/**\n\t * Updates the position of the results view on demand.\n\t */\n\tprivate _updateResultsViewWidthAndPosition() {\n\t\tif ( !this.resultsView.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resultsView._width = new Rect( this.queryView.fieldView.element! ).width;\n\n\t\tconst optimalResultsPosition = AutocompleteView._getOptimalPosition( {\n\t\t\telement: this.resultsView.element!,\n\t\t\ttarget: this.queryView.element!,\n\t\t\tfitInViewport: true,\n\t\t\tpositions: AutocompleteView.defaultResultsPositions\n\t\t} );\n\n\t\t// _getOptimalPosition will return null if there is no optimal position found (e.g. target is off the viewport).\n\t\tthis.resultsView._position = optimalResultsPosition ? optimalResultsPosition.name : 's';\n\t}\n\n\t/**\n\t * Updates the visibility of the results view on demand.\n\t */\n\tprivate _updateResultsVisibility() {\n\t\tconst queryMinChars = typeof this._config.queryMinChars === 'undefined' ? 0 : this._config.queryMinChars;\n\t\tconst queryLength = this.queryView.fieldView.element!.value.length;\n\n\t\tthis.resultsView.isVisible = this.focusTracker.isFocused && this.isEnabled && queryLength >= queryMinChars;\n\t}\n\n\t/**\n\t * Positions for the autocomplete results view. Two positions are defined by default:\n\t * * `s` - below the search field,\n\t * * `n` - above the search field.\n\t */\n\tpublic static defaultResultsPositions: Array = [\n\t\t( fieldRect => {\n\t\t\treturn {\n\t\t\t\ttop: fieldRect.bottom,\n\t\t\t\tleft: fieldRect.left,\n\t\t\t\tname: 's'\n\t\t\t};\n\t\t} ) as PositioningFunction,\n\t\t( ( fieldRect, resultsRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: fieldRect.top - resultsRect.height,\n\t\t\t\tleft: fieldRect.left,\n\t\t\t\tname: 'n'\n\t\t\t};\n\t\t} ) as PositioningFunction\n\t];\n\n\t/**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\n}\n\n/**\n * An interface describing additional properties of the floating search results view used by the autocomplete plugin.\n */\nexport interface AutocompleteResultsView extends SearchResultsView {\n\n\t/**\n\t * Controls the visibility of the results view.\n\t *\n\t * @observable\n\t */\n\tisVisible: boolean;\n\n\t/**\n\t * Controls the position (CSS class suffix) of the results view.\n\t *\n\t * @internal\n\t*/\n\t_position?: string;\n\n\t/**\n\t * The observable property determining the CSS width of the results view.\n\t *\n\t * @internal\n\t */\n\t_width: number;\n}\n\nexport interface AutocompleteViewConfig<\n\tTConfigInputCreator extends InputBase\n> extends SearchTextViewConfig {\n\n\t/**\n\t * When set `true`, the query view will be reset when the autocomplete view loses focus.\n\t */\n\tresetOnBlur?: boolean;\n\n\t/**\n\t * Minimum number of characters that need to be typed before the search is performed.\n\t *\n\t * @default 0\n\t */\n\tqueryMinChars?: number;\n}\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default basePropertyOf;\n","import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map characters to HTML entities. */\nvar htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\n/**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nvar escapeHtmlChar = basePropertyOf(htmlEscapes);\n\nexport default escapeHtmlChar;\n","import escapeHtmlChar from './_escapeHtmlChar.js';\nimport toString from './toString.js';\n\n/** Used to match HTML entities and HTML characters. */\nvar reUnescapedHtml = /[&<>\"']/g,\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n}\n\nexport default escape;\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./highlightedtext.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 || {};","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./spinner.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/**\n * @module ui/toolbar/balloon/balloontoolbar\n */\n\nimport ContextualBalloon from '../../panel/balloon/contextualballoon.js';\nimport ToolbarView, { type ToolbarViewGroupedItemsUpdateEvent } from '../toolbarview.js';\nimport BalloonPanelView, { generatePositions } from '../../panel/balloon/balloonpanelview.js';\nimport normalizeToolbarConfig from '../normalizetoolbarconfig.js';\n\nimport type { EditorUIReadyEvent, EditorUIUpdateEvent } from '../../editorui/editorui.js';\n\nimport {\n\tPlugin,\n\ttype Editor,\n\ttype EditorReadyEvent\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\tFocusTracker,\n\tRect,\n\tResizeObserver,\n\tenv,\n\tglobal,\n\ttoUnit,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tDocumentSelection,\n\tDocumentSelectionChangeRangeEvent,\n\tSchema\n} from '@ckeditor/ckeditor5-engine';\n\nimport { debounce, type DebouncedFunc } from 'lodash-es';\n\nconst toPx = toUnit( 'px' );\n\n/**\n * The contextual toolbar.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */\nexport default class BalloonToolbar extends Plugin {\n\t/**\n\t * The toolbar view displayed in the balloon.\n\t */\n\tpublic readonly toolbarView: ToolbarView;\n\n\t/**\n\t * Tracks the focus of the {@link module:ui/editorui/editorui~EditorUI#getEditableElement editable element}\n\t * and the {@link #toolbarView}. When both are blurred then the toolbar should hide.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * A cached and normalized `config.balloonToolbar` object.\n\t */\n\tprivate _balloonConfig: ReturnType;\n\n\t/**\n\t * An instance of the resize observer that allows to respond to changes in editable's geometry\n\t * so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t *\n\t * **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t * {@link module:core/editor/editorconfig~EditorConfig#balloonToolbar configuration}.\n\t *\n\t * **Note:** Created in {@link #init}.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null = null;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate readonly _balloon: ContextualBalloon;\n\n\t/**\n\t * Fires `_selectionChangeDebounced` event using `lodash#debounce`.\n\t *\n\t * This event is an internal plugin event which is fired 200 ms after model selection last change.\n\t * This is to makes easy test debounced action without need to use `setTimeout`.\n\t *\n\t * This function is stored as a plugin property to make possible to cancel\n\t * trailing debounced invocation on destroy.\n\t */\n\tprivate readonly _fireSelectionChangeDebounced: DebouncedFunc<() => void>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BalloonToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ ContextualBalloon ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._balloonConfig = normalizeToolbarConfig( editor.config.get( 'balloonToolbar' ) );\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t// Wait for the EditorUI#init. EditableElement is not available before.\n\t\teditor.ui.once( 'ready', () => {\n\t\t\tthis.focusTracker.add( editor.ui.getEditableElement()! );\n\t\t\tthis.focusTracker.add( this.toolbarView.element! );\n\t\t} );\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\teditor.ui.addToolbar( this.toolbarView, {\n\t\t\tbeforeFocus: () => this.show( true ),\n\t\t\tafterBlur: () => this.hide(),\n\t\t\tisContextual: true\n\t\t} );\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\t\tthis._fireSelectionChangeDebounced = debounce( () => this.fire( '_selectionChangeDebounced' ), 200 );\n\n\t\t// The appearance of the BalloonToolbar method is event–driven.\n\t\t// It is possible to stop the #show event and this prevent the toolbar from showing up.\n\t\tthis.decorate( 'show' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\n\t\t// Show/hide the toolbar on editable focus/blur.\n\t\tthis.listenTo>( this.focusTracker, 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tconst isToolbarVisible = this._balloon.visibleView === this.toolbarView;\n\n\t\t\tif ( !isFocused && isToolbarVisible ) {\n\t\t\t\tthis.hide();\n\t\t\t} else if ( isFocused ) {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t} );\n\n\t\t// Hide the toolbar when the selection is changed by a direct change or has changed to collapsed.\n\t\tthis.listenTo( selection, 'change:range', ( evt, data ) => {\n\t\t\tif ( data.directChange || selection.isCollapsed ) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\n\t\t\t// Fire internal `_selectionChangeDebounced` event to use it for showing\n\t\t\t// the toolbar after the selection stops changing.\n\t\t\tthis._fireSelectionChangeDebounced();\n\t\t} );\n\n\t\t// Show the toolbar when the selection stops changing.\n\t\tthis.listenTo( this, '_selectionChangeDebounced', () => {\n\t\t\tif ( this.editor.editing.view.document.isFocused ) {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t} );\n\n\t\tif ( !this._balloonConfig.shouldNotGroupWhenFull ) {\n\t\t\tthis.listenTo( editor, 'ready', () => {\n\t\t\t\tconst editableElement = editor.ui.view.editable.element!;\n\n\t\t\t\t// Set #toolbarView's max-width on the initialization and update it on the editable resize.\n\t\t\t\tthis._resizeObserver = new ResizeObserver( editableElement, entry => {\n\t\t\t\t\t// The max-width equals 90% of the editable's width for the best user experience.\n\t\t\t\t\t// The value keeps the balloon very close to the boundaries of the editable and limits the cases\n\t\t\t\t\t// when the balloon juts out from the editable element it belongs to.\n\t\t\t\t\tthis.toolbarView.maxWidth = toPx( entry.contentRect.width * .9 );\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\t// Listen to the toolbar view and whenever it changes its geometry due to some items being\n\t\t// grouped or ungrouped, update the position of the balloon because a shorter/longer toolbar\n\t\t// means the balloon could be pointing at the wrong place. Once updated, the balloon will point\n\t\t// at the right selection in the content again.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/6444\n\t\tthis.listenTo( this.toolbarView, 'groupedItemsUpdate', () => {\n\t\t\tthis._updatePosition();\n\t\t} );\n\n\t\t// Creates toolbar components based on given configuration.\n\t\t// This needs to be done when all plugins are ready.\n\t\teditor.ui.once( 'ready', () => {\n\t\t\tthis.toolbarView.fillFromConfig( this._balloonConfig, this.editor.ui.componentFactory );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the toolbar view instance.\n\t */\n\tprivate _createToolbarView() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._balloonConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView( this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t} );\n\n\t\ttoolbarView.ariaLabel = t( 'Editor contextual toolbar' );\n\t\ttoolbarView.render();\n\n\t\treturn toolbarView;\n\t}\n\n\t/**\n\t * Shows the toolbar and attaches it to the selection.\n\t *\n\t * Fires {@link #event:show} event which can be stopped to prevent the toolbar from showing up.\n\t *\n\t * @param showForCollapsedSelection When set `true`, the toolbar will show despite collapsed selection in the\n\t * editing view.\n\t */\n\tpublic show( showForCollapsedSelection: boolean = false ): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst schema = editor.model.schema;\n\n\t\t// Do not add the toolbar to the balloon stack twice.\n\t\tif ( this._balloon.hasView( this.toolbarView ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not show the toolbar when the selection is collapsed.\n\t\tif ( selection.isCollapsed && !showForCollapsedSelection ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not show the toolbar when there is more than one range in the selection and they fully contain selectable elements.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/6443.\n\t\tif ( selectionContainsOnlyMultipleSelectables( selection, schema ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Don not show the toolbar when all components inside are disabled\n\t\t// see https://github.com/ckeditor/ckeditor5-ui/issues/269.\n\t\tif ( Array.from( this.toolbarView.items ).every( ( item: any ) => item.isEnabled !== undefined && !item.isEnabled ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar position when the editor ui should be refreshed.\n\t\tthis.listenTo( this.editor.ui, 'update', () => {\n\t\t\tthis._updatePosition();\n\t\t} );\n\n\t\t// Add the toolbar to the common editor contextual balloon.\n\t\tthis._balloon.add( {\n\t\t\tview: this.toolbarView,\n\t\t\tposition: this._getBalloonPositionData(),\n\t\t\tballoonClassName: 'ck-toolbar-container'\n\t\t} );\n\t}\n\n\t/**\n\t * Hides the toolbar.\n\t */\n\tpublic hide(): void {\n\t\tif ( this._balloon.hasView( this.toolbarView ) ) {\n\t\t\tthis.stopListening( this.editor.ui, 'update' );\n\t\t\tthis._balloon.remove( this.toolbarView );\n\t\t}\n\t}\n\n\t/**\n\t * Returns positioning options for the {@link #_balloon}. They control the way balloon is attached\n\t * to the selection.\n\t */\n\tprivate _getBalloonPositionData() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst viewSelection = viewDocument.selection;\n\n\t\t// Get direction of the selection.\n\t\tconst isBackward = viewDocument.selection.isBackward;\n\n\t\treturn {\n\t\t\t// Because the target for BalloonPanelView is a Rect (not DOMRange), it's geometry will stay fixed\n\t\t\t// as the window scrolls. To let the BalloonPanelView follow such Rect, is must be continuously\n\t\t\t// computed and hence, the target is defined as a function instead of a static value.\n\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/195\n\t\t\ttarget: () => {\n\t\t\t\tconst range = isBackward ? viewSelection.getFirstRange() : viewSelection.getLastRange();\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( view.domConverter.viewRangeToDom( range! ) );\n\n\t\t\t\t// Select the proper range rect depending on the direction of the selection.\n\t\t\t\tif ( isBackward ) {\n\t\t\t\t\treturn rangeRects[ 0 ];\n\t\t\t\t} else {\n\t\t\t\t\t// Ditch the zero-width \"orphan\" rect in the next line for the forward selection if there's\n\t\t\t\t\t// another one preceding it. It is not rendered as a selection by the web browser anyway.\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/308\n\t\t\t\t\tif ( rangeRects.length > 1 && rangeRects[ rangeRects.length - 1 ].width === 0 ) {\n\t\t\t\t\t\trangeRects.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn rangeRects[ rangeRects.length - 1 ];\n\t\t\t\t}\n\t\t\t},\n\t\t\tpositions: this._getBalloonPositions( isBackward )\n\t\t};\n\t}\n\n\t/**\n\t * Updates the position of the {@link #_balloon} to make up for changes:\n\t *\n\t * * in the geometry of the selection it is attached to (e.g. the selection moved in the viewport or expanded or shrunk),\n\t * * or the geometry of the balloon toolbar itself (e.g. the toolbar has grouped or ungrouped some items and it is shorter or longer).\n\t */\n\tprivate _updatePosition() {\n\t\tthis._balloon.updatePosition( this._getBalloonPositionData() );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.stopListening();\n\t\tthis._fireSelectionChangeDebounced.cancel();\n\t\tthis.toolbarView.destroy();\n\t\tthis.focusTracker.destroy();\n\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Returns toolbar positions for the given direction of the selection.\n\t */\n\tprivate _getBalloonPositions( isBackward: boolean ) {\n\t\tconst isSafariIniOS = env.isSafari && env.isiOS;\n\n\t\t// https://github.com/ckeditor/ckeditor5/issues/7707\n\t\tconst positions = isSafariIniOS ? generatePositions( {\n\t\t\t// 20px when zoomed out. Less then 20px when zoomed in; the \"radius\" of the native selection handle gets\n\t\t\t// smaller as the user zooms in. No less than the default v-offset, though.\n\t\t\theightOffset: Math.max(\n\t\t\t\tBalloonPanelView.arrowHeightOffset,\n\t\t\t\tMath.round( 20 / global.window.visualViewport!.scale )\n\t\t\t)\n\t\t} ) : BalloonPanelView.defaultPositions;\n\n\t\treturn isBackward ? [\n\t\t\tpositions.northWestArrowSouth,\n\t\t\tpositions.northWestArrowSouthWest,\n\t\t\tpositions.northWestArrowSouthEast,\n\t\t\tpositions.northWestArrowSouthMiddleEast,\n\t\t\tpositions.northWestArrowSouthMiddleWest,\n\t\t\tpositions.southWestArrowNorth,\n\t\t\tpositions.southWestArrowNorthWest,\n\t\t\tpositions.southWestArrowNorthEast,\n\t\t\tpositions.southWestArrowNorthMiddleWest,\n\t\t\tpositions.southWestArrowNorthMiddleEast\n\t\t] : [\n\t\t\tpositions.southEastArrowNorth,\n\t\t\tpositions.southEastArrowNorthEast,\n\t\t\tpositions.southEastArrowNorthWest,\n\t\t\tpositions.southEastArrowNorthMiddleEast,\n\t\t\tpositions.southEastArrowNorthMiddleWest,\n\t\t\tpositions.northEastArrowSouth,\n\t\t\tpositions.northEastArrowSouthEast,\n\t\t\tpositions.northEastArrowSouthWest,\n\t\t\tpositions.northEastArrowSouthMiddleEast,\n\t\t\tpositions.northEastArrowSouthMiddleWest\n\t\t];\n\t}\n}\n\n/**\n * Returns \"true\" when the selection has multiple ranges and each range contains a selectable element\n * and nothing else.\n */\nfunction selectionContainsOnlyMultipleSelectables( selection: DocumentSelection, schema: Schema ) {\n\t// It doesn't contain multiple objects if there is only one range.\n\tif ( selection.rangeCount === 1 ) {\n\t\treturn false;\n\t}\n\n\treturn [ ...selection.getRanges() ].every( range => {\n\t\tconst element = range.getContainedElement();\n\n\t\treturn element && schema.isSelectable( element );\n\t} );\n}\n\n/**\n * This event is fired just before the toolbar shows up. Stopping this event will prevent this.\n *\n * @eventName ~BalloonToolbar#show\n */\nexport type BalloonToolbarShowEvent = {\n\tname: 'show';\n\targs: [];\n};\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./blocktoolbar.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/**\n * @module ui/toolbar/block/blockbuttonview\n */\n\nimport ButtonView from '../../button/buttonview.js';\n\nimport { toUnit, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport '../../../theme/components/toolbar/blocktoolbar.css';\n\nconst toPx = toUnit( 'px' );\n\n/**\n * The block button view class.\n *\n * This view represents a button attached next to block element where the selection is anchored.\n *\n * See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.\n */\nexport default class BlockButtonView extends ButtonView {\n\t/**\n\t * Top offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public top: number;\n\n\t/**\n\t * Left offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public left: number;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\t// Hide button on init.\n\t\tthis.isVisible = false;\n\n\t\tthis.isToggleable = true;\n\n\t\tthis.set( 'top', 0 );\n\t\tthis.set( 'left', 0 );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-block-toolbar-button',\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to( 'top', val => toPx( val ) ),\n\t\t\t\t\tleft: bind.to( 'left', val => toPx( val ) )\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/toolbar/block/blocktoolbar\n */\n\n/* global window */\n\nimport {\n\tPlugin,\n\ttype Editor\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\tRect,\n\tResizeObserver,\n\ttoUnit,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { DocumentSelectionChangeRangeEvent } from '@ckeditor/ckeditor5-engine';\n\nimport BlockButtonView from './blockbuttonview.js';\nimport BalloonPanelView from '../../panel/balloon/balloonpanelview.js';\nimport ToolbarView, { NESTED_TOOLBAR_ICONS } from '../toolbarview.js';\nimport clickOutsideHandler from '../../bindings/clickoutsidehandler.js';\nimport normalizeToolbarConfig from '../normalizetoolbarconfig.js';\n\nimport type { ButtonExecuteEvent } from '../../button/button.js';\nimport type { EditorUIReadyEvent, EditorUIUpdateEvent } from '../../editorui/editorui.js';\n\nconst toPx = toUnit( 'px' );\n\n/**\n * The block toolbar plugin.\n *\n * This plugin provides a button positioned next to the block of content where the selection is anchored.\n * Upon clicking the button, a dropdown providing access to editor features shows up, as configured in\n * {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.\n *\n * By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~Schema}\n * as `$block` for which the toolbar provides at least one option.\n *\n * By default, the button is attached so its right boundary is touching the\n * {@link module:engine/view/editableelement~EditableElement}:\n *\n * ```\n * __ |\n * | || This is a block of content that the\n * ¯¯ | button is attached to. This is a\n * | block of content that the button is\n * | attached to.\n * ```\n *\n * The position of the button can be adjusted using the CSS `transform` property:\n *\n * ```css\n * .ck-block-toolbar-button {\n * \ttransform: translateX( -10px );\n * }\n * ```\n *\n * ```\n * __ |\n * | | | This is a block of content that the\n * ¯¯ | button is attached to. This is a\n * | block of content that the button is\n * | attached to.\n * ```\n *\n * **Note**: If you plan to run the editor in a right–to–left (RTL) language, keep in mind the button\n * will be attached to the **right** boundary of the editable area. In that case, make sure the\n * CSS position adjustment works properly by adding the following styles:\n *\n * ```css\n * .ck[dir=\"rtl\"] .ck-block-toolbar-button {\n * \ttransform: translateX( 10px );\n * }\n * ```\n */\nexport default class BlockToolbar extends Plugin {\n\t/**\n\t * The toolbar view.\n\t */\n\tpublic readonly toolbarView: ToolbarView;\n\n\t/**\n\t * The balloon panel view, containing the {@link #toolbarView}.\n\t */\n\tpublic readonly panelView: BalloonPanelView;\n\n\t/**\n\t * The button view that opens the {@link #toolbarView}.\n\t */\n\tpublic readonly buttonView: BlockButtonView;\n\n\t/**\n\t * An instance of the resize observer that allows to respond to changes in editable's geometry\n\t * so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t *\n\t * **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t * {@link module:core/editor/editorconfig~EditorConfig#blockToolbar configuration}.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null = null;\n\n\t/**\n\t * A cached and normalized `config.blockToolbar` object.\n\t */\n\tprivate _blockToolbarConfig: ReturnType;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BlockToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._blockToolbarConfig = normalizeToolbarConfig( this.editor.config.get( 'blockToolbar' ) );\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.panelView = this._createPanelView();\n\t\tthis.buttonView = this._createButtonView();\n\n\t\t// Close the #panelView upon clicking outside of the plugin UI.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this.panelView,\n\t\t\tcontextElements: [ this.panelView.element!, this.buttonView.element! ],\n\t\t\tactivator: () => this.panelView.isVisible,\n\t\t\tcallback: () => this._hidePanel()\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst editBlockText = t( 'Click to edit block' );\n\t\tconst dragToMoveText = t( 'Drag to move' );\n\t\tconst editBlockLabel = t( 'Edit block' );\n\n\t\tconst isDragDropBlockToolbarPluginLoaded = editor.plugins.has( 'DragDropBlockToolbar' );\n\t\tconst label = isDragDropBlockToolbarPluginLoaded ? `${ editBlockText }\\n${ dragToMoveText }` : editBlockLabel;\n\n\t\tthis.buttonView.label = label;\n\n\t\tif ( isDragDropBlockToolbarPluginLoaded ) {\n\t\t\tthis.buttonView.element!.dataset.ckeTooltipClass = 'ck-tooltip_multi-line';\n\t\t}\n\n\t\t// Hides panel on a direct selection change.\n\t\tthis.listenTo( editor.model.document.selection, 'change:range', ( evt, data ) => {\n\t\t\tif ( data.directChange ) {\n\t\t\t\tthis._hidePanel();\n\t\t\t}\n\t\t} );\n\n\t\tthis.listenTo( editor.ui, 'update', () => this._updateButton() );\n\t\t// `low` priority is used because of https://github.com/ckeditor/ckeditor5-core/issues/133.\n\t\tthis.listenTo( editor, 'change:isReadOnly', () => this._updateButton(), { priority: 'low' } );\n\t\tthis.listenTo( editor.ui.focusTracker, 'change:isFocused', () => this._updateButton() );\n\n\t\t// Reposition button on resize.\n\t\tthis.listenTo>( this.buttonView, 'change:isVisible', ( evt, name, isVisible ) => {\n\t\t\tif ( isVisible ) {\n\t\t\t\t// Keep correct position of button and panel on window#resize.\n\t\t\t\tthis.buttonView.listenTo( window, 'resize', () => this._updateButton() );\n\t\t\t} else {\n\t\t\t\t// Stop repositioning button when is hidden.\n\t\t\t\tthis.buttonView.stopListening( window, 'resize' );\n\n\t\t\t\t// Hide the panel when the button disappears.\n\t\t\t\tthis._hidePanel();\n\t\t\t}\n\t\t} );\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\teditor.ui.addToolbar( this.toolbarView, {\n\t\t\tbeforeFocus: () => this._showPanel(),\n\t\t\tafterBlur: () => this._hidePanel()\n\t\t} );\n\n\t\t// Fills the toolbar with its items based on the configuration.\n\t\t// This needs to be done after all plugins are ready.\n\t\teditor.ui.once( 'ready', () => {\n\t\t\tthis.toolbarView.fillFromConfig( this._blockToolbarConfig, this.editor.ui.componentFactory );\n\n\t\t\t// Hide panel before executing each button in the panel.\n\t\t\tfor ( const item of this.toolbarView.items ) {\n\t\t\t\titem.on( 'execute', () => this._hidePanel( true ), { priority: 'high' } );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n\t\tthis.panelView.destroy();\n\t\tthis.buttonView.destroy();\n\t\tthis.toolbarView.destroy();\n\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link #toolbarView}.\n\t */\n\tprivate _createToolbarView(): ToolbarView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._blockToolbarConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView( this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t} );\n\n\t\ttoolbarView.ariaLabel = t( 'Editor block content toolbar' );\n\n\t\treturn toolbarView;\n\t}\n\n\t/**\n\t * Creates the {@link #panelView}.\n\t */\n\tprivate _createPanelView(): BalloonPanelView {\n\t\tconst editor = this.editor;\n\t\tconst panelView = new BalloonPanelView( editor.locale );\n\n\t\tpanelView.content.add( this.toolbarView );\n\t\tpanelView.class = 'ck-toolbar-container';\n\t\teditor.ui.view.body.add( panelView );\n\t\teditor.ui.focusTracker.add( panelView.element! );\n\n\t\t// Close #panelView on `Esc` press.\n\t\tthis.toolbarView.keystrokes.set( 'Esc', ( evt, cancel ) => {\n\t\t\tthis._hidePanel( true );\n\t\t\tcancel();\n\t\t} );\n\n\t\treturn panelView;\n\t}\n\n\t/**\n\t * Creates the {@link #buttonView}.\n\t */\n\tprivate _createButtonView(): BlockButtonView {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst buttonView = new BlockButtonView( editor.locale );\n\t\tconst iconFromConfig = this._blockToolbarConfig.icon;\n\n\t\tconst icon = NESTED_TOOLBAR_ICONS[ iconFromConfig! ] || iconFromConfig || NESTED_TOOLBAR_ICONS.dragIndicator;\n\n\t\tbuttonView.set( {\n\t\t\tlabel: t( 'Edit block' ),\n\t\t\ticon,\n\t\t\twithText: false\n\t\t} );\n\n\t\t// Bind the panelView observable properties to the buttonView.\n\t\tbuttonView.bind( 'isOn' ).to( this.panelView, 'isVisible' );\n\t\tbuttonView.bind( 'tooltip' ).to( this.panelView, 'isVisible', isVisible => !isVisible );\n\n\t\t// Toggle the panelView upon buttonView#execute.\n\t\tthis.listenTo( buttonView, 'execute', () => {\n\t\t\tif ( !this.panelView.isVisible ) {\n\t\t\t\tthis._showPanel();\n\t\t\t} else {\n\t\t\t\tthis._hidePanel( true );\n\t\t\t}\n\t\t} );\n\n\t\teditor.ui.view.body.add( buttonView );\n\t\teditor.ui.focusTracker.add( buttonView.element! );\n\n\t\treturn buttonView;\n\t}\n\n\t/**\n\t * Shows or hides the button.\n\t * When all the conditions for displaying the button are matched, it shows the button. Hides otherwise.\n\t */\n\tprivate _updateButton() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\n\t\t// Hides the button when the editor is not focused.\n\t\tif ( !editor.ui.focusTracker.isFocused ) {\n\t\t\tthis._hideButton();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Hides the button when the selection is in non-editable place.\n\t\tif ( !editor.model.canEditAt( editor.model.document.selection ) ) {\n\t\t\tthis._hideButton();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the first selected block, button will be attached to this element.\n\t\tconst modelTarget = Array.from( model.document.selection.getSelectedBlocks() )[ 0 ];\n\n\t\t// Hides the button when there is no enabled item in toolbar for the current block element.\n\t\tif ( !modelTarget || Array.from( this.toolbarView.items ).every( ( item: any ) => !item.isEnabled ) ) {\n\t\t\tthis._hideButton();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Get DOM target element.\n\t\tconst domTarget = view.domConverter.mapViewToDom( editor.editing.mapper.toViewElement( modelTarget )! );\n\n\t\t// Show block button.\n\t\tthis.buttonView.isVisible = true;\n\n\t\t// Make sure that the block toolbar panel is resized properly.\n\t\tthis._setupToolbarResize();\n\n\t\t// Attach block button to target DOM element.\n\t\tthis._attachButtonToElement( domTarget as any );\n\n\t\t// When panel is opened then refresh it position to be properly aligned with block button.\n\t\tif ( this.panelView.isVisible ) {\n\t\t\tthis._showPanel();\n\t\t}\n\t}\n\n\t/**\n\t * Hides the button.\n\t */\n\tprivate _hideButton() {\n\t\tthis.buttonView.isVisible = false;\n\t}\n\n\t/**\n\t * Shows the {@link #toolbarView} attached to the {@link #buttonView}.\n\t * If the toolbar is already visible, then it simply repositions it.\n\t */\n\tprivate _showPanel() {\n\t\t// Usually, the only way to show the toolbar is by pressing the block button. It makes it impossible for\n\t\t// the toolbar to show up when the button is invisible (feature does not make sense for the selection then).\n\t\t// The toolbar navigation using Alt+F10 does not access the button but shows the panel directly using this method.\n\t\t// So we need to check whether this is possible first.\n\t\tif ( !this.buttonView.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasVisible = this.panelView.isVisible;\n\n\t\t// So here's the thing: If there was no initial panelView#show() or these two were in different order, the toolbar\n\t\t// positioning will break in RTL editors. Weird, right? What you show know is that the toolbar\n\t\t// grouping works thanks to:\n\t\t//\n\t\t// * the ResizeObserver, which kicks in as soon as the toolbar shows up in DOM (becomes visible again).\n\t\t// * the observable ToolbarView#maxWidth, which triggers re-grouping when changed.\n\t\t//\n\t\t// Here are the possible scenarios:\n\t\t//\n\t\t// 1. (WRONG ❌) If the #maxWidth is set when the toolbar is invisible, it won't affect item grouping (no DOMRects, no grouping).\n\t\t// Then, when panelView.pin() is called, the position of the toolbar will be calculated for the old\n\t\t// items grouping state, and when finally ResizeObserver kicks in (hey, the toolbar is visible now, right?)\n\t\t// it will group/ungroup some items and the length of the toolbar will change. But since in RTL the toolbar\n\t\t// is attached on the right side and the positioning uses CSS \"left\", it will result in the toolbar shifting\n\t\t// to the left and being displayed in the wrong place.\n\t\t// 2. (WRONG ❌) If the panelView.pin() is called first and #maxWidth set next, then basically the story repeats. The balloon\n\t\t// calculates the position for the old toolbar grouping state, then the toolbar re-groups items and because\n\t\t// it is positioned using CSS \"left\" it will move.\n\t\t// 3. (RIGHT ✅) We show the panel first (the toolbar does re-grouping but it does not matter), then the #maxWidth\n\t\t// is set allowing the toolbar to re-group again and finally panelView.pin() does the positioning when the\n\t\t// items grouping state is stable and final.\n\t\t//\n\t\t// https://github.com/ckeditor/ckeditor5/issues/6449, https://github.com/ckeditor/ckeditor5/issues/6575\n\t\tthis.panelView.show();\n\n\t\tconst editableElement = this._getSelectedEditableElement();\n\n\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth( editableElement );\n\n\t\tthis.panelView.pin( {\n\t\t\ttarget: this.buttonView.element!,\n\t\t\tlimiter: editableElement\n\t\t} );\n\n\t\tif ( !wasVisible ) {\n\t\t\t( this.toolbarView.items.get( 0 ) as any ).focus();\n\t\t}\n\t}\n\n\t/**\n\t * Returns currently selected editable, based on the model selection.\n\t */\n\tprivate _getSelectedEditableElement(): HTMLElement {\n\t\tconst selectedModelRootName = this.editor.model.document.selection.getFirstRange()!.root.rootName!;\n\n\t\treturn this.editor.ui.getEditableElement( selectedModelRootName )!;\n\t}\n\n\t/**\n\t * Hides the {@link #toolbarView}.\n\t *\n\t * @param focusEditable When `true`, the editable will be focused after hiding the panel.\n\t */\n\tprivate _hidePanel( focusEditable?: boolean ) {\n\t\tthis.panelView.isVisible = false;\n\n\t\tif ( focusEditable ) {\n\t\t\tthis.editor.editing.view.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Attaches the {@link #buttonView} to the target block of content.\n\t *\n\t * @param targetElement Target element.\n\t */\n\tprivate _attachButtonToElement( targetElement: HTMLElement ) {\n\t\tconst contentStyles = window.getComputedStyle( targetElement );\n\n\t\tconst editableRect = new Rect( this._getSelectedEditableElement() );\n\t\tconst contentPaddingTop = parseInt( contentStyles.paddingTop, 10 );\n\t\t// When line height is not an integer then treat it as \"normal\".\n\t\t// MDN says that 'normal' == ~1.2 on desktop browsers.\n\t\tconst contentLineHeight = parseInt( contentStyles.lineHeight, 10 ) || parseInt( contentStyles.fontSize, 10 ) * 1.2;\n\n\t\tconst buttonRect = new Rect( this.buttonView.element! );\n\t\tconst contentRect = new Rect( targetElement );\n\n\t\tlet positionLeft;\n\n\t\tif ( this.editor.locale.uiLanguageDirection === 'ltr' ) {\n\t\t\tpositionLeft = editableRect.left - buttonRect.width;\n\t\t} else {\n\t\t\tpositionLeft = editableRect.right;\n\t\t}\n\n\t\tconst positionTop = contentRect.top + contentPaddingTop + ( contentLineHeight - buttonRect.height ) / 2;\n\n\t\tbuttonRect.moveTo( positionLeft, positionTop );\n\n\t\tconst absoluteButtonRect = buttonRect.toAbsoluteRect();\n\n\t\tthis.buttonView.top = absoluteButtonRect.top;\n\t\tthis.buttonView.left = absoluteButtonRect.left;\n\t}\n\n\t/**\n\t * Creates a resize observer that observes selected editable and resizes the toolbar panel accordingly.\n\t */\n\tprivate _setupToolbarResize() {\n\t\tconst editableElement = this._getSelectedEditableElement();\n\n\t\t// Do this only if the automatic grouping is turned on.\n\t\tif ( !this._blockToolbarConfig.shouldNotGroupWhenFull ) {\n\t\t\t// If resize observer is attached to a different editable than currently selected editable, re-attach it.\n\t\t\tif ( this._resizeObserver && this._resizeObserver.element !== editableElement ) {\n\t\t\t\tthis._resizeObserver.destroy();\n\t\t\t\tthis._resizeObserver = null;\n\t\t\t}\n\n\t\t\tif ( !this._resizeObserver ) {\n\t\t\t\tthis._resizeObserver = new ResizeObserver( editableElement, () => {\n\t\t\t\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth( editableElement );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets the {@link #toolbarView} max-width, based on given `editableElement` width plus the distance between the farthest\n\t * edge of the {@link #buttonView} and the editable.\n\t *\n\t * @returns A maximum width that toolbar can have, in pixels.\n\t */\n\tprivate _getToolbarMaxWidth( editableElement: HTMLElement ) {\n\t\tconst editableRect = new Rect( editableElement );\n\t\tconst buttonRect = new Rect( this.buttonView.element! );\n\t\tconst isRTL = this.editor.locale.uiLanguageDirection === 'rtl';\n\t\tconst offset = isRTL ? ( buttonRect.left - editableRect.right ) + buttonRect.width : editableRect.left - buttonRect.left;\n\n\t\treturn toPx( editableRect.width + offset );\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./menubarmenubutton.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/**\n * @module ui/menubar/menubarmenubuttonview\n */\n\nimport IconView from '../icon/iconview.js';\nimport ButtonView from '../button/buttonview.js';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport dropdownArrowIcon from '../../theme/icons/dropdown-arrow.svg';\n\nimport '../../theme/components/menubar/menubarmenubutton.css';\n\n/**\n * A menu {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#buttonView} class. Buttons like this one\n * open both top-level bar menus as well as sub-menus.\n */\nexport default class MenuBarMenuButtonView extends ButtonView {\n\t/**\n\t * An icon that displays an arrow to indicate a direction of the menu.\n\t */\n\tpublic readonly arrowView: IconView;\n\n\t/**\n\t * Creates an instance of the menu bar button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.arrowView = this._createArrowView();\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-menu-bar__menu__button'\n\t\t\t\t],\n\t\t\t\t'aria-haspopup': true,\n\t\t\t\t'aria-expanded': this.bindTemplate.to( 'isOn', value => String( value ) ),\n\t\t\t\t'data-cke-tooltip-disabled': bind.to( 'isOn' )\n\t\t\t},\n\t\t\ton: {\n\t\t\t\t'mouseenter': bind.to( 'mouseenter' )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.arrowView );\n\t}\n\n\t/**\n\t * Creates the {@link #arrowView} instance.\n\t */\n\tprivate _createArrowView() {\n\t\tconst arrowView = new IconView();\n\n\t\tarrowView.content = dropdownArrowIcon;\n\t\tarrowView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-menu-bar__menu__button__arrow'\n\t\t\t}\n\t\t} );\n\n\t\treturn arrowView;\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./menubarmenulistitem.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/**\n * @module ui/menubar/menubarmenulistitemview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport ListItemView from '../list/listitemview.js';\nimport type MenuBarMenuView from './menubarmenuview.js';\n\nimport '../../theme/components/menubar/menubarmenulistitem.css';\n\n/**\n * A menu bar list item view, a child of {@link module:ui/menubar/menubarmenulistview~MenuBarMenuListView}.\n *\n * Populate this item with a {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} instance\n * or a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance to create a sub-menu.\n */\nexport default class MenuBarMenuListItemView extends ListItemView {\n\t/**\n\t * Creates an instance of the list item view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale, parentMenuView: MenuBarMenuView ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-menu-bar__menu__item'\n\t\t\t\t]\n\t\t\t},\n\t\t\ton: {\n\t\t\t\t'mouseenter': bind.to( 'mouseenter' )\n\t\t\t}\n\t\t} );\n\n\t\tthis.delegate( 'mouseenter' ).to( parentMenuView );\n\t}\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/**\n * @module ui/menubar/utils\n */\n\nimport clickOutsideHandler from '../bindings/clickoutsidehandler.js';\nimport MenuBarMenuListItemView from './menubarmenulistitemview.js';\nimport type MenuBarMenuView from './menubarmenuview.js';\nimport type {\n\tdefault as MenuBarView,\n\tMenuBarConfig,\n\tMenuBarMenuMouseEnterEvent,\n\tMenuBarMenuChangeIsOpenEvent,\n\tMenuBarMenuArrowRightEvent,\n\tMenuBarMenuArrowLeftEvent,\n\tMenuBarMenuDefinition,\n\tMenuBarConfigObject,\n\tMenuBarConfigAddedGroup,\n\tMenuBarConfigAddedMenu,\n\tMenuBarConfigAddedPosition,\n\tNormalizedMenuBarConfigObject\n} from './menubarview.js';\nimport { cloneDeep } from 'lodash-es';\nimport type { FocusableView } from '../focuscycler.js';\nimport {\n\tlogWarning,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype PositioningFunction\n} from '@ckeditor/ckeditor5-utils';\nimport type { ButtonExecuteEvent } from '../button/button.js';\nimport type ComponentFactory from '../componentfactory.js';\n\nconst NESTED_PANEL_HORIZONTAL_OFFSET = 5;\n\ntype DeepReadonly = Readonly<{\n\t[K in keyof T]:\n\t\tT[K] extends string ? Readonly\n\t\t\t: T[K] extends Array ? Readonly>>\n\t\t\t\t: DeepReadonly;\n}>;\n\n/**\n * Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.\n */\nexport const MenuBarBehaviors = {\n\t/**\n\t * When the bar is already open:\n\t * * Opens the menu when the user hovers over its button.\n\t * * Closes open menu when another menu's button gets hovered.\n\t */\n\ttoggleMenusAndFocusItemsOnHover( menuBarView: MenuBarView ): void {\n\t\tmenuBarView.on( 'menu:mouseenter', evt => {\n\t\t\t// This works only when the menu bar has already been open and the user hover over the menu bar.\n\t\t\tif ( !menuBarView.isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( const menuView of menuBarView.menus ) {\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // const wasOpen = menuView.isOpen;\n\n\t\t\t\tconst pathLeaf = evt.path[ 0 ];\n\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof MenuBarMenuListItemView && pathLeaf.children.first === menuView;\n\n\t\t\t\tmenuView.isOpen = ( evt.path.includes( menuView ) || isListItemContainingMenu ) && menuView.isEnabled;\n\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // if ( wasOpen !== menuView.isOpen ) {\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] toggleMenusAndFocusItemsOnHover(): Toggle',\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // \tlogMenu( menuView ), 'isOpen', menuView.isOpen\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // );\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // }\n\t\t\t}\n\n\t\t\t( evt.source as FocusableView ).focus();\n\t\t} );\n\t},\n\n\t/**\n\t * Moves between top-level menus using the arrow left and right keys.\n\t *\n\t * If the menubar has already been open, the arrow keys move focus between top-level menu buttons and open them.\n\t * If the menubar is closed, the arrow keys only move focus between top-level menu buttons.\n\t */\n\tfocusCycleMenusOnArrows( menuBarView: MenuBarView ): void {\n\t\tconst isContentRTL = menuBarView.locale!.uiLanguageDirection === 'rtl';\n\n\t\tmenuBarView.on( 'menu:arrowright', evt => {\n\t\t\tcycleTopLevelMenus( evt.source as MenuBarMenuView, isContentRTL ? -1 : 1 );\n\t\t} );\n\n\t\tmenuBarView.on( 'menu:arrowleft', evt => {\n\t\t\tcycleTopLevelMenus( evt.source as MenuBarMenuView, isContentRTL ? 1 : -1 );\n\t\t} );\n\n\t\tfunction cycleTopLevelMenus( currentMenuView: MenuBarMenuView, step: number ) {\n\t\t\tconst currentIndex = menuBarView.children.getIndex( currentMenuView );\n\t\t\tconst isCurrentMenuViewOpen = currentMenuView.isOpen;\n\t\t\tconst menusCount = menuBarView.children.length;\n\t\t\tconst menuViewToOpen = menuBarView.children.get( ( currentIndex + menusCount + step ) % menusCount )!;\n\n\t\t\tcurrentMenuView.isOpen = false;\n\n\t\t\tif ( isCurrentMenuViewOpen ) {\n\t\t\t\tmenuViewToOpen.isOpen = true;\n\t\t\t}\n\n\t\t\tmenuViewToOpen.buttonView.focus();\n\t\t}\n\t},\n\n\t/**\n\t * Closes the entire sub-menu structure when the bar is closed. This prevents sub-menus from being open if the user\n\t * closes the entire bar, and then re-opens some top-level menu.\n\t */\n\tcloseMenusWhenTheBarCloses( menuBarView: MenuBarView ): void {\n\t\tmenuBarView.on>( 'change:isOpen', () => {\n\t\t\tif ( !menuBarView.isOpen ) {\n\t\t\t\tmenuBarView.menus.forEach( menuView => {\n\t\t\t\t\tmenuView.isOpen = false;\n\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeMenusWhenTheBarCloses(): Closing', logMenu( menuView ) );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Handles the following case:\n\t * 1. Hover to open a sub-menu (A). The button has focus.\n\t * 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t * 3. Press arrow right to open the sub-menu (B).\n\t * 4. The sub-menu (A) should close as it would with `toggleMenusAndFocusItemsOnHover()`.\n\t */\n\tcloseMenuWhenAnotherOnTheSameLevelOpens( menuBarView: MenuBarView ): void {\n\t\tmenuBarView.on( 'menu:change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( isOpen ) {\n\t\t\t\tmenuBarView.menus\n\t\t\t\t\t.filter( menuView => {\n\t\t\t\t\t\treturn ( evt.source as any ).parentMenuView === menuView.parentMenuView &&\n\t\t\t\t\t\t\tevt.source !== menuView &&\n\t\t\t\t\t\t\tmenuView.isOpen;\n\t\t\t\t\t} ).forEach( menuView => {\n\t\t\t\t\t\tmenuView.isOpen = false;\n\n\t\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeMenuWhenAnotherOpens(): Closing', logMenu( menuView ) );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the bar when the user clicked outside of it (page body, editor root, etc.).\n\t */\n\tcloseOnClickOutside( menuBarView: MenuBarView ): void {\n\t\tclickOutsideHandler( {\n\t\t\temitter: menuBarView,\n\t\t\tactivator: () => menuBarView.isOpen,\n\t\t\tcallback: () => menuBarView.close(),\n\t\t\tcontextElements: () => menuBarView.children.map( child => child.element! )\n\t\t} );\n\t}\n};\n\n/**\n * Behaviors of the {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} component.\n */\nexport const MenuBarMenuBehaviors = {\n\t/**\n\t * If the button of the menu is focused, pressing the arrow down key should open the panel and focus it.\n\t * This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t */\n\topenAndFocusPanelOnArrowDownKey( menuView: MenuBarMenuView ): void {\n\t\tmenuView.keystrokes.set( 'arrowdown', ( data, cancel ) => {\n\t\t\tif ( menuView.focusTracker.focusedElement === menuView.buttonView.element ) {\n\t\t\t\tif ( !menuView.isOpen ) {\n\t\t\t\t\tmenuView.isOpen = true;\n\t\t\t\t}\n\n\t\t\t\tmenuView.panelView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Open the menu on the right arrow key press. This allows for navigating to sub-menus using the keyboard.\n\t */\n\topenOnArrowRightKey( menuView: MenuBarMenuView ): void {\n\t\tconst keystroke = menuView.locale!.uiLanguageDirection === 'rtl' ? 'arrowleft' : 'arrowright';\n\n\t\tmenuView.keystrokes.set( keystroke, ( data, cancel ) => {\n\t\t\tif ( menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] openOnArrowRightKey(): Opening', logMenu( menuView ) );\n\n\t\t\tif ( !menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = true;\n\t\t\t}\n\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t} );\n\t},\n\n\t/**\n\t * Opens the menu on its button click. Note that this behavior only opens but never closes the menu (unlike\n\t * {@link module:ui/dropdown/dropdownview~DropdownView}).\n\t */\n\topenOnButtonClick( menuView: MenuBarMenuView ): void {\n\t\tmenuView.buttonView.on( 'execute', () => {\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t} );\n\t},\n\n\t/**\n\t * Toggles the menu on its button click. This behavior is analogous to {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t */\n\ttoggleOnButtonClick( menuView: MenuBarMenuView ): void {\n\t\tmenuView.buttonView.on( 'execute', () => {\n\t\t\tmenuView.isOpen = !menuView.isOpen;\n\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\tmenuView.panelView.focus();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu on the right left key press. This allows for navigating to sub-menus using the keyboard.\n\t */\n\tcloseOnArrowLeftKey( menuView: MenuBarMenuView ): void {\n\t\tconst keystroke = menuView.locale!.uiLanguageDirection === 'rtl' ? 'arrowright' : 'arrowleft';\n\n\t\tmenuView.keystrokes.set( keystroke, ( data, cancel ) => {\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu on the esc key press. This allows for navigating to sub-menus using the keyboard.\n\t */\n\tcloseOnEscKey( menuView: MenuBarMenuView ): void {\n\t\tmenuView.keystrokes.set( 'esc', ( data, cancel ) => {\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu when its parent menu also closed. This prevents from orphaned open menus when the parent menu re-opens.\n\t */\n\tcloseOnParentClose( menuView: MenuBarMenuView ): void {\n\t\tmenuView.parentMenuView!.on>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( !isOpen && evt.source === menuView.parentMenuView ) {\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeOnParentClose(): Closing', logMenu( menuView ) );\n\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t}\n\t\t} );\n\t}\n};\n\n// @if CK_DEBUG_MENU_BAR // function logMenu( menuView: MenuBarMenuView ) {\n// @if CK_DEBUG_MENU_BAR //\treturn `\"${ menuView.buttonView.label }\"`;\n// @if CK_DEBUG_MENU_BAR // }\n\n/**\n * Contains every positioning function used by {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} that decides where the\n * {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} should be placed.\n *\n * Top-level menu positioning functions:\n *\n *\t┌──────┐\n *\t│ │\n *\t├──────┴────────┐\n *\t│ │\n *\t│ │\n *\t│ │\n *\t│ SE │\n *\t└───────────────┘\n *\n *\t ┌──────┐\n *\t │ │\n *\t┌────────┴──────┤\n *\t│ │\n *\t│ │\n *\t│ │\n *\t│ SW │\n *\t└───────────────┘\n *\n *\t┌───────────────┐\n *\t│ NW │\n *\t│ │\n *\t│ │\n *\t│ │\n *\t└────────┬──────┤\n *\t │ │\n *\t └──────┘\n *\n *\t┌───────────────┐\n *\t│ NE │\n *\t│ │\n *\t│ │\n *\t│ │\n *\t├──────┬────────┘\n *\t│ │\n *\t└──────┘\n *\n * Sub-menu positioning functions:\n *\n *\t┌──────┬───────────────┐\n *\t│ │ │\n *\t└──────┤ │\n *\t │ │\n *\t │ ES │\n *\t └───────────────┘\n *\n *\t┌───────────────┬──────┐\n *\t│ │ │\n *\t│ ├──────┘\n *\t│ │\n *\t│ WS │\n *\t└───────────────┘\n *\n *\t ┌───────────────┐\n *\t │ EN │\n *\t │ │\n *\t┌──────┤ │\n *\t│ │ │\n *\t└──────┴───────────────┘\n *\n *\t┌───────────────┐\n *\t│ WN │\n *\t│ │\n *\t│ ├──────┐\n *\t│ │ │\n *\t└───────────────┴──────┘\n */\nexport const MenuBarMenuViewPanelPositioningFunctions: Record = {\n\tsouthEast: buttonRect => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: 'se'\n\t\t};\n\t},\n\tsouthWest: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: 'sw'\n\t\t};\n\t},\n\tnorthEast: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: 'ne'\n\t\t};\n\t},\n\tnorthWest: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: 'nw'\n\t\t};\n\t},\n\teastSouth: buttonRect => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'es'\n\t\t};\n\t},\n\teastNorth: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'en'\n\t\t};\n\t},\n\twestSouth: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'ws'\n\t\t};\n\t},\n\twestNorth: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'wn'\n\t\t};\n\t}\n} as const;\n\n/**\n * The default items {@link module:core/editor/editorconfig~EditorConfig#menuBar configuration} of the\n * {@link module:ui/menubar/menubarview~MenuBarView} component. It contains names of all menu bar components\n * registered in the {@link module:ui/componentfactory~ComponentFactory component factory} (available in the project).\n *\n * **Note**: Menu bar component names provided by core editor features are prefixed with `menuBar:` in order to distinguish\n * them from components referenced by the {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}, for instance,\n * `'menuBar:bold'` is a menu bar button but `'bold'` is a toolbar button.\n *\n * Below is the preset menu bar structure (the default value of `config.menuBar.items` property):\n *\n * ```ts\n * [\n * \t{\n * \t\tmenuId: 'file',\n * \t\tlabel: 'File',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'export',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:exportPdf',\n * \t\t\t\t\t'menuBar:exportWord'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'import',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:importWord'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'revisionHistory',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:revisionHistory'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'edit',\n * \t\tlabel: 'Edit',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'undo',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:undo',\n * \t\t\t\t\t'menuBar:redo'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'selectAll',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:selectAll'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'findAndReplace',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:findAndReplace'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'view',\n * \t\tlabel: 'View',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'sourceEditing',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:sourceEditing'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'showBlocks',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:showBlocks'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'restrictedEditingException',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:restrictedEditingException'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'insert',\n * \t\tlabel: 'Insert',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertMainWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:uploadImage',\n * \t\t\t\t\t'menuBar:ckbox',\n * \t\t\t\t\t'menuBar:ckfinder',\n * \t\t\t\t\t'menuBar:insertTable'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertInline',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:link',\n * \t\t\t\t\t'menuBar:comment'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertMinorWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:insertTemplate',\n * \t\t\t\t\t'menuBar:blockQuote',\n * \t\t\t\t\t'menuBar:codeBlock',\n * \t\t\t\t\t'menuBar:htmlEmbed'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertStructureWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:horizontalLine',\n * \t\t\t\t\t'menuBar:pageBreak',\n * \t\t\t\t\t'menuBar:tableOfContents'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'restrictedEditing',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:restrictedEditing'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'format',\n * \t\tlabel: 'Format',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'textAndFont',\n * \t\t\t\titems: [\n * \t\t\t\t\t{\n * \t\t\t\t\t\tmenuId: 'text',\n * \t\t\t\t\t\tlabel: 'Text',\n * \t\t\t\t\t\tgroups: [\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:bold',\n * \t\t\t\t\t\t\t\t\t'menuBar:italic',\n * \t\t\t\t\t\t\t\t\t'menuBar:underline',\n * \t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n * \t\t\t\t\t\t\t\t\t'menuBar:superscript',\n * \t\t\t\t\t\t\t\t\t'menuBar:subscript',\n * \t\t\t\t\t\t\t\t\t'menuBar:code'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t]\n * \t\t\t\t\t},\n * \t\t\t\t\t{\n * \t\t\t\t\t\tmenuId: 'font',\n * \t\t\t\t\t\tlabel: 'Font',\n * \t\t\t\t\t\tgroups: [\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n * \t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'fontColors',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n * \t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'highlight',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:highlight'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t]\n * \t\t\t\t\t},\n * \t\t\t\t\t'menuBar:heading'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'list',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:bulletedList',\n * \t\t\t\t\t'menuBar:numberedList',\n * \t\t\t\t\t'menuBar:todoList'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'indent',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:alignment',\n * \t\t\t\t\t'menuBar:indent',\n * \t\t\t\t\t'menuBar:outdent'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'caseChange',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:caseChange'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'removeFormat',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:removeFormat'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'tools',\n * \t\tlabel: 'Tools',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'aiTools',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:aiAssistant',\n * \t\t\t\t\t'menuBar:aiCommands'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'tools',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:trackChanges',\n * \t\t\t\t\t'menuBar:commentsArchive'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'help',\n * \t\tlabel: 'Help',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'help',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:accessibilityHelp'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t}\n * ];\n * ```\n *\n * The menu bar can be customized using the `config.menuBar.removeItems` and `config.menuBar.addItems` properties.\n */\n// **NOTE: Whenever you make changes to this value, reflect it in the documentation above!**\nexport const DefaultMenuBarItems: DeepReadonly = [\n\t{\n\t\tmenuId: 'file',\n\t\tlabel: 'File',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'export',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:exportPdf',\n\t\t\t\t\t'menuBar:exportWord'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'import',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:importWord'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'revisionHistory',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:revisionHistory'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'edit',\n\t\tlabel: 'Edit',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'undo',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:undo',\n\t\t\t\t\t'menuBar:redo'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'selectAll',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:selectAll'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'findAndReplace',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:findAndReplace'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'view',\n\t\tlabel: 'View',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'sourceEditing',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:sourceEditing'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'showBlocks',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:showBlocks'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'restrictedEditingException',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:restrictedEditingException'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'insert',\n\t\tlabel: 'Insert',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'insertMainWidgets',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:uploadImage',\n\t\t\t\t\t'menuBar:ckbox',\n\t\t\t\t\t'menuBar:ckfinder',\n\t\t\t\t\t'menuBar:insertTable'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'insertInline',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:link',\n\t\t\t\t\t'menuBar:comment'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'insertMinorWidgets',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:insertTemplate',\n\t\t\t\t\t'menuBar:blockQuote',\n\t\t\t\t\t'menuBar:codeBlock',\n\t\t\t\t\t'menuBar:htmlEmbed'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'insertStructureWidgets',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:horizontalLine',\n\t\t\t\t\t'menuBar:pageBreak',\n\t\t\t\t\t'menuBar:tableOfContents'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'restrictedEditing',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:restrictedEditing'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'format',\n\t\tlabel: 'Format',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'textAndFont',\n\t\t\t\titems: [\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: 'text',\n\t\t\t\t\t\tlabel: 'Text',\n\t\t\t\t\t\tgroups: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:bold',\n\t\t\t\t\t\t\t\t\t'menuBar:italic',\n\t\t\t\t\t\t\t\t\t'menuBar:underline',\n\t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n\t\t\t\t\t\t\t\t\t'menuBar:superscript',\n\t\t\t\t\t\t\t\t\t'menuBar:subscript',\n\t\t\t\t\t\t\t\t\t'menuBar:code'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: 'font',\n\t\t\t\t\t\tlabel: 'Font',\n\t\t\t\t\t\tgroups: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n\t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'fontColors',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n\t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'highlight',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:highlight'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t'menuBar:heading'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'list',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:bulletedList',\n\t\t\t\t\t'menuBar:numberedList',\n\t\t\t\t\t'menuBar:todoList'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'indent',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:alignment',\n\t\t\t\t\t'menuBar:indent',\n\t\t\t\t\t'menuBar:outdent'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'caseChange',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:caseChange'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'removeFormat',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:removeFormat'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'tools',\n\t\tlabel: 'Tools',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'aiTools',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:aiAssistant',\n\t\t\t\t\t'menuBar:aiCommands'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'tools',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:trackChanges',\n\t\t\t\t\t'menuBar:commentsArchive'\n\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'help',\n\t\tlabel: 'Help',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'help',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:accessibilityHelp'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}\n];\n\n/**\n * Performs a cleanup and normalization of the menu bar configuration.\n */\nexport function normalizeMenuBarConfig( config: Readonly ): NormalizedMenuBarConfigObject {\n\tlet configObject: NormalizedMenuBarConfigObject;\n\n\t// The integrator specified the config as an object but without items. Let's give them defaults but respect their\n\t// additions and removals.\n\tif ( !( 'items' in config ) || !config.items ) {\n\t\tconfigObject = {\n\t\t\titems: cloneDeep( DefaultMenuBarItems ) as Array,\n\t\t\taddItems: [],\n\t\t\tremoveItems: [],\n\t\t\tisVisible: true,\n\t\t\tisUsingDefaultConfig: true,\n\t\t\t...config\n\t\t};\n\t}\n\t// The integrator specified the config as an object and there are items there. Let's take it as it is.\n\telse {\n\t\tconfigObject = {\n\t\t\titems: config.items,\n\t\t\tremoveItems: [],\n\t\t\taddItems: [],\n\t\t\tisVisible: true,\n\t\t\tisUsingDefaultConfig: false,\n\t\t\t...config\n\t\t};\n\t}\n\n\treturn configObject;\n}\n\n/**\n * Processes a normalized menu bar config and returns a config clone with the following modifications:\n *\n * * Removed components that are not available in the component factory,\n * * Removed obsolete separators,\n * * Purged empty menus,\n * * Localized top-level menu labels.\n */\nexport function processMenuBarConfig( {\n\tnormalizedConfig,\n\tlocale,\n\tcomponentFactory\n}: {\n\tnormalizedConfig: NormalizedMenuBarConfigObject;\n\tlocale: Locale;\n\tcomponentFactory: ComponentFactory;\n} ): NormalizedMenuBarConfigObject {\n\tconst configClone = cloneDeep( normalizedConfig ) as NormalizedMenuBarConfigObject;\n\n\thandleRemovals( normalizedConfig, configClone );\n\thandleAdditions( normalizedConfig, configClone );\n\tpurgeUnavailableComponents( normalizedConfig, configClone, componentFactory );\n\tpurgeEmptyMenus( normalizedConfig, configClone );\n\tlocalizeMenuLabels( configClone, locale );\n\n\treturn configClone;\n}\n\n/**\n * Removes items from the menu bar config based on user `removeItems` configuration. Users can remove\n * individual items, groups, or entire menus. For each removed item, a warning is logged if the item\n * was not found in the configuration.\n */\nfunction handleRemovals(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject\n) {\n\tconst itemsToBeRemoved = config.removeItems;\n\tconst successfullyRemovedItems: Array = [];\n\n\t// Remove top-level menus.\n\tconfig.items = config.items.filter( ( { menuId } ) => {\n\t\tif ( itemsToBeRemoved.includes( menuId ) ) {\n\t\t\tsuccessfullyRemovedItems.push( menuId );\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\t// Remove groups from menus.\n\t\tmenuDefinition.groups = menuDefinition.groups.filter( ( { groupId } ) => {\n\t\t\tif ( itemsToBeRemoved.includes( groupId ) ) {\n\t\t\t\tsuccessfullyRemovedItems.push( groupId );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\n\t\t// Remove sub-menus and items from groups.\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tgroupDefinition.items = groupDefinition.items.filter( item => {\n\t\t\t\tconst itemId = getIdFromGroupItem( item );\n\n\t\t\t\tif ( itemsToBeRemoved.includes( itemId ) ) {\n\t\t\t\t\tsuccessfullyRemovedItems.push( itemId );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t}\n\t} );\n\n\tfor ( const itemName of itemsToBeRemoved ) {\n\t\tif ( !successfullyRemovedItems.includes( itemName ) ) {\n\t\t\t/**\n\t\t\t * There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t * name does could not be removed from the menu bar configuration.\n\t\t\t *\n\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t *\n\t\t\t * @error menu-bar-item-could-not-be-removed\n\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t * @param itemName The name of the item that was not removed from the menu bar.\n\t\t\t */\n\t\t\tlogWarning( 'menu-bar-item-could-not-be-removed', {\n\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\titemName\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * Handles the `config.menuBar.addItems` configuration. It allows for adding menus, groups, and items at arbitrary\n * positions in the menu bar. If the position does not exist, a warning is logged.\n */\nfunction handleAdditions(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject\n) {\n\tconst itemsToBeAdded = config.addItems;\n\tconst successFullyAddedItems: typeof itemsToBeAdded = [];\n\n\tfor ( const itemToAdd of itemsToBeAdded ) {\n\t\tconst relation = getRelationFromPosition( itemToAdd.position );\n\t\tconst relativeId = getRelativeIdFromPosition( itemToAdd.position );\n\n\t\t// Adding a menu.\n\t\tif ( isMenuBarMenuAddition( itemToAdd ) ) {\n\t\t\tif ( !relativeId ) {\n\t\t\t\t// Adding a top-level menu at the beginning of the menu bar.\n\t\t\t\tif ( relation === 'start' ) {\n\t\t\t\t\tconfig.items.unshift( itemToAdd.menu );\n\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t}\n\t\t\t\t// Adding a top-level menu at the end of the menu bar.\n\t\t\t\telse if ( relation === 'end' ) {\n\t\t\t\t\tconfig.items.push( itemToAdd.menu );\n\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst topLevelMenuDefinitionIndex = config.items.findIndex( menuDefinition => menuDefinition.menuId === relativeId );\n\n\t\t\t\t// Adding a top-level menu somewhere between existing menu bar menus.\n\t\t\t\tif ( topLevelMenuDefinitionIndex != -1 ) {\n\t\t\t\t\tif ( relation === 'before' ) {\n\t\t\t\t\t\tconfig.items.splice( topLevelMenuDefinitionIndex, 0, itemToAdd.menu );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t} else if ( relation === 'after' ) {\n\t\t\t\t\t\tconfig.items.splice( topLevelMenuDefinitionIndex + 1, 0, itemToAdd.menu );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Adding a sub-menu to an existing items group.\n\t\t\t\telse {\n\t\t\t\t\tconst wasAdded = addMenuOrItemToGroup( config, itemToAdd.menu, relativeId, relation );\n\n\t\t\t\t\tif ( wasAdded ) {\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Adding a group.\n\t\telse if ( isMenuBarMenuGroupAddition( itemToAdd ) ) {\n\t\t\twalkConfigMenus( config.items, menuDefinition => {\n\t\t\t\tif ( menuDefinition.menuId === relativeId ) {\n\t\t\t\t\t// Add a group at the start of a menu.\n\t\t\t\t\tif ( relation === 'start' ) {\n\t\t\t\t\t\tmenuDefinition.groups.unshift( itemToAdd.group );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t\t// Add a group at the end of a menu.\n\t\t\t\t\telse if ( relation === 'end' ) {\n\t\t\t\t\t\tmenuDefinition.groups.push( itemToAdd.group );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst relativeGroupIndex = menuDefinition.groups.findIndex( group => group.groupId === relativeId );\n\n\t\t\t\t\tif ( relativeGroupIndex !== -1 ) {\n\t\t\t\t\t\t// Add a group before an existing group in a menu.\n\t\t\t\t\t\tif ( relation === 'before' ) {\n\t\t\t\t\t\t\tmenuDefinition.groups.splice( relativeGroupIndex, 0, itemToAdd.group );\n\t\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add a group after an existing group in a menu.\n\t\t\t\t\t\telse if ( relation === 'after' ) {\n\t\t\t\t\t\t\tmenuDefinition.groups.splice( relativeGroupIndex + 1, 0, itemToAdd.group );\n\t\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\t// Adding an item to an existing items group.\n\t\telse {\n\t\t\tconst wasAdded = addMenuOrItemToGroup( config, itemToAdd.item, relativeId, relation );\n\n\t\t\tif ( wasAdded ) {\n\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const addedItemConfig of itemsToBeAdded ) {\n\t\tif ( !successFullyAddedItems.includes( addedItemConfig ) ) {\n\t\t\t/**\n\t\t\t * There was a problem processing the configuration of the menu bar. The configured item could not be added\n\t\t\t * because the position it was supposed to be added to does not exist.\n\t\t\t *\n\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t *\n\t\t\t * @error menu-bar-item-could-not-be-removed\n\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t * @param itemName The name of the item that was not removed from the menu bar.\n\t\t\t */\n\t\t\tlogWarning( 'menu-bar-item-could-not-be-added', {\n\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\taddedItemConfig\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * Handles adding a sub-menu or an item into a group. The logic is the same for both cases.\n */\nfunction addMenuOrItemToGroup(\n\tconfig: NormalizedMenuBarConfigObject,\n\titemOrMenuToAdd: string | MenuBarMenuDefinition,\n\trelativeId: string | null,\n\trelation: 'start' | 'end' | 'before' | 'after'\n): boolean {\n\tlet wasAdded = false;\n\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\tfor ( const { groupId, items: groupItems } of menuDefinition.groups ) {\n\t\t\t// Avoid infinite loops.\n\t\t\tif ( wasAdded ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( groupId === relativeId ) {\n\t\t\t\t// Adding an item/menu at the beginning of a group.\n\t\t\t\tif ( relation === 'start' ) {\n\t\t\t\t\tgroupItems.unshift( itemOrMenuToAdd );\n\t\t\t\t\twasAdded = true;\n\t\t\t\t}\n\t\t\t\t// Adding an item/menu at the end of a group.\n\t\t\t\telse if ( relation === 'end' ) {\n\t\t\t\t\tgroupItems.push( itemOrMenuToAdd );\n\t\t\t\t\twasAdded = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Adding an item/menu relative to an existing item/menu.\n\t\t\t\tconst relativeItemIndex = groupItems.findIndex( groupItem => {\n\t\t\t\t\treturn getIdFromGroupItem( groupItem ) === relativeId;\n\t\t\t\t} );\n\n\t\t\t\tif ( relativeItemIndex !== -1 ) {\n\t\t\t\t\tif ( relation === 'before' ) {\n\t\t\t\t\t\tgroupItems.splice( relativeItemIndex, 0, itemOrMenuToAdd );\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t} else if ( relation === 'after' ) {\n\t\t\t\t\t\tgroupItems.splice( relativeItemIndex + 1, 0, itemOrMenuToAdd );\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn wasAdded;\n}\n\n/**\n * Removes components from the menu bar configuration that are not available in the factory and would\n * not be instantiated. Warns about missing components if the menu bar configuration was specified by the user.\n */\nfunction purgeUnavailableComponents(\n\toriginalConfig: DeepReadonly,\n\tconfig: NormalizedMenuBarConfigObject,\n\tcomponentFactory: ComponentFactory\n) {\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tgroupDefinition.items = groupDefinition.items.filter( item => {\n\t\t\t\tconst isItemUnavailable = typeof item === 'string' && !componentFactory.has( item );\n\n\t\t\t\t// The default configuration contains all possible editor features. But integrators' editors rarely load\n\t\t\t\t// every possible feature. This is why we do not want to log warnings about unavailable items for the default config\n\t\t\t\t// because they would show up in almost every integration. If the configuration has been provided by\n\t\t\t\t// the integrator, on the other hand, then these warnings bring value.\n\t\t\t\tif ( isItemUnavailable && !config.isUsingDefaultConfig ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t\t\t * name does not exist so it was omitted when rendering the menu bar.\n\t\t\t\t\t *\n\t\t\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t\t\t *\n\t\t\t\t\t * Make sure the plugin responsible for this menu bar item is loaded and the menu bar configuration\n\t\t\t\t\t * is correct, e.g. {@link module:basic-styles/bold/boldui~BoldUI} is loaded for the `'menuBar:bold'`\n\t\t\t\t\t * menu bar item.\n\t\t\t\t\t *\n\t\t\t\t\t * @error menu-bar-item-unavailable\n\t\t\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t\t\t * @param parentMenuConfig The config of the menu the unavailable component was defined in.\n\t\t\t\t\t * @param componentName The name of the unavailable component.\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'menu-bar-item-unavailable', {\n\t\t\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\t\t\tparentMenuConfig: cloneDeep( menuDefinition ),\n\t\t\t\t\t\tcomponentName: item\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn !isItemUnavailable;\n\t\t\t} );\n\t\t}\n\t} );\n}\n\n/**\n * Removes empty menus from the menu bar configuration to improve the visual UX. Such menus can occur\n * when some plugins responsible for providing menu bar items have not been loaded and some part of\n * the configuration populated menus using these components exclusively.\n */\nfunction purgeEmptyMenus(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject\n) {\n\tconst isUsingDefaultConfig = config.isUsingDefaultConfig;\n\tlet wasSubMenuPurged = false;\n\n\t// Purge top-level menus.\n\tconfig.items = config.items.filter( menuDefinition => {\n\t\tif ( !menuDefinition.groups.length ) {\n\t\t\twarnAboutEmptyMenu( originalConfig, menuDefinition, isUsingDefaultConfig );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n\n\t// Warn if there were no top-level menus left in the menu bar after purging.\n\tif ( !config.items.length ) {\n\t\twarnAboutEmptyMenu( originalConfig, originalConfig, isUsingDefaultConfig );\n\n\t\treturn;\n\t}\n\n\t// Purge sub-menus and groups.\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\t// Get rid of empty groups.\n\t\tmenuDefinition.groups = menuDefinition.groups.filter( groupDefinition => {\n\t\t\tif ( !groupDefinition.items.length ) {\n\t\t\t\twasSubMenuPurged = true;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\n\t\t// Get rid of empty sub-menus.\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tgroupDefinition.items = groupDefinition.items.filter( item => {\n\t\t\t\t// If no groups were left after removing empty ones.\n\t\t\t\tif ( isMenuDefinition( item ) && !item.groups.length ) {\n\t\t\t\t\twarnAboutEmptyMenu( originalConfig, item, isUsingDefaultConfig );\n\t\t\t\t\twasSubMenuPurged = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t}\n\t} );\n\n\tif ( wasSubMenuPurged ) {\n\t\t// The config is walked from the root to the leaves so if anything gets removed, we need to re-run the\n\t\t// whole process because it could've affected parents.\n\t\tpurgeEmptyMenus( originalConfig, config );\n\t}\n}\n\nfunction warnAboutEmptyMenu(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\temptyMenuConfig: MenuBarMenuDefinition | DeepReadonly,\n\tisUsingDefaultConfig: boolean\n) {\n\tif ( isUsingDefaultConfig ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * There was a problem processing the configuration of the menu bar. One of the menus\n\t * is empty so it was omitted when rendering the menu bar.\n\t *\n\t * This warning usually shows up when some {@link module:core/plugin~Plugin plugins} responsible for\n\t * providing menu bar items have not been loaded and the\n\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration} was not updated.\n\t *\n\t * Make sure all necessary editor plugins are loaded and/or update the menu bar configuration\n\t * to account for the missing menu items.\n\t *\n\t * @error menu-bar-menu-empty\n\t * @param menuBarConfig The full configuration of the menu bar.\n\t * @param emptyMenuConfig The definition of the menu that has no child items.\n\t */\n\tlogWarning( 'menu-bar-menu-empty', {\n\t\tmenuBarConfig: originalConfig,\n\t\temptyMenuConfig\n\t} );\n}\n\n/**\n * Localizes the user-config using pre-defined localized category labels.\n */\nfunction localizeMenuLabels( config: NormalizedMenuBarConfigObject, locale: Locale ) {\n\tconst t = locale.t;\n\tconst localizedCategoryLabels: Record = {\n\t\t// Top-level categories.\n\t\t'File': t( {\n\t\t\tstring: 'File',\n\t\t\tid: 'MENU_BAR_MENU_FILE'\n\t\t} ),\n\t\t'Edit': t( {\n\t\t\tstring: 'Edit',\n\t\t\tid: 'MENU_BAR_MENU_EDIT'\n\t\t} ),\n\t\t'View': t( {\n\t\t\tstring: 'View',\n\t\t\tid: 'MENU_BAR_MENU_VIEW'\n\t\t} ),\n\t\t'Insert': t( {\n\t\t\tstring: 'Insert',\n\t\t\tid: 'MENU_BAR_MENU_INSERT'\n\t\t} ),\n\t\t'Format': t( {\n\t\t\tstring: 'Format',\n\t\t\tid: 'MENU_BAR_MENU_FORMAT'\n\t\t} ),\n\t\t'Tools': t( {\n\t\t\tstring: 'Tools',\n\t\t\tid: 'MENU_BAR_MENU_TOOLS'\n\t\t} ),\n\t\t'Help': t( {\n\t\t\tstring: 'Help',\n\t\t\tid: 'MENU_BAR_MENU_HELP'\n\t\t} ),\n\n\t\t// Sub-menus.\n\t\t'Text': t( {\n\t\t\tstring: 'Text',\n\t\t\tid: 'MENU_BAR_MENU_TEXT'\n\t\t} ),\n\t\t'Font': t( {\n\t\t\tstring: 'Font',\n\t\t\tid: 'MENU_BAR_MENU_FONT'\n\t\t} )\n\t};\n\n\twalkConfigMenus( config.items, definition => {\n\t\tif ( definition.label in localizedCategoryLabels ) {\n\t\t\tdefinition.label = localizedCategoryLabels[ definition.label ];\n\t\t}\n\t} );\n}\n\n/**\n * Recursively visits all menu definitions in the config and calls the callback for each of them.\n */\nfunction walkConfigMenus(\n\tdefinition: NormalizedMenuBarConfigObject[ 'items' ] | MenuBarMenuDefinition,\n\tcallback: ( definition: MenuBarMenuDefinition ) => void\n) {\n\tif ( Array.isArray( definition ) ) {\n\t\tfor ( const topLevelMenuDefinition of definition ) {\n\t\t\twalk( topLevelMenuDefinition );\n\t\t}\n\t}\n\n\tfunction walk( menuDefinition: MenuBarMenuDefinition ) {\n\t\tcallback( menuDefinition );\n\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tfor ( const groupItem of groupDefinition.items ) {\n\t\t\t\tif ( isMenuDefinition( groupItem ) ) {\n\t\t\t\t\twalk( groupItem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction isMenuBarMenuAddition( definition: any ): definition is MenuBarConfigAddedMenu {\n\treturn typeof definition === 'object' && 'menu' in definition;\n}\n\nfunction isMenuBarMenuGroupAddition( definition: any ): definition is MenuBarConfigAddedGroup {\n\treturn typeof definition === 'object' && 'group' in definition;\n}\n\nfunction getRelationFromPosition( position: MenuBarConfigAddedPosition ): 'start' | 'end' | 'before' | 'after' {\n\tif ( position.startsWith( 'start' ) ) {\n\t\treturn 'start';\n\t} else if ( position.startsWith( 'end' ) ) {\n\t\treturn 'end';\n\t} else if ( position.startsWith( 'after' ) ) {\n\t\treturn 'after';\n\t} else {\n\t\treturn 'before';\n\t}\n}\n\nfunction getRelativeIdFromPosition( position: MenuBarConfigAddedPosition ): string | null {\n\tconst match = position.match( /^[^:]+:(.+)/ );\n\n\tif ( match ) {\n\t\treturn match[ 1 ];\n\t}\n\n\treturn null;\n}\n\nfunction getIdFromGroupItem( item: string | MenuBarMenuDefinition ): string {\n\treturn typeof item === 'string' ? item : item.menuId;\n}\n\nfunction isMenuDefinition( definition: any ): definition is MenuBarMenuDefinition {\n\treturn typeof definition === 'object' && 'menuId' in definition;\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./menubarmenupanel.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/**\n * @module ui/menubar/menubarmenupanelview\n */\n\nimport { type Locale } from '@ckeditor/ckeditor5-utils';\nimport type { FocusableView } from '../focuscycler.js';\nimport type ViewCollection from '../viewcollection.js';\nimport View from '../view.js';\n\nimport '../../theme/components/menubar/menubarmenupanel.css';\n\n/**\n * A view representing a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} of a menu.\n */\nexport default class MenuBarMenuPanelView extends View implements FocusableView {\n\t/**\n\t * Collection of the child views in this panel.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * Controls whether the panel is visible.\n\t *\n\t * @observable\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * The name of the position of the panel, relative to the parent.\n\t *\n\t * This property is reflected in the CSS class suffix set to {@link #element} that controls\n\t * the position of the panel.\n\t *\n\t * @observable\n\t * @default 'se'\n\t */\n\tdeclare public position: MenuBarMenuPanelPosition;\n\n\t/**\n\t * Creates an instance of the menu panel view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'position', 'se' );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset',\n\t\t\t\t\t'ck-menu-bar__menu__panel',\n\t\t\t\t\tbind.to( 'position', value => `ck-menu-bar__menu__panel_position_${ value }` ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children,\n\n\t\t\ton: {\n\t\t\t\t// Drag and drop in the panel should not break the selection in the editor.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/228\n\t\t\t\tselectstart: bind.to( evt => {\n\t\t\t\t\tif ( ( evt.target as HTMLElement ).tagName.toLocaleLowerCase() === 'input' ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t */\n\tpublic focus( direction: -1 | 1 = 1 ): void {\n\t\tif ( this.children.length ) {\n\t\t\tif ( direction === 1 ) {\n\t\t\t\tthis.children.first!.focus();\n\t\t\t} else {\n\t\t\t\tthis.children.last!.focus();\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * The names of the positions of the {@link module:ui/menubar/menubarmenupanelview~MenuBarMenuPanelView}.\n *\n * They are reflected as CSS class suffixes on the panel view element.\n */\nexport type MenuBarMenuPanelPosition = 'se' | 'sw' | 'ne' | 'nw' | 'w' | 'e';\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./menubarmenu.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/**\n * @module ui/menubar/menubarmenuview\n */\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\tgetOptimalPosition,\n\ttype Locale,\n\ttype PositioningFunction,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\nimport MenuBarMenuButtonView from './menubarmenubuttonview.js';\nimport { MenuBarMenuBehaviors, MenuBarMenuViewPanelPositioningFunctions } from './utils.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport View from '../view.js';\nimport {\n\tdefault as MenuBarMenuPanelView,\n\ttype MenuBarMenuPanelPosition\n} from './menubarmenupanelview.js';\n\nimport '../../theme/components/menubar/menubarmenu.css';\n\n/**\n * A menu view for the {@link module:ui/menubar/menubarview~MenuBarView}. Menus are building blocks of the menu bar,\n * they host other sub-menus and menu items (buttons) that users can interact with.\n */\nexport default class MenuBarMenuView extends View implements FocusableView {\n\t/**\n\t * Button of the menu view.\n\t */\n\tpublic readonly buttonView: MenuBarMenuButtonView;\n\n\t/**\n\t * Panel of the menu. It hosts children of the menu.\n\t */\n\tpublic readonly panelView: MenuBarMenuPanelView;\n\n\t/**\n\t * Tracks information about the DOM focus in the menu.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the menu.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Controls whether the menu is open, i.e. shows or hides the {@link #panelView panel}.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * Controls whether the menu is enabled, i.e. its {@link #buttonView} can be clicked.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * (Optional) The additional CSS class set on the menu {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * The name of the position of the {@link #panelView}, relative to the menu.\n\t *\n\t * **Note**: The value is updated each time the panel gets {@link #isOpen open}.\n\t *\n\t * @observable\n\t * @default 'w'\n\t */\n\tdeclare public panelPosition: MenuBarMenuPanelPosition;\n\n\t/**\n\t * The parent menu view of the menu. It is `null` for top-level menus.\n\t *\n\t * See {@link module:ui/menubar/menubarview~MenuBarView#registerMenu}.\n\t */\n\tdeclare public parentMenuView: MenuBarMenuView | null;\n\n\t/**\n\t * Creates an instance of the menu view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.buttonView = new MenuBarMenuButtonView( locale );\n\t\tthis.buttonView.delegate( 'mouseenter' ).to( this );\n\t\tthis.buttonView.bind( 'isOn', 'isEnabled' ).to( this, 'isOpen', 'isEnabled' );\n\n\t\tthis.panelView = new MenuBarMenuPanelView( locale );\n\t\tthis.panelView.bind( 'isVisible' ).to( this, 'isOpen' );\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.set( 'isOpen', false );\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'panelPosition', 'w' );\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'parentMenuView', null );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-menu-bar__menu',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isEnabled', 'ck-disabled', value => !value ),\n\t\t\t\t\tbind.if( 'parentMenuView', 'ck-menu-bar__menu_top-level', value => !value )\n\t\t\t\t]\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.buttonView,\n\t\t\t\tthis.panelView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.buttonView.element! );\n\t\tthis.focusTracker.add( this.panelView.element! );\n\n\t\t// Listen for keystrokes coming from within #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tMenuBarMenuBehaviors.closeOnEscKey( this );\n\n\t\tthis._repositionPanelOnOpen();\n\t}\n\n\t// For now, this method cannot be called in the render process because the `parentMenuView` may be assigned\n\t// after the rendering process.\n\t//\n\t// TODO: We should reconsider the way we handle this logic.\n\t/**\n\t * Attach all keyboard behaviors for the menu bar view.\n\t *\n\t * @internal\n\t */\n\tpublic _attachBehaviors(): void {\n\t\t// Top-level menus.\n\t\tif ( !this.parentMenuView ) {\n\t\t\tthis._propagateArrowKeystrokeEvents();\n\n\t\t\tMenuBarMenuBehaviors.openAndFocusPanelOnArrowDownKey( this );\n\t\t\tMenuBarMenuBehaviors.toggleOnButtonClick( this );\n\t\t} else {\n\t\t\tMenuBarMenuBehaviors.openOnButtonClick( this );\n\t\t\tMenuBarMenuBehaviors.openOnArrowRightKey( this );\n\t\t\tMenuBarMenuBehaviors.closeOnArrowLeftKey( this );\n\t\t\tMenuBarMenuBehaviors.closeOnParentClose( this );\n\t\t}\n\t}\n\n\t/**\n\t * Fires `arrowright` and `arrowleft` events when the user pressed corresponding arrow keys.\n\t */\n\tprivate _propagateArrowKeystrokeEvents(): void {\n\t\tthis.keystrokes.set( 'arrowright', ( data, cancel ) => {\n\t\t\tthis.fire( 'arrowright' );\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis.keystrokes.set( 'arrowleft', ( data, cancel ) => {\n\t\t\tthis.fire( 'arrowleft' );\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Sets the position of the panel when the menu opens. The panel is positioned\n\t * so that it optimally uses the available space in the viewport.\n\t */\n\tprivate _repositionPanelOnOpen(): void {\n\t\t// Let the menu control the position of the panel. The position must be updated every time the menu is open.\n\t\tthis.on>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( !isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst optimalPanelPosition = MenuBarMenuView._getOptimalPosition( {\n\t\t\t\telement: this.panelView.element!,\n\t\t\t\ttarget: this.buttonView.element!,\n\t\t\t\tfitInViewport: true,\n\t\t\t\tpositions: this._panelPositions\n\t\t\t} );\n\n\t\t\tthis.panelView.position = (\n\t\t\t\toptimalPanelPosition ? optimalPanelPosition.name : this._panelPositions[ 0 ].name\n\t\t\t) as MenuBarMenuPanelPosition;\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus(): void {\n\t\tthis.buttonView.focus();\n\t}\n\n\t/**\n\t * Positioning functions for the {@link #panelView} . They change depending on the role of the menu (top-level vs sub-menu) in\n\t * the {@link module:ui/menubar/menubarview~MenuBarView menu bar} and the UI language direction.\n\t */\n\tpublic get _panelPositions(): Array {\n\t\tconst {\n\t\t\tsouthEast, southWest, northEast, northWest,\n\t\t\twestSouth, eastSouth, westNorth, eastNorth\n\t\t} = MenuBarMenuViewPanelPositioningFunctions;\n\n\t\tif ( this.locale!.uiLanguageDirection === 'ltr' ) {\n\t\t\tif ( this.parentMenuView ) {\n\t\t\t\treturn [ eastSouth, eastNorth, westSouth, westNorth ];\n\t\t\t} else {\n\t\t\t\treturn [ southEast, southWest, northEast, northWest ];\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.parentMenuView ) {\n\t\t\t\treturn [ westSouth, westNorth, eastSouth, eastNorth ];\n\t\t\t} else {\n\t\t\t\treturn [ southWest, southEast, northWest, northEast ];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t *\n\t * Referenced for unit testing purposes.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\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/**\n * @module ui/menubar/menubarmenulistview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport ListView from '../list/listview.js';\n\n/**\n * A list of menu bar items, a child of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView}.\n *\n * Use this class to create a list of items (options, buttons) to be displayed in a menu bar.\n *\n * To populate this list, use {@link module:ui/menubar/menubarmenulistitemview~MenuBarMenuListItemView} instances.\n */\nexport default class MenuBarMenuListView extends ListView {\n\t/**\n\t * Creates an instance of the list view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.role = 'menu';\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./menubarmenulistitembutton.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/**\n * @module ui/menubar/menubarmenulistitembuttonview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport ButtonView from '../button/buttonview.js';\n\nimport '../../theme/components/menubar/menubarmenulistitembutton.css';\n\n/**\n * A menu bar list button view. Buttons like this one execute user actions.\n */\nexport default class MenuBarMenuListItemButtonView extends ButtonView {\n\t/**\n\t * Creates an instance of the menu bar list button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-menu-bar__menu__item__button' ]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/menubar/menubarmenulistitemfiledialogbuttonview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport FileDialogButtonView from '../button/filedialogbuttonview.js';\n\nimport '../../theme/components/menubar/menubarmenulistitembutton.css';\n\n/**\n * A menu bar list file dialog button view. Buttons like this one execute user actions.\n *\n * This component provides a button that opens the native file selection dialog.\n */\nexport default class MenuBarMenuListItemFileDialogButtonView extends FileDialogButtonView {\n\t/**\n\t * Creates an instance of the menu bar list button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-menu-bar__menu__item__button' ]\n\t\t\t}\n\t\t} );\n\t}\n}\n","import api from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./menubar.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/**\n * @module editor-multi-root/multirooteditorui\n */\n\nimport {\n\ttype Editor\n} from 'ckeditor5/src/core.js';\n\nimport {\n\tEditorUI,\n\ttype EditorUIReadyEvent,\n\ttype InlineEditableUIView\n} from 'ckeditor5/src/ui.js';\n\nimport { enablePlaceholder } from 'ckeditor5/src/engine.js';\n\nimport type MultiRootEditorUIView from './multirooteditoruiview.js';\n\n/**\n * The multi-root editor UI class.\n */\nexport default class MultiRootEditorUI extends EditorUI {\n\t/**\n\t * The main (top–most) view of the editor UI.\n\t */\n\tpublic readonly view: MultiRootEditorUIView;\n\n\t/**\n\t * The editable element that was focused the last time when any of the editables had focus.\n\t */\n\tprivate _lastFocusedEditableElement: HTMLElement | null;\n\n\t/**\n\t * Creates an instance of the multi-root editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */\n\tconstructor( editor: Editor, view: MultiRootEditorUIView ) {\n\t\tsuper( editor );\n\n\t\tthis.view = view;\n\t\tthis._lastFocusedEditableElement = null;\n\t}\n\n\t/**\n\t * Initializes the UI.\n\t */\n\tpublic init(): void {\n\t\tconst view = this.view;\n\n\t\tview.render();\n\n\t\t// Keep track of the last focused editable element. Knowing which one was focused\n\t\t// is useful when the focus moves from editable to other UI components like balloons\n\t\t// (especially inputs) but the editable remains the \"focus context\" (e.g. link balloon\n\t\t// attached to a link in an editable). In this case, the editable should preserve visual\n\t\t// focus styles.\n\t\tthis.focusTracker.on( 'change:focusedElement', ( evt, name, focusedElement ) => {\n\t\t\tfor ( const editable of Object.values( this.view.editables ) ) {\n\t\t\t\tif ( focusedElement === editable.element ) {\n\t\t\t\t\tthis._lastFocusedEditableElement = editable.element;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// If the focus tracker loses focus, stop tracking the last focused editable element.\n\t\t// Wherever the focus is restored, it will no longer be in the context of that editable\n\t\t// because the focus \"came from the outside\", as opposed to the focus moving from one element\n\t\t// to another within the editor UI.\n\t\tthis.focusTracker.on( 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tif ( !isFocused ) {\n\t\t\t\tthis._lastFocusedEditableElement = null;\n\t\t\t}\n\t\t} );\n\n\t\tfor ( const editable of Object.values( this.view.editables ) ) {\n\t\t\tthis.addEditable( editable );\n\t\t}\n\n\t\tthis._initToolbar();\n\t\tthis.fire( 'ready' );\n\t}\n\n\t/**\n\t * Adds the editable to the editor UI.\n\t *\n\t * After the editable is added to the editor UI it can be considered \"active\".\n\t *\n\t * The editable is attached to the editor editing pipeline, which means that it will be updated as the editor model updates and\n\t * changing its content will be reflected in the editor model. Keystrokes, focus handling and placeholder are initialized.\n\t *\n\t * @param editable The editable instance to add.\n\t * @param placeholder Placeholder for the editable element. If not set, placeholder value from the\n\t * {@link module:core/editor/editorconfig~EditorConfig#placeholder editor configuration} will be used (if it was provided).\n\t */\n\tpublic addEditable( editable: InlineEditableUIView, placeholder?: string ): void {\n\t\t// The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n\t\t// But it can be available earlier if a DOM element has been passed to `MultiRootEditor.create()`.\n\t\tconst editableElement = editable.element!;\n\n\t\t// Bind the editable UI element to the editing view, making it an end– and entry–point\n\t\t// of the editor's engine. This is where the engine meets the UI.\n\t\tthis.editor.editing.view.attachDomRoot( editableElement, editable.name! );\n\n\t\t// Register each editable UI view in the editor.\n\t\tthis.setEditableElement( editable.name!, editableElement );\n\n\t\t// Let the editable UI element respond to the changes in the global editor focus\n\t\t// tracker. It has been added to the same tracker a few lines above but, in reality, there are\n\t\t// many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n\t\t// as they have focus, the editable should act like it is focused too (although technically\n\t\t// it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n\t\t// Doing otherwise will result in editable focus styles disappearing, once e.g. the\n\t\t// toolbar gets focused.\n\t\teditable.bind( 'isFocused' ).to( this.focusTracker, 'isFocused', this.focusTracker, 'focusedElement',\n\t\t\t( isFocused: boolean, focusedElement: Element | null ) => {\n\t\t\t\t// When the focus tracker is blurred, it means the focus moved out of the editor UI.\n\t\t\t\t// No editable will maintain focus then.\n\t\t\t\tif ( !isFocused ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// If the focus tracker says the editor UI is focused and currently focused element\n\t\t\t\t// is the editable, then the editable should be visually marked as focused too.\n\t\t\t\tif ( focusedElement === editableElement ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// If the focus tracker says the editor UI is focused but the focused element is\n\t\t\t\t// not an editable, it is possible that the editable is still (context–)focused.\n\t\t\t\t// For instance, the focused element could be an input inside of a balloon attached\n\t\t\t\t// to the content in the editable. In such case, the editable should remain _visually_\n\t\t\t\t// focused even though technically the focus is somewhere else. The focus moved from\n\t\t\t\t// the editable to the input but the focus context remained the same.\n\t\t\t\telse {\n\t\t\t\t\treturn this._lastFocusedEditableElement === editableElement;\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis._initPlaceholder( editable, placeholder );\n\t}\n\n\t/**\n\t * Removes the editable instance from the editor UI.\n\t *\n\t * Removed editable can be considered \"deactivated\".\n\t *\n\t * The editable is detached from the editing pipeline, so model changes are no longer reflected in it. All handling added in\n\t * {@link #addEditable} is removed.\n\t *\n\t * @param editable Editable to remove from the editor UI.\n\t */\n\tpublic removeEditable( editable: InlineEditableUIView ): void {\n\t\tthis.editor.editing.view.detachDomRoot( editable.name! );\n\t\teditable.unbind( 'isFocused' );\n\t\tthis.removeEditableElement( editable.name! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tfor ( const editable of Object.values( this.view.editables ) ) {\n\t\t\tthis.removeEditable( editable );\n\t\t}\n\n\t\tthis.view.destroy();\n\t}\n\n\t/**\n\t * Initializes the editor main toolbar and its panel.\n\t */\n\tprivate _initToolbar(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tconst toolbar = view.toolbar;\n\n\t\ttoolbar.fillFromConfig( editor.config.get( 'toolbar' ), this.componentFactory );\n\n\t\t// Register the toolbar, so it becomes available for Alt+F10 and Esc navigation.\n\t\tthis.addToolbar( view.toolbar );\n\t}\n\n\t/**\n\t * Enables the placeholder text on a given editable.\n\t *\n\t * @param editable Editable on which the placeholder should be set.\n\t * @param placeholder Placeholder for the editable element. If not set, placeholder value from the\n\t * {@link module:core/editor/editorconfig~EditorConfig#placeholder editor configuration} will be used (if it was provided).\n\t */\n\tprivate _initPlaceholder( editable: InlineEditableUIView, placeholder?: string ): void {\n\t\tif ( !placeholder ) {\n\t\t\tconst configPlaceholder = this.editor.config.get( 'placeholder' );\n\n\t\t\tif ( configPlaceholder ) {\n\t\t\t\tplaceholder = typeof configPlaceholder === 'string' ? configPlaceholder : configPlaceholder[ editable.name! ];\n\t\t\t}\n\t\t}\n\n\t\tconst editingView = this.editor.editing.view;\n\t\tconst editingRoot = editingView.document.getRoot( editable.name! )!;\n\n\t\tif ( placeholder ) {\n\t\t\teditingRoot.placeholder = placeholder;\n\t\t}\n\n\t\tenablePlaceholder( {\n\t\t\tview: editingView,\n\t\t\telement: editingRoot,\n\t\t\tisDirectHost: false,\n\t\t\tkeepOnFocus: true\n\t\t} );\n\t}\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/**\n * @module editor-multi-root/multirooteditoruiview\n */\n\nimport { EditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui.js';\nimport type { Locale } from 'ckeditor5/src/utils.js';\nimport type { EditingView } from 'ckeditor5/src/engine.js';\n\n/**\n * The multi-root editor UI view. It is a virtual view providing an inline\n * {@link module:editor-multi-root/multirooteditoruiview~MultiRootEditorUIView#editable} and a\n * {@link module:editor-multi-root/multirooteditoruiview~MultiRootEditorUIView#toolbar}, but without any\n * specific arrangement of the components in the DOM.\n *\n * See {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`}\n * to learn more about this view.\n */\nexport default class MultiRootEditorUIView extends EditorUIView {\n\t/**\n\t * The main toolbar of the multi-root editor UI.\n\t */\n\tpublic readonly toolbar: ToolbarView;\n\n\t/**\n\t * Editable elements used by the multi-root editor UI.\n\t */\n\tpublic readonly editables: Record;\n\n\tpublic readonly editable: InlineEditableUIView;\n\n\t/**\n\t * The editing view instance this view is related to.\n\t */\n\tprivate readonly _editingView: EditingView;\n\n\t/**\n\t * Creates an instance of the multi-root editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param editableNames Names for all editable views. For each name, one\n\t * {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView `InlineEditableUIView`} instance will be initialized.\n\t * @param options Configuration options for the view instance.\n\t * @param options.editableElements The editable elements to be used, assigned to their names. If not specified, they will be\n\t * automatically created by {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView `InlineEditableUIView`}\n\t * instances.\n\t * @param options.shouldToolbarGroupWhenFull When set to `true` enables automatic items grouping\n\t * in the main {@link module:editor-multi-root/multirooteditoruiview~MultiRootEditorUIView#toolbar toolbar}.\n\t * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableNames: Array,\n\t\toptions: {\n\t\t\teditableElements?: Record;\n\t\t\tshouldToolbarGroupWhenFull?: boolean;\n\t\t} = {}\n\t) {\n\t\tsuper( locale );\n\n\t\tthis._editingView = editingView;\n\n\t\tthis.toolbar = new ToolbarView( locale, {\n\t\t\tshouldGroupWhenFull: options.shouldToolbarGroupWhenFull\n\t\t} );\n\n\t\tthis.editables = {};\n\n\t\t// Create `InlineEditableUIView` instance for each editable.\n\t\tfor ( const editableName of editableNames ) {\n\t\t\tconst editableElement = options.editableElements ? options.editableElements[ editableName ] : undefined;\n\n\t\t\tthis.createEditable( editableName, editableElement );\n\t\t}\n\n\t\tthis.editable = Object.values( this.editables )[ 0 ];\n\n\t\t// This toolbar may be placed anywhere in the page so things like font size need to be reset in it.\n\t\t// Because of the above, make sure the toolbar supports rounded corners.\n\t\t// Also, make sure the toolbar has the proper dir attribute because its ancestor may not have one\n\t\t// and some toolbar item styles depend on this attribute.\n\t\tthis.toolbar.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-reset_all',\n\t\t\t\t\t'ck-rounded-corners'\n\t\t\t\t],\n\t\t\t\tdir: locale.uiLanguageDirection\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Creates an editable instance with given name and registers it in the editor UI view.\n\t *\n\t * If `editableElement` is provided, the editable instance will be created on top of it. Otherwise, the editor will create a new\n\t * DOM element and use it instead.\n\t *\n\t * @param editableName The name for the editable.\n\t * @param editableElement DOM element for which the editable should be created.\n\t * @returns The created editable instance.\n\t */\n\tpublic createEditable( editableName: string, editableElement?: HTMLElement ): InlineEditableUIView {\n\t\tconst t = this.locale.t;\n\n\t\tconst editable = new InlineEditableUIView( this.locale, this._editingView, editableElement, {\n\t\t\tlabel: editable => {\n\t\t\t\treturn t( 'Rich Text Editor. Editing area: %0', editable.name! );\n\t\t\t}\n\t\t} );\n\n\t\tthis.editables[ editableName ] = editable;\n\t\teditable.name = editableName;\n\n\t\tif ( this.isRendered ) {\n\t\t\tthis.registerChild( editable );\n\t\t}\n\n\t\treturn editable;\n\t}\n\n\t/**\n\t * Destroys and removes the editable from the editor UI view.\n\t *\n\t * @param editableName The name of the editable that should be removed.\n\t */\n\tpublic removeEditable( editableName: string ): void {\n\t\tconst editable = this.editables[ editableName ];\n\n\t\tif ( this.isRendered ) {\n\t\t\tthis.deregisterChild( editable );\n\t\t}\n\n\t\tdelete this.editables[ editableName ];\n\n\t\teditable.destroy();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.registerChild( Object.values( this.editables ) );\n\t\tthis.registerChild( this.toolbar );\n\t}\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/**\n * @module editor-multi-root/multirooteditor\n */\n\nimport {\n\tEditor,\n\tContext,\n\tsecureSourceElement,\n\ttype EditorConfig,\n\ttype EditorReadyEvent\n} from 'ckeditor5/src/core.js';\n\nimport {\n\tCKEditorError,\n\tgetDataFromElement,\n\tsetDataInElement,\n\tlogWarning,\n\ttype CollectionAddEvent,\n\ttype DecoratedMethodEvent\n} from 'ckeditor5/src/utils.js';\n\nimport { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';\n\nimport MultiRootEditorUI from './multirooteditorui.js';\nimport MultiRootEditorUIView from './multirooteditoruiview.js';\n\nimport { isElement as _isElement } from 'lodash-es';\nimport {\n\ttype RootElement,\n\ttype ViewRootEditableElement,\n\ttype Writer,\n\ttype ModelCanEditAtEvent\n} from 'ckeditor5/src/engine.js';\n\n/**\n * The {@glink installation/getting-started/predefined-builds#multi-root-editor multi-root editor} implementation.\n *\n * The multi-root editor provides multiple inline editable elements and a toolbar. All editable areas are controlled by one editor\n * instance, which means that they share common configuration, document ID, or undo stack.\n *\n * This type of editor is dedicated to integrations which require a customized UI with an open structure, featuring multiple editable areas,\n * allowing developers to have a control over the exact location of these editable areas.\n *\n * In order to create a multi-root editor instance, use the static\n * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`} method.\n *\n * Note that you will need to attach the editor toolbar to your web page manually, in a desired place, after the editor is initialized.\n *\n * # Multi-root editor and multi-root editor build\n *\n * The multi-root editor can be used directly from source (if you installed the\n * [`@ckeditor/ckeditor5-editor-multi-root`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-multi-root) package)\n * but it is also available in the\n * {@glink installation/getting-started/predefined-builds#multi-root-editor multi-root editor build}.\n *\n * {@glink installation/getting-started/predefined-builds Builds} are ready-to-use editors with plugins bundled in.\n *\n * When using the editor from source you need to take care of loading all plugins by yourself\n * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).\n * Using the editor from source gives much better flexibility and allows for easier customization.\n *\n * Read more about initializing the editor from source or as a build in\n * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`}.\n */\nexport default class MultiRootEditor extends Editor {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly ui: MultiRootEditorUI;\n\n\t/**\n\t * The elements on which the editor has been initialized.\n\t */\n\tpublic readonly sourceElements: Record;\n\n\t/**\n\t * Holds attributes keys that were passed in {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes `rootsAttributes`}\n\t * config property and should be returned by {@link #getRootsAttributes}.\n\t */\n\tprivate readonly _registeredRootsAttributesKeys = new Set();\n\n\t/**\n\t * A set of lock IDs for enabling or disabling particular root.\n\t */\n\tprivate readonly _readOnlyRootLocks = new Map>();\n\n\t/**\n\t * Creates an instance of the multi-root editor.\n\t *\n\t * **Note:** Do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`} method instead.\n\t *\n\t * @param sourceElementsOrData The DOM elements that will be the source for the created editor\n\t * or the editor's initial data. The editor will initialize multiple roots with names according to the keys in the passed object.\n\t * For more information see {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`}.\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( sourceElementsOrData: Record | Record, config: EditorConfig = {} ) {\n\t\tconst rootNames = Object.keys( sourceElementsOrData );\n\t\tconst sourceIsData = rootNames.length === 0 || typeof sourceElementsOrData[ rootNames[ 0 ] ] === 'string';\n\n\t\tif ( sourceIsData && config.initialData !== undefined && Object.keys( config.initialData ).length > 0 ) {\n\t\t\t// Documented in core/editor/editorconfig.jsdoc.\n\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\tthrow new CKEditorError( 'editor-create-initial-data', null );\n\t\t}\n\n\t\tsuper( config );\n\n\t\tif ( !sourceIsData ) {\n\t\t\tthis.sourceElements = sourceElementsOrData as Record;\n\t\t} else {\n\t\t\tthis.sourceElements = {};\n\t\t}\n\n\t\tif ( this.config.get( 'initialData' ) === undefined ) {\n\t\t\t// Create initial data object containing data from all roots.\n\t\t\tconst initialData: Record = {};\n\n\t\t\tfor ( const rootName of rootNames ) {\n\t\t\t\tinitialData[ rootName ] = getInitialData( sourceElementsOrData[ rootName ] );\n\t\t\t}\n\n\t\t\tthis.config.set( 'initialData', initialData );\n\t\t}\n\n\t\tif ( !sourceIsData ) {\n\t\t\tfor ( const rootName of rootNames ) {\n\t\t\t\tsecureSourceElement( this, sourceElementsOrData[ rootName ] as HTMLElement );\n\t\t\t}\n\t\t}\n\n\t\tthis.editing.view.document.roots.on>( 'add', ( evt, viewRoot ) => {\n\t\t\t// Here we change the standard binding of readOnly flag by adding\n\t\t\t// additional constraint that multi-root has (enabling / disabling particular root).\n\t\t\tviewRoot.unbind( 'isReadOnly' );\n\t\t\tviewRoot.bind( 'isReadOnly' ).to( this.editing.view.document, 'isReadOnly', isReadOnly => {\n\t\t\t\treturn isReadOnly || this._readOnlyRootLocks.has( viewRoot.rootName );\n\t\t\t} );\n\n\t\t\t// Hacky solution to nested editables.\n\t\t\t// Nested editables should be managed each separately and do not base on view document or view root.\n\t\t\tviewRoot.on( 'change:isReadOnly', ( evt, prop, value ) => {\n\t\t\t\tconst viewRange = this.editing.view.createRangeIn( viewRoot );\n\n\t\t\t\tfor ( const viewItem of viewRange.getItems() ) {\n\t\t\t\t\tif ( viewItem.is( 'editableElement' ) ) {\n\t\t\t\t\t\tviewItem.unbind( 'isReadOnly' );\n\t\t\t\t\t\tviewItem.isReadOnly = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\tfor ( const rootName of rootNames ) {\n\t\t\t// Create root and `UIView` element for each editable container.\n\t\t\tthis.model.document.createRoot( '$root', rootName );\n\t\t}\n\n\t\tif ( this.config.get( 'lazyRoots' ) ) {\n\t\t\tfor ( const rootName of this.config.get( 'lazyRoots' )! ) {\n\t\t\t\tconst root = this.model.document.createRoot( '$root', rootName );\n\n\t\t\t\troot._isLoaded = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.config.get( 'rootsAttributes' ) ) {\n\t\t\tconst rootsAttributes = this.config.get( 'rootsAttributes' )!;\n\n\t\t\tfor ( const [ rootName, attributes ] of Object.entries( rootsAttributes ) ) {\n\t\t\t\tif ( !this.model.document.getRoot( rootName ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Trying to set attributes on a non-existing root.\n\t\t\t\t\t *\n\t\t\t\t\t * Roots specified in {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes} do not match initial\n\t\t\t\t\t * editor roots.\n\t\t\t\t\t *\n\t\t\t\t\t * @error multi-root-editor-root-attributes-no-root\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'multi-root-editor-root-attributes-no-root', null );\n\t\t\t\t}\n\n\t\t\t\tfor ( const key of Object.keys( attributes ) ) {\n\t\t\t\t\tthis.registerRootAttribute( key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.data.on( 'init', () => {\n\t\t\t\tthis.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\t\tfor ( const [ name, attributes ] of Object.entries( rootsAttributes ) ) {\n\t\t\t\t\t\tconst root = this.model.document.getRoot( name )!;\n\n\t\t\t\t\t\tfor ( const [ key, value ] of Object.entries( attributes ) ) {\n\t\t\t\t\t\t\tif ( value !== null ) {\n\t\t\t\t\t\t\t\twriter.setAttribute( key, value, root! );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\tconst options = {\n\t\t\tshouldToolbarGroupWhenFull: !this.config.get( 'toolbar.shouldNotGroupWhenFull' ),\n\t\t\teditableElements: sourceIsData ? undefined : sourceElementsOrData as Record\n\t\t};\n\n\t\tconst view = new MultiRootEditorUIView( this.locale, this.editing.view, rootNames, options );\n\n\t\tthis.ui = new MultiRootEditorUI( this, view );\n\n\t\tthis.model.document.on( 'change:data', () => {\n\t\t\tconst changedRoots = this.model.document.differ.getChangedRoots();\n\n\t\t\t// Fire detaches first. If there are multiple roots removed and added in one batch, it should be easier to handle if\n\t\t\t// changes aren't mixed. Detaching will usually lead to just removing DOM elements. Detaching first will lead to a clean DOM\n\t\t\t// when new editables are added in `addRoot` event.\n\t\t\tfor ( const changes of changedRoots ) {\n\t\t\t\tconst root = this.model.document.getRoot( changes.name )!;\n\n\t\t\t\tif ( changes.state == 'detached' ) {\n\t\t\t\t\tthis.fire( 'detachRoot', root );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( const changes of changedRoots ) {\n\t\t\t\tconst root = this.model.document.getRoot( changes.name )!;\n\n\t\t\t\tif ( changes.state == 'attached' ) {\n\t\t\t\t\tthis.fire( 'addRoot', root );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Overwrite `Model#canEditAt()` decorated method.\n\t\t// Check if the provided selection is inside a read-only root. If so, return `false`.\n\t\tthis.listenTo( this.model, 'canEditAt', ( evt, [ selection ] ) => {\n\t\t\t// Skip empty selections.\n\t\t\tif ( !selection ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet selectionInReadOnlyRoot = false;\n\n\t\t\tfor ( const range of selection.getRanges() ) {\n\t\t\t\tconst root = range.root as RootElement;\n\n\t\t\t\tif ( this._readOnlyRootLocks.has( root.rootName ) ) {\n\t\t\t\t\tselectionInReadOnlyRoot = true;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If selection is in read-only root, return `false` and prevent further processing.\n\t\t\t// Otherwise, allow for other callbacks (or default callback) to evaluate.\n\t\t\tif ( selectionInReadOnlyRoot ) {\n\t\t\t\tevt.return = false;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\tthis.decorate( 'loadRoot' );\n\t\tthis.on( 'loadRoot', ( evt, [ rootName ] ) => {\n\t\t\tconst root = this.model.document.getRoot( rootName )!;\n\n\t\t\tif ( !root ) {\n\t\t\t\t/**\n\t\t\t\t * The root to load does not exist.\n\t\t\t\t *\n\t\t\t\t * @error multi-root-editor-load-root-no-root\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'multi-root-editor-load-root-no-root', this, { rootName } );\n\t\t\t}\n\n\t\t\tif ( root._isLoaded ) {\n\t\t\t\t/**\n\t\t\t\t * The root to load was already loaded before. The `loadRoot()` call has no effect.\n\t\t\t\t *\n\t\t\t\t * @error multi-root-editor-load-root-already-loaded\n\t\t\t\t */\n\t\t\t\tlogWarning( 'multi-root-editor-load-root-already-loaded' );\n\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t *\n\t * **Note**: The multi-root editor does not remove the toolbar and editable when destroyed. You can\n\t * do that yourself in the destruction chain, if you need to:\n\t *\n\t * ```ts\n\t * editor.destroy().then( () => {\n\t * \t// Remove the toolbar from DOM.\n\t * \teditor.ui.view.toolbar.element.remove();\n\t *\n\t * \t// Remove editable elements from DOM.\n\t * \tfor ( const editable of Object.values( editor.ui.view.editables ) ) {\n\t * \t editable.element.remove();\n\t * \t}\n\t *\n\t * \tconsole.log( 'Editor was destroyed' );\n\t * } );\n\t * ```\n\t */\n\tpublic override destroy(): Promise {\n\t\tconst shouldUpdateSourceElement = this.config.get( 'updateSourceElementOnDestroy' );\n\t\t// Cache the data and editable DOM elements, then destroy.\n\t\t// It's safe to assume that the model->view conversion will not work after `super.destroy()`,\n\t\t// same as `ui.getEditableElement()` method will not return editables.\n\t\tconst data: Record = {};\n\n\t\tfor ( const rootName of Object.keys( this.sourceElements ) ) {\n\t\t\tdata[ rootName ] = shouldUpdateSourceElement ? this.getData( { rootName } ) : '';\n\t\t}\n\n\t\tthis.ui.destroy();\n\n\t\treturn super.destroy()\n\t\t\t.then( () => {\n\t\t\t\tfor ( const rootName of Object.keys( this.sourceElements ) ) {\n\t\t\t\t\tsetDataInElement( this.sourceElements[ rootName ], data[ rootName ] );\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t/**\n\t * Adds a new root to the editor.\n\t *\n\t * ```ts\n\t * editor.addRoot( 'myRoot', { data: '

    Initial root data.

    ' } );\n\t * ```\n\t *\n\t * After a root is added, you will be able to modify and retrieve its data.\n\t *\n\t * All root names must be unique. An error will be thrown if you will try to create a root with the name same as\n\t * an already existing, attached root. However, you can call this method for a detached root. See also {@link #detachRoot}.\n\t *\n\t * Whenever a root is added, the editor instance will fire {@link #event:addRoot `addRoot` event}. The event is also called when\n\t * the root is added indirectly, e.g. by the undo feature or on a remote client during real-time collaboration.\n\t *\n\t * Note, that this method only adds a root to the editor model. It **does not** create a DOM editable element for the new root.\n\t * Until such element is created (and attached to the root), the root is \"virtual\": it is not displayed anywhere and its data can\n\t * be changed only using the editor API.\n\t *\n\t * To create a DOM editable element for the root, listen to {@link #event:addRoot `addRoot` event} and call {@link #createEditable}.\n\t * Then, insert the DOM element in a desired place, that will depend on the integration with your application and your requirements.\n\t *\n\t * ```ts\n\t * editor.on( 'addRoot', ( evt, root ) => {\n\t * \tconst editableElement = editor.createEditable( root );\n\t *\n\t * \t// You may want to create a more complex DOM structure here.\n\t * \t//\n\t * \t// Alternatively, you may want to create a DOM structure before\n\t * \t// calling `editor.addRoot()` and only append `editableElement` at\n\t * \t// a proper place.\n\t *\n\t * \tdocument.querySelector( '#editors' ).appendChild( editableElement );\n\t * } );\n\t *\n\t * // ...\n\t *\n\t * editor.addRoot( 'myRoot' ); // Will create a root, a DOM editable element and append it to `#editors` container element.\n\t * ```\n\t *\n\t * You can set root attributes on the new root while you add it:\n\t *\n\t * ```ts\n\t * // Add a collapsed root at fourth position from top.\n\t * // Keep in mind that these are just examples of attributes. You need to provide your own features that will handle the attributes.\n\t * editor.addRoot( 'myRoot', { attributes: { isCollapsed: true, index: 4 } } );\n\t * ```\n\t *\n\t * Note that attributes added together with a root are automatically registered.\n\t *\n\t * See also {@link ~MultiRootEditor#registerRootAttribute `MultiRootEditor#registerRootAttribute()`} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes `config.rootsAttributes` configuration option}.\n\t *\n\t * By setting `isUndoable` flag to `true`, you can allow for detaching the root using the undo feature.\n\t *\n\t * Additionally, you can group adding multiple roots in one undo step. This can be useful if you add multiple roots that are\n\t * combined into one, bigger UI element, and want them all to be undone together.\n\t *\n\t * ```ts\n\t * let rowId = 0;\n\t *\n\t * editor.model.change( () => {\n\t * \teditor.addRoot( 'left-row-' + rowId, { isUndoable: true } );\n\t * \teditor.addRoot( 'center-row-' + rowId, { isUndoable: true } );\n\t * \teditor.addRoot( 'right-row-' + rowId, { isUndoable: true } );\n\t *\n\t * \trowId++;\n\t * } );\n\t * ```\n\t *\n\t * @param rootName Name of the root to add.\n\t * @param options Additional options for the added root.\n\t */\n\tpublic addRoot(\n\t\trootName: string,\n\t\t{ data = '', attributes = {}, elementName = '$root', isUndoable = false }: AddRootOptions = {}\n\t): void {\n\t\tconst _addRoot = ( writer: Writer ) => {\n\t\t\tconst root = writer.addRoot( rootName, elementName );\n\n\t\t\tif ( data ) {\n\t\t\t\twriter.insert( this.data.parse( data, root ), root, 0 );\n\t\t\t}\n\n\t\t\tfor ( const key of Object.keys( attributes ) ) {\n\t\t\t\tthis.registerRootAttribute( key );\n\t\t\t\twriter.setAttribute( key, attributes[ key ], root );\n\t\t\t}\n\t\t};\n\n\t\tif ( isUndoable ) {\n\t\t\tthis.model.change( _addRoot );\n\t\t} else {\n\t\t\tthis.model.enqueueChange( { isUndoable: false }, _addRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Detaches a root from the editor.\n\t *\n\t * ```ts\n\t * editor.detachRoot( 'myRoot' );\n\t * ```\n\t *\n\t * A detached root is not entirely removed from the editor model, however it can be considered removed.\n\t *\n\t * After a root is detached all its children are removed, all markers inside it are removed, and whenever something is inserted to it,\n\t * it is automatically removed as well. Finally, a detached root is not returned by\n\t * {@link module:engine/model/document~Document#getRootNames} by default.\n\t *\n\t * It is possible to re-add a previously detached root calling {@link #addRoot}.\n\t *\n\t * Whenever a root is detached, the editor instance will fire {@link #event:detachRoot `detachRoot` event}. The event is also\n\t * called when the root is detached indirectly, e.g. by the undo feature or on a remote client during real-time collaboration.\n\t *\n\t * Note, that this method only detached a root in the editor model. It **does not** destroy the DOM editable element linked with\n\t * the root and it **does not** remove the DOM element from the DOM structure of your application.\n\t *\n\t * To properly remove a DOM editable element after a root was detached, listen to {@link #event:detachRoot `detachRoot` event}\n\t * and call {@link #detachEditable}. Then, remove the DOM element from your application.\n\t *\n\t * ```ts\n\t * editor.on( 'detachRoot', ( evt, root ) => {\n\t * \tconst editableElement = editor.detachEditable( root );\n\t *\n\t * \t// You may want to do an additional DOM clean-up here.\n\t *\n\t * \teditableElement.remove();\n\t * } );\n\t *\n\t * // ...\n\t *\n\t * editor.detachRoot( 'myRoot' ); // Will detach the root, and remove the DOM editable element.\n\t * ```\n\t *\n\t * By setting `isUndoable` flag to `true`, you can allow for re-adding the root using the undo feature.\n\t *\n\t * Additionally, you can group detaching multiple roots in one undo step. This can be useful if the roots are combined into one,\n\t * bigger UI element, and you want them all to be re-added together.\n\t *\n\t * ```ts\n\t * editor.model.change( () => {\n\t * \teditor.detachRoot( 'left-row-3', true );\n\t * \teditor.detachRoot( 'center-row-3', true );\n\t * \teditor.detachRoot( 'right-row-3', true );\n\t * } );\n\t * ```\n\t *\n\t * @param rootName Name of the root to detach.\n\t * @param isUndoable Whether detaching the root can be undone (using the undo feature) or not.\n\t */\n\tpublic detachRoot( rootName: string, isUndoable = false ): void {\n\t\tif ( isUndoable ) {\n\t\t\tthis.model.change( writer => writer.detachRoot( rootName ) );\n\t\t} else {\n\t\t\tthis.model.enqueueChange( { isUndoable: false }, writer => writer.detachRoot( rootName ) );\n\t\t}\n\t}\n\n\t/**\n\t * Creates and returns a new DOM editable element for the given root element.\n\t *\n\t * The new DOM editable is attached to the model root and can be used to modify the root content.\n\t *\n\t * @param root Root for which the editable element should be created.\n\t * @param placeholder Placeholder for the editable element. If not set, placeholder value from the\n\t * {@link module:core/editor/editorconfig~EditorConfig#placeholder editor configuration} will be used (if it was provided).\n\t * @returns The created DOM element. Append it in a desired place in your application.\n\t */\n\tpublic createEditable( root: RootElement, placeholder?: string ): HTMLElement {\n\t\tconst editable = this.ui.view.createEditable( root.rootName );\n\n\t\tthis.ui.addEditable( editable, placeholder );\n\n\t\tthis.editing.view.forceRender();\n\n\t\treturn editable.element!;\n\t}\n\n\t/**\n\t * Detaches the DOM editable element that was attached to the given root.\n\t *\n\t * @param root Root for which the editable element should be detached.\n\t * @returns The DOM element that was detached. You may want to remove it from your application DOM structure.\n\t */\n\tpublic detachEditable( root: RootElement ): HTMLElement {\n\t\tconst rootName = root.rootName;\n\t\tconst editable = this.ui.view.editables[ rootName ];\n\n\t\tthis.ui.removeEditable( editable );\n\t\tthis.ui.view.removeEditable( rootName );\n\n\t\treturn editable.element!;\n\t}\n\n\t/**\n\t * Loads a root that has previously been declared in {@link module:core/editor/editorconfig~EditorConfig#lazyRoots `lazyRoots`}\n\t * configuration option.\n\t *\n\t * Only roots specified in the editor config can be loaded. A root cannot be loaded multiple times. A root cannot be unloaded and\n\t * loading a root cannot be reverted using the undo feature.\n\t *\n\t * When a root becomes loaded, it will be treated by the editor as though it was just added. This, among others, means that all\n\t * related events and mechanisms will be fired, including {@link ~MultiRootEditor#event:addRoot `addRoot` event},\n\t * {@link module:engine/model/document~Document#event:change `model.Document` `change` event}, model post-fixers and conversion.\n\t *\n\t * Until the root becomes loaded, all above mechanisms are suppressed.\n\t *\n\t * This method is {@link module:utils/observablemixin~Observable#decorate decorated}.\n\t *\n\t * Note that attributes loaded together with a root are automatically registered.\n\t *\n\t * See also {@link ~MultiRootEditor#registerRootAttribute `MultiRootEditor#registerRootAttribute()`} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes `config.rootsAttributes` configuration option}.\n\t *\n\t * When this method is used in real-time collaboration environment, its effects become asynchronous as the editor will first synchronize\n\t * with the remote editing session, before the root is added to the editor.\n\t *\n\t * If the root has been already loaded by any other client, the additional data passed in `loadRoot()` parameters will be ignored.\n\t *\n\t * @param rootName Name of the root to load.\n\t * @param options Additional options for the loaded root.\n\t * @fires loadRoot\n\t */\n\tpublic loadRoot(\n\t\trootName: string,\n\t\t{ data = '', attributes = {} as Record }: LoadRootOptions = {}\n\t): void {\n\t\t// `root` will be defined as it is guaranteed by a check in a higher priority callback.\n\t\tconst root = this.model.document.getRoot( rootName )!;\n\n\t\tthis.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\tif ( data ) {\n\t\t\t\twriter.insert( this.data.parse( data, root ), root, 0 );\n\t\t\t}\n\n\t\t\tfor ( const key of Object.keys( attributes ) ) {\n\t\t\t\tthis.registerRootAttribute( key );\n\n\t\t\t\twriter.setAttribute( key, attributes[ key ], root );\n\t\t\t}\n\n\t\t\troot._isLoaded = true;\n\n\t\t\tthis.model.document.differ._bufferRootLoad( root );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the document data for all attached roots.\n\t *\n\t * @param options Additional configuration for the retrieved data.\n\t * Editor features may introduce more configuration options that can be set through this parameter.\n\t * @param options.trim Whether returned data should be trimmed. This option is set to `'empty'` by default,\n\t * which means that whenever editor content is considered empty, an empty string is returned. To turn off trimming\n\t * use `'none'`. In such cases exact content will be returned (for example `'

     

    '` for an empty editor).\n\t * @returns The full document data.\n\t */\n\tpublic getFullData( options?: Record ): Record {\n\t\tconst data: Record = {};\n\n\t\tfor ( const rootName of this.model.document.getRootNames() ) {\n\t\t\tdata[ rootName ] = this.data.get( { ...options, rootName } );\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t/**\n\t * Returns attributes for all attached roots.\n\t *\n\t * Note: all and only {@link ~MultiRootEditor#registerRootAttribute registered} roots attributes will be returned.\n\t * If a registered root attribute is not set for a given root, `null` will be returned.\n\t *\n\t * @returns Object with roots attributes. Keys are roots names, while values are attributes set on given root.\n\t */\n\tpublic getRootsAttributes(): Record {\n\t\tconst rootsAttributes: Record = {};\n\n\t\tfor ( const rootName of this.model.document.getRootNames() ) {\n\t\t\trootsAttributes[ rootName ] = this.getRootAttributes( rootName );\n\t\t}\n\n\t\treturn rootsAttributes;\n\t}\n\n\t/**\n\t * Returns attributes for the specified root.\n\t *\n\t * Note: all and only {@link ~MultiRootEditor#registerRootAttribute registered} roots attributes will be returned.\n\t * If a registered root attribute is not set for a given root, `null` will be returned.\n\t */\n\tpublic getRootAttributes( rootName: string ): RootAttributes {\n\t\tconst rootAttributes: RootAttributes = {};\n\t\tconst root = this.model.document.getRoot( rootName )!;\n\n\t\tfor ( const key of this._registeredRootsAttributesKeys ) {\n\t\t\trootAttributes[ key ] = root.hasAttribute( key ) ? root.getAttribute( key ) : null;\n\t\t}\n\n\t\treturn rootAttributes;\n\t}\n\n\t/**\n\t * Registers given string as a root attribute key. Registered root attributes are added to\n\t * {@link module:engine/model/schema~Schema schema}, and also returned by\n\t * {@link ~MultiRootEditor#getRootAttributes `getRootAttributes()`} and\n\t * {@link ~MultiRootEditor#getRootsAttributes `getRootsAttributes()`}.\n\t *\n\t * Note: attributes passed in {@link module:core/editor/editorconfig~EditorConfig#rootsAttributes `config.rootsAttributes`} are\n\t * automatically registered as the editor is initialized. However, registering the same attribute twice does not have any negative\n\t * impact, so it is recommended to use this method in any feature that uses roots attributes.\n\t */\n\tpublic registerRootAttribute( key: string ): void {\n\t\tif ( this._registeredRootsAttributesKeys.has( key ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._registeredRootsAttributesKeys.add( key );\n\t\tthis.editing.model.schema.extend( '$root', { allowAttributes: key } );\n\t}\n\n\t/**\n\t * Switches given editor root to the read-only mode.\n\t *\n\t * In contrary to {@link module:core/editor/editor~Editor#enableReadOnlyMode `enableReadOnlyMode()`}, which switches the whole editor\n\t * to the read-only mode, this method turns only a particular root to the read-only mode. This can be useful when you want to prevent\n\t * editing only a part of the editor content.\n\t *\n\t * When you switch a root to the read-only mode, you need provide a unique identifier (`lockId`) that will identify this request. You\n\t * will need to provide the same `lockId` when you will want to\n\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor#enableRoot re-enable} the root.\n\t *\n\t * ```ts\n\t * const model = editor.model;\n\t * const myRoot = model.document.getRoot( 'myRoot' );\n\t *\n\t * editor.disableRoot( 'myRoot', 'my-lock' );\n\t * model.canEditAt( myRoot ); // `false`\n\t *\n\t * editor.disableRoot( 'myRoot', 'other-lock' );\n\t * editor.disableRoot( 'myRoot', 'other-lock' ); // Multiple locks with the same ID have no effect.\n\t * model.canEditAt( myRoot ); // `false`\n\t *\n\t * editor.enableRoot( 'myRoot', 'my-lock' );\n\t * model.canEditAt( myRoot ); // `false`\n\t *\n\t * editor.enableRoot( 'myRoot', 'other-lock' );\n\t * model.canEditAt( myRoot ); // `true`\n\t * ```\n\t *\n\t * See also {@link module:core/editor/editor~Editor#enableReadOnlyMode `Editor#enableReadOnlyMode()`} and\n\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor#enableRoot `MultiRootEditor#enableRoot()`}.\n\t *\n\t * @param rootName Name of the root to switch to read-only mode.\n\t * @param lockId A unique ID for setting the editor to the read-only state.\n\t */\n\tpublic disableRoot( rootName: string, lockId: string | symbol ): void {\n\t\tif ( rootName == '$graveyard' ) {\n\t\t\t/**\n\t\t\t * You cannot disable the `$graveyard` root.\n\t\t\t *\n\t\t\t * @error multi-root-editor-cannot-disable-graveyard-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'multi-root-editor-cannot-disable-graveyard-root', this );\n\t\t}\n\n\t\tconst locksForGivenRoot = this._readOnlyRootLocks.get( rootName );\n\n\t\tif ( locksForGivenRoot ) {\n\t\t\tlocksForGivenRoot.add( lockId );\n\t\t} else {\n\t\t\tthis._readOnlyRootLocks.set( rootName, new Set( [ lockId ] ) );\n\n\t\t\tconst editableRootElement = this.editing.view.document.getRoot( rootName )!;\n\n\t\t\teditableRootElement.isReadOnly = true;\n\n\t\t\t// Since one of the roots has changed read-only state, we need to refresh all commands that affect data.\n\t\t\tArray.from( this.commands.commands() ).forEach( command => command.affectsData && command.refresh() );\n\t\t}\n\t}\n\n\t/**\n\t * Removes given read-only lock from the given root.\n\t *\n\t * See {@link module:editor-multi-root/multirooteditor~MultiRootEditor#disableRoot `disableRoot()`}.\n\t *\n\t * @param rootName Name of the root to switch back from the read-only mode.\n\t * @param lockId A unique ID for setting the editor to the read-only state.\n\t */\n\tpublic enableRoot( rootName: string, lockId: string | symbol ): void {\n\t\tconst locksForGivenRoot = this._readOnlyRootLocks.get( rootName );\n\n\t\tif ( !locksForGivenRoot || !locksForGivenRoot.has( lockId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( locksForGivenRoot.size === 1 ) {\n\t\t\tthis._readOnlyRootLocks.delete( rootName );\n\n\t\t\tconst editableRootElement = this.editing.view.document.getRoot( rootName )!;\n\n\t\t\teditableRootElement.isReadOnly = this.isReadOnly;\n\n\t\t\t// Since one of the roots has changed read-only state, we need to refresh all commands that affect data.\n\t\t\tArray.from( this.commands.commands() ).forEach( command => command.affectsData && command.refresh() );\n\t\t} else {\n\t\t\tlocksForGivenRoot.delete( lockId );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new multi-root editor instance.\n\t *\n\t * **Note:** remember that `MultiRootEditor` does not append the toolbar element to your web page, so you have to do it manually\n\t * after the editor has been initialized.\n\t *\n\t * There are a few different ways to initialize the multi-root editor.\n\t *\n\t * # Using existing DOM elements:\n\t *\n\t * ```ts\n\t * MultiRootEditor.create( {\n\t * \tintro: document.querySelector( '#editor-intro' ),\n\t * \tcontent: document.querySelector( '#editor-content' ),\n\t * \tsidePanelLeft: document.querySelector( '#editor-side-left' ),\n\t * \tsidePanelRight: document.querySelector( '#editor-side-right' ),\n\t * \toutro: document.querySelector( '#editor-outro' )\n\t * } )\n\t * .then( editor => {\n\t * \tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t// Append the toolbar inside a provided DOM element.\n\t * \tdocument.querySelector( '#toolbar-container' ).appendChild( editor.ui.view.toolbar.element );\n\t * } )\n\t * .catch( err => {\n\t * \tconsole.error( err.stack );\n\t * } );\n\t * ```\n\t *\n\t * The elements' content will be used as the editor data and elements will become editable elements.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as strings.\n\t * In this case, you will have to manually append both the toolbar element and the editable elements to your web page.\n\t *\n\t * ```ts\n\t * MultiRootEditor.create( {\n\t * \tintro: '

    Exciting intro text to an article.

    ',\n\t * \tcontent: '

    Lorem ipsum dolor sit amet.

    ',\n\t * \tsidePanelLeft: '
    Strong quotation from article.
    ',\n\t * \tsidePanelRight: '

    List of similar articles...

    ',\n\t * \toutro: '

    Closing text.

    '\n\t * } )\n\t * .then( editor => {\n\t * \tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t// Append the toolbar inside a provided DOM element.\n\t * \tdocument.querySelector( '#toolbar-container' ).appendChild( editor.ui.view.toolbar.element );\n\t *\n\t * \t// Append DOM editable elements created by the editor.\n\t * \tconst editables = editor.ui.view.editables;\n\t * \tconst container = document.querySelector( '#editable-container' );\n\t *\n\t * \tcontainer.appendChild( editables.intro.element );\n\t * \tcontainer.appendChild( editables.content.element );\n\t * \tcontainer.appendChild( editables.outro.element );\n\t * } )\n\t * .catch( err => {\n\t * \tconsole.error( err.stack );\n\t * } );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Using an existing DOM element (and data provided in `config.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * MultiRootEditor.create( {\n\t * \tintro: document.querySelector( '#editor-intro' ),\n\t * \tcontent: document.querySelector( '#editor-content' ),\n\t * \tsidePanelLeft: document.querySelector( '#editor-side-left' ),\n\t * \tsidePanelRight: document.querySelector( '#editor-side-right' ),\n\t * \toutro: document.querySelector( '#editor-outro' )\n\t * }, {\n\t * \tinitialData: {\n\t * \t\tintro: '

    Exciting intro text to an article.

    ',\n\t * \t\tcontent: '

    Lorem ipsum dolor sit amet.

    ',\n\t * \t\tsidePanelLeft '
    Strong quotation from article.
    ':\n\t * \t\tsidePanelRight '

    List of similar articles...

    ':\n\t * \t\toutro: '

    Closing text.

    '\n\t * \t}\n\t * } )\n\t * .then( editor => {\n\t * \tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t// Append the toolbar inside a provided DOM element.\n\t * \tdocument.querySelector( '#toolbar-container' ).appendChild( editor.ui.view.toolbar.element );\n\t * } )\n\t * .catch( err => {\n\t * \tconsole.error( err.stack );\n\t * } );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * # Using the editor from source\n\t *\n\t * The code samples listed in the previous sections of this documentation assume that you are using an\n\t * {@glink installation/getting-started/predefined-builds editor build}\n\t * (for example – `@ckeditor/ckeditor5-build-multi-root`).\n\t *\n\t * If you want to use the multi-root editor from source (`@ckeditor/ckeditor5-editor-multi-root-editor/src/multirooteditor`),\n\t * you need to define the list of\n\t * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and\n\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from\n\t * source in the {@glink installation/advanced/alternative-setups/integrating-from-source-webpack dedicated guide}.\n\t *\n\t * @param sourceElementsOrData The DOM elements that will be the source for the created editor\n\t * or the editor's initial data. The editor will initialize multiple roots with names according to the keys in the passed object.\n\t *\n\t * If DOM elements are passed, their content will be automatically loaded to the editor upon initialization and the elements will be\n\t * used as the editor's editable areas. The editor data will be set back to the original element once the editor is destroyed if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy} option\n\t * is set to `true`.\n\t *\n\t * If the initial data is passed, a detached editor will be created. For each entry in the passed object, one editor root and one\n\t * editable DOM element will be created. You will need to attach the editable elements into the DOM manually. The elements are available\n\t * through the {@link module:editor-multi-root/multirooteditorui~MultiRootEditorUI#getEditableElement `editor.ui.getEditableElement()`}\n\t * method.\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create(\n\t\tsourceElementsOrData: Record | Record,\n\t\tconfig: EditorConfig = {}\n\t): Promise {\n\t\treturn new Promise( resolve => {\n\t\t\tfor ( const sourceItem of Object.values( sourceElementsOrData ) ) {\n\t\t\t\tif ( isElement( sourceItem ) && sourceItem.tagName === 'TEXTAREA' ) {\n\t\t\t\t\t// Documented in core/editor/editor.js\n\t\t\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\t\t\tthrow new CKEditorError( 'editor-wrong-element', null );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst editor = new this( sourceElementsOrData, config );\n\n\t\t\tresolve(\n\t\t\t\teditor.initPlugins()\n\t\t\t\t\t.then( () => editor.ui.init() )\n\t\t\t\t\t.then( () => {\n\t\t\t\t\t\t// This is checked directly before setting the initial data,\n\t\t\t\t\t\t// as plugins may change `EditorConfig#initialData` value.\n\t\t\t\t\t\teditor._verifyRootsWithInitialData();\n\n\t\t\t\t\t\treturn editor.data.init( editor.config.get( 'initialData' )! );\n\t\t\t\t\t} )\n\t\t\t\t\t.then( () => editor.fire( 'ready' ) )\n\t\t\t\t\t.then( () => editor )\n\t\t\t);\n\t\t} );\n\t}\n\n\t/**\n\t * The {@link module:core/context~Context} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static Context = Context;\n\n\t/**\n\t * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static EditorWatchdog = EditorWatchdog;\n\n\t/**\n\t * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static ContextWatchdog = ContextWatchdog;\n\n\t/**\n\t * @internal\n\t */\n\tprivate _verifyRootsWithInitialData(): void {\n\t\tconst initialData = this.config.get( 'initialData' ) as Record;\n\n\t\t// Roots that are not in the initial data.\n\t\tfor ( const rootName of this.model.document.getRootNames() ) {\n\t\t\tif ( !( rootName in initialData ) ) {\n\t\t\t\t/**\n\t\t\t\t * Editor roots do not match the\n\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#initialData `initialData` configuration}.\n\t\t\t\t *\n\t\t\t\t * This may happen for one of the two reasons:\n\t\t\t\t *\n\t\t\t\t * * Configuration error. The `sourceElementsOrData` parameter in\n\t\t\t\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`} contains different\n\t\t\t\t * roots than {@link module:core/editor/editorconfig~EditorConfig#initialData `initialData` configuration}.\n\t\t\t\t * * As the editor was initialized, the {@link module:core/editor/editorconfig~EditorConfig#initialData `initialData`}\n\t\t\t\t * configuration value or the state of the editor roots has been changed.\n\t\t\t\t *\n\t\t\t\t * @error multi-root-editor-root-initial-data-mismatch\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'multi-root-editor-root-initial-data-mismatch', null );\n\t\t\t}\n\t\t}\n\n\t\t// Roots that are not in the editor.\n\t\tfor ( const rootName of Object.keys( initialData ) ) {\n\t\t\tconst root = this.model.document.getRoot( rootName );\n\n\t\t\tif ( !root || !root.isAttached() ) {\n\t\t\t\t// eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n\t\t\t\tthrow new CKEditorError( 'multi-root-editor-root-initial-data-mismatch', null );\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getInitialData( sourceElementOrData: HTMLElement | string ): string {\n\treturn isElement( sourceElementOrData ) ? getDataFromElement( sourceElementOrData ) : sourceElementOrData;\n}\n\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n\n/**\n * Fired whenever a root is {@link ~MultiRootEditor#addRoot added or re-added} to the editor model.\n *\n * Use this event to {@link ~MultiRootEditor#createEditable create a DOM editable} for the added root and append the DOM element\n * in a desired place in your application.\n *\n * The event is fired after all changes from a given batch are applied. The event is not fired, if the root was added and detached\n * in the same batch.\n *\n * @eventName ~MultiRootEditor#addRoot\n * @param root The root that was added.\n */\nexport type AddRootEvent = {\n\tname: 'addRoot';\n\targs: [ root: RootElement ];\n};\n\n/**\n * Fired whenever a root is {@link ~MultiRootEditor#detachRoot detached} from the editor model.\n *\n * Use this event to {@link ~MultiRootEditor#detachEditable destroy a DOM editable} for the detached root and remove the DOM element\n * from your application.\n *\n * The event is fired after all changes from a given batch are applied. The event is not fired, if the root was detached and re-added\n * in the same batch.\n *\n * @eventName ~MultiRootEditor#detachRoot\n * @param root The root that was detached.\n */\nexport type DetachRootEvent = {\n\tname: 'detachRoot';\n\targs: [ root: RootElement ];\n};\n\n/**\n * Event fired when {@link ~MultiRootEditor#loadRoot} method is called.\n *\n * The {@link ~MultiRootEditor#loadRoot default action of that method} is implemented as a\n * listener to this event, so it can be fully customized by the features.\n *\n * @eventName ~MultiRootEditor#loadRoot\n * @param args The arguments passed to the original method.\n */\nexport type LoadRootEvent = DecoratedMethodEvent;\n\n/**\n * Additional options available when adding a root.\n */\nexport type AddRootOptions = {\n\n\t/**\n\t * Initial data for the root.\n\t */\n\tdata?: string;\n\n\t/**\n\t * Initial attributes for the root.\n\t */\n\tattributes?: RootAttributes;\n\n\t/**\n\t * Element name for the root element in the model. It can be used to set different schema rules for different roots.\n\t */\n\telementName?: string;\n\n\t/**\n\t * Whether creating the root can be undone (using the undo feature) or not.\n\t */\n\tisUndoable?: boolean;\n};\n\n/**\n * Additional options available when loading a root.\n */\nexport type LoadRootOptions = Omit;\n\n/**\n * Attributes set on a model root element.\n */\nexport type RootAttributes = Record;\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/* globals HTMLTextAreaElement */\n\n/**\n * @module utils/dom/getdatafromelement\n */\n\n/**\n * Gets data from a given source element.\n *\n * @param el The element from which the data will be retrieved.\n * @returns The data string.\n */\nexport default function getDataFromElement( el: HTMLElement ): string {\n\tif ( el instanceof HTMLTextAreaElement ) {\n\t\treturn el.value;\n\t}\n\n\treturn el.innerHTML;\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\nimport { CKEditorError, logWarning, type Locale } from 'ckeditor5/src/utils.js';\nimport type { AlignmentFormat, SupportedOption } from './alignmentconfig.js';\n\n/**\n * @module alignment/utils\n */\n\n/**\n * The list of supported alignment options:\n *\n * * `'left'`,\n * * `'right'`,\n * * `'center'`,\n * * `'justify'`\n */\nexport const supportedOptions: ReadonlyArray = [ 'left', 'right', 'center', 'justify' ];\n\n/**\n * Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}.\n *\n * @param option The option value to check.\n */\nexport function isSupported( option: string ): boolean {\n\treturn ( supportedOptions as Array ).includes( option );\n}\n\n/**\n * Checks whether alignment is the default one considering the direction\n * of the editor content.\n *\n * @param alignment The name of the alignment to check.\n * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n */\nexport function isDefault( alignment: string, locale: Locale ): boolean {\n\t// Right now only LTR is supported so the 'left' value is always the default one.\n\n\tif ( locale.contentLanguageDirection == 'rtl' ) {\n\t\treturn alignment === 'right';\n\t} else {\n\t\treturn alignment === 'left';\n\t}\n}\n\n/**\n * Brings the configuration to the common form, an array of objects.\n *\n * @param configuredOptions Alignment plugin configuration.\n * @returns Normalized object holding the configuration.\n */\nexport function normalizeAlignmentOptions( configuredOptions: Array ): Array {\n\tconst normalizedOptions = configuredOptions\n\t\t.map( option => {\n\t\t\tlet result;\n\n\t\t\tif ( typeof option == 'string' ) {\n\t\t\t\tresult = { name: option };\n\t\t\t} else {\n\t\t\t\tresult = option;\n\t\t\t}\n\n\t\t\treturn result as AlignmentFormat;\n\t\t} )\n\t\t// Remove all unknown options.\n\t\t.filter( option => {\n\t\t\tconst isNameValid = supportedOptions.includes( option.name );\n\n\t\t\tif ( !isNameValid ) {\n\t\t\t\t/**\n\t\t\t\t * The `name` in one of the `alignment.options` is not recognized.\n\t\t\t\t * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-name-not-recognized\n\t\t\t\t * @param option Options with unknown value of the `name` property.\n\t\t\t\t */\n\t\t\t\tlogWarning( 'alignment-config-name-not-recognized', { option } );\n\t\t\t}\n\n\t\t\treturn isNameValid;\n\t\t} );\n\n\tconst classNameCount = normalizedOptions.filter( option => Boolean( option.className ) ).length;\n\n\t// We either use classes for all styling options or for none.\n\tif ( classNameCount && classNameCount < normalizedOptions.length ) {\n\t\t/**\n\t\t * The `className` property has to be defined for all options once at least one option declares `className`.\n\t\t *\n\t\t * @error alignment-config-classnames-are-missing\n\t\t * @param configuredOptions Contents of `alignment.options`.\n\t\t */\n\t\tthrow new CKEditorError( 'alignment-config-classnames-are-missing', { configuredOptions } );\n\t}\n\n\t// Validate resulting config.\n\tnormalizedOptions.forEach( ( option, index, allOptions ) => {\n\t\tconst succeedingOptions = allOptions.slice( index + 1 );\n\t\tconst nameAlreadyExists = succeedingOptions.some( item => item.name == option.name );\n\n\t\tif ( nameAlreadyExists ) {\n\t\t\t/**\n\t\t\t * The same `name` in one of the `alignment.options` was already declared.\n\t\t\t * Each `name` representing one alignment option can be set exactly once.\n\t\t\t *\n\t\t\t * @error alignment-config-name-already-defined\n\t\t\t * @param option First option that declares given `name`.\n\t\t\t * @param configuredOptions Contents of `alignment.options`.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'alignment-config-name-already-defined', { option, configuredOptions } );\n\t\t}\n\n\t\t// The `className` property is present. Check for duplicates then.\n\t\tif ( option.className ) {\n\t\t\tconst classNameAlreadyExists = succeedingOptions.some( item => item.className == option.className );\n\n\t\t\tif ( classNameAlreadyExists ) {\n\t\t\t\t/**\n\t\t\t\t * The same `className` in one of the `alignment.options` was already declared.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-classname-already-defined\n\t\t\t\t * @param option First option that declares given `className`.\n\t\t\t\t * @param configuredOptions\n\t\t\t\t * Contents of `alignment.options`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'alignment-config-classname-already-defined', { option, configuredOptions } );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn normalizedOptions;\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/**\n * @module alignment/alignmentcommand\n */\n\nimport { Command } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\nimport type { Element, Writer } from 'ckeditor5/src/engine.js';\n\nimport { isDefault } from './utils.js';\nimport type { SupportedOption } from './alignmentconfig.js';\n\nconst ALIGNMENT = 'alignment';\n\n/**\n * The alignment command plugin.\n */\nexport default class AlignmentCommand extends Command {\n\t/**\n\t * A value of the current block's alignment.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: SupportedOption;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst firstBlock = first( this.editor.model.document.selection.getSelectedBlocks() )!;\n\n\t\t// As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled.\n\t\tthis.isEnabled = Boolean( firstBlock ) && this._canBeAligned( firstBlock );\n\n\t\tif ( this.isEnabled && firstBlock.hasAttribute( 'alignment' ) ) {\n\t\t\tthis.value = firstBlock.getAttribute( 'alignment' ) as SupportedOption;\n\t\t} else {\n\t\t\tthis.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left';\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command. Applies the alignment `value` to the selected blocks.\n\t * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,\n\t * the command will remove the attribute from the selected blocks.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.value The value to apply.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { value?: SupportedOption } = {} ): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\tconst value = options.value!;\n\n\t\tmodel.change( writer => {\n\t\t\t// Get only those blocks from selected that can have alignment set\n\t\t\tconst blocks = Array.from( doc.selection.getSelectedBlocks() ).filter( block => this._canBeAligned( block ) );\n\t\t\tconst currentAlignment = blocks[ 0 ].getAttribute( 'alignment' );\n\n\t\t\t// Remove alignment attribute if current alignment is:\n\t\t\t// - default (should not be stored in model as it will bloat model data)\n\t\t\t// - equal to currently set\n\t\t\t// - or no value is passed - denotes default alignment.\n\t\t\tconst removeAlignment = isDefault( value, locale ) || currentAlignment === value || !value;\n\n\t\t\tif ( removeAlignment ) {\n\t\t\t\tremoveAlignmentFromSelection( blocks, writer );\n\t\t\t} else {\n\t\t\t\tsetAlignmentOnSelection( blocks, writer, value );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether a block can have alignment set.\n\t *\n\t * @param block The block to be checked.\n\t */\n\tprivate _canBeAligned( block: Element ) {\n\t\treturn this.editor.model.schema.checkAttribute( block, ALIGNMENT );\n\t}\n}\n\n/**\n * Removes the alignment attribute from blocks.\n */\nfunction removeAlignmentFromSelection( blocks: Array, writer: Writer ) {\n\tfor ( const block of blocks ) {\n\t\twriter.removeAttribute( ALIGNMENT, block );\n\t}\n}\n\n/**\n * Sets the alignment attribute on blocks.\n */\nfunction setAlignmentOnSelection( blocks: Array, writer: Writer, alignment: string ) {\n\tfor ( const block of blocks ) {\n\t\twriter.setAttribute( ALIGNMENT, alignment, block );\n\t}\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/**\n * @module alignment/alignmentediting\n */\n\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport type { AttributeDescriptor } from 'ckeditor5/src/engine.js';\n\nimport AlignmentCommand from './alignmentcommand.js';\nimport { isDefault, isSupported, normalizeAlignmentOptions, supportedOptions } from './utils.js';\nimport type { AlignmentFormat, SupportedOption } from './alignmentconfig.js';\n\n/**\n * The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds\n * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.\n */\nexport default class AlignmentEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AlignmentEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'alignment', {\n\t\t\toptions: supportedOptions.map( option => ( { name: option } ) )\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst schema = editor.model.schema;\n\n\t\tconst options: Array = normalizeAlignmentOptions( editor.config.get( 'alignment.options' )! );\n\n\t\t// Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode.\n\t\tconst optionsToConvert = options.filter(\n\t\t\toption => isSupported( option.name ) && !isDefault( option.name, locale )\n\t\t);\n\n\t\t// Once there is at least one `className` defined, we switch to alignment with classes.\n\t\tconst shouldUseClasses = optionsToConvert.some( option => !!option.className );\n\n\t\t// Allow alignment attribute on all blocks.\n\t\tschema.extend( '$block', { allowAttributes: 'alignment' } );\n\t\teditor.model.schema.setAttributeProperties( 'alignment', { isFormatting: true } );\n\n\t\tif ( shouldUseClasses ) {\n\t\t\teditor.conversion.attributeToAttribute( buildClassDefinition( optionsToConvert ) );\n\t\t} else {\n\t\t\t// Downcast inline styles.\n\t\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( buildDowncastInlineDefinition( optionsToConvert ) );\n\t\t}\n\n\t\tconst upcastInlineDefinitions = buildUpcastInlineDefinitions( optionsToConvert );\n\n\t\t// Always upcast from inline styles.\n\t\tfor ( const definition of upcastInlineDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\tconst upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions( optionsToConvert );\n\n\t\t// Always upcast from deprecated `align` attribute.\n\t\tfor ( const definition of upcastCompatibilityDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\teditor.commands.add( 'alignment', new AlignmentCommand( editor ) );\n\t}\n}\n\n/**\n * Prepare downcast conversion definition for inline alignment styling.\n */\nfunction buildDowncastInlineDefinition( options: Array ) {\n\tconst view: Record = {};\n\n\tfor ( const { name } of options ) {\n\t\tview[ name ] = {\n\t\t\tkey: 'style',\n\t\t\tvalue: {\n\t\t\t\t'text-align': name\n\t\t\t}\n\t\t};\n\t}\n\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview\n\t};\n\n\treturn definition;\n}\n\n/**\n * Prepare upcast definitions for inline alignment styles.\n */\nfunction buildUpcastInlineDefinitions( options: Array ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'text-align': name\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n/**\n * Prepare upcast definitions for deprecated `align` attribute.\n */\nfunction buildUpcastCompatibilityDefinitions( options: Array ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'align',\n\t\t\t\tvalue: name\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n/**\n * Prepare conversion definitions for upcast and downcast alignment with classes.\n */\nfunction buildClassDefinition( options: Array ) {\n\tconst view: Record = {};\n\n\tfor ( const option of options ) {\n\t\tview[ option.name ] = {\n\t\t\tkey: 'class',\n\t\t\tvalue: option.className!\n\t\t};\n\t}\n\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview\n\t};\n\n\treturn definition;\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/**\n * @module alignment/alignmentui\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core.js';\nimport {\n\ttype Button,\n\tButtonView,\n\tcreateDropdown,\n\taddToolbarToDropdown,\n\tMenuBarMenuListItemView,\n\tMenuBarMenuListItemButtonView,\n\tMenuBarMenuView,\n\tMenuBarMenuListView\n} from 'ckeditor5/src/ui.js';\nimport type { Locale } from 'ckeditor5/src/utils.js';\n\nimport { isSupported, normalizeAlignmentOptions } from './utils.js';\nimport type { AlignmentFormat, SupportedOption } from './alignmentconfig.js';\nimport type AlignmentCommand from './alignmentcommand.js';\n\nconst iconsMap = new Map( [\n\t[ 'left', icons.alignLeft ],\n\t[ 'right', icons.alignRight ],\n\t[ 'center', icons.alignCenter ],\n\t[ 'justify', icons.alignJustify ]\n] );\n\n/**\n * The default alignment UI plugin.\n *\n * It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons\n * and the `'alignment'` dropdown.\n */\nexport default class AlignmentUI extends Plugin {\n\t/**\n\t * Returns the localized option titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:\n\t *\n\t * * `'left'`,\n\t * * `'right'`,\n\t * * `'center'`,\n\t * * `'justify'`.\n\t *\n\t * @readonly\n\t */\n\tpublic get localizedOptionTitles(): Record {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'left': t( 'Align left' ),\n\t\t\t'right': t( 'Align right' ),\n\t\t\t'center': t( 'Align center' ),\n\t\t\t'justify': t( 'Justify' )\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AlignmentUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst options = normalizeAlignmentOptions( editor.config.get( 'alignment.options' )! );\n\n\t\toptions\n\t\t\t.map( option => option.name )\n\t\t\t.filter( isSupported )\n\t\t\t.forEach( option => this._addButton( option ) );\n\n\t\tthis._addToolbarDropdown( options );\n\t\tthis._addMenuBarMenu( options );\n\t}\n\n\t/**\n\t * Helper method for initializing the button and linking it with an appropriate command.\n\t *\n\t * @param option The name of the alignment option for which the button is added.\n\t */\n\tprivate _addButton( option: SupportedOption ): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( `alignment:${ option }`, locale => this._createButton( locale, option ) );\n\t}\n\n\t/**\n\t * Helper method for creating the button view element.\n\t *\n\t * @param locale Editor locale.\n\t * @param option The name of the alignment option for which the button is added.\n\t * @param buttonAttrs Optional parameters passed to button view instance.\n\t */\n\tprivate _createButton(\n\t\tlocale: Locale,\n\t\toption: SupportedOption,\n\t\tbuttonAttrs: Partial