From f06df43cfebe042bd8868c06bdeec649f13352c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?=
Date: Thu, 12 Oct 2023 15:13:38 +0200
Subject: [PATCH 1/7] composer update
---
composer.json | 24 +-
composer.lock | 2307 +++++++++++++++++++++++++++++++++++--------------
2 files changed, 1664 insertions(+), 667 deletions(-)
diff --git a/composer.json b/composer.json
index 7e0f231..82808eb 100644
--- a/composer.json
+++ b/composer.json
@@ -1,21 +1,23 @@
{
- "name": "uwil/support",
- "version": "2.0.0",
+ "name": "uwil/laravel-base-project",
+ "version": "1.0.0",
"type": "project",
- "description": "The Laravel Framework.",
+ "description": "Laravel base project reference.",
+ "support": {
+ "email": "equipe.web@ldc.fr"
+ },
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
- "php": "^8.1",
+ "php": "^8.2",
"carlos-meneses/laravel-mpdf": "^2.1",
"diglactic/laravel-breadcrumbs": "^8.0",
"doctrine/dbal": "^3.1",
"graham-campbell/gitlab": "^7.0",
"guzzlehttp/guzzle": "^7.2",
- "laravel-lang/lang": "~8.0",
"laravel-validation-rules/colour": "^1.6",
"laravel/framework": "^10.0",
"laravel/tinker": "^2.8",
@@ -29,6 +31,7 @@
"fakerphp/faker": "^1.9.1",
"kitloong/laravel-migrations-generator": "^6.8",
"krlove/eloquent-model-generator": "dev-l10-compatibility",
+ "laravel-lang/common": "^4.0",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
@@ -85,13 +88,10 @@
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
- "dealerdirect/phpcodesniffer-composer-installer": true,
- "composer/package-versions-deprecated": true,
- "php-http/discovery": true
- },
- "gitlab-domains": [
- "lab.s-web.fr"
- ]
+ "pestphp/pest-plugin": true,
+ "php-http/discovery": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
},
"minimum-stability": "stable",
"prefer-stable": true
diff --git a/composer.lock b/composer.lock
index a9b32d0..2db0487 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e8c9db31822e28a9de96572bc85532bf",
+ "content-hash": "d107f01563902a005659e9d0b00d53cc",
"packages": [
{
"name": "brick/math",
@@ -63,20 +63,20 @@
},
{
"name": "carlos-meneses/laravel-mpdf",
- "version": "2.1.12",
+ "version": "2.1.13",
"source": {
"type": "git",
"url": "https://github.com/mccarlosen/laravel-mpdf.git",
- "reference": "6198486b23e7cff340958dfee09169da280f8f27"
+ "reference": "f2461faf0c5d328d28de13c3dcc14e70d77aef83"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mccarlosen/laravel-mpdf/zipball/6198486b23e7cff340958dfee09169da280f8f27",
- "reference": "6198486b23e7cff340958dfee09169da280f8f27",
+ "url": "https://api.github.com/repos/mccarlosen/laravel-mpdf/zipball/f2461faf0c5d328d28de13c3dcc14e70d77aef83",
+ "reference": "f2461faf0c5d328d28de13c3dcc14e70d77aef83",
"shasum": ""
},
"require": {
- "mpdf/mpdf": "^8.0",
+ "mpdf/mpdf": "^8.0|^8.1",
"php": "^5.6|^7.0|^8.0"
},
"type": "library",
@@ -107,7 +107,7 @@
],
"support": {
"issues": "https://github.com/mccarlosen/laravel-mpdf/issues",
- "source": "https://github.com/mccarlosen/laravel-mpdf/tree/2.1.12"
+ "source": "https://github.com/mccarlosen/laravel-mpdf/tree/2.1.13"
},
"funding": [
{
@@ -115,7 +115,7 @@
"type": "custom"
}
],
- "time": "2023-05-09T23:25:45+00:00"
+ "time": "2023-09-01T15:09:05+00:00"
},
{
"name": "clue/stream-filter",
@@ -424,16 +424,16 @@
},
{
"name": "doctrine/dbal",
- "version": "3.6.4",
+ "version": "3.7.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f"
+ "reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f",
- "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
+ "reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
"shasum": ""
},
"require": {
@@ -448,11 +448,12 @@
"require-dev": {
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
- "jetbrains/phpstorm-stubs": "2022.3",
- "phpstan/phpstan": "1.10.14",
+ "jetbrains/phpstorm-stubs": "2023.1",
+ "phpstan/phpstan": "1.10.35",
"phpstan/phpstan-strict-rules": "^1.5",
- "phpunit/phpunit": "9.6.7",
+ "phpunit/phpunit": "9.6.13",
"psalm/plugin-phpunit": "0.18.4",
+ "slevomat/coding-standard": "8.13.1",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^5.4|^6.0",
"symfony/console": "^4.4|^5.4|^6.0",
@@ -516,7 +517,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.6.4"
+ "source": "https://github.com/doctrine/dbal/tree/3.7.1"
},
"funding": [
{
@@ -532,20 +533,20 @@
"type": "tidelift"
}
],
- "time": "2023-06-15T07:40:12+00:00"
+ "time": "2023-10-06T05:06:20+00:00"
},
{
"name": "doctrine/deprecations",
- "version": "v1.1.1",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
+ "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
"shasum": ""
},
"require": {
@@ -577,9 +578,9 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
- "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
+ "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
},
- "time": "2023-06-03T09:27:29+00:00"
+ "time": "2023-09-27T20:04:15+00:00"
},
{
"name": "doctrine/event-manager",
@@ -842,16 +843,16 @@
},
{
"name": "dragonmantank/cron-expression",
- "version": "v3.3.2",
+ "version": "v3.3.3",
"source": {
"type": "git",
"url": "https://github.com/dragonmantank/cron-expression.git",
- "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8"
+ "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8",
- "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8",
+ "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a",
+ "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a",
"shasum": ""
},
"require": {
@@ -891,7 +892,7 @@
],
"support": {
"issues": "https://github.com/dragonmantank/cron-expression/issues",
- "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2"
+ "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3"
},
"funding": [
{
@@ -899,33 +900,31 @@
"type": "github"
}
],
- "time": "2022-09-10T18:51:20+00:00"
+ "time": "2023-08-10T19:36:49+00:00"
},
{
"name": "dxw/cidr",
- "version": "v3.1.0",
+ "version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/dxw/cidr.git",
- "reference": "61d699459e9bddc7222ac1eb3ffc9ffcfdc2f546"
+ "reference": "b07dd398f5a93441f57a687982bc7d0ffb96729a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dxw/cidr/zipball/61d699459e9bddc7222ac1eb3ffc9ffcfdc2f546",
- "reference": "61d699459e9bddc7222ac1eb3ffc9ffcfdc2f546",
+ "url": "https://api.github.com/repos/dxw/cidr/zipball/b07dd398f5a93441f57a687982bc7d0ffb96729a",
+ "reference": "b07dd398f5a93441f57a687982bc7d0ffb96729a",
"shasum": ""
},
"require": {
"dxw/result": "^1.0",
+ "php": "^7.4||^8.1",
"phpseclib/phpseclib": "^2.0"
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "^2.16",
- "mockery/mockery": "^1.3",
- "peridot-php/leo": "^1.6",
- "peridot-php/peridot": "^1.19",
- "peridot-php/peridot-dot-reporter": "^1.0",
- "vimeo/psalm": "^3.2"
+ "dxw/php-cs-fixer-config": "^2.0",
+ "kahlan/kahlan": "^5.2",
+ "vimeo/psalm": "^5.14"
},
"type": "library",
"autoload": {
@@ -939,8 +938,8 @@
],
"authors": [
{
- "name": "Mallory Adams",
- "email": "mallory@dxw.com",
+ "name": "dxw",
+ "email": "team@govpress.com",
"homepage": "https://www.dxw.com"
}
],
@@ -948,9 +947,9 @@
"homepage": "https://github.com/dxw/cidr",
"support": {
"issues": "https://github.com/dxw/cidr/issues",
- "source": "https://github.com/dxw/cidr/tree/master"
+ "source": "https://github.com/dxw/cidr/tree/v3.2.0"
},
- "time": "2020-05-06T16:46:43+00:00"
+ "time": "2023-08-14T10:14:13+00:00"
},
{
"name": "dxw/result",
@@ -1001,16 +1000,16 @@
},
{
"name": "egulias/email-validator",
- "version": "4.0.1",
+ "version": "4.0.2",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
- "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff"
+ "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff",
- "reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff",
+ "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e",
+ "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e",
"shasum": ""
},
"require": {
@@ -1019,8 +1018,8 @@
"symfony/polyfill-intl-idn": "^1.26"
},
"require-dev": {
- "phpunit/phpunit": "^9.5.27",
- "vimeo/psalm": "^4.30"
+ "phpunit/phpunit": "^10.2",
+ "vimeo/psalm": "^5.12"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
@@ -1056,7 +1055,7 @@
],
"support": {
"issues": "https://github.com/egulias/EmailValidator/issues",
- "source": "https://github.com/egulias/EmailValidator/tree/4.0.1"
+ "source": "https://github.com/egulias/EmailValidator/tree/4.0.2"
},
"funding": [
{
@@ -1064,7 +1063,7 @@
"type": "github"
}
],
- "time": "2023-01-14T14:17:03+00:00"
+ "time": "2023-10-06T06:47:41+00:00"
},
{
"name": "ezyang/htmlpurifier",
@@ -1182,21 +1181,21 @@
},
{
"name": "fruitcake/php-cors",
- "version": "v1.2.0",
+ "version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/fruitcake/php-cors.git",
- "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e"
+ "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e",
- "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e",
+ "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b",
+ "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b",
"shasum": ""
},
"require": {
"php": "^7.4|^8.0",
- "symfony/http-foundation": "^4.4|^5.4|^6"
+ "symfony/http-foundation": "^4.4|^5.4|^6|^7"
},
"require-dev": {
"phpstan/phpstan": "^1.4",
@@ -1206,7 +1205,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.1-dev"
+ "dev-master": "1.2-dev"
}
},
"autoload": {
@@ -1237,7 +1236,7 @@
],
"support": {
"issues": "https://github.com/fruitcake/php-cors/issues",
- "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0"
+ "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0"
},
"funding": [
{
@@ -1249,7 +1248,7 @@
"type": "github"
}
],
- "time": "2022-02-20T15:07:15+00:00"
+ "time": "2023-10-12T05:21:21+00:00"
},
{
"name": "graham-campbell/bounded-cache",
@@ -1320,26 +1319,26 @@
},
{
"name": "graham-campbell/gitlab",
- "version": "v7.0.0",
+ "version": "v7.3.0",
"source": {
"type": "git",
"url": "https://github.com/GrahamCampbell/Laravel-GitLab.git",
- "reference": "fb037dedadacb16e4ab75b8bab58b52b703a4e33"
+ "reference": "3d216eb21237c825916a310115dabcb0de9da27e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitLab/zipball/fb037dedadacb16e4ab75b8bab58b52b703a4e33",
- "reference": "fb037dedadacb16e4ab75b8bab58b52b703a4e33",
+ "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitLab/zipball/3d216eb21237c825916a310115dabcb0de9da27e",
+ "reference": "3d216eb21237c825916a310115dabcb0de9da27e",
"shasum": ""
},
"require": {
"graham-campbell/bounded-cache": "^1.2 || ^2.0",
"graham-campbell/manager": "^5.0",
- "guzzlehttp/guzzle": "^7.5",
- "guzzlehttp/psr7": "^2.4",
+ "guzzlehttp/guzzle": "^7.8",
+ "guzzlehttp/psr7": "^2.6",
"illuminate/contracts": "^8.75 || ^9.0 || ^10.0",
"illuminate/support": "^8.75 || ^9.0 || ^10.0",
- "m4tthumphrey/php-gitlab-api": "11.9.*",
+ "m4tthumphrey/php-gitlab-api": "11.12.*",
"php": "^7.4.15 || ^8.0.2",
"symfony/cache": "^5.4 || ^6.0"
},
@@ -1389,7 +1388,7 @@
],
"support": {
"issues": "https://github.com/GrahamCampbell/Laravel-GitLab/issues",
- "source": "https://github.com/GrahamCampbell/Laravel-GitLab/tree/v7.0.0"
+ "source": "https://github.com/GrahamCampbell/Laravel-GitLab/tree/v7.3.0"
},
"funding": [
{
@@ -1401,7 +1400,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-07T11:41:34+00:00"
+ "time": "2023-10-08T14:32:37+00:00"
},
{
"name": "graham-campbell/manager",
@@ -1537,22 +1536,22 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.7.0",
+ "version": "7.8.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
- "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9",
"shasum": ""
},
"require": {
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0",
- "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
"php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -1643,7 +1642,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.7.0"
+ "source": "https://github.com/guzzle/guzzle/tree/7.8.0"
},
"funding": [
{
@@ -1659,20 +1658,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-21T14:04:53+00:00"
+ "time": "2023-08-27T10:20:53+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6"
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
- "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
"shasum": ""
},
"require": {
@@ -1726,7 +1725,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.0.0"
+ "source": "https://github.com/guzzle/promises/tree/2.0.1"
},
"funding": [
{
@@ -1742,20 +1741,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-21T13:50:22+00:00"
+ "time": "2023-08-03T15:11:55+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "2.5.0",
+ "version": "2.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
- "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
"shasum": ""
},
"require": {
@@ -1842,7 +1841,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.5.0"
+ "source": "https://github.com/guzzle/psr7/tree/2.6.1"
},
"funding": [
{
@@ -1858,20 +1857,20 @@
"type": "tidelift"
}
],
- "time": "2023-04-17T16:11:26+00:00"
+ "time": "2023-08-27T10:13:57+00:00"
},
{
"name": "guzzlehttp/uri-template",
- "version": "v1.0.1",
+ "version": "v1.0.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/uri-template.git",
- "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2"
+ "reference": "61bf437fc2197f587f6857d3ff903a24f1731b5d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2",
- "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2",
+ "url": "https://api.github.com/repos/guzzle/uri-template/zipball/61bf437fc2197f587f6857d3ff903a24f1731b5d",
+ "reference": "61bf437fc2197f587f6857d3ff903a24f1731b5d",
"shasum": ""
},
"require": {
@@ -1879,15 +1878,11 @@
"symfony/polyfill-php80": "^1.17"
},
"require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
"phpunit/phpunit": "^8.5.19 || ^9.5.8",
"uri-template/tests": "1.0.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"psr-4": {
"GuzzleHttp\\UriTemplate\\": "src"
@@ -1926,7 +1921,7 @@
],
"support": {
"issues": "https://github.com/guzzle/uri-template/issues",
- "source": "https://github.com/guzzle/uri-template/tree/v1.0.1"
+ "source": "https://github.com/guzzle/uri-template/tree/v1.0.2"
},
"funding": [
{
@@ -1942,7 +1937,7 @@
"type": "tidelift"
}
],
- "time": "2021-10-07T12:57:01+00:00"
+ "time": "2023-08-27T10:19:19+00:00"
},
{
"name": "http-interop/http-factory-guzzle",
@@ -2061,59 +2056,6 @@
},
"time": "2021-10-08T21:21:46+00:00"
},
- {
- "name": "laravel-lang/lang",
- "version": "8.1.3",
- "source": {
- "type": "git",
- "url": "https://github.com/Laravel-Lang/lang.git",
- "reference": "54048d1319b211daa8ab73655b698feb09588876"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/54048d1319b211daa8ab73655b698feb09588876",
- "reference": "54048d1319b211daa8ab73655b698feb09588876",
- "shasum": ""
- },
- "require": {
- "ext-json": "*"
- },
- "require-dev": {
- "andrey-helldar/pretty-array": "^2.3",
- "andrey-helldar/support": "^3.4",
- "php": "^8.0",
- "phpunit/phpunit": "^9.5",
- "symfony/var-dumper": "^5.2"
- },
- "suggest": {
- "andrey-helldar/laravel-lang-publisher": "Easy installation and update of translation files for your project",
- "arcanedev/laravel-lang": "Translations manager and checker for Laravel 5",
- "overtrue/laravel-lang": "Command to add languages in your project"
- },
- "type": "library",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Laravel-Lang Team",
- "homepage": "https://github.com/Laravel-Lang"
- }
- ],
- "description": "Languages for Laravel",
- "keywords": [
- "lang",
- "languages",
- "laravel",
- "lpm"
- ],
- "support": {
- "issues": "https://github.com/Laravel-Lang/lang/issues",
- "source": "https://github.com/Laravel-Lang/lang"
- },
- "time": "2021-04-14T17:41:45+00:00"
- },
{
"name": "laravel-validation-rules/colour",
"version": "1.7.0",
@@ -2169,16 +2111,16 @@
},
{
"name": "laravel/framework",
- "version": "v10.15.0",
+ "version": "v10.28.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "c7599dc92e04532824bafbd226c2936ce6a905b8"
+ "reference": "09137f50f715c1efc649788a26092dcb1ec4ab6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/c7599dc92e04532824bafbd226c2936ce6a905b8",
- "reference": "c7599dc92e04532824bafbd226c2936ce6a905b8",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/09137f50f715c1efc649788a26092dcb1ec4ab6e",
+ "reference": "09137f50f715c1efc649788a26092dcb1ec4ab6e",
"shasum": ""
},
"require": {
@@ -2196,11 +2138,12 @@
"ext-tokenizer": "*",
"fruitcake/php-cors": "^1.2",
"guzzlehttp/uri-template": "^1.0",
+ "laravel/prompts": "^0.1.9",
"laravel/serializable-closure": "^1.3",
"league/commonmark": "^2.2.1",
"league/flysystem": "^3.8.0",
"monolog/monolog": "^3.0",
- "nesbot/carbon": "^2.62.1",
+ "nesbot/carbon": "^2.67",
"nunomaduro/termwind": "^1.13",
"php": "^8.1",
"psr/container": "^1.1.1|^2.0.1",
@@ -2277,9 +2220,8 @@
"league/flysystem-read-only": "^3.3",
"league/flysystem-sftp-v3": "^3.0",
"mockery/mockery": "^1.5.1",
- "orchestra/testbench-core": "^8.4",
+ "orchestra/testbench-core": "^8.12",
"pda/pheanstalk": "^4.0",
- "phpstan/phpdoc-parser": "^1.15",
"phpstan/phpstan": "^1.4.7",
"phpunit/phpunit": "^10.0.7",
"predis/predis": "^2.0.2",
@@ -2365,20 +2307,77 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2023-07-11T13:43:52+00:00"
+ "time": "2023-10-10T13:01:37+00:00"
},
{
- "name": "laravel/serializable-closure",
- "version": "v1.3.0",
+ "name": "laravel/prompts",
+ "version": "v0.1.11",
"source": {
"type": "git",
- "url": "https://github.com/laravel/serializable-closure.git",
- "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37"
+ "url": "https://github.com/laravel/prompts.git",
+ "reference": "cce65a90e64712909ea1adc033e1d88de8455ffd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37",
- "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37",
+ "url": "https://api.github.com/repos/laravel/prompts/zipball/cce65a90e64712909ea1adc033e1d88de8455ffd",
+ "reference": "cce65a90e64712909ea1adc033e1d88de8455ffd",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "illuminate/collections": "^10.0|^11.0",
+ "php": "^8.1",
+ "symfony/console": "^6.2"
+ },
+ "conflict": {
+ "illuminate/console": ">=10.17.0 <10.25.0",
+ "laravel/framework": ">=10.17.0 <10.25.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "pestphp/pest": "^2.3",
+ "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan-mockery": "^1.1"
+ },
+ "suggest": {
+ "ext-pcntl": "Required for the spinner to be animated."
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "0.1.x-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/helpers.php"
+ ],
+ "psr-4": {
+ "Laravel\\Prompts\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "support": {
+ "issues": "https://github.com/laravel/prompts/issues",
+ "source": "https://github.com/laravel/prompts/tree/v0.1.11"
+ },
+ "time": "2023-10-03T01:07:35+00:00"
+ },
+ {
+ "name": "laravel/serializable-closure",
+ "version": "v1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laravel/serializable-closure.git",
+ "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902",
+ "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902",
"shasum": ""
},
"require": {
@@ -2425,20 +2424,20 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
- "time": "2023-01-30T18:31:20+00:00"
+ "time": "2023-07-14T13:56:28+00:00"
},
{
"name": "laravel/tinker",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/laravel/tinker.git",
- "reference": "04a2d3bd0d650c0764f70bf49d1ee39393e4eb10"
+ "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/tinker/zipball/04a2d3bd0d650c0764f70bf49d1ee39393e4eb10",
- "reference": "04a2d3bd0d650c0764f70bf49d1ee39393e4eb10",
+ "url": "https://api.github.com/repos/laravel/tinker/zipball/b936d415b252b499e8c3b1f795cd4fc20f57e1f3",
+ "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3",
"shasum": ""
},
"require": {
@@ -2451,6 +2450,7 @@
},
"require-dev": {
"mockery/mockery": "~1.3.3|^1.4.2",
+ "phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"suggest": {
@@ -2491,9 +2491,9 @@
],
"support": {
"issues": "https://github.com/laravel/tinker/issues",
- "source": "https://github.com/laravel/tinker/tree/v2.8.1"
+ "source": "https://github.com/laravel/tinker/tree/v2.8.2"
},
- "time": "2023-02-15T16:40:09+00:00"
+ "time": "2023-08-15T14:27:00+00:00"
},
{
"name": "laravel/ui",
@@ -2559,23 +2559,24 @@
},
{
"name": "ldc/web-admin-secure-laravel",
- "version": "2.0.0",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://lab.s-web.fr/ldc-web/projets/ldc-web-admin-secure-laravel.git",
- "reference": "5f0c6b136fd967102bafeefa3048ffd47dbbc9be"
+ "reference": "79ac4f4261ad814cf62c75524534158167d02eb3"
},
"dist": {
"type": "zip",
- "url": "https://lab.s-web.fr/api/v4/projects/20/packages/composer/archives/ldc/web-admin-secure-laravel.zip?sha=5f0c6b136fd967102bafeefa3048ffd47dbbc9be",
- "reference": "5f0c6b136fd967102bafeefa3048ffd47dbbc9be",
+ "url": "https://lab.s-web.fr/api/v4/projects/20/packages/composer/archives/ldc/web-admin-secure-laravel.zip?sha=79ac4f4261ad814cf62c75524534158167d02eb3",
+ "reference": "79ac4f4261ad814cf62c75524534158167d02eb3",
"shasum": ""
},
"require": {
"dxw/cidr": "^3.1",
"illuminate/support": "~10",
"laravel/framework": "~10",
- "php": ">=8.2"
+ "php": ">=8.2",
+ "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0"
},
"require-dev": {
"orchestra/testbench": "^8",
@@ -2624,16 +2625,16 @@
},
{
"name": "league/commonmark",
- "version": "2.4.0",
+ "version": "2.4.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
- "reference": "d44a24690f16b8c1808bf13b1bd54ae4c63ea048"
+ "reference": "3669d6d5f7a47a93c08ddff335e6d945481a1dd5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d44a24690f16b8c1808bf13b1bd54ae4c63ea048",
- "reference": "d44a24690f16b8c1808bf13b1bd54ae4c63ea048",
+ "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/3669d6d5f7a47a93c08ddff335e6d945481a1dd5",
+ "reference": "3669d6d5f7a47a93c08ddff335e6d945481a1dd5",
"shasum": ""
},
"require": {
@@ -2726,7 +2727,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-24T15:16:10+00:00"
+ "time": "2023-08-30T16:55:00+00:00"
},
{
"name": "league/config",
@@ -2812,16 +2813,16 @@
},
{
"name": "league/flysystem",
- "version": "3.15.1",
+ "version": "3.17.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
- "reference": "a141d430414fcb8bf797a18716b09f759a385bed"
+ "reference": "bd4c9b26849d82364119c68429541f1631fba94b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a141d430414fcb8bf797a18716b09f759a385bed",
- "reference": "a141d430414fcb8bf797a18716b09f759a385bed",
+ "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/bd4c9b26849d82364119c68429541f1631fba94b",
+ "reference": "bd4c9b26849d82364119c68429541f1631fba94b",
"shasum": ""
},
"require": {
@@ -2830,6 +2831,8 @@
"php": "^8.0.2"
},
"conflict": {
+ "async-aws/core": "<1.19.0",
+ "async-aws/s3": "<1.14.0",
"aws/aws-sdk-php": "3.209.31 || 3.210.0",
"guzzlehttp/guzzle": "<7.0",
"guzzlehttp/ringphp": "<1.1.1",
@@ -2837,8 +2840,8 @@
"symfony/http-client": "<5.2"
},
"require-dev": {
- "async-aws/s3": "^1.5",
- "async-aws/simple-s3": "^1.1",
+ "async-aws/s3": "^1.5 || ^2.0",
+ "async-aws/simple-s3": "^1.1 || ^2.0",
"aws/aws-sdk-php": "^3.220.0",
"composer/semver": "^3.0",
"ext-fileinfo": "*",
@@ -2849,7 +2852,7 @@
"microsoft/azure-storage-blob": "^1.1",
"phpseclib/phpseclib": "^3.0.14",
"phpstan/phpstan": "^0.12.26",
- "phpunit/phpunit": "^9.5.11",
+ "phpunit/phpunit": "^9.5.11|^10.0",
"sabre/dav": "^4.3.1"
},
"type": "library",
@@ -2884,7 +2887,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
- "source": "https://github.com/thephpleague/flysystem/tree/3.15.1"
+ "source": "https://github.com/thephpleague/flysystem/tree/3.17.0"
},
"funding": [
{
@@ -2896,20 +2899,20 @@
"type": "github"
}
],
- "time": "2023-05-04T09:04:26+00:00"
+ "time": "2023-10-05T20:15:05+00:00"
},
{
"name": "league/flysystem-local",
- "version": "3.15.0",
+ "version": "3.16.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-local.git",
- "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3"
+ "reference": "ec7383f25642e6fd4bb0c9554fc2311245391781"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/543f64c397fefdf9cfeac443ffb6beff602796b3",
- "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3",
+ "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/ec7383f25642e6fd4bb0c9554fc2311245391781",
+ "reference": "ec7383f25642e6fd4bb0c9554fc2311245391781",
"shasum": ""
},
"require": {
@@ -2944,7 +2947,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem-local/issues",
- "source": "https://github.com/thephpleague/flysystem-local/tree/3.15.0"
+ "source": "https://github.com/thephpleague/flysystem-local/tree/3.16.0"
},
"funding": [
{
@@ -2956,30 +2959,30 @@
"type": "github"
}
],
- "time": "2023-05-02T20:02:14+00:00"
+ "time": "2023-08-30T10:23:59+00:00"
},
{
"name": "league/mime-type-detection",
- "version": "1.11.0",
+ "version": "1.13.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+ "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+ "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96",
+ "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
+ "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
},
"type": "library",
"autoload": {
@@ -3000,7 +3003,7 @@
"description": "Mime-type detection for Flysystem",
"support": {
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
- "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
+ "source": "https://github.com/thephpleague/mime-type-detection/tree/1.13.0"
},
"funding": [
{
@@ -3012,42 +3015,42 @@
"type": "tidelift"
}
],
- "time": "2022-04-17T13:12:02+00:00"
+ "time": "2023-08-05T12:09:49+00:00"
},
{
"name": "m4tthumphrey/php-gitlab-api",
- "version": "11.9.1",
+ "version": "11.12.0",
"source": {
"type": "git",
"url": "https://github.com/GitLabPHP/Client.git",
- "reference": "148ed10609f92e03afbf756e734ee4b76be36832"
+ "reference": "b0d70a6142c52407a226d940ef2d0ae96e65c7e7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/GitLabPHP/Client/zipball/148ed10609f92e03afbf756e734ee4b76be36832",
- "reference": "148ed10609f92e03afbf756e734ee4b76be36832",
+ "url": "https://api.github.com/repos/GitLabPHP/Client/zipball/b0d70a6142c52407a226d940ef2d0ae96e65c7e7",
+ "reference": "b0d70a6142c52407a226d940ef2d0ae96e65c7e7",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-xml": "*",
"php": "^7.4.15 || ^8.0.2",
- "php-http/cache-plugin": "^1.7.5",
- "php-http/client-common": "^2.6",
- "php-http/discovery": "^1.15",
- "php-http/httplug": "^2.3",
- "php-http/multipart-stream-builder": "^1.2",
+ "php-http/cache-plugin": "^1.8",
+ "php-http/client-common": "^2.7",
+ "php-http/discovery": "^1.19",
+ "php-http/httplug": "^2.4",
+ "php-http/multipart-stream-builder": "^1.3",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"psr/http-client-implementation": "^1.0",
"psr/http-factory-implementation": "^1.0",
- "psr/http-message": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.26"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
- "guzzlehttp/guzzle": "^7.5",
- "http-interop/http-factory-guzzle": "^1.0"
+ "guzzlehttp/guzzle": "^7.8",
+ "http-interop/http-factory-guzzle": "^1.2"
},
"type": "library",
"extra": {
@@ -3094,7 +3097,7 @@
],
"support": {
"issues": "https://github.com/GitLabPHP/Client/issues",
- "source": "https://github.com/GitLabPHP/Client/tree/11.9.1"
+ "source": "https://github.com/GitLabPHP/Client/tree/11.12.0"
},
"funding": [
{
@@ -3102,11 +3105,11 @@
"type": "github"
}
],
- "time": "2023-04-30T19:02:00+00:00"
+ "time": "2023-10-08T14:28:30+00:00"
},
{
"name": "mews/purifier",
- "version": "3.4.0",
+ "version": "3.4.1",
"source": {
"type": "git",
"url": "https://github.com/mewebstudio/Purifier.git",
@@ -3178,7 +3181,7 @@
],
"support": {
"issues": "https://github.com/mewebstudio/Purifier/issues",
- "source": "https://github.com/mewebstudio/Purifier/tree/3.4.0"
+ "source": "https://github.com/mewebstudio/Purifier/tree/3.4.1"
},
"time": "2023-03-14T08:28:28+00:00"
},
@@ -3285,26 +3288,27 @@
},
{
"name": "mpdf/mpdf",
- "version": "v8.1.6",
+ "version": "v8.2.0",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
- "reference": "146c7c1dfd21c826b9d5bbfe3c15e52fd933c90f"
+ "reference": "170a236a588d177c2aa7447ce490a030ca68e6f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mpdf/mpdf/zipball/146c7c1dfd21c826b9d5bbfe3c15e52fd933c90f",
- "reference": "146c7c1dfd21c826b9d5bbfe3c15e52fd933c90f",
+ "url": "https://api.github.com/repos/mpdf/mpdf/zipball/170a236a588d177c2aa7447ce490a030ca68e6f4",
+ "reference": "170a236a588d177c2aa7447ce490a030ca68e6f4",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-mbstring": "*",
+ "mpdf/psr-http-message-shim": "^1.0 || ^2.0",
"mpdf/psr-log-aware-trait": "^2.0 || ^3.0",
"myclabs/deep-copy": "^1.7",
"paragonie/random_compat": "^1.4|^2.0|^9.99.99",
"php": "^5.6 || ^7.0 || ~8.0.0 || ~8.1.0 || ~8.2.0",
- "psr/http-message": "^1.0",
+ "psr/http-message": "^1.0 || ^2.0",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"setasign/fpdi": "^2.1"
},
@@ -3322,6 +3326,9 @@
},
"type": "library",
"autoload": {
+ "files": [
+ "src/functions.php"
+ ],
"psr-4": {
"Mpdf\\": "src/"
}
@@ -3358,7 +3365,55 @@
"type": "custom"
}
],
- "time": "2023-05-03T19:36:43+00:00"
+ "time": "2023-09-01T11:44:52+00:00"
+ },
+ {
+ "name": "mpdf/psr-http-message-shim",
+ "version": "v2.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/mpdf/psr-http-message-shim.git",
+ "reference": "f25a0153d645e234f9db42e5433b16d9b113920f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/mpdf/psr-http-message-shim/zipball/f25a0153d645e234f9db42e5433b16d9b113920f",
+ "reference": "f25a0153d645e234f9db42e5433b16d9b113920f",
+ "shasum": ""
+ },
+ "require": {
+ "psr/http-message": "^2.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Mpdf\\PsrHttpMessageShim\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mark Dorison",
+ "email": "mark@chromatichq.com"
+ },
+ {
+ "name": "Kristofer Widholm",
+ "email": "kristofer@chromatichq.com"
+ },
+ {
+ "name": "Nigel Cunningham",
+ "email": "nigel.cunningham@technocrat.com.au"
+ }
+ ],
+ "description": "Shim to allow support of different psr/message versions.",
+ "support": {
+ "issues": "https://github.com/mpdf/psr-http-message-shim/issues",
+ "source": "https://github.com/mpdf/psr-http-message-shim/tree/v2.0.1"
+ },
+ "time": "2023-10-02T14:34:03+00:00"
},
{
"name": "mpdf/psr-log-aware-trait",
@@ -3465,25 +3520,29 @@
},
{
"name": "nesbot/carbon",
- "version": "2.68.1",
+ "version": "2.71.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
- "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da"
+ "reference": "98276233188583f2ff845a0f992a235472d9466a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4f991ed2a403c85efbc4f23eb4030063fdbe01da",
- "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da",
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a",
+ "reference": "98276233188583f2ff845a0f992a235472d9466a",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^7.1.8 || ^8.0",
+ "psr/clock": "^1.0",
"symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.16",
"symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0"
},
+ "provide": {
+ "psr/clock-implementation": "1.0"
+ },
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.1.4",
"doctrine/orm": "^2.7",
@@ -3563,25 +3622,25 @@
"type": "tidelift"
}
],
- "time": "2023-06-20T18:29:04+00:00"
+ "time": "2023-09-25T11:31:05+00:00"
},
{
"name": "nette/schema",
- "version": "v1.2.3",
+ "version": "v1.2.5",
"source": {
"type": "git",
"url": "https://github.com/nette/schema.git",
- "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f"
+ "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nette/schema/zipball/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f",
- "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f",
+ "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a",
+ "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a",
"shasum": ""
},
"require": {
"nette/utils": "^2.5.7 || ^3.1.5 || ^4.0",
- "php": ">=7.1 <8.3"
+ "php": "7.1 - 8.3"
},
"require-dev": {
"nette/tester": "^2.3 || ^2.4",
@@ -3623,26 +3682,26 @@
],
"support": {
"issues": "https://github.com/nette/schema/issues",
- "source": "https://github.com/nette/schema/tree/v1.2.3"
+ "source": "https://github.com/nette/schema/tree/v1.2.5"
},
- "time": "2022-10-13T01:24:26+00:00"
+ "time": "2023-10-05T20:37:59+00:00"
},
{
"name": "nette/utils",
- "version": "v4.0.0",
+ "version": "v4.0.2",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
- "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e"
+ "reference": "cead6637226456b35e1175cc53797dd585d85545"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e",
- "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e",
+ "url": "https://api.github.com/repos/nette/utils/zipball/cead6637226456b35e1175cc53797dd585d85545",
+ "reference": "cead6637226456b35e1175cc53797dd585d85545",
"shasum": ""
},
"require": {
- "php": ">=8.0 <8.3"
+ "php": ">=8.0 <8.4"
},
"conflict": {
"nette/finder": "<3",
@@ -3650,7 +3709,7 @@
},
"require-dev": {
"jetbrains/phpstorm-attributes": "dev-master",
- "nette/tester": "^2.4",
+ "nette/tester": "^2.5",
"phpstan/phpstan": "^1.0",
"tracy/tracy": "^2.9"
},
@@ -3660,8 +3719,7 @@
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
"ext-json": "to use Nette\\Utils\\Json",
"ext-mbstring": "to use Strings::lower() etc...",
- "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()",
- "ext-xml": "to use Strings::length() etc. when mbstring is not available"
+ "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
},
"type": "library",
"extra": {
@@ -3710,22 +3768,22 @@
],
"support": {
"issues": "https://github.com/nette/utils/issues",
- "source": "https://github.com/nette/utils/tree/v4.0.0"
+ "source": "https://github.com/nette/utils/tree/v4.0.2"
},
- "time": "2023-02-02T10:41:53+00:00"
+ "time": "2023-09-19T11:58:07+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v4.16.0",
+ "version": "v4.17.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "19526a33fb561ef417e822e85f08a00db4059c17"
+ "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17",
- "reference": "19526a33fb561ef417e822e85f08a00db4059c17",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
+ "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"shasum": ""
},
"require": {
@@ -3766,9 +3824,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
},
- "time": "2023-06-25T14:52:30+00:00"
+ "time": "2023-08-13T19:53:39+00:00"
},
{
"name": "nunomaduro/termwind",
@@ -4556,16 +4614,16 @@
},
{
"name": "phpseclib/phpseclib",
- "version": "2.0.44",
+ "version": "2.0.45",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "149f608243f8133c61926aae26ce67d2b22b37e5"
+ "reference": "28d8f438a0064c9de80857e3270d071495544640"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/149f608243f8133c61926aae26ce67d2b22b37e5",
- "reference": "149f608243f8133c61926aae26ce67d2b22b37e5",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/28d8f438a0064c9de80857e3270d071495544640",
+ "reference": "28d8f438a0064c9de80857e3270d071495544640",
"shasum": ""
},
"require": {
@@ -4646,7 +4704,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
- "source": "https://github.com/phpseclib/phpseclib/tree/2.0.44"
+ "source": "https://github.com/phpseclib/phpseclib/tree/2.0.45"
},
"funding": [
{
@@ -4662,7 +4720,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-13T08:41:47+00:00"
+ "time": "2023-09-15T20:55:47+00:00"
},
{
"name": "psr/cache",
@@ -4713,6 +4771,54 @@
},
"time": "2021-02-03T23:26:27+00:00"
},
+ {
+ "name": "psr/clock",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/clock.git",
+ "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d",
+ "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Clock\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for reading the clock.",
+ "homepage": "https://github.com/php-fig/clock",
+ "keywords": [
+ "clock",
+ "now",
+ "psr",
+ "psr-20",
+ "time"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/clock/issues",
+ "source": "https://github.com/php-fig/clock/tree/1.0.0"
+ },
+ "time": "2022-11-25T14:36:26+00:00"
+ },
{
"name": "psr/container",
"version": "2.0.2",
@@ -4818,16 +4924,16 @@
},
{
"name": "psr/http-client",
- "version": "1.0.2",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-client.git",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
"shasum": ""
},
"require": {
@@ -4864,9 +4970,9 @@
"psr-18"
],
"support": {
- "source": "https://github.com/php-fig/http-client/tree/1.0.2"
+ "source": "https://github.com/php-fig/http-client"
},
- "time": "2023-04-10T20:12:12+00:00"
+ "time": "2023-09-23T14:17:50+00:00"
},
{
"name": "psr/http-factory",
@@ -4925,16 +5031,16 @@
},
{
"name": "psr/http-message",
- "version": "1.1",
+ "version": "2.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
"shasum": ""
},
"require": {
@@ -4943,7 +5049,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -4958,7 +5064,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
@@ -4972,9 +5078,9 @@
"response"
],
"support": {
- "source": "https://github.com/php-fig/http-message/tree/1.1"
+ "source": "https://github.com/php-fig/http-message/tree/2.0"
},
- "time": "2023-04-04T09:50:52+00:00"
+ "time": "2023-04-04T09:54:51+00:00"
},
{
"name": "psr/log",
@@ -5079,16 +5185,16 @@
},
{
"name": "psy/psysh",
- "version": "v0.11.18",
+ "version": "v0.11.21",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec"
+ "reference": "bcb22101107f3bf770523b65630c9d547f60c540"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec",
- "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/bcb22101107f3bf770523b65630c9d547f60c540",
+ "reference": "bcb22101107f3bf770523b65630c9d547f60c540",
"shasum": ""
},
"require": {
@@ -5118,6 +5224,10 @@
"extra": {
"branch-alias": {
"dev-main": "0.11.x-dev"
+ },
+ "bamarni-bin": {
+ "bin-links": false,
+ "forward-command": false
}
},
"autoload": {
@@ -5149,9 +5259,9 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
- "source": "https://github.com/bobthecow/psysh/tree/v0.11.18"
+ "source": "https://github.com/bobthecow/psysh/tree/v0.11.21"
},
- "time": "2023-05-23T02:31:11+00:00"
+ "time": "2023-09-17T21:15:54+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -5437,16 +5547,16 @@
},
{
"name": "sentry/sentry",
- "version": "3.20.1",
+ "version": "3.21.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-php.git",
- "reference": "644ad9768c18139a80ac510090fad000d9ffd8a4"
+ "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/644ad9768c18139a80ac510090fad000d9ffd8a4",
- "reference": "644ad9768c18139a80ac510090fad000d9ffd8a4",
+ "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/624aafc22b84b089ffa43b71fb01e0096505ec4f",
+ "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f",
"shasum": ""
},
"require": {
@@ -5490,11 +5600,6 @@
"monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler."
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.13.x-dev"
- }
- },
"autoload": {
"files": [
"src/functions.php"
@@ -5526,7 +5631,7 @@
],
"support": {
"issues": "https://github.com/getsentry/sentry-php/issues",
- "source": "https://github.com/getsentry/sentry-php/tree/3.20.1"
+ "source": "https://github.com/getsentry/sentry-php/tree/3.21.0"
},
"funding": [
{
@@ -5538,20 +5643,20 @@
"type": "custom"
}
],
- "time": "2023-06-26T11:01:40+00:00"
+ "time": "2023-07-31T15:31:24+00:00"
},
{
"name": "sentry/sentry-laravel",
- "version": "3.6.1",
+ "version": "3.8.1",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git",
- "reference": "eb94a52b88794d0c108dc46ca1a680531c3a8bad"
+ "reference": "b6142a80fa9360a10b786d2da032339602d0e362"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/eb94a52b88794d0c108dc46ca1a680531c3a8bad",
- "reference": "eb94a52b88794d0c108dc46ca1a680531c3a8bad",
+ "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/b6142a80fa9360a10b786d2da032339602d0e362",
+ "reference": "b6142a80fa9360a10b786d2da032339602d0e362",
"shasum": ""
},
"require": {
@@ -5559,14 +5664,16 @@
"nyholm/psr7": "^1.0",
"php": "^7.2 | ^8.0",
"sentry/sdk": "^3.4",
- "sentry/sentry": "^3.20",
+ "sentry/sentry": "^3.20.1",
"symfony/psr-http-message-bridge": "^1.0 | ^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.11",
+ "laravel/folio": "^1.0",
"laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0",
"mockery/mockery": "^1.3",
"orchestra/testbench": "^4.7 | ^5.1 | ^6.0 | ^7.0 | ^8.0",
+ "phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^8.4 | ^9.3"
},
"type": "library",
@@ -5616,7 +5723,7 @@
],
"support": {
"issues": "https://github.com/getsentry/sentry-laravel/issues",
- "source": "https://github.com/getsentry/sentry-laravel/tree/3.6.1"
+ "source": "https://github.com/getsentry/sentry-laravel/tree/3.8.1"
},
"funding": [
{
@@ -5628,20 +5735,20 @@
"type": "custom"
}
],
- "time": "2023-07-04T10:30:42+00:00"
+ "time": "2023-10-04T10:21:16+00:00"
},
{
"name": "setasign/fpdi",
- "version": "v2.3.7",
+ "version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
- "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05"
+ "reference": "ecf0459643ec963febfb9a5d529dcd93656006a4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Setasign/FPDI/zipball/bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05",
- "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05",
+ "url": "https://api.github.com/repos/Setasign/FPDI/zipball/ecf0459643ec963febfb9a5d529dcd93656006a4",
+ "reference": "ecf0459643ec963febfb9a5d529dcd93656006a4",
"shasum": ""
},
"require": {
@@ -5654,7 +5761,7 @@
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
- "setasign/tfpdf": "1.31",
+ "setasign/tfpdf": "~1.31",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "~6.2"
},
@@ -5692,7 +5799,7 @@
],
"support": {
"issues": "https://github.com/Setasign/FPDI/issues",
- "source": "https://github.com/Setasign/FPDI/tree/v2.3.7"
+ "source": "https://github.com/Setasign/FPDI/tree/v2.5.0"
},
"funding": [
{
@@ -5700,20 +5807,20 @@
"type": "tidelift"
}
],
- "time": "2023-02-09T10:38:43+00:00"
+ "time": "2023-09-28T10:46:27+00:00"
},
{
"name": "symfony/cache",
- "version": "v6.3.2",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
- "reference": "d176b97600860df13e851538c2df2ad88e9e5ca9"
+ "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/cache/zipball/d176b97600860df13e851538c2df2ad88e9e5ca9",
- "reference": "d176b97600860df13e851538c2df2ad88e9e5ca9",
+ "url": "https://api.github.com/repos/symfony/cache/zipball/6c1a3ea078c4d88ee892530945df63a87981b2da",
+ "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da",
"shasum": ""
},
"require": {
@@ -5780,7 +5887,7 @@
"psr6"
],
"support": {
- "source": "https://github.com/symfony/cache/tree/v6.3.2"
+ "source": "https://github.com/symfony/cache/tree/v6.3.5"
},
"funding": [
{
@@ -5796,7 +5903,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-27T16:19:14+00:00"
+ "time": "2023-09-26T15:48:55+00:00"
},
{
"name": "symfony/cache-contracts",
@@ -5876,16 +5983,16 @@
},
{
"name": "symfony/console",
- "version": "v6.3.0",
+ "version": "v6.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7"
+ "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7",
- "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7",
+ "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6",
+ "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6",
"shasum": ""
},
"require": {
@@ -5946,7 +6053,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v6.3.0"
+ "source": "https://github.com/symfony/console/tree/v6.3.4"
},
"funding": [
{
@@ -5962,20 +6069,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-29T12:49:39+00:00"
+ "time": "2023-08-16T10:10:12+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v6.3.0",
+ "version": "v6.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf"
+ "reference": "883d961421ab1709877c10ac99451632a3d6fa57"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf",
- "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/883d961421ab1709877c10ac99451632a3d6fa57",
+ "reference": "883d961421ab1709877c10ac99451632a3d6fa57",
"shasum": ""
},
"require": {
@@ -6011,7 +6118,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/css-selector/tree/v6.3.0"
+ "source": "https://github.com/symfony/css-selector/tree/v6.3.2"
},
"funding": [
{
@@ -6027,7 +6134,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-20T16:43:42+00:00"
+ "time": "2023-07-12T16:00:22+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -6098,16 +6205,16 @@
},
{
"name": "symfony/error-handler",
- "version": "v6.3.0",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
- "reference": "99d2d814a6351461af350ead4d963bd67451236f"
+ "reference": "1f69476b64fb47105c06beef757766c376b548c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/error-handler/zipball/99d2d814a6351461af350ead4d963bd67451236f",
- "reference": "99d2d814a6351461af350ead4d963bd67451236f",
+ "url": "https://api.github.com/repos/symfony/error-handler/zipball/1f69476b64fb47105c06beef757766c376b548c4",
+ "reference": "1f69476b64fb47105c06beef757766c376b548c4",
"shasum": ""
},
"require": {
@@ -6152,7 +6259,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/error-handler/tree/v6.3.0"
+ "source": "https://github.com/symfony/error-handler/tree/v6.3.5"
},
"funding": [
{
@@ -6168,20 +6275,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-10T12:03:13+00:00"
+ "time": "2023-09-12T06:57:20+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v6.3.0",
+ "version": "v6.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa"
+ "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa",
- "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e",
+ "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e",
"shasum": ""
},
"require": {
@@ -6232,7 +6339,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2"
},
"funding": [
{
@@ -6248,7 +6355,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-21T14:41:17+00:00"
+ "time": "2023-07-06T06:56:43+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -6328,16 +6435,16 @@
},
{
"name": "symfony/finder",
- "version": "v6.3.0",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2"
+ "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2",
- "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4",
+ "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4",
"shasum": ""
},
"require": {
@@ -6372,7 +6479,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v6.3.0"
+ "source": "https://github.com/symfony/finder/tree/v6.3.5"
},
"funding": [
{
@@ -6388,20 +6495,20 @@
"type": "tidelift"
}
],
- "time": "2023-04-02T01:25:41+00:00"
+ "time": "2023-09-26T12:56:25+00:00"
},
{
"name": "symfony/http-client",
- "version": "v6.3.1",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
- "reference": "1c828a06aef2f5eeba42026dfc532d4fc5406123"
+ "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-client/zipball/1c828a06aef2f5eeba42026dfc532d4fc5406123",
- "reference": "1c828a06aef2f5eeba42026dfc532d4fc5406123",
+ "url": "https://api.github.com/repos/symfony/http-client/zipball/213e564da4cbf61acc9728d97e666bcdb868c10d",
+ "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d",
"shasum": ""
},
"require": {
@@ -6464,7 +6571,7 @@
"http"
],
"support": {
- "source": "https://github.com/symfony/http-client/tree/v6.3.1"
+ "source": "https://github.com/symfony/http-client/tree/v6.3.5"
},
"funding": [
{
@@ -6480,7 +6587,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-24T11:51:27+00:00"
+ "time": "2023-09-29T15:57:12+00:00"
},
{
"name": "symfony/http-client-contracts",
@@ -6562,16 +6669,16 @@
},
{
"name": "symfony/http-foundation",
- "version": "v6.3.1",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66"
+ "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0ad0d153e1c20069250986cd9e9dd1ccebb0d66",
- "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957",
+ "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957",
"shasum": ""
},
"require": {
@@ -6619,7 +6726,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-foundation/tree/v6.3.1"
+ "source": "https://github.com/symfony/http-foundation/tree/v6.3.5"
},
"funding": [
{
@@ -6635,20 +6742,20 @@
"type": "tidelift"
}
],
- "time": "2023-06-24T11:51:27+00:00"
+ "time": "2023-09-04T21:33:54+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v6.3.1",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374"
+ "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/161e16fd2e35fb4881a43bc8b383dfd5be4ac374",
- "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc",
+ "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc",
"shasum": ""
},
"require": {
@@ -6657,7 +6764,7 @@
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/error-handler": "^6.3",
"symfony/event-dispatcher": "^5.4|^6.0",
- "symfony/http-foundation": "^6.2.7",
+ "symfony/http-foundation": "^6.3.4",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
@@ -6665,7 +6772,7 @@
"symfony/cache": "<5.4",
"symfony/config": "<6.1",
"symfony/console": "<5.4",
- "symfony/dependency-injection": "<6.3",
+ "symfony/dependency-injection": "<6.3.4",
"symfony/doctrine-bridge": "<5.4",
"symfony/form": "<5.4",
"symfony/http-client": "<5.4",
@@ -6689,7 +6796,7 @@
"symfony/config": "^6.1",
"symfony/console": "^5.4|^6.0",
"symfony/css-selector": "^5.4|^6.0",
- "symfony/dependency-injection": "^6.3",
+ "symfony/dependency-injection": "^6.3.4",
"symfony/dom-crawler": "^5.4|^6.0",
"symfony/expression-language": "^5.4|^6.0",
"symfony/finder": "^5.4|^6.0",
@@ -6732,7 +6839,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-kernel/tree/v6.3.1"
+ "source": "https://github.com/symfony/http-kernel/tree/v6.3.5"
},
"funding": [
{
@@ -6748,20 +6855,20 @@
"type": "tidelift"
}
],
- "time": "2023-06-26T06:07:32+00:00"
+ "time": "2023-09-30T06:37:04+00:00"
},
{
"name": "symfony/mailer",
- "version": "v6.3.0",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailer.git",
- "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435"
+ "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mailer/zipball/7b03d9be1dea29bfec0a6c7b603f5072a4c97435",
- "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435",
+ "url": "https://api.github.com/repos/symfony/mailer/zipball/d89611a7830d51b5e118bca38e390dea92f9ea06",
+ "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06",
"shasum": ""
},
"require": {
@@ -6812,7 +6919,7 @@
"description": "Helps sending emails",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/mailer/tree/v6.3.0"
+ "source": "https://github.com/symfony/mailer/tree/v6.3.5"
},
"funding": [
{
@@ -6828,24 +6935,25 @@
"type": "tidelift"
}
],
- "time": "2023-05-29T12:49:39+00:00"
+ "time": "2023-09-06T09:47:15+00:00"
},
{
"name": "symfony/mime",
- "version": "v6.3.0",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
- "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad"
+ "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mime/zipball/7b5d2121858cd6efbed778abce9cfdd7ab1f62ad",
- "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad",
+ "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e",
+ "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e",
"shasum": ""
},
"require": {
"php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0"
},
@@ -6854,7 +6962,7 @@
"phpdocumentor/reflection-docblock": "<3.2.2",
"phpdocumentor/type-resolver": "<1.4.0",
"symfony/mailer": "<5.4",
- "symfony/serializer": "<6.2"
+ "symfony/serializer": "<6.2.13|>=6.3,<6.3.2"
},
"require-dev": {
"egulias/email-validator": "^2.1.10|^3.1|^4",
@@ -6863,7 +6971,7 @@
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/property-access": "^5.4|^6.0",
"symfony/property-info": "^5.4|^6.0",
- "symfony/serializer": "^6.2"
+ "symfony/serializer": "~6.2.13|^6.3.2"
},
"type": "library",
"autoload": {
@@ -6895,7 +7003,7 @@
"mime-type"
],
"support": {
- "source": "https://github.com/symfony/mime/tree/v6.3.0"
+ "source": "https://github.com/symfony/mime/tree/v6.3.5"
},
"funding": [
{
@@ -6911,7 +7019,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-28T15:57:00+00:00"
+ "time": "2023-09-29T06:59:36+00:00"
},
{
"name": "symfony/options-resolver",
@@ -6982,16 +7090,16 @@
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"shasum": ""
},
"require": {
@@ -7006,7 +7114,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7044,7 +7152,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
},
"funding": [
{
@@ -7060,20 +7168,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
+ "reference": "875e90aeea2777b6f135677f618529449334a612"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612",
+ "reference": "875e90aeea2777b6f135677f618529449334a612",
"shasum": ""
},
"require": {
@@ -7085,7 +7193,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7125,7 +7233,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0"
},
"funding": [
{
@@ -7141,20 +7249,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
- "reference": "639084e360537a19f9ee352433b84ce831f3d2da"
+ "reference": "ecaafce9f77234a6a449d29e49267ba10499116d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da",
- "reference": "639084e360537a19f9ee352433b84ce831f3d2da",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d",
+ "reference": "ecaafce9f77234a6a449d29e49267ba10499116d",
"shasum": ""
},
"require": {
@@ -7168,7 +7276,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7212,7 +7320,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0"
},
"funding": [
{
@@ -7228,20 +7336,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:30:37+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
+ "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
+ "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
"shasum": ""
},
"require": {
@@ -7253,7 +7361,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7296,7 +7404,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
},
"funding": [
{
@@ -7312,20 +7420,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
"shasum": ""
},
"require": {
@@ -7340,7 +7448,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7379,7 +7487,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
},
"funding": [
{
@@ -7395,20 +7503,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-07-28T09:04:16+00:00"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
+ "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
- "reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179",
+ "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179",
"shasum": ""
},
"require": {
@@ -7417,7 +7525,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7455,7 +7563,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0"
},
"funding": [
{
@@ -7471,20 +7579,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"shasum": ""
},
"require": {
@@ -7493,7 +7601,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7538,7 +7646,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
},
"funding": [
{
@@ -7554,20 +7662,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-php83",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php83.git",
- "reference": "508c652ba3ccf69f8c97f251534f229791b52a57"
+ "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57",
- "reference": "508c652ba3ccf69f8c97f251534f229791b52a57",
+ "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11",
+ "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11",
"shasum": ""
},
"require": {
@@ -7577,7 +7685,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7590,7 +7698,10 @@
],
"psr-4": {
"Symfony\\Polyfill\\Php83\\": ""
- }
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -7615,7 +7726,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0"
},
"funding": [
{
@@ -7631,20 +7742,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-08-16T06:22:46+00:00"
},
{
"name": "symfony/polyfill-uuid",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-uuid.git",
- "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166"
+ "reference": "9c44518a5aff8da565c8a55dbe85d2769e6f630e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/f3cf1a645c2734236ed1e2e671e273eeb3586166",
- "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166",
+ "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/9c44518a5aff8da565c8a55dbe85d2769e6f630e",
+ "reference": "9c44518a5aff8da565c8a55dbe85d2769e6f630e",
"shasum": ""
},
"require": {
@@ -7659,7 +7770,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -7697,7 +7808,7 @@
"uuid"
],
"support": {
- "source": "https://github.com/symfony/polyfill-uuid/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-uuid/tree/v1.28.0"
},
"funding": [
{
@@ -7713,20 +7824,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/process",
- "version": "v6.3.0",
+ "version": "v6.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628"
+ "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628",
- "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628",
+ "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54",
+ "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
"shasum": ""
},
"require": {
@@ -7758,7 +7869,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v6.3.0"
+ "source": "https://github.com/symfony/process/tree/v6.3.4"
},
"funding": [
{
@@ -7774,25 +7885,26 @@
"type": "tidelift"
}
],
- "time": "2023-05-19T08:06:44+00:00"
+ "time": "2023-08-07T10:39:22+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
- "version": "v2.2.0",
+ "version": "v2.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
- "reference": "28a732c05bbad801304ad5a5c674cf2970508993"
+ "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993",
- "reference": "28a732c05bbad801304ad5a5c674cf2970508993",
+ "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e",
+ "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/http-message": "^1.0 || ^2.0",
+ "symfony/deprecation-contracts": "^2.5 || ^3.0",
"symfony/http-foundation": "^5.4 || ^6.0"
},
"require-dev": {
@@ -7811,7 +7923,7 @@
"type": "symfony-bridge",
"extra": {
"branch-alias": {
- "dev-main": "2.2-dev"
+ "dev-main": "2.3-dev"
}
},
"autoload": {
@@ -7846,7 +7958,7 @@
],
"support": {
"issues": "https://github.com/symfony/psr-http-message-bridge/issues",
- "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0"
+ "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1"
},
"funding": [
{
@@ -7862,24 +7974,25 @@
"type": "tidelift"
}
],
- "time": "2023-04-21T08:40:19+00:00"
+ "time": "2023-07-26T11:53:26+00:00"
},
{
"name": "symfony/routing",
- "version": "v6.3.1",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "d37ad1779c38b8eb71996d17dc13030dcb7f9cf5"
+ "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/d37ad1779c38b8eb71996d17dc13030dcb7f9cf5",
- "reference": "d37ad1779c38b8eb71996d17dc13030dcb7f9cf5",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/82616e59acd3e3d9c916bba798326cb7796d7d31",
+ "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31",
"shasum": ""
},
"require": {
- "php": ">=8.1"
+ "php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3"
},
"conflict": {
"doctrine/annotations": "<1.12",
@@ -7928,7 +8041,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v6.3.1"
+ "source": "https://github.com/symfony/routing/tree/v6.3.5"
},
"funding": [
{
@@ -7944,7 +8057,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-05T15:30:22+00:00"
+ "time": "2023-09-20T16:05:51+00:00"
},
{
"name": "symfony/service-contracts",
@@ -8030,16 +8143,16 @@
},
{
"name": "symfony/string",
- "version": "v6.3.0",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
+ "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
+ "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339",
+ "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339",
"shasum": ""
},
"require": {
@@ -8096,7 +8209,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.3.0"
+ "source": "https://github.com/symfony/string/tree/v6.3.5"
},
"funding": [
{
@@ -8112,24 +8225,25 @@
"type": "tidelift"
}
],
- "time": "2023-03-21T21:06:29+00:00"
+ "time": "2023-09-18T10:38:32+00:00"
},
{
"name": "symfony/translation",
- "version": "v6.3.0",
+ "version": "v6.3.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "f72b2cba8f79dd9d536f534f76874b58ad37876f"
+ "reference": "3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/f72b2cba8f79dd9d536f534f76874b58ad37876f",
- "reference": "f72b2cba8f79dd9d536f534f76874b58ad37876f",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd",
+ "reference": "3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd",
"shasum": ""
},
"require": {
"php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/translation-contracts": "^2.5|^3.0"
},
@@ -8190,7 +8304,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/translation/tree/v6.3.0"
+ "source": "https://github.com/symfony/translation/tree/v6.3.3"
},
"funding": [
{
@@ -8206,7 +8320,7 @@
"type": "tidelift"
}
],
- "time": "2023-05-19T12:46:45+00:00"
+ "time": "2023-07-31T07:08:24+00:00"
},
{
"name": "symfony/translation-contracts",
@@ -8362,20 +8476,21 @@
},
{
"name": "symfony/var-dumper",
- "version": "v6.3.1",
+ "version": "v6.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "c81268d6960ddb47af17391a27d222bd58cf0515"
+ "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c81268d6960ddb47af17391a27d222bd58cf0515",
- "reference": "c81268d6960ddb47af17391a27d222bd58cf0515",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5",
+ "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5",
"shasum": ""
},
"require": {
"php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
@@ -8384,6 +8499,7 @@
"require-dev": {
"ext-iconv": "*",
"symfony/console": "^5.4|^6.0",
+ "symfony/http-kernel": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/uid": "^5.4|^6.0",
"twig/twig": "^2.13|^3.0.4"
@@ -8424,7 +8540,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v6.3.1"
+ "source": "https://github.com/symfony/var-dumper/tree/v6.3.5"
},
"funding": [
{
@@ -8440,20 +8556,20 @@
"type": "tidelift"
}
],
- "time": "2023-06-21T12:08:28+00:00"
+ "time": "2023-09-12T10:11:35+00:00"
},
{
"name": "symfony/var-exporter",
- "version": "v6.3.2",
+ "version": "v6.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
- "reference": "3400949782c0cb5b3e73aa64cfd71dde000beccc"
+ "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/3400949782c0cb5b3e73aa64cfd71dde000beccc",
- "reference": "3400949782c0cb5b3e73aa64cfd71dde000beccc",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df1f8aac5751871b83d30bf3e2c355770f8f0691",
+ "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691",
"shasum": ""
},
"require": {
@@ -8498,7 +8614,7 @@
"serialize"
],
"support": {
- "source": "https://github.com/symfony/var-exporter/tree/v6.3.2"
+ "source": "https://github.com/symfony/var-exporter/tree/v6.3.4"
},
"funding": [
{
@@ -8514,7 +8630,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-26T17:39:03+00:00"
+ "time": "2023-08-16T18:14:47+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@@ -8851,6 +8967,133 @@
}
],
"packages-dev": [
+ {
+ "name": "archtechx/enums",
+ "version": "v0.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/archtechx/enums.git",
+ "reference": "475f45e682b0771253707f9403b704759a08da5f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/archtechx/enums/zipball/475f45e682b0771253707f9403b704759a08da5f",
+ "reference": "475f45e682b0771253707f9403b704759a08da5f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "nunomaduro/larastan": "^1.0|^2.4",
+ "orchestra/testbench": "^6.9|^7.0|^8.0",
+ "pestphp/pest": "^1.2|^2.0",
+ "pestphp/pest-plugin-laravel": "^1.0|^2.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "ArchTech\\Enums\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Samuel Štancl",
+ "email": "samuel@archte.ch"
+ }
+ ],
+ "description": "Helpers for making PHP enums more lovable.",
+ "support": {
+ "issues": "https://github.com/archtechx/enums/issues",
+ "source": "https://github.com/archtechx/enums/tree/v0.3.2"
+ },
+ "time": "2023-02-15T13:05:41+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
+ "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.4",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "support": {
+ "irc": "ircs://irc.libera.chat:6697/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/3.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-08-31T09:50:34+00:00"
+ },
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v1.0.0",
@@ -8929,6 +9172,262 @@
},
"time": "2023-01-05T11:28:13+00:00"
},
+ {
+ "name": "dragon-code/contracts",
+ "version": "v2.20.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/TheDragonCode/contracts.git",
+ "reference": "410d35bec404f465a126bb1e672f3abe1150f5d7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/TheDragonCode/contracts/zipball/410d35bec404f465a126bb1e672f3abe1150f5d7",
+ "reference": "410d35bec404f465a126bb1e672f3abe1150f5d7",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-message": "^1.0.1 || ^2.0",
+ "symfony/http-kernel": "^4.0 || ^5.0 || ^6.0",
+ "symfony/polyfill-php80": "^1.23"
+ },
+ "conflict": {
+ "andrey-helldar/contracts": "*"
+ },
+ "require-dev": {
+ "illuminate/database": "^10.0",
+ "phpdocumentor/reflection-docblock": "^5.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "DragonCode\\Contracts\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro",
+ "homepage": "https://github.com/andrey-helldar"
+ }
+ ],
+ "description": "A set of contracts for any project",
+ "keywords": [
+ "contracts",
+ "interfaces"
+ ],
+ "support": {
+ "source": "https://github.com/TheDragonCode/contracts"
+ },
+ "funding": [
+ {
+ "url": "https://boosty.to/dragon-code",
+ "type": "boosty"
+ },
+ {
+ "url": "https://github.com/sponsors/TheDragonCode",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/dragon-code",
+ "type": "open_collective"
+ },
+ {
+ "url": "https://yoomoney.ru/to/410012608840929",
+ "type": "yoomoney"
+ }
+ ],
+ "time": "2023-06-02T11:06:31+00:00"
+ },
+ {
+ "name": "dragon-code/pretty-array",
+ "version": "v4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/TheDragonCode/pretty-array.git",
+ "reference": "6c84e2454491b414efbd37985c322712cdf9012f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/TheDragonCode/pretty-array/zipball/6c84e2454491b414efbd37985c322712cdf9012f",
+ "reference": "6c84e2454491b414efbd37985c322712cdf9012f",
+ "shasum": ""
+ },
+ "require": {
+ "dragon-code/contracts": "^2.20",
+ "dragon-code/support": "^6.11.2",
+ "ext-dom": "*",
+ "ext-mbstring": "*",
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.6 || ^10.2"
+ },
+ "suggest": {
+ "symfony/thanks": "Give thanks (in the form of a GitHub) to your fellow PHP package maintainers"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "DragonCode\\PrettyArray\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro",
+ "homepage": "https://github.com/andrey-helldar"
+ }
+ ],
+ "description": "Simple conversion of an array to a pretty view",
+ "keywords": [
+ "andrey helldar",
+ "array",
+ "dragon",
+ "dragon code",
+ "pretty",
+ "pretty array"
+ ],
+ "support": {
+ "issues": "https://github.com/TheDragonCode/pretty-array/issues",
+ "source": "https://github.com/TheDragonCode/pretty-array"
+ },
+ "funding": [
+ {
+ "url": "https://boosty.to/dragon-code",
+ "type": "boosty"
+ },
+ {
+ "url": "https://github.com/sponsors/TheDragonCode",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/dragon-code",
+ "type": "open_collective"
+ },
+ {
+ "url": "https://yoomoney.ru/to/410012608840929",
+ "type": "yoomoney"
+ }
+ ],
+ "time": "2023-06-02T11:37:44+00:00"
+ },
+ {
+ "name": "dragon-code/support",
+ "version": "v6.11.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/TheDragonCode/support.git",
+ "reference": "3dbf1715e83e216ae1fea31eecc022829dc864df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/TheDragonCode/support/zipball/3dbf1715e83e216ae1fea31eecc022829dc864df",
+ "reference": "3dbf1715e83e216ae1fea31eecc022829dc864df",
+ "shasum": ""
+ },
+ "require": {
+ "dragon-code/contracts": "^2.19.1",
+ "ext-bcmath": "*",
+ "ext-ctype": "*",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "php": "^8.0",
+ "psr/http-message": "^1.0.1 || ^2.0",
+ "symfony/polyfill-php81": "^1.25",
+ "voku/portable-ascii": "^1.4.8 || ^2.0.1"
+ },
+ "conflict": {
+ "andrey-helldar/support": "*"
+ },
+ "require-dev": {
+ "illuminate/contracts": "^9.0 || ^10.0",
+ "phpunit/phpunit": "^9.6",
+ "symfony/var-dumper": "^6.0"
+ },
+ "suggest": {
+ "dragon-code/laravel-support": "Various helper files for the Laravel and Lumen frameworks",
+ "symfony/thanks": "Give thanks (in the form of a GitHub) to your fellow PHP package maintainers"
+ },
+ "type": "library",
+ "extra": {
+ "dragon-code": {
+ "docs-generator": {
+ "preview": {
+ "brand": "php",
+ "vendor": "The Dragon Code"
+ }
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "DragonCode\\Support\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro",
+ "homepage": "https://github.com/andrey-helldar"
+ }
+ ],
+ "description": "Support package is a collection of helpers and tools for any project.",
+ "keywords": [
+ "dragon",
+ "dragon-code",
+ "framework",
+ "helper",
+ "helpers",
+ "laravel",
+ "php",
+ "support",
+ "symfony",
+ "yii",
+ "yii2"
+ ],
+ "support": {
+ "issues": "https://github.com/TheDragonCode/support/issues",
+ "source": "https://github.com/TheDragonCode/support"
+ },
+ "funding": [
+ {
+ "url": "https://boosty.to/dragon-code",
+ "type": "boosty"
+ },
+ {
+ "url": "https://www.donationalerts.com/r/dragon_code",
+ "type": "donationalerts"
+ },
+ {
+ "url": "https://github.com/sponsors/TheDragonCode",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/dragon-code",
+ "type": "open_collective"
+ },
+ {
+ "url": "https://yoomoney.ru/to/410012608840929",
+ "type": "yoomoney"
+ }
+ ],
+ "time": "2023-08-03T09:43:52+00:00"
+ },
{
"name": "fakerphp/faker",
"version": "v1.23.0",
@@ -8999,16 +9498,16 @@
},
{
"name": "filp/whoops",
- "version": "2.15.2",
+ "version": "2.15.3",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
- "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73"
+ "reference": "c83e88a30524f9360b11f585f71e6b17313b7187"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
- "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187",
+ "reference": "c83e88a30524f9360b11f585f71e6b17313b7187",
"shasum": ""
},
"require": {
@@ -9058,7 +9557,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
- "source": "https://github.com/filp/whoops/tree/2.15.2"
+ "source": "https://github.com/filp/whoops/tree/2.15.3"
},
"funding": [
{
@@ -9066,7 +9565,7 @@
"type": "github"
}
],
- "time": "2023-04-12T12:00:00+00:00"
+ "time": "2023-07-13T12:00:00+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -9121,16 +9620,16 @@
},
{
"name": "kitloong/laravel-migrations-generator",
- "version": "v6.10.0",
+ "version": "v6.11.0",
"source": {
"type": "git",
"url": "https://github.com/kitloong/laravel-migrations-generator.git",
- "reference": "116f50fab918b7f1363a40ebd954ce250f6aedcd"
+ "reference": "220b5f17fcb16610a3e9757d68c197319c0f7444"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/116f50fab918b7f1363a40ebd954ce250f6aedcd",
- "reference": "116f50fab918b7f1363a40ebd954ce250f6aedcd",
+ "url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/220b5f17fcb16610a3e9757d68c197319c0f7444",
+ "reference": "220b5f17fcb16610a3e9757d68c197319c0f7444",
"shasum": ""
},
"require": {
@@ -9184,7 +9683,7 @@
],
"support": {
"issues": "https://github.com/kitloong/laravel-migrations-generator/issues",
- "source": "https://github.com/kitloong/laravel-migrations-generator/tree/v6.10.0"
+ "source": "https://github.com/kitloong/laravel-migrations-generator/tree/v6.11.0"
},
"funding": [
{
@@ -9192,7 +9691,7 @@
"type": "custom"
}
],
- "time": "2023-03-26T07:37:00+00:00"
+ "time": "2023-10-10T13:55:26+00:00"
},
{
"name": "krlove/code-generator",
@@ -9279,17 +9778,422 @@
"time": "2023-01-30T20:15:06+00:00"
},
{
- "name": "laravel/pint",
- "version": "v1.10.4",
+ "name": "laravel-lang/attributes",
+ "version": "v2.4.1",
"source": {
"type": "git",
- "url": "https://github.com/laravel/pint.git",
- "reference": "f56798088068af8bd75a8f2c4ecae022990fdf75"
+ "url": "https://github.com/Laravel-Lang/attributes.git",
+ "reference": "c3dce4766cac85fc7430b634d14065e811d691bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/pint/zipball/f56798088068af8bd75a8f2c4ecae022990fdf75",
- "reference": "f56798088068af8bd75a8f2c4ecae022990fdf75",
+ "url": "https://api.github.com/repos/Laravel-Lang/attributes/zipball/c3dce4766cac85fc7430b634d14065e811d691bf",
+ "reference": "c3dce4766cac85fc7430b634d14065e811d691bf",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "laravel-lang/publisher": "^14.0",
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "laravel-lang/status-generator": "^1.19",
+ "phpunit/phpunit": "^10.0",
+ "symfony/var-dumper": "^6.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "LaravelLang\\Attributes\\ServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "LaravelLang\\Attributes\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro"
+ },
+ {
+ "name": "Laravel-Lang Team",
+ "homepage": "https://github.com/Laravel-Lang"
+ }
+ ],
+ "description": "List of 78 languages for form field names",
+ "keywords": [
+ "attributes",
+ "fields",
+ "form",
+ "lang",
+ "languages",
+ "laravel",
+ "messages",
+ "translations",
+ "validation"
+ ],
+ "support": {
+ "issues": "https://github.com/Laravel-Lang/attributes/issues",
+ "source": "https://github.com/Laravel-Lang/attributes/tree/v2.4.1"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/laravel-lang",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2023-09-15T20:14:52+00:00"
+ },
+ {
+ "name": "laravel-lang/common",
+ "version": "v4.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Laravel-Lang/common.git",
+ "reference": "31744c7f64610990a77c7705e590e04c1fca372d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Laravel-Lang/common/zipball/31744c7f64610990a77c7705e590e04c1fca372d",
+ "reference": "31744c7f64610990a77c7705e590e04c1fca372d",
+ "shasum": ""
+ },
+ "require": {
+ "laravel-lang/attributes": "^2.3.3",
+ "laravel-lang/http-statuses": "^3.3.1",
+ "laravel-lang/lang": "^13.0",
+ "laravel-lang/publisher": "^14.6.4",
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "orchestra/testbench": "^8.5 || ^9.0",
+ "phpunit/phpunit": "^10.0",
+ "symfony/var-dumper": "^6.3"
+ },
+ "type": "library",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Laravel-Lang Team",
+ "homepage": "https://github.com/Laravel-Lang"
+ },
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro",
+ "homepage": "https://github.com/andrey-helldar"
+ }
+ ],
+ "description": "Easily connect the necessary language packs to the application",
+ "keywords": [
+ "Laravel-lang",
+ "attribute",
+ "attributes",
+ "breeze",
+ "cashier",
+ "fortify",
+ "framework",
+ "http",
+ "http-status",
+ "http-status-code",
+ "i18n",
+ "jetstream",
+ "lang",
+ "language",
+ "languages",
+ "laravel",
+ "locale",
+ "locales",
+ "nova",
+ "publisher",
+ "spark",
+ "translation",
+ "translations",
+ "ui"
+ ],
+ "support": {
+ "issues": "https://github.com/Laravel-Lang/common/issues",
+ "source": "https://github.com/Laravel-Lang/common"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/laravel-lang",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2023-08-09T09:24:50+00:00"
+ },
+ {
+ "name": "laravel-lang/http-statuses",
+ "version": "v3.4.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Laravel-Lang/http-statuses.git",
+ "reference": "03e50c7f3629e28786e37ea8b8c9da14eab311fb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Laravel-Lang/http-statuses/zipball/03e50c7f3629e28786e37ea8b8c9da14eab311fb",
+ "reference": "03e50c7f3629e28786e37ea8b8c9da14eab311fb",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "laravel-lang/publisher": "^14.1",
+ "php": "^8.1"
+ },
+ "conflict": {
+ "laravel-lang/publisher": "<14.0"
+ },
+ "require-dev": {
+ "laravel-lang/status-generator": "^1.19",
+ "phpunit/phpunit": "^10.0",
+ "symfony/var-dumper": "^6.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "LaravelLang\\HttpStatuses\\ServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "LaravelLang\\HttpStatuses\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro"
+ },
+ {
+ "name": "Laravel-Lang Team",
+ "homepage": "https://github.com/Laravel-Lang"
+ }
+ ],
+ "description": "List of 78 languages for HTTP statuses",
+ "keywords": [
+ "http",
+ "lang",
+ "languages",
+ "laravel",
+ "messages",
+ "status",
+ "translations"
+ ],
+ "support": {
+ "issues": "https://github.com/Laravel-Lang/http-statuses/issues",
+ "source": "https://github.com/Laravel-Lang/http-statuses/tree/v3.4.5"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/laravel-lang",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2023-09-14T01:14:10+00:00"
+ },
+ {
+ "name": "laravel-lang/lang",
+ "version": "13.2.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Laravel-Lang/lang.git",
+ "reference": "774e63475ab955c5e858b554faff5d96a6631681"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Laravel-Lang/lang/zipball/774e63475ab955c5e858b554faff5d96a6631681",
+ "reference": "774e63475ab955c5e858b554faff5d96a6631681",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "laravel-lang/publisher": "^14.0",
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "laravel-lang/status-generator": "^1.19",
+ "phpunit/phpunit": "^10.0",
+ "symfony/var-dumper": "^6.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "LaravelLang\\Lang\\ServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "LaravelLang\\Lang\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Laravel-Lang Team",
+ "homepage": "https://github.com/Laravel-Lang"
+ }
+ ],
+ "description": "List of 78 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI",
+ "keywords": [
+ "lang",
+ "languages",
+ "laravel",
+ "lpm"
+ ],
+ "support": {
+ "issues": "https://github.com/Laravel-Lang/lang/issues",
+ "source": "https://github.com/Laravel-Lang/lang"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/laravel-lang",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2023-10-04T02:11:02+00:00"
+ },
+ {
+ "name": "laravel-lang/publisher",
+ "version": "v14.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Laravel-Lang/publisher.git",
+ "reference": "4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b",
+ "reference": "4e6fa2d8c446282b832ffb16b9b3c33aa4296a5b",
+ "shasum": ""
+ },
+ "require": {
+ "archtechx/enums": "^0.3",
+ "composer/semver": "^3.3",
+ "dragon-code/pretty-array": "^4.0",
+ "dragon-code/support": "^6.3",
+ "ext-json": "*",
+ "illuminate/console": "^8.79 || ^9.18 || ^10.0 || ^11.0",
+ "illuminate/support": "^8.79 || ^9.18 || ^10.0 || ^11.0",
+ "league/commonmark": "^2.3",
+ "league/config": "^1.2",
+ "php": "^8.1"
+ },
+ "conflict": {
+ "laravel-lang/attributes": "<2.0",
+ "laravel-lang/http-statuses": "<3.0",
+ "laravel-lang/lang": "<11.0"
+ },
+ "require-dev": {
+ "laravel-lang/json-fallback-hotfix": "^1.0",
+ "orchestra/testbench": "^6.25 || ^7.22 || ^8.0 || ^9.0",
+ "phpunit/phpunit": "^9.6 || ^10.0",
+ "symfony/var-dumper": "^5.0 || ^6.0"
+ },
+ "suggest": {
+ "laravel-lang/attributes": "List of 78 languages for form field names",
+ "laravel-lang/http-statuses": "List of 78 languages for HTTP statuses",
+ "laravel-lang/lang": "List of 78 languages for Laravel Framework, Jetstream, Fortify, Breeze, Cashier, Nova, Spark and UI."
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "LaravelLang\\Publisher\\ServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "files": [
+ "helper.php"
+ ],
+ "psr-4": {
+ "LaravelLang\\Publisher\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Helldar",
+ "email": "helldar@dragon-code.pro"
+ },
+ {
+ "name": "Laravel-Lang Team",
+ "homepage": "https://github.com/Laravel-Lang"
+ }
+ ],
+ "description": "Publisher lang files for the Laravel and Lumen Frameworks, Jetstream, Fortify, Cashier, Spark and Nova from Laravel-Lang/lang",
+ "keywords": [
+ "breeze",
+ "cashier",
+ "fortify",
+ "framework",
+ "i18n",
+ "jetstream",
+ "lang",
+ "languages",
+ "laravel",
+ "locale",
+ "locales",
+ "localization",
+ "lpm",
+ "lumen",
+ "nova",
+ "publisher",
+ "spark",
+ "trans",
+ "translations",
+ "validations"
+ ],
+ "support": {
+ "issues": "https://github.com/Laravel-Lang/publisher/issues",
+ "source": "https://github.com/Laravel-Lang/publisher"
+ },
+ "funding": [
+ {
+ "url": "https://opencollective.com/laravel-lang",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2023-08-09T09:09:57+00:00"
+ },
+ {
+ "name": "laravel/pint",
+ "version": "v1.13.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laravel/pint.git",
+ "reference": "93b2d0d49719bc6e444ba21cd4dbbccec935413d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laravel/pint/zipball/93b2d0d49719bc6e444ba21cd4dbbccec935413d",
+ "reference": "93b2d0d49719bc6e444ba21cd4dbbccec935413d",
"shasum": ""
},
"require": {
@@ -9300,13 +10204,13 @@
"php": "^8.1.0"
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "^3.21.1",
- "illuminate/view": "^10.5.1",
- "laravel-zero/framework": "^10.0.2",
- "mockery/mockery": "^1.5.1",
- "nunomaduro/larastan": "^2.5.1",
+ "friendsofphp/php-cs-fixer": "^3.34.1",
+ "illuminate/view": "^10.23.1",
+ "laravel-zero/framework": "^10.1.2",
+ "mockery/mockery": "^1.6.6",
+ "nunomaduro/larastan": "^2.6.4",
"nunomaduro/termwind": "^1.15.1",
- "pestphp/pest": "^2.4.0"
+ "pestphp/pest": "^2.18.2"
},
"bin": [
"builds/pint"
@@ -9342,20 +10246,20 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
- "time": "2023-07-11T15:18:27+00:00"
+ "time": "2023-10-10T15:39:09+00:00"
},
{
"name": "laravel/sail",
- "version": "v1.23.1",
+ "version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
- "reference": "62582606f80466aa81fba40b193b289106902853"
+ "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/sail/zipball/62582606f80466aa81fba40b193b289106902853",
- "reference": "62582606f80466aa81fba40b193b289106902853",
+ "url": "https://api.github.com/repos/laravel/sail/zipball/e81a7bd7ac1a745ccb25572830fecf74a89bb48a",
+ "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a",
"shasum": ""
},
"require": {
@@ -9407,41 +10311,37 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
- "time": "2023-06-28T18:31:28+00:00"
+ "time": "2023-09-11T17:37:09+00:00"
},
{
"name": "mockery/mockery",
- "version": "1.6.2",
+ "version": "1.6.6",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
- "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191"
+ "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191",
- "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/b8e0bb7d8c604046539c1115994632c74dcb361e",
+ "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e",
"shasum": ""
},
"require": {
"hamcrest/hamcrest-php": "^2.0.1",
"lib-pcre": ">=7.0",
- "php": "^7.4 || ^8.0"
+ "php": ">=7.3"
},
"conflict": {
"phpunit/phpunit": "<8.0"
},
"require-dev": {
- "phpunit/phpunit": "^8.5 || ^9.3",
- "psalm/plugin-phpunit": "^0.18",
- "vimeo/psalm": "^5.9"
+ "phpunit/phpunit": "^8.5 || ^9.6.10",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "symplify/easy-coding-standard": "^11.5.0",
+ "vimeo/psalm": "^4.30"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.6.x-dev"
- }
- },
"autoload": {
"files": [
"library/helpers.php",
@@ -9459,12 +10359,20 @@
{
"name": "Pádraic Brady",
"email": "padraic.brady@gmail.com",
- "homepage": "http://blog.astrumfutura.com"
+ "homepage": "https://github.com/padraic",
+ "role": "Author"
},
{
"name": "Dave Marshall",
"email": "dave.marshall@atstsolutions.co.uk",
- "homepage": "http://davedevelopment.co.uk"
+ "homepage": "https://davedevelopment.co.uk",
+ "role": "Developer"
+ },
+ {
+ "name": "Nathanael Esayeas",
+ "email": "nathanael.esayeas@protonmail.com",
+ "homepage": "https://github.com/ghostwriter",
+ "role": "Lead Developer"
}
],
"description": "Mockery is a simple yet flexible PHP mock object framework",
@@ -9482,10 +10390,13 @@
"testing"
],
"support": {
+ "docs": "https://docs.mockery.io/",
"issues": "https://github.com/mockery/mockery/issues",
- "source": "https://github.com/mockery/mockery/tree/1.6.2"
+ "rss": "https://github.com/mockery/mockery/releases.atom",
+ "security": "https://github.com/mockery/mockery/security/advisories",
+ "source": "https://github.com/mockery/mockery"
},
- "time": "2023-06-07T09:07:52+00:00"
+ "time": "2023-08-09T00:03:52+00:00"
},
{
"name": "myclabs/php-enum",
@@ -9552,40 +10463,40 @@
},
{
"name": "nunomaduro/collision",
- "version": "v7.7.0",
+ "version": "v7.10.0",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/collision.git",
- "reference": "69a07197d055456d29911116fca3bc2c985f524b"
+ "reference": "49ec67fa7b002712da8526678abd651c09f375b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nunomaduro/collision/zipball/69a07197d055456d29911116fca3bc2c985f524b",
- "reference": "69a07197d055456d29911116fca3bc2c985f524b",
+ "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2",
+ "reference": "49ec67fa7b002712da8526678abd651c09f375b2",
"shasum": ""
},
"require": {
- "filp/whoops": "^2.15.2",
+ "filp/whoops": "^2.15.3",
"nunomaduro/termwind": "^1.15.1",
"php": "^8.1.0",
- "symfony/console": "^6.3.0"
+ "symfony/console": "^6.3.4"
},
"conflict": {
- "phpunit/phpunit": "<10.1.2"
+ "laravel/framework": ">=11.0.0"
},
"require-dev": {
- "brianium/paratest": "^7.2.2",
- "laravel/framework": "^10.14.1",
- "laravel/pint": "^1.10.3",
- "laravel/sail": "^1.23.0",
- "laravel/sanctum": "^3.2.5",
- "laravel/tinker": "^2.8.1",
- "nunomaduro/larastan": "^2.6.3",
- "orchestra/testbench-core": "^8.5.8",
- "pestphp/pest": "^2.8.1",
- "phpunit/phpunit": "^10.2.2",
+ "brianium/paratest": "^7.3.0",
+ "laravel/framework": "^10.28.0",
+ "laravel/pint": "^1.13.3",
+ "laravel/sail": "^1.25.0",
+ "laravel/sanctum": "^3.3.1",
+ "laravel/tinker": "^2.8.2",
+ "nunomaduro/larastan": "^2.6.4",
+ "orchestra/testbench-core": "^8.13.0",
+ "pestphp/pest": "^2.23.2",
+ "phpunit/phpunit": "^10.4.1",
"sebastian/environment": "^6.0.1",
- "spatie/laravel-ignition": "^2.2.0"
+ "spatie/laravel-ignition": "^2.3.1"
},
"type": "library",
"extra": {
@@ -9644,7 +10555,7 @@
"type": "patreon"
}
],
- "time": "2023-06-29T09:10:16+00:00"
+ "time": "2023-10-11T15:45:01+00:00"
},
{
"name": "phar-io/manifest",
@@ -9759,16 +10670,16 @@
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.22.1",
+ "version": "1.24.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0"
+ "reference": "bcad8d995980440892759db0c32acae7c8e79442"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0",
- "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442",
+ "reference": "bcad8d995980440892759db0c32acae7c8e79442",
"shasum": ""
},
"require": {
@@ -9800,22 +10711,22 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2"
},
- "time": "2023-06-29T20:46:06+00:00"
+ "time": "2023-09-26T12:28:12+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "10.1.2",
+ "version": "10.1.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e"
+ "reference": "355324ca4980b8916c18b9db29f3ef484078f26e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/db1497ec8dd382e82c962f7abbe0320e4882ee4e",
- "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e",
+ "reference": "355324ca4980b8916c18b9db29f3ef484078f26e",
"shasum": ""
},
"require": {
@@ -9872,7 +10783,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.2"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7"
},
"funding": [
{
@@ -9880,20 +10791,20 @@
"type": "github"
}
],
- "time": "2023-05-22T09:04:27+00:00"
+ "time": "2023-10-04T15:34:17+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "4.0.2",
+ "version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "5647d65443818959172645e7ed999217360654b6"
+ "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/5647d65443818959172645e7ed999217360654b6",
- "reference": "5647d65443818959172645e7ed999217360654b6",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c",
+ "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c",
"shasum": ""
},
"require": {
@@ -9933,7 +10844,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.2"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0"
},
"funding": [
{
@@ -9941,7 +10852,7 @@
"type": "github"
}
],
- "time": "2023-05-07T09:13:23+00:00"
+ "time": "2023-08-31T06:24:48+00:00"
},
{
"name": "phpunit/php-invoker",
@@ -10008,16 +10919,16 @@
},
{
"name": "phpunit/php-text-template",
- "version": "3.0.0",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d"
+ "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d",
- "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748",
+ "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748",
"shasum": ""
},
"require": {
@@ -10055,7 +10966,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0"
+ "security": "https://github.com/sebastianbergmann/php-text-template/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1"
},
"funding": [
{
@@ -10063,7 +10975,7 @@
"type": "github"
}
],
- "time": "2023-02-03T06:56:46+00:00"
+ "time": "2023-08-31T14:07:24+00:00"
},
{
"name": "phpunit/php-timer",
@@ -10126,16 +11038,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "10.2.4",
+ "version": "10.4.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "68484779b5a2ed711fbdeba6ca01910d87acdff2"
+ "reference": "62bd7af13d282deeb95650077d28ba3600ca321c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68484779b5a2ed711fbdeba6ca01910d87acdff2",
- "reference": "68484779b5a2ed711fbdeba6ca01910d87acdff2",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/62bd7af13d282deeb95650077d28ba3600ca321c",
+ "reference": "62bd7af13d282deeb95650077d28ba3600ca321c",
"shasum": ""
},
"require": {
@@ -10149,7 +11061,7 @@
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=8.1",
- "phpunit/php-code-coverage": "^10.1.1",
+ "phpunit/php-code-coverage": "^10.1.5",
"phpunit/php-file-iterator": "^4.0",
"phpunit/php-invoker": "^4.0",
"phpunit/php-text-template": "^3.0",
@@ -10159,8 +11071,8 @@
"sebastian/comparator": "^5.0",
"sebastian/diff": "^5.0",
"sebastian/environment": "^6.0",
- "sebastian/exporter": "^5.0",
- "sebastian/global-state": "^6.0",
+ "sebastian/exporter": "^5.1",
+ "sebastian/global-state": "^6.0.1",
"sebastian/object-enumerator": "^5.0",
"sebastian/recursion-context": "^5.0",
"sebastian/type": "^4.0",
@@ -10175,7 +11087,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "10.2-dev"
+ "dev-main": "10.4-dev"
}
},
"autoload": {
@@ -10207,7 +11119,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.4"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.1"
},
"funding": [
{
@@ -10223,7 +11135,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-10T04:06:08+00:00"
+ "time": "2023-10-08T05:01:11+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -10394,16 +11306,16 @@
},
{
"name": "sebastian/comparator",
- "version": "5.0.0",
+ "version": "5.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c"
+ "reference": "2db5010a484d53ebf536087a70b4a5423c102372"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c",
- "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372",
+ "reference": "2db5010a484d53ebf536087a70b4a5423c102372",
"shasum": ""
},
"require": {
@@ -10414,7 +11326,7 @@
"sebastian/exporter": "^5.0"
},
"require-dev": {
- "phpunit/phpunit": "^10.0"
+ "phpunit/phpunit": "^10.3"
},
"type": "library",
"extra": {
@@ -10458,7 +11370,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0"
+ "security": "https://github.com/sebastianbergmann/comparator/security/policy",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1"
},
"funding": [
{
@@ -10466,20 +11379,20 @@
"type": "github"
}
],
- "time": "2023-02-03T07:07:16+00:00"
+ "time": "2023-08-14T13:18:12+00:00"
},
{
"name": "sebastian/complexity",
- "version": "3.0.0",
+ "version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6"
+ "reference": "68cfb347a44871f01e33ab0ef8215966432f6957"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6",
- "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957",
+ "reference": "68cfb347a44871f01e33ab0ef8215966432f6957",
"shasum": ""
},
"require": {
@@ -10492,7 +11405,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.0-dev"
+ "dev-main": "3.1-dev"
}
},
"autoload": {
@@ -10515,7 +11428,8 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0"
+ "security": "https://github.com/sebastianbergmann/complexity/security/policy",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0"
},
"funding": [
{
@@ -10523,7 +11437,7 @@
"type": "github"
}
],
- "time": "2023-02-03T06:59:47+00:00"
+ "time": "2023-09-28T11:50:59+00:00"
},
{
"name": "sebastian/diff",
@@ -10658,16 +11572,16 @@
},
{
"name": "sebastian/exporter",
- "version": "5.0.0",
+ "version": "5.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0"
+ "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0",
- "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc",
+ "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc",
"shasum": ""
},
"require": {
@@ -10681,7 +11595,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "5.0-dev"
+ "dev-main": "5.1-dev"
}
},
"autoload": {
@@ -10723,7 +11637,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0"
+ "security": "https://github.com/sebastianbergmann/exporter/security/policy",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1"
},
"funding": [
{
@@ -10731,20 +11646,20 @@
"type": "github"
}
],
- "time": "2023-02-03T07:06:49+00:00"
+ "time": "2023-09-24T13:22:09+00:00"
},
{
"name": "sebastian/global-state",
- "version": "6.0.0",
+ "version": "6.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "aab257c712de87b90194febd52e4d184551c2d44"
+ "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44",
- "reference": "aab257c712de87b90194febd52e4d184551c2d44",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4",
+ "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4",
"shasum": ""
},
"require": {
@@ -10784,7 +11699,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0"
+ "security": "https://github.com/sebastianbergmann/global-state/security/policy",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1"
},
"funding": [
{
@@ -10792,20 +11708,20 @@
"type": "github"
}
],
- "time": "2023-02-03T07:07:38+00:00"
+ "time": "2023-07-19T07:19:23+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130"
+ "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130",
- "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d",
+ "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d",
"shasum": ""
},
"require": {
@@ -10841,7 +11757,8 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0"
+ "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1"
},
"funding": [
{
@@ -10849,7 +11766,7 @@
"type": "github"
}
],
- "time": "2023-02-03T07:08:02+00:00"
+ "time": "2023-08-31T09:25:50+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -11137,32 +12054,32 @@
},
{
"name": "slevomat/coding-standard",
- "version": "8.13.1",
+ "version": "8.14.1",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
- "reference": "a13c15e20f2d307a1ca8dec5313ec462a4466470"
+ "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/a13c15e20f2d307a1ca8dec5313ec462a4466470",
- "reference": "a13c15e20f2d307a1ca8dec5313ec462a4466470",
+ "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926",
+ "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0",
"php": "^7.2 || ^8.0",
- "phpstan/phpdoc-parser": "^1.22.0",
+ "phpstan/phpdoc-parser": "^1.23.1",
"squizlabs/php_codesniffer": "^3.7.1"
},
"require-dev": {
"phing/phing": "2.17.4",
"php-parallel-lint/php-parallel-lint": "1.3.2",
- "phpstan/phpstan": "1.10.21",
- "phpstan/phpstan-deprecation-rules": "1.1.3",
- "phpstan/phpstan-phpunit": "1.3.13",
+ "phpstan/phpstan": "1.10.37",
+ "phpstan/phpstan-deprecation-rules": "1.1.4",
+ "phpstan/phpstan-phpunit": "1.3.14",
"phpstan/phpstan-strict-rules": "1.5.1",
- "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.2.2"
+ "phpunit/phpunit": "8.5.21|9.6.8|10.3.5"
},
"type": "phpcodesniffer-standard",
"extra": {
@@ -11186,7 +12103,7 @@
],
"support": {
"issues": "https://github.com/slevomat/coding-standard/issues",
- "source": "https://github.com/slevomat/coding-standard/tree/8.13.1"
+ "source": "https://github.com/slevomat/coding-standard/tree/8.14.1"
},
"funding": [
{
@@ -11198,7 +12115,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-25T12:52:34+00:00"
+ "time": "2023-10-08T07:28:08+00:00"
},
{
"name": "spatie/backtrace",
@@ -11264,16 +12181,16 @@
},
{
"name": "spatie/flare-client-php",
- "version": "1.4.1",
+ "version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/flare-client-php.git",
- "reference": "943894c6a6b00501365ac0b91ae0dce56f2226fa"
+ "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/943894c6a6b00501365ac0b91ae0dce56f2226fa",
- "reference": "943894c6a6b00501365ac0b91ae0dce56f2226fa",
+ "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/5f2c6a7a0d2c1d90c12559dc7828fd942911a544",
+ "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544",
"shasum": ""
},
"require": {
@@ -11322,7 +12239,7 @@
],
"support": {
"issues": "https://github.com/spatie/flare-client-php/issues",
- "source": "https://github.com/spatie/flare-client-php/tree/1.4.1"
+ "source": "https://github.com/spatie/flare-client-php/tree/1.4.2"
},
"funding": [
{
@@ -11330,20 +12247,20 @@
"type": "github"
}
],
- "time": "2023-07-06T09:29:49+00:00"
+ "time": "2023-07-28T08:07:24+00:00"
},
{
"name": "spatie/ignition",
- "version": "1.9.0",
+ "version": "1.11.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/ignition.git",
- "reference": "de24ff1e01814d5043bd6eb4ab36a5a852a04973"
+ "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/ignition/zipball/de24ff1e01814d5043bd6eb4ab36a5a852a04973",
- "reference": "de24ff1e01814d5043bd6eb4ab36a5a852a04973",
+ "url": "https://api.github.com/repos/spatie/ignition/zipball/48b23411ca4bfbc75c75dfc638b6b36159c375aa",
+ "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa",
"shasum": ""
},
"require": {
@@ -11413,20 +12330,20 @@
"type": "github"
}
],
- "time": "2023-06-28T13:24:59+00:00"
+ "time": "2023-09-19T15:29:52+00:00"
},
{
"name": "spatie/laravel-ignition",
- "version": "2.2.0",
+ "version": "2.3.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ignition.git",
- "reference": "dd15fbe82ef5392798941efae93c49395a87d943"
+ "reference": "bf21cd15aa47fa4ec5d73bbc932005c70261efc8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/dd15fbe82ef5392798941efae93c49395a87d943",
- "reference": "dd15fbe82ef5392798941efae93c49395a87d943",
+ "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/bf21cd15aa47fa4ec5d73bbc932005c70261efc8",
+ "reference": "bf21cd15aa47fa4ec5d73bbc932005c70261efc8",
"shasum": ""
},
"require": {
@@ -11505,7 +12422,7 @@
"type": "github"
}
],
- "time": "2023-06-28T13:51:52+00:00"
+ "time": "2023-10-09T12:55:26+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@@ -11565,21 +12482,101 @@
"time": "2023-02-22T23:07:41+00:00"
},
{
- "name": "symfony/yaml",
- "version": "v6.3.0",
+ "name": "symfony/polyfill-php81",
+ "version": "v1.28.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927"
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/a9a8337aa641ef2aa39c3e028f9107ec391e5927",
- "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-01-26T09:26:14+00:00"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v6.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add",
+ "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add",
"shasum": ""
},
"require": {
"php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
@@ -11617,7 +12614,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/yaml/tree/v6.3.0"
+ "source": "https://github.com/symfony/yaml/tree/v6.3.3"
},
"funding": [
{
@@ -11633,7 +12630,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-28T13:28:14+00:00"
+ "time": "2023-07-31T07:08:24+00:00"
},
{
"name": "thedoctor0/laravel-factory-generator",
@@ -11756,7 +12753,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": "^8.1"
+ "php": "^8.2"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
From b0e3eab3f7454e1b2ebbf2feca0a3abd6327da2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?=
Date: Thu, 12 Oct 2023 15:22:31 +0200
Subject: [PATCH 2/7] lang update
---
resources/lang/en.json | 54 +++++
resources/lang/en/auth.php | 18 +-
resources/lang/en/http-statuses.php | 84 ++++++++
resources/lang/en/pagination.php | 17 +-
resources/lang/en/passwords.php | 23 +-
resources/lang/en/validation.php | 324 +++++++++++++++++-----------
resources/lang/fr.json | 61 +++++-
resources/lang/fr/auth.php | 17 +-
resources/lang/fr/http-statuses.php | 84 ++++++++
resources/lang/fr/pagination.php | 15 +-
resources/lang/fr/passwords.php | 17 +-
resources/lang/fr/validation.php | 234 ++++++++++++--------
12 files changed, 638 insertions(+), 310 deletions(-)
create mode 100644 resources/lang/en.json
create mode 100644 resources/lang/en/http-statuses.php
create mode 100644 resources/lang/fr/http-statuses.php
diff --git a/resources/lang/en.json b/resources/lang/en.json
new file mode 100644
index 0000000..d208ff2
--- /dev/null
+++ b/resources/lang/en.json
@@ -0,0 +1,54 @@
+{
+ "(and :count more error)": "(and :count more error)",
+ "(and :count more errors)": "(and :count more errors)",
+ "A fresh verification link has been sent to your email address.": "A fresh verification link has been sent to your email address.",
+ "All rights reserved.": "All rights reserved.",
+ "Before proceeding, please check your email for a verification link.": "Before proceeding, please check your email for a verification link.",
+ "click here to request another": "click here to request another",
+ "Confirm Password": "Confirm Password",
+ "Dashboard": "Dashboard",
+ "Email Address": "Email Address",
+ "Forbidden": "Forbidden",
+ "Forgot Your Password?": "Forgot Your Password?",
+ "Go to page :page": "Go to page :page",
+ "Hello!": "Hello!",
+ "If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.",
+ "If you did not receive the email": "If you did not receive the email",
+ "If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.",
+ "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:",
+ "Invalid JSON was returned from the route.": "Invalid JSON was returned from the route.",
+ "Login": "Login",
+ "Logout": "Logout",
+ "Name": "Name",
+ "Not Found": "Not Found",
+ "of": "of",
+ "Page Expired": "Page Expired",
+ "Pagination Navigation": "Pagination Navigation",
+ "Password": "Password",
+ "Payment Required": "Payment Required",
+ "Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
+ "Please confirm your password before continuing.": "Please confirm your password before continuing.",
+ "Regards": "Regards",
+ "Register": "Register",
+ "Remember Me": "Remember Me",
+ "Reset Password": "Reset Password",
+ "Reset Password Notification": "Reset Password Notification",
+ "results": "results",
+ "Send Password Reset Link": "Send Password Reset Link",
+ "Server Error": "Server Error",
+ "Service Unavailable": "Service Unavailable",
+ "Showing": "Showing",
+ "The given data was invalid.": "The given data was invalid.",
+ "The response is not a streamed response.": "The response is not a streamed response.",
+ "The response is not a view.": "The response is not a view.",
+ "This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.",
+ "to": "to",
+ "Toggle navigation": "Toggle navigation",
+ "Too Many Requests": "Too Many Requests",
+ "Unauthorized": "Unauthorized",
+ "Verify Email Address": "Verify Email Address",
+ "Verify Your Email Address": "Verify Your Email Address",
+ "Whoops!": "Whoops!",
+ "You are logged in!": "You are logged in!",
+ "You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account."
+}
\ No newline at end of file
diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php
index e5506df..6db4982 100644
--- a/resources/lang/en/auth.php
+++ b/resources/lang/en/auth.php
@@ -1,19 +1,9 @@
'These credentials do not match our records.',
+ 'failed' => 'These credentials do not match our records.',
+ 'password' => 'The password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
-
];
diff --git a/resources/lang/en/http-statuses.php b/resources/lang/en/http-statuses.php
new file mode 100644
index 0000000..3346f78
--- /dev/null
+++ b/resources/lang/en/http-statuses.php
@@ -0,0 +1,84 @@
+ 'Unknown Error',
+ '100' => 'Continue',
+ '101' => 'Switching Protocols',
+ '102' => 'Processing',
+ '200' => 'OK',
+ '201' => 'Created',
+ '202' => 'Accepted',
+ '203' => 'Non-Authoritative Information',
+ '204' => 'No Content',
+ '205' => 'Reset Content',
+ '206' => 'Partial Content',
+ '207' => 'Multi-Status',
+ '208' => 'Already Reported',
+ '226' => 'IM Used',
+ '300' => 'Multiple Choices',
+ '301' => 'Moved Permanently',
+ '302' => 'Found',
+ '303' => 'See Other',
+ '304' => 'Not Modified',
+ '305' => 'Use Proxy',
+ '307' => 'Temporary Redirect',
+ '308' => 'Permanent Redirect',
+ '400' => 'Bad Request',
+ '401' => 'Unauthorized',
+ '402' => 'Payment Required',
+ '403' => 'Forbidden',
+ '404' => 'Not Found',
+ '405' => 'Method Not Allowed',
+ '406' => 'Not Acceptable',
+ '407' => 'Proxy Authentication Required',
+ '408' => 'Request Timeout',
+ '409' => 'Conflict',
+ '410' => 'Gone',
+ '411' => 'Length Required',
+ '412' => 'Precondition Failed',
+ '413' => 'Payload Too Large',
+ '414' => 'URI Too Long',
+ '415' => 'Unsupported Media Type',
+ '416' => 'Range Not Satisfiable',
+ '417' => 'Expectation Failed',
+ '418' => 'I\'m a teapot',
+ '419' => 'Session Has Expired',
+ '421' => 'Misdirected Request',
+ '422' => 'Unprocessable Entity',
+ '423' => 'Locked',
+ '424' => 'Failed Dependency',
+ '425' => 'Too Early',
+ '426' => 'Upgrade Required',
+ '428' => 'Precondition Required',
+ '429' => 'Too Many Requests',
+ '431' => 'Request Header Fields Too Large',
+ '444' => 'Connection Closed Without Response',
+ '449' => 'Retry With',
+ '451' => 'Unavailable For Legal Reasons',
+ '499' => 'Client Closed Request',
+ '500' => 'Internal Server Error',
+ '501' => 'Not Implemented',
+ '502' => 'Bad Gateway',
+ '503' => 'Maintenance Mode',
+ '504' => 'Gateway Timeout',
+ '505' => 'HTTP Version Not Supported',
+ '506' => 'Variant Also Negotiates',
+ '507' => 'Insufficient Storage',
+ '508' => 'Loop Detected',
+ '509' => 'Bandwidth Limit Exceeded',
+ '510' => 'Not Extended',
+ '511' => 'Network Authentication Required',
+ '520' => 'Unknown Error',
+ '521' => 'Web Server is Down',
+ '522' => 'Connection Timed Out',
+ '523' => 'Origin Is Unreachable',
+ '524' => 'A Timeout Occurred',
+ '525' => 'SSL Handshake Failed',
+ '526' => 'Invalid SSL Certificate',
+ '527' => 'Railgun Error',
+ '598' => 'Network Read Timeout Error',
+ '599' => 'Network Connect Timeout Error',
+ 'unknownError' => 'Unknown Error',
+];
diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php
index d481411..f4cedde 100644
--- a/resources/lang/en/pagination.php
+++ b/resources/lang/en/pagination.php
@@ -1,19 +1,8 @@
'Next »',
'previous' => '« Previous',
- 'next' => 'Next »',
-
];
diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php
index 2345a56..f3b65ba 100644
--- a/resources/lang/en/passwords.php
+++ b/resources/lang/en/passwords.php
@@ -1,22 +1,11 @@
'Your password has been reset!',
- 'sent' => 'We have emailed your password reset link!',
+ 'reset' => 'Your password has been reset.',
+ 'sent' => 'We have emailed your password reset link.',
'throttled' => 'Please wait before retrying.',
- 'token' => 'This password reset token is invalid.',
- 'user' => "We can't find a user with that email address.",
-
+ 'token' => 'This password reset token is invalid.',
+ 'user' => 'We can\'t find a user with that email address.',
];
diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php
index 4e5addb..2076bd3 100644
--- a/resources/lang/en/validation.php
+++ b/resources/lang/en/validation.php
@@ -1,151 +1,217 @@
'The :attribute must be accepted.',
- 'active_url' => 'The :attribute is not a valid URL.',
- 'after' => 'The :attribute must be a date after :date.',
- 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
- 'alpha' => 'The :attribute may only contain letters.',
- 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
- 'alpha_num' => 'The :attribute may only contain letters and numbers.',
- 'array' => 'The :attribute must be an array.',
- 'before' => 'The :attribute must be a date before :date.',
- 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
- 'between' => [
+ 'accepted' => 'The :attribute must be accepted.',
+ 'accepted_if' => 'The :attribute must be accepted when :other is :value.',
+ 'active_url' => 'The :attribute is not a valid URL.',
+ 'after' => 'The :attribute must be a date after :date.',
+ 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
+ 'alpha' => 'The :attribute may only contain letters.',
+ 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
+ 'alpha_num' => 'The :attribute may only contain letters and numbers.',
+ 'array' => 'The :attribute must be an array.',
+ 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
+ 'before' => 'The :attribute must be a date before :date.',
+ 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
+ 'between' => [
+ 'array' => 'The :attribute must have between :min and :max items.',
+ 'file' => 'The :attribute must be between :min and :max kilobytes.',
'numeric' => 'The :attribute must be between :min and :max.',
- 'file' => 'The :attribute must be between :min and :max kilobytes.',
- 'string' => 'The :attribute must be between :min and :max characters.',
- 'array' => 'The :attribute must have between :min and :max items.',
+ 'string' => 'The :attribute must be between :min and :max characters.',
],
- 'boolean' => 'The :attribute field must be true or false.',
- 'confirmed' => 'The :attribute confirmation does not match.',
- 'date' => 'The :attribute is not a valid date.',
- 'date_equals' => 'The :attribute must be a date equal to :date.',
- 'date_format' => 'The :attribute does not match the format :format.',
- 'different' => 'The :attribute and :other must be different.',
- 'digits' => 'The :attribute must be :digits digits.',
- 'digits_between' => 'The :attribute must be between :min and :max digits.',
- 'dimensions' => 'The :attribute has invalid image dimensions.',
- 'distinct' => 'The :attribute field has a duplicate value.',
- 'email' => 'The :attribute must be a valid email address.',
- 'ends_with' => 'The :attribute must end with one of the following: :values.',
- 'exists' => 'The selected :attribute is invalid.',
- 'file' => 'The :attribute must be a file.',
- 'filled' => 'The :attribute field must have a value.',
- 'gt' => [
+ 'boolean' => 'The :attribute field must be true or false.',
+ 'can' => 'The :attribute field contains an unauthorized value.',
+ 'confirmed' => 'The :attribute confirmation does not match.',
+ 'current_password' => 'The password is incorrect.',
+ 'date' => 'The :attribute is not a valid date.',
+ 'date_equals' => 'The :attribute must be a date equal to :date.',
+ 'date_format' => 'The :attribute does not match the format :format.',
+ 'decimal' => 'The :attribute field must have :decimal decimal places.',
+ 'declined' => 'The :attribute must be declined.',
+ 'declined_if' => 'The :attribute must be declined when :other is :value.',
+ 'different' => 'The :attribute and :other must be different.',
+ 'digits' => 'The :attribute must be :digits digits.',
+ 'digits_between' => 'The :attribute must be between :min and :max digits.',
+ 'dimensions' => 'The :attribute has invalid image dimensions.',
+ 'distinct' => 'The :attribute field has a duplicate value.',
+ 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
+ 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
+ 'email' => 'The :attribute must be a valid email address.',
+ 'ends_with' => 'The :attribute must end with one of the following: :values.',
+ 'enum' => 'The selected :attribute is invalid.',
+ 'exists' => 'The selected :attribute is invalid.',
+ 'file' => 'The :attribute must be a file.',
+ 'filled' => 'The :attribute field is required.',
+ 'gt' => [
+ 'array' => 'The :attribute must have more than :value items.',
+ 'file' => 'The :attribute must be greater than :value kilobytes.',
'numeric' => 'The :attribute must be greater than :value.',
- 'file' => 'The :attribute must be greater than :value kilobytes.',
- 'string' => 'The :attribute must be greater than :value characters.',
- 'array' => 'The :attribute must have more than :value items.',
+ 'string' => 'The :attribute must be greater than :value characters.',
],
- 'gte' => [
+ 'gte' => [
+ 'array' => 'The :attribute must have :value items or more.',
+ 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
'numeric' => 'The :attribute must be greater than or equal :value.',
- 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
- 'string' => 'The :attribute must be greater than or equal :value characters.',
- 'array' => 'The :attribute must have :value items or more.',
+ 'string' => 'The :attribute must be greater than or equal :value characters.',
],
- 'image' => 'The :attribute must be an image.',
- 'in' => 'The selected :attribute is invalid.',
- 'in_array' => 'The :attribute field does not exist in :other.',
- 'integer' => 'The :attribute must be an integer.',
- 'ip' => 'The :attribute must be a valid IP address.',
- 'ipv4' => 'The :attribute must be a valid IPv4 address.',
- 'ipv6' => 'The :attribute must be a valid IPv6 address.',
- 'json' => 'The :attribute must be a valid JSON string.',
- 'lt' => [
+ 'image' => 'The :attribute must be an image.',
+ 'in' => 'The selected :attribute is invalid.',
+ 'in_array' => 'The :attribute field does not exist in :other.',
+ 'integer' => 'The :attribute must be an integer.',
+ 'ip' => 'The :attribute must be a valid IP address.',
+ 'ipv4' => 'The :attribute must be a valid IPv4 address.',
+ 'ipv6' => 'The :attribute must be a valid IPv6 address.',
+ 'json' => 'The :attribute must be a valid JSON string.',
+ 'lowercase' => 'The :attribute field must be lowercase.',
+ 'lt' => [
+ 'array' => 'The :attribute must have less than :value items.',
+ 'file' => 'The :attribute must be less than :value kilobytes.',
'numeric' => 'The :attribute must be less than :value.',
- 'file' => 'The :attribute must be less than :value kilobytes.',
- 'string' => 'The :attribute must be less than :value characters.',
- 'array' => 'The :attribute must have less than :value items.',
+ 'string' => 'The :attribute must be less than :value characters.',
],
- 'lte' => [
+ 'lte' => [
+ 'array' => 'The :attribute must not have more than :value items.',
+ 'file' => 'The :attribute must be less than or equal :value kilobytes.',
'numeric' => 'The :attribute must be less than or equal :value.',
- 'file' => 'The :attribute must be less than or equal :value kilobytes.',
- 'string' => 'The :attribute must be less than or equal :value characters.',
- 'array' => 'The :attribute must not have more than :value items.',
+ 'string' => 'The :attribute must be less than or equal :value characters.',
],
- 'max' => [
+ 'mac_address' => 'The :attribute must be a valid MAC address.',
+ 'max' => [
+ 'array' => 'The :attribute may not have more than :max items.',
+ 'file' => 'The :attribute may not be greater than :max kilobytes.',
'numeric' => 'The :attribute may not be greater than :max.',
- 'file' => 'The :attribute may not be greater than :max kilobytes.',
- 'string' => 'The :attribute may not be greater than :max characters.',
- 'array' => 'The :attribute may not have more than :max items.',
+ 'string' => 'The :attribute may not be greater than :max characters.',
],
- 'mimes' => 'The :attribute must be a file of type: :values.',
- 'mimetypes' => 'The :attribute must be a file of type: :values.',
- 'min' => [
+ 'max_digits' => 'The :attribute field must not have more than :max digits.',
+ 'mimes' => 'The :attribute must be a file of type: :values.',
+ 'mimetypes' => 'The :attribute must be a file of type: :values.',
+ 'min' => [
+ 'array' => 'The :attribute must have at least :min items.',
+ 'file' => 'The :attribute must be at least :min kilobytes.',
'numeric' => 'The :attribute must be at least :min.',
- 'file' => 'The :attribute must be at least :min kilobytes.',
- 'string' => 'The :attribute must be at least :min characters.',
- 'array' => 'The :attribute must have at least :min items.',
+ 'string' => 'The :attribute must be at least :min characters.',
],
- 'not_in' => 'The selected :attribute is invalid.',
- 'not_regex' => 'The :attribute format is invalid.',
- 'numeric' => 'The :attribute must be a number.',
- 'password' => 'The password is incorrect.',
- 'present' => 'The :attribute field must be present.',
- 'regex' => 'The :attribute format is invalid.',
- 'required' => 'The :attribute field is required.',
- 'required_if' => 'The :attribute field is required when :other is :value.',
- 'required_unless' => 'The :attribute field is required unless :other is in :values.',
- 'required_with' => 'The :attribute field is required when :values is present.',
- 'required_with_all' => 'The :attribute field is required when :values are present.',
- 'required_without' => 'The :attribute field is required when :values is not present.',
+ 'min_digits' => 'The :attribute field must have at least :min digits.',
+ 'missing' => 'The :attribute field must be missing.',
+ 'missing_if' => 'The :attribute field must be missing when :other is :value.',
+ 'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
+ 'missing_with' => 'The :attribute field must be missing when :values is present.',
+ 'missing_with_all' => 'The :attribute field must be missing when :values are present.',
+ 'multiple_of' => 'The :attribute must be a multiple of :value.',
+ 'not_in' => 'The selected :attribute is invalid.',
+ 'not_regex' => 'The :attribute format is invalid.',
+ 'numeric' => 'The :attribute must be a number.',
+ 'password' => [
+ 'letters' => 'The :attribute field must contain at least one letter.',
+ 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
+ 'numbers' => 'The :attribute field must contain at least one number.',
+ 'symbols' => 'The :attribute field must contain at least one symbol.',
+ 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
+ ],
+ 'present' => 'The :attribute field must be present.',
+ 'prohibited' => 'The :attribute field is prohibited.',
+ 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
+ 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
+ 'prohibits' => 'The :attribute field prohibits :other from being present.',
+ 'regex' => 'The :attribute format is invalid.',
+ 'required' => 'The :attribute field is required.',
+ 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
+ 'required_if' => 'The :attribute field is required when :other is :value.',
+ 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
+ 'required_unless' => 'The :attribute field is required unless :other is in :values.',
+ 'required_with' => 'The :attribute field is required when :values is present.',
+ 'required_with_all' => 'The :attribute field is required when :values is present.',
+ 'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
- 'same' => 'The :attribute and :other must match.',
- 'size' => [
+ 'same' => 'The :attribute and :other must match.',
+ 'size' => [
+ 'array' => 'The :attribute must contain :size items.',
+ 'file' => 'The :attribute must be :size kilobytes.',
'numeric' => 'The :attribute must be :size.',
- 'file' => 'The :attribute must be :size kilobytes.',
- 'string' => 'The :attribute must be :size characters.',
- 'array' => 'The :attribute must contain :size items.',
+ 'string' => 'The :attribute must be :size characters.',
],
- 'starts_with' => 'The :attribute must start with one of the following: :values.',
- 'string' => 'The :attribute must be a string.',
- 'timezone' => 'The :attribute must be a valid zone.',
- 'unique' => 'The :attribute has already been taken.',
- 'uploaded' => 'The :attribute failed to upload.',
- 'url' => 'The :attribute format is invalid.',
- 'uuid' => 'The :attribute must be a valid UUID.',
-
- /*
- |--------------------------------------------------------------------------
- | Custom Validation Language Lines
- |--------------------------------------------------------------------------
- |
- | Here you may specify custom validation messages for attributes using the
- | convention "attribute.rule" to name the lines. This makes it quick to
- | specify a specific custom language line for a given attribute rule.
- |
- */
-
- 'custom' => [
- 'attribute-name' => [
- 'rule-name' => 'custom-message',
- ],
+ 'starts_with' => 'The :attribute must start with one of the following: :values',
+ 'string' => 'The :attribute must be a string.',
+ 'timezone' => 'The :attribute must be a valid zone.',
+ 'ulid' => 'The :attribute field must be a valid ULID.',
+ 'unique' => 'The :attribute has already been taken.',
+ 'uploaded' => 'The :attribute failed to upload.',
+ 'uppercase' => 'The :attribute field must be uppercase.',
+ 'url' => 'The :attribute format is invalid.',
+ 'uuid' => 'The :attribute must be a valid UUID.',
+ 'attributes' => [
+ 'address' => 'address',
+ 'age' => 'age',
+ 'amount' => 'amount',
+ 'area' => 'area',
+ 'available' => 'available',
+ 'birthday' => 'birthday',
+ 'body' => 'body',
+ 'city' => 'city',
+ 'content' => 'content',
+ 'country' => 'country',
+ 'created_at' => 'created at',
+ 'creator' => 'creator',
+ 'current_password' => 'current password',
+ 'date' => 'date',
+ 'date_of_birth' => 'date of birth',
+ 'day' => 'day',
+ 'deleted_at' => 'deleted at',
+ 'description' => 'description',
+ 'district' => 'district',
+ 'duration' => 'duration',
+ 'email' => 'email',
+ 'excerpt' => 'excerpt',
+ 'filter' => 'filter',
+ 'first_name' => 'first name',
+ 'gender' => 'gender',
+ 'group' => 'group',
+ 'hour' => 'hour',
+ 'image' => 'image',
+ 'last_name' => 'last name',
+ 'lesson' => 'lesson',
+ 'line_address_1' => 'line address 1',
+ 'line_address_2' => 'line address 2',
+ 'message' => 'message',
+ 'middle_name' => 'middle name',
+ 'minute' => 'minute',
+ 'mobile' => 'mobile',
+ 'month' => 'month',
+ 'name' => 'name',
+ 'national_code' => 'national code',
+ 'number' => 'number',
+ 'password' => 'password',
+ 'password_confirmation' => 'password confirmation',
+ 'phone' => 'phone',
+ 'photo' => 'photo',
+ 'postal_code' => 'postal code',
+ 'price' => 'price',
+ 'province' => 'province',
+ 'recaptcha_response_field' => 'recaptcha response field',
+ 'remember' => 'remember',
+ 'restored_at' => 'restored at',
+ 'result_text_under_image' => 'result text under image',
+ 'role' => 'role',
+ 'second' => 'second',
+ 'sex' => 'sex',
+ 'short_text' => 'short text',
+ 'size' => 'size',
+ 'state' => 'state',
+ 'street' => 'street',
+ 'student' => 'student',
+ 'subject' => 'subject',
+ 'teacher' => 'teacher',
+ 'terms' => 'terms',
+ 'test_description' => 'test description',
+ 'test_locale' => 'test locale',
+ 'test_name' => 'test name',
+ 'text' => 'text',
+ 'time' => 'time',
+ 'title' => 'title',
+ 'updated_at' => 'updated at',
+ 'username' => 'username',
+ 'year' => 'year',
],
-
- /*
- |--------------------------------------------------------------------------
- | Custom Validation Attributes
- |--------------------------------------------------------------------------
- |
- | The following language lines are used to swap our attribute placeholder
- | with something more reader friendly such as "E-Mail Address" instead
- | of "email". This simply helps us make our message more expressive.
- |
- */
-
- 'attributes' => [],
-
];
diff --git a/resources/lang/fr.json b/resources/lang/fr.json
index 26f4a4d..9c2ad17 100644
--- a/resources/lang/fr.json
+++ b/resources/lang/fr.json
@@ -1,10 +1,59 @@
{
- "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous ne parvenez pas à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous\ndans votre navigateur Web :",
- "Regards": "Cordialement",
+ "(and :count more error)": "(et :count erreur en plus)",
+ "(and :count more errors)": "(et :count erreurs en plus)",
+ "A fresh verification link has been sent to your email address.": "Un nouveau lien de vérification a été envoyé à votre adresse e-mail.",
"All rights reserved.": "Tous droits réservés.",
- "The :attribute must contain at least one uppercase and one lowercase letter.": ":attribute doit contenir au moins une lettre majuscule et une lettre minuscule.",
+ "Before proceeding, please check your email for a verification link.": "Avant de continuer, merci de vérifier votre e-mail contenant un lien de vérification.",
+ "click here to request another": "cliquez ici pour en demander un autre",
+ "Confirm Password": "Confirmer le mot de passe",
+ "Dashboard": "Tableau de bord",
+ "Email Address": "Adresse e-mail",
+ "Forbidden": "Interdit",
+ "Forgot Your Password?": "Mot de passe oublié ?",
+ "Go to page :page": "Aller à la page :page",
+ "Hello!": "Bonjour !",
+ "If you did not create an account, no further action is required.": "Si vous n'avez pas créé de compte, vous pouvez ignorer ce message.",
+ "If you did not receive the email": "Si vous n'avez pas reçu cet e-mail",
+ "If you did not request a password reset, no further action is required.": "Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer ce message.",
+ "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous avez des difficultés à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous\ndans votre navigateur Web :",
+ "Invalid JSON was returned from the route.": "Un JSON non valide a été renvoyé par la route.",
+ "Login": "Connexion",
+ "Logout": "Déconnexion",
+ "Name": "Nom",
+ "Not Found": "Non trouvé",
+ "of": "de",
+ "Page Expired": "Page expirée",
+ "Pagination Navigation": "Pagination",
+ "Password": "Mot de passe",
+ "Payment Required": "Paiement requis",
+ "Please click the button below to verify your email address.": "Veuillez cliquer sur le bouton ci-dessous pour vérifier votre adresse e-mail :",
+ "Please confirm your password before continuing.": "Veuillez confirmer votre mot de passe avant de continuer.",
+ "Regards": "Cordialement",
+ "Register": "Inscription",
+ "Remember Me": "Se souvenir de moi",
+ "Reset Password": "Réinitialisation du mot de passe",
+ "Reset Password Notification": "Notification de réinitialisation du mot de passe",
+ "results": "résultats",
+ "Send Password Reset Link": "Envoyer le lien de réinitialisation du mot de passe",
+ "Server Error": "Erreur serveur",
+ "Service Unavailable": "Service indisponible",
+ "Showing": "Montrant",
"The :attribute must contain at least one letter.": ":attribute doit contenir au moins une lettre.",
- "The :attribute must contain at least one symbol.": ":attribute doit contenir au moins un caractère spécial.",
"The :attribute must contain at least one number.": ":attribute doit contenir au moins un nombre.",
- "The given :attribute has appeared in a data leak. Please choose a different :attribute.": ":attribute apparait dans une fuite de données sur le web. Merci de choisir un :attribute différent."
-}
+ "The :attribute must contain at least one symbol.": ":attribute doit contenir au moins un caractère spécial.",
+ "The :attribute must contain at least one uppercase and one lowercase letter.": ":attribute doit contenir au moins une lettre majuscule et une lettre minuscule.",
+ "The given :attribute has appeared in a data leak. Please choose a different :attribute.": ":attribute apparait dans une fuite de données sur le web. Merci de choisir un :attribute différent.",
+ "The given data was invalid.": "La donnée renseignée est incorrecte.",
+ "The response is not a streamed response.": "La réponse n'est pas une réponse diffusée.",
+ "The response is not a view.": "La réponse n'est pas une vue.",
+ "This password reset link will expire in :count minutes.": "Ce lien de réinitialisation du mot de passe expirera dans :count minutes.",
+ "to": "à",
+ "Toggle navigation": "Afficher / masquer le menu de navigation",
+ "Too Many Requests": "Trop de requêtes",
+ "Unauthorized": "Non autorisé",
+ "Verify Email Address": "Vérifier l'adresse e-mail",
+ "Verify Your Email Address": "Vérifiez votre adresse e-mail",
+ "Whoops!": "Oups !",
+ "You are logged in!": "Vous êtes connecté·e !",
+ "You are receiving this email because we received a password reset request for your account.": "Vous recevez cet e-mail car nous avons reçu une demande de réinitialisation de mot de passe pour votre compte."
+}
\ No newline at end of file
diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php
index bf72ee2..a22cd3f 100644
--- a/resources/lang/fr/auth.php
+++ b/resources/lang/fr/auth.php
@@ -1,18 +1,9 @@
'Ces identifiants ne correspondent pas à nos enregistrements',
- 'password' => 'Le mot de passe fourni est incorrect.',
+return [
+ 'failed' => 'Ces identifiants ne correspondent pas à nos enregistrements.',
+ 'password' => 'Le mot de passe est incorrect',
'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.',
];
diff --git a/resources/lang/fr/http-statuses.php b/resources/lang/fr/http-statuses.php
new file mode 100644
index 0000000..af44920
--- /dev/null
+++ b/resources/lang/fr/http-statuses.php
@@ -0,0 +1,84 @@
+ 'Erreur inconnue',
+ '100' => 'Continuer',
+ '101' => 'Protocoles de commutation',
+ '102' => 'En traitement',
+ '200' => 'D\'accord',
+ '201' => 'Créé',
+ '202' => 'Accepté',
+ '203' => 'Informations non autorisées',
+ '204' => 'Pas content',
+ '205' => 'Réinitialiser le contenu',
+ '206' => 'Contenu partiel',
+ '207' => 'Multi-statut',
+ '208' => 'Déjà rapporté',
+ '226' => 'J\'ai l\'habitude',
+ '300' => 'Choix multiples',
+ '301' => 'Déplacé de façon permanente',
+ '302' => 'A trouvé',
+ '303' => 'Voir autre',
+ '304' => 'Non modifié',
+ '305' => 'Utiliser un proxy',
+ '307' => 'Redirection temporaire',
+ '308' => 'Redirection permanente',
+ '400' => 'Mauvaise Demande',
+ '401' => 'Non autorisé',
+ '402' => 'Paiement Requis',
+ '403' => 'Interdit',
+ '404' => 'Page non trouvée',
+ '405' => 'Méthode Non Autorisée',
+ '406' => 'Pas acceptable',
+ '407' => 'Authentification proxy requise',
+ '408' => 'Délai d\'expiration de la demande',
+ '409' => 'Conflit',
+ '410' => 'Disparu',
+ '411' => 'Longueur requise',
+ '412' => 'La précondition a échoué',
+ '413' => 'Charge utile trop grande',
+ '414' => 'URI trop long',
+ '415' => 'Type de support non supporté',
+ '416' => 'Plage non satisfaisante',
+ '417' => 'Échec de l\'attente',
+ '418' => 'Je suis une théière',
+ '419' => 'La session a expiré',
+ '421' => 'Demande mal dirigée',
+ '422' => 'Entité non traitable',
+ '423' => 'Fermé à clef',
+ '424' => 'Dépendance échouée',
+ '425' => 'Trop tôt',
+ '426' => 'Mise à niveau requise',
+ '428' => 'Condition préalable requise',
+ '429' => 'Trop de demandes',
+ '431' => 'Demander des champs d\'en-tête trop grands',
+ '444' => 'Connexion fermée sans réponse',
+ '449' => 'Réessayer avec',
+ '451' => 'Indisponible pour des raisons légales',
+ '499' => 'Demande fermée du client',
+ '500' => 'Erreur Interne du Serveur',
+ '501' => 'Pas mis en œuvre',
+ '502' => 'Mauvaise passerelle',
+ '503' => 'Mode de Maintenance',
+ '504' => 'Délai d\'attente de la passerelle',
+ '505' => 'Version HTTP non prise en charge',
+ '506' => 'La variante négocie également',
+ '507' => 'Espace insuffisant',
+ '508' => 'Boucle détectée',
+ '509' => 'Limite de bande passante dépassée',
+ '510' => 'Non prolongé',
+ '511' => 'Authentification réseau requise',
+ '520' => 'Erreur inconnue',
+ '521' => 'Le serveur Web est en panne',
+ '522' => 'La connexion a expiré',
+ '523' => 'L\'origine est inaccessible',
+ '524' => 'Un dépassement de délai s\'est produit',
+ '525' => 'Échec de la prise de contact SSL',
+ '526' => 'Certificat SSL invalide',
+ '527' => 'Erreur de canon ferroviaire',
+ '598' => 'Erreur de délai de lecture réseau',
+ '599' => 'Erreur de délai de connexion réseau',
+ 'unknownError' => 'Erreur inconnue',
+];
diff --git a/resources/lang/fr/pagination.php b/resources/lang/fr/pagination.php
index 8c1080e..225391e 100644
--- a/resources/lang/fr/pagination.php
+++ b/resources/lang/fr/pagination.php
@@ -1,17 +1,8 @@
'« Précédent',
+return [
'next' => 'Suivant »',
+ 'previous' => '« Précédent',
];
diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php
index 2f898d3..75ae148 100644
--- a/resources/lang/fr/passwords.php
+++ b/resources/lang/fr/passwords.php
@@ -1,20 +1,11 @@
'Votre mot de passe a été réinitialisé !',
'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !',
'throttled' => 'Veuillez patienter avant de réessayer.',
- 'token' => "Ce jeton de réinitialisation du mot de passe n'est pas valide.",
- 'user' => "Aucun utilisateur n'a été trouvé avec cette adresse email.",
+ 'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.',
+ 'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.',
];
diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php
index 6103303..21876b4 100644
--- a/resources/lang/fr/validation.php
+++ b/resources/lang/fr/validation.php
@@ -1,19 +1,10 @@
'Le champ :attribute doit être accepté.',
+ 'accepted_if' => 'Le champ :attribute doit être accepté quand :other a la valeur :value.',
'active_url' => 'Le champ :attribute n\'est pas une URL valide.',
'after' => 'Le champ :attribute doit être une date postérieure au :date.',
'after_or_equal' => 'Le champ :attribute doit être une date postérieure ou égale au :date.',
@@ -21,6 +12,7 @@ return [
'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.',
'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.',
'array' => 'Le champ :attribute doit être un tableau.',
+ 'ascii' => 'Le champ :attribute ne doit contenir que des caractères alphanumériques et des symboles codés sur un octet.',
'attached' => ':attribute est déjà attaché(e).',
'before' => 'Le champ :attribute doit être une date antérieure au :date.',
'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.',
@@ -31,18 +23,26 @@ return [
'string' => 'Le texte :attribute doit contenir entre :min et :max caractères.',
],
'boolean' => 'Le champ :attribute doit être vrai ou faux.',
+ 'can' => 'Le champ :attribute contient une valeur non autorisée.',
'color' => 'Le champ :attribute doit être au format hexadécimal (ex: #FFFFFF)',
'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.',
+ 'current_password' => 'Le mot de passe est incorrect.',
'date' => 'Le champ :attribute n\'est pas une date valide.',
'date_equals' => 'Le champ :attribute doit être une date égale à :date.',
'date_format' => 'Le champ :attribute ne correspond pas au format :format.',
+ 'decimal' => 'Le champ :attribute doit comporter :decimal décimales.',
+ 'declined' => 'Le champ :attribute doit être décliné.',
+ 'declined_if' => 'Le champ :attribute doit être décliné quand :other a la valeur :value.',
'different' => 'Les champs :attribute et :other doivent être différents.',
'digits' => 'Le champ :attribute doit contenir :digits chiffres.',
'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.',
'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.',
'distinct' => 'Le champ :attribute a une valeur en double.',
- 'email' => 'Le champ :attribute doit être une adresse email valide.',
+ 'doesnt_end_with' => 'Le champ :attribute ne doit pas finir avec une des valeurs suivantes : :values.',
+ 'doesnt_start_with' => 'Le champ :attribute ne doit pas commencer avec une des valeurs suivantes : :values.',
+ 'email' => 'Le champ :attribute doit être une adresse e-mail valide.',
'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values',
+ 'enum' => 'Le champ :attribute sélectionné est invalide.',
'exists' => 'Le champ :attribute sélectionné est invalide.',
'file' => 'Le champ :attribute doit être un fichier.',
'filled' => 'Le champ :attribute doit avoir une valeur.',
@@ -66,6 +66,7 @@ return [
'ipv4' => 'Le champ :attribute doit être une adresse IPv4 valide.',
'ipv6' => 'Le champ :attribute doit être une adresse IPv6 valide.',
'json' => 'Le champ :attribute doit être un document JSON valide.',
+ 'lowercase' => 'Le champ :attribute doit être en minuscules.',
'lt' => [
'array' => 'Le tableau :attribute doit contenir moins de :value éléments.',
'file' => 'La taille du fichier de :attribute doit être inférieure à :value kilo-octets.',
@@ -78,33 +79,50 @@ return [
'numeric' => 'La valeur de :attribute doit être inférieure ou égale à :value.',
'string' => 'Le texte :attribute doit contenir au plus :value caractères.',
],
+ 'mac_address' => 'Le champ :attribute doit être une adresse MAC valide.',
'max' => [
- 'array' => 'Le tableau :attribute ne peut contenir plus de :max éléments.',
+ 'array' => 'Le tableau :attribute ne peut pas contenir plus que :max éléments.',
'file' => 'La taille du fichier de :attribute ne peut pas dépasser :max kilo-octets.',
- 'numeric' => 'La valeur de :attribute ne peut être supérieure à :max.',
- 'string' => 'Le texte de :attribute ne peut contenir plus de :max caractères.',
+ 'numeric' => 'La valeur de :attribute ne peut pas être supérieure à :max.',
+ 'string' => 'Le texte de :attribute ne peut pas contenir plus de :max caractères.',
],
+ 'max_digits' => 'Le champ :attribute ne doit pas avoir plus de :max chiffres.',
'mimes' => 'Le champ :attribute doit être un fichier de type : :values.',
'mimetypes' => 'Le champ :attribute doit être un fichier de type : :values.',
'min' => [
'array' => 'Le tableau :attribute doit contenir au moins :min éléments.',
- 'file' => 'La taille du fichier de :attribute doit être supérieure à :min kilo-octets.',
+ 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :min kilo-octets.',
'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :min.',
- 'string' => 'Le texte :attribute doit contenir au moins :min caractères.',
+ 'string' => 'Le texte de :attribute doit contenir au moins :min caractères.',
],
+ 'min_digits' => 'Le champ :attribute doit avoir au moins :min chiffres.',
+ 'missing' => 'Le champ :attribute doit être manquant.',
+ 'missing_if' => 'Le champ :attribute doit être manquant quand :other a la valeur :value.',
+ 'missing_unless' => 'Le champ :attribute doit être manquant sauf si :other a la valeur :value.',
+ 'missing_with' => 'Le champ :attribute doit être manquant quand :values est présent.',
+ 'missing_with_all' => 'Le champ :attribute doit être manquant quand :values sont présents.',
'multiple_of' => 'La valeur de :attribute doit être un multiple de :value',
'not_in' => 'Le champ :attribute sélectionné n\'est pas valide.',
'not_regex' => 'Le format du champ :attribute n\'est pas valide.',
'numeric' => 'Le champ :attribute doit contenir un nombre.',
- 'password' => 'Le mot de passe est incorrect',
+ 'password' => [
+ 'letters' => 'Le champ :attribute doit contenir au moins une lettre.',
+ 'mixed' => 'Le champ :attribute doit contenir au moins une majuscule et une minuscule.',
+ 'numbers' => 'Le champ :attribute doit contenir au moins un chiffre.',
+ 'symbols' => 'Le champ :attribute doit contenir au moins un symbole.',
+ 'uncompromised' => 'La valeur du champ :attribute est apparue dans une fuite de données. Veuillez choisir une valeur différente.',
+ ],
'present' => 'Le champ :attribute doit être présent.',
'prohibited' => 'Le champ :attribute est interdit.',
'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.',
'prohibited_unless' => 'Le champ :attribute est interdit à moins que :other est l\'une des valeurs :values.',
+ 'prohibits' => 'Le champ :attribute interdit :other d\'être présent.',
'regex' => 'Le format du champ :attribute est invalide.',
'relatable' => ':attribute n\'est sans doute pas associé(e) avec cette donnée.',
'required' => 'Le champ :attribute est obligatoire.',
+ 'required_array_keys' => 'Le champ :attribute doit contenir des entrées pour : :values.',
'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.',
+ 'required_if_accepted' => 'Le champ :attribute est obligatoire quand le champ :other a été accepté.',
'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.',
'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.',
'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont présents.',
@@ -120,83 +138,115 @@ return [
'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values',
'string' => 'Le champ :attribute doit être une chaîne de caractères.',
'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.',
+ 'ulid' => 'Le champ :attribute doit être un ULID valide.',
'unique' => 'La valeur du champ :attribute est déjà utilisée.',
'uploaded' => 'Le fichier du champ :attribute n\'a pu être téléversé.',
+ 'uppercase' => 'Le champ :attribute doit être en majuscules.',
'url' => 'Le format de l\'URL de :attribute n\'est pas valide.',
'uuid' => 'Le champ :attribute doit être un UUID valide',
- 'custom' => [
- 'attribute-name' => [
- 'rule-name' => 'custom-message',
- ],
- ],
'attributes' => [
- 'address' => 'adresse',
- 'age' => 'âge',
- 'amount' => [
- 'default' => 'Montant',
- 'day' => 'Montant (par jour)',
- ],
- 'announce_type' => 'type d\'annonce',
- 'available' => 'disponible',
- 'brandname' => 'Nom de la marque',
- 'city' => 'ville',
- 'comment' => 'Commentaire',
- 'company_id' => 'Sociétés',
- 'color' => 'couleur',
- 'content' => 'contenu',
- 'country' => 'pays',
- 'created_at' => 'Crée le',
- 'created_at' => 'créé le',
- 'current_password' => 'mot de passe actuel',
- 'date' => 'date',
- 'day' => 'jour',
- 'description' => 'description',
- 'email' => 'adresse email',
- 'excerpt' => 'extrait',
- 'firstname' => 'prénom',
- 'gender' => 'genre',
- 'gitlab_project_id' => 'id du dépôt Gitlab',
- 'hour' => 'heure',
- 'invoiced_to_id' => 'Entité à facturer',
- 'label' => 'label',
- 'lastname' => 'nom',
- 'message' => 'message',
- 'minute' => 'minute',
- 'mobile' => 'portable',
- 'month' => 'mois',
- 'name' => 'nom',
- 'object' => 'objet',
- 'operation' => 'opération',
- 'password_confirmation' => 'confirmation du mot de passe',
- 'password' => 'mot de passe',
- 'person' => 'personne',
- 'phone' => 'téléphone',
- 'place' => 'lieu',
- 'ref' => 'Réference',
- 'role' => 'role',
- 'second' => 'seconde',
- 'sent_accounting_date' => 'Date d\'envoi compta',
- 'sent_client_date' => 'Date d\'envoi client',
- 'sex' => 'sexe',
- 'show_days' => 'Afficher les jours',
- 'signed_date' => 'Date de signature',
- 'site' => 'site',
- 'sites' => 'sites',
- 'size' => 'taille',
- 'solde' => 'Solde',
- 'status' => 'statut',
- 'tasks' => 'Tâches',
- 'template' => 'Template',
- 'time' => 'heure',
- 'title' => 'titre',
- 'todo' => 'à faire',
- 'total_days' => 'Montant total (jours)',
- 'total' => 'Montant total',
- 'type' => 'Type',
- 'updated_at' => 'Mis à jour',
- 'url_re7' => 'Url de RECETTE',
- 'url_prod' => 'Url de PROD',
- 'username' => 'nom d\'utilisateur',
- 'year' => 'année',
+ 'address' => 'adresse',
+ 'age' => 'âge',
+ 'amount.day' => 'Montant (par jour)',
+ 'amount.default' => 'Montant',
+ 'announce_type' => 'type d\'annonce',
+ 'area' => 'zone',
+ 'available' => 'disponible',
+ 'birthday' => 'anniversaire',
+ 'body' => 'corps',
+ 'brandname' => 'Nom de la marque',
+ 'city' => 'ville',
+ 'color' => 'couleur',
+ 'comment' => 'Commentaire',
+ 'company_id' => 'Sociétés',
+ 'content' => 'contenu',
+ 'country' => 'pays',
+ 'created_at' => 'créé à',
+ 'creator' => 'créateur',
+ 'current_password' => 'mot de passe actuel',
+ 'date' => 'Date',
+ 'date_of_birth' => 'date de naissance',
+ 'day' => 'jour',
+ 'deleted_at' => 'supprimé à',
+ 'description' => 'la description',
+ 'district' => 'quartier',
+ 'duration' => 'durée',
+ 'email' => 'adresse e-mail',
+ 'excerpt' => 'extrait',
+ 'filter' => 'filtre',
+ 'first_name' => 'prénom',
+ 'firstname' => 'prénom',
+ 'gender' => 'genre',
+ 'gitlab_project_id' => 'id du dépôt Gitlab',
+ 'group' => 'groupe',
+ 'hour' => 'heure',
+ 'image' => 'image',
+ 'invoiced_to_id' => 'Entité à facturer',
+ 'label' => 'label',
+ 'last_name' => 'nom',
+ 'lastname' => 'nom',
+ 'lesson' => 'leçon',
+ 'line_address_1' => 'ligne d\'adresse 1',
+ 'line_address_2' => 'ligne d\'adresse 2',
+ 'message' => 'message',
+ 'middle_name' => 'deuxième prénom',
+ 'minute' => 'minute',
+ 'mobile' => 'portable',
+ 'month' => 'mois',
+ 'name' => 'nom',
+ 'national_code' => 'code national',
+ 'number' => 'numéro',
+ 'object' => 'objet',
+ 'operation' => 'opération',
+ 'password' => 'mot de passe',
+ 'password_confirmation' => 'confirmation du mot de passe',
+ 'person' => 'personne',
+ 'phone' => 'téléphone',
+ 'photo' => 'photo',
+ 'place' => 'lieu',
+ 'postal_code' => 'code postal',
+ 'price' => 'prix',
+ 'province' => 'région',
+ 'recaptcha_response_field' => 'champ de réponse recaptcha',
+ 'ref' => 'Réference',
+ 'remember' => 'se souvenir',
+ 'restored_at' => 'restauré à',
+ 'result_text_under_image' => 'texte de résultat sous l\'image',
+ 'role' => 'rôle',
+ 'second' => 'seconde',
+ 'sent_accounting_date' => 'Date d\'envoi compta',
+ 'sent_client_date' => 'Date d\'envoi client',
+ 'sex' => 'sexe',
+ 'short_text' => 'texte court',
+ 'show_days' => 'Afficher les jours',
+ 'signed_date' => 'Date de signature',
+ 'site' => 'site',
+ 'sites' => 'sites',
+ 'size' => 'taille',
+ 'solde' => 'Solde',
+ 'state' => 'état',
+ 'status' => 'statut',
+ 'street' => 'rue',
+ 'student' => 'étudiant',
+ 'subject' => 'sujet',
+ 'tasks' => 'Tâches',
+ 'teacher' => 'professeur',
+ 'template' => 'Template',
+ 'terms' => 'conditions',
+ 'test_description' => 'description test',
+ 'test_locale' => 'localisation test',
+ 'test_name' => 'nom test',
+ 'text' => 'texte',
+ 'time' => 'heure',
+ 'title' => 'titre',
+ 'todo' => 'à faire',
+ 'total' => 'Montant total',
+ 'total_days' => 'Montant total (jours)',
+ 'type' => 'Type',
+ 'updated_at' => 'mis à jour à',
+ 'url_prod' => 'Url de PROD',
+ 'url_re7' => 'Url de RECETTE',
+ 'username' => 'nom d\'utilisateur',
+ 'year' => 'année',
],
];
From fa97a5e82224b8e74054c87963c5273fa117ec48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?=
Date: Thu, 12 Oct 2023 15:27:42 +0200
Subject: [PATCH 3/7] ckeditor update
---
.../js/vendor/ckeditor/build/ckeditor.js | 86515 +++++++++++++++-
.../ckeditor/build/ckeditor.js.LICENSE.txt | 23 +
.../js/vendor/ckeditor/build/ckeditor.js.map | 1 -
resources/js/vendor/ckeditor/build/styles.css | 5227 +-
.../js/vendor/ckeditor/build/styles.css.map | 1 -
.../vendor/ckeditor/build/translations/af.js | 2 +-
.../vendor/ckeditor/build/translations/ar.js | 2 +-
.../vendor/ckeditor/build/translations/ast.js | 2 +-
.../vendor/ckeditor/build/translations/az.js | 2 +-
.../vendor/ckeditor/build/translations/bg.js | 2 +-
.../vendor/ckeditor/build/translations/bn.js | 2 +-
.../vendor/ckeditor/build/translations/bs.js | 2 +-
.../vendor/ckeditor/build/translations/ca.js | 2 +-
.../vendor/ckeditor/build/translations/cs.js | 2 +-
.../vendor/ckeditor/build/translations/da.js | 2 +-
.../ckeditor/build/translations/de-ch.js | 2 +-
.../vendor/ckeditor/build/translations/de.js | 2 +-
.../vendor/ckeditor/build/translations/el.js | 2 +-
.../ckeditor/build/translations/en-au.js | 2 +-
.../ckeditor/build/translations/en-gb.js | 2 +-
.../vendor/ckeditor/build/translations/en.js | 2 +-
.../vendor/ckeditor/build/translations/eo.js | 2 +-
.../ckeditor/build/translations/es-co.js | 2 +-
.../vendor/ckeditor/build/translations/es.js | 2 +-
.../vendor/ckeditor/build/translations/et.js | 2 +-
.../vendor/ckeditor/build/translations/eu.js | 2 +-
.../vendor/ckeditor/build/translations/fa.js | 2 +-
.../vendor/ckeditor/build/translations/fi.js | 2 +-
.../vendor/ckeditor/build/translations/gl.js | 2 +-
.../vendor/ckeditor/build/translations/gu.js | 2 +-
.../vendor/ckeditor/build/translations/he.js | 2 +-
.../vendor/ckeditor/build/translations/hi.js | 2 +-
.../vendor/ckeditor/build/translations/hr.js | 2 +-
.../vendor/ckeditor/build/translations/hu.js | 2 +-
.../vendor/ckeditor/build/translations/id.js | 2 +-
.../vendor/ckeditor/build/translations/it.js | 2 +-
.../vendor/ckeditor/build/translations/ja.js | 2 +-
.../vendor/ckeditor/build/translations/jv.js | 2 +-
.../vendor/ckeditor/build/translations/kk.js | 2 +-
.../vendor/ckeditor/build/translations/km.js | 2 +-
.../vendor/ckeditor/build/translations/kn.js | 2 +-
.../vendor/ckeditor/build/translations/ko.js | 2 +-
.../vendor/ckeditor/build/translations/ku.js | 2 +-
.../vendor/ckeditor/build/translations/lt.js | 2 +-
.../vendor/ckeditor/build/translations/lv.js | 2 +-
.../vendor/ckeditor/build/translations/ms.js | 2 +-
.../vendor/ckeditor/build/translations/nb.js | 2 +-
.../vendor/ckeditor/build/translations/ne.js | 2 +-
.../vendor/ckeditor/build/translations/nl.js | 2 +-
.../vendor/ckeditor/build/translations/no.js | 2 +-
.../vendor/ckeditor/build/translations/oc.js | 2 +-
.../vendor/ckeditor/build/translations/pl.js | 2 +-
.../ckeditor/build/translations/pt-br.js | 2 +-
.../vendor/ckeditor/build/translations/pt.js | 2 +-
.../vendor/ckeditor/build/translations/ro.js | 2 +-
.../vendor/ckeditor/build/translations/ru.js | 2 +-
.../vendor/ckeditor/build/translations/si.js | 2 +-
.../vendor/ckeditor/build/translations/sk.js | 2 +-
.../vendor/ckeditor/build/translations/sl.js | 2 +-
.../vendor/ckeditor/build/translations/sq.js | 2 +-
.../ckeditor/build/translations/sr-latn.js | 2 +-
.../vendor/ckeditor/build/translations/sr.js | 2 +-
.../vendor/ckeditor/build/translations/sv.js | 2 +-
.../vendor/ckeditor/build/translations/th.js | 2 +-
.../vendor/ckeditor/build/translations/tk.js | 2 +-
.../vendor/ckeditor/build/translations/tr.js | 2 +-
.../vendor/ckeditor/build/translations/tt.js | 2 +-
.../vendor/ckeditor/build/translations/ug.js | 2 +-
.../vendor/ckeditor/build/translations/uk.js | 2 +-
.../vendor/ckeditor/build/translations/ur.js | 2 +-
.../vendor/ckeditor/build/translations/uz.js | 2 +-
.../vendor/ckeditor/build/translations/vi.js | 2 +-
.../ckeditor/build/translations/zh-cn.js | 2 +-
.../vendor/ckeditor/build/translations/zh.js | 2 +-
.../js/vendor/ckeditor/package-lock.json | 2650 +-
resources/js/vendor/ckeditor/package.json | 68 +-
.../js/vendor/ckeditor/webpack.config.js | 42 +-
77 files changed, 92979 insertions(+), 1686 deletions(-)
create mode 100644 resources/js/vendor/ckeditor/build/ckeditor.js.LICENSE.txt
delete mode 100644 resources/js/vendor/ckeditor/build/ckeditor.js.map
delete mode 100644 resources/js/vendor/ckeditor/build/styles.css.map
diff --git a/resources/js/vendor/ckeditor/build/ckeditor.js b/resources/js/vendor/ckeditor/build/ckeditor.js
index 58d2359..c9923c9 100644
--- a/resources/js/vendor/ckeditor/build/ckeditor.js
+++ b/resources/js/vendor/ckeditor/build/ckeditor.js
@@ -1,7 +1,86516 @@
-!function(t){const e=t.fr=t.fr||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 sur %1","Align center":"Centrer","Align left":"Aligner à gauche","Align right":"Aligner à droite",Aquamarine:"Bleu vert",Big:"Grand",Black:"Noir","Block quote":"Citation",Blue:"Bleu",Bold:"Gras","Bulleted List":"Liste à puces","Bulleted list styles toolbar":"Barre d'outils des styles de liste à puce",Cancel:"Annuler","Characters: %0":"Caractères : %0","Choose heading":"Choisir l'en-tête",Circle:"Cercle",Decimal:"Chiffres","Decimal with leading zero":"Chiffres avec des zéros supplémentaire","Decrease indent":"Diminuer le retrait",Default:"Par défaut","Dim grey":"Gris pâle",Disc:"Disque","Document colors":"Couleurs du document",Downloadable:"Fichier téléchargeable","Dropdown toolbar":"Barre d'outils dans un menu déroulant","Edit block":"Modifier le bloc","Edit link":"Modifier le lien","Editor block content toolbar":"Barre d'outils du contenu du bloc éditeur","Editor contextual toolbar":"Barre d'outils contextuelle de l'éditeur","Editor editing area: %0":"Zone d'édition de l'éditeur : %0","Editor toolbar":"Barre d'outils de l'éditeur","Font Color":"Couleur de police","Font Family":"Police","Font Size":"Taille de police",Green:"Vert",Grey:"Gris",Heading:"En-tête","Heading 1":"Titre 1","Heading 2":"Titre 2","Heading 3":"Titre 3","Heading 4":"Titre 4","Heading 5":"Titre 5","Heading 6":"Titre 6","Horizontal line":"Ligne horizontale",Huge:"Enorme","Increase indent":"Augmenter le retrait","Insert paragraph after block":"Insérer du texte après ce bloc","Insert paragraph before block":"Insérer du texte avant ce bloc",Italic:"Italique",Justify:"Justifier","Light blue":"Bleu clair","Light green":"Vert clair","Light grey":"Gris clair",Link:"Lien","Link URL":"URL du lien","List properties":"Liste des propriétés","Lower-latin":"Lettres minuscules","Lower–roman":"Chiffres romains en minuscules",Next:"Suivant","Numbered List":"Liste numérotée","Numbered list styles toolbar":"Barre d'outils des styles de liste numérotée","Open in a new tab":"Ouvrir dans un nouvel onglet","Open link in new tab":"Ouvrir le lien dans un nouvel onglet",Orange:"Orange",Paragraph:"Paragraphe","Press Enter to type after or press Shift + Enter to type before the widget":"Appuyez sur la touche Entrée pour taper après ou sur Maj + Entrée pour taper avant le widget.",Previous:"Précedent",Purple:"Violet",Red:"Rouge",Redo:"Restaurer","Remove color":"Enlever la couleur","Remove Format":"Enlever le format","Reversed order":"Ordre inversé","Rich Text Editor":"Éditeur de texte enrichi",Save:"Enregistrer","Select all":"Sélectionner tout","Show more items":"Montrer plus d'éléments",Small:"Petit",Source:"Source",Square:"Carré","Start at":"Commencer à","Start index must be greater than 0.":"L'indice de départ doit être supérieur à 0.","Text alignment":"Alignement du texte","Text alignment toolbar":"Barre d'outils d'alignement du texte","This link has no URL":"Ce lien n'a pas d'URL",Tiny:"Minuscule","Toggle the circle list style":'Activer / désactiver le style de liste "cercle"',"Toggle the decimal list style":'Activer / désactiver le style de liste "chiffres"',"Toggle the decimal with leading zero list style":'Activer / désactiver le style de liste "chiffres de mêmes longueurs"',"Toggle the disc list style":'Activer / désactiver le style de liste "disque"',"Toggle the lower–latin list style":'Activer / désactiver le style de liste "lettres minuscules"',"Toggle the lower–roman list style":'Activer / désactiver le style de liste "chiffres romains en minuscules"',"Toggle the square list style":'Activer / désactiver le style de liste "carré"',"Toggle the upper–latin list style":'Activer / désactiver le style de liste "lettres majuscules"',"Toggle the upper–roman list style":'Activer / désactiver le style de liste "chiffres romains en majuscules"',Turquoise:"Turquoise",Underline:"Souligné",Undo:"Annuler",Unlink:"Supprimer le lien","Upper-latin":"Lettres majuscules","Upper-roman":"Chiffres romains en majuscules",White:"Blanc","Widget toolbar":"Barre d'outils du widget","Words: %0":"Mots : %0",Yellow:"Jaune"}),e.getPluralForm=function(t){return 0==t||1==t?0:0!=t&&t%1e6==0?1:2}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
+(function(d){ const l = d['fr'] = d['fr'] || {}; l.dictionary=Object.assign( l.dictionary||{}, {"%0 of %1":"%0 sur %1",Accept:"","Align center":"Centrer","Align left":"Aligner à gauche","Align right":"Aligner à droite",Aquamarine:"Bleu vert",Big:"Grand",Black:"Noir","Block quote":"Citation",Blue:"Bleu",Bold:"Gras","Bulleted List":"Liste à puces","Bulleted list styles toolbar":"Barre d'outils des styles de liste à puce",Cancel:"Annuler","Characters: %0":"Caractères : %0","Choose heading":"Choisir l'en-tête",Circle:"Cercle",Decimal:"Chiffres","Decimal with leading zero":"Chiffres avec des zéros supplémentaire","Decrease indent":"Diminuer le retrait",Default:"Par défaut","Dim grey":"Gris pâle",Disc:"Disque","Document colors":"Couleurs du document",Downloadable:"Fichier téléchargeable","Dropdown toolbar":"Barre d'outils dans un menu déroulant","Edit block":"Modifier le bloc","Edit link":"Modifier le lien","Editor block content toolbar":"Barre d'outils du contenu du bloc éditeur","Editor contextual toolbar":"Barre d'outils contextuelle de l'éditeur","Editor editing area: %0":"Zone d'édition de l'éditeur : %0","Editor toolbar":"Barre d'outils de l'éditeur","Font Color":"Couleur de police","Font Family":"Police","Font Size":"Taille de police",Green:"Vert",Grey:"Gris",Heading:"En-tête","Heading 1":"Titre 1","Heading 2":"Titre 2","Heading 3":"Titre 3","Heading 4":"Titre 4","Heading 5":"Titre 5","Heading 6":"Titre 6",HEX:"","Horizontal line":"Ligne horizontale",Huge:"Enorme","Increase indent":"Augmenter le retrait","Insert paragraph after block":"Insérer du texte après ce bloc","Insert paragraph before block":"Insérer du texte avant ce bloc",Italic:"Italique",Justify:"Justifier","Light blue":"Bleu clair","Light green":"Vert clair","Light grey":"Gris clair",Link:"Lien","Link URL":"URL du lien","List properties":"Liste des propriétés","Lower-latin":"Lettres minuscules","Lower–roman":"Chiffres romains en minuscules",Next:"Suivant","Numbered List":"Liste numérotée","Numbered list styles toolbar":"Barre d'outils des styles de liste numérotée","Open in a new tab":"Ouvrir dans un nouvel onglet","Open link in new tab":"Ouvrir le lien dans un nouvel onglet",Orange:"Orange",Paragraph:"Paragraphe","Press Enter to type after or press Shift + Enter to type before the widget":"Appuyez sur la touche Entrée pour taper après ou sur Maj + Entrée pour taper avant le widget.",Previous:"Précedent",Purple:"Violet",Red:"Rouge",Redo:"Restaurer","Remove color":"Enlever la couleur","Remove Format":"Enlever le format","Reversed order":"Ordre inversé","Rich Text Editor":"Éditeur de texte enrichi",Save:"Enregistrer","Select all":"Sélectionner tout","Show more items":"Montrer plus d'éléments",Small:"Petit",Source:"Source",Square:"Carré","Start at":"Commencer à","Start index must be greater than 0.":"L'indice de départ doit être supérieur à 0.","Text alignment":"Alignement du texte","Text alignment toolbar":"Barre d'outils d'alignement du texte","This link has no URL":"Ce lien n'a pas d'URL",Tiny:"Minuscule","Toggle the circle list style":"Activer / désactiver le style de liste \"cercle\"","Toggle the decimal list style":"Activer / désactiver le style de liste \"chiffres\"","Toggle the decimal with leading zero list style":"Activer / désactiver le style de liste \"chiffres de mêmes longueurs\"","Toggle the disc list style":"Activer / désactiver le style de liste \"disque\"","Toggle the lower–latin list style":"Activer / désactiver le style de liste \"lettres minuscules\"","Toggle the lower–roman list style":"Activer / désactiver le style de liste \"chiffres romains en minuscules\"","Toggle the square list style":"Activer / désactiver le style de liste \"carré\"","Toggle the upper–latin list style":"Activer / désactiver le style de liste \"lettres majuscules\"","Toggle the upper–roman list style":"Activer / désactiver le style de liste \"chiffres romains en majuscules\"",Turquoise:"Turquoise",Underline:"Souligné",Undo:"Annuler",Unlink:"Supprimer le lien","Upper-latin":"Lettres majuscules","Upper-roman":"Chiffres romains en majuscules",White:"Blanc","Widget toolbar":"Barre d'outils du widget","Words: %0":"Mots : %0",Yellow:"Jaune"} );l.getPluralForm=function(n){return (n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;;};})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
/*!
* @license Copyright (c) 2003-2023, 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.ClassicEditor=e():t.ClassicEditor=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var e={};function i({emitter:t,activator:e,callback:i,contextElements:n}){t.listenTo(document,"mousedown",((t,s)=>{if(!e())return;const o="function"==typeof s.composedPath?s.composedPath():[],r="function"==typeof n?n():n;for(const t of r)if(t.contains(s.target)||o.includes(t))return;i()}))}function n({keystrokeHandler:t,focusTracker:e,gridItems:i,numberOfColumns:n,uiLanguageDirection:s}){const o="number"==typeof n?()=>n:n;function r(t){return n=>{const s=i.find((t=>t.element===e.focusedElement)),o=i.getIndex(s),r=t(o,i);i.get(r).focus(),n.stopPropagation(),n.preventDefault()}}function a(t,e){return t===e-1?0:t+1}function l(t,e){return 0===t?e-1:t-1}t.set("arrowright",r(((t,e)=>"rtl"===s?l(t,e.length):a(t,e.length)))),t.set("arrowleft",r(((t,e)=>"rtl"===s?a(t,e.length):l(t,e.length)))),t.set("arrowup",r(((t,e)=>{let i=t-o();return i<0&&(i=t+o()*Math.floor(e.length/o()),i>e.length-1&&(i-=o())),i}))),t.set("arrowdown",r(((t,e)=>{let i=t+o();return i>e.length-1&&(i=t%o()),i})))}t.d(e,{default:()=>K_});const s=function(){try{return navigator.userAgent.toLowerCase()}catch(t){return""}}(),o={isMac:a(s),isWindows:function(t){return t.indexOf("windows")>-1}(s),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(s),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(s),isiOS:function(t){return!!t.match(/iphone|ipad/i)||a(t)&&navigator.maxTouchPoints>0}(s),isAndroid:function(t){return t.indexOf("android")>-1}(s),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(s),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}},r=o;function a(t){return t.indexOf("macintosh")>-1}function l(t,e,i,n){i=i||function(t,e){return t===e};const s=Array.isArray(t)?t:Array.prototype.slice.call(t),o=Array.isArray(e)?e:Array.prototype.slice.call(e),r=function(t,e,i){const n=c(t,e,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=h(t,n),o=h(e,n),r=c(s,o,i),a=t.length-r,l=e.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}(s,o,i),a=n?function(t,e){const{firstIndex:i,lastIndexOld:n,lastIndexNew:s}=t;if(-1===i)return Array(e).fill("equal");let o=[];i>0&&(o=o.concat(Array(i).fill("equal")));s-i>0&&(o=o.concat(Array(s-i).fill("insert")));n-i>0&&(o=o.concat(Array(n-i).fill("delete")));s0&&i.push({index:n,type:"insert",values:t.slice(n,o)});s-n>0&&i.push({index:n+(o-n),type:"delete",howMany:s-n});return i}(o,r);return a}function c(t,e,i){for(let n=0;n200||s>200||n+s>300)return d.fastDiff(t,e,i,!0);let o,r;if(sc?-1:1;h[n+d]&&(h[n]=h[n+d].slice(0)),h[n]||(h[n]=[]),h[n].push(s>c?o:r);let f=Math.max(s,c),m=f-n;for(;mc;m--)u[m]=f(m);u[c]=f(c),g++}while(u[c]!==l);return h[c].slice(1)}function u(t,...e){e.forEach((e=>{const i=Object.getOwnPropertyNames(e),n=Object.getOwnPropertySymbols(e);i.concat(n).forEach((i=>{if(i in t.prototype)return;if("function"==typeof e&&("length"==i||"name"==i||"prototype"==i))return;const n=Object.getOwnPropertyDescriptor(e,i);n.enumerable=!1,Object.defineProperty(t.prototype,i,n)}))}))}d.fastDiff=l;const f=function(){return function t(){t.called=!0}};class m{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=f(),this.off=f()}}const g=new Array(256).fill("").map(((t,e)=>("0"+e.toString(16)).slice(-2)));function p(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+g[t>>0&255]+g[t>>8&255]+g[t>>16&255]+g[t>>24&255]+g[e>>0&255]+g[e>>8&255]+g[e>>16&255]+g[e>>24&255]+g[i>>0&255]+g[i>>8&255]+g[i>>16&255]+g[i>>24&255]+g[n>>0&255]+g[n>>8&255]+g[n>>16&255]+g[n>>24&255]}const w={get(t="normal"){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function b(t,e){const i=w.get(e.priority);for(let n=0;n{if("object"==typeof e&&null!==e){if(i.has(e))return`[object ${e.constructor.name}]`;i.add(e)}return e},s=e?` ${JSON.stringify(e,n)}`:"",o=k(t);return t+s+o}(t,i)),this.name="CKEditorError",this.context=e,this.data=i}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const i=new v(t.message,e);throw i.stack=t.stack,i}}function y(t,e){console.warn(...A(t,e))}function k(t){return`\nRead more: ${_}#error-${t}`}function A(t,e){const i=k(t);return e?[t,e,i]:[t,i]}const x="36.0.0",C="object"==typeof window?window:t.g;if(C.CKEDITOR_VERSION)throw new v("ckeditor-duplicated-modules",null);C.CKEDITOR_VERSION=x;const P=Symbol("listeningTo"),T=Symbol("emitterId"),E=Symbol("delegations"),S=R(Object);function R(t){if(!t)return S;return class extends t{on(t,e,i){this.listenTo(this,t,e,i)}once(t,e,i){let n=!1;this.listenTo(this,t,((t,...i)=>{n||(n=!0,t.off(),e.call(this,t,...i))}),i)}off(t,e){this.stopListening(this,t,e)}listenTo(t,e,i,n={}){let s,o;this[P]||(this[P]={});const r=this[P];I(t)||O(t);const a=I(t);(s=r[a])||(s=r[a]={emitter:t,callbacks:{}}),(o=s.callbacks[e])||(o=s.callbacks[e]=[]),o.push(i),function(t,e,i,n,s){e._addEventListener?e._addEventListener(i,n,s):t._addEventListener.call(e,i,n,s)}(this,t,e,i,n)}stopListening(t,e,i){const n=this[P];let s=t&&I(t);const o=n&&s?n[s]:void 0,r=o&&e?o.callbacks[e]:void 0;if(!(!n||t&&!o||e&&!r))if(i){D(this,t,e,i);-1!==r.indexOf(i)&&(1===r.length?delete o.callbacks[e]:D(this,t,e,i))}else if(r){for(;i=r.pop();)D(this,t,e,i);delete o.callbacks[e]}else if(o){for(e in o.callbacks)this.stopListening(t,e);delete n[s]}else{for(s in n)this.stopListening(n[s].emitter);delete this[P]}}fire(t,...e){try{const i=t instanceof m?t:new m(this,t),n=i.name;let s=N(this,n);if(i.path.push(this),s){const t=[i,...e];s=Array.from(s);for(let e=0;e{this[E]||(this[E]=new Map),t.forEach((t=>{const n=this[E].get(t);n?n.set(e,i):this[E].set(t,new Map([[e,i]]))}))}}}stopDelegating(t,e){if(this[E])if(t)if(e){const i=this[E].get(t);i&&i.delete(e)}else this[E].delete(t);else this[E].clear()}_addEventListener(t,e,i){!function(t,e){const i=V(t);if(i[e])return;let n=e,s=null;const o=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},o.push(i[n]),s&&i[n].childEvents.push(s),s=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const t of o)t.callbacks=i[n].callbacks.slice();i[n].childEvents.push(s)}}(this,t);const n=M(this,t),s={callback:e,priority:w.get(i.priority)};for(const t of n)b(t,s)}_removeEventListener(t,e){const i=M(this,t);for(const t of i)for(let i=0;i-1?N(t,e.substr(0,e.lastIndexOf(":"))):null}function B(t,e,i){for(let[n,s]of t){s?"function"==typeof s&&(s=s(e.name)):s=e.name;const t=new m(e.source,s);t.path=[...e.path],n.fire(t,...i)}}function D(t,e,i,n){e._removeEventListener?e._removeEventListener(i,n):t._removeEventListener.call(e,i,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{R[t]=S.prototype[t]}));const F=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},L=Symbol("observableProperties"),z=Symbol("boundObservables"),H=Symbol("boundProperties"),j=Symbol("decoratedMethods"),$=Symbol("decoratedOriginal"),W=q(R());function q(t){if(!t)return W;return class extends t{set(t,e){if(F(t))return void Object.keys(t).forEach((e=>{this.set(e,t[e])}),this);U(this);const i=this[L];if(t in this&&!i.has(t))throw new v("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>i.get(t),set(e){const n=i.get(t);let s=this.fire(`set:${t}`,t,e,n);void 0===s&&(s=e),n===s&&i.has(t)||(i.set(t,s),this.fire(`change:${t}`,t,s,n))}}),this[t]=e}bind(...t){if(!t.length||!J(t))throw new v("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new v("observable-bind-duplicate-properties",this);U(this);const e=this[H];t.forEach((t=>{if(e.has(t))throw new v("observable-bind-rebind",this)}));const i=new Map;return t.forEach((t=>{const n={property:t,to:[]};e.set(t,n),i.set(t,n)})),{to:K,toMany:G,_observable:this,_bindProperties:t,_to:[],_bindings:i}}unbind(...t){if(!this[L])return;const e=this[H],i=this[z];if(t.length){if(!J(t))throw new v("observable-unbind-wrong-properties",this);t.forEach((t=>{const n=e.get(t);n&&(n.to.forEach((([t,e])=>{const s=i.get(t),o=s[e];o.delete(n),o.size||delete s[e],Object.keys(s).length||(i.delete(t),this.stopListening(t,"change"))})),e.delete(t))}))}else i.forEach(((t,e)=>{this.stopListening(e,"change")})),i.clear(),e.clear()}decorate(t){U(this);const e=this[t];if(!e)throw new v("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,((t,i)=>{t.return=e.apply(this,i)})),this[t]=function(...e){return this.fire(t,e)},this[t][$]=e,this[j]||(this[j]=[]),this[j].push(t)}stopListening(t,e,i){if(!t&&this[j]){for(const t of this[j])this[t]=this[t][$];delete this[j]}super.stopListening(t,e,i)}}}function U(t){t[L]||(Object.defineProperty(t,L,{value:new Map}),Object.defineProperty(t,z,{value:new Map}),Object.defineProperty(t,H,{value:new Map}))}function K(...t){const e=function(...t){if(!t.length)throw new v("observable-bind-to-parse-error",null);const e={to:[]};let i;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach((t=>{if("string"==typeof t)i.properties.push(t);else{if("object"!=typeof t)throw new v("observable-bind-to-parse-error",null);i={observable:t,properties:[]},e.to.push(i)}})),e}(...t),i=Array.from(this._bindings.keys()),n=i.length;if(!e.callback&&e.to.length>1)throw new v("observable-bind-to-no-callback",this);if(n>1&&e.callback)throw new v("observable-bind-to-extra-callback",this);var s;e.to.forEach((t=>{if(t.properties.length&&t.properties.length!==n)throw new v("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)})),this._to=e.to,e.callback&&(this._bindings.get(i[0]).callback=e.callback),s=this._observable,this._to.forEach((t=>{const e=s[z];let i;e.get(t.observable)||s.listenTo(t.observable,"change",((n,o)=>{i=e.get(t.observable)[o],i&&i.forEach((t=>{Q(s,t.property)}))}))})),function(t){let e;t._bindings.forEach(((i,n)=>{t._to.forEach((s=>{e=s.properties[i.callback?0:t._bindProperties.indexOf(n)],i.to.push([s.observable,e]),function(t,e,i,n){const s=t[z],o=s.get(i),r=o||{};r[n]||(r[n]=new Set);r[n].add(e),o||s.set(i,r)}(t._observable,i,s.observable,e)}))}))}(this),this._bindProperties.forEach((t=>{Q(this._observable,t)}))}function G(t,e,i){if(this._bindings.size>1)throw new v("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const i=t.map((t=>[t,e]));return Array.prototype.concat.apply([],i)}(t,e),i)}function J(t){return t.every((t=>"string"==typeof t))}function Q(t,e){const i=t[H].get(e);let n;i.callback?n=i.callback.apply(t,i.to.map((t=>t[0][t[1]]))):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=n:t.set(e,n)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{q[t]=W.prototype[t]}));class Y{constructor(){this._replacedElements=[]}replace(t,e){this._replacedElements.push({element:t,newElement:e}),t.style.display="none",e&&t.parentNode.insertBefore(e,t.nextSibling)}restore(){this._replacedElements.forEach((({element:t,newElement:e})=>{t.style.display="",e&&e.remove()})),this._replacedElements=[]}}function Z(t){let e=0;for(const i of t)e++;return e}function X(t,e){const i=Math.min(t.length,e.length);for(let n=0;n-1};const Dt=function(t,e){var i=this.__data__,n=It(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this};function Ft(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=ii};var si={};si["[object Float32Array]"]=si["[object Float64Array]"]=si["[object Int8Array]"]=si["[object Int16Array]"]=si["[object Int32Array]"]=si["[object Uint8Array]"]=si["[object Uint8ClampedArray]"]=si["[object Uint16Array]"]=si["[object Uint32Array]"]=!0,si["[object Arguments]"]=si["[object Array]"]=si["[object ArrayBuffer]"]=si["[object Boolean]"]=si["[object DataView]"]=si["[object Date]"]=si["[object Error]"]=si["[object Function]"]=si["[object Map]"]=si["[object Number]"]=si["[object Object]"]=si["[object RegExp]"]=si["[object Set]"]=si["[object String]"]=si["[object WeakMap]"]=!1;const oi=function(t){return wt(t)&&ni(t.length)&&!!si[gt(t)]};const ri=function(t){return function(e){return t(e)}};var ai="object"==typeof exports&&exports&&!exports.nodeType&&exports,li=ai&&"object"==typeof module&&module&&!module.nodeType&&module,ci=li&&li.exports===ai&&et.process;const hi=function(){try{var t=li&&li.require&&li.require("util").types;return t||ci&&ci.binding&&ci.binding("util")}catch(t){}}();var di=hi&&hi.isTypedArray;const ui=di?ri(di):oi;var fi=Object.prototype.hasOwnProperty;const mi=function(t,e){var i=pt(t),n=!i&&Ke(t),s=!i&&!n&&Ze(t),o=!i&&!n&&!s&&ui(t),r=i||n||s||o,a=r?He(t.length,String):[],l=a.length;for(var c in t)!e&&!fi.call(t,c)||r&&("length"==c||s&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ei(c,l))||a.push(c);return a};var gi=Object.prototype;const pi=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||gi)};const wi=yt(Object.keys,Object);var bi=Object.prototype.hasOwnProperty;const _i=function(t){if(!pi(t))return wi(t);var e=[];for(var i in Object(t))bi.call(t,i)&&"constructor"!=i&&e.push(i);return e};const vi=function(t){return null!=t&&ni(t.length)&&!Gt(t)};const yi=function(t){return vi(t)?mi(t):_i(t)};const ki=function(t,e){return t&&ze(e,yi(e),t)};const Ai=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e};var xi=Object.prototype.hasOwnProperty;const Ci=function(t){if(!F(t))return Ai(t);var e=pi(t),i=[];for(var n in t)("constructor"!=n||!e&&xi.call(t,n))&&i.push(n);return i};const Pi=function(t){return vi(t)?mi(t,!0):Ci(t)};const Ti=function(t,e){return t&&ze(e,Pi(e),t)};var Ei="object"==typeof exports&&exports&&!exports.nodeType&&exports,Si=Ei&&"object"==typeof module&&module&&!module.nodeType&&module,Ri=Si&&Si.exports===Ei?nt.Buffer:void 0,Oi=Ri?Ri.allocUnsafe:void 0;const Ii=function(t,e){if(e)return t.slice();var i=t.length,n=Oi?Oi(i):new t.constructor(i);return t.copy(n),n};const Vi=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i{this._setToTarget(t,n,e[n],i)}))}}function ds(t){return ls(t,us)}function us(t){return cs(t)?t:void 0}function fs(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 ms(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}const gs=ps(R());function ps(t){if(!t)return gs;return class extends t{listenTo(t,e,i,n={}){if(fs(t)||ms(t)){const s={capture:!!n.useCapture,passive:!!n.usePassive},o=this._getProxyEmitter(t,s)||new ws(t,s);this.listenTo(o,e,i,n)}else super.listenTo(t,e,i,n)}stopListening(t,e,i){if(fs(t)||ms(t)){const n=this._getAllProxyEmitters(t);for(const t of n)this.stopListening(t,e,i)}else super.stopListening(t,e,i)}_getProxyEmitter(t,e){return function(t,e){const i=t[P];return i&&i[e]?i[e].emitter:null}(this,bs(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=>{ps[t]=gs.prototype[t]}));class ws extends(R()){constructor(t,e){super(),O(this,bs(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,i){this.attach(t),R().prototype._addEventListener.call(this,t,e,i)}_removeEventListener(t,e){R().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 bs(t,e){let i=function(t){return t["data-ck-expando"]||(t["data-ck-expando"]=p())}(t);for(const t of Object.keys(e).sort())e[t]&&(i+="-"+t);return i}let _s;try{_s={window,document}}catch(t){_s={window:{},document:{}}}const vs=_s;function ys(t){const e=[];let i=t;for(;i&&i.nodeType!=Node.DOCUMENT_NODE;)e.unshift(i),i=i.parentNode;return e}function ks(t){return"[object Text]"==Object.prototype.toString.call(t)}function As(t){return"[object Range]"==Object.prototype.toString.apply(t)}function xs(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)}}const Cs=["top","right","bottom","left","width","height"];class Ps{constructor(t){const e=As(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Ss(t)||e)if(e){const e=Ps.getDomRangeRects(t);Ts(this,Ps.getBoundingRect(e))}else Ts(this,t.getBoundingClientRect());else if(ms(t)){const{innerWidth:e,innerHeight:i}=t;Ts(this,{top:0,right:e,bottom:i,left:0,width:e,height:i})}else Ts(this,t)}clone(){return new Ps(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};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new Ps(e)}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(!Es(t)){let i=t.parentNode||t.commonAncestorContainer;for(;i&&!Es(i);){const t=new Ps(i),n=e.getIntersection(t);if(!n)return null;n.getArea(){for(const e of t){const t=Rs._getElementCallbacks(e.target);if(t)for(const i of t)i(e)}}))}}function Os(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}function Is(t){return e=>e+t}function Vs(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function Ms(t,e,i){t.insertBefore(i,t.childNodes[e]||null)}function Ns(t){return t&&t.nodeType===Node.COMMENT_NODE}function Bs(t){return!!(t&&t.getClientRects&&t.getClientRects().length)}function Ds({element:t,target:e,positions:i,limiter:n,fitInViewport:s,viewportOffsetConfig:o}){Gt(e)&&(e=e()),Gt(n)&&(n=n());const r=function(t){return t&&t.parentNode?t.offsetParent===vs.document.body?null:t.offsetParent:null}(t),a=new Ps(t),l=new Ps(e);let c;const h=s&&function(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new Ps(vs.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e}(o)||null,d={targetRect:l,elementRect:a,positionedElementAncestor:r,viewportRect:h};if(n||s){const t=n&&new Ps(n).getVisible();Object.assign(d,{limiterRect:t,viewportRect:h}),c=function(t,e){const{elementRect:i}=e,n=i.getArea(),s=t.map((t=>new Ls(t,e))).filter((t=>!!t.name));let o=0,r=null;for(const t of s){const{limiterIntersectionArea:e,viewportIntersectionArea:i}=t;if(e===n)return t;const s=i**2+e**2;s>o&&(o=s,r=t)}return r}(i,d)||new Ls(i[0],d)}else c=new Ls(i[0],d);return c}function Fs(t){const{scrollX:e,scrollY:i}=vs.window;return t.clone().moveBy(e,i)}Rs._observerInstance=null,Rs._elementCallbacks=null;class Ls{constructor(t,e){const i=t(e.targetRect,e.elementRect,e.viewportRect);if(!i)return;const{left:n,top:s,name:o,config:r}=i;this.name=o,this.config=r,this._positioningFunctionCorrdinates={left:n,top:s},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;if(t){const e=this._options.viewportRect;if(!e)return t.getIntersectionArea(this._rect);{const i=t.getIntersection(e);if(i)return i.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const t=this._options.viewportRect;return t?t.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Fs(this._rect),this._options.positionedElementAncestor&&function(t,e){const i=Fs(new Ps(e)),n=xs(e);let s=0,o=0;s-=i.left,o-=i.top,s+=e.scrollLeft,o+=e.scrollTop,s-=n.left,o-=n.top,t.moveBy(s,o)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function zs(t){const e=t.parentNode;e&&e.removeChild(t)}function Hs(t,e,i){const n=e.clone().moveBy(0,i),s=e.clone().moveBy(0,-i),o=new Ps(t).excludeScrollbarsAndBorders();if(![s,n].every((t=>o.contains(t)))){let{scrollX:r,scrollY:a}=t;Ws(s,o)?a-=o.top-e.top+i:$s(n,o)&&(a+=e.bottom-o.bottom+i),qs(e,o)?r-=o.left-e.left+i:Us(e,o)&&(r+=e.right-o.right+i),t.scrollTo(r,a)}}function js(t,e){const i=Ks(t);let n,s;for(;t!=i.document.body;)s=e(),n=new Ps(t).excludeScrollbarsAndBorders(),n.contains(s)||(Ws(s,n)?t.scrollTop-=n.top-s.top:$s(s,n)&&(t.scrollTop+=s.bottom-n.bottom),qs(s,n)?t.scrollLeft-=n.left-s.left:Us(s,n)&&(t.scrollLeft+=s.right-n.right)),t=t.parentNode}function $s(t,e){return t.bottom>e.bottom}function Ws(t,e){return t.tope.right}function Ks(t){return As(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function Gs(t){if(As(t)){let e=t.commonAncestorContainer;return ks(e)&&(e=e.parentNode),e}return t.parentNode}function Js(t,e){const i=Ks(t),n=new Ps(t);if(i===e)return n;{let t=i;for(;t!=e;){const e=t.frameElement,i=new Ps(e).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),t=t.parent}}return n}const Qs={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Ys={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},Zs=function(){const t={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;for(const e of"`-=[];',./\\")t[e]=e.charCodeAt(0);return t}(),Xs=Object.fromEntries(Object.entries(Zs).map((([t,e])=>[e,t.charAt(0).toUpperCase()+t.slice(1)])));function to(t){let e;if("string"==typeof t){if(e=Zs[t.toLowerCase()],!e)throw new v("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?Zs.alt:0)+(t.ctrlKey?Zs.ctrl:0)+(t.shiftKey?Zs.shift:0)+(t.metaKey?Zs.cmd:0);return e}function eo(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 to(t.slice(0,-1));const e=to(t);return r.isMac&&e==Zs.ctrl?Zs.cmd:e}(t):t)).reduce(((t,e)=>e+t),0)}function io(t){let e=eo(t);return Object.entries(r.isMac?Qs:Ys).reduce(((t,[i,n])=>(0!=(e&Zs[i])&&(e&=~Zs[i],t+=n),t)),"")+(e?Xs[e]:"")}function no(t,e){const i="ltr"===e;switch(t){case Zs.arrowleft:return i?"left":"right";case Zs.arrowright:return i?"right":"left";case Zs.arrowup:return"up";case Zs.arrowdown:return"down"}}function so(t){return Array.isArray(t)?t:[t]}function oo(t,e,i=1){if("number"!=typeof i)throw new v("translation-service-quantity-not-a-number",null,{quantity:i});const n=Object.keys(vs.window.CKEDITOR_TRANSLATIONS).length;1===n&&(t=Object.keys(vs.window.CKEDITOR_TRANSLATIONS)[0]);const s=e.id||e.string;if(0===n||!function(t,e){return!!vs.window.CKEDITOR_TRANSLATIONS[t]&&!!vs.window.CKEDITOR_TRANSLATIONS[t].dictionary[e]}(t,s))return 1!==i?e.plural:e.string;const o=vs.window.CKEDITOR_TRANSLATIONS[t].dictionary,r=vs.window.CKEDITOR_TRANSLATIONS[t].getPluralForm||(t=>1===t?0:1),a=o[s];if("string"==typeof a)return a;return a[Number(r(i))]}vs.window.CKEDITOR_TRANSLATIONS||(vs.window.CKEDITOR_TRANSLATIONS={});const ro=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function ao(t){return ro.includes(t)?"rtl":"ltr"}class lo{constructor({uiLanguage:t="en",contentLanguage:e}={}){this.uiLanguage=t,this.contentLanguage=e||this.uiLanguage,this.uiLanguageDirection=ao(this.uiLanguage),this.contentLanguageDirection=ao(this.contentLanguage),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=so(e),"string"==typeof t&&(t={string:t});const i=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,((t,i)=>ithis._items.length||e<0)throw new v("collection-add-item-invalid-index",this);let i=0;for(const n of t){const t=this._getItemIdBeforeAdding(n),s=e+i;this._items.splice(s,0,n),this._itemMap.set(t,n),this.fire("add",n,s),i++}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 v("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,i]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:i}),e}map(t,e){return this._items.map(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 v("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,i=(i,n,s)=>{const o=e._bindToCollection==this,r=e._bindToInternalToExternalMap.get(n);if(o&&r)this._bindToExternalToInternalMap.set(n,r),this._bindToInternalToExternalMap.set(r,n);else{const i=t(n);if(!i)return void this._skippedIndexesFromExternal.push(s);let o=s;for(const t of this._skippedIndexesFromExternal)s>t&&o--;for(const t of e._skippedIndexesFromExternal)o>=t&&o++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,o);for(let t=0;t{const n=this._bindToExternalToInternalMap.get(e);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((t,e)=>(ie&&t.push(e),t)),[])}))}_getItemIdBeforeAdding(t){const e=this._idProperty;let i;if(e in t){if(i=t[e],"string"!=typeof i)throw new v("collection-add-invalid-id",this);if(this.get(i))throw new v("collection-add-item-already-exists",this)}else t[e]=i=p();return i}_remove(t){let e,i,n,s=!1;const o=this._idProperty;if("string"==typeof t?(i=t,n=this._itemMap.get(i),s=!n,n&&(e=this._items.indexOf(n))):"number"==typeof t?(e=t,n=this._items[e],s=!n,n&&(i=n[o])):(n=t,i=n[o],e=this._items.indexOf(n),s=-1==e||!this._itemMap.get(i)),s)throw new v("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(i);const r=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(r),this.fire("remove",n,e),[n,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function ho(t){const e=t.next();return e.done?null:e.value}class uo extends(ps(q())){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 v("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 fo{constructor(){this._listener=new(ps())}listenTo(t){this._listener.listenTo(t,"keydown",((t,e)=>{this._listener.fire("_keydown:"+to(e),e)}))}set(t,e,i={}){const n=eo(t),s=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,((t,i)=>{e(i,(()=>{i.preventDefault(),i.stopPropagation(),t.stop()})),t.return=!0}),{priority:s})}press(t){return!!this._listener.fire("_keydown:"+to(t),t)}destroy(){this._listener.stopListening()}}function mo(t){return tt(t)?new Map(t):function(t){const e=new Map;for(const i in t)e.set(i,t[i]);return e}(t)}const go=1e4;function po(t,e){return!!(i=t.charAt(e-1))&&1==i.length&&/[\ud800-\udbff]/.test(i)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var i}function wo(t,e){return!!(i=t.charAt(e))&&1==i.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(i);var i}const bo=function(){const t=/\p{Regional_Indicator}{2}/u.source,e="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((t=>t.source)).join("|")+")";return new RegExp(`${t}|${e}(?:${e})*`,"ug")}();function _o(t,e){const i=String(t).matchAll(bo);return Array.from(i).some((t=>t.index{this._renderViewIntoCollectionParent(e,i)})),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 v("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const i of this)for(const n of t)i.delegate(n).to(e);this.on("add",((i,n)=>{for(const i of t)n.delegate(i).to(e)})),this.on("remove",((i,n)=>{for(const i of t)n.stopDelegating(i,e)}))}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}}class yo extends(ps(q())){constructor(t){super(),this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new co,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((e,i)=>{i.locale=t,i.t=t&&t.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=ko.bind(this,this)}createCollection(t){const e=new vo(t);return this._viewCollections.add(e),e}registerChild(t){tt(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){tt(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new ko(t)}extendTemplate(t){ko.extend(this.template,t)}render(){if(this.isRendered)throw new v("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)}}class ko extends(R()){constructor(t){super(),Object.assign(this,Io(Oo(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 v("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const i of e.children)Fo(i)?yield i:Lo(i)&&(yield*t(i))}(this)}static bind(t,e){return{to:(i,n)=>new xo({eventNameOrFunction:i,attribute:i,observable:t,emitter:e,callback:n}),if:(i,n,s)=>new Co({observable:t,emitter:e,attribute:i,valueIfTrue:n,callback:s})}}static extend(t,e){if(t._isRendered)throw new v("template-extend-render",[this,t]);Bo(t,Io(Oo(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new v("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(""),Po(this.text)?this._bindToObservable({schema:this.text,updater:Eo(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){if(!this.attributes)return;const e=t.node,i=t.revertData;for(const n in this.attributes){const s=e.getAttribute(n),o=this.attributes[n];i&&(i.attributes[n]=s);const r=Ho(o)?o[0].ns:null;if(Po(o)){const a=Ho(o)?o[0].value:o;i&&jo(n)&&a.unshift(s),this._bindToObservable({schema:a,updater:So(e,n,r),data:t})}else if("style"==n&&"string"!=typeof o[0])this._renderStyleAttribute(o[0],t);else{i&&s&&jo(n)&&o.unshift(s);const t=o.map((t=>t&&t.value||t)).reduce(((t,e)=>t.concat(e)),[]).reduce(Mo,"");Do(t)||e.setAttributeNS(r,n,t)}}}_renderStyleAttribute(t,e){const i=e.node;for(const n in t){const s=t[n];Po(s)?this._bindToObservable({schema:[s],updater:Ro(i,n),data:e}):i.style[n]=s}}_renderElementChildren(t){const e=t.node,i=t.intoFragment?document.createDocumentFragment():e,n=t.isApplying;let s=0;for(const o of this.children)if(zo(o)){if(!n){o.setParent(e);for(const t of o)i.appendChild(t.element)}}else if(Fo(o))n||(o.isRendered||o.render(),i.appendChild(o.element));else if(fs(o))i.appendChild(o);else if(n){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),o._renderNode({intoFragment:!1,node:i.childNodes[s++],isApplying:!0,revertData:e})}else i.appendChild(o.render());t.intoFragment&&e.appendChild(i)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const i=this.eventListeners[e].map((i=>{const[n,s]=e.split("@");return i.activateDomEventListener(n,s,t)}));t.revertData&&t.revertData.bindings.push(i)}}_bindToObservable({schema:t,updater:e,data:i}){const n=i.revertData;To(t,e,i);const s=t.filter((t=>!Do(t))).filter((t=>t.observable)).map((n=>n.activateAttributeListener(t,e,i)));n&&n.bindings.push(s)}_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 i=t;for(const t in e.attributes){const n=e.attributes[t];null===n?i.removeAttribute(t):i.setAttribute(t,n)}for(let t=0;tTo(t,e,i);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class xo extends Ao{constructor(t){super(t),this.eventNameOrFunction=t.eventNameOrFunction}activateDomEventListener(t,e,i){const n=(t,i)=>{e&&!i.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(i):this.observable.fire(this.eventNameOrFunction,i))};return this.emitter.listenTo(i.node,t,n),()=>{this.emitter.stopListening(i.node,t,n)}}}class Co extends Ao{constructor(t){super(t),this.valueIfTrue=t.valueIfTrue}getValue(t){return!Do(super.getValue(t))&&(this.valueIfTrue||!0)}}function Po(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(Po):t instanceof Ao)}function To(t,e,{node:i}){const n=function(t,e){return t.map((t=>t instanceof Ao?t.getValue(e):t))}(t,i);let s;s=1==t.length&&t[0]instanceof Co?n[0]:n.reduce(Mo,""),Do(s)?e.remove():e.set(s)}function Eo(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function So(t,e,i){return{set(n){t.setAttributeNS(i,e,n)},remove(){t.removeAttributeNS(i,e)}}}function Ro(t,e){return{set(i){t.style[e]=i},remove(){t.style[e]=null}}}function Oo(t){return ls(t,(t=>{if(t&&(t instanceof Ao||Lo(t)||Fo(t)||zo(t)))return t}))}function Io(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=so(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)Vo(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=so(t[e].value)),Vo(t,e)}(t.attributes);const e=[];if(t.children)if(zo(t.children))e.push(t.children);else for(const i of t.children)Lo(i)||Fo(i)||fs(i)?e.push(i):e.push(new ko(i));t.children=e}return t}function Vo(t,e){t[e]=so(t[e])}function Mo(t,e){return Do(e)?t:Do(t)?e:`${t} ${e}`}function No(t,e){for(const i in e)t[i]?t[i].push(...e[i]):t[i]=e[i]}function Bo(t,e){if(e.attributes&&(t.attributes||(t.attributes={}),No(t.attributes,e.attributes)),e.eventListeners&&(t.eventListeners||(t.eventListeners={}),No(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 v("ui-template-extend-children-mismatch",t);let i=0;for(const n of e.children)Bo(t.children[i++],n)}}function Do(t){return!t&&0!==t}function Fo(t){return t instanceof yo}function Lo(t){return t instanceof ko}function zo(t){return t instanceof vo}function Ho(t){return F(t[0])&&t[0].ns}function jo(t){return"class"==t||"style"==t}class $o extends vo{constructor(t,e=[]){super(e),this.locale=t}attachToDom(){this._bodyCollectionContainer=new ko({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=vt(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()}}class Wo extends yo{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","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:i}of Array.from(t.attributes))Wo.presentationalAttributeNames.includes(e)&&this.element.setAttribute(e,i);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}))}}Wo.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 qo extends yo{constructor(t){super(t);const e=this.bindTemplate,i=p();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("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._createLabelView(i),this.iconView=new Wo,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 n={tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",(t=>!t)),e.if("isVisible","ck-hidden",(t=>!t)),e.to("isOn",(t=>t?"ck-on":"ck-off")),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],type:e.to("type",(t=>t||"button")),tabindex:e.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${i}`,"aria-disabled":e.if("isEnabled",!0,(t=>!t)),"aria-pressed":e.to("isOn",(t=>!!this.isToggleable&&String(!!t))),"data-cke-tooltip-text":e.to("_tooltipString"),"data-cke-tooltip-position":e.to("tooltipPosition")},children:this.children,on:{click:e.to((t=>{this.isEnabled?this.fire("execute"):t.preventDefault()}))}};r.isSafari&&(n.on.mousedown=e.to((t=>{this.focus(),t.preventDefault()}))),this.setTemplate(n)}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()}_createLabelView(t){const e=new yo,i=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:i.to("labelStyle"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to("label")}]}),e}_createKeystrokeView(){const t=new yo;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(t=>io(t)))}]}),t}_getTooltipString(t,e,i){return t?"string"==typeof t?t:(i&&(i=io(i)),t instanceof Function?t(e,i):`${e}${i?` (${i})`:""}`):""}}class Uo extends qo{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 yo;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}function Ko(t){return"string"==typeof t?{model:t,label:t,hasBorder:!1,view:{name:"span",styles:{color:t}}}:{model:t.color,label:t.label||t.color,hasBorder:void 0!==t.hasBorder&&t.hasBorder,view:{name:"span",styles:{color:`${t.color}`}}}}class Go extends qo{constructor(t){super(t);const e=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:e.to("color")},class:["ck","ck-color-grid__tile",e.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class Jo extends yo{constructor(t,e){super(t);const i=e&&e.colorDefinitions||[];this.columns=e&&e.columns?e.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new uo,this.keystrokes=new fo,this.items.on("add",((t,e)=>{e.isOn=e.color===this.selectedColor})),i.forEach((t=>{const e=new Go;e.set({color:t.color,label:t.label,tooltip:!0,hasBorder:t.options.hasBorder}),e.on("execute",(()=>{this.fire("execute",{value:t.color,hasBorder:t.options.hasBorder,label:t.label})})),this.items.add(e)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",((t,e,i)=>{for(const t of this.items)t.isOn=t.color===i}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();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),n({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}class Qo{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(Yo(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new v("componentfactory-item-missing",this,{name:t});return this._components.get(Yo(t)).callback(this.editor.locale)}has(t){return this._components.has(Yo(t))}}function Yo(t){return String(t).toLowerCase()}class Zo extends yo{constructor(t,e,i){super(t);const n=this.bindTemplate;this.buttonView=e,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new fo,this.focusTracker=new uo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",(t=>!t))],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[e,i]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((t,e,i)=>{i&&("auto"===this.panelPosition?this.panelView.position=Zo._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name: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:i,southWest:n,northEast:s,northWest:o,southMiddleEast:r,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Zo.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[i,n,r,a,t,s,o,l,c,e]:[n,i,a,r,t,o,s,c,l,e]}}Zo.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"})},Zo._getOptimalPosition=Ds;const Xo='';class tr extends qo{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 Wo;return t.content=Xo,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}class er extends yo{constructor(t){super(t);const e=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(),this.arrowView=this._createArrowView(),this.keystrokes=new fo,this.focusTracker=new uo,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",e.to("class"),e.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(){const t=new qo;return t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const t=new qo,e=t.bindTemplate;return t.icon=Xo,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}}class ir extends yo{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")]},children:this.children,on:{selectstart:e.to((t=>t.preventDefault()))}})}focus(){if(this.children.length){const t=this.children.first;"function"==typeof t.focus?t.focus():y("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()}}}class nr{constructor(t){if(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 i=t.actions[e];"string"==typeof i&&(i=[i]);for(const n of i)t.keystrokeHandler.set(n,((t,i)=>{this[e](),i()}))}}get first(){return this.focusables.find(sr)||null}get last(){return this.focusables.filter(sr).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((e,i)=>{const n=e.element===this.focusTracker.focusedElement;return n&&(t=i),n})),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,i=this.focusables.length;if(!i)return null;if(null===e)return this[1===t?"first":"last"];let n=(e+i+t)%i;do{const e=this.focusables.get(n);if(sr(e))return e;n=(n+i+t)%i}while(n!==e);return null}}function sr(t){return!(!t.focus||!Bs(t.element))}class or extends yo{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class rr extends yo{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function ar(t){return Array.isArray(t)?{items:t,removeItems:[]}:t?Object.assign({items:[],removeItems:[]},t):{items:[],removeItems:[]}}class lr extends(q()){constructor(t){super(),this.editor=t,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",cr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",cr),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function cr(t){t.return=!1,t.stop()}class hr extends(q()){constructor(t){super(),this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(t=>{this.isEnabled||t.stop()}),{priority:"high"}),this.listenTo(t,"change:isReadOnly",((t,e,i)=>{i&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}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",dr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",dr),this.refresh())}execute(...t){}destroy(){this.stopListening()}}function dr(t){t.return=!1,t.stop()}class ur extends hr{constructor(t){super(t),this._childCommandsDefinitions=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();return!!e&&e.execute(t)}registerChildCommand(t,e={}){b(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 fr extends(R()){constructor(t,e=[],i=[]){super(),this._context=t,this._plugins=new Map,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 i)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 v("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],i=[]){const n=this,s=this._context;!function t(e,i=new Set){e.forEach((e=>{a(e)&&(i.has(e)||(i.add(e),e.pluginName&&!n._availablePlugins.has(e.pluginName)&&n._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,i)))}))}(t),d(t);const o=[...function t(e,i=new Set){return e.map((t=>a(t)?t:n._availablePlugins.get(t))).reduce(((e,n)=>i.has(n)?e:(i.add(n),n.requires&&(d(n.requires,n),t(n.requires,i).forEach((t=>e.add(t)))),e.add(n))),new Set)}(t.filter((t=>!c(t,e))))];!function(t,e){for(const i of e){if("function"!=typeof i)throw new v("plugincollection-replace-plugin-invalid-type",null,{pluginItem:i});const e=i.pluginName;if(!e)throw new v("plugincollection-replace-plugin-missing-name",null,{pluginItem:i});if(i.requires&&i.requires.length)throw new v("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const s=n._availablePlugins.get(e);if(!s)throw new v("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const o=t.indexOf(s);if(-1===o){if(n._contextPlugins.has(s))return;throw new v("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(s.requires&&s.requires.length)throw new v("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(o,1,i),n._availablePlugins.set(e,i)}}(o,i);const r=function(t){return t.map((t=>{let e=n._contextPlugins.get(t);return e=e||new t(s),n._add(t,e),e}))}(o);return u(r,"init").then((()=>u(r,"afterInit"))).then((()=>r));function a(t){return"function"==typeof t}function l(t){return a(t)&&t.isContextPlugin}function c(t,e){return e.some((e=>e===t||(h(t)===e||h(e)===t)))}function h(t){return a(t)?t.pluginName||t.name:t}function d(t,i=null){t.map((t=>a(t)?t:n._availablePlugins.get(t)||t)).forEach((t=>{!function(t,e){if(a(t))return;if(e)throw new v("plugincollection-soft-required",s,{missingPlugin:t,requiredBy:h(e)});throw new v("plugincollection-plugin-not-found",s,{plugin:t})}(t,i),function(t,e){if(!l(e))return;if(l(t))return;throw new v("plugincollection-context-required",s,{plugin:h(t),requiredBy:h(e)})}(t,i),function(t,i){if(!i)return;if(!c(t,e))return;throw new v("plugincollection-required",s,{plugin:h(t),requiredBy:h(i)})}(t,i)}))}function u(t,e){return t.reduce(((t,i)=>i[e]?n._contextPlugins.has(i)?t:t.then(i[e].bind(i)):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 i=t.pluginName;if(i){if(this._plugins.has(i))throw new v("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:t});this._plugins.set(i,e)}}}class mr{constructor(t){this.config=new hs(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define("plugins",e),this.plugins=new fr(this,e);const i=this.config.get("language")||{};this.locale=new lo({uiLanguage:"string"==typeof i?i:i.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new co,this._contextOwner=null}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const i of t.concat(e)){if("function"!=typeof i)throw new v("context-initplugins-constructor-only",null,{Plugin:i});if(!0!==i.isContextPlugin)throw new v("context-initplugins-invalid-plugin",null,{Plugin:i})}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 v("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 i=new this(t);e(i.initPlugins().then((()=>i)))}))}}class gr extends(q()){constructor(t){super(),this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}const pr=new WeakMap;function wr(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function br(t,e){const i=pr.get(t),n=[];let s=!1;for(const[t,o]of i)o.isDirectHost&&(n.push(t),_r(e,t,o)&&(s=!0));for(const[t,o]of i){if(o.isDirectHost)continue;const i=vr(t);i&&(n.includes(i)||(o.hostElement=i,_r(e,t,o)&&(s=!0)))}return s}function _r(t,e,i){const{text:n,isDirectHost:s,hostElement:o}=i;let r=!1;o.getAttribute("data-placeholder")!==n&&(t.setAttribute("data-placeholder",n,o),r=!0);return(s||1==e.childCount)&&function(t,e){if(!t.isAttached())return!1;const i=Array.from(t.getChildren()).some((t=>!t.is("uiElement")));if(i)return!1;const n=t.document,s=n.selection.anchor;return!(n.isComposing&&s&&s.parent===t||!e&&n.isFocused&&(!s||s.parent===t))}(o,i.keepOnFocus)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,o)&&(r=!0):wr(t,o)&&(r=!0),r}function vr(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement")&&!e.is("attributeElement"))return e}return null}class yr{is(){throw new Error("is() method is abstract")}}var kr=4;const Ar=function(t){return os(t,kr)};class xr extends(R(yr)){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 v("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 i=t.includeSelf?this:this.parent;for(;i;)e[t.parentFirst?"push":"unshift"](i),i=i.parent;return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e),n=t.getAncestors(e);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),i=t.getPath(),n=X(e,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return e[n]t.data.length)throw new v("view-textproxy-wrong-offsetintext",this);if(i<0||e+i>t.data.length)throw new v("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+i),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 i=t.includeSelf?this.textNode:this.parent;for(;null!==i;)e[t.parentFirst?"push":"unshift"](i),i=i.parent;return e}}Pr.prototype.is=function(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t};class Tr{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 i=Er(e,t);if(i)return{element:e,pattern:t,match:i}}return null}matchAll(...t){const e=[];for(const i of t)for(const t of this._patterns){const n=Er(i,t);n&&e.push({element:i,pattern:t,match:n})}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 Er(t,e){if("function"==typeof e)return e(t);const i={};return e.name&&(i.name=function(t,e){if(t instanceof RegExp)return!!e.match(t);return t===e}(e.name,t.name),!i.name)||e.attributes&&(i.attributes=function(t,e){const i=new Set(e.getAttributeKeys());St(t)?(void 0!==t.style&&y("matcher-pattern-deprecated-attributes-style-key",t),void 0!==t.class&&y("matcher-pattern-deprecated-attributes-class-key",t)):(i.delete("style"),i.delete("class"));return Sr(t,i,(t=>e.getAttribute(t)))}(e.attributes,t),!i.attributes)||e.classes&&(i.classes=function(t,e){return Sr(t,e.getClassNames(),(()=>{}))}(e.classes,t),!i.classes)||e.styles&&(i.styles=function(t,e){return Sr(t,e.getStyleNames(!0),(t=>e.getStyle(t)))}(e.styles,t),!i.styles)?null:i}function Sr(t,e,i){const n=function(t){if(Array.isArray(t))return t.map((t=>St(t)?(void 0!==t.key&&void 0!==t.value||y("matcher-pattern-missing-key-or-value",t),[t.key,t.value]):[t,!0]));if(St(t))return Object.entries(t);return[[t,!0]]}(t),s=Array.from(e),o=[];if(n.forEach((([t,e])=>{s.forEach((n=>{(function(t,e){return!0===t||t===e||t instanceof RegExp&&e.match(t)})(t,n)&&function(t,e,i){if(!0===t)return!0;const n=i(e);return t===n||t instanceof RegExp&&!!String(n).match(t)}(e,n,i)&&o.push(n)}))})),n.length&&!(o.lengths?0:s+e),(i=i>s?s:i)<0&&(i+=s),s=e>i?0:i-e>>>0,e>>>=0;for(var o=Array(s);++n0){if(++e>=ba)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const ka=ya(wa);const Aa=function(t,e){return ka(ga(t,e,ua),t+"")};const xa=function(t,e,i){if(!F(i))return!1;var n=typeof e;return!!("number"==n?vi(i)&&ei(e,i.length):"string"==n&&e in i)&&Ot(i[e],t)};const Ca=function(t){return Aa((function(e,i){var n=-1,s=i.length,o=s>1?i[s-1]:void 0,r=s>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(s--,o):void 0,r&&xa(i[0],i[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++ne===t));return Array.isArray(e)}set(t,e){if(F(t))for(const[e,i]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,i,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=Oa(t);na(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]&&!F(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 i of e)t.push(...this._styleProcessor.getReducedForm(i,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const i=e.splice(0,e.length-1).join("."),n=sa(this._styles,i);if(!n)return;!Array.from(Object.keys(n)).length&&this.remove(i)}}class Ra{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,i){if(F(e))Ia(i,Oa(t),e);else if(this._normalizers.has(t)){const n=this._normalizers.get(t),{path:s,value:o}=n(e);Ia(i,s,o)}else Ia(i,t,e)}getNormalized(t,e){if(!t)return Pa({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const i=this._extractors.get(t);if("string"==typeof i)return sa(e,i);const n=i(t,e);if(n)return n}return sa(e,Oa(t))}getReducedForm(t,e){const i=this.getNormalized(t,e);if(void 0===i)return[];if(this._reducers.has(t)){return this._reducers.get(t)(i)}return[[t,i]]}getStyleNames(t){const e=Array.from(this._consumables.keys()).filter((e=>{const i=this.getNormalized(e,t);return i&&"object"==typeof i?Object.keys(i).length:i})),i=new Set([...e,...Object.keys(t)]);return Array.from(i.values())}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 i of e)this._mapStyleNames(i,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function Oa(t){return t.replace("-",".")}function Ia(t,e,i){let n=i;F(i)&&(n=Pa({},sa(t,e),i)),Ea(t,e,n)}class Va extends xr{constructor(t,e,i,n){if(super(t),this.name=e,this._attrs=function(t){const e=mo(t);for(const[t,i]of e)null===i?e.delete(t):"string"!=typeof i&&e.set(t,String(i));return e}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");Ma(this._classes,t),this._attrs.delete("class")}this._styles=new Sa(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}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 Va))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,i]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==i)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 Tr(...t);let i=this.parent;for(;i&&!i.is("documentFragment");){if(e.match(i))return i;i=i.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(),i=Array.from(this._attrs).map((t=>`${t[0]}="${t[1]}"`)).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(t){return this._unsafeAttributesToRender.includes(t)}_clone(t=!1){const e=[];if(t)for(const i of this.getChildren())e.push(i._clone(t));const i=new this.constructor(this.document,this.name,this._attrs,e);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let i=0;const n=function(t,e){if("string"==typeof e)return[new Cr(t,e)];tt(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Cr(t,e):e instanceof Pr?new Cr(t,e.data):e))}(this.document,e);for(const e of n)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,i++;return i}_removeChildren(t,e=1){this._fireChange("children",this);for(let i=t;i0&&(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 so(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of so(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),St(t)?this._styles.set(t):this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of so(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Ma(t,e){const i=e.split(/\s+/);t.clear(),i.forEach((e=>t.add(e)))}Va.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 Na extends Va{constructor(...t){super(...t),this.getFillerOffset=Ba}}function Ba(){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}Na.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 Da extends(q(Na)){constructor(...t){super(...t);const e=t[0];this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}Da.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 Fa=Symbol("rootName");class La extends Da{constructor(t,e){super(t,e),this.rootName="main"}get rootName(){return this.getCustomProperty(Fa)}set rootName(t){this._setCustomProperty(Fa,t)}set _name(t){this.name=t}}La.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 za{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new v("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new v("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=Ha._createAt(t.startPosition):this.position=Ha._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}skip(t){let e,i,n;do{n=this.position,({done:e,value:i}=this.next())}while(!e&&t(i));e||(this.position=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,i=t.parent;if(null===i.parent&&t.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(i instanceof Cr){if(t.isAtEnd)return this.position=Ha._createAfter(i),this._next();n=i.data[t.offset]}else n=i.getChild(t.offset);if(n instanceof Va)return this.shallow?t.offset++:t=new Ha(n,0),this.position=t,this._formatReturnValue("elementStart",n,e,t,1);if(n instanceof Cr){if(this.singleCharacters)return t=new Ha(n,0),this.position=t,this._next();{let i,s=n.data.length;return n==this._boundaryEndParent?(s=this.boundaries.end.offset,i=new Pr(n,0,s),t=Ha._createAfter(i)):(i=new Pr(n,0,n.data.length),t.offset++),this.position=t,this._formatReturnValue("text",i,e,t,s)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-t.offset}const s=new Pr(i,t.offset,n);return t.offset+=n,this.position=t,this._formatReturnValue("text",s,e,t,n)}return t=Ha._createAfter(i),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,e,t)}_previous(){let t=this.position.clone();const e=this.position,i=t.parent;if(null===i.parent&&0===t.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(i instanceof Cr){if(t.isAtStart)return this.position=Ha._createBefore(i),this._previous();n=i.data[t.offset-1]}else n=i.getChild(t.offset-1);if(n instanceof Va)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",n,e,t,1)):(t=new Ha(n,n.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,e,t));if(n instanceof Cr){if(this.singleCharacters)return t=new Ha(n,n.data.length),this.position=t,this._previous();{let i,s=n.data.length;if(n==this._boundaryStartParent){const e=this.boundaries.start.offset;i=new Pr(n,e,n.data.length-e),s=i.data.length,t=Ha._createBefore(i)}else i=new Pr(n,0,n.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",i,e,t,s)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const e=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=t.offset-e}t.offset-=n;const s=new Pr(i,t.offset,n);return this.position=t,this._formatReturnValue("text",s,e,t,n)}return t=Ha._createBefore(i),this.position=t,this._formatReturnValue("elementStart",i,e,t,1)}_formatReturnValue(t,e,i,n,s){return e instanceof Pr&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=Ha._createAfter(e.textNode):(n=Ha._createAfter(e.textNode),this.position=n)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=Ha._createBefore(e.textNode):(n=Ha._createBefore(e.textNode),this.position=n))),{done:!1,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:s}}}}class Ha extends yr{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 Da);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=Ha._createAt(this),i=e.offset+t;return e.offset=i<0?0:i,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const i=new za(e);return i.skip(t),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),i=t.getAncestors();let n=0;for(;e[n]==i[n]&&e[n];)n++;return 0===n?null:e[n-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():[],i=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),i.push(t.offset);const n=X(e,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return e[n]0?new this(i,n):new this(n,i)}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(Ha._createBefore(t),e)}}function $a(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}ja.prototype.is=function(t){return"range"===t||"view:range"===t};class Wa extends(R(yr)){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 i=!1;for(const n of t._ranges)if(e.isEqual(n)){i=!0;break}if(!i)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=Z(this.getRanges());if(e!=Z(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let i=!1;for(let n of t.getRanges())if(n=n.getTrimmed(),e.start.isEqual(n.start)&&e.end.isEqual(n.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...t){let[e,i,n]=t;if("object"==typeof i&&(n=i,i=void 0),null===e)this._setRanges([]),this._setFakeOptions(n);else if(e instanceof Wa||e instanceof qa)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof ja)this._setRanges([e],n&&n.backward),this._setFakeOptions(n);else if(e instanceof Ha)this._setRanges([new ja(e)]),this._setFakeOptions(n);else if(e instanceof xr){const t=!!n&&!!n.backward;let s;if(void 0===i)throw new v("view-selection-setto-required-second-parameter",this);s="in"==i?ja._createIn(e):"on"==i?ja._createOn(e):new ja(Ha._createAt(e,i)),this._setRanges([s],t),this._setFakeOptions(n)}else{if(!tt(e))throw new v("view-selection-setto-not-selectable",this);this._setRanges(e,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new v("view-selection-setfocus-no-ranges",this);const i=Ha._createAt(t,e);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==i.compareWith(n)?this._addRange(new ja(i,n),!0):this._addRange(new ja(n,i)),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 ja))throw new v("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 v("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new ja(t.start,t.end))}}Wa.prototype.is=function(t){return"selection"===t||"view:selection"===t};class qa extends(R(yr)){constructor(...t){super(),this._selection=new Wa,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)}}qa.prototype.is=function(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t};class Ua extends m{constructor(t,e,i){super(t,e),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Ka=Symbol("bubbling contexts");function Ga(t){return class extends t{fire(t,...e){try{const i=t instanceof m?t:new m(this,t),n=Za(this);if(!n.size)return;if(Ja(i,"capturing",this),Qa(n,"$capture",i,...e))return i.return;const s=i.startRange||this.selection.getFirstRange(),o=s?s.getContainedElement():null,r=!!o&&Boolean(Ya(n,o));let a=o||function(t){if(!t)return null;const e=t.start.parent,i=t.end.parent,n=e.getPath(),s=i.getPath();return n.length>s.length?e:i}(s);if(Ja(i,"atTarget",a),!r){if(Qa(n,"$text",i,...e))return i.return;Ja(i,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Qa(n,"$root",i,...e))return i.return}else if(a.is("element")&&Qa(n,a.name,i,...e))return i.return;if(Qa(n,a,i,...e))return i.return;a=a.parent,Ja(i,"bubbling",a)}return Ja(i,"bubbling",this),Qa(n,"$document",i,...e),i.return}catch(t){v.rethrowUnexpectedError(t,this)}}_addEventListener(t,e,i){const n=so(i.context||"$document"),s=Za(this);for(const o of n){let n=s.get(o);n||(n=new(R()),s.set(o,n)),this.listenTo(n,t,e,i)}}_removeEventListener(t,e){const i=Za(this);for(const n of i.values())this.stopListening(n,t,e)}}}{const t=Ga(Object);["fire","_addEventListener","_removeEventListener"].forEach((e=>{Ga[e]=t.prototype[e]}))}function Ja(t,e,i){t instanceof Ua&&(t._eventPhase=e,t._currentTarget=i)}function Qa(t,e,i,...n){const s="string"==typeof e?t.get(e):Ya(t,e);return!!s&&(s.fire(i,...n),i.stop.called)}function Ya(t,e){for(const[i,n]of t)if("function"==typeof i&&i(e))return n;return null}function Za(t){return t[Ka]||(t[Ka]=new Map),t[Ka]}class Xa extends(Ga(q())){constructor(t){super(),this.selection=new qa,this.roots=new co({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map((t=>t.destroy())),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const i of this._postFixers)if(e=i(t),e)break}while(e)}}class tl extends Va{constructor(...t){super(...t),this.getFillerOffset=el,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new v("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 el(){if(il(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(il(t)>1)return null;t=t.parent}return!t||il(t)>1?null:this.childCount}function il(t){return Array.from(t.getChildren()).filter((t=>!t.is("uiElement"))).length}tl.DEFAULT_PRIORITY=10,tl.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 nl extends Va{constructor(t,e,i,n){super(t,e,i,n),this.getFillerOffset=sl}_insertChild(t,e){if(e&&(e instanceof xr||Array.from(e).length>0))throw new v("view-emptyelement-cannot-add",[this,e]);return 0}}function sl(){return null}nl.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 ol extends Va{constructor(...t){super(...t),this.getFillerOffset=al}_insertChild(t,e){if(e&&(e instanceof xr||Array.from(e).length>0))throw new v("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 rl(t){t.document.on("arrowKey",((e,i)=>function(t,e,i){if(e.keyCode==Zs.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),n=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(n||e.shiftKey){const e=t.focusNode,s=t.focusOffset,o=i.domPositionToView(e,s);if(null===o)return;let r=!1;const a=o.getLastMatchingPosition((t=>(t.item.is("uiElement")&&(r=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement")))));if(r){const e=i.viewPositionToDom(a);n?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,i,t.domConverter)),{priority:"low"})}function al(){return null}ol.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 ll extends Va{constructor(...t){super(...t),this.getFillerOffset=cl}_insertChild(t,e){if(e&&(e instanceof xr||Array.from(e).length>0))throw new v("view-rawelement-cannot-add",[this,e]);return 0}render(){}}function cl(){return null}ll.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 hl extends(R(yr)){constructor(t,e){super(),this.document=t,this._children=[],e&&this._insertChild(0,e),this._customProperties=new Map}[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}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 i=0;const n=function(t,e){if("string"==typeof e)return[new Cr(t,e)];tt(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Cr(t,e):e instanceof Pr?new Cr(t,e.data):e))}(this.document,e);for(const e of n)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,i++;return i}_removeChildren(t,e=1){this._fireChange("children",this);for(let i=t;i{const i=t[t.length-1],n=!e.is("uiElement");return i&&i.breakAttributes==n?i.nodes.push(e):t.push({breakAttributes:n,nodes:[e]}),t}),[]);let n=null,s=t;for(const{nodes:t,breakAttributes:e}of i){const i=this._insertNodes(s,t,e);n||(n=i.start),s=i.end}return n?new ja(n,s):new ja(t)}remove(t){const e=t instanceof ja?t:ja._createOn(t);if(vl(e,this.document),e.isCollapsed)return new hl(this.document);const{start:i,end:n}=this._breakAttributesRange(e,!0),s=i.parent,o=n.offset-i.offset,r=s._removeChildren(i.offset,o);for(const t of r)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(i);return e.start=a,e.end=a.clone(),new hl(this.document,r)}clear(t,e){vl(t,this.document);const i=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of i){const i=n.item;let s;if(i.is("element")&&e.isSimilar(i))s=ja._createOn(i);else if(!n.nextPosition.isAfter(t.start)&&i.is("$textProxy")){const t=i.getAncestors().find((t=>t.is("element")&&e.isSimilar(t)));t&&(s=ja._createIn(t))}s&&(s.end.isAfter(t.end)&&(s.end=t.end),s.start.isBefore(t.start)&&(s.start=t.start),this.remove(s))}}move(t,e){let i;if(e.isAfter(t.end)){const n=(e=this._breakAttributes(e,!0)).parent,s=n.childCount;t=this._breakAttributesRange(t,!0),i=this.remove(t),e.offset+=n.childCount-s}else i=this.remove(t);return this.insert(e,i)}wrap(t,e){if(!(e instanceof tl))throw new v("view-writer-wrap-invalid-attribute",this.document);if(vl(t,this.document),t.isCollapsed){let n=t.start;n.parent.is("element")&&(i=n.parent,!Array.from(i.getChildren()).some((t=>!t.is("uiElement"))))&&(n=n.getLastMatchingPosition((t=>t.item.is("uiElement")))),n=this._wrapPosition(n,e);const s=this.document.selection;return s.isCollapsed&&s.getFirstPosition().isEqual(t.start)&&this.setSelection(n),new ja(n)}return this._wrapRange(t,e);var i}unwrap(t,e){if(!(e instanceof tl))throw new v("view-writer-unwrap-invalid-attribute",this.document);if(vl(t,this.document),t.isCollapsed)return t;const{start:i,end:n}=this._breakAttributesRange(t,!0),s=i.parent,o=this._unwrapChildren(s,i.offset,n.offset,e),r=this.mergeAttributes(o.start);r.isEqual(o.start)||o.end.offset--;const a=this.mergeAttributes(o.end);return new ja(r,a)}rename(t,e){const i=new Na(this.document,t,e.getAttributes());return this.insert(Ha._createAfter(e),i),this.move(ja._createIn(e),Ha._createAt(i,0)),this.remove(ja._createOn(e)),i}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return Ha._createAt(t,e)}createPositionAfter(t){return Ha._createAfter(t)}createPositionBefore(t){return Ha._createBefore(t)}createRange(...t){return new ja(...t)}createRangeOn(t){return ja._createOn(t)}createRangeIn(t){return ja._createIn(t)}createSelection(...t){return new Wa(...t)}createSlot(t){if(!this._slotFactory)throw new v("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,i){let n,s;if(n=i?ul(t):t.parent.is("$text")?t.parent.parent:t.parent,!n)throw new v("view-writer-invalid-position-container",this.document);s=i?this._breakAttributes(t,!0):t.parent.is("$text")?gl(t):t;const o=n._insertChild(s.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const r=s.getShiftedBy(o),a=this.mergeAttributes(s);a.isEqual(s)||r.offset--;const l=this.mergeAttributes(r);return new ja(a,l)}_wrapChildren(t,e,i,n){let s=e;const o=[];for(;s!1,t.parent._insertChild(t.offset,i);const n=new ja(t,t.getShiftedBy(1));this.wrap(n,e);const s=new Ha(i.parent,i.index);i._remove();const o=s.nodeBefore,r=s.nodeAfter;return o instanceof Cr&&r instanceof Cr?pl(o,r):ml(s)}_wrapAttributeElement(t,e){if(!yl(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const i of t.getAttributeKeys())if("class"!==i&&"style"!==i&&e.hasAttribute(i)&&e.getAttribute(i)!==t.getAttribute(i))return!1;for(const i of t.getStyleNames())if(e.hasStyle(i)&&e.getStyle(i)!==t.getStyle(i))return!1;for(const i of t.getAttributeKeys())"class"!==i&&"style"!==i&&(e.hasAttribute(i)||this.setAttribute(i,t.getAttribute(i),e));for(const i of t.getStyleNames())e.hasStyle(i)||this.setStyle(i,t.getStyle(i),e);for(const i of t.getClassNames())e.hasClass(i)||this.addClass(i,e);return!0}_unwrapAttributeElement(t,e){if(!yl(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const i of t.getAttributeKeys())if("class"!==i&&"style"!==i&&(!e.hasAttribute(i)||e.getAttribute(i)!==t.getAttribute(i)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const i of t.getStyleNames())if(!e.hasStyle(i)||e.getStyle(i)!==t.getStyle(i))return!1;for(const i of t.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const i=t.start,n=t.end;if(vl(t,this.document),t.isCollapsed){const i=this._breakAttributes(t.start,e);return new ja(i,i)}const s=this._breakAttributes(n,e),o=s.parent.childCount,r=this._breakAttributes(i,e);return s.offset+=s.parent.childCount-o,new ja(r,s)}_breakAttributes(t,e=!1){const i=t.offset,n=t.parent;if(t.parent.is("emptyElement"))throw new v("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new v("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new v("view-writer-cannot-break-raw-element",this.document);if(!e&&n.is("$text")&&_l(n.parent))return t.clone();if(_l(n))return t.clone();if(n.is("$text"))return this._breakAttributes(gl(t),e);if(i==n.childCount){const t=new Ha(n.parent,n.index+1);return this._breakAttributes(t,e)}if(0===i){const t=new Ha(n.parent,n.index);return this._breakAttributes(t,e)}{const t=n.index+1,s=n._clone();n.parent._insertChild(t,s),this._addToClonedElementsGroup(s);const o=n.childCount-i,r=n._removeChildren(i,o);s._appendChild(r);const a=new Ha(n.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 i=this._cloneGroups.get(e);i||(i=new Set,this._cloneGroups.set(e,i)),i.add(t),t._clonesGroup=i}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const i=this._cloneGroups.get(e);i&&i.delete(t)}}function ul(t){let e=t.parent;for(;!_l(e);){if(!e)return;e=e.parent}return e}function fl(t,e){return t.prioritye.priority)&&t.getIdentity()i instanceof t)))throw new v("view-writer-insert-invalid-node-type",e);i.is("$text")||bl(i.getChildren(),e)}}function _l(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function vl(t,e){const i=ul(t.start),n=ul(t.end);if(!i||!n||i!==n)throw new v("view-writer-invalid-range-container",e)}function yl(t,e){return null===t.id&&null===e.id}const kl=t=>t.createTextNode(" "),Al=t=>{const e=t.createElement("span");return e.dataset.ckeFiller="true",e.innerText=" ",e},xl=t=>{const e=t.createElement("br");return e.dataset.ckeFiller="true",e},Cl=7,Pl="".repeat(Cl);function Tl(t){return ks(t)&&t.data.substr(0,Cl)===Pl}function El(t){return t.data.length==Cl&&Tl(t)}function Sl(t){return Tl(t)?t.data.slice(Cl):t.data}function Rl(t,e){if(e.keyCode==Zs.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,i=t.getRangeAt(0).startOffset;Tl(e)&&i<=Cl&&t.collapse(e,0)}}}class Ol extends(q()){constructor(t,e){super(),this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.set("isFocused",!1),this.set("isSelecting",!1),r.isBlink&&!r.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()})),this._inlineFiller=null,this._fakeSelectionContainer=null}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 v("view-renderer-unknown-type",this);this.markedChildren.add(e)}}}render(){if(this.isComposing&&!r.isAndroid)return;let t=null;const e=!(r.isBlink&&!r.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=Ha._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),i=e.parent.ownerDocument;Tl(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=Il(i,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){if(!this.domConverter.mapViewToDom(t))return;const e=Array.from(this.domConverter.mapViewToDom(t).childNodes),i=Array.from(this.domConverter.viewChildrenToDom(t,{withChildren:!1})),n=this._diffNodeLists(e,i),s=this._findReplaceActions(n,e,i);if(-1!==s.indexOf("replace")){const n={equal:0,insert:0,delete:0};for(const o of s)if("replace"===o){const s=n.equal+n.insert,o=n.equal+n.delete,r=t.getChild(s);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,e[o]),zs(i[s]),n.equal++}else n[o]++}}_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")?Ha._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&&ks(e.parent)&&Tl(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!Tl(t))throw new v("view-renderer-filler-was-lost",this);El(t)?t.remove():t.data=t.data.substr(Cl),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,i=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(i===e.getFillerOffset())return!1;const n=t.nodeBefore,s=t.nodeAfter;return!(n instanceof Cr||s instanceof Cr)&&(!r.isAndroid||!n&&!s)}_updateText(t,e){const i=this.domConverter.findCorrespondingDomText(t);let n=this.domConverter.viewToDom(t).data;const s=e.inlineFillerPosition;s&&s.parent==t.parent&&s.offset==t.index&&(n=Pl+n),Bl(i,n)}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const i=Array.from(e.attributes).map((t=>t.name)),n=t.getAttributeKeys();for(const i of n)this.domConverter.setDomElementAttribute(e,i,t.getAttribute(i),t);for(const n of i)t.hasAttribute(n)||this.domConverter.removeDomElementAttribute(e,n)}_updateChildren(t,e){const i=this.domConverter.mapViewToDom(t);if(!i)return;if(r.isAndroid){let t=null;for(const e of Array.from(i.childNodes)){if(t&&ks(t)&&ks(e)){i.normalize();break}t=e}}const n=e.inlineFillerPosition,s=i.childNodes,o=Array.from(this.domConverter.viewChildrenToDom(t,{bind:!0}));n&&n.parent===t&&Il(i.ownerDocument,o,n.offset);const a=this._diffNodeLists(s,o),l=r.isAndroid?this._findReplaceActions(a,s,o,{replaceText:!0}):a;let c=0;const h=new Set;for(const t of l)"delete"===t?(h.add(s[c]),zs(s[c])):"equal"!==t&&"replace"!==t||c++;c=0;for(const t of l)"insert"===t?(Ms(i,c,o[c]),c++):"replace"===t?(Bl(s[c],o[c].data),c++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(o[c])),c++);for(const t of h)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return t=function(t,e){const i=Array.from(t);if(0==i.length||!e)return i;const n=i[i.length-1];n==e&&i.pop();return i}(t,this._fakeSelectionContainer),d(t,e,Nl.bind(null,this.domConverter))}_findReplaceActions(t,e,i,n={}){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let s=[],o=[],r=[];const a={equal:0,insert:0,delete:0};for(const l of t)"insert"===l?r.push(i[a.equal+a.insert]):"delete"===l?o.push(e[a.equal+a.delete]):(s=s.concat(d(o,r,n.replaceText?Ml:Vl).map((t=>"equal"===t?"replace":t))),s.push("equal"),o=[],r=[]),a[l]++;return s.concat(d(o,r,n.replaceText?Ml:Vl).map((t=>"equal"===t?"replace":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(r.isBlink&&!r.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&&r.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 i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(t))return;i.parentElement&&i.parentElement==t||t.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const n=e.getSelection(),s=e.createRange();n.removeAllRanges(),s.selectNodeContents(i),n.addRange(s)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);e.collapse(i.parent,i.offset),e.extend(n.parent,n.offset),r.isGecko&&function(t,e){const i=t.parent;if(i.nodeType!=Node.ELEMENT_NODE||t.offset!=i.childNodes.length-1)return;const n=i.childNodes[t.offset];n&&"BR"==n.tagName&&e.addRange(e.getRangeAt(0))}(n,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,i=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(i.anchorNode!==e&&!e.contains(i.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){const e=t.getSelection();if(e.rangeCount){const i=t.activeElement,n=this.domConverter.mapDomToView(i);i&&n&&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 Il(t,e,i){const n=e instanceof Array?e:e.childNodes,s=n[i];if(ks(s))return s.data=Pl+s.data,s;{const s=t.createTextNode(Pl);return Array.isArray(e)?n.splice(i,0,s):Ms(e,i,s),s}}function Vl(t,e){return fs(t)&&fs(e)&&!ks(t)&&!ks(e)&&!Ns(t)&&!Ns(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function Ml(t,e){return fs(t)&&fs(e)&&ks(t)&&ks(e)}function Nl(t,e,i){return e===i||(ks(e)&&ks(i)?e.data===i.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(i)))}function Bl(t,e){const i=t.data;if(i==e)return;const n=l(i,e);for(const e of n)"insert"===e.type?t.insertData(e.index,e.values.join("")):t.deleteData(e.index,e.howMany)}const Dl=xl(vs.document),Fl=kl(vs.document),Ll=Al(vs.document),zl="data-ck-unsafe-attribute-",Hl="data-ck-unsafe-element";class jl{constructor(t,e={}){this.document=t,this.renderingMode=e.renderingMode||"editing",this.blockFillerMode=e.blockFillerMode||("editing"===this.renderingMode?"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?vs.document:vs.document.implementation.createHTMLDocument(""),this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Tr,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new Wa(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,i){return"data"===this.renderingMode||!(t=t.toLowerCase()).startsWith("on")&&(("srcdoc"!==t||!e.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===i&&("src"===t||"srcset"===t)||("source"===i&&"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 i=(new DOMParser).parseFromString(e,"text/html"),n=i.createDocumentFragment(),s=i.body.childNodes;for(;s.length>0;)n.appendChild(s[0]);const o=i.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=o.nextNode();)r.push(a);for(const t of r){for(const e of t.getAttributeNames())this.setDomElementAttribute(t,e,t.getAttribute(e));const e=t.tagName.toLowerCase();this._shouldRenameElement(e)&&(ql(e),t.replaceWith(this._createReplacementDomElement(e,t)))}for(;t.firstChild;)t.firstChild.remove();t.append(n)}viewToDom(t,e={}){if(t.is("$text")){const e=this._processDataFromViewText(t);return this._domDocument.createTextNode(e)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let i;if(t.is("documentFragment"))i=this._domDocument.createDocumentFragment(),e.bind&&this.bindDocumentFragments(i,t);else{if(t.is("uiElement"))return i="$comment"===t.name?this._domDocument.createComment(t.getCustomProperty("$rawContent")):t.render(this._domDocument,this),e.bind&&this.bindElements(i,t),i;this._shouldRenameElement(t.name)?(ql(t.name),i=this._createReplacementDomElement(t.name)):i=t.hasAttribute("xmlns")?this._domDocument.createElementNS(t.getAttribute("xmlns"),t.name):this._domDocument.createElement(t.name),t.is("rawElement")&&t.render(i,this),e.bind&&this.bindElements(i,t);for(const e of t.getAttributeKeys())this.setDomElementAttribute(i,e,t.getAttribute(e),t)}if(!1!==e.withChildren)for(const n of this.viewChildrenToDom(t,e))i.appendChild(n);return i}}setDomElementAttribute(t,e,i,n){const s=this.shouldRenderAttribute(e,i,t.tagName.toLowerCase())||n&&n.shouldRenderUnsafeAttribute(e);s||y("domconverter-unsafe-attribute-detected",{domElement:t,key:e,value:i}),t.hasAttribute(e)&&!s?t.removeAttribute(e):t.hasAttribute(zl+e)&&s&&t.removeAttribute(zl+e),t.setAttribute(s?e:zl+e,i)}removeDomElementAttribute(t,e){e!=Hl&&(t.removeAttribute(e),t.removeAttribute(zl+e))}*viewChildrenToDom(t,e={}){const i=t.getFillerOffset&&t.getFillerOffset();let n=0;for(const s of t.getChildren()){i===n&&(yield this._getBlockFiller());const t=s.is("element")&&!!s.getCustomProperty("dataPipeline:transparentRendering")&&!ho(s.getAttributes());t&&"data"==this.renderingMode?yield*this.viewChildrenToDom(s,e):(t&&y("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:s}),yield this.viewToDom(s,e)),n++}i===n&&(yield this._getBlockFiller())}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),i=this.viewPositionToDom(t.end),n=this._domDocument.createRange();return n.setStart(e.parent,e.offset),n.setEnd(i.parent,i.offset),n}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const i=this.findCorrespondingDomText(e);if(!i)return null;let n=t.offset;return Tl(i)&&(n+=Cl),{parent:i,offset:n}}{let i,n,s;if(0===t.offset){if(i=this.mapViewToDom(e),!i)return null;s=i.childNodes[0]}else{const e=t.nodeBefore;if(n=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(e),!n)return null;i=n.parentNode,s=n.nextSibling}if(ks(s)&&Tl(s))return{parent:s,offset:Cl};return{parent:i,offset:n?Vs(n)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t))return null;const i=this.getHostViewElement(t);if(i)return i;if(Ns(t)&&e.skipComments)return null;if(ks(t)){if(El(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new Cr(this.document,e)}}{if(this.mapDomToView(t))return this.mapDomToView(t);let i;if(this.isDocumentFragment(t))i=new hl(this.document),e.bind&&this.bindDocumentFragments(t,i);else{i=this._createViewElement(t,e),e.bind&&this.bindElements(t,i);const n=t.attributes;if(n)for(let t=n.length,e=0;e{const{scrollLeft:e,scrollTop:i}=t;n.push([e,i])})),e.focus(),$l(e,(t=>{const[e,i]=n.shift();t.scrollLeft=e,t.scrollTop=i})),vs.window.scrollTo(t,i)}}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(Dl):!("BR"!==t.tagName||!Wl(t,this.blockElements)||1!==t.parentNode.childNodes.length)||(t.isEqualNode(Ll)||function(t,e){const i=t.isEqualNode(Fl);return i&&Wl(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 i=e.collapsed;return e.detach(),i}getHostViewElement(t){const e=ys(t);for(e.pop();e.length;){const t=e.pop(),i=this._domToViewMapping.get(t);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return kl(this._domDocument);case"markedNbsp":return Al(this._domDocument);case"br":return xl(this._domDocument)}}_isDomSelectionPositionCorrect(t,e){if(ks(t)&&Tl(t)&ðis.preElements.includes(t.name))))return e;if(" "==e.charAt(0)){const i=this._getTouchingInlineViewNode(t,!1);!(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i))&&i||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const i=this._getTouchingInlineViewNode(t,!0),n=i&&i.is("$textProxy")&&" "==i.data.charAt(0);" "!=e.charAt(e.length-2)&&i&&!n||(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)}_processDataFromDomText(t){let e=t.data;if(function(t,e){const i=ys(t);return i.some((t=>t.tagName&&e.includes(t.tagName.toLowerCase())))}(t,this.preElements))return Sl(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const i=this._getTouchingInlineDomNode(t,!1),n=this._getTouchingInlineDomNode(t,!0),s=this._checkShouldLeftTrimDomText(t,i),o=this._checkShouldRightTrimDomText(t,n);s&&(e=e.replace(/^ /,"")),o&&(e=e.replace(/ $/,"")),e=Sl(new Text(e)),e=e.replace(/ \u00A0/g," ");const r=n&&this.isElement(n)&&"BR"!=n.tagName,a=n&&ks(n)&&" "==n.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(e)||!n||r||a)&&(e=e.replace(/\u00A0$/," ")),(s||i&&this.isElement(i)&&"BR"!=i.tagName)&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t,e){return!e||(this.isElement(e)?"BR"===e.tagName:!this._encounteredRawContentDomNodes.has(t.previousSibling)&&/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(t,e){return!e&&!Tl(t)}_getTouchingInlineViewNode(t,e){const i=new za({startPosition:e?Ha._createAfter(t):Ha._createBefore(t),direction:e?"forward":"backward"});for(const t of i){if(t.item.is("element")&&this.inlineObjectElements.includes(t.item.name))return t.item;if(t.item.is("containerElement"))return null;if(t.item.is("element","br"))return null;if(t.item.is("$textProxy"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const i=e?"firstChild":"lastChild",n=e?"nextSibling":"previousSibling";let s=!0,o=t;do{if(!s&&o[i]?o=o[i]:o[n]?(o=o[n],s=!1):(o=o.parentNode,s=!0),!o||this._isBlockElement(o))return null}while(!ks(o)&&"BR"!=o.tagName&&!this._isInlineObjectElement(o));return o}_isBlockElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isInlineObjectElement(t){return this.isElement(t)&&this.inlineObjectElements.includes(t.tagName.toLowerCase())}_createViewElement(t,e){if(Ns(t))return new ol(this.document,"$comment");const i=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new Va(this.document,i)}_isViewElementWithRawContent(t,e){return!1!==e.withChildren&&!!this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){const e=t.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(e)}_createReplacementDomElement(t,e){const i=this._domDocument.createElement("span");if(i.setAttribute(Hl,t),e){for(;e.firstChild;)i.appendChild(e.firstChild);for(const t of e.getAttributeNames())i.setAttribute(t,e.getAttribute(t))}return i}}function $l(t,e){let i=t;for(;i;)e(i),i=i.parentElement}function Wl(t,e){const i=t.parentNode;return!!i&&!!i.tagName&&e.includes(i.tagName.toLowerCase())}function ql(t){"script"===t&&y("domconverter-unsafe-script-element-detected"),"style"===t&&y("domconverter-unsafe-style-element-detected")}class Ul extends(ps()){constructor(t){super(),this.view=t,this.document=t.document,this.isEnabled=!1}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 Kl=Ca((function(t,e){ze(e,Pi(e),t)}));class Gl{constructor(t,e,i){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Kl(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Jl extends Ul{constructor(t){super(t),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})}))}fire(t,e,i){this.isEnabled&&this.document.fire(t,new Gl(this.view,e,i))}}class Ql extends Jl{constructor(t){super(t),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 to(this)}};this.fire(t.type,t,e)}}const Yl=function(){return nt.Date.now()};var Zl=/\s/;const Xl=function(t){for(var e=t.length;e--&&Zl.test(t.charAt(e)););return e};var tc=/^\s+/;const ec=function(t){return t?t.slice(0,Xl(t)+1).replace(tc,""):t};var ic=NaN,nc=/^[-+]0x[0-9a-f]+$/i,sc=/^0b[01]+$/i,oc=/^0o[0-7]+$/i,rc=parseInt;const ac=function(t){if("number"==typeof t)return t;if(Or(t))return ic;if(F(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=F(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ec(t);var i=sc.test(t);return i||oc.test(t)?rc(t.slice(2),i?2:8):nc.test(t)?ic:+t};var lc="Expected a function",cc=Math.max,hc=Math.min;const dc=function(t,e,i){var n,s,o,r,a,l,c=0,h=!1,d=!1,u=!0;if("function"!=typeof t)throw new TypeError(lc);function f(e){var i=n,o=s;return n=s=void 0,c=e,r=t.apply(o,i)}function m(t){var i=t-l;return void 0===l||i>=e||i<0||d&&t-c>=o}function g(){var t=Yl();if(m(t))return p(t);a=setTimeout(g,function(t){var i=e-(t-l);return d?hc(i,o-(t-c)):i}(t))}function p(t){return a=void 0,u&&n?f(t):(n=s=void 0,r)}function w(){var t=Yl(),i=m(t);if(n=arguments,s=this,l=t,i){if(void 0===a)return function(t){return c=t,a=setTimeout(g,e),h?f(t):r}(l);if(d)return clearTimeout(a),a=setTimeout(g,e),f(l)}return void 0===a&&(a=setTimeout(g,e)),r}return e=ac(e)||0,F(i)&&(h=!!i.leading,o=(d="maxWait"in i)?cc(ac(i.maxWait)||0,e):o,u="trailing"in i?!!i.trailing:u),w.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=s=a=void 0},w.flush=function(){return void 0===a?r:p(Yl())},w};class uc extends Ul{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=dc((t=>{this.document.fire("selectionChangeDone",t)}),200)}observe(){const t=this.document;t.on("arrowKey",((e,i)=>{t.selection.isFake&&this.isEnabled&&i.preventDefault()}),{context:"$capture"}),t.on("arrowKey",((e,i)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)}),{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,i=new Wa(e.getRanges(),{backward:e.isBackward,fake:!1});t!=Zs.arrowleft&&t!=Zs.arrowup||i.setTo(i.getFirstPosition()),t!=Zs.arrowright&&t!=Zs.arrowdown||i.setTo(i.getLastPosition());const n={oldSelection:e,newSelection:i,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}var fc="__lodash_hash_undefined__";const mc=function(t){return this.__data__.set(t,fc),this};const gc=function(t){return this.__data__.has(t)};function pc(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new Re;++ea))return!1;var c=o.get(t),h=o.get(e);if(c&&h)return c==e&&h==t;var d=-1,u=!0,f=i&yc?new wc:void 0;for(o.set(t,e),o.set(e,t);++d{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),t.change((()=>{}))}),50)})),e.on("blur",((i,n)=>{const s=e.selection.editableElement;null!==s&&s!==n.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 eh extends Ul{constructor(t){super(t),this.mutationObserver=t.getObserver(Zc),this.focusObserver=t.getObserver(th),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=dc((t=>{this.document.fire("selectionChangeDone",t)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=dc((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument,i=()=>{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",i,{priority:"highest",useCapture:!0}),this.listenTo(t,"keyup",i,{priority:"highest",useCapture:!0}),this._documents.has(e)||(this.listenTo(e,"mouseup",i,{priority:"highest",useCapture:!0}),this.listenTo(e,"selectionchange",((t,i)=>{this.document.isComposing&&!r.isAndroid||(this._handleSelectionChange(i,e),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(t,e){if(!this.isEnabled)return;const i=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(i.anchorNode))return;this.mutationObserver.flush();const n=this.domConverter.domSelectionToView(i);if(0!=n.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(i)||++this._loopbackCounter>60))if(this.focusObserver.flush(),this.selection.isSimilar(n))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:n,domSelection:i};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ih extends Jl{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 nh{constructor(t){this.files=function(t){const e=Array.from(t.files||[]),i=Array.from(t.items||[]);if(e.length)return e;return i.filter((t=>"file"===t.kind)).map((t=>t.getAsFile()))}(t),this._native=t}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}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class sh extends Jl{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){const e=t.getTargetRanges(),i=this.view,n=i.document;let s=null,o=null,a=[];if(t.dataTransfer&&(s=new nh(t.dataTransfer)),null!==t.data?o=t.data:s&&(o=s.getData("text/plain")),n.selection.isFake)a=Array.from(n.selection.getRanges());else if(e.length)a=e.map((t=>i.domConverter.domRangeToView(t)));else if(r.isAndroid){const e=t.target.ownerDocument.defaultView.getSelection();a=Array.from(i.domConverter.domSelectionToView(e).getRanges())}if(r.isAndroid&&"insertCompositionText"==t.inputType&&o&&o.endsWith("\n"))this.fire(t.type,t,{inputType:"insertParagraph",targetRanges:[i.createRange(a[0].end)]});else if("insertText"==t.inputType&&o&&o.includes("\n")){const e=o.split(/\n{1,2}/g);let i=a;for(let o=0;o{if(this.isEnabled&&((i=e.keyCode)==Zs.arrowright||i==Zs.arrowleft||i==Zs.arrowup||i==Zs.arrowdown)){const i=new Ua(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(i,e),i.stop.called&&t.stop()}var i}))}observe(){}}class rh extends Ul{constructor(t){super(t);const e=this.document;e.on("keydown",((t,i)=>{if(!this.isEnabled||i.keyCode!=Zs.tab||i.ctrlKey)return;const n=new Ua(e,"tab",e.selection.getFirstRange());e.fire(n,i),n.stop.called&&t.stop()}))}observe(){}}class ah extends(q()){constructor(t){super(),this.document=new Xa(t),this.domConverter=new jl(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Ol(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new dl(this.document),this.addObserver(Zc),this.addObserver(th),this.addObserver(eh),this.addObserver(Ql),this.addObserver(uc),this.addObserver(ih),this.addObserver(oh),this.addObserver(sh),this.addObserver(rh),this.document.on("arrowKey",Rl,{priority:"low"}),rl(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}))}attachDomRoot(t,e="main"){const i=this.document.getRoot(e);i._name=t.tagName.toLowerCase();const n={};for(const{name:e,value:s}of Array.from(t.attributes))n[e]=s,"class"===e?this._writer.addClass(s.split(" "),i):this._writer.setAttribute(e,s,i);this._initialDomRootAttributes.set(t,n);const s=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};s(),this.domRoots.set(e,t),this.domConverter.bindElements(t,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(t.ownerDocument),i.on("change:children",((t,e)=>this._renderer.markToSync("children",e))),i.on("change:attributes",((t,e)=>this._renderer.markToSync("attributes",e))),i.on("change:text",((t,e)=>this._renderer.markToSync("text",e))),i.on("change:isReadOnly",(()=>this.change(s))),i.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const i of this._observers.values())i.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach((({name:t})=>e.removeAttribute(t)));const i=this._initialDomRootAttributes.get(e);for(const t in i)e.setAttribute(t,i[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(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,i]of this.domRoots)e.observe(i,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(){const t=this.document.selection.getFirstRange();t&&function({target:t,viewportOffset:e=0}){const i=Ks(t);let n=i,s=null;for(;n;){let o;o=Gs(n==i?t:s),js(o,(()=>Js(t,n)));const r=Js(t,n);if(Hs(n,r,e),n.parent!=n){if(s=n.frameElement,n=n.parent,!s)return}else n=null}}({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}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 v("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){v.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(th).flush(),this.change((()=>{}))}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return Ha._createAt(t,e)}createPositionAfter(t){return Ha._createAfter(t)}createPositionBefore(t){return Ha._createBefore(t)}createRange(...t){return new ja(...t)}createRangeOn(t){return ja._createOn(t)}createRangeIn(t){return ja._createIn(t)}createSelection(...t){return new Wa(...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 lh{is(){throw new Error("is() method is abstract")}}class ch extends lh{constructor(t){super(),this.parent=null,this._attrs=mo(t)}get document(){return null}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new v("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 v("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 this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={}){const e=[];let i=t.includeSelf?this:this.parent;for(;i;)e[t.parentFirst?"push":"unshift"](i),i=i.parent;return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e),n=t.getAncestors(e);let s=0;for(;i[s]==n[s]&&i[s];)s++;return 0===s?null:i[s-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),i=t.getPath(),n=X(e,i);switch(n){case"prefix":return!0;case"extension":return!1;default:return e[n](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=mo(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}ch.prototype.is=function(t){return"node"===t||"model:node"===t};class hh{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 v("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const i of this._nodes){if(t>=e&&tgo)return t.slice(0,i).concat(e).concat(t.slice(i+n,t.length));{const s=Array.from(t);return s.splice(i,n,...e),s}}(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 dh extends ch{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 dh(this.data,this.getAttributes())}static fromJSON(t){return new dh(t.data,t.attributes)}}dh.prototype.is=function(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t};class uh extends lh{constructor(t,e,i){if(super(),this.textNode=t,e<0||e>t.offsetSize)throw new v("model-textproxy-wrong-offsetintext",this);if(i<0||e+i>t.offsetSize)throw new v("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+i),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 i=t.includeSelf?this:this.parent;for(;i;)e[t.parentFirst?"push":"unshift"](i),i=i.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()}}uh.prototype.is=function(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t};class fh extends ch{constructor(t,e,i){super(e),this._children=new hh,this.name=t,i&&this._insertChild(0,i)}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 i of t)e=e.getChild(e.offsetToIndex(i));return e}findAncestor(t,e={}){let i=e.includeSelf?this:this.parent;for(;i;){if(i.name===t)return i;i=i.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 fh(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=function(t){if("string"==typeof t)return[new dh(t)];tt(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new dh(t):t instanceof uh?new dh(t.data,t.getAttributes()):t))}(e);for(const t of i)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i)t.parent=null;return i}static fromJSON(t){let e;if(t.children){e=[];for(const i of t.children)i.name?e.push(fh.fromJSON(i)):e.push(dh.fromJSON(i))}return new fh(t.name,t.attributes,e)}}fh.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 mh{constructor(t){if(!t||!t.boundaries&&!t.startPosition)throw new v("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new v("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=ph._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}skip(t){let e,i,n,s;do{n=this.position,s=this._visitedParent,({done:e,value:i}=this.next())}while(!e&&t(i));e||(this.position=n,this._visitedParent=s)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),i=this._visitedParent;if(null===i.parent&&e.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=wh(e,i),s=n||bh(e,i,n);if(s instanceof fh)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=s),this.position=e,gh("elementStart",s,t,e,1);if(s instanceof dh){let n;if(this.singleCharacters)n=1;else{let t=s.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offsett&&(t=this.boundaries.start.offset),n=e.offset-t}const s=e.offset-o.startOffset,r=new uh(o,s-n,n);return e.offset-=n,this.position=e,gh("text",r,t,e,n)}return e.path.pop(),this.position=e,this._visitedParent=i.parent,gh("elementStart",i,t,e,1)}}function gh(t,e,i,n,s){return{done:!1,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:s}}}class ph extends lh{constructor(t,e,i="toNone"){if(super(),!t.is("element")&&!t.is("documentFragment"))throw new v("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new v("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=i}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 vh(t,this,i);if(-1===e)return vh(this,t,i)}return this.path.length===t.path.length||(this.path.length>t.path.length?yh(this.path,e):yh(t.path,e))}hasSameParentAs(t){if(this.root!==t.root)return!1;return"same"==X(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=ph._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 i;return e.containsPosition(this)||e.start.isEqual(this)?(i=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(i=i._getTransformedByDeletion(t.deletionPosition,1))):i=this.isEqual(t.deletionPosition)?ph._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),i}_getTransformedByDeletion(t,e){const i=ph._createAt(this);if(this.root!=t.root)return i;if("same"==X(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;i.offset-=e}}else if("prefix"==X(t.getParentPath(),this.getParentPath())){const n=t.path.length-1;if(t.offset<=this.path[n]){if(t.offset+e>this.path[n])return null;i.path[n]-=e}}return i}_getTransformedByInsertion(t,e){const i=ph._createAt(this);if(this.root!=t.root)return i;if("same"==X(t.getParentPath(),this.getParentPath()))(t.offset=e;){if(t.path[n]+s!==i.maxOffset)return!1;s=1,n--,i=i.parent}return!0}(t,i+1))}function yh(t,e){for(;ee+1;){const e=n.maxOffset-i.offset;0!==e&&t.push(new kh(i,i.getShiftedBy(e))),i.path=i.path.slice(0,-1),i.offset++,n=n.parent}for(;i.path.length<=this.end.path.length;){const e=this.end.path[i.path.length-1],n=e-i.offset;0!==n&&t.push(new kh(i,i.getShiftedBy(n))),i.offset=e,i.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new mh(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new mh(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new mh(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 kh(this.start,this.end)]}getTransformedByOperations(t){const e=[new kh(this.start,this.end)];for(const i of t)for(let t=0;t0?new this(i,n):new this(n,i)}static _createIn(t){return new this(ph._createAt(t,0),ph._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(ph._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new v("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 i=t.indexOf(e),n=new this(e.start,e.end);if(i>0)for(let e=i-1;t[e].end.isEqual(n.start);e++)n.start=ph._createAt(t[e].start);for(let e=i+1;e{if(e.viewPosition)return;const i=this._modelToViewMapping.get(e.modelPosition.parent);if(!i)throw new v("mapping-model-position-view-parent-not-found",this,{modelPosition:e.modelPosition});e.viewPosition=this.findPositionIn(i,e.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((t,e)=>{if(e.modelPosition)return;const i=this.findMappedViewAncestor(e.viewPosition),n=this._viewToModelMapping.get(i),s=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,i);e.modelPosition=ph._createAt(n,s)}),{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t,e={}){const i=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(i)==t&&this._modelToViewMapping.delete(i))}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const i=this._markerNameToElements.get(e)||new Set;i.add(t);const n=this._elementToMarkerNames.get(t)||new Set;n.add(e),this._markerNameToElements.set(e,i),this._elementToMarkerNames.set(t,n)}unbindElementFromMarkerName(t,e){const i=this._markerNameToElements.get(e);i&&(i.delete(t),0==i.size&&this._markerNameToElements.delete(e));const n=this._elementToMarkerNames.get(t);n&&(n.delete(e),0==n.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 kh(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new ja(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 i={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const i=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())i.add(e);else i.add(t);return i}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,i){if(i!=t){return this._toModelOffset(t.parent,t.index,i)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let n=0;for(let i=0;i1?e[0]+":"+e[1]:e[0]}class Ph extends(R()){constructor(t){super(),this._conversionApi={dispatcher:this,...t},this._firedEventsMap=new WeakMap}convertChanges(t,e,i){const n=this._createConversionApi(i,t.getRefreshedItems());for(const e of t.getMarkersToRemove())this._convertMarkerRemove(e.name,e.range,n);const s=this._reduceChanges(t.getChanges());for(const t of s)"insert"===t.type?this._convertInsert(kh._createFromPositionAndShift(t.position,t.length),n):"reinsert"===t.type?this._convertReinsert(kh._createFromPositionAndShift(t.position,t.length),n):"remove"===t.type?this._convertRemove(t.position,t.length,t.name,n):this._convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,n);for(const t of n.mapper.flushUnboundMarkerNames()){const i=e.get(t).getRange();this._convertMarkerRemove(t,i,n),this._convertMarkerAdd(t,i,n)}for(const e of t.getMarkersToAdd())this._convertMarkerAdd(e.name,e.range,n);n.mapper.flushDeferredBindings(),n.consumable.verifyAllConsumed("insert")}convert(t,e,i,n={}){const s=this._createConversionApi(i,void 0,n);this._convertInsert(t,s);for(const[t,i]of e)this._convertMarkerAdd(t,i,s);s.consumable.verifyAllConsumed("insert")}convertSelection(t,e,i){const n=Array.from(e.getMarkersAtPosition(t.getFirstPosition())),s=this._createConversionApi(i);if(this._addConsumablesForSelection(s.consumable,t,n),this.fire("selection",{selection:t},s),t.isCollapsed){for(const e of n){const i=e.getRange();if(!Th(t.getFirstPosition(),e,s.mapper))continue;const n={item:t,markerName:e.name,markerRange:i};s.consumable.test(t,"addMarker:"+e.name)&&this.fire(`addMarker:${e.name}`,n,s)}for(const e of t.getAttributeKeys()){const i={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};s.consumable.test(t,"attribute:"+i.attributeKey)&&this.fire(`attribute:${i.attributeKey}:$text`,i,s)}}}_convertInsert(t,e,i={}){i.doNotAddConsumables||this._addConsumablesForInsert(e.consumable,Array.from(t));for(const i of Array.from(t.getWalker({shallow:!0})).map(Eh))this._testAndFire("insert",i,e)}_convertRemove(t,e,i,n){this.fire(`remove:${i}`,{position:t,length:e},n)}_convertAttribute(t,e,i,n,s){this._addConsumablesForRange(s.consumable,t,`attribute:${e}`);for(const o of t){const t={item:o.item,range:kh._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:e,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${e}`,t,s)}}_convertReinsert(t,e){const i=Array.from(t.getWalker({shallow:!0}));this._addConsumablesForInsert(e.consumable,i);for(const t of i.map(Eh))this._testAndFire("insert",{...t,reconversion:!0},e)}_convertMarkerAdd(t,e,i){if("$graveyard"==e.root.rootName)return;const n=`addMarker:${t}`;if(i.consumable.add(e,n),this.fire(n,{markerName:t,markerRange:e},i),i.consumable.consume(e,n)){this._addConsumablesForRange(i.consumable,e,n);for(const s of e.getItems()){if(!i.consumable.test(s,n))continue;const o={item:s,range:kh._createOn(s),markerName:t,markerRange:e};this.fire(n,o,i)}}}_convertMarkerRemove(t,e,i){"$graveyard"!=e.root.rootName&&this.fire(`removeMarker:${t}`,{markerName:t,markerRange:e},i)}_reduceChanges(t){const e={changes:t};return this.fire("reduceChanges",e),e.changes}_addConsumablesForInsert(t,e){for(const i of e){const e=i.item;if(null===t.test(e,"insert")){t.add(e,"insert");for(const i of e.getAttributeKeys())t.add(e,"attribute:"+i)}}return t}_addConsumablesForRange(t,e,i){for(const n of e.getItems())t.add(n,i);return t}_addConsumablesForSelection(t,e,i){t.add(e,"selection");for(const n of i)t.add(e,"addMarker:"+n.name);for(const i of e.getAttributeKeys())t.add(e,"attribute:"+i);return t}_testAndFire(t,e,i){const n=function(t,e){const i=e.item.is("element")?e.item.name:"$text";return`${t}:${i}`}(t,e),s=e.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(e.item):e.item,o=this._firedEventsMap.get(i),r=o.get(s);if(r){if(r.has(n))return;r.add(n)}else o.set(s,new Set([n]));this.fire(n,e,i)}_testAndFireAddAttributes(t,e){const i={item:t,range:kh._createOn(t)};for(const t of i.item.getAttributeKeys())i.attributeKey=t,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(t),this._testAndFire(`attribute:${t}`,i,e)}_createConversionApi(t,e=new Set,i={}){const n={...this._conversionApi,consumable:new xh,writer:t,options:i,convertItem:t=>this._convertInsert(kh._createOn(t),n),convertChildren:t=>this._convertInsert(kh._createIn(t),n,{doNotAddConsumables:!0}),convertAttributes:t=>this._testAndFireAddAttributes(t,n),canReuseView:t=>!e.has(n.mapper.toModelElement(t))};return this._firedEventsMap.set(n,new Map),n}}function Th(t,e,i){const n=e.getRange(),s=Array.from(t.getAncestors());s.shift(),s.reverse();return!s.some((t=>{if(n.containsItem(t)){return!!i.toViewElement(t).getCustomProperty("addHighlight")}}))}function Eh(t){return{item:t.item,range:kh._createFromPositionAndShift(t.previousPosition,t.length)}}class Sh extends(R(lh)){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 i=!1;for(const n of t._ranges)if(e.isEqual(n)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new kh(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 kh(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 kh(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,i,n]=t;if("object"==typeof i&&(n=i,i=void 0),null===e)this._setRanges([]);else if(e instanceof Sh)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof kh)this._setRanges([e],!!n&&!!n.backward);else if(e instanceof ph)this._setRanges([new kh(e)]);else if(e instanceof ch){const t=!!n&&!!n.backward;let s;if("in"==i)s=kh._createIn(e);else if("on"==i)s=kh._createOn(e);else{if(void 0===i)throw new v("model-selection-setto-required-second-parameter",[this,e]);s=new kh(ph._createAt(e,i))}this._setRanges([s],t)}else{if(!tt(e))throw new v("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,n&&!!n.backward)}}_setRanges(t,e=!1){const i=Array.from(t),n=i.some((e=>{if(!(e instanceof kh))throw new v("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every((t=>!t.isEqual(e)))}));(i.length!==this._ranges.length||n)&&(this._replaceAllRanges(i),this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0}))}setFocus(t,e){if(null===this.anchor)throw new v("model-selection-setfocus-no-ranges",[this,t]);const i=ph._createAt(t,e);if("same"==i.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(n)?(this._pushRange(new kh(i,n)),this._lastRangeBackward=!0):(this._pushRange(new kh(n,i)),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 i=Ih(e.start,t);i&&Vh(i,e)&&(yield i);for(const i of e.getWalker()){const n=i.item;"elementEnd"==i.type&&Oh(n,t,e)&&(yield n)}const n=Ih(e.end,t);n&&!e.end.isTouching(ph._createAt(n,0))&&Vh(n,e)&&(yield n)}}containsEntireContent(t=this.anchor.root){const e=ph._createAt(t,0),i=ph._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new kh(t.start,t.end))}_checkRange(t){for(let e=0;e0;)this._popRange()}_popRange(){this._ranges.pop()}}function Rh(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&!!t.parent)}function Oh(t,e,i){return Rh(t,e)&&Vh(t,i)}function Ih(t,e){const i=t.parent.root.document.model.schema,n=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let s=!1;const o=n.find((t=>!s&&(s=i.isLimit(t),!s&&Rh(t,e))));return n.forEach((t=>e.add(t))),o}function Vh(t,e){const i=function(t){const e=t.root.document.model.schema;let i=t.parent;for(;i;){if(e.isBlock(i))return i;i=i.parent}}(t);if(!i)return!0;return!e.containsRange(kh._createOn(i),!0)}Sh.prototype.is=function(t){return"selection"===t||"model:selection"===t};class Mh extends(R(kh)){constructor(t,e){super(t,e),Nh.call(this)}detach(){this.stopListening()}toRange(){return new kh(this.start,this.end)}static fromRange(t){return new Mh(t.start,t.end)}}function Nh(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const i=e[0];i.isDocumentOperation&&Bh.call(this,i)}),{priority:"low"})}function Bh(t){const e=this.getTransformedByOperation(t),i=kh._createFromRanges(e),n=!i.isEqual(this),s=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 o=null;if(n){"$graveyard"==i.root.rootName&&(o="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",e,{deletionPosition:o})}else s&&this.fire("change:content",this.toRange(),{deletionPosition:o})}Mh.prototype.is=function(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t};const Dh="selection:";class Fh extends(R(lh)){constructor(t){super(),this._selection=new Lh(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 Dh+t}static _isStoreAttributeKey(t){return t.startsWith(Dh)}}Fh.prototype.is=function(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t};class Lh extends Sh{constructor(t){super(),this.markers=new co({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 i=e[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((t,e,i,n)=>{this._updateMarker(e,n)})),this.listenTo(this._document,"change",((t,e)=>{!function(t,e){const i=t.document.differ;for(const n of i.getChanges()){if("insert"!=n.type)continue;const i=n.position.parent;n.length===i.maxOffset&&t.enqueueChange(e,(t=>{const e=Array.from(i.getAttributeKeys()).filter((t=>t.startsWith(Dh)));for(const n of e)t.removeAttribute(n,i)}))}}(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=n.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 i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))continue;const n=e.getRange();for(const i of this.getRanges())n.containsRange(i,!i.isCollapsed)&&t.push(e)}const i=Array.from(this.markers);for(const i of t)this.markers.has(i)||(this.markers.add(i),e=!0);for(const i of Array.from(this.markers))t.includes(i)||(this.markers.remove(i),e=!0);e&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(t,e){const i=t.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let n=!1;const s=Array.from(this.markers),o=this.markers.has(t);if(e){let i=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){i=!0;break}i&&!o?(this.markers.add(t),n=!0):!i&&o&&(this.markers.remove(t),n=!0)}else o&&(this.markers.remove(t),n=!0);n&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateAttributes(t){const e=mo(this._getSurroundingAttributes()),i=mo(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 n=[];for(const[t,e]of this.getAttributes())i.has(t)&&i.get(t)===e||n.push(t);for(const[t]of i)this.hasAttribute(t)||n.push(t);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(t,e,i=!0){const n=i?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,n),!0)}_removeAttribute(t,e=!0){const i=e?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,i),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,i]of this.getAttributes())t.get(e)!==i&&this._removeAttribute(e,!1);for(const[i,n]of t){this._setAttribute(i,n,!1)&&e.add(i)}return e}*getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith(Dh)){const i=e.substr(Dh.length);yield[i,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let i=null;if(this.isCollapsed){const n=t.textNode?t.textNode:t.nodeBefore,s=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(i=zh(n)),i||(i=zh(s)),!this.isGravityOverridden&&!i){let t=n;for(;t&&!e.isInline(t)&&!i;)t=t.previousSibling,i=zh(t)}if(!i){let t=s;for(;t&&!e.isInline(t)&&!i;)t=t.nextSibling,i=zh(t)}i||(i=this.getStoredAttributes())}else{const t=this.getFirstRange();for(const n of t){if(n.item.is("element")&&e.isObject(n.item))break;if("text"==n.type){i=n.item.getAttributes();break}}}return i}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function zh(t){return t instanceof uh||t instanceof dh?t.getAttributes():null}class Hh{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}var jh=1,$h=4;const Wh=function(t){return os(t,jh|$h)};class qh extends Hh{elementToElement(t){return this.add(function(t){const e=Gh(t.model),i=Jh(t.view,"container");e.attributes.length&&(e.children=!0);return n=>{n.on(`insert:${e.name}`,function(t,e=nd){return(i,n,s)=>{if(!e(n.item,s.consumable,{preflight:!0}))return;const o=t(n.item,s,n);if(!o)return;e(n.item,s.consumable);const r=s.mapper.toViewPosition(n.range.start);s.mapper.bindElements(n.item,o),s.writer.insert(r,o),s.convertAttributes(n.item),ed(o,n.item.getChildren(),s,{reconversion:n.reconversion})}}(i,td(e)),{priority:t.converterPriority||"normal"}),(e.children||e.attributes.length)&&n.on("reduceChanges",Xh(e),{priority:"low"})}}(t))}elementToStructure(t){return this.add(function(t){const e=Gh(t.model),i=Jh(t.view,"container");return e.children=!0,n=>{if(n._conversionApi.schema.checkChild(e.name,"$text"))throw new v("conversion-element-to-structure-disallowed-text",n,{elementName:e.name});var s,o;n.on(`insert:${e.name}`,(s=i,o=td(e),(t,e,i)=>{if(!o(e.item,i.consumable,{preflight:!0}))return;const n=new Map;i.writer._registerSlotFactory(function(t,e,i){return(n,s="children")=>{const o=n.createContainerElement("$slot");let r=null;if("children"===s)r=Array.from(t.getChildren());else{if("function"!=typeof s)throw new v("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:s});r=Array.from(t.getChildren()).filter((t=>s(t)))}return e.set(o,r),o}}(e.item,n,i));const r=s(e.item,i,e);if(i.writer._clearSlotFactory(),!r)return;!function(t,e,i){const n=Array.from(e.values()).flat(),s=new Set(n);if(s.size!=n.length)throw new v("conversion-slot-filter-overlap",i.dispatcher,{element:t});if(s.size!=t.childCount)throw new v("conversion-slot-filter-incomplete",i.dispatcher,{element:t})}(e.item,n,i),o(e.item,i.consumable);const a=i.mapper.toViewPosition(e.range.start);i.mapper.bindElements(e.item,r),i.writer.insert(a,r),i.convertAttributes(e.item),function(t,e,i,n){i.mapper.on("modelToViewPosition",r,{priority:"highest"});let s=null,o=null;for([s,o]of e)ed(t,o,i,n),i.writer.move(i.writer.createRangeIn(s),i.writer.createPositionBefore(s)),i.writer.remove(s);function r(t,e){const i=e.modelPosition.nodeAfter,n=o.indexOf(i);n<0||(e.viewPosition=e.mapper.findPositionIn(s,n))}i.mapper.off("modelToViewPosition",r)}(r,n,i,{reconversion:e.reconversion})}),{priority:t.converterPriority||"normal"}),n.on("reduceChanges",Xh(e),{priority:"low"})}}(t))}attributeToElement(t){return this.add(function(t){t=Wh(t);let e=t.model;"string"==typeof e&&(e={key:e});let i=`attribute:${e.key}`;e.name&&(i+=":"+e.name);if(e.values)for(const i of e.values)t.view[i]=Jh(t.view[i],"attribute");else t.view=Jh(t.view,"attribute");const n=Qh(t);return e=>{e.on(i,function(t){return(e,i,n)=>{if(!n.consumable.test(i.item,e.name))return;const s=t(i.attributeOldValue,n,i),o=t(i.attributeNewValue,n,i);if(!s&&!o)return;n.consumable.consume(i.item,e.name);const r=n.writer,a=r.document.selection;if(i.item instanceof Sh||i.item instanceof Fh)r.wrap(a.getFirstRange(),o);else{let t=n.mapper.toViewRange(i.range);null!==i.attributeOldValue&&s&&(t=r.unwrap(t,s)),null!==i.attributeNewValue&&o&&r.wrap(t,o)}}}(n),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=Wh(t);let e=t.model;"string"==typeof e&&(e={key:e});let i=`attribute:${e.key}`;e.name&&(i+=":"+e.name);if(e.values)for(const i of e.values)t.view[i]=Yh(t.view[i]);else t.view=Yh(t.view);const n=Qh(t);return e=>{var s;e.on(i,(s=n,(t,e,i)=>{if(!i.consumable.test(e.item,t.name))return;const n=s(e.attributeOldValue,i,e),o=s(e.attributeNewValue,i,e);if(!n&&!o)return;i.consumable.consume(e.item,t.name);const r=i.mapper.toViewElement(e.item),a=i.writer;if(!r)throw new v("conversion-attribute-to-attribute-on-text",i.dispatcher,e);if(null!==e.attributeOldValue&&n)if("class"==n.key){const t=so(n.value);for(const e of t)a.removeClass(e,r)}else if("style"==n.key){const t=Object.keys(n.value);for(const e of t)a.removeStyle(e,r)}else a.removeAttribute(n.key,r);if(null!==e.attributeNewValue&&o)if("class"==o.key){const t=so(o.value);for(const e of t)a.addClass(e,r)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)a.setStyle(e,o.value[e],r)}else a.setAttribute(o.key,o.value,r)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){const e=Jh(t.view,"ui");return i=>{var n;i.on(`addMarker:${t.model}`,(n=e,(t,e,i)=>{e.isOpening=!0;const s=n(e,i);e.isOpening=!1;const o=n(e,i);if(!s||!o)return;const r=e.markerRange;if(r.isCollapsed&&!i.consumable.consume(r,t.name))return;for(const e of r)if(!i.consumable.consume(e.item,t.name))return;const a=i.mapper,l=i.writer;l.insert(a.toViewPosition(r.start),s),i.mapper.bindElementToMarker(s,e.markerName),r.isCollapsed||(l.insert(a.toViewPosition(r.end),o),i.mapper.bindElementToMarker(o,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),i.on(`removeMarker:${t.model}`,((t,e,i)=>{const n=i.mapper.markerNameToElements(e.markerName);if(n){for(const t of n)i.mapper.unbindElementFromMarkerName(t,e.markerName),i.writer.clear(i.writer.createRangeOn(t),t);i.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var i;e.on(`addMarker:${t.model}`,(i=t.view,(t,e,n)=>{if(!e.item)return;if(!(e.item instanceof Sh||e.item instanceof Fh||e.item.is("$textProxy")))return;const s=Zh(i,e,n);if(!s)return;if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,r=Uh(o,s),a=o.document.selection;if(e.item instanceof Sh||e.item instanceof Fh)o.wrap(a.getFirstRange(),r);else{const t=n.mapper.toViewRange(e.range),i=o.wrap(t,r);for(const t of i.getItems())if(t.is("attributeElement")&&t.isSimilar(r)){n.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on(`addMarker:${t.model}`,function(t){return(e,i,n)=>{if(!i.item)return;if(!(i.item instanceof fh))return;const s=Zh(t,i,n);if(!s)return;if(!n.consumable.test(i.item,e.name))return;const o=n.mapper.toViewElement(i.item);if(o&&o.getCustomProperty("addHighlight")){n.consumable.consume(i.item,e.name);for(const t of kh._createIn(i.item))n.consumable.consume(t.item,e.name);o.getCustomProperty("addHighlight")(o,s,n.writer),n.mapper.bindElementToMarker(o,i.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on(`removeMarker:${t.model}`,function(t){return(e,i,n)=>{if(i.markerRange.isCollapsed)return;const s=Zh(t,i,n);if(!s)return;const o=Uh(n.writer,s),r=n.mapper.markerNameToElements(i.markerName);if(r){for(const t of r)if(n.mapper.unbindElementFromMarkerName(t,i.markerName),t.is("attributeElement"))n.writer.unwrap(n.writer.createRangeOn(t),o);else{t.getCustomProperty("removeHighlight")(t,s.id,n.writer)}n.writer.clearClonedElementsGroup(i.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){t=Wh(t);const e=t.model;let i=t.view;i||(i=i=>({group:e,name:i.substr(t.model.length+1)}));return n=>{var s;n.on(`addMarker:${e}`,(s=i,(t,e,i)=>{const n=s(e.markerName,i);if(!n)return;const o=e.markerRange;i.consumable.consume(o,t.name)&&(Kh(o,!1,i,e,n),Kh(o,!0,i,e,n),t.stop())}),{priority:t.converterPriority||"normal"}),n.on(`removeMarker:${e}`,function(t){return(e,i,n)=>{const s=t(i.markerName,n);if(!s)return;const o=n.mapper.markerNameToElements(i.markerName);if(o){for(const t of o)n.mapper.unbindElementFromMarkerName(t,i.markerName),t.is("containerElement")?(r(`data-${s.group}-start-before`,t),r(`data-${s.group}-start-after`,t),r(`data-${s.group}-end-before`,t),r(`data-${s.group}-end-after`,t)):n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(i.markerName),e.stop()}function r(t,e){if(e.hasAttribute(t)){const i=new Set(e.getAttribute(t).split(","));i.delete(s.name),0==i.size?n.writer.removeAttribute(t,e):n.writer.setAttribute(t,Array.from(i).join(","),e)}}}}(i),{priority:t.converterPriority||"normal"})}}(t))}}function Uh(t,e){const i=t.createAttributeElement("span",e.attributes);return e.classes&&i._addClass(e.classes),"number"==typeof e.priority&&(i._priority=e.priority),i._id=e.id,i}function Kh(t,e,i,n,s){const o=e?t.start:t.end,r=o.nodeAfter&&o.nodeAfter.is("element")?o.nodeAfter:null,a=o.nodeBefore&&o.nodeBefore.is("element")?o.nodeBefore:null;if(r||a){let t,o;e&&r||!e&&!a?(t=r,o=!0):(t=a,o=!1);const l=i.mapper.toViewElement(t);if(l)return void function(t,e,i,n,s,o){const r=`data-${o.group}-${e?"start":"end"}-${i?"before":"after"}`,a=t.hasAttribute(r)?t.getAttribute(r).split(","):[];a.unshift(o.name),n.writer.setAttribute(r,a.join(","),t),n.mapper.bindElementToMarker(t,s.markerName)}(l,e,o,i,n,s)}!function(t,e,i,n,s){const o=`${s.group}-${e?"start":"end"}`,r=s.name?{name:s.name}:null,a=i.writer.createUIElement(o,r);i.writer.insert(t,a),i.mapper.bindElementToMarker(a,n.markerName)}(i.mapper.toViewPosition(o),e,i,n,s)}function Gh(t){return"string"==typeof t&&(t={name:t}),t.attributes?Array.isArray(t.attributes)||(t.attributes=[t.attributes]):t.attributes=[],t.children=!!t.children,t}function Jh(t,e){return"function"==typeof t?t:(i,n)=>function(t,e,i){"string"==typeof t&&(t={name:t});let n;const s=e.writer,o=Object.assign({},t.attributes);if("container"==i)n=s.createContainerElement(t.name,o);else if("attribute"==i){const e={priority:t.priority||tl.DEFAULT_PRIORITY};n=s.createAttributeElement(t.name,o,e)}else n=s.createUIElement(t.name,o);if(t.styles){const e=Object.keys(t.styles);for(const i of e)s.setStyle(i,t.styles[i],n)}if(t.classes){const e=t.classes;if("string"==typeof e)s.addClass(e,n);else for(const t of e)s.addClass(t,n)}return n}(t,n,e)}function Qh(t){return t.model.values?(e,i,n)=>{const s=t.view[e];return s?s(e,i,n):null}:t.view}function Yh(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function Zh(t,e,i){const n="function"==typeof t?t(e,i):t;return n?(n.priority||(n.priority=10),n.id||(n.id=e.markerName),n):null}function Xh(t){const e=function(t){return(e,i)=>{if(!e.is("element",t.name))return!1;if("attribute"==i.type){if(t.attributes.includes(i.attributeKey))return!0}else if(t.children)return!0;return!1}}(t);return(t,i)=>{const n=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const t of i.changes){const s="attribute"==t.type?t.range.start.nodeAfter:t.position.parent;if(s&&e(s,t)){if(!i.reconvertedElements.has(s)){i.reconvertedElements.add(s);const t=ph._createBefore(s);n.push({type:"remove",name:s.name,position:t,length:1},{type:"reinsert",name:s.name,position:t,length:1})}}else n.push(t)}i.changes=n}}function td(t){return(e,i,n={})=>{const s=["insert"];for(const i of t.attributes)e.hasAttribute(i)&&s.push(`attribute:${i}`);return!!s.every((t=>i.test(e,t)))&&(n.preflight||s.forEach((t=>i.consume(e,t))),!0)}}function ed(t,e,i,n){for(const s of e)id(t.root,s,i,n)||i.convertItem(s)}function id(t,e,i,n){const{writer:s,mapper:o}=i;if(!n.reconversion)return!1;const r=o.toViewElement(e);return!(!r||r.root==t)&&(!!i.canReuseView(r)&&(s.move(s.createRangeOn(r),o.toViewPosition(ph._createBefore(e))),!0))}function nd(t,e,{preflight:i}={}){return i?e.test(t,"insert"):e.consume(t,"insert")}function sd(t){const{schema:e,document:i}=t.model;for(const n of i.getRootNames()){const s=i.getRoot(n);if(s.isEmpty&&!e.checkChild(s,"$text")&&e.checkChild(s,"paragraph"))return t.insertElement("paragraph",s),!0}return!1}function od(t,e,i){const n=i.createContext(t);return!!i.checkChild(n,"paragraph")&&!!i.checkChild(n.push("paragraph"),e)}function rd(t,e){const i=e.createElement("paragraph");return e.insert(i,t),e.createPositionAt(i,0)}class ad extends Hh{elementToElement(t){return this.add(ld(t))}elementToAttribute(t){return this.add(function(t){t=Wh(t),dd(t);const e=ud(t,!1),i=cd(t.view),n=i?`element:${i}`:"element";return i=>{i.on(n,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=Wh(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;let i;if("class"==e||"style"==e){i={["class"==e?"classes":"styles"]:t.view.value}}else{i={attributes:{[e]:void 0===t.view.value?/[\s\S]*/:t.view.value}}}t.view.name&&(i.name=t.view.name);return t.view=i,e}(t));dd(t,e);const i=ud(t,!0);return e=>{e.on("element",i,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){const e=function(t){return(e,i)=>{const n="string"==typeof t?t:t(e,i);return i.writer.createElement("$marker",{"data-name":n})}}(t.model);return ld({...t,model:e})}(t))}dataToMarker(t){return this.add(function(t){t=Wh(t),t.model||(t.model=e=>e?t.view+":"+e:t.view);const e={view:t.view,model:t.model},i=hd(fd(e,"start")),n=hd(fd(e,"end"));return s=>{s.on(`element:${t.view}-start`,i,{priority:t.converterPriority||"normal"}),s.on(`element:${t.view}-end`,n,{priority:t.converterPriority||"normal"});const o=w.get("low"),r=w.get("highest"),a=w.get(t.converterPriority)/r;s.on("element",function(t){return(e,i,n)=>{const s=`data-${t.view}`;function o(e,s){for(const o of s){const s=t.model(o,n),r=n.writer.createElement("$marker",{"data-name":s});n.writer.insert(r,e),i.modelCursor.isEqual(e)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(e,1),i.modelRange=i.modelRange._getTransformedByInsertion(e,1)[0]}}(n.consumable.test(i.viewItem,{attributes:s+"-end-after"})||n.consumable.test(i.viewItem,{attributes:s+"-start-after"})||n.consumable.test(i.viewItem,{attributes:s+"-end-before"})||n.consumable.test(i.viewItem,{attributes:s+"-start-before"}))&&(i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor)),n.consumable.consume(i.viewItem,{attributes:s+"-end-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(s+"-end-after").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-start-after"})&&o(i.modelRange.end,i.viewItem.getAttribute(s+"-start-after").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-end-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(s+"-end-before").split(",")),n.consumable.consume(i.viewItem,{attributes:s+"-start-before"})&&o(i.modelRange.start,i.viewItem.getAttribute(s+"-start-before").split(",")))}}(e),{priority:o+a})}}(t))}}function ld(t){const e=hd(t=Wh(t)),i=cd(t.view),n=i?`element:${i}`:"element";return i=>{i.on(n,e,{priority:t.converterPriority||"normal"})}}function cd(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function hd(t){const e=new Tr(t.view);return(i,n,s)=>{const o=e.match(n.viewItem);if(!o)return;const r=o.match;if(r.name=!0,!s.consumable.test(n.viewItem,r))return;const a=function(t,e,i){return t instanceof Function?t(e,i):i.writer.createElement(t)}(t.model,n.viewItem,s);a&&s.safeInsert(a,n.modelCursor)&&(s.consumable.consume(n.viewItem,r),s.convertChildren(n.viewItem,a),s.updateConversionResult(a,n))}}function dd(t,e=null){const i=null===e||(t=>t.getAttribute(e)),n="object"!=typeof t.model?t.model:t.model.key,s="object"!=typeof t.model||void 0===t.model.value?i:t.model.value;t.model={key:n,value:s}}function ud(t,e){const i=new Tr(t.view);return(n,s,o)=>{if(!s.modelRange&&e)return;const r=i.match(s.viewItem);if(!r)return;if(!function(t,e){const i="function"==typeof t?t(e):t;if("object"==typeof i&&!cd(i))return!1;return!i.classes&&!i.attributes&&!i.styles}(t.view,s.viewItem)?delete r.match.name:r.match.name=!0,!o.consumable.test(s.viewItem,r.match))return;const a=t.model.key,l="function"==typeof t.model.value?t.model.value(s.viewItem,o):t.model.value;if(null===l)return;s.modelRange||Object.assign(s,o.convertChildren(s.viewItem,s.modelCursor));const c=function(t,e,i,n){let s=!1;for(const o of Array.from(t.getItems({shallow:i})))n.schema.checkAttribute(o,e.key)&&(s=!0,o.hasAttribute(e.key)||n.writer.setAttribute(e.key,e.value,o));return s}(s.modelRange,{key:a,value:l},e,o);c&&(o.consumable.test(s.viewItem,{name:!0})&&(r.match.name=!0),o.consumable.consume(s.viewItem,r.match))}}function fd(t,e){return{view:`${t.view}-${e}`,model:(e,i)=>{const n=e.getAttribute("name"),s=t.model(n,i);return i.writer.createElement("$marker",{"data-name":s})}}}class md extends(q()){constructor(t,e){super(),this.model=t,this.view=new ah(e),this.mapper=new Ah,this.downcastDispatcher=new Ph({mapper:this.mapper,schema:t.schema});const i=this.model.document,n=i.selection,s=this.model.markers;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(i,"change",(()=>{this.view.change((t=>{this.downcastDispatcher.convertChanges(i.differ,s,t),this.downcastDispatcher.convertSelection(n,s,t)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(i,n)=>{const s=n.newSelection,o=[];for(const t of s.getRanges())o.push(e.toModelRange(t));const r=t.createSelection(o,{backward:s.isBackward});r.isEqual(t.document.selection)||t.change((t=>{t.setSelection(r)}))}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",((t,e,i)=>{if(!i.consumable.consume(e.item,t.name))return;const n=i.writer,s=i.mapper.toViewPosition(e.range.start),o=n.createText(e.item.data);n.insert(s,o)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,i)=>{i.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||i.convertChildren(e.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((t,e,i)=>{const n=i.mapper.toViewPosition(e.position),s=e.position.getShiftedBy(e.length),o=i.mapper.toViewPosition(s,{isPhantom:!0}),r=i.writer.createRange(n,o),a=i.writer.remove(r.getTrimmed());for(const t of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(t,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,i)=>{const n=i.writer,s=n.document.selection;for(const t of s.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&i.writer.mergeAttributes(t.start);n.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((t,e,i)=>{const n=e.selection;if(n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const s=[];for(const t of n.getRanges())s.push(i.mapper.toViewRange(t));i.writer.setSelection(s,{backward:n.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,i)=>{const n=e.selection;if(!n.isCollapsed)return;if(!i.consumable.consume(n,"selection"))return;const s=i.writer,o=n.getFirstPosition(),r=i.mapper.toViewPosition(o),a=s.breakAttributes(r);s.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((t=>{if("$graveyard"==t.rootName)return null;const e=new La(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,i=this.model.markers.get(e);if(!i)throw new v("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:e});this.model.change((()=>{this.model.markers._refresh(i)}))}reconvertItem(t){this.model.change((()=>{this.model.document.differ._refreshItem(t)}))}}class gd{constructor(){this._consumables=new Map}add(t,e){let i;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?i=this._consumables.get(t):(i=new wd(t),this._consumables.set(t,i)),i.add(e))}test(t,e){const i=this._consumables.get(t);return void 0===i?null:t.is("$text")||t.is("documentFragment")?i:i.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 i=this._consumables.get(t);void 0!==i&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):i.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},i=t.getAttributeKeys();for(const t of i)"style"!=t&&"class"!=t&&e.attributes.push(t);const n=t.getClassNames();for(const t of n)e.classes.push(t);const s=t.getStyleNames();for(const t of s)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new gd),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,gd.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const i of t.getChildren())e=gd.createFrom(i,e);return e}}const pd=["attributes","classes","styles"];class wd{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 pd)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e of pd)if(e in t){const i=this._test(e,t[e]);if(!0!==i)return i}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e of pd)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e of pd)e in t&&this._revert(e,t[e])}_add(t,e){const i=pt(e)?e:[e],n=this._consumables[t];for(const e of i){if("attributes"===t&&("class"===e||"style"===e))throw new v("viewconsumable-invalid-attribute",this);if(n.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))n.set(t,!0)}}_test(t,e){const i=pt(e)?e:[e],n=this._consumables[t];for(const e of i)if("attributes"!==t||"class"!==e&&"style"!==e){const t=n.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",i=this._test(t,[...this._consumables[t].keys()]);if(!0!==i)return i}return!0}_consume(t,e){const i=pt(e)?e:[e],n=this._consumables[t];for(const e of i)if("attributes"!==t||"class"!==e&&"style"!==e){if(n.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))n.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const i=pt(e)?e:[e],n=this._consumables[t];for(const e of i)if("attributes"!==t||"class"!==e&&"style"!==e){!1===n.get(e)&&n.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}class bd extends(q()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((t,e)=>{e[0]=new _d(e[0])}),{priority:"highest"}),this.on("checkChild",((t,e)=>{e[0]=new _d(e[0]),e[1]=this.getDefinition(e[1])}),{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new v("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 v("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 i=this.getDefinition(t.last);return!!i&&i.allowAttributes.includes(e)}checkMerge(t,e){if(t instanceof ph){const e=t.nodeBefore,i=t.nodeAfter;if(!(e instanceof fh))throw new v("schema-check-merge-no-element-before",this);if(!(i instanceof fh))throw new v("schema-check-merge-no-element-after",this);return this.checkMerge(e,i)}for(const i of e.getChildren())if(!this.checkChild(t,i))return!1;return!0}addChildCheck(t){this.on("checkChild",((e,[i,n])=>{if(!n)return;const s=t(i,n);"boolean"==typeof s&&(e.stop(),e.return=s)}),{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",((e,[i,n])=>{const s=t(i,n);"boolean"==typeof s&&(e.stop(),e.return=s)}),{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 ph)e=t.parent;else{e=(t instanceof kh?[t]:Array.from(t.getRanges())).reduce(((t,e)=>{const i=e.getCommonAncestor();return t?t.getCommonAncestor(i,{includeSelf:!0}):i}),null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const i=[...t.getFirstPosition().getAncestors(),new dh("",t.getAttributes())];return this.checkAttribute(i,e)}{const i=t.getRanges();for(const t of i)for(const i of t)if(this.checkAttribute(i.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const i of t)yield*this._getValidRangesForRange(i,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new kh(t);let i,n;const s=t.getAncestors().reverse().find((t=>this.isLimit(t)))||t.root;"both"!=e&&"backward"!=e||(i=new mh({boundaries:kh._createIn(s),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(n=new mh({boundaries:kh._createIn(s),startPosition:t}));for(const t of function*(t,e){let i=!1;for(;!i;){if(i=!0,t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}}}(i,n)){const e=t.walker==i?"elementEnd":"elementStart",n=t.value;if(n.type==e&&this.isObject(n.item))return kh._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new kh(n.nextPosition)}return null}findAllowedParent(t,e){let i=t.parent;for(;i;){if(this.checkChild(i,e))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(t,e,i){const n=i.model;for(const[s,o]of Object.entries(e))n.schema.checkAttribute(t,s)&&i.setAttribute(s,o,t)}removeDisallowedAttributes(t,e){for(const i of t)if(i.is("$text"))Id(this,i,e);else{const t=kh._createIn(i).getPositions();for(const i of t){Id(this,i.nodeBefore||i.parent,e)}}}getAttributesWithProperty(t,e,i){const n={};for(const[s,o]of t.getAttributes()){const t=this.getAttributeProperties(s);void 0!==t[e]&&(void 0!==i&&i!==t[e]||(n[s]=o))}return n}createContext(t){return new _d(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,i=Object.keys(e);for(const n of i)t[n]=vd(e[n],n);for(const e of i)yd(t,e);for(const e of i)kd(t,e);for(const e of i)Ad(t,e);for(const e of i)xd(t,e),Cd(t,e);for(const e of i)Pd(t,e),Td(t,e),Ed(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,i=e.length-1){const n=e.getItem(i);if(t.allowIn.includes(n.name)){if(0==i)return!0;{const t=this.getDefinition(n);return this._checkContextMatch(t,e,i-1)}}return!1}*_getValidRangesForRange(t,e){let i=t.start,n=t.start;for(const s of t.getItems({shallow:!0}))s.is("element")&&(yield*this._getValidRangesForRange(kh._createIn(s),e)),this.checkAttribute(s,e)||(i.isEqual(n)||(yield new kh(i,n)),i=ph._createAfter(s)),n=ph._createAfter(s);i.isEqual(n)||(yield new kh(i,n))}}class _d{constructor(t){if(t instanceof _d)return t;let e;e="string"==typeof t?[t]:Array.isArray(t)?t:t.getAncestors({includeSelf:!0}),this._items=e.map(Od)}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 _d([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 vd(t,e){const i={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(t,e){for(const i of t){const t=Object.keys(i).filter((t=>t.startsWith("is")));for(const n of t)e[n]=!!i[n]}}(t,i),Sd(t,i,"allowIn"),Sd(t,i,"allowContentOf"),Sd(t,i,"allowWhere"),Sd(t,i,"allowAttributes"),Sd(t,i,"allowAttributesOf"),Sd(t,i,"allowChildren"),Sd(t,i,"inheritTypesFrom"),function(t,e){for(const i of t){const t=i.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,i),i}function yd(t,e){const i=t[e];for(const n of i.allowChildren){const i=t[n];i&&i.allowIn.push(e)}i.allowChildren.length=0}function kd(t,e){for(const i of t[e].allowContentOf)if(t[i]){Rd(t,i).forEach((t=>{t.allowIn.push(e)}))}delete t[e].allowContentOf}function Ad(t,e){for(const i of t[e].allowWhere){const n=t[i];if(n){const i=n.allowIn;t[e].allowIn.push(...i)}}delete t[e].allowWhere}function xd(t,e){for(const i of t[e].allowAttributesOf){const n=t[i];if(n){const i=n.allowAttributes;t[e].allowAttributes.push(...i)}}delete t[e].allowAttributesOf}function Cd(t,e){const i=t[e];for(const e of i.inheritTypesFrom){const n=t[e];if(n){const t=Object.keys(n).filter((t=>t.startsWith("is")));for(const e of t)e in i||(i[e]=n[e])}}delete i.inheritTypesFrom}function Pd(t,e){const i=t[e],n=i.allowIn.filter((e=>t[e]));i.allowIn=Array.from(new Set(n))}function Td(t,e){const i=t[e];for(const n of i.allowIn){t[n].allowChildren.push(e)}}function Ed(t,e){const i=t[e];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function Sd(t,e,i){for(const n of t){const t=n[i];"string"==typeof t?e[i].push(t):Array.isArray(t)&&e[i].push(...t)}}function Rd(t,e){const i=t[e];return(n=t,Object.keys(n).map((t=>n[t]))).filter((t=>t.allowIn.includes(i.name)));var n}function Od(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 Id(t,e,i){for(const n of e.getAttributeKeys())t.checkAttribute(e,n)||i.removeAttribute(n,e)}class Vd extends(R()){constructor(t){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...t,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,i=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let i;for(const n of new _d(t)){const t={};for(const e of n.getAttributeKeys())t[e]=n.getAttribute(e);const s=e.createElement(n.name,t);i&&e.insert(s,i),i=ph._createAt(s,0)}return i}(i,e),this.conversionApi.writer=e,this.conversionApi.consumable=gd.createFrom(t),this.conversionApi.store={};const{modelRange:n}=this._convertItem(t,this._modelCursor),s=e.createDocumentFragment();if(n){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,s);s.markers=function(t,e){const i=new Set,n=new Map,s=kh._createIn(t).getItems();for(const t of s)t.is("element","$marker")&&i.add(t);for(const t of i){const i=t.getAttribute("data-name"),s=e.createPositionBefore(t);n.has(i)?n.get(i).end=s.clone():n.set(i,new kh(s.clone())),e.remove(t)}return n}(s,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,s}_convertItem(t,e){const i={viewItem:t,modelCursor:e,modelRange:null};if(t.is("element")?this.fire(`element:${t.name}`,i,this.conversionApi):t.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof kh))throw new v("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(t,e){let i=e.is("position")?e:ph._createAt(e,0);const n=new kh(i);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,i);t.modelRange instanceof kh&&(n.end=t.modelRange.end,i=t.modelCursor)}return{modelRange:n,modelCursor:i}}_safeInsert(t,e){const i=this._splitToAllowedParent(t,e);return!!i&&(this.conversionApi.writer.insert(t,i.position),!0)}_updateConversionResult(t,e){const i=this._getSplitParts(t),n=this.conversionApi.writer;e.modelRange||(e.modelRange=n.createRange(n.createPositionBefore(t),n.createPositionAfter(i[i.length-1])));const s=this._cursorParents.get(t);e.modelCursor=s?n.createPositionAt(s,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:i,writer:n}=this.conversionApi;let s=i.findAllowedParent(e,t);if(s){if(s===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(s)&&(s=null)}if(!s)return od(e,t,i)?{position:rd(e,n)}:null;const o=this.conversionApi.writer.split(e,s),r=[];for(const t of o.range.getWalker())if("elementEnd"==t.type)r.push(t.item);else{const e=r.pop(),i=t.item;this._registerSplitPair(e,i)}const a=o.range.end.parent;return this._cursorParents.set(t,a),{position:o.position,cursorParent:a}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const i=this._splitParts.get(t);this._splitParts.set(e,i),i.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 Md{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class Nd{constructor(t){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new jl(t,{renderingMode:"data"}),this.htmlWriter=new Md}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"),i=e.createDocumentFragment(),n=e.body.childNodes;for(;n.length>0;)i.appendChild(n[0]);return i}}class Bd extends(R()){constructor(t,e){super(),this.model=t,this.mapper=new Ah,this.downcastDispatcher=new Ph({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",((t,e,i)=>{if(!i.consumable.consume(e.item,t.name))return;const n=i.writer,s=i.mapper.toViewPosition(e.range.start),o=n.createText(e.item.data);n.insert(s,o)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,i)=>{i.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||i.convertChildren(e.item)}),{priority:"lowest"}),this.upcastDispatcher=new Vd({schema:t.schema}),this.viewDocument=new Xa(e),this.stylesProcessor=e,this.htmlProcessor=new Nd(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new dl(this.viewDocument),this.upcastDispatcher.on("text",((t,e,{schema:i,consumable:n,writer:s})=>{let o=e.modelCursor;if(!n.test(e.viewItem))return;if(!i.checkChild(o,"$text")){if(!od(o,"$text",i))return;if(0==e.viewItem.data.trim().length)return;const t=o.nodeBefore;o=rd(o,s),t&&t.is("element","$marker")&&(s.move(s.createRangeOn(t),o),o=s.createPositionAfter(t))}n.consume(e.viewItem);const r=s.createText(e.viewItem.data);s.insert(r,o),e.modelRange=s.createRange(o,o.getShiftedBy(r.offsetSize)),e.modelCursor=e.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((t,e,i)=>{if(!e.modelRange&&i.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:n}=i.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=n}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((t,e,i)=>{if(!e.modelRange&&i.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:n}=i.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=n}}),{priority:"lowest"}),q().prototype.decorate.call(this,"init"),q().prototype.decorate.call(this,"set"),q().prototype.decorate.call(this,"get"),q().prototype.decorate.call(this,"toView"),q().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},sd)}),{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:i="empty"}=t;if(!this._checkIfRootsExists([e]))throw new v("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(e);return"empty"!==i||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,t):""}stringify(t,e={}){const i=this.toView(t,e);return this.processor.toData(i)}toView(t,e={}){const i=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const s=kh._createIn(t),o=new hl(i);this.mapper.bindElements(t,o);const r=t.is("documentFragment")?t.markers:function(t){const e=[],i=t.root.document;if(!i)return new Map;const n=kh._createIn(t);for(const t of i.model.markers){const i=t.getRange(),s=i.isCollapsed,o=i.start.isEqual(n.start)||i.end.isEqual(n.end);if(s&&o)e.push([t.name,i]);else{const s=n.getIntersection(i);s&&e.push([t.name,s])}}return e.sort((([t,e],[i,n])=>{if("after"!==e.end.compareWith(n.start))return 1;if("before"!==e.start.compareWith(n.end))return-1;switch(e.start.compareWith(n.start)){case"before":return 1;case"after":return-1;default:switch(e.end.compareWith(n.end)){case"before":return 1;case"after":return-1;default:return i.localeCompare(t)}}})),new Map(e)}(t);return this.downcastDispatcher.convert(s,r,n,e),o}init(t){if(this.model.document.version)throw new v("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new v("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(t=>{for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.insert(this.parse(e[i],n),n,0)}})),Promise.resolve()}set(t,e={}){let i={};if("string"==typeof t?i.main=t:i=t,!this._checkIfRootsExists(Object.keys(i)))throw new v("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(i)){const n=this.model.document.getRoot(e);t.remove(t.createRangeIn(n)),t.insert(this.parse(i[e],n),n,0)}}))}parse(t,e="$root"){const i=this.processor.toView(t);return this.toModel(i,e)}toModel(t,e="$root"){return this.model.change((i=>this.upcastDispatcher.convert(t,i,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.getRootNames().includes(e))return!1;return!0}}class Dd{constructor(t,e){this._helpers=new Map,this._downcast=so(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=so(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const i=this._downcast.includes(e);if(!this._upcast.includes(e)&&!i)throw new v("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:i})}for(t){if(!this._helpers.has(t))throw new v("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:i}of Fd(t))this.for("upcast").elementToElement({model:e,view:i,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:i}of Fd(t))this.for("upcast").elementToAttribute({view:i,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:i}of Fd(t))this.for("upcast").attributeToAttribute({view:i,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:i}){if(this._helpers.has(t))throw new v("conversion-group-exists",this);const n=i?new qh(e):new ad(e);this._helpers.set(t,n)}}function*Fd(t){if(t.model.values)for(const e of t.model.values){const i={key:t.model.key,value:e},n=t.view[e],s=t.upcastAlso?t.upcastAlso[e]:void 0;yield*Ld(i,n,s)}else yield*Ld(t.model,t.view,t.upcastAlso)}function*Ld(t,e,i){if(yield{model:t,view:e},i)for(const e of so(i))yield{model:t,view:e}}class zd{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 Hd(t,e){const i=Wd(e),n=i.reduce(((t,e)=>t+e.offsetSize),0),s=t.parent;Ud(t);const o=t.index;return s._insertChild(o,i),qd(s,o+i.length),qd(s,o),new kh(t,t.getShiftedBy(n))}function jd(t){if(!t.isFlat)throw new v("operation-utils-remove-range-not-flat",this);const e=t.start.parent;Ud(t.start),Ud(t.end);const i=e._removeChildren(t.start.index,t.end.index-t.start.index);return qd(e,t.start.index),i}function $d(t,e){if(!t.isFlat)throw new v("operation-utils-move-range-not-flat",this);const i=jd(t);return Hd(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),i)}function Wd(t){const e=[];!function t(i){if("string"==typeof i)e.push(new dh(i));else if(i instanceof uh)e.push(new dh(i.data,i.getAttributes()));else if(i instanceof ch)e.push(i);else if(tt(i))for(const e of i)t(e)}(t);for(let t=1;tt.maxOffset)throw new v("move-operation-nodes-do-not-exist",this);if(t===e&&i=i&&this.targetPosition.path[t]t._clone(!0)))),e=new Jd(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new ph(t,[0]);return new Gd(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffsett._clone(!0)))),Hd(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 i=[];for(const e of t.nodes)e.name?i.push(fh.fromJSON(e)):i.push(dh.fromJSON(e));const n=new Jd(ph.fromJSON(t.position,e),i,t.baseVersion);return n.shouldReceiveAttributes=t.shouldReceiveAttributes,n}}class Qd extends zd{constructor(t,e,i,n,s,o){super(o),this.name=t,this.oldRange=e?e.clone():null,this.newRange=i?i.clone():null,this.affectsData=s,this._markers=n}get type(){return"marker"}clone(){return new Qd(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Qd(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new Qd(t.name,t.oldRange?kh.fromJSON(t.oldRange,e):null,t.newRange?kh.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}const Yd=function(t,e){return Qc(t,e)};class Zd extends zd{constructor(t,e,i,n,s){super(s),this.range=t.clone(),this.key=e,this.oldValue=void 0===i?null:i,this.newValue=void 0===n?null:n}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new Zd(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Zd(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new v("attribute-operation-range-not-flat",this);for(const t of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!Yd(t.getAttribute(this.key),this.oldValue))throw new v("attribute-operation-wrong-old-value",this,{item:t,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&t.hasAttribute(this.key))throw new v("attribute-operation-attribute-exists",this,{node:t,key:this.key})}}_execute(){Yd(this.oldValue,this.newValue)||function(t,e,i){Ud(t.start),Ud(t.end);for(const n of t.getItems({shallow:!0})){const t=n.is("$textProxy")?n.textNode:n;null!==i?t._setAttribute(e,i):t._removeAttribute(e),qd(t.parent,t.index)}qd(t.end.parent,t.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(t,e){return new Zd(kh.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Xd extends zd{get type(){return"noop"}clone(){return new Xd(this.baseVersion)}getReversed(){return new Xd(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class tu extends zd{constructor(t,e,i,n){super(n),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=i}get type(){return"rename"}clone(){return new tu(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new tu(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof fh))throw new v("rename-operation-wrong-position",this);if(t.name!==this.oldName)throw new v("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new tu(ph.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class eu extends zd{constructor(t,e,i,n,s){super(s),this.root=t,this.key=e,this.oldValue=i,this.newValue=n}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new eu(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new eu(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new v("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new v("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new v("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new v("rootattribute-operation-fromjson-no-root",this,{rootName:t.root});return new eu(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class iu extends zd{constructor(t,e,i,n,s){super(s),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new ph(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new kh(this.sourcePosition,t)}clone(){return new iu(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),i=new ph(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);return new nu(t,this.howMany,i,this.graveyardPosition,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new v("merge-operation-source-position-invalid",this);if(!e.parent)throw new v("merge-operation-target-position-invalid",this);if(this.howMany!=t.maxOffset)throw new v("merge-operation-how-many-invalid",this)}_execute(){const t=this.sourcePosition.parent;$d(kh._createIn(t),this.targetPosition),$d(kh._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const i=ph.fromJSON(t.sourcePosition,e),n=ph.fromJSON(t.targetPosition,e),s=ph.fromJSON(t.graveyardPosition,e);return new this(i,t.howMany,n,s,t.baseVersion)}}class nu extends zd{constructor(t,e,i,n,s){super(s),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=i,this.graveyardPosition=n?n.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 ph(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new kh(this.splitPosition,t)}clone(){return new nu(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new ph(t,[0]);return new iu(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const n=t.range.getDifference(e.range).map((e=>new Zd(e,t.key,t.oldValue,t.newValue,0))),s=t.range.getIntersection(e.range);return s&&i.aIsStrong&&n.push(new Zd(s,e.key,e.newValue,t.newValue,0)),0==n.length?[new Xd(0)]:n}return[t]})),au(Zd,Jd,((t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const i=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map((e=>new Zd(e,t.key,t.oldValue,t.newValue,t.baseVersion)));if(e.shouldReceiveAttributes){const n=mu(e,t.key,t.oldValue);n&&i.unshift(n)}return i}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]})),au(Zd,iu,((t,e)=>{const i=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&i.push(kh._createFromPositionAndShift(e.graveyardPosition,1));const n=t.range._getTransformedByMergeOperation(e);return n.isCollapsed||i.push(n),i.map((e=>new Zd(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),au(Zd,Gd,((t,e)=>{const i=function(t,e){const i=kh._createFromPositionAndShift(e.sourcePosition,e.howMany);let n=null,s=[];i.containsRange(t,!0)?n=t:t.start.hasSameParentAs(i.start)?(s=t.getDifference(i),n=t.getIntersection(i)):s=[t];const o=[];for(let t of s){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=e.getMovedRangeStart(),n=t.start.hasSameParentAs(i),s=t._getTransformedByInsertion(i,e.howMany,n);o.push(...s)}n&&o.push(n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return o}(t.range,e);return i.map((e=>new Zd(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),au(Zd,nu,((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 i=t.clone();return i.range=new kh(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,i]}return t.range=t.range._getTransformedBySplitOperation(e),[t]})),au(Jd,Zd,((t,e)=>{const i=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const n=mu(t,e.key,e.newValue);n&&i.push(n)}return i})),au(Jd,Jd,((t,e,i)=>(t.position.isEqual(e.position)&&i.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t]))),au(Jd,Gd,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),au(Jd,nu,((t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t]))),au(Jd,iu,((t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t]))),au(Qd,Jd,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t]))),au(Qd,Qd,((t,e,i)=>{if(t.name==e.name){if(!i.aIsStrong)return[new Xd(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]})),au(Qd,iu,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t]))),au(Qd,Gd,((t,e,i)=>{if(t.oldRange&&(t.oldRange=kh._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(i.abRelation){const n=kh._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==i.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.end=n.end,t.newRange.start.path=i.abRelation.path,[t];if("right"==i.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=n.start,t.newRange.end.path=i.abRelation.path,[t]}t.newRange=kh._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]})),au(Qd,nu,((t,e,i)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(i.abRelation){const n=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?t.newRange.start=ph._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!i.abRelation.wasInLeftElement&&(t.newRange.start=ph._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasInRightElement?t.newRange.end=ph._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?t.newRange.end=ph._createAt(e.insertionPosition):t.newRange.end=n.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]})),au(iu,Jd,((t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t]))),au(iu,iu,((t,e,i)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(i.bWasUndone){const i=e.graveyardPosition.path.slice();return i.push(0),t.sourcePosition=new ph(e.graveyardPosition.root,i),t.howMany=0,[t]}return[new Xd(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const n="$graveyard"==t.targetPosition.root.rootName,s="$graveyard"==e.targetPosition.root.rootName;if(s&&!n||!(n&&!s)&&i.aIsStrong){const i=e.targetPosition._getTransformedByMergeOperation(e),n=t.targetPosition._getTransformedByMergeOperation(e);return[new Gd(i,t.howMany,n,0)]}return[new Xd(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)&&i.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),au(iu,Gd,((t,e,i)=>{const n=kh._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!i.bWasUndone&&!i.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition)?[new Xd(0)]:(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.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])})),au(iu,nu,((t,e,i)=>{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 n=0!=e.howMany,s=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(n||s||"mergeTargetNotMoved"==i.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==i.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]})),au(Gd,Jd,((t,e)=>{const i=kh._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]})),au(Gd,Gd,((t,e,i)=>{const n=kh._createFromPositionAndShift(t.sourcePosition,t.howMany),s=kh._createFromPositionAndShift(e.sourcePosition,e.howMany);let o,r=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),o=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),gu(t,e)&&gu(e,t))return[e.getReversed()];if(n.containsPosition(e.targetPosition)&&n.containsRange(s,!0))return n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),pu([n],o);if(s.containsPosition(t.targetPosition)&&s.containsRange(n,!0))return n.start=n.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),n.end=n.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),pu([n],o);const l=X(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),pu([n],o);"remove"!=t.type||"remove"==e.type||i.aWasUndone||i.forceWeakRemove?"remove"==t.type||"remove"!=e.type||i.bWasUndone||i.forceWeakRemove||(r=!1):r=!0;const c=[],h=n.getDifference(s);for(const t of h){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const i="same"==X(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),n=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,i);c.push(...n)}const d=n.getIntersection(s);return null!==d&&r&&(d.start=d.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),d.end=d.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===c.length?c.push(d):1==c.length?s.start.isBefore(n.start)||s.start.isEqual(n.start)?c.unshift(d):c.push(d):c.splice(1,0,d)),0===c.length?[new Xd(t.baseVersion)]:pu(c,o)})),au(Gd,nu,((t,e,i)=>{let n=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(n=t.targetPosition._getTransformedBySplitOperation(e));const s=kh._createFromPositionAndShift(t.sourcePosition,t.howMany);if(s.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=n,[t];if(s.start.hasSameParentAs(e.splitPosition)&&s.containsPosition(e.splitPosition)){let t=new kh(e.splitPosition,s.end);t=t._getTransformedBySplitOperation(e);return pu([new kh(s.start,e.splitPosition),t],n)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==i.abRelation&&(n=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==i.abRelation&&(n=t.targetPosition);const o=[s._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const n=s.start.isEqual(e.graveyardPosition)||s.containsPosition(e.graveyardPosition);t.howMany>1&&n&&!i.aWasUndone&&o.push(kh._createFromPositionAndShift(e.insertionPosition,1))}return pu(o,n)})),au(Gd,iu,((t,e,i)=>{const n=kh._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition))if("remove"!=t.type||i.forceWeakRemove){if(1==t.howMany)return i.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new Xd(0)]}else if(!i.aWasUndone){const i=[];let n=e.graveyardPosition.clone(),s=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(i.push(new Gd(t.sourcePosition,t.howMany-1,t.targetPosition,0)),n=n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),s=s._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const o=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),r=new Gd(n,1,o,0),a=r.getMovedRangeStart().path.slice();a.push(0);const l=new ph(r.targetPosition.root,a);s=s._getTransformedByMove(n,o,1);const c=new Gd(s,e.howMany,l,0);return i.push(r),i.push(c),i}const s=kh._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=s.start,t.howMany=s.end.offset-s.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]})),au(tu,Jd,((t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t]))),au(tu,iu,((t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t]))),au(tu,Gd,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),au(tu,tu,((t,e,i)=>{if(t.position.isEqual(e.position)){if(!i.aIsStrong)return[new Xd(0)];t.oldName=e.newName}return[t]})),au(tu,nu,((t,e)=>{if("same"==X(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){const e=new tu(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]})),au(eu,eu,((t,e,i)=>{if(t.root===e.root&&t.key===e.key){if(!i.aIsStrong||t.newValue===e.newValue)return[new Xd(0)];t.oldValue=e.newValue}return[t]})),au(nu,Jd,((t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!i.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const i=e.graveyardPosition.path.slice();i.push(0);const n=new ph(e.graveyardPosition.root,i),s=nu.getInsertionPosition(new ph(e.graveyardPosition.root,i)),o=new nu(n,0,s,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=nu.getInsertionPosition(t.splitPosition),t.graveyardPosition=o.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[o,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=nu.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),au(nu,Gd,((t,e,i)=>{const n=kh._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const s=n.start.isEqual(t.graveyardPosition)||n.containsPosition(t.graveyardPosition);if(!i.bWasUndone&&s){const i=t.splitPosition._getTransformedByMoveOperation(e),n=t.graveyardPosition._getTransformedByMoveOperation(e),s=n.path.slice();s.push(0);const o=new ph(n.root,s);return[new Gd(i,t.howMany,o,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const s=t.splitPosition.isEqual(e.targetPosition);if(s&&("insertAtSource"==i.baRelation||"splitBefore"==i.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=nu.getInsertionPosition(t.splitPosition),[t];if(s&&i.abRelation&&i.abRelation.howMany){const{howMany:e,offset:n}=i.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(n),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const i=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=i,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new Xd(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new Xd(0)];if("splitBefore"==i.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const n="$graveyard"==t.splitPosition.root.rootName,s="$graveyard"==e.splitPosition.root.rootName;if(s&&!n||!(n&&!s)&&i.aIsStrong){const i=[];return e.howMany&&i.push(new Gd(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&i.push(new Gd(t.splitPosition,t.howMany,t.moveTargetPosition,0)),i}return[new Xd(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.baRelation){const i=e.insertionPosition.path.slice();i.push(0);const n=new ph(e.insertionPosition.root,i);return[t,new Gd(t.insertionPosition,1,n,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset{const i=e[0];i.isDocumentOperation&&_u.call(this,i)}),{priority:"low"})}function _u(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)}}wu.prototype.is=function(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t};class vu{constructor(t={}){"string"==typeof t&&(t="transparent"===t?{isUndoable:!1}:{},y("batch-constructor-deprecated-string-type"));const{isUndoable:e=!0,isLocal:i=!0,isUndo:n=!1,isTyping:s=!1}=t;this.operations=[],this.isUndoable=e,this.isLocal=i,this.isUndo=n,this.isTyping=s}get type(){return y("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}}class yu{constructor(t){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=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}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),i=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),i||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=kh._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 i=e.graveyardPosition.parent;this._markInsert(i,e.graveyardPosition.offset,1);const n=e.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,i){const n=this._changedMarkers.get(t);n?(n.newMarkerData=i,null==n.oldMarkerData.range&&null==i.range&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{newMarkerData:i,oldMarkerData:e})}getMarkersToRemove(){const t=[];for(const[e,i]of this._changedMarkers)null!=i.oldMarkerData.range&&t.push({name:e,range:i.oldMarkerData.range});return t}getMarkersToAdd(){const t=[];for(const[e,i]of this._changedMarkers)null!=i.newMarkerData.range&&t.push({name:e,range:i.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._changesInElement.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 i=t.range&&!e.range,n=!t.range&&e.range,s=t.range&&e.range&&!t.range.isEqual(e.range);if(i||n||s)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 i=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(xu),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_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=kh._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._cachedChanges=null}_markInsert(t,e,i){const n={type:"insert",offset:e,howMany:i,count:this._changeCount++};this._markChange(t,n)}_markRemove(t,e,i){const n={type:"remove",offset:e,howMany:i,count:this._changeCount++};this._markChange(t,n),this._removeAllNestedChanges(t,e,i)}_markAttribute(t){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 i=this._getChangesForElement(t);this._handleChange(e,i),i.push(e);for(let t=0;ti.offset){if(n>s){const t={type:"attribute",offset:s,howMany:n-s,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=i.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=i.offset&&t.offsets?(t.nodesToHandle=n-s,t.offset=s):t.nodesToHandle=0);if("remove"==i.type&&t.offseti.offset){const s={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(s,e),e.push(s),t.nodesToHandle=i.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==i.type&&(t.offset>=i.offset&&n<=s?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=i.offset&&n>=s&&(i.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,i){return{type:"insert",position:ph._createAt(t,e),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,i){return{type:"remove",position:ph._createAt(t,e),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,i){const n=[];i=new Map(i);for(const[s,o]of e){const e=i.has(s)?i.get(s):null;e!==o&&n.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:s,attributeOldValue:o,attributeNewValue:e,changeCount:this._changeCount++}),i.delete(s)}for(const[e,s]of i)n.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:s,changeCount:this._changeCount++});return n}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const i=this._changesInElement.get(e),n=t.startOffset;if(i)for(const t of i)if("insert"==t.type&&n>=t.offset&&nn){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 v("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 i=this._operations[0];void 0===t&&(t=i.baseVersion);let n=e-1;for(const[e,i]of this._gaps)t>e&&te&&nthis.lastOperation.baseVersion)return[];let s=this._baseVersionToOperationIndex.get(t);void 0===s&&(s=0);let o=this._baseVersionToOperationIndex.get(n);return void 0===o&&(o=this._operations.length-1),this._operations.slice(s,o+1)}getOperation(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 Pu extends fh{constructor(t,e,i="main"){super(e),this._document=t,this.rootName=i}get document(){return this._document}toJSON(){return this.rootName}}Pu.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};const Tu="$graveyard";class Eu extends(R()){constructor(t){super(),this.model=t,this.history=new Cu,this.selection=new Fh(this),this.roots=new co({idProperty:"rootName"}),this.differ=new yu(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Tu),this.listenTo(t,"applyOperation",((t,e)=>{const i=e[0];i.isDocumentOperation&&this.differ.bufferOperation(i)}),{priority:"high"}),this.listenTo(t,"applyOperation",((t,e)=>{const i=e[0];i.isDocumentOperation&&this.history.addOperation(i)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(t.markers,"update",((t,e,i,n,s)=>{const o={...e.getData(),range:n};this.differ.bufferMarkerChange(e.name,s,o),null===i&&e.on("change",((t,i)=>{const n=e.getData();this.differ.bufferMarkerChange(e.name,{...n,range:i},n)}))}))}get version(){return this.history.version}set version(t){this.history.version=t}get graveyard(){return this.getRoot(Tu)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new v("model-document-createroot-name-exists",this,{name:e});const i=new Pu(this,t,e);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,(t=>t.rootName)).filter((t=>t!=Tu))}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Ar(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(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,i=e.schema,n=e.createPositionFromPath(t,[0]);return i.getNearestSelectionRange(n)||e.createRange(n)}_validateSelectionRange(t){return Su(t.start)&&Su(t.end)}_callPostFixers(t){let e=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),e=i(t),e)break}while(e)}}function Su(t){const e=t.textNode;if(e){const i=e.data,n=t.offset-e.startOffset;return!po(i,n)&&!wo(i,n)}return!0}class Ru extends(R()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const e=t instanceof Ou?t.name:t;return this._markers.has(e)}get(t){return this._markers.get(t)||null}_set(t,e,i=!1,n=!1){const s=t instanceof Ou?t.name:t;if(s.includes(","))throw new v("markercollection-incorrect-marker-name",this);const o=this._markers.get(s);if(o){const t=o.getData(),r=o.getRange();let a=!1;return r.isEqual(e)||(o._attachLiveRange(Mh.fromRange(e)),a=!0),i!=o.managedUsingOperations&&(o._managedUsingOperations=i,a=!0),"boolean"==typeof n&&n!=o.affectsData&&(o._affectsData=n,a=!0),a&&this.fire(`update:${s}`,o,r,e,t),o}const r=Mh.fromRange(e),a=new Ou(s,r,i,n);return this._markers.set(s,a),this.fire(`update:${s}`,a,null,e,{...a.getData(),range:null}),a}_remove(t){const e=t instanceof Ou?t.name:t,i=this._markers.get(e);return!!i&&(this._markers.delete(e),this.fire(`update:${e}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0)}_refresh(t){const e=t instanceof Ou?t.name:t,i=this._markers.get(e);if(!i)throw new v("markercollection-refresh-marker-not-exists",this);const n=i.getRange();this.fire(`update:${e}`,i,n,n,i.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 Ou extends(R(lh)){constructor(t,e,i,n){super(),this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=i,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new v("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new v("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}}Ou.prototype.is=function(t){return"marker"===t||"model:marker"===t};class Iu extends zd{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new v("detach-operation-on-document-node",this)}_execute(){jd(kh._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Vu extends lh{constructor(t){super(),this.markers=new Map,this._children=new hh,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}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 i of t)e=e.getChild(e.offsetToIndex(i));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 i of t)i.name?e.push(fh.fromJSON(i)):e.push(dh.fromJSON(i));return new Vu(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=function(t){if("string"==typeof t)return[new dh(t)];tt(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new dh(t):t instanceof uh?new dh(t.data,t.getAttributes()):t))}(e);for(const t of i)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i)t.parent=null;return i}}Vu.prototype.is=function(t){return"documentFragment"===t||"model:documentFragment"===t};class Mu{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new dh(t,e)}createElement(t,e){return new fh(t,e)}createDocumentFragment(){return new Vu}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,i=0){if(this._assertWriterUsedCorrectly(),t instanceof dh&&""==t.data)return;const n=ph._createAt(e,i);if(t.parent){if(Lu(t.root,n.root))return void this.move(kh._createOn(t),n);if(t.root.document)throw new v("model-writer-insert-forbidden-move",this);this.remove(t)}const s=n.root.document?n.root.document.version:null,o=new Jd(n,t,s);if(t instanceof dh&&(o.shouldReceiveAttributes=!0),this.batch.addOperation(o),this.model.applyOperation(o),t instanceof Vu)for(const[e,i]of t.markers){const t=ph._createAt(i.root,0),s={range:new kh(i.start._getCombined(t,n),i.end._getCombined(t,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,s):this.addMarker(e,s)}}insertText(t,e,i,n){e instanceof Vu||e instanceof fh||e instanceof ph?this.insert(this.createText(t),e,i):this.insert(this.createText(t,e),i,n)}insertElement(t,e,i,n){e instanceof Vu||e instanceof fh||e instanceof ph?this.insert(this.createElement(t),e,i):this.insert(this.createElement(t,e),i,n)}append(t,e){this.insert(t,e,"end")}appendText(t,e,i){e instanceof Vu||e instanceof fh?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),i,"end")}appendElement(t,e,i){e instanceof Vu||e instanceof fh?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),i,"end")}setAttribute(t,e,i){if(this._assertWriterUsedCorrectly(),i instanceof kh){const n=i.getMinimalFlatRanges();for(const i of n)Nu(this,t,e,i)}else Bu(this,t,e,i)}setAttributes(t,e){for(const[i,n]of mo(t))this.setAttribute(i,n,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof kh){const i=e.getMinimalFlatRanges();for(const e of i)Nu(this,t,null,e)}else Bu(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof kh)for(const i of t.getItems())e(i);else e(t)}move(t,e,i){if(this._assertWriterUsedCorrectly(),!(t instanceof kh))throw new v("writer-move-invalid-range",this);if(!t.isFlat)throw new v("writer-move-range-not-flat",this);const n=ph._createAt(e,i);if(n.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!Lu(t.root,n.root))throw new v("writer-move-different-document",this);const s=t.root.document?t.root.document.version:null,o=new Gd(t.start,t.end.offset-t.start.offset,n,s);this.batch.addOperation(o),this.model.applyOperation(o)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof kh?t:kh._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),Fu(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,i=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof fh))throw new v("writer-merge-no-element-before",this);if(!(i instanceof fh))throw new v("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,i){return this.model.createPositionFromPath(t,e,i)}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,i=t.nodeAfter;this.move(kh._createIn(i),ph._createAt(e,"end")),this.remove(i)}_merge(t){const e=ph._createAt(t.nodeBefore,"end"),i=ph._createAt(t.nodeAfter,0),n=t.root.document.graveyard,s=new ph(n,[0]),o=t.root.document.version,r=new iu(i,t.nodeAfter.maxOffset,e,s,o);this.batch.addOperation(r),this.model.applyOperation(r)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof fh))throw new v("writer-rename-not-element-instance",this);const i=t.root.document?t.root.document.version:null,n=new tu(ph._createBefore(t),t.name,e,i);this.batch.addOperation(n),this.model.applyOperation(n)}split(t,e){this._assertWriterUsedCorrectly();let i,n,s=t.parent;if(!s.parent)throw new v("writer-split-element-no-parent",this);if(e||(e=s.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new v("writer-split-invalid-limit-element",this);do{const e=s.root.document?s.root.document.version:null,o=s.maxOffset-t.offset,r=nu.getInsertionPosition(t),a=new nu(t,o,r,null,e);this.batch.addOperation(a),this.model.applyOperation(a),i||n||(i=s,n=t.parent.nextSibling),s=(t=this.createPositionAfter(t.parent)).parent}while(s!==e);return{position:t,range:new kh(ph._createAt(i,"end"),ph._createAt(n,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new v("writer-wrap-range-not-flat",this);const i=e instanceof fh?e:new fh(e);if(i.childCount>0)throw new v("writer-wrap-element-not-empty",this);if(null!==i.parent)throw new v("writer-wrap-element-attached",this);this.insert(i,t.start);const n=new kh(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(n,ph._createAt(i,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new v("writer-unwrap-element-no-parent",this);this.move(kh._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new v("writer-addmarker-no-usingoperation",this);const i=e.usingOperation,n=e.range,s=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new v("writer-addmarker-marker-exists",this);if(!n)throw new v("writer-addmarker-no-range",this);return i?(Du(this,t,null,n,s),this.model.markers.get(t)):this.model.markers._set(t,n,i,s)}updateMarker(t,e){this._assertWriterUsedCorrectly();const i="string"==typeof t?t:t.name,n=this.model.markers.get(i);if(!n)throw new v("writer-updatemarker-marker-not-exists",this);if(!e)return y("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),void this.model.markers._refresh(n);const s="boolean"==typeof e.usingOperation,o="boolean"==typeof e.affectsData,r=o?e.affectsData:n.affectsData;if(!s&&!e.range&&!o)throw new v("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=e.range?e.range:a;s&&e.usingOperation!==n.managedUsingOperations?e.usingOperation?Du(this,i,null,l,r):(Du(this,i,a,null,r),this.model.markers._set(i,l,void 0,r)):n.managedUsingOperations?Du(this,i,a,l,r):this.model.markers._set(i,l,void 0,r)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new v("writer-removemarker-no-marker",this);const i=this.model.markers.get(e);if(!i.managedUsingOperations)return void this.model.markers._remove(e);Du(this,e,i.getRange(),null,i.affectsData)}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,i]of mo(t))this._setSelectionAttribute(e,i)}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 i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=Fh._getStoreAttributeKey(t);this.setAttribute(n,e,i.anchor.parent)}i._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const i=Fh._getStoreAttributeKey(t);this.removeAttribute(i,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new v("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const n=i.getRange();let s=!1;if("move"===t){const t=e;s=t.containsPosition(n.start)||t.start.isEqual(n.start)||t.containsPosition(n.end)||t.end.isEqual(n.end)}else{const t=e,i=t.nodeBefore,o=t.nodeAfter,r=n.start.parent==i&&n.start.isAtEnd,a=n.end.parent==o&&0==n.end.offset,l=n.end.nodeAfter==o,c=n.start.nodeAfter==o;s=r||a||l||c}s&&this.updateMarker(i.name,{range:n})}}}function Nu(t,e,i,n){const s=t.model,o=s.document;let r,a,l,c=n.start;for(const t of n.getWalker({shallow:!0}))l=t.item.getAttribute(e),r&&a!=l&&(a!=i&&h(),c=r),r=t.nextPosition,a=l;function h(){const n=new kh(c,r),l=n.root.document?o.version:null,h=new Zd(n,e,a,i,l);t.batch.addOperation(h),s.applyOperation(h)}r instanceof ph&&r!=c&&a!=i&&h()}function Bu(t,e,i,n){const s=t.model,o=s.document,r=n.getAttribute(e);let a,l;if(r!=i){if(n.root===n){const t=n.document?o.version:null;l=new eu(n,e,r,i,t)}else{a=new kh(ph._createBefore(n),t.createPositionAfter(n));const s=a.root.document?o.version:null;l=new Zd(a,e,r,i,s)}t.batch.addOperation(l),s.applyOperation(l)}}function Du(t,e,i,n,s){const o=t.model,r=o.document,a=new Qd(e,i,n,o.markers,!!s,r.version);t.batch.addOperation(a),o.applyOperation(a)}function Fu(t,e,i,n){let s;if(t.root.document){const i=n.document,o=new ph(i.graveyard,[0]);s=new Gd(t,e,o,i.version)}else s=new Iu(t,e);i.addOperation(s),n.applyOperation(s)}function Lu(t,e){return t===e||t instanceof Pu&&e instanceof Pu}function zu(t){t.document.registerPostFixer((e=>function(t,e){const i=e.document.selection,n=e.schema,s=[];let o=!1;for(const t of i.getRanges()){const e=Hu(t,n);e&&!e.isEqual(t)?(s.push(e),o=!0):s.push(t)}o&&t.setSelection(function(t){const e=[...t],i=new Set;let n=1;for(;n!i.has(e)))}(s),{backward:i.isBackward});return!1}(e,t)))}function Hu(t,e){return t.isCollapsed?function(t,e){const i=t.start,n=e.getNearestSelectionRange(i);if(!n){const t=i.getAncestors().reverse().find((t=>e.isObject(t)));return t?kh._createOn(t):null}if(!n.isCollapsed)return n;const s=n.start;if(i.isEqual(s))return null;return new kh(s)}(t,e):function(t,e){const{start:i,end:n}=t,s=e.checkChild(i,"$text"),o=e.checkChild(n,"$text"),r=e.getLimitElement(i),a=e.getLimitElement(n);if(r===a){if(s&&o)return null;if(function(t,e,i){const n=t.nodeAfter&&!i.isLimit(t.nodeAfter)||i.checkChild(t,"$text"),s=e.nodeBefore&&!i.isLimit(e.nodeBefore)||i.checkChild(e,"$text");return n||s}(i,n,e)){const t=i.nodeAfter&&e.isSelectable(i.nodeAfter)?null:e.getNearestSelectionRange(i,"forward"),s=n.nodeBefore&&e.isSelectable(n.nodeBefore)?null:e.getNearestSelectionRange(n,"backward"),o=t?t.start:i,r=s?s.end:n;return new kh(o,r)}}const l=r&&!r.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const t=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent,s=l&&(!t||!$u(i.nodeAfter,e)),o=c&&(!t||!$u(n.nodeBefore,e));let h=i,d=n;return s&&(h=ph._createBefore(ju(r,e))),o&&(d=ph._createAfter(ju(a,e))),new kh(h,d)}return null}(t,e)}function ju(t,e){let i=t,n=i;for(;e.isLimit(n)&&n.parent;)i=n,n=n.parent;return i}function $u(t,e){return t&&e.isSelectable(t)}function Wu(t,e,i={}){if(e.isCollapsed)return;const n=e.getFirstRange();if("$graveyard"==n.root.rootName)return;const s=t.schema;t.change((t=>{if(!i.doNotResetEntireContent&&function(t,e){const i=t.getLimitElement(e);if(!e.containsEntireContent(i))return!1;const n=e.getFirstRange();if(n.start.parent==n.end.parent)return!1;return t.checkChild(i,"paragraph")}(s,e))return void function(t,e){const i=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(i)),Gu(t,t.createPositionAt(i,0),e)}(t,e);const o={};if(!i.doNotAutoparagraph){const t=e.getSelectedElement();t&&Object.assign(o,s.getAttributesWithProperty(t,"copyOnReplace",!0))}const[r,a]=function(t){const e=t.root.document.model,i=t.start;let n=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const i=function(t){const e=t.parent,i=e.root.document.model.schema,n=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of n){if(i.isLimit(t))return null;if(i.isBlock(t))return t}}(n);if(i&&n.isTouching(e.createPositionAt(i,0))){const i=e.createSelection(t);e.modifySelection(i,{direction:"backward"});const s=i.getLastPosition(),o=e.createRange(s,n);e.hasContent(o,{ignoreMarkers:!0})||(n=s)}}return[wu.fromPosition(i,"toPrevious"),wu.fromPosition(n,"toNext")]}(n);r.isTouching(a)||t.remove(t.createRange(r,a)),i.leaveUnmerged||(!function(t,e,i){const n=t.model;if(!Ku(t.model.schema,e,i))return;const[s,o]=function(t,e){const i=t.getAncestors(),n=e.getAncestors();let s=0;for(;i[s]&&i[s]==n[s];)s++;return[i[s],n[s]]}(e,i);if(!s||!o)return;!n.hasContent(s,{ignoreMarkers:!0})&&n.hasContent(o,{ignoreMarkers:!0})?Uu(t,e,i,s.parent):qu(t,e,i,s.parent)}(t,r,a),s.removeDisallowedAttributes(r.parent.getChildren(),t)),Ju(t,e,r),!i.doNotAutoparagraph&&function(t,e){const i=t.checkChild(e,"$text"),n=t.checkChild(e,"paragraph");return!i&&n}(s,r)&&Gu(t,r,e,o),r.detach(),a.detach()}))}function qu(t,e,i,n){const s=e.parent,o=i.parent;if(s!=n&&o!=n){for(e=t.createPositionAfter(s),(i=t.createPositionBefore(o)).isEqual(e)||t.insert(o,e),t.merge(e);i.parent.isEmpty;){const e=i.parent;i=t.createPositionBefore(e),t.remove(e)}Ku(t.model.schema,e,i)&&qu(t,e,i,n)}}function Uu(t,e,i,n){const s=e.parent,o=i.parent;if(s!=n&&o!=n){for(e=t.createPositionAfter(s),(i=t.createPositionBefore(o)).isEqual(e)||t.insert(s,i);e.parent.isEmpty;){const i=e.parent;e=t.createPositionBefore(i),t.remove(i)}i=t.createPositionBefore(o),function(t,e){const i=e.nodeBefore,n=e.nodeAfter;i.name!=n.name&&t.rename(i,n.name);t.clearAttributes(i),t.setAttributes(Object.fromEntries(n.getAttributes()),i),t.merge(e)}(t,i),Ku(t.model.schema,e,i)&&Uu(t,e,i,n)}}function Ku(t,e,i){const n=e.parent,s=i.parent;return n!=s&&(!t.isLimit(n)&&!t.isLimit(s)&&function(t,e,i){const n=new kh(t,e);for(const t of n.getWalker())if(i.isLimit(t.item))return!1;return!0}(e,i,t))}function Gu(t,e,i,n={}){const s=t.createElement("paragraph");t.model.schema.setAllowedAttributes(s,n,t),t.insert(s,e),Ju(t,i,t.createPositionAt(s,0))}function Ju(t,e,i){e instanceof Fh?t.setSelection(i):e.setTo(i)}function Qu(t,e){const i=[];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=>{i.push(t.start.parent),e.remove(t)})),i.forEach((t=>{let i=t;for(;i.parent&&i.isEmpty;){const t=e.createRangeOn(i);i=i.parent,e.remove(t)}}))}class Yu{constructor(t,e,i){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=i,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),i=this.writer.createPositionAfter(t);if(i.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new v("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?kh._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new kh(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=wu.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 v("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=wu.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=wu.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof fh))return;if(!this._canMergeLeft(t))return;const e=wu._createBefore(t);e.stickiness="toNext";const i=wu.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=wu._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=wu._createAt(e.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof fh))return;if(!this._canMergeRight(t))return;const e=wu._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new v("insertcontent-invalid-insertion-position",this);this.position=ph._createAt(e.nodeBefore,"end");const i=wu.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=wu._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=wu._createAt(e.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof fh&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof fh&&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 Zu(t,e,i="auto"){const n=t.getSelectedElement();if(n&&e.schema.isObject(n)&&!e.schema.isInline(n))return"before"==i||"after"==i?e.createRange(e.createPositionAt(n,i)):e.createRangeOn(n);const s=ho(t.getSelectedBlocks());if(!s)return e.createRange(t.focus);if(s.isEmpty)return e.createRange(e.createPositionAt(s,0));const o=e.createPositionAfter(s);return t.focus.isTouching(o)?e.createRange(o):e.createRange(e.createPositionBefore(s))}function Xu(t,e,i,n,s={}){if(!t.schema.isObject(e))throw new v("insertobject-element-not-an-object",t,{object:e});let o;o=i?i instanceof Sh||i instanceof Fh?i:t.createSelection(i,n):t.document.selection;let r=o;s.findOptimalPosition&&t.schema.isBlock(e)&&(r=t.createSelection(Zu(o,t,s.findOptimalPosition)));const a=ho(o.getSelectedBlocks()),l={};return a&&Object.assign(l,t.schema.getAttributesWithProperty(a,"copyOnReplace",!0)),t.change((i=>{r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});let n=e;const o=r.anchor.parent;!t.schema.checkChild(o,e)&&t.schema.checkChild(o,"paragraph")&&t.schema.checkChild("paragraph",e)&&(n=i.createElement("paragraph"),i.insert(e,n)),t.schema.setAllowedAttributes(n,l,i);const a=t.insertContent(n,r);return a.isCollapsed||s.setSelection&&function(t,e,i,n){const s=t.model;if("on"==i)return void t.setSelection(e,"on");if("after"!=i)throw new v("insertobject-invalid-place-parameter-value",s);let o=e.nextSibling;if(s.schema.isInline(e))return void t.setSelection(e,"after");const r=o&&s.schema.checkChild(o,"$text");!r&&s.schema.checkChild(e.parent,"paragraph")&&(o=t.createElement("paragraph"),s.schema.setAllowedAttributes(o,n,t),s.insertContent(o,t.createPositionAfter(e)));o&&t.setSelection(o,0)}(i,e,s.setSelection,l),a}))}const tf=' ,.?!:;"-()';function ef(t,e){const{isForward:i,walker:n,unit:s,schema:o,treatEmojiAsSingleUnit:r}=t,{type:a,item:l,nextPosition:c}=e;if("text"==a)return"word"===t.unit?function(t,e){let i=t.position.textNode;i||(i=e?t.position.nodeAfter:t.position.nodeBefore);for(;i&&i.is("$text");){const n=t.position.offset-i.startOffset;if(of(i,n,e))i=e?t.position.nodeAfter:t.position.nodeBefore;else{if(sf(i.data,n,e))break;t.next()}}return t.position}(n,i):function(t,e,i){const n=t.position.textNode;if(n){const s=n.data;let o=t.position.offset-n.startOffset;for(;po(s,o)||"character"==e&&wo(s,o)||i&&_o(s,o);)t.next(),o=t.position.offset-n.startOffset}return t.position}(n,s,r);if(a==(i?"elementStart":"elementEnd")){if(o.isSelectable(l))return ph._createAt(l,i?"after":"before");if(o.checkChild(c,"$text"))return c}else{if(o.isLimit(l))return void n.skip((()=>!0));if(o.checkChild(c,"$text"))return c}}function nf(t,e){const i=t.root,n=ph._createAt(i,e?"end":0);return e?new kh(t,n):new kh(n,t)}function sf(t,e,i){const n=e+(i?0:-1);return tf.includes(t.charAt(n))}function of(t,e,i){return e===(i?t.offsetSize:0)}class rf extends(q()){constructor(){super(),this.markers=new Ru,this.document=new Eu(this),this.schema=new bd,this._pendingChanges=[],this._currentWriter=null,["insertContent","insertObject","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})),zu(this),this.document.registerPostFixer(sd)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new vu,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){v.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{t?"function"==typeof t?(e=t,t=new vu):t instanceof vu||(t=new vu(t)):t=new vu,this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){v.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,i){return function(t,e,i,n){return t.change((s=>{let o;o=i?i instanceof Sh||i instanceof Fh?i:s.createSelection(i,n):t.document.selection,o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0});const r=new Yu(t,s,o.anchor),a=[];let l;if(e.is("documentFragment")){if(e.markers.size){const t=[];for(const[i,n]of e.markers){const{start:e,end:s}=n,o=e.isEqual(s);t.push({position:e,name:i,isCollapsed:o},{position:s,name:i,isCollapsed:o})}t.sort((({position:t},{position:e})=>t.isBefore(e)?1:-1));for(const{position:i,name:n,isCollapsed:o}of t){let t=null,r=null;const l=i.parent===e&&i.isAtStart,c=i.parent===e&&i.isAtEnd;l||c?o&&(r=l?"start":"end"):(t=s.createElement("$marker"),s.insert(t,i)),a.push({name:n,element:t,collapsed:r})}}l=e.getChildren()}else l=[e];r.handleNodes(l);let c=r.getSelectionRange();if(e.is("documentFragment")&&a.length){const t=c?Mh.fromRange(c):null,e={};for(let t=a.length-1;t>=0;t--){const{name:i,element:n,collapsed:o}=a[t],l=!e[i];if(l&&(e[i]=[]),n){const t=s.createPositionAt(n,"before");e[i].push(t),s.remove(n)}else{const t=r.getAffectedRange();if(!t){o&&e[i].push(r.position);continue}o?e[i].push(t[o]):e[i].push(l?t.start:t.end)}}for(const[t,[i,n]]of Object.entries(e))i&&n&&i.root===n.root&&s.addMarker(t,{usingOperation:!0,affectsData:!0,range:new kh(i,n)});t&&(c=t.toRange(),t.detach())}c&&(o instanceof Fh?s.setSelection(c):o.setTo(c));const h=r.getAffectedRange()||t.createRange(o.anchor);return r.destroy(),h}))}(this,t,e,i)}insertObject(t,e,i,n){return Xu(this,t,e,i,n)}deleteContent(t,e){Wu(this,t,e)}modifySelection(t,e){!function(t,e,i={}){const n=t.schema,s="backward"!=i.direction,o=i.unit?i.unit:"character",r=!!i.treatEmojiAsSingleUnit,a=e.focus,l=new mh({boundaries:nf(a,s),singleCharacters:!0,direction:s?"forward":"backward"}),c={walker:l,schema:n,isForward:s,unit:o,treatEmojiAsSingleUnit:r};let h;for(;h=l.next();){if(h.done)return;const i=ef(c,h.value);if(i)return void(e instanceof Fh?t.change((t=>{t.setSelectionFocus(i)})):e.setFocus(i))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change((t=>{const i=t.createDocumentFragment(),n=e.getFirstRange();if(!n||n.isCollapsed)return i;const s=n.start.root,o=n.start.getCommonPath(n.end),r=s.getNodeByPath(o);let a;a=n.start.parent==n.end.parent?n:t.createRange(t.createPositionAt(r,n.start.path[o.length]),t.createPositionAt(r,n.end.path[o.length]+1));const l=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),i):t.append(t.cloneElement(e,!0),i);if(a!=n){const e=n._getTransformedByMove(a.start,t.createPositionAt(i,0),l)[0],s=t.createRange(t.createPositionAt(i,0),e.start);Qu(t.createRange(e.end,t.createPositionAt(i,"end")),t),Qu(s,t)}return i}))}(this,t)}hasContent(t,e={}){const i=t instanceof kh?t:kh._createIn(t);if(i.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:s=!1}=e;if(!s)for(const t of this.markers.getMarkersIntersectingRange(i))if(t.affectsData)return!0;for(const t of i.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!n)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}createPositionFromPath(t,e,i){return new ph(t,e,i)}createPositionAt(t,e){return ph._createAt(t,e)}createPositionAfter(t){return ph._createAfter(t)}createPositionBefore(t){return ph._createBefore(t)}createRange(t,e){return new kh(t,e)}createRangeIn(t){return kh._createIn(t)}createRangeOn(t){return kh._createOn(t)}createSelection(...t){return new Sh(...t)}createBatch(t){return new vu(t)}createOperationFromJSON(t){return ou.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 Mu(this,e);const i=this._pendingChanges[0].callback(this._currentWriter);t.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return t}}class af extends Jl{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class lf extends Jl{constructor(t){super(t),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}class cf{constructor(t){this.document=t}createDocumentFragment(t){return new hl(this.document,t)}createElement(t,e,i){return new Va(this.document,t,e,i)}createText(t){return new Cr(this.document,t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,i){return i._insertChild(t,e)}removeChildren(t,e,i){return i._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const i=t.parent;if(i){const n=i.getChildIndex(t);return this.removeChildren(n,1,i),this.insertChild(n,e,i),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const i=e.getChildIndex(t);this.remove(t),this.insertChild(i,t.getChildren(),e)}}rename(t,e){const i=new Va(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,i)?i:null}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){St(t)&&void 0===i?e._setStyle(t):i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return Ha._createAt(t,e)}createPositionAfter(t){return Ha._createAfter(t)}createPositionBefore(t){return Ha._createBefore(t)}createRange(t,e){return new ja(t,e)}createRangeOn(t){return ja._createOn(t)}createRangeIn(t){return ja._createIn(t)}createSelection(...t){return new Wa(...t)}}new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);const hf=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;const df=/^[+-]?[0-9]*([.][0-9]+)?%$/;function uf(t=""){if(""===t)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const e=t.replace(/, /g,",").split(" ").map((t=>t.replace(/,/g,", ")));const i=e[0],n=e[2]||i,s=e[1]||i;return{top:i,bottom:n,right:s,left:e[3]||s}}function ff({top:t,right:e,bottom:i,left:n}){const s=[];return n!==e?s.push(t,e,i,n):i!==t?s.push(t,e,i):e!==t?s.push(t,e):s.push(t),s.join(" ")}function mf(t){var e,i;t.setNormalizer("margin",(e="margin",t=>({path:e,value:uf(t)}))),t.setNormalizer("margin-top",(t=>({path:"margin.top",value:t}))),t.setNormalizer("margin-right",(t=>({path:"margin.right",value:t}))),t.setNormalizer("margin-bottom",(t=>({path:"margin.bottom",value:t}))),t.setNormalizer("margin-left",(t=>({path:"margin.left",value:t}))),t.setReducer("margin",(i="margin",t=>{const{top:e,right:n,bottom:s,left:o}=t,r=[];return[e,n,o,s].every((t=>!!t))?r.push([i,ff(t)]):(e&&r.push([i+"-top",e]),n&&r.push([i+"-right",n]),s&&r.push([i+"-bottom",s]),o&&r.push([i+"-left",o])),r})),t.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}class gf{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const i=this.get(t);if(!i)throw new v("commandcollection-command-not-found",this,{commandName:t});return i.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()}}class pf extends fo{constructor(t){super(),this.editor=t}set(t,e,i={}){if("string"==typeof e){const t=e;e=(e,i)=>{this.editor.execute(t),i()}}super.set(t,e,i)}}class wf extends(q()){constructor(t={}){super();const e=this.constructor,i=t.language||e.defaultConfig&&e.defaultConfig.language;this._context=t.context||new mr({language:i}),this._context._addEditor(this,!t.context);const n=Array.from(e.builtinPlugins||[]);this.config=new hs(t,e.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new fr(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new gf,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new rf;const s=new Ra;this.data=new Bd(this.model,s),this.editing=new md(this.model,s),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Dd([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 pf(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(t){throw new v("editor-isreadonly-has-no-setter")}enableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new v("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 v("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))}initPlugins(){const t=this.config,e=t.get("plugins"),i=t.get("removePlugins")||[],n=t.get("extraPlugins")||[],s=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(n),i,s)}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){v.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}}function bf(t){return class extends t{setData(t){this.data.set(t)}getData(t){return this.data.get(t)}}}{const t=bf(Object);bf.setData=t.prototype.setData,bf.getData=t.prototype.getData}function _f(t){return class extends t{updateSourceElement(t=this.data.get()){if(!this.sourceElement)throw new v("editor-missing-sourceelement",this);const e=this.config.get("updateSourceElementOnDestroy"),i=this.sourceElement instanceof HTMLTextAreaElement;Os(this.sourceElement,e||i?t:"")}}}_f.updateSourceElement=_f(Object).prototype.updateSourceElement;class vf extends gr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new co({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new v("pendingactions-add-invalid-message",this);const e=new(q());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 yf={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',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:''},{threeVerticalDots:kf}=yf,Af={alignLeft:yf.alignLeft,bold:yf.bold,importExport:yf.importExport,paragraph:yf.paragraph,plus:yf.plus,text:yf.text,threeVerticalDots:yf.threeVerticalDots};class xf extends yo{constructor(t,e){super(t);const i=this.bindTemplate,n=this.t;this.options=e||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new uo,this.keystrokes=new fo,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Cf(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const s="rtl"===t.uiLanguageDirection;this._focusCycler=new nr({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[s?"arrowright":"arrowleft","arrowup"],focusNext:[s?"arrowleft":"arrowright","arrowdown"]}});const o=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")];var r;this.options.shouldGroupWhenFull&&this.options.isFloating&&o.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:o,role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")}},children:this.children,on:{mousedown:(r=this,r.bindTemplate.to((t=>{t.target===r.element&&t.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Tf(this):new Pf(this)}render(){super.render();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,i){this.items.addMany(this._buildItemsFromConfig(t,e,i))}_buildItemsFromConfig(t,e,i){const n=ar(t),s=i||n.removeItems;return this._cleanItemsConfiguration(n.items,e,s).map((t=>F(t)?this._createNestedToolbarDropdown(t,e,s):"|"===t?new or:"-"===t?new rr:e.create(t))).filter((t=>!!t))}_cleanItemsConfiguration(t,e,i){const n=t.filter(((t,n,s)=>"|"===t||-1===i.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(y("toolbarview-line-break-ignored-when-grouping-items",s),!1):!(!F(t)&&!e.has(t))||(y("toolbarview-item-unavailable",{item:t}),!1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(t){const e=t=>"-"!==t&&"|"!==t,i=t.length,n=t.findIndex(e);if(-1===n)return[];const s=i-t.slice().reverse().findIndex(e);return t.slice(n,s).filter(((t,i,n)=>{if(e(t))return!0;return!(i>0&&n[i-1]===t)}))}_createNestedToolbarDropdown(t,e,i){let{label:n,icon:s,items:o,tooltip:r=!0,withText:a=!1}=t;if(o=this._cleanItemsConfiguration(o,e,i),!o.length)return null;const l=Of(this.locale);return n||y("toolbarview-nested-toolbar-dropdown-missing-label",t),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:r,withText:!!a}),!1!==s?l.buttonView.icon=Af[s]||s||kf:l.buttonView.withText=!0,If(l,(()=>l.toolbarView._buildItemsFromConfig(o,e,i))),l}}class Cf extends yo{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Pf{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=>t)),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Tf{constructor(t){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(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,t.itemsView.children.bindTo(this.ungroupedItems).using((t=>t)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),t.children.on("change",this._updateFocusCycleableItems.bind(this)),t.items.on("change",((t,e)=>{const i=e.index,n=Array.from(e.added);for(const t of e.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=i;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(!Bs(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,i=new Ps(t.lastChild),n=new Ps(t);if(!this.cachedPadding){const i=vs.window.getComputedStyle(t),n="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}return"ltr"===e?i.right>n.right-this.cachedPadding:i.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 or),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,i=Of(t);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",If(i,this.groupedItems),i.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:kf}),i}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((t=>{this.viewFocusables.add(t)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class Ef extends yo{constructor(t){super(t);const e=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new uo,this.keystrokes=new fo,this._focusCycler=new nr({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],"aria-label":e.to("ariaLabel")},children:this.items})}render(){super.render();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)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Sf extends yo{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))]},children:this.children})}focus(){this.children.first.focus()}}class Rf extends yo{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}function Of(t,e=tr){const n=new e(t),s=new ir(t),o=new Zo(t,n,s);return n.bind("isEnabled").to(o),n instanceof er?n.arrowView.bind("isOn").to(o,"isOpen"):n.bind("isOn").to(o,"isOpen"),function(t){(function(t){t.on("render",(()=>{i({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})}))})(t),function(t){t.on("execute",(e=>{e.source instanceof Uo||(t.isOpen=!1)}))}(t),function(t){t.focusTracker.on("change:isFocused",((e,i,n)=>{t.isOpen&&!n&&(t.isOpen=!1)}))}(t),function(t){t.keystrokes.set("arrowdown",((e,i)=>{t.isOpen&&(t.panelView.focus(),i())})),t.keystrokes.set("arrowup",((e,i)=>{t.isOpen&&(t.panelView.focusLast(),i())}))}(t),function(t){t.on("change:isOpen",((e,i,n)=>{if(n)return;const s=t.panelView.element;s&&s.contains(vs.document.activeElement)&&t.buttonView.focus()}))}(t),function(t){t.on("change:isOpen",((e,i,n)=>{n&&t.panelView.focus()}),{priority:"low"})}(t)}(o),o}function If(t,e,i={}){t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.isOpen?Vf(t,e,i):t.once("change:isOpen",(()=>Vf(t,e,i)),{priority:"highest"}),i.enableActiveItemFocusOnDropdownOpen&&Bf(t,(()=>t.toolbarView.items.find((t=>t.isOn))))}function Vf(t,e,i){const n=t.locale,s=n.t,o=t.toolbarView=new xf(n),r="function"==typeof e?e():e;o.ariaLabel=i.ariaLabel||s("Dropdown toolbar"),i.maxWidth&&(o.maxWidth=i.maxWidth),i.class&&(o.class=i.class),i.isCompact&&(o.isCompact=i.isCompact),i.isVertical&&(o.isVertical=!0),r instanceof vo?o.items.bindTo(r).using((t=>t)):o.items.addMany(r),t.panelView.children.add(o),o.items.delegate("execute").to(t)}function Mf(t,e,i={}){t.isOpen?Nf(t,e,i):t.once("change:isOpen",(()=>Nf(t,e,i)),{priority:"highest"}),Bf(t,(()=>t.listView.items.find((t=>t instanceof Sf&&t.children.first.isOn))))}function Nf(t,e,i){const n=t.locale,s=t.listView=new Ef(n),o="function"==typeof e?e():e;s.ariaLabel=i.ariaLabel,s.items.bindTo(o).using((t=>{if("separator"===t.type)return new Rf(n);if("button"===t.type||"switchbutton"===t.type){const e=new Sf(n);let i;return i="button"===t.type?new qo(n):new Uo(n),i.bind(...Object.keys(t.model)).to(t.model),i.delegate("execute").to(e),e.children.add(i),e}return null})),t.panelView.children.add(s),s.items.delegate("execute").to(t)}function Bf(t,e){t.on("change:isOpen",(()=>{if(!t.isOpen)return;const i=e();i&&("function"==typeof i.focus?i.focus():y("ui-dropdown-focus-child-on-open-child-missing-focus",{view:i}))}),{priority:w.low-10})}const Df=Is("px"),Ff=vs.document.body;class Lf extends yo{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",Df),left:e.to("left",Df)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Lf.defaultPositions,i=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:Ff,fitInViewport:!0},t),n=Lf._getOptimalPosition(i),s=parseInt(n.left),o=parseInt(n.top),r=n.name,a=n.config||{},{withArrow:l=!0}=a;this.top=o,this.left=s,this.position=r,this.withArrow=l}pin(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=zf(t.target),i=t.limiter?zf(t.limiter):Ff;this.listenTo(vs.document,"scroll",((n,s)=>{const o=s.target,r=e&&o.contains(e),a=i&&o.contains(i);!r&&!a&&e&&i||this.attachTo(t)}),{useCapture:!0}),this.listenTo(vs.window,"resize",(()=>{this.attachTo(t)}))}_stopPinning(){this.stopListening(vs.document,"scroll"),this.stopListening(vs.window,"resize")}}function zf(t){return cs(t)?t:As(t)?t.commonAncestorContainer:"function"==typeof t?zf(t()):null}function Hf(t={}){const{sideOffset:e=Lf.arrowSideOffset,heightOffset:i=Lf.arrowHeightOffset,stickyVerticalOffset:n=Lf.stickyVerticalOffset,config:s}=t;return{northWestArrowSouthWest:(t,i)=>({top:o(t,i),left:t.left-e,name:"arrow_sw",...s&&{config:s}}),northWestArrowSouthMiddleWest:(t,i)=>({top:o(t,i),left:t.left-.25*i.width-e,name:"arrow_smw",...s&&{config:s}}),northWestArrowSouth:(t,e)=>({top:o(t,e),left:t.left-e.width/2,name:"arrow_s",...s&&{config:s}}),northWestArrowSouthMiddleEast:(t,i)=>({top:o(t,i),left:t.left-.75*i.width+e,name:"arrow_sme",...s&&{config:s}}),northWestArrowSouthEast:(t,i)=>({top:o(t,i),left:t.left-i.width+e,name:"arrow_se",...s&&{config:s}}),northArrowSouthWest:(t,i)=>({top:o(t,i),left:t.left+t.width/2-e,name:"arrow_sw",...s&&{config:s}}),northArrowSouthMiddleWest:(t,i)=>({top:o(t,i),left:t.left+t.width/2-.25*i.width-e,name:"arrow_smw",...s&&{config:s}}),northArrowSouth:(t,e)=>({top:o(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s",...s&&{config:s}}),northArrowSouthMiddleEast:(t,i)=>({top:o(t,i),left:t.left+t.width/2-.75*i.width+e,name:"arrow_sme",...s&&{config:s}}),northArrowSouthEast:(t,i)=>({top:o(t,i),left:t.left+t.width/2-i.width+e,name:"arrow_se",...s&&{config:s}}),northEastArrowSouthWest:(t,i)=>({top:o(t,i),left:t.right-e,name:"arrow_sw",...s&&{config:s}}),northEastArrowSouthMiddleWest:(t,i)=>({top:o(t,i),left:t.right-.25*i.width-e,name:"arrow_smw",...s&&{config:s}}),northEastArrowSouth:(t,e)=>({top:o(t,e),left:t.right-e.width/2,name:"arrow_s",...s&&{config:s}}),northEastArrowSouthMiddleEast:(t,i)=>({top:o(t,i),left:t.right-.75*i.width+e,name:"arrow_sme",...s&&{config:s}}),northEastArrowSouthEast:(t,i)=>({top:o(t,i),left:t.right-i.width+e,name:"arrow_se",...s&&{config:s}}),southWestArrowNorthWest:t=>({top:r(t),left:t.left-e,name:"arrow_nw",...s&&{config:s}}),southWestArrowNorthMiddleWest:(t,i)=>({top:r(t),left:t.left-.25*i.width-e,name:"arrow_nmw",...s&&{config:s}}),southWestArrowNorth:(t,e)=>({top:r(t),left:t.left-e.width/2,name:"arrow_n",...s&&{config:s}}),southWestArrowNorthMiddleEast:(t,i)=>({top:r(t),left:t.left-.75*i.width+e,name:"arrow_nme",...s&&{config:s}}),southWestArrowNorthEast:(t,i)=>({top:r(t),left:t.left-i.width+e,name:"arrow_ne",...s&&{config:s}}),southArrowNorthWest:t=>({top:r(t),left:t.left+t.width/2-e,name:"arrow_nw",...s&&{config:s}}),southArrowNorthMiddleWest:(t,i)=>({top:r(t),left:t.left+t.width/2-.25*i.width-e,name:"arrow_nmw",...s&&{config:s}}),southArrowNorth:(t,e)=>({top:r(t),left:t.left+t.width/2-e.width/2,name:"arrow_n",...s&&{config:s}}),southArrowNorthMiddleEast:(t,i)=>({top:r(t),left:t.left+t.width/2-.75*i.width+e,name:"arrow_nme",...s&&{config:s}}),southArrowNorthEast:(t,i)=>({top:r(t),left:t.left+t.width/2-i.width+e,name:"arrow_ne",...s&&{config:s}}),southEastArrowNorthWest:t=>({top:r(t),left:t.right-e,name:"arrow_nw",...s&&{config:s}}),southEastArrowNorthMiddleWest:(t,i)=>({top:r(t),left:t.right-.25*i.width-e,name:"arrow_nmw",...s&&{config:s}}),southEastArrowNorth:(t,e)=>({top:r(t),left:t.right-e.width/2,name:"arrow_n",...s&&{config:s}}),southEastArrowNorthMiddleEast:(t,i)=>({top:r(t),left:t.right-.75*i.width+e,name:"arrow_nme",...s&&{config:s}}),southEastArrowNorthEast:(t,i)=>({top:r(t),left:t.right-i.width+e,name:"arrow_ne",...s&&{config:s}}),westArrowEast:(t,e)=>({top:t.top+t.height/2-e.height/2,left:t.left-e.width-i,name:"arrow_e",...s&&{config:s}}),eastArrowWest:(t,e)=>({top:t.top+t.height/2-e.height/2,left:t.right+i,name:"arrow_w",...s&&{config:s}}),viewportStickyNorth:(t,e,i)=>t.getIntersection(i)?{top:i.top+n,left:t.left+t.width/2-e.width/2,name:"arrowless",config:{withArrow:!1,...s}}:null};function o(t,e){return t.top-e.height-i}function r(t){return t.bottom+i}}Lf.arrowSideOffset=25,Lf.arrowHeightOffset=10,Lf.stickyVerticalOffset=20,Lf._getOptimalPosition=Ds,Lf.defaultPositions=Hf();const jf="ck-tooltip";class $f extends(ps()){constructor(t){if(super(),$f._editors.add(t),$f._instance)return $f._instance;$f._instance=this,this.tooltipTextView=new yo(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 Lf(t.locale),this.balloonPanelView.class=jf,this.balloonPanelView.content.add(this.tooltipTextView),this._resizeObserver=null,this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._pinTooltipDebounced=dc(this._pinTooltip,600),this.listenTo(vs.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(vs.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(vs.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(vs.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(vs.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(t){const e=t.ui.view&&t.ui.view.body;$f._editors.delete(t),this.stopListening(t.ui),e&&e.has(this.balloonPanelView)&&e.remove(this.balloonPanelView),$f._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),$f._instance=null)}static getPositioningFunctions(t){const e=$f.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]}_onEnterOrFocus(t,{target:e}){const i=Wf(e);var n;i&&(i!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(i,{text:(n=i).dataset.ckeTooltipText,position:n.dataset.ckeTooltipPosition||"s",cssClass:n.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(t,{target:e,relatedTarget:i}){if("mouseleave"===t.name){if(!cs(e))return;if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;const t=Wf(e),n=Wf(i);t&&t!==n&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(t,{target:e}){this._currentElementWithTooltip&&(e.contains(this.balloonPanelView.element)&&e.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(t,{text:e,position:i,cssClass:n}){const s=ho($f._editors.values()).ui.view.body;s.has(this.balloonPanelView)||s.add(this.balloonPanelView),this.tooltipTextView.text=e,this.balloonPanelView.pin({target:t,positions:$f.getPositioningFunctions(i)}),this._resizeObserver=new Rs(t,(()=>{Bs(t)||this._unpinTooltip()})),this.balloonPanelView.class=[jf,n].filter((t=>t)).join(" ");for(const t of $f._editors)this.listenTo(t.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=t,this._currentTooltipPosition=i}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const t of $f._editors)this.stopListening(t.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){Bs(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:$f.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}}function Wf(t){return cs(t)?t.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}$f.defaultBalloonPositions=Hf({heightOffset:5,sideOffset:13}),$f._editors=new Set,$f._instance=null;class qf extends(q()){constructor(t){super(),this.editor=t,this.componentFactory=new Qo(t),this.focusTracker=new uo,this.tooltipManager=new $f(t),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.isReady=!1,this.once("ready",(()=>{this.isReady=!0})),this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.listenTo(t.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor);for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;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 i=()=>{this.editor.editing.view.getDomRoot(t)||this.editor.keystrokes.listenTo(e)};this.isReady?i():this.once("ready",i)}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 i=t.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const t=this.editor,e=t.editing.view;let i,n;t.keystrokes.set("Alt+F10",((t,s)=>{const o=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(o)&&!Array.from(e.domRoots.values()).includes(o)&&(i=o);const r=this._getCurrentFocusedToolbarDefinition();r&&n||(n=this._getFocusableCandidateToolbarDefinitions());for(let t=0;t{const s=this._getCurrentFocusedToolbarDefinition();s&&(i?(i.focus(),i=null):t.editing.view.focus(),s.options.afterBlur&&s.options.afterBlur(),n())}))}_getFocusableCandidateToolbarDefinitions(){const t=[];for(const e of this._focusableToolbarDefinitions){const{toolbarView:i,options:n}=e;(Bs(i.element)||n.beforeFocus)&&t.push(e)}return t.sort(((t,e)=>Uf(t)-Uf(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:i}}=t;return i&&i(),!!Bs(e.element)&&(e.focus(),!0)}}function Uf(t){const{toolbarView:e,options:i}=t;let n=10;return Bs(e.element)&&n--,i.isContextual&&n--,n}class Kf extends yo{constructor(t){super(t),this.body=new $o(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class Gf extends yo{constructor(t){super(t),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${p()}`;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 Jf extends Kf{constructor(t){super(t),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:t.uiLanguageDirection,lang:t.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const t=this.t,e=new Gf;return e.text=t("Rich Text Editor"),e.extendTemplate({attributes:{class:"ck-voice-label"}}),e}}class Qf extends yo{constructor(t,e,i){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=i,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()}_updateIsFocusedClasses(){const t=this._editingView;function e(e){t.change((i=>{const n=t.document.getRoot(e.name);i.addClass(e.isFocused?"ck-focused":"ck-blurred",n),i.removeClass(e.isFocused?"ck-blurred":"ck-focused",n)}))}t.isRenderingInProgress?function i(n){t.once("change:isRenderingInProgress",((t,s,o)=>{o?i(n):e(n)}))}(this):e(this)}}class Yf extends Qf{constructor(t,e,i,n={}){super(t,e,i);const s=t.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=n.label||(()=>s("Editor editing area: %0",this.name))}render(){super.render();const t=this._editingView;t.change((e=>{const i=t.document.getRoot(this.name);e.setAttribute("aria-label",this._generateLabel(this),i)}))}}class Zf extends yo{constructor(t){super(t),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new uo,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");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"),readonly:e.to("isReadOnly"),inputmode:e.to("inputMode"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},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,i)=>{this._setDomElementValue(i),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}class Xf extends Zf{constructor(t){super(t),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class tm extends Zf{constructor(t,{min:e,max:i,step:n}={}){super(t);const s=this.bindTemplate;this.set("min",e),this.set("max",i),this.set("step",n),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:s.to("min"),max:s.to("max"),step:s.to("step")}})}}class em extends yo{constructor(t,e){super(t);const i=`ck-labeled-field-view-${p()}`,n=`ck-labeled-field-view-status-${p()}`;this.fieldView=e(this,i,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",(t=>!t)),s.if("isEmpty","ck-labeled-field-view_empty"),s.if("isFocused","ck-labeled-field-view_focused"),s.if("placeholder","ck-labeled-field-view_placeholder"),s.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(t){const e=new Gf(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new yo(this.locale),i=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",(t=>!t))],id:t,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),e}focus(){this.fieldView.focus()}}function im(t,e,i){const n=new Xf(t.locale);return n.set({id:e,ariaDescribedById:i}),n.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),n.bind("hasError").to(t,"errorText",(t=>!!t)),n.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(n),n}function nm(t,e,i){const n=new tm(t.locale);return n.set({id:e,ariaDescribedById:i,inputMode:"numeric"}),n.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),n.bind("hasError").to(t,"errorText",(t=>!!t)),n.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(n),n}class sm extends(q()){constructor(t,e){super(),e&&Kl(this,e),t&&this.set(t)}}const om=Is("px");class rm extends lr{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),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._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=null,this._fakePanelsView=null}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 v("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 i=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),i.set(t.view,t),this._viewToStack.set(t.view,i),i===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new v("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 v("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}_createPanelView(){this._view=new Lf(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 am(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,i)=>{if(i<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[n,i])})),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 lm(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:i=!0,singleViewMode:n=!1}){this.view.class=e,this.view.withArrow=i,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(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 am extends yo{constructor(t){super(t);const e=t.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new uo,this.buttonPrevView=this._createButtonView(e("Previous"),''),this.buttonNextView=this._createButtonView(e("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",(t=>t?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const i=new qo(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i}}class lm extends yo{constructor(t,e){super(t);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",(t=>t?"":"ck-hidden"))],style:{top:i.to("top",om),left:i.to("left",om),width:i.to("width",om),height:i.to("height",om)}},children:this.content}),this.on("change:numberOfPanels",((t,e,i,n)=>{i>n?this._addPanels(i-n):this._removePanels(n-i),this.updatePosition()}))}_addPanels(t){for(;t--;){const t=new yo;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:i,height:n}=new Ps(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:i,height:n})}}}const cm=Is("px");class hm extends yo{constructor(t){super(t);const e=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new ko({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:e.to("isSticky",(t=>t?"block":"none")),height:e.to("isSticky",(t=>t?cm(this._panelRect.height):null))}}}).render(),this._contentPanel=new ko({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",e.if("isSticky","ck-sticky-panel__content_sticky"),e.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:e.to("isSticky",(t=>t?cm(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:e.to("_hasViewportTopOffset",(t=>t?cm(this.viewportTopOffset):null)),bottom:e.to("_isStickyToTheLimiter",(t=>t?cm(this.limiterBottomOffset):null)),marginLeft:e.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(vs.window,"scroll",(()=>{this._checkIfShouldBeSticky()})),this.listenTo(this,"change:isActive",(()=>{this._checkIfShouldBeSticky()}))}_checkIfShouldBeSticky(){const t=this._panelRect=this._contentPanel.getBoundingClientRect();let e;this.limiterElement?(e=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&e.topt||0)),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,e=t.editing.view,i=e.document.getRoot(),n=t.sourceElement,s=t.config.get("placeholder")||n&&"textarea"===n.tagName.toLowerCase()&&n.getAttribute("placeholder");s&&function(t){const{view:e,element:i,text:n,isDirectHost:s=!0,keepOnFocus:o=!1}=t,r=e.document;pr.has(r)||(pr.set(r,new Map),r.registerPostFixer((t=>br(r,t))),r.on("change:isComposing",(()=>{e.change((t=>br(r,t)))}),{priority:"high"})),pr.get(r).set(i,{text:n,isDirectHost:s,keepOnFocus:o,hostElement:s?i:null}),e.change((t=>br(r,t)))}({view:e,element:i,text:s,isDirectHost:!1,keepOnFocus:!0})}}class fm extends Jf{constructor(t,e,i={}){super(t),this.stickyPanel=new hm(t),this.toolbar=new xf(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new Yf(t,e)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class mm extends(bf(_f(wf))){constructor(t,e={}){if(!gm(t)&&void 0!==e.initialData)throw new v("editor-create-initial-data",null);super(e),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return gm(t)?(e=t,e instanceof HTMLTextAreaElement?e.value:e.innerHTML):t;var e}(t)),gm(t)&&(this.sourceElement=t),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new fm(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new um(this,n),function(t){if(!Gt(t.updateSourceElement))throw new v("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(function(t){return!!t&&"textarea"===t.tagName.toLowerCase()}(e)&&e.form){let i;const n=e.form,s=()=>t.updateSourceElement();Gt(n.submit)&&(i=n.submit,n.submit=()=>{s(),i.apply(n)}),n.addEventListener("submit",s),t.on("destroy",(()=>{n.removeEventListener("submit",s),i&&(n.submit=i)}))}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise((i=>{const n=new this(t,e);i(n.initPlugins().then((()=>n.ui.init(gm(t)?t:null))).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function gm(t){return cs(t)}const pm=["left","right","center","justify"];function wm(t){return pm.includes(t)}function bm(t,e){return"rtl"==e.contentLanguageDirection?"right"===t:"left"===t}function _m(t){const e=t.map((t=>{let e;return e="string"==typeof t?{name:t}:t,e})).filter((t=>{const e=pm.includes(t.name);return e||y("alignment-config-name-not-recognized",{option:t}),e})),i=e.filter((t=>Boolean(t.className))).length;if(i&&i{const s=n.slice(i+1);if(s.some((t=>t.name==e.name)))throw new v("alignment-config-name-already-defined",{option:e,configuredOptions:t});if(e.className){if(s.some((t=>t.className==e.className)))throw new v("alignment-config-classname-already-defined",{option:e,configuredOptions:t})}})),e}const vm="alignment";class ym extends hr{refresh(){const t=this.editor.locale,e=ho(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(e)&&this._canBeAligned(e),this.isEnabled&&e.hasAttribute("alignment")?this.value=e.getAttribute("alignment"):this.value="rtl"===t.contentLanguageDirection?"right":"left"}execute(t={}){const e=this.editor,i=e.locale,n=e.model,s=n.document,o=t.value;n.change((t=>{const e=Array.from(s.selection.getSelectedBlocks()).filter((t=>this._canBeAligned(t))),n=e[0].getAttribute("alignment");bm(o,i)||n===o||!o?function(t,e){for(const i of t)e.removeAttribute(vm,i)}(e,t):function(t,e,i){for(const n of t)e.setAttribute(vm,i,n)}(e,t,o)}))}_canBeAligned(t){return this.editor.model.schema.checkAttribute(t,vm)}}class km extends lr{static get pluginName(){return"AlignmentEditing"}constructor(t){super(t),t.config.define("alignment",{options:pm.map((t=>({name:t})))})}init(){const t=this.editor,e=t.locale,i=t.model.schema,n=_m(t.config.get("alignment.options")).filter((t=>wm(t.name)&&!bm(t.name,e))),s=n.some((t=>!!t.className));i.extend("$block",{allowAttributes:"alignment"}),t.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),s?t.conversion.attributeToAttribute(function(t){const e={};for(const i of t)e[i.name]={key:"class",value:i.className};const i={model:{key:"alignment",values:t.map((t=>t.name))},view:e};return i}(n)):t.conversion.for("downcast").attributeToAttribute(function(t){const e={};for(const{name:i}of t)e[i]={key:"style",value:{"text-align":i}};const i={model:{key:"alignment",values:t.map((t=>t.name))},view:e};return i}(n));const o=function(t){const e=[];for(const{name:i}of t)e.push({view:{key:"style",value:{"text-align":i}},model:{key:"alignment",value:i}});return e}(n);for(const e of o)t.conversion.for("upcast").attributeToAttribute(e);const r=function(t){const e=[];for(const{name:i}of t)e.push({view:{key:"align",value:i},model:{key:"alignment",value:i}});return e}(n);for(const e of r)t.conversion.for("upcast").attributeToAttribute(e);t.commands.add("alignment",new ym(t))}}const Am=new Map([["left",yf.alignLeft],["right",yf.alignRight],["center",yf.alignCenter],["justify",yf.alignJustify]]);class xm extends lr{get localizedOptionTitles(){const t=this.editor.t;return{left:t("Align left"),right:t("Align right"),center:t("Align center"),justify:t("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const t=this.editor,e=t.ui.componentFactory,i=t.t,n=_m(t.config.get("alignment.options"));n.map((t=>t.name)).filter(wm).forEach((t=>this._addButton(t))),e.add("alignment",(s=>{const o=Of(s);If(o,(()=>n.map((t=>e.create(`alignment:${t.name}`)))),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:i("Text alignment toolbar")}),o.buttonView.set({label:i("Text alignment"),tooltip:!0}),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const r="rtl"===s.contentLanguageDirection?Am.get("right"):Am.get("left"),a=t.commands.get("alignment");return o.buttonView.bind("icon").to(a,"value",(t=>Am.get(t)||r)),o.bind("isEnabled").to(a,"isEnabled"),this.listenTo(o,"execute",(()=>{t.editing.view.focus()})),o}))}_addButton(t){const e=this.editor;e.ui.componentFactory.add(`alignment:${t}`,(i=>{const n=e.commands.get("alignment"),s=new qo(i);return s.set({label:this.localizedOptionTitles[t],icon:Am.get(t),tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(n),s.bind("isOn").to(n,"value",(e=>e===t)),this.listenTo(s,"execute",(()=>{e.execute("alignment",{value:t}),e.editing.view.focus()})),s}))}}class Cm{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 Pm extends hr{constructor(t,e){super(t),this._buffer=new Cm(t.model,e)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,i=e.document,n=t.text||"",s=n.length;let o=i.selection;t.selection?o=t.selection:t.range&&(o=e.createSelection(t.range));const r=t.resultRange;e.enqueueChange(this._buffer.batch,(t=>{this._buffer.lock(),e.deleteContent(o),n&&e.insertContent(t.createText(n,i.selection.getAttributes()),o),r?t.setSelection(r):o.is("documentSelection")||t.setSelection(o),this._buffer.unlock(),this._buffer.input(s)}))}}const Tm=["insertText","insertReplacementText"];class Em extends Ul{constructor(t){super(t),r.isAndroid&&Tm.push("insertCompositionText");const e=t.document;e.on("beforeinput",((i,n)=>{if(!this.isEnabled)return;const{data:s,targetRanges:o,inputType:r,domEvent:a}=n;if(!Tm.includes(r))return;const l=new m(e,"insertText");e.fire(l,new Gl(t,a,{text:s,selection:t.createSelection(o)})),l.stop.called&&i.stop()})),e.on("compositionend",((i,{data:n,domEvent:s})=>{this.isEnabled&&!r.isAndroid&&n&&e.fire("insertText",new Gl(t,s,{text:n,selection:e.selection}))}),{priority:"lowest"})}observe(){}}class Sm extends lr{static get pluginName(){return"Input"}init(){const t=this.editor,e=t.model,i=t.editing.view,n=e.document.selection;i.addObserver(Em);const s=new Pm(t,t.config.get("typing.undoStep")||20);t.commands.add("insertText",s),t.commands.add("input",s),this.listenTo(i.document,"insertText",((n,s)=>{i.document.isComposing||s.preventDefault();const{text:o,selection:a,resultRange:l}=s,c=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));let h=o;if(r.isAndroid){const t=Array.from(c[0].getItems()).reduce(((t,e)=>t+(e.is("$textProxy")?e.data:"")),"");t&&(t.length<=h.length?h.startsWith(t)&&(h=h.substring(t.length),c[0].start=c[0].start.getShiftedBy(t.length)):t.startsWith(h)&&(c[0].start=c[0].start.getShiftedBy(h.length),h=""))}const d={text:h,selection:e.createSelection(c)};l&&(d.resultRange=t.editing.mapper.toModelRange(l)),t.execute("insertText",d)})),r.isAndroid?this.listenTo(i.document,"keydown",((t,o)=>{!n.isCollapsed&&229==o.keyCode&&i.document.isComposing&&Rm(e,s)})):this.listenTo(i.document,"compositionstart",(()=>{n.isCollapsed||Rm(e,s)}))}}function Rm(t,e){if(!e.isEnabled)return;const i=e.buffer;i.lock(),t.enqueueChange(i.batch,(()=>{t.deleteContent(t.document.selection)})),i.unlock()}class Om extends hr{constructor(t,e){super(t),this.direction=e,this._buffer=new Cm(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,i=e.document;e.enqueueChange(this._buffer.batch,(n=>{this._buffer.lock();const s=n.createSelection(t.selection||i.selection),o=t.sequence||1,r=s.isCollapsed;if(s.isCollapsed&&e.modifySelection(s,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(o))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(s,o))return void this.editor.execute("paragraph",{selection:s});if(s.isCollapsed)return;let a=0;s.getFirstRange().getMinimalFlatRanges().forEach((t=>{a+=Z(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),e.deleteContent(s,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(a),n.setSelection(s),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,i=e.document.selection,n=e.schema.getLimitElement(i);if(!(i.isCollapsed&&i.containsEntireContent(n)))return!1;if(!e.schema.checkChild(n,"paragraph"))return!1;const s=n.getChild(0);return!s||!s.is("element","paragraph")}_replaceEntireContentWithParagraph(t){const e=this.editor.model,i=e.document.selection,n=e.schema.getLimitElement(i),s=t.createElement("paragraph");t.remove(t.createRangeIn(n)),t.insert(s,n),t.setSelection(s,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const i=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const n=t.getFirstPosition(),s=i.schema.getLimitElement(n),o=s.getChild(0);return n.parent==o&&(!!t.containsEntireContent(o)&&(!!i.schema.checkChild(s,"paragraph")&&"paragraph"!=o.name))}}const Im="word",Vm="selection",Mm="backward",Nm="forward",Bm={deleteContent:{unit:Vm,direction:Mm},deleteContentBackward:{unit:"codePoint",direction:Mm},deleteWordBackward:{unit:Im,direction:Mm},deleteHardLineBackward:{unit:Vm,direction:Mm},deleteSoftLineBackward:{unit:Vm,direction:Mm},deleteContentForward:{unit:"character",direction:Nm},deleteWordForward:{unit:Im,direction:Nm},deleteHardLineForward:{unit:Vm,direction:Nm},deleteSoftLineForward:{unit:Vm,direction:Nm}};class Dm extends Ul{constructor(t){super(t);const e=t.document;let i=0;e.on("keydown",(()=>{i++})),e.on("keyup",(()=>{i=0})),e.on("beforeinput",((n,s)=>{if(!this.isEnabled)return;const{targetRanges:o,domEvent:a,inputType:l}=s,c=Bm[l];if(!c)return;const h={direction:c.direction,unit:c.unit,sequence:i};h.unit==Vm&&(h.selectionToRemove=t.createSelection(o[0])),r.isAndroid&&"deleteContentBackward"===l&&(h.sequence=1,1!=o.length||o[0].start.parent==o[0].end.parent&&o[0].start.offset+1==o[0].end.offset||(h.unit=Vm,h.selectionToRemove=t.createSelection(o)));const d=new Ua(e,"delete",o[0]);e.fire(d,new Gl(t,a,h)),d.stop.called&&n.stop()})),r.isBlink&&function(t){const e=t.view,i=e.document;let n=null,s=!1;function o(t){return t==Zs.backspace||t==Zs.delete}function r(t){return t==Zs.backspace?Mm:Nm}i.on("keydown",((t,{keyCode:e})=>{n=e,s=!1})),i.on("keyup",((a,{keyCode:l,domEvent:c})=>{const h=i.selection,d=t.isEnabled&&l==n&&o(l)&&!h.isCollapsed&&!s;if(n=null,d){const t=h.getFirstRange(),n=new Ua(i,"delete",t),s={unit:Vm,direction:r(l),selectionToRemove:h};i.fire(n,new Gl(e,c,s))}})),i.on("beforeinput",((t,{inputType:e})=>{const i=Bm[e];o(n)&&i&&i.direction==r(n)&&(s=!0)}),{priority:"high"}),i.on("beforeinput",((t,{inputType:e,data:i})=>{n==Zs.delete&&"insertText"==e&&""==i&&t.stop()}),{priority:"high"})}(this)}observe(){}}class Fm extends lr{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,i=e.document,n=t.model.document;e.addObserver(Dm),this._undoOnBackspace=!1;const s=new Om(t,"forward");t.commands.add("deleteForward",s),t.commands.add("forwardDelete",s),t.commands.add("delete",new Om(t,"backward")),this.listenTo(i,"delete",((n,s)=>{i.isComposing||s.preventDefault();const{direction:o,sequence:r,selectionToRemove:a,unit:l}=s,c="forward"===o?"deleteForward":"delete",h={sequence:r};if("selection"==l){const e=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));h.selection=t.model.createSelection(e)}else h.unit=l;t.execute(c,h),e.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(i,"delete",((e,i)=>{this._undoOnBackspace&&"backward"==i.direction&&1==i.sequence&&"codePoint"==i.unit&&(this._undoOnBackspace=!1,t.execute("undo"),i.preventDefault(),e.stop())}),{context:"$capture"}),this.listenTo(n,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Lm extends lr{static get requires(){return[Sm,Fm]}static get pluginName(){return"Typing"}}function zm(t,e){let i=t.start;return{text:Array.from(t.getItems()).reduce(((t,n)=>n.is("$text")||n.is("$textProxy")?t+n.data:(i=e.createPositionAfter(n),"")),""),range:e.createRange(i,t.end)}}class Hm extends(q()){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:i})=>{i&&(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 i=this.model,n=i.document.selection,s=i.createRange(i.createPositionAt(n.focus.parent,0),n.focus),{text:o,range:r}=zm(s,i),a=this.testCallback(o);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const i=Object.assign(e,{text:o,range:r});"object"==typeof a&&Object.assign(i,a),this.fire(`matched:${t}`,i)}}}class jm extends lr{static get pluginName(){return"TwoStepCaretMovement"}constructor(t){super(t),this.attributes=new Set,this._overrideUid=null}init(){const t=this.editor,e=t.model,i=t.editing.view,n=t.locale,s=e.document.selection;this.listenTo(i.document,"arrowKey",((t,e)=>{if(!s.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const i=e.keyCode==Zs.arrowright,o=e.keyCode==Zs.arrowleft;if(!i&&!o)return;const r=n.contentLanguageDirection;let a=!1;a="ltr"===r&&i||"rtl"===r&&o?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(s,"change:range",((t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&Um(s.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,i=this.editor.model.document.selection,n=i.getFirstPosition();return!this._isGravityOverridden&&((!n.isAtStart||!$m(i,e))&&(!!Um(n,e)&&(qm(t),this._overrideGravity(),!0)))}_handleBackwardMovement(t){const e=this.attributes,i=this.editor.model,n=i.document.selection,s=n.getFirstPosition();return this._isGravityOverridden?(qm(t),this._restoreGravity(),Wm(i,e,s),!0):s.isAtStart?!!$m(n,e)&&(qm(t),Wm(i,e,s),!0):!!function(t,e){const i=t.getShiftedBy(-1);return Um(i,e)}(s,e)&&(s.isAtEnd&&!$m(n,e)&&Um(s,e)?(qm(t),Wm(i,e,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}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 $m(t,e){for(const i of e)if(t.hasAttribute(i))return!0;return!1}function Wm(t,e,i){const n=i.nodeBefore;t.change((t=>{n?t.setSelectionAttribute(n.getAttributes()):t.removeSelectionAttribute(e)}))}function qm(t){t.preventDefault()}function Um(t,e){const{nodeBefore:i,nodeAfter:n}=t;for(const t of e){const e=i?i.getAttribute(t):void 0;if((n?n.getAttribute(t):void 0)!==e)return!0}return!1}var Km=/[\\^$.*+?()[\]{}|]/g,Gm=RegExp(Km.source);const Jm=function(t){return(t=Gr(t))&&Gm.test(t)?t.replace(Km,"\\$&"):t},Qm={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:ig('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:ig("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:ig("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:ig('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:ig('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:ig("'"),to:[null,"‚",null,"’"]}},Ym={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Zm=["symbols","mathematical","typography","quotes"];function Xm(t){return"string"==typeof t?new RegExp(`(${Jm(t)})$`):t}function tg(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function eg(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function ig(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function ng(t,e,i,n){return n.createRange(sg(t,e,i,!0,n),sg(t,e,i,!1,n))}function sg(t,e,i,n,s){let o=t.textNode||(n?t.nodeBefore:t.nodeAfter),r=null;for(;o&&o.getAttribute(e)==i;)r=o,o=n?o.previousSibling:o.nextSibling;return r?s.createPositionAt(r,n?"before":"after"):t}function og(t,e,i,n){let s,o=null;"function"==typeof n?s=n:(o=t.commands.get(n),s=()=>{t.execute(n)}),t.model.document.on("change:data",((r,a)=>{if(o&&!o.isEnabled||!e.isEnabled)return;const l=ho(t.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(t.model.document.differ.getChanges()),h=c[0];if(1!=c.length||"insert"!==h.type||"$text"!=h.name||1!=h.length)return;const d=h.position.parent;if(d.is("element","codeBlock"))return;if(d.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(o&&!0===o.value)return;const u=d.getChild(0),f=t.model.createRangeOn(u);if(!f.containsRange(l)&&!l.end.isEqual(f.end))return;const m=i.exec(u.data.substr(0,l.end.offset));m&&t.model.enqueueChange((e=>{const i=e.createPositionAt(d,0),n=e.createPositionAt(d,m[0].length),o=new Mh(i,n);if(!1!==s({match:m})){e.remove(o);const i=t.model.document.selection.getFirstRange(),n=e.createRangeIn(d);!d.isEmpty||n.isEqual(i)||n.containsRange(i,!0)||e.remove(d)}o.detach(),t.model.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function rg(t,e,i,n){let s,o;i instanceof RegExp?s=i:o=i,o=o||(t=>{let e;const i=[],n=[];for(;null!==(e=s.exec(t))&&!(e&&e.length<4);){let{index:t,1:s,2:o,3:r}=e;const a=s+o+r;t+=e[0].length-a.length;const l=[t,t+s.length],c=[t+s.length+o.length,t+s.length+o.length+r.length];i.push(l),i.push(c),n.push([t+s.length,t+s.length+o.length])}return{remove:i,format:n}}),t.model.document.on("change:data",((i,s)=>{if(s.isUndo||!s.isLocal||!e.isEnabled)return;const r=t.model,a=r.document.selection;if(!a.isCollapsed)return;const l=Array.from(r.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const h=a.focus,d=h.parent,{text:u,range:f}=function(t,e){let i=t.start;const n=Array.from(t.getItems()).reduce(((t,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(i=e.createPositionAfter(n),""):t+n.data),"");return{text:n,range:e.createRange(i,t.end)}}(r.createRange(r.createPositionAt(d,0),h),r),m=o(u),g=ag(f.start,m.format,r),p=ag(f.start,m.remove,r);g.length&&p.length&&r.enqueueChange((e=>{if(!1!==n(e,g)){for(const t of p.reverse())e.remove(t);r.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function ag(t,e,i){return e.filter((t=>void 0!==t[0]&&void 0!==t[1])).map((e=>i.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1]))))}function lg(t,e){return(i,n)=>{if(!t.commands.get(e).isEnabled)return!1;const s=t.model.schema.getValidRanges(n,e);for(const t of s)i.setAttribute(e,!0,t);i.removeSelectionAttribute(e)}}function*cg(t,e){for(const i of e)i&&t.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class hg extends hr{execute(){this.editor.model.change((t=>{this.enterBlock(t),this.fire("afterExecute",{writer:t})}))}enterBlock(t){const e=this.editor.model,i=e.document.selection,n=e.schema,s=i.isCollapsed,o=i.getFirstRange(),r=o.start.parent,a=o.end.parent;if(n.isLimit(r)||n.isLimit(a))return s||r!=a||e.deleteContent(i),!1;if(s){const e=cg(t.model.schema,i.getAttributes());return dg(t,o.start),t.setSelectionAttribute(e),!0}{const n=!(o.start.isAtStart&&o.end.isAtEnd),s=r==a;if(e.deleteContent(i,{leaveUnmerged:n}),n){if(s)return dg(t,i.focus),!0;t.setSelection(a,0)}}return!1}}function dg(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}const ug={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class fg extends Ul{constructor(t){super(t);const e=this.document;e.on("beforeinput",((i,n)=>{if(!this.isEnabled)return;const s=n.domEvent,o=ug[n.inputType];if(!o)return;const r=new Ua(e,"enter",n.targetRanges[0]);e.fire(r,new Gl(t,s,{isSoft:o.isSoft})),r.stop.called&&i.stop()}))}observe(){}}class mg extends lr{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,i=e.document;e.addObserver(fg),t.commands.add("enter",new hg(t)),this.listenTo(i,"enter",((n,s)=>{i.isComposing||s.preventDefault(),s.isSoft||(t.execute("enter"),e.scrollToTheSelection())}),{priority:"low"})}}class gg extends hr{execute(){const t=this.editor.model,e=t.document;t.change((i=>{!function(t,e,i){const n=i.isCollapsed,s=i.getFirstRange(),o=s.start.parent,r=s.end.parent,a=o==r;if(n){const n=cg(t.schema,i.getAttributes());pg(t,e,s.end),e.removeSelectionAttribute(i.getAttributeKeys()),e.setSelectionAttribute(n)}else{const n=!(s.start.isAtStart&&s.end.isAtEnd);t.deleteContent(i,{leaveUnmerged:n}),a?pg(t,e,i.focus):n&&e.setSelection(r,0)}}(t,i,e.selection),this.fire("afterExecute",{writer:i})}))}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const i=e.anchor;if(!i||!t.checkChild(i,"softBreak"))return!1;const n=e.getFirstRange(),s=n.start.parent,o=n.end.parent;if((wg(s,t)||wg(o,t))&&s!==o)return!1;return!0}(t.schema,e.selection)}}function pg(t,e,i){const n=e.createElement("softBreak");t.insertContent(n,i),e.setSelection(n,"after")}function wg(t,e){return!t.is("rootElement")&&(e.isLimit(t)||wg(t.parent,e))}class bg extends lr{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,i=t.conversion,n=t.editing.view,s=n.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),n.addObserver(fg),t.commands.add("shiftEnter",new gg(t)),this.listenTo(s,"enter",((e,i)=>{s.isComposing||i.preventDefault(),i.isSoft&&(t.execute("shiftEnter"),n.scrollToTheSelection())}),{priority:"low"})}}class _g extends hr{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.schema,n=e.document.selection,s=Array.from(n.getSelectedBlocks()),o=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(o){const e=s.filter((t=>vg(t)||kg(i,t)));this._applyQuote(t,e)}else this._removeQuote(t,s.filter(vg))}))}_getValue(){const t=ho(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!vg(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,i=ho(t.getSelectedBlocks());return!!i&&kg(e,i)}_removeQuote(t,e){yg(t,e).reverse().forEach((e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const i=t.createPositionBefore(e.start.parent);return void t.move(e,i)}e.end.isAtEnd||t.split(e.end);const i=t.createPositionAfter(e.end.parent);t.move(e,i)}))}_applyQuote(t,e){const i=[];yg(t,e).reverse().forEach((e=>{let n=vg(e.start);n||(n=t.createElement("blockQuote"),t.wrap(e,n)),i.push(n)})),i.reverse().reduce(((e,i)=>e.nextSibling==i?(t.merge(t.createPositionAfter(e)),e):i))}}function vg(t){return"blockQuote"==t.parent.name?t.parent:null}function yg(t,e){let i,n=0;const s=[];for(;n{const n=t.model.document.differ.getChanges();for(const t of n)if("insert"==t.type){const n=t.position.nodeAfter;if(!n)continue;if(n.is("element","blockQuote")&&n.isEmpty)return i.remove(n),!0;if(n.is("element","blockQuote")&&!e.checkChild(t.position,n))return i.unwrap(n),!0;if(n.is("element")){const t=i.createRangeIn(n);for(const n of t.getItems())if(n.is("element","blockQuote")&&!e.checkChild(i.createPositionBefore(n),n))return i.unwrap(n),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return i.remove(e),!0}return!1}));const i=this.editor.editing.view.document,n=t.model.document.selection,s=t.commands.get("blockQuote");this.listenTo(i,"enter",((e,i)=>{if(!n.isCollapsed||!s.value)return;n.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),i.preventDefault(),e.stop())}),{context:"blockquote"}),this.listenTo(i,"delete",((e,i)=>{if("backward"!=i.direction||!n.isCollapsed||!s.value)return;const o=n.getLastPosition().parent;o.isEmpty&&!o.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),i.preventDefault(),e.stop())}),{context:"blockquote"})}}class xg extends lr{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("blockQuote",(i=>{const n=t.commands.get("blockQuote"),s=new qo(i);return s.set({label:e("Block quote"),icon:yf.quote,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),s}))}}class Cg extends hr{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,i=e.document.selection,n=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(i.isCollapsed)n?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const s=e.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const e of s)n?t.setAttribute(this.attributeKey,n,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,i=t.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const t of i.getRanges())for(const i of t.getItems())if(e.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const Pg="bold";class Tg extends lr{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Pg}),t.model.schema.setAttributeProperties(Pg,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Pg,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(Pg,new Cg(t,Pg)),t.keystrokes.set("CTRL+B",Pg)}}const Eg="bold";class Sg extends lr{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Eg,(i=>{const n=t.commands.get(Eg),s=new qo(i);return s.set({label:e("Bold"),icon:yf.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{t.execute(Eg),t.editing.view.focus()})),s}))}}class Rg extends Jl{constructor(t){super(t);const e=this.document;function i(t){return(i,n)=>{n.preventDefault();const s=n.dropRange?[n.dropRange]:null,o=new m(e,t);e.fire(o,{dataTransfer:n.dataTransfer,method:i.name,targetRanges:s,target:n.target}),o.stop.called&&n.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(e,"paste",i("clipboardInput"),{priority:"low"}),this.listenTo(e,"drop",i("clipboardInput"),{priority:"low"}),this.listenTo(e,"dragover",i("dragging"),{priority:"low"})}onDomEvent(t){const e={dataTransfer:new nh("clipboardData"in t?t.clipboardData:t.dataTransfer)};"drop"!=t.type&&"dragover"!=t.type||(e.dropRange=function(t,e){const i=e.target.ownerDocument,n=e.clientX,s=e.clientY;let o;i.caretRangeFromPoint&&i.caretRangeFromPoint(n,s)?o=i.caretRangeFromPoint(n,s):e.rangeParent&&(o=i.createRange(),o.setStart(e.rangeParent,e.rangeOffset),o.collapse(!0));if(o)return t.domConverter.domRangeToView(o);return null}(this.view,t)),this.fire(t.type,t,e)}}const Og=["figcaption","li"];function Ig(t){let e="";if(t.is("$text")||t.is("$textProxy"))e=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))e=t.getAttribute("alt");else if(t.is("element","br"))e="\n";else{let i=null;for(const n of t.getChildren()){const t=Ig(n);i&&(i.is("containerElement")||n.is("containerElement"))&&(Og.includes(i.name)||Og.includes(n.name)?e+="\n":e+="\n\n"),e+=t,i=n}}return e}class Vg extends lr{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(Rg),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const t=this.editor,e=t.model,i=t.editing.view,n=i.document;this.listenTo(n,"clipboardInput",(e=>{t.isReadOnly&&e.stop()}),{priority:"highest"}),this.listenTo(n,"clipboardInput",((t,e)=>{const n=e.dataTransfer;let s;if(e.content)s=e.content;else{let t="";n.getData("text/html")?t=function(t){return t.replace(/(\s+)<\/span>/g,((t,e)=>1==e.length?" ":e)).replace(//g,"")}(n.getData("text/html")):n.getData("text/plain")&&(((o=(o=n.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"
").replace(/\r?\n/g,"
").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("
")||o.includes("
"))&&(o=`
${o}
`),t=o),s=this.editor.data.htmlProcessor.toView(t)}var o;const r=new m(this,"inputTransformation");this.fire(r,{content:s,dataTransfer:n,targetRanges:e.targetRanges,method:e.method}),r.stop.called&&t.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((t,i)=>{if(i.content.isEmpty)return;const n=this.editor.data.toModel(i.content,"$clipboardHolder");0!=n.childCount&&(t.stop(),e.change((()=>{this.fire("contentInsertion",{content:n,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((t,i)=>{i.resultRange=e.insertContent(i.content)}),{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,i=t.editing.view.document,n=(n,s)=>{const o=s.dataTransfer;s.preventDefault();const r=t.data.toView(t.model.getSelectedContent(e.selection));i.fire("clipboardOutput",{dataTransfer:o,content:r,method:n.name})};this.listenTo(i,"copy",n,{priority:"low"}),this.listenTo(i,"cut",((e,i)=>{t.isReadOnly?i.preventDefault():n(e,i)}),{priority:"low"}),this.listenTo(i,"clipboardOutput",((i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",Ig(n.content))),"cut"==n.method&&t.model.deleteContent(e.selection)}),{priority:"low"})}}class Mg extends(R()){constructor(){super(),this._stack=[]}add(t,e){const i=this._stack,n=i[0];this._insertDescriptor(t);const s=i[0];n===s||Ng(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:e})}remove(t,e){const i=this._stack,n=i[0];this._removeDescriptor(t);const s=i[0];n===s||Ng(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:e})}_insertDescriptor(t){const e=this._stack,i=e.findIndex((e=>e.id===t.id));if(Ng(t,e[i]))return;i>-1&&e.splice(i,1);let n=0;for(;e[n]&&Bg(e[n],t);)n++;e.splice(n,0,t)}_removeDescriptor(t){const e=this._stack,i=e.findIndex((e=>e.id===t));i>-1&&e.splice(i,1)}}function Ng(t,e){return t&&e&&t.priority==e.priority&&Dg(t.classes)==Dg(e.classes)}function Bg(t,e){return t.priority>e.priority||!(t.priorityDg(e.classes)}function Dg(t){return Array.isArray(t)?t.sort().join(","):t}const Fg='',Lg="ck-widget",zg="ck-widget_selected";function Hg(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function jg(t,e,i={}){if(!t.is("containerElement"))throw new v("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass(Lg,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=Ug,e.setCustomProperty("widgetLabel",[],t),i.label&&function(t,e){const i=t.getCustomProperty("widgetLabel");i.push(e)}(t,i.label),i.hasSelectionHandle&&function(t,e){const i=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),i=new Wo;return i.set("content",Fg),i.render(),e.appendChild(i.element),e}));e.insert(e.createPositionAt(t,0),i),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),qg(t,e),t}function $g(t,e,i){if(e.classes&&i.addClass(so(e.classes),t),e.attributes)for(const n in e.attributes)i.setAttribute(n,e.attributes[n],t)}function Wg(t,e,i){if(e.classes&&i.removeClass(so(e.classes),t),e.attributes)for(const n in e.attributes)i.removeAttribute(n,t)}function qg(t,e,i=$g,n=Wg){const s=new Mg;s.on("change:top",((e,s)=>{s.oldDescriptor&&n(t,s.oldDescriptor,s.writer),s.newDescriptor&&i(t,s.newDescriptor,s.writer)}));e.setCustomProperty("addHighlight",((t,e,i)=>s.add(e,i)),t),e.setCustomProperty("removeHighlight",((t,e,i)=>s.remove(e,i)),t)}function Ug(){return null}const Kg="widget-type-around";function Gg(t,e,i){return!!t&&Hg(t)&&!i.isInline(e)}function Jg(t){return t.getAttribute(Kg)}const Qg=["before","after"],Yg=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,Zg="ck-widget__type-around_disabled";class Xg extends lr{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[mg,Fm]}constructor(t){super(t),this._currentFakeCaretModelElement=null}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",((i,n,s)=>{e.change((t=>{for(const i of e.document.roots)s?t.removeClass(Zg,i):t.addClass(Zg,i)})),s||t.model.change((t=>{t.removeSelectionAttribute(Kg)}))})),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 i=this.editor,n=i.editing.view,s=i.model.schema.getAttributesWithProperty(t,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(t,e),attributes:s}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(t,e,i,n){this.listenTo(t,e,((...t)=>{this.isEnabled&&i(...t)}),n)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=Jg(t);if(!e)return!1;const i=t.getSelectedElement();return this._insertParagraph(i,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,i=t.locale.t,n={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",((t,s,o)=>{const r=o.mapper.toViewElement(s.item);if(r&&Gg(r,s.item,e)){!function(t,e,i){const n=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const i=this.toDomElement(t);return function(t,e){for(const i of Qg){const n=new ko({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${i}`],title:e[i],"aria-hidden":"true"},children:[t.ownerDocument.importNode(Yg,!0)]});t.appendChild(n.render())}}(i,e),function(t){const e=new ko({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(i),i}));t.insert(t.createPositionAt(i,"end"),n)}(o.writer,n,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,i=e.document.selection,n=e.schema,s=t.editing.view;function o(t){return`ck-widget_type-around_show-fake-caret_${t}`}this._listenToIfEnabled(s.document,"arrowKey",((t,e)=>{this._handleArrowKeyPress(t,e)}),{context:[Hg,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",((e,i)=>{i.directChange&&t.model.change((t=>{t.removeSelectionAttribute(Kg)}))})),this._listenToIfEnabled(e.document,"change:data",(()=>{const e=i.getSelectedElement();if(e){if(Gg(t.editing.mapper.toViewElement(e),e,n))return}t.model.change((t=>{t.removeSelectionAttribute(Kg)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",((t,e,i)=>{const s=i.writer;if(this._currentFakeCaretModelElement){const t=i.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(s.removeClass(Qg.map(o),t),this._currentFakeCaretModelElement=null)}const r=e.selection.getSelectedElement();if(!r)return;const a=i.mapper.toViewElement(r);if(!Gg(a,r,n))return;const l=Jg(e.selection);l&&(s.addClass(o(l),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",((e,i,n)=>{n||t.model.change((t=>{t.removeSelectionAttribute(Kg)}))}))}_handleArrowKeyPress(t,e){const i=this.editor,n=i.model,s=n.document.selection,o=n.schema,r=i.editing.view,a=function(t,e){const i=no(t,e);return"down"===i||"right"===i}(e.keyCode,i.locale.contentLanguageDirection),l=r.document.selection.getSelectedElement();let c;Gg(l,i.editing.mapper.toModelElement(l),o)?c=this._handleArrowKeyPressOnSelectedWidget(a):s.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):e.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,i=Jg(e.document.selection);return e.change((e=>{if(!i)return e.setSelectionAttribute(Kg,t?"after":"before"),!0;if(!(i===(t?"after":"before")))return e.removeSelectionAttribute(Kg),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,i=e.model,n=i.schema,s=e.plugins.get("Widget"),o=s._getObjectElementNextToSelection(t);return!!Gg(e.editing.mapper.toViewElement(o),o,n)&&(i.change((e=>{s._setSelectionOverElement(o),e.setSelectionAttribute(Kg,t?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,i=e.model,n=i.schema,s=e.editing.mapper,o=i.document.selection,r=t?o.getLastPosition().nodeBefore:o.getFirstPosition().nodeAfter;return!!Gg(s.toViewElement(r),r,n)&&(i.change((e=>{e.setSelection(r,"on"),e.setSelectionAttribute(Kg,t?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",((i,n)=>{const s=n.domTarget.closest(".ck-widget__type-around__button");if(!s)return;const o=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(s),r=function(t,e){const i=t.closest(".ck-widget");return e.mapDomToView(i)}(s,e.domConverter),a=t.editing.mapper.toModelElement(r);this._insertParagraph(a,o),n.preventDefault(),i.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,i=t.editing.view;this._listenToIfEnabled(i.document,"enter",((i,n)=>{if("atTarget"!=i.eventPhase)return;const s=e.getSelectedElement(),o=t.editing.mapper.toViewElement(s),r=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Gg(o,s,r)&&(this._insertParagraph(s,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),i.stop())}),{context:Hg})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",((e,i)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(i.selection=t.selection)}),{priority:"high"}),r.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,i=t.model,n=i.schema;this._listenToIfEnabled(e.document,"delete",((e,s)=>{if("atTarget"!=e.eventPhase)return;const o=Jg(i.document.selection);if(!o)return;const r=s.direction,a=i.document.selection.getSelectedElement(),l="forward"==r;if("before"===o===l)t.execute("delete",{selection:i.createSelection(a,"on")});else{const e=n.getNearestSelectionRange(i.createPositionAt(a,o),r);if(e)if(e.isCollapsed){const s=i.createSelection(e.start);if(i.modifySelection(s,{direction:r}),s.focus.isEqual(e.start)){const t=function(t,e){let i=e;for(const n of e.getAncestors({parentFirst:!0})){if(n.childCount>1||t.isLimit(n))break;i=n}return i}(n,e.start.parent);i.deleteContent(i.createSelection(t,"on"),{doNotAutoparagraph:!0})}else i.change((i=>{i.setSelection(e),t.execute(l?"deleteForward":"delete")}))}else i.change((i=>{i.setSelection(e),t.execute(l?"deleteForward":"delete")}))}s.preventDefault(),e.stop()}),{context:Hg})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,i=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",((t,[n,s])=>{if(s&&!s.is("documentSelection"))return;const o=Jg(i);return o?(t.stop(),e.change((t=>{const s=i.getSelectedElement(),r=e.createPositionAt(s,o),a=t.createSelection(r),l=e.insertContent(n,a);return t.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"insertObject",((t,i)=>{const[,n,,s={}]=i;if(n&&!n.is("documentSelection"))return;const o=Jg(e);o&&(s.findOptimalPosition=o,i[3]=s)}),{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",((t,[i])=>{if(i&&!i.is("documentSelection"))return;Jg(e)&&t.stop()}),{priority:"high"})}}function tp(t){const e=t.model;return(i,n)=>{const s=n.keyCode==Zs.arrowup,o=n.keyCode==Zs.arrowdown,r=n.shiftKey,a=e.document.selection;if(!s&&!o)return;const l=o;if(r&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,l))return;const c=function(t,e,i){const n=t.model;if(i){const t=e.isCollapsed?e.focus:e.getLastPosition(),i=ep(n,t,"forward");if(!i)return null;const s=n.createRange(t,i),o=ip(n.schema,s,"backward");return o?n.createRange(t,o):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),i=ep(n,t,"backward");if(!i)return null;const s=n.createRange(i,t),o=ip(n.schema,s,"forward");return o?n.createRange(o,t):null}}(t,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(r)return}(c.isCollapsed||function(t,e,i){const n=t.model,s=t.view.domConverter;if(i){const t=n.createSelection(e.start);n.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=n.createRange(t.focus,e.end))}const o=t.mapper.toViewRange(e),r=s.viewRangeToDom(o),a=Ps.getDomRangeRects(r);let l;for(const t of a)if(void 0!==l){if(Math.round(t.top)>=l)return!1;l=Math.max(l,Math.round(t.bottom))}else l=Math.round(t.bottom);return!0}(t,c,l))&&(e.change((t=>{const i=l?c.end:c.start;if(r){const n=e.createSelection(a.anchor);n.setFocus(i),t.setSelection(n)}else t.setSelection(i)})),i.stop(),n.preventDefault(),n.stopPropagation())}}}function ep(t,e,i){const n=t.schema,s=t.createRangeIn(e.root),o="forward"==i?"elementStart":"elementEnd";for(const{previousPosition:t,item:r,type:a}of s.getWalker({startPosition:e,direction:i})){if(n.isLimit(r)&&!n.isInline(r))return t;if(a==o&&n.isBlock(r))return null}return null}function ip(t,e,i){const n="backward"==i?e.end:e.start;if(t.checkChild(n,"$text"))return n;for(const{nextPosition:n}of e.getWalker({direction:i}))if(t.checkChild(n,"$text"))return n;return null}class np extends lr{static get pluginName(){return"Widget"}static get requires(){return[Xg,Fm]}init(){const t=this.editor,e=t.editing.view,i=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",((e,i,n)=>{const s=n.writer,o=i.selection;if(o.isCollapsed)return;const r=o.getSelectedElement();if(!r)return;const a=t.editing.mapper.toViewElement(r);var l;Hg(a)&&(n.consumable.consume(o,"selection")&&s.setSelection(s.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((t,e)=>"function"==typeof e?t?t+". "+e():e():t?t+". "+e:e),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((t,e,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer,s=n.document.selection;let o=null;for(const t of s.getRanges())for(const e of t){const t=e.item;Hg(t)&&!sp(t,o)&&(n.addClass(zg,t),this._previouslySelected.add(t),o=t)}}),{priority:"low"}),e.addObserver(lf),this.listenTo(i,"mousedown",((...t)=>this._onMousedown(...t))),this.listenTo(i,"arrowKey",((...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)}),{context:[Hg,"$text"]}),this.listenTo(i,"arrowKey",((...t)=>{this._preventDefaultOnArrowKeyPress(...t)}),{context:"$root"}),this.listenTo(i,"arrowKey",tp(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",((t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())}),{context:"$root"})}_onMousedown(t,e){const i=this.editor,n=i.editing.view,s=n.document;let o=e.target;if(function(t){let e=t;for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Hg(e))return!1;e=e.parent}return!1}(o)){if((r.isSafari||r.isGecko)&&e.domEvent.detail>=3){const t=i.editing.mapper,n=o.is("attributeElement")?o.findAncestor((t=>!t.is("attributeElement"))):o,s=t.toModelElement(n);e.preventDefault(),this.editor.model.change((t=>{t.setSelection(s,"in")}))}return}if(!Hg(o)&&(o=o.findAncestor(Hg),!o))return;r.isAndroid&&e.preventDefault(),s.isFocused||n.focus();const a=i.editing.mapper.toModelElement(o);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(t,e){const i=e.keyCode,n=this.editor.model,s=n.schema,o=n.document.selection,r=o.getSelectedElement(),a=no(i,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(r&&s.isObject(r)){const i=l?o.getLastPosition():o.getFirstPosition(),r=s.getNearestSelectionRange(i,l?"forward":"backward");return void(r&&(n.change((t=>{t.setSelection(r)})),e.preventDefault(),t.stop()))}if(!o.isCollapsed&&!e.shiftKey){const i=o.getFirstPosition(),r=o.getLastPosition(),a=i.nodeAfter,c=r.nodeBefore;return void((a&&s.isObject(a)||c&&s.isObject(c))&&(n.change((t=>{t.setSelection(l?r:i)})),e.preventDefault(),t.stop()))}if(!o.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&s.isObject(h)){if(s.isInline(h)&&c)return;this._setSelectionOverElement(h),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const i=this.editor.model,n=i.schema,s=i.document.selection.getSelectedElement();s&&n.isObject(s)&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const i=this._getObjectElementNextToSelection(t);return i?(this.editor.model.change((t=>{let n=e.anchor.parent;for(;n.isEmpty;){const e=n;n=e.parent,t.remove(e)}this._setSelectionOverElement(i)})),!0):void 0}_setSelectionOverElement(t){this.editor.model.change((e=>{e.setSelection(e.createRangeOn(t))}))}_getObjectElementNextToSelection(t){const e=this.editor.model,i=e.schema,n=e.document.selection,s=e.createSelection(n);if(e.modifySelection(s,{direction:t?"forward":"backward"}),s.isEqual(n))return null;const o=t?s.focus.nodeBefore:s.focus.nodeAfter;return o&&i.isObject(o)?o:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(zg,e);this._previouslySelected.clear()}}function sp(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class op extends(q()){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,i){const n=new Rect(e);this.activeHandlePosition=function(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const i of e)if(t.classList.contains(getResizerHandleClass(i)))return i}(t),this._referenceCoordinates=function(t,e){const i=new Rect(t),n=e.split("-"),s={x:"right"==n[1]?i.right:i.left,y:"bottom"==n[0]?i.bottom:i.top};return s.x+=t.ownerDocument.defaultView.scrollX,s.y+=t.ownerDocument.defaultView.scrollY,s}(e,function(t){const e=t.split("-"),i={top:"bottom",bottom:"top",left:"right",right:"left"};return`${i[e[0]]}-${i[e[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const s=i.style.width;s&&s.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(s):this._originalWidthPercents=function(t,e){const i=t.parentElement,n=parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).width);return e.width/n*100}(i,n)}update(t){this.proposedWidth=t.width,this.proposedHeight=t.height,this.proposedWidthPercents=t.widthPercents,this.proposedHandleHostWidth=t.handleHostWidth,this.proposedHandleHostHeight=t.handleHostHeight}}class rp extends(q()){constructor(t){super(),this._options=t,this._viewResizerWrapper=null,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((i=>{const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(e){const i=this.toDomElement(e);return t._appendHandles(i),t._appendSizeUI(i),i}));i.insert(i.createPositionAt(e,"end"),n),i.addClass("ck-widget_with-resizer",e),this._viewResizerWrapper=n,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(t){this._state=new ResizeState(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 i=this._options.unit||"%",n=("%"===i?e.widthPercents:e.width)+i;t.setStyle("width",n,this._options.viewElement)}));const i=this._getHandleHost(),n=new Rect(i),s=Math.round(n.width),o=Math.round(n.height),r=new Rect(i);e.width=Math.round(r.width),e.height=Math.round(r.height),this.redraw(n),this.state.update({...e,handleHostWidth:s,handleHostHeight:o})}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(!(e&&i.ownerDocument&&i.ownerDocument.contains(i)))return;var i;const n=e.parentElement,s=this._getHandleHost(),o=this._viewResizerWrapper,r=[o.getStyle("width"),o.getStyle("height"),o.getStyle("left"),o.getStyle("top")];let a;if(n.isSameNode(s)){const e=t||new Rect(s);[e.width+"px",e.height+"px",void 0,void 0]}else[s.offsetWidth+"px",s.offsetHeight+"px",s.offsetLeft+"px",s.offsetTop+"px"];"same"!==compareArrays(r,a)&&this._options.editor.editing.view.change((t=>{t.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},o)}))}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,i={x:t.pageX,y:n.pageY};var n;const s=!this._options.isCentered||this._options.isCentered(this),o={x:e._referenceCoordinates.x-(i.x+e.originalWidth),y:i.y-e.originalHeight-e._referenceCoordinates.y};s&&e.activeHandlePosition.endsWith("-right")&&(o.x=i.x-(e._referenceCoordinates.x+e.originalWidth)),s&&(o.x*=2);let r=Math.abs(e.originalWidth+o.x),a=Math.abs(e.originalHeight+o.y);return"width"==(r/e.aspectRatio>a?"width":"height")?r/e.aspectRatio:a*e.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*r*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 n of e)t.appendChild(new Template({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(n,`ck-widget__resizer__handle-${i}`)}}).render());var i}_appendSizeUI(t){this._sizeView=new SizeView,this._sizeView.render(),t.appendChild(this._sizeView.element)}}var ap="Expected a function";const lp=function(t,e,i){var n=!0,s=!0;if("function"!=typeof t)throw new TypeError(ap);return F(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),dc(t,e,{leading:n,maxWait:e,trailing:s})};class cp extends lr{static get pluginName(){return"DragDrop"}static get requires(){return[Vg,np]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=lp((t=>this._updateDropMarker(t)),40),this._removeDropMarkerDelayed=up((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=up((()=>this._clearDraggableAttributes()),40),e.addObserver(Rg),e.addObserver(lf),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",((t,e,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((t,e,i)=>{i||this._finalizeDragging(!1)})),r.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,i=e.document,n=t.editing.view,s=n.document;this.listenTo(s,"dragstart",((n,o)=>{const r=i.selection;if(o.target&&o.target.is("editableElement"))return void o.preventDefault();const a=o.target?fp(o.target):null;if(a){const i=t.editing.mapper.toModelElement(a);this._draggedRange=Mh.fromRange(e.createRangeOn(i)),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!s.selection.isCollapsed){const t=s.selection.getSelectedElement();t&&Hg(t)||(this._draggedRange=Mh.fromRange(r.getFirstRange()))}if(!this._draggedRange)return void o.preventDefault();this._draggingUid=p(),o.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",o.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const l=e.createSelection(this._draggedRange.toRange()),c=t.data.toView(e.getSelectedContent(l));s.fire("clipboardOutput",{dataTransfer:o.dataTransfer,content:c,method:"dragstart"}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(s,"dragend",((t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(s,"dragenter",(()=>{this.isEnabled&&n.focus()})),this.listenTo(s,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(s,"dragging",((e,i)=>{if(!this.isEnabled)return void(i.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const n=hp(t,i.targetRanges,i.target);this._draggedRange||(i.dataTransfer.dropEffect="copy"),r.isGecko||("copy"==i.dataTransfer.effectAllowed?i.dataTransfer.dropEffect="copy":["all","copyMove"].includes(i.dataTransfer.effectAllowed)&&(i.dataTransfer.dropEffect="move")),n&&this._updateDropMarkerThrottled(n)}),{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"clipboardInput",((e,i)=>{if("drop"!=i.method)return;const n=hp(t,i.targetRanges,i.target);if(this._removeDropMarker(),!n)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=i.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==dp(i.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(n,!0))return this._finalizeDragging(!1),void e.stop();i.targetRanges=[t.editing.mapper.toViewRange(n)]}),{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(Vg);t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const i=e.targetRanges.map((t=>this.editor.editing.mapper.toModelRange(t)));this.editor.model.change((t=>t.setSelection(i)))}),{priority:"high"}),t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const i="move"==dp(e.dataTransfer),n=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(n&&i)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,i=e.document;this.listenTo(i,"mousedown",((n,s)=>{if(r.isAndroid||!s)return;this._clearDraggableAttributesDelayed.cancel();let o=fp(s.target);if(r.isBlink&&!t.isReadOnly&&!o&&!i.selection.isCollapsed){const t=i.selection.getSelectedElement();t&&Hg(t)||(o=i.selection.editableElement)}o&&(e.change((t=>{t.setAttribute("draggable","true",o)})),this._draggableElement=t.editing.mapper.toModelElement(o))})),this.listenTo(i,"mouseup",(()=>{r.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}))}_setupDropMarker(){const t=this.editor;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:i})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return i.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.append("",t.createElement("span"),""),e}))}})}_updateDropMarker(t){const e=this.editor,i=e.model.markers;e.model.change((e=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const t=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),t.markers.has("drop-target")&&t.change((t=>{t.removeMarker("drop-target")}))}_finalizeDragging(t){const e=this.editor,i=e.model;this._removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(t&&this.isEnabled&&i.deleteContent(i.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function hp(t,e,i){const n=t.model,s=t.editing.mapper;let o=null;const a=e?e[0].start:null;if(i.is("uiElement")&&(i=i.parent),o=function(t,e){const i=t.model,n=t.editing.mapper;if(Hg(e))return i.createRangeOn(n.toModelElement(e));if(!e.is("editableElement")){const t=e.findAncestor((t=>Hg(t)||t.is("editableElement")));if(Hg(t))return i.createRangeOn(n.toModelElement(t))}return null}(t,i),o)return o;const l=function(t,e){const i=t.editing.mapper,n=t.editing.view,s=i.toModelElement(e);if(s)return s;const o=n.createPositionBefore(e),r=i.findMappedViewAncestor(o);return i.toModelElement(r)}(t,i),c=a?s.toModelPosition(a):null;return c?(o=function(t,e,i){const n=t.model;if(!n.schema.checkChild(i,"$block"))return null;const s=n.createPositionAt(i,0),o=e.path.slice(0,s.path.length),r=n.createPositionFromPath(e.root,o),a=r.nodeAfter;if(a&&n.schema.isObject(a))return n.createRangeOn(a);return null}(t,c,l),o||(o=n.schema.getNearestSelectionRange(c,r.isGecko?"forward":"backward"),o||function(t,e){const i=t.model;let n=e;for(;n;){if(i.schema.isObject(n))return i.createRangeOn(n);n=n.parent}return null}(t,c.parent))):function(t,e){const i=t.model,n=i.schema,s=i.createPositionAt(e,0);return n.getNearestSelectionRange(s,"forward")}(t,l)}function dp(t){return r.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function up(t,e){let i;function n(...s){n.cancel(),i=setTimeout((()=>t(...s)),e)}return n.cancel=()=>{clearTimeout(i)},n}function fp(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(Hg);if(Hg(t))return t;const e=t.findAncestor((t=>Hg(t)||t.is("editableElement")));return Hg(e)?e:null}class mp extends lr{static get pluginName(){return"PastePlainText"}static get requires(){return[Vg]}init(){const t=this.editor,e=t.model,i=t.editing.view,n=i.document,s=e.document.selection;let o=!1;i.addObserver(Rg),this.listenTo(n,"keydown",((t,e)=>{o=e.shiftKey})),t.plugins.get(Vg).on("contentInsertion",((t,i)=>{(o||function(t,e){if(t.childCount>1)return!1;const i=t.getChild(0);if(e.isObject(i))return!1;return 0==Array.from(i.getAttributeKeys()).length}(i.content,e.schema))&&e.change((t=>{const n=Array.from(s.getAttributes()).filter((([t])=>e.schema.getAttributeProperties(t).isFormatting));s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0}),n.push(...s.getAttributes());const o=t.createRangeIn(i.content);for(const e of o.getItems())e.is("$textProxy")&&t.setAttributes(n,e)}))}))}}class gp extends lr{static get pluginName(){return"Clipboard"}static get requires(){return[Vg,cp,mp]}}class pp extends hr{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let i=t.schema.getLimitElement(e);if(e.containsEntireContent(i)||!wp(t.schema,i))do{if(i=i.parent,!i)return}while(!wp(t.schema,i));t.change((t=>{t.setSelection(i,"in")}))}}function wp(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const bp=eo("Ctrl+A");class _p extends lr{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.editing.view.document;t.commands.add("selectAll",new pp(t)),this.listenTo(e,"keydown",((e,i)=>{to(i)===bp&&(t.execute("selectAll"),i.preventDefault())}))}}class vp extends lr{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",(e=>{const i=t.commands.get("selectAll"),n=new qo(e),s=e.t;return n.set({label:s("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isEnabled").to(i,"isEnabled"),this.listenTo(n,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),n}))}}class yp extends lr{static get requires(){return[_p,vp]}static get pluginName(){return"SelectAll"}}class kp extends hr{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(t.data,"set",((t,e)=>{e[1]={...e[1]};const i=e[1];i.batchType||(i.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}addBatch(t){const e=this.editor.model.document.selection,i={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,i){const n=this.editor.model,s=n.document,o=[],r=t.map((t=>t.getTransformedByOperations(i))),a=r.flat();for(const t of r){const e=t.filter((t=>t.root!=s.graveyard)).filter((t=>!xp(t,a)));e.length&&(Ap(e),o.push(e[0]))}o.length&&n.change((t=>{t.setSelection(o,{backward:e})}))}_undo(t,e){const i=this.editor.model,n=i.document;this._createdBatches.add(e);const s=t.operations.slice().filter((t=>t.isDocumentOperation));s.reverse();for(const t of s){const s=t.baseVersion+1,o=Array.from(n.history.getOperations(s)),r=hu([t.getReversed()],o,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const s of r)e.addOperation(s),i.applyOperation(s),n.history.setOperationAsUndone(t,s)}}}function Ap(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;ee!==t&&e.containsRange(t,!0)))}class Cp extends kp{execute(t=null){const e=t?this._stack.findIndex((e=>e.batch==t)):this._stack.length-1,i=this._stack.splice(e,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,(()=>{this._undo(i.batch,n);const t=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,t),this.fire("revert",i.batch,n)})),this.refresh()}}class Pp extends kp{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(e,(()=>{const i=t.batch.operations[t.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(i);this._restoreSelection(t.selection.ranges,t.selection.isBackward,n),this._undo(t.batch,e)})),this.refresh()}}class Tp extends lr{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new Cp(t),this._redoCommand=new Pp(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",((t,e)=>{const i=e[0];if(!i.isDocumentOperation)return;const n=i.batch,s=this._redoCommand._createdBatches.has(n),o=this._undoCommand._createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(s?this._undoCommand.addBatch(n):o||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((t,e,i)=>{this._redoCommand.addBatch(i)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}const Ep='',Sp='';class Rp extends lr{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,i=t.t,n="ltr"==e.uiLanguageDirection?Ep:Sp,s="ltr"==e.uiLanguageDirection?Sp:Ep;this._addButton("undo",i("Undo"),"CTRL+Z",n),this._addButton("redo",i("Redo"),"CTRL+Y",s)}_addButton(t,e,i,n){const s=this.editor;s.ui.componentFactory.add(t,(o=>{const r=s.commands.get(t),a=new qo(o);return a.set({label:e,icon:n,keystroke:i,tooltip:!0}),a.bind("isEnabled").to(r,"isEnabled"),this.listenTo(a,"execute",(()=>{s.execute(t),s.editing.view.focus()})),a}))}}class Op extends lr{static get requires(){return[Tp,Rp]}static get pluginName(){return"Undo"}}class Ip extends hr{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,i=e.document.selection,n=t.value;e.change((t=>{if(i.isCollapsed)n?t.setSelectionAttribute(this.attributeKey,n):t.removeSelectionAttribute(this.attributeKey);else{const s=e.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const e of s)n?t.setAttribute(this.attributeKey,n,e):t.removeAttribute(this.attributeKey,e)}}))}}class Vp extends co{constructor(t){super(t),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(t,e){this.find((e=>e.color===t.color))||super.add(t,e)}hasColor(t){return!!this.find((e=>e.color===t))}}u(Vp,q);class Mp extends yo{constructor(t,{colors:e,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o}){super(t),this.items=this.createCollection(),this.colorDefinitions=e,this.focusTracker=new uo,this.keystrokes=new fo,this.set("selectedColor"),this.removeButtonLabel=n,this.columns=i,this.documentColors=new Vp,this.documentColorsCount=o,this._focusables=new vo,this._focusCycler=new nr({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._documentColorsLabel=s,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._createRemoveColorButton())}updateDocumentColors(t,e){const i=t.document,n=this.documentColorsCount;this.documentColors.clear();for(const s of i.getRootNames()){const o=i.getRoot(s),r=t.createRangeIn(o);for(const t of r.getItems())if(t.is("$textProxy")&&t.hasAttribute(e)&&(this._addColorToDocumentColors(t.getAttribute(e)),this.documentColors.length>=n))return}}updateSelectedColors(){const t=this.documentColorsGrid,e=this.staticColorsGrid,i=this.selectedColor;e.selectedColor=i,t&&(t.selectedColor=i)}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid),this.documentColorsCount)){const t=ko.bind(this.documentColors,this.documentColors),e=new Gf(this.locale);e.text=this._documentColorsLabel,e.extendTemplate({attributes:{class:["ck","ck-color-grid__label",t.if("isEmpty","ck-hidden")]}}),this.items.add(e),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid),this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_createRemoveColorButton(){const t=new qo;return t.set({withText:!0,icon:yf.eraser,label:this.removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",(()=>{this.fire("execute",{value:null})})),t.render(),this.focusTracker.add(t.element),this._focusables.add(t),t}_createStaticColorsGrid(){const t=new Jo(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return t.delegate("execute").to(this),t}_createDocumentColorsGrid(){const t=ko.bind(this.documentColors,this.documentColors),e=new Jo(this.locale,{columns:this.columns});return e.delegate("execute").to(this),e.extendTemplate({attributes:{class:t.if("isEmpty","ck-hidden")}}),e.items.bindTo(this.documentColors).using((t=>{const e=new Go;return e.set({color:t.color,hasBorder:t.options&&t.options.hasBorder}),t.label&&e.set({label:t.label,tooltip:!0}),e.on("execute",(()=>{this.fire("execute",{value:t.color})})),e})),this.documentColors.on("change:isEmpty",((t,i,n)=>{n&&(e.selectedColor=null)})),e}_addColorToDocumentColors(t){const e=this.colorDefinitions.find((e=>e.color===t));e?this.documentColors.add(Object.assign({},e)):this.documentColors.add({color:t,label:t,options:{hasBorder:!1}})}}const Np="fontSize",Bp="fontFamily",Dp="fontColor";function Fp(t,e){const i={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const t of e)i.model.values.push(t.model),i.view[t.model]=t.view,t.upcastAlso&&(i.upcastAlso[t.model]=t.upcastAlso);return i}function Lp(t){return(e,{writer:i})=>i.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}class zp extends Ip{constructor(t){super(t,Dp)}}class Hp extends lr{static get pluginName(){return"FontColorEditing"}constructor(t){var e;super(t),t.config.define(Dp,{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:Dp,value:(e="color",t=>t.getStyle(e).replace(/\s/g,""))}}),t.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Dp,value:t=>t.getAttribute("color")}}),t.conversion.for("downcast").attributeToElement({model:Dp,view:Lp("color")}),t.commands.add(Dp,new zp(t)),t.model.schema.extend("$text",{allowAttributes:Dp}),t.model.schema.setAttributeProperties(Dp,{isFormatting:!0,copyOnEnter:!0})}}class jp extends lr{constructor(t,{commandName:e,icon:i,componentName:n,dropdownLabel:s}){super(t),this.commandName=e,this.componentName=n,this.icon=i,this.dropdownLabel=s,this.columns=t.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const t=this.editor,e=t.locale,i=e.t,n=t.commands.get(this.commandName);const s=function(t,e){const i=t.t,n={Black:i("Black"),"Dim grey":i("Dim grey"),Grey:i("Grey"),"Light grey":i("Light grey"),White:i("White"),Red:i("Red"),Orange:i("Orange"),Yellow:i("Yellow"),"Light green":i("Light green"),Green:i("Green"),Aquamarine:i("Aquamarine"),Turquoise:i("Turquoise"),"Light blue":i("Light blue"),Blue:i("Blue"),Purple:i("Purple")};return e.map((t=>{const e=n[t.label];return e&&e!=t.label&&(t.label=e),t}))}(e,t.config.get(this.componentName).colors.map(Ko).filter((t=>!!t))),o=t.config.get(`${this.componentName}.documentColors`);t.ui.componentFactory.add(this.componentName,(e=>{const r=Of(e);return this.colorTableView=function({dropdownView:t,colors:e,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o}){const r=t.locale,a=new Mp(r,{colors:e,columns:i,removeButtonLabel:n,documentColorsLabel:s,documentColorsCount:o});return t.colorTableView=a,t.panelView.children.add(a),a.delegate("execute").to(t,"execute"),a}({dropdownView:r,colors:s.map((t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}}))),columns:this.columns,removeButtonLabel:i("Remove color"),documentColorsLabel:0!==o?i("Document colors"):void 0,documentColorsCount:void 0===o?this.columns:o}),this.colorTableView.bind("selectedColor").to(n,"value"),r.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),r.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),r.bind("isEnabled").to(n),r.on("execute",((e,i)=>{t.execute(this.commandName,i),t.editing.view.focus()})),r.on("change:isOpen",((e,i,n)=>{r.colorTableView.appendGrids(),n&&(0!==o&&this.colorTableView.updateDocumentColors(t.model,this.componentName),this.colorTableView.updateSelectedColors())})),Bf(r,(()=>r.colorTableView.staticColorsGrid.items.find((t=>t.isOn)))),r}))}}class $p extends jp{constructor(t){const e=t.locale.t;super(t,{commandName:Dp,componentName:Dp,icon:'',dropdownLabel:e("Font Color")})}static get pluginName(){return"FontColorUI"}}class Wp extends Ip{constructor(t){super(t,Bp)}}function qp(t){return t.map(Up).filter((t=>!!t))}function Up(t){return"object"==typeof t?t:"default"===t?{title:"Default",model:void 0}:"string"==typeof t?function(t){const e=t.replace(/"|'/g,"").split(","),i=e[0],n=e.map(Kp).join(", ");return{title:i,model:n,view:{name:"span",styles:{"font-family":n},priority:7}}}(t):void 0}function Kp(t){return(t=t.trim()).indexOf(" ")>0&&(t=`'${t}'`),t}class Gp extends lr{static get pluginName(){return"FontFamilyEditing"}constructor(t){super(t),t.config.define(Bp,{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:Bp}),t.model.schema.setAttributeProperties(Bp,{isFormatting:!0,copyOnEnter:!0});const e=qp(t.config.get("fontFamily.options")).filter((t=>t.model)),i=Fp(Bp,e);t.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(i),t.commands.add(Bp,new Wp(t))}_prepareAnyValueConverters(){const t=this.editor;t.conversion.for("downcast").attributeToElement({model:Bp,view:(t,{writer:e})=>e.createAttributeElement("span",{style:"font-family:"+t},{priority:7})}),t.conversion.for("upcast").elementToAttribute({model:{key:Bp,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:Bp,value:t=>t.getAttribute("face")}})}}class Jp extends lr{static get pluginName(){return"FontFamilyUI"}init(){const t=this.editor,e=t.t,i=this._getLocalizedOptions(),n=t.commands.get(Bp);t.ui.componentFactory.add(Bp,(s=>{const o=Of(s);return Mf(o,(()=>function(t,e){const i=new co;for(const n of t){const t={type:"button",model:new sm({commandName:Bp,commandParam:n.model,label:n.title,withText:!0})};t.model.bind("isOn").to(e,"value",(t=>t===n.model||!(!t||!n.model)&&t.split(",")[0].replace(/'/g,"").toLowerCase()===n.model.toLowerCase())),n.view&&n.view.styles&&t.model.set("labelStyle",`font-family: ${n.view.styles["font-family"]}`),i.add(t)}return i}(i,n))),o.buttonView.set({label:e("Font Family"),icon:'',tooltip:!0}),o.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),o.bind("isEnabled").to(n),this.listenTo(o,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),o}))}_getLocalizedOptions(){const t=this.editor,e=t.t;return qp(t.config.get(Bp).options).map((t=>("Default"===t.title&&(t.title=e("Default")),t)))}}class Qp extends Ip{constructor(t){super(t,Np)}}function Yp(t){return t.map((t=>function(t){if(e=t,"object"==typeof e&&e.title&&e.model&&e.view)return Xp(t);var e;const i=function(t){return Zp[t]||Zp[t.model]}(t);if(i)return Xp(i);if("default"===t)return{model:void 0,title:"Default"};if(function(t){let e;if("object"==typeof t){if(!t.model)throw new v("font-size-invalid-definition",null,t);e=parseFloat(t.model)}else e=parseFloat(t);return isNaN(e)}(t))return;return function(t){"number"!=typeof t&&"string"!=typeof t||(t={title:String(t),model:`${parseFloat(t)}px`});return t.view={name:"span",styles:{"font-size":t.model}},Xp(t)}(t)}(t))).filter((t=>!!t))}const Zp={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 Xp(t){return t.view.priority||(t.view.priority=7),t}const tw=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class ew extends lr{static get pluginName(){return"FontSizeEditing"}constructor(t){super(t),t.config.define(Np,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Np}),t.model.schema.setAttributeProperties(Np,{isFormatting:!0,copyOnEnter:!0});const e=t.config.get("fontSize.supportAllValues"),i=Yp(this.editor.config.get("fontSize.options")).filter((t=>t.model)),n=Fp(Np,i);e?(this._prepareAnyValueConverters(n),this._prepareCompatibilityConverter()):t.conversion.attributeToElement(n),t.commands.add(Np,new Qp(t))}_prepareAnyValueConverters(t){const e=this.editor,i=t.model.values.filter((t=>{return!(e=String(t),hf.test(e)||function(t){return df.test(t)}(String(t)));var e}));if(i.length)throw new v("font-size-invalid-use-of-named-presets",null,{presets:i});e.conversion.for("downcast").attributeToElement({model:Np,view:(t,{writer:e})=>{if(t)return e.createAttributeElement("span",{style:"font-size:"+t},{priority:7})}}),e.conversion.for("upcast").elementToAttribute({model:{key:Np,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:Np,value:t=>{const e=t.getAttribute("size"),i="-"===e[0]||"+"===e[0];let n=parseInt(e,10);i&&(n=3+n);const s=tw.length-1,o=Math.min(Math.max(n,0),s);return tw[o]}}})}}class iw extends lr{static get pluginName(){return"FontSizeUI"}init(){const t=this.editor,e=t.t,i=this._getLocalizedOptions(),n=t.commands.get(Np);t.ui.componentFactory.add(Np,(s=>{const o=Of(s);return Mf(o,(()=>function(t,e){const i=new co;for(const n of t){const t={type:"button",model:new sm({commandName:Np,commandParam:n.model,label:n.title,class:"ck-fontsize-option",withText:!0})};n.view&&n.view.styles&&t.model.set("labelStyle",`font-size:${n.view.styles["font-size"]}`),n.view&&n.view.classes&&t.model.set("class",`${t.model.class} ${n.view.classes}`),t.model.bind("isOn").to(e,"value",(t=>t===n.model)),i.add(t)}return i}(i,n))),o.buttonView.set({label:e("Font Size"),icon:'',tooltip:!0}),o.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),o.bind("isEnabled").to(n),this.listenTo(o,"execute",(e=>{t.execute(e.source.commandName,{value:e.source.commandParam}),t.editing.view.focus()})),o}))}_getLocalizedOptions(){const t=this.editor,e=t.t,i={Default:e("Default"),Tiny:e("Tiny"),Small:e("Small"),Big:e("Big"),Huge:e("Huge")};return Yp(t.config.get(Np).options).map((t=>{const e=i[t.title];return e&&e!=t.title&&(t=Object.assign({},t,{title:e})),t}))}}class nw extends hr{refresh(){const t=this.editor.model,e=ho(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&sw(e,t.schema)}execute(t={}){const e=this.editor.model,i=e.document;e.change((n=>{const s=(t.selection||i.selection).getSelectedBlocks();for(const t of s)!t.is("element","paragraph")&&sw(t,e.schema)&&n.rename(t,"paragraph")}))}}function sw(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class ow extends hr{execute(t){const e=this.editor.model,i=t.attributes;let n=t.position;e.change((t=>{const s=t.createElement("paragraph");if(i&&e.schema.setAllowedAttributes(s,i,t),!e.schema.checkChild(n.parent,s)){const i=e.schema.findAllowedParent(n,s);if(!i)return;n=t.split(n,i).position}e.insertContent(s,n),t.setSelection(s,"in")}))}}class rw extends lr{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new nw(t)),t.commands.add("insertParagraph",new ow(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>rw.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}rw.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class aw extends hr{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=ho(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((e=>lw(t,e,this.editor.model.schema)))}execute(t){const e=this.editor.model,i=e.document,n=t.value;e.change((t=>{const s=Array.from(i.selection.getSelectedBlocks()).filter((t=>lw(t,n,e.schema)));for(const e of s)e.is("element",n)||t.rename(e,n)}))}}function lw(t,e,i){return i.checkChild(t.parent,e)&&!i.isObject(t)}const cw="paragraph";class hw extends lr{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[rw]}init(){const t=this.editor,e=t.config.get("heading.options"),i=[];for(const n of e)"paragraph"!==n.model&&(t.model.schema.register(n.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(n),i.push(n.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new aw(t,i))}afterInit(){const t=this.editor,e=t.commands.get("enter"),i=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",((e,n)=>{const s=t.model.document.selection.getFirstPosition().parent;i.some((t=>s.is("element",t.model)))&&!s.is("element",cw)&&0===s.childCount&&n.writer.rename(s,cw)}))}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:w.get("low")+1})}}class dw extends lr{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,e=t.t,i=function(t){const e=t.t,i={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=i[t.title];return e&&e!=t.title&&(t.title=e),t}))}(t),n=e("Choose heading"),s=e("Heading");t.ui.componentFactory.add("heading",(e=>{const o={},r=new co,a=t.commands.get("heading"),l=t.commands.get("paragraph"),c=[a];for(const t of i){const e={type:"button",model:new sm({label:t.title,class:t.class,withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(l,"value"),e.model.set("commandName","paragraph"),c.push(l)):(e.model.bind("isOn").to(a,"value",(e=>e===t.model)),e.model.set({commandName:"heading",commandValue:t.model})),r.add(e),o[t.model]=t.title}const h=Of(e);return Mf(h,r),h.buttonView.set({isOn:!1,withText:!0,tooltip:s}),h.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),h.bind("isEnabled").toMany(c,"isEnabled",((...t)=>t.some((t=>t)))),h.buttonView.bind("label").to(a,"value",l,"value",((t,e)=>{const i=t||e&&"paragraph";return"boolean"==typeof i?n:o[i]?o[i]:n})),this.listenTo(h,"execute",(e=>{const{commandName:i,commandValue:n}=e.source;t.execute(i,n?{value:n}:void 0),t.editing.view.focus()})),h}))}}class uw extends hr{refresh(){const t=this.editor.model,e=t.schema,i=t.document.selection;this.isEnabled=function(t,e,i){const n=function(t,e){const i=function(t,e){const i=t.getSelectedElement();if(i){const n=Jg(t);if(n)return e.createRange(e.createPositionAt(i,n))}return Zu(t,e)}(t,e),n=i.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,i);return e.checkChild(n,"horizontalLine")}(i,e,t)}execute(){const t=this.editor.model;t.change((e=>{const i=e.createElement("horizontalLine");t.insertObject(i,null,null,{setSelection:"after"})}))}}class fw extends lr{static get pluginName(){return"HorizontalLineEditing"}init(){const t=this.editor,e=t.model.schema,i=t.t,n=t.conversion;e.register("horizontalLine",{inheritAllFrom:"$blockObject"}),n.for("dataDowncast").elementToElement({model:"horizontalLine",view:(t,{writer:e})=>e.createEmptyElement("hr")}),n.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(t,{writer:e})=>{const n=i("Horizontal line"),s=e.createContainerElement("div",null,e.createEmptyElement("hr"));return e.addClass("ck-horizontal-line",s),e.setCustomProperty("hr",!0,s),function(t,e,i){return e.setCustomProperty("horizontalLine",!0,t),jg(t,e,{label:i})}(s,e,n)}}),n.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),t.commands.add("horizontalLine",new uw(t))}}class mw extends lr{static get pluginName(){return"HorizontalLineUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("horizontalLine",(i=>{const n=t.commands.get("horizontalLine"),s=new qo(i);return s.set({label:e("Horizontal line"),icon:'',tooltip:!0}),s.bind("isEnabled").to(n,"isEnabled"),this.listenTo(s,"execute",(()=>{t.execute("horizontalLine"),t.editing.view.focus()})),s}))}}class gw extends lr{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new ur(t)),t.commands.add("outdent",new ur(t))}}const pw='',ww='';class bw extends lr{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,i=t.t,n="ltr"==e.uiLanguageDirection?pw:ww,s="ltr"==e.uiLanguageDirection?ww:pw;this._defineButton("indent",i("Increase indent"),n),this._defineButton("outdent",i("Decrease indent"),s)}_defineButton(t,e,i){const n=this.editor;n.ui.componentFactory.add(t,(s=>{const o=n.commands.get(t),r=new qo(s);return r.set({label:e,icon:i,tooltip:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(r,"execute",(()=>{n.execute(t),n.editing.view.focus()})),r}))}}class _w extends hr{constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this.editor.model,e=ho(t.document.selection.getSelectedBlocks());e&&t.schema.checkAttribute(e,"blockIndent")?this.isEnabled=this._indentBehavior.checkEnabled(e.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const t=this.editor.model,e=function(t){const e=t.document.selection,i=t.schema;return Array.from(e.getSelectedBlocks()).filter((t=>i.checkAttribute(t,"blockIndent")))}(t);t.change((t=>{for(const i of e){const e=i.getAttribute("blockIndent"),n=this._indentBehavior.getNextIndent(e);n?t.setAttribute("blockIndent",n,i):t.removeAttribute("blockIndent",i)}}))}}class vw{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 i=e+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class yw{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),i=this.isForward?1:-1;return this.classes[e+i]}}const kw=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];const Aw="italic";class xw extends lr{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Aw}),t.model.schema.setAttributeProperties(Aw,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Aw,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(Aw,new Cg(t,Aw)),t.keystrokes.set("CTRL+I",Aw)}}const Cw="italic";class Pw extends lr{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Cw,(i=>{const n=t.commands.get(Cw),s=new qo(i);return s.set({label:e("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(s,"execute",(()=>{t.execute(Cw),t.editing.view.focus()})),s}))}}class Tw{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,i)=>{if(!i.consumable.test(e.item,"attribute:linkHref"))return;if(!e.item.is("selection")&&!i.schema.isInline(e.item))return;const n=i.writer,s=n.document.selection;for(const t of this._definitions){const o=n.createAttributeElement("a",t.attributes,{priority:5});t.classes&&n.addClass(t.classes,o);for(const e in t.styles)n.setStyle(e,t.styles[e],o);n.setCustomProperty("link",!0,o),t.callback(e.attributeNewValue)?e.item.is("selection")?n.wrap(s.getFirstRange(),o):n.wrap(i.mapper.toViewRange(e.range),o):n.unwrap(i.mapper.toViewRange(e.range),o)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",((t,e,{writer:i,mapper:n})=>{const s=n.toViewElement(e.item),o=Array.from(s.getChildren()).find((t=>"a"===t.name));for(const t of this._definitions){const n=mo(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of n)"class"===t?i.addClass(e,o):i.setAttribute(t,e,o);t.classes&&i.addClass(t.classes,o);for(const e in t.styles)i.setStyle(e,t.styles[e],o)}else{for(const[t,e]of n)"class"===t?i.removeClass(e,o):i.removeAttribute(t,o);t.classes&&i.removeClass(t.classes,o);for(const e in t.styles)i.removeStyle(e,o)}}}))}}}const Ew=function(t,e,i){var n=t.length;return i=void 0===i?n:i,!e&&i>=n?t:ta(t,e,i)};var Sw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const Rw=function(t){return Sw.test(t)};const Ow=function(t){return t.split("")};var Iw="\\ud800-\\udfff",Vw="["+Iw+"]",Mw="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Nw="\\ud83c[\\udffb-\\udfff]",Bw="[^"+Iw+"]",Dw="(?:\\ud83c[\\udde6-\\uddff]){2}",Fw="[\\ud800-\\udbff][\\udc00-\\udfff]",Lw="(?:"+Mw+"|"+Nw+")"+"?",zw="[\\ufe0e\\ufe0f]?",Hw=zw+Lw+("(?:\\u200d(?:"+[Bw,Dw,Fw].join("|")+")"+zw+Lw+")*"),jw="(?:"+[Bw+Mw+"?",Mw,Dw,Fw,Vw].join("|")+")",$w=RegExp(Nw+"(?="+Nw+")|"+jw+Hw,"g");const Ww=function(t){return t.match($w)||[]};const qw=function(t){return Rw(t)?Ww(t):Ow(t)};const Uw=function(t){return function(e){e=Gr(e);var i=Rw(e)?qw(e):void 0,n=i?i[0]:e.charAt(0),s=i?Ew(i,1).join(""):e.slice(1);return n[t]()+s}}("toUpperCase"),Kw=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Gw=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Jw=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Qw=/^((\w+:(\/{2,})?)|(\W))/i,Yw="Ctrl+K";function Zw(t,{writer:e}){const i=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,i),i}function Xw(t){return function(t){const e=t.replace(Kw,"");return e.match(Gw)}(t=String(t))?t:"#"}function tb(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function eb(t,e){const i=(n=t,Jw.test(n)?"mailto:":e);var n;const s=!!i&&!ib(t);return t&&s?i+t:t}function ib(t){return Qw.test(t)}function nb(t){window.open(t,"_blank","noopener")}class sb extends hr{constructor(t){super(t),this.manualDecorators=new co,this.automaticDecorators=new Tw}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,i=e.getSelectedElement()||ho(e.getSelectedBlocks());tb(i,t.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(i,"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 i=this.editor.model,n=i.document.selection,s=[],o=[];for(const t in e)e[t]?s.push(t):o.push(t);i.change((e=>{if(n.isCollapsed){const r=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=ng(r,"linkHref",n.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,a),s.forEach((t=>{e.setAttribute(t,!0,a)})),o.forEach((t=>{e.removeAttribute(t,a)})),e.setSelection(e.createPositionAfter(a.end.nodeBefore))}else if(""!==t){const o=mo(n.getAttributes());o.set("linkHref",t),s.forEach((t=>{o.set(t,!0)}));const{end:a}=i.insertContent(e.createText(t,o),r);e.setSelection(a)}["linkHref",...s,...o].forEach((t=>{e.removeSelectionAttribute(t)}))}else{const r=i.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const t of n.getSelectedBlocks())i.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const l=a.slice();for(const t of r)this._isRangeToUpdate(t,a)&&l.push(t);for(const i of l)e.setAttribute("linkHref",t,i),s.forEach((t=>{e.setAttribute(t,!0,i)})),o.forEach((t=>{e.removeAttribute(t,i)}))}}))}_getDecoratorStateFromModel(t){const e=this.editor.model,i=e.document.selection,n=i.getSelectedElement();return tb(n,e.schema)?n.getAttribute(t):i.getAttribute(t)}_isRangeToUpdate(t,e){for(const i of e)if(i.containsRange(t))return!1;return!0}}class ob extends hr{refresh(){const t=this.editor.model,e=t.document.selection,i=e.getSelectedElement();tb(i,t.schema)?this.isEnabled=t.schema.checkAttribute(i,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,i=e.document.selection,n=t.commands.get("link");e.change((t=>{const s=i.isCollapsed?[ng(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),e)]:e.schema.getValidRanges(i.getRanges(),"linkHref");for(const e of s)if(t.removeAttribute("linkHref",e),n)for(const i of n.manualDecorators)t.removeAttribute(i.id,e)}))}}class rb{constructor({id:t,label:e,attributes:i,classes:n,styles:s,defaultValue:o}){this.id=t,this.set("value"),this.defaultValue=o,this.label=e,this.attributes=i,this.classes=n,this.styles=s}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}u(rb,q);const ab="automatic",lb=/^(https?:)?\/\//;class cb extends lr{static get pluginName(){return"LinkEditing"}static get requires(){return[jm,Sm,Vg]}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Zw}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>Zw(Xw(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new sb(t)),t.commands.add("unlink",new ob(t));const e=function(t,e){const i={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach((t=>(t.label&&i[t.label]&&(t.label=i[t.label]),t))),e}(t.t,function(t){const e=[];if(t)for(const[i,n]of Object.entries(t)){const t=Object.assign({},n,{id:`link${Uw(i)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(e.filter((t=>t.mode===ab))),this._enableManualDecorators(e.filter((t=>"manual"===t.mode)));t.plugins.get(jm).registerAttribute("linkHref"),function(t,e,i,n){const s=t.editing.view,o=new Set;s.document.registerPostFixer((s=>{const r=t.model.document.selection;let a=!1;if(r.hasAttribute(e)){const l=ng(r.getFirstPosition(),e,r.getAttribute(e),t.model),c=t.editing.mapper.toViewRange(l);for(const t of c.getItems())t.is("element",i)&&!t.hasClass(n)&&(s.addClass(n,t),o.add(t),a=!0)}return a})),t.conversion.for("editingDowncast").add((t=>{function e(){s.change((t=>{for(const e of o.values())t.removeClass(n,e),o.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._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink(),this._enableClipboardIntegration()}_enableAutomaticDecorators(t){const e=this.editor,i=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:ab,callback:t=>lb.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(t),i.length&&e.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,i=e.commands.get("link").manualDecorators;t.forEach((t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),t=new rb(t),i.add(t),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,{writer:i,schema:n},{item:s})=>{if((s.is("selection")||n.isInline(s))&&e){const e=i.createAttributeElement("a",t.attributes,{priority:5});t.classes&&i.addClass(t.classes,e);for(const n in t.styles)i.setStyle(n,t.styles[n],e);return i.setCustomProperty("link",!0,e),e}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",...t._createPattern()},model:{key:t.id}})}))}_enableLinkOpen(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",((t,e)=>{if(!(r.isMac?e.domEvent.metaKey:e.domEvent.ctrlKey))return;let i=e.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const n=i.getAttribute("href");n&&(t.stop(),e.preventDefault(),nb(n))}),{context:"$capture"}),this.listenTo(e,"keydown",((e,i)=>{const n=t.commands.get("link").value;n&&i.keyCode===Zs.enter&&i.altKey&&(e.stop(),nb(n))}))}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(t,"insertContent",(()=>{const i=e.anchor.nodeBefore,n=e.anchor.nodeAfter;e.hasAttribute("linkHref")&&i&&i.hasAttribute("linkHref")&&(n&&n.hasAttribute("linkHref")||t.change((e=>{hb(e,ub(t.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const t=this.editor,e=t.model;t.editing.view.addObserver(lf);let i=!1;this.listenTo(t.editing.view.document,"mousedown",(()=>{i=!0})),this.listenTo(t.editing.view.document,"selectionChange",(()=>{if(!i)return;i=!1;const t=e.document.selection;if(!t.isCollapsed)return;if(!t.hasAttribute("linkHref"))return;const n=t.getFirstPosition(),s=ng(n,"linkHref",t.getAttribute("linkHref"),e);(n.isTouching(s.start)||n.isTouching(s.end))&&e.change((t=>{hb(t,ub(e.schema))}))}))}_enableTypingOverLink(){const t=this.editor,e=t.editing.view;let i,n;this.listenTo(e.document,"delete",(()=>{n=!0}),{priority:"high"}),this.listenTo(t.model,"deleteContent",(()=>{const e=t.model.document.selection;e.isCollapsed||(n?n=!1:db(t)&&function(t){const e=t.document.selection,i=e.getFirstPosition(),n=e.getLastPosition(),s=i.nodeAfter;if(!s)return!1;if(!s.is("$text"))return!1;if(!s.hasAttribute("linkHref"))return!1;const o=n.textNode||n.nodeBefore;if(s===o)return!0;return ng(i,"linkHref",s.getAttribute("linkHref"),t).containsRange(t.createRange(i,n),!0)}(t.model)&&(i=e.getAttributes()))}),{priority:"high"}),this.listenTo(t.model,"insertContent",((e,[s])=>{n=!1,db(t)&&i&&(t.model.change((t=>{for(const[e,n]of i)t.setAttribute(e,n,s)})),i=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const t=this.editor,e=t.model,i=e.document.selection,n=t.editing.view;let s=!1,o=!1;this.listenTo(n.document,"delete",((t,e)=>{o="backward"===e.direction}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{s=!1;const t=i.getFirstPosition(),n=i.getAttribute("linkHref");if(!n)return;const o=ng(t,"linkHref",n,e);s=o.containsPosition(t)||o.end.isEqual(t)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{o&&(o=!1,s||t.model.enqueueChange((t=>{hb(t,ub(e.schema))})))}),{priority:"low"})}_enableClipboardIntegration(){const t=this.editor,e=t.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(t.plugins.get("ClipboardPipeline"),"contentInsertion",((t,n)=>{e.change((t=>{const e=t.createRangeIn(n.content);for(const n of e.getItems())if(n.hasAttribute("linkHref")){const e=eb(n.getAttribute("linkHref"),i);t.setAttribute("linkHref",e,n)}}))}))}}function hb(t,e){t.removeSelectionAttribute("linkHref");for(const i of e)t.removeSelectionAttribute(i)}function db(t){return t.model.change((t=>t.batch)).isTyping}function ub(t){return t.getDefinition("$text").allowAttributes.filter((t=>t.startsWith("link")))}class fb extends yo{constructor(t,e){super(t);const i=t.t;this.focusTracker=new uo,this.keystrokes=new fo,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),yf.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),yf.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusables=new vo,this._focusCycler=new nr({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];e.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children}),function(t){const e=t;e.set("_isCssTransitionsDisabled",!1),e.disableCssTransitions=()=>{e._isCssTransitionsDisabled=!0},e.enableCssTransitions=()=>{e._isCssTransitionsDisabled=!1},e.extendTemplate({attributes:{class:[e.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((t,e)=>(t[e.name]=e.isOn,t)),{})}render(){super.render(),function({view:t}){t.listenTo(t.element,"submit",((e,i)=>{i.preventDefault(),t.fire("submit")}),{useCapture:!0})}({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 em(this.locale,im);return e.label=t("Link URL"),e}_createButton(t,e,i,n){const s=new qo(this.locale);return s.set({label:t,icon:e,tooltip:!0}),s.extendTemplate({attributes:{class:i}}),n&&s.delegate("execute").to(this,n),s}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const i of t.manualDecorators){const n=new Uo(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,t],"value",((t,e)=>void 0===e&&void 0===t?i.defaultValue:t)),n.on("execute",(()=>{i.set("value",!n.isOn)})),e.add(n)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new yo;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}}class mb extends yo{constructor(t){super(t);const e=t.t;this.focusTracker=new uo,this.keystrokes=new fo,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("Unlink"),'',"unlink"),this.editButtonView=this._createButton(e("Edit link"),yf.pencil,"edit"),this.set("href"),this._focusables=new vo,this._focusCycler=new nr({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,i){const n=new qo(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const t=new qo(this.locale),e=this.bindTemplate,i=this.t;return t.set({withText:!0,tooltip:i("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",(t=>t&&Xw(t))),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",(t=>t||i("This link has no URL"))),t.bind("isEnabled").to(this,"href",(t=>!!t)),t.template.tag="a",t.template.eventListeners={},t}}const gb="link-ui";class pb extends lr{static get requires(){return[rm]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(af),this.actionsView=null,this.formView=null,this._balloon=t.plugins.get(rm),this._createToolbarLinkButton(),this._enableBalloonActivators(),t.conversion.for("editingDowncast").markerToHighlight({model:gb,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:gb,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const t=this.editor,e=new mb(t.locale),i=t.commands.get("link"),n=t.commands.get("unlink");return e.bind("href").to(i,"value"),e.editButtonView.bind("isEnabled").to(i),e.unlinkButtonView.bind("isEnabled").to(n),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(Yw,((t,e)=>{this._addFormView(),e()})),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),i=t.config.get("link.defaultProtocol"),n=new fb(t.locale,e);return n.urlInputView.fieldView.bind("value").to(e,"value"),n.urlInputView.bind("isReadOnly").to(e,"isEnabled",(t=>!t)),n.saveButtonView.bind("isEnabled").to(e),this.listenTo(n,"submit",(()=>{const{value:e}=n.urlInputView.fieldView.element,s=eb(e,i);t.execute("link",s,n.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(n,"cancel",(()=>{this._closeFormView()})),n.keystrokes.set("Esc",((t,e)=>{this._closeFormView(),e()})),n}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),i=t.t;t.ui.componentFactory.add("link",(t=>{const n=new qo(t);return n.isEnabled=!0,n.label=i("Link"),n.icon='',n.keystroke=Yw,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(e,"isEnabled"),n.bind("isOn").to(e,"value",(t=>!!t)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableBalloonActivators(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),t.keystrokes.set(Yw,((e,i)=>{i(),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())})),i({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._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=t.value||""}_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._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 i=this._getSelectedLinkElement(),n=o();const s=()=>{const t=this._getSelectedLinkElement(),e=o();i&&!t||!i&&e!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=t,n=e};function o(){return e.selection.focus.getAncestors().reverse().find((t=>t.is("element")))}this.listenTo(t.ui,"update",s),this.listenTo(this._balloon,"change:visibleView",s)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=this.editor.model,i=t.document;let n=null;if(e.markers.has(gb)){const e=Array.from(this.editor.editing.mapper.markerNameToElements(gb)),i=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));n=t.domConverter.viewRangeToDom(i)}else n=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,i=e.getSelectedElement();if(e.isCollapsed||i&&Hg(i))return wb(e.getFirstPosition());{const i=e.getFirstRange().getTrimmed(),n=wb(i.start),s=wb(i.end);return n&&n==s&&t.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change((e=>{const i=t.document.selection.getFirstRange();if(t.markers.has(gb))e.updateMarker(gb,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition((({item:e})=>!t.schema.isContent(e)),{boundaries:i});e.addMarker(gb,{usingOperation:!1,affectsData:!1,range:e.createRange(n,i.end)})}else e.addMarker(gb,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(gb)&&t.change((t=>{t.removeMarker(gb)}))}}function wb(t){return t.getAncestors().find((t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e}))}const bb=4,_b=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"),vb=2;class yb extends lr{static get requires(){return[Fm]}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()}_enableTypingHandling(){const t=this.editor,e=new Hm(t.model,(t=>{if(!function(t){return t.length>bb&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=kb(t.substr(0,t.length-1));return e?{url:e}:void 0}));e.on("matched:data",((e,i)=>{const{batch:n,range:s,url:o}=i;if(!n.isTyping)return;const r=s.end.getShiftedBy(-1),a=r.getShiftedBy(-o.length),l=t.model.createRange(a,r);this._applyAutoLink(o,l)})),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,i=t.commands.get("enter");i&&i.on("execute",(()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const i=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(i)}))}_enableShiftEnterHandling(){const t=this.editor,e=t.model,i=t.commands.get("shiftEnter");i&&i.on("execute",(()=>{const t=e.document.selection.getFirstPosition(),i=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)}))}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:i,range:n}=zm(t,e),s=kb(i);if(s){const t=e.createRange(n.end.getShiftedBy(-s.length),n.end);this._applyAutoLink(s,t)}}_applyAutoLink(t,e){const i=this.editor.model,n=eb(t,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,i)&&ib(n)&&!function(t){const e=t.start.nodeAfter;return e&&e.hasAttribute("linkHref")}(e)&&this._persistAutoLink(n,e)}_persistAutoLink(t,e){const i=this.editor.model,n=this.editor.plugins.get("Delete");i.enqueueChange((s=>{s.setAttribute("linkHref",t,e),i.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function kb(t){const e=_b.exec(t);return e?e[vb]:null}class Ab extends hr{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=Array.from(i.selection.getSelectedBlocks()).filter((t=>Cb(t,e.schema))),s=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(s){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,s=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t=i;)o>s.getAttribute("listIndent")&&(o=s.getAttribute("listIndent")),s.getAttribute("listIndent")==o&&t[e?"unshift":"push"](s),s=s[e?"previousSibling":"nextSibling"]}}function Cb(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class Pb extends hr{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change((t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>e.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;i<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",i,e)}this.fire("_executeCleanup",i)}))}_checkEnabled(){const t=ho(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),i=t.getAttribute("listType");let n=t.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=e;){if(n.getAttribute("listIndent")==e)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function Tb(t,e){const i=e.mapper,n=e.writer,s="numbered"==t.getAttribute("listType")?"ol":"ul",o=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=Fb,e}(n),r=n.createContainerElement(s,null);return n.insert(n.createPositionAt(r,0),o),i.bindElements(t,o),o}function Eb(t,e,i,n){const s=e.parent,o=i.mapper,r=i.writer;let a=o.toViewPosition(n.createPositionBefore(t));const l=Ob(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(l&&l.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=o.toViewElement(l);a=r.breakContainer(r.createPositionAfter(t))}else if(c&&"listItem"==c.name){a=o.toViewPosition(n.createPositionAt(c,"end"));const t=o.findMappedViewAncestor(a),e=function(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}(t);a=e?r.createPositionBefore(e):r.createPositionAt(t,"end")}else a=o.toViewPosition(n.createPositionBefore(t));if(a=Rb(a),r.insert(a,s),c&&"listItem"==c.name){const t=o.toViewElement(c),i=r.createRange(r.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is("element","li")){const n=r.breakContainer(r.createPositionBefore(t.item)),s=t.item.parent,o=r.createPositionAt(e,"end");Sb(r,o.nodeBefore,o.nodeAfter),r.move(r.createRangeOn(s),o),i.position=n}}else{const i=s.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const e of i.getChildren()){const i=o.toModelElement(e);if(!(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")))break;n=e}n&&(r.breakContainer(r.createPositionAfter(n)),r.move(r.createRangeOn(n.parent),r.createPositionAt(e,"end")))}}Sb(r,s,s.nextSibling),Sb(r,s.previousSibling,s)}function Sb(t,e,i){return!e||!i||"ul"!=e.name&&"ol"!=e.name||e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function Rb(t){return t.getLastMatchingPosition((t=>t.item.is("uiElement")))}function Ob(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,s=e.listIndent;let o=t;for(;o&&"listItem"==o.name;){const t=o.getAttribute("listIndent");if(i&&s==t||n&&s>t)return o;o="forward"===e.direction?o.nextSibling:o.previousSibling}return null}function Ib(t,e,i,n){t.ui.componentFactory.add(e,(s=>{const o=t.commands.get(e),r=new qo(s);return r.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),r.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),r}))}function Vb(t,e){const i=[],n=t.parent,s={ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e},o=n.getAttribute("listIndent"),r=[...new mh(s)].filter((t=>t.item.is("element"))).map((t=>t.item));for(const t of r){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")o)){if(t.getAttribute("listType")!==n.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===e?i.unshift(t):i.push(t)}}return i}function Mb(t){let e=[...t.document.selection.getSelectedBlocks()].filter((t=>t.is("element","listItem"))).map((e=>{const i=t.change((t=>t.createPositionAt(e,0)));return[...Vb(i,"backward"),...Vb(i,"forward")]})).flat();return e=[...new Set(e)],e}const Nb=["disc","circle","square"],Bb=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function Db(t){return Nb.includes(t)?"bulleted":Bb.includes(t)?"numbered":null}function Fb(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:Ba.call(this)}class Lb extends lr{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(t){return Db(t)}getSelectedListItems(t){return Mb(t)}getSiblingNodes(t,e){return Vb(t,e)}}function zb(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;s.consume(i.item,"insert"),s.consume(i.item,"attribute:listType"),s.consume(i.item,"attribute:listIndent");const o=i.item;Eb(o,Tb(o,n),n,t)}}const Hb=(t,e,i)=>{if(!i.consumable.test(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer;s.breakContainer(s.createPositionBefore(n)),s.breakContainer(s.createPositionAfter(n));const o=n.parent,r="numbered"==e.attributeNewValue?"ol":"ul";s.rename(r,o)},jb=(t,e,i)=>{i.consumable.consume(e.item,t.name);const n=i.mapper.toViewElement(e.item).parent,s=i.writer;Sb(s,n,n.nextSibling),Sb(s,n.previousSibling,n)};const $b=(t,e,i)=>{if(i.consumable.test(e.item,t.name)&&"listItem"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,s=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=n.breakContainer(t),"li"==t.parent.name);){const e=t,i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));s.push(t)}t=n.createPositionAfter(t.parent)}if(s.length>0){for(let e=0;e0){const e=Sb(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}Sb(n,t.nodeBefore,t.nodeAfter)}}},Wb=(t,e,i)=>{const n=i.mapper.toViewPosition(e.position),s=n.nodeBefore,o=n.nodeAfter;Sb(i.writer,s,o)},qb=(t,e,i)=>{if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement("listItem"),s=function(t){let e=0,i=t.parent;for(;i;){if(i.is("element","li"))e++;else{const t=i.previousSibling;t&&t.is("element","li")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute("listIndent",s,n);const o=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",o,n),!i.safeInsert(n,e.modelCursor))return;const r=function(t,e,i){const{writer:n,schema:s}=i;let o=n.createPositionAfter(t);for(const r of e)if("ul"==r.name||"ol"==r.name)o=i.convertItem(r,o).modelCursor;else{const e=i.convertItem(r,n.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter;a&&a.is("element")&&!s.checkChild(t,a.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:Qb(e.modelCursor),o=n.createPositionAfter(t))}return o}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,r),i.updateConversionResult(n,e)}},Ub=(t,e,i)=>{if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||Zb(e))&&e._remove()}}},Kb=(t,e,i)=>{if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1;for(const e of t)i&&!Zb(e)&&e._remove(),Zb(e)&&(i=!0)}};function Gb(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const e=i.mapper.toViewElement(n),s=e.getAncestors().find(Zb),o=t.createPositionAt(e,0).getWalker();for(const t of o){if("elementStart"==t.type&&t.item.is("element","li")){i.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==s){i.viewPosition=t.nextPosition;break}}}}}const Jb=function(t,[e,i,n]){const s=this;let o,r=e.is("documentFragment")?e.getChild(0):e;if(o=i?s.createSelection(i,n):s.document.selection,r&&r.is("element","listItem")){const t=o.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;r&&r.is("element","listItem");)r._setAttribute("listIndent",r.getAttribute("listIndent")+t),r=r.nextSibling}}};function Qb(t){const e=new mh({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function Yb(t,e,i,n,s,o){const r=Ob(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t}),a=s.mapper,l=s.writer,c=r?r.getAttribute("listIndent"):null;let h;if(r)if(c==t){const t=a.toViewElement(r).parent;h=l.createPositionAfter(t)}else{const t=o.createPositionAt(r,"end");h=a.toViewPosition(t)}else h=i;h=Rb(h);for(const t of[...n.getChildren()])Zb(t)&&(h=l.move(l.createRangeOn(t),h).end,Sb(l,t,t.nextSibling),Sb(l,t.previousSibling,t))}function Zb(t){return t.is("element","ol")||t.is("element","ul")}class Xb extends lr{static get pluginName(){return"ListEditing"}static get requires(){return[mg,Fm,Lb]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,i=t.editing;var n;t.model.document.registerPostFixer((e=>function(t,e){const i=t.document.differ.getChanges(),n=new Map;let s=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)o(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",i),s=!0),i.hasAttribute("listType")&&(e.removeAttribute("listType",i),s=!0),i.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",i),s=!0),i.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",i),s=!0),i.hasAttribute("listStart")&&(e.removeAttribute("listStart",i),s=!0);for(const e of Array.from(t.createRangeIn(i)).filter((t=>t.item.is("element","listItem"))))o(e.previousPosition)}o(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?o(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&o(n.range.start);for(const t of n.values())r(t),a(t);return s;function o(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(n.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,n.has(t))return;n.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&n.set(e,e)}}function r(t){let i=0,n=null;for(;t&&t.is("element","listItem");){const o=t.getAttribute("listIndent");if(o>i){let r;null===n?(n=o-i,r=i):(n>o&&(n=o),r=o-n),e.setAttribute("listIndent",r,t),s=!0}else n=null,i=t.getAttribute("listIndent")+1;t=t.nextSibling}}function a(t){let i=[],n=null;for(;t&&t.is("element","listItem");){const o=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>o&&(i=i.slice(0,o+1)),0!=o)if(i[o]){const n=i[o];t.getAttribute("listType")!=n&&(e.setAttribute("listType",n,t),s=!0)}else i[o]=t.getAttribute("listType");n=t,t=t.nextSibling}}}(t.model,e))),i.mapper.registerViewToModelLength("li",t_),e.mapper.registerViewToModelLength("li",t_),i.mapper.on("modelToViewPosition",Gb(i.view)),i.mapper.on("viewToModelPosition",(n=t.model,(t,e)=>{const i=e.viewPosition,s=i.parent,o=e.mapper;if("ul"==s.name||"ol"==s.name){if(i.isAtEnd){const t=o.toModelElement(i.nodeBefore),s=o.getModelLength(i.nodeBefore);e.modelPosition=n.createPositionBefore(t).getShiftedBy(s)}else{const t=o.toModelElement(i.nodeAfter);e.modelPosition=n.createPositionBefore(t)}t.stop()}else if("li"==s.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const r=o.toModelElement(s);let a=1,l=i.nodeBefore;for(;l&&Zb(l);)a+=o.getModelLength(l),l=l.previousSibling;e.modelPosition=n.createPositionBefore(r).getShiftedBy(a),t.stop()}})),e.mapper.on("modelToViewPosition",Gb(i.view)),t.conversion.for("editingDowncast").add((e=>{e.on("insert",$b,{priority:"high"}),e.on("insert:listItem",zb(t.model)),e.on("attribute:listType:listItem",Hb,{priority:"high"}),e.on("attribute:listType:listItem",jb,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const s=n.mapper.toViewElement(i.item),o=n.writer;o.breakContainer(o.createPositionBefore(s)),o.breakContainer(o.createPositionAfter(s));const r=s.parent,a=r.previousSibling,l=o.createRangeOn(r);o.remove(l),a&&a.nextSibling&&Sb(o,a,a.nextSibling),Yb(i.attributeOldValue+1,i.range.start,l.start,s,n,t),Eb(i.item,s,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,i,n)=>{const s=n.mapper.toViewPosition(i.position).getLastMatchingPosition((t=>!t.item.is("element","li"))).nodeAfter,o=n.writer;o.breakContainer(o.createPositionBefore(s)),o.breakContainer(o.createPositionAfter(s));const r=s.parent,a=r.previousSibling,l=o.createRangeOn(r),c=o.remove(l);a&&a.nextSibling&&Sb(o,a,a.nextSibling),Yb(n.mapper.toModelElement(s).getAttribute("listIndent")+1,i.position,l.start,s,n,t);for(const t of o.createRangeIn(c).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",Wb,{priority:"low"})})),t.conversion.for("dataDowncast").add((e=>{e.on("insert",$b,{priority:"high"}),e.on("insert:listItem",zb(t.model))})),t.conversion.for("upcast").add((t=>{t.on("element:ul",Ub,{priority:"high"}),t.on("element:ol",Ub,{priority:"high"}),t.on("element:li",Kb,{priority:"high"}),t.on("element:li",qb)})),t.model.on("insertContent",Jb,{priority:"high"}),t.commands.add("numberedList",new Ab(t,"numbered")),t.commands.add("bulletedList",new Ab(t,"bulleted")),t.commands.add("indentList",new Pb(t,"forward")),t.commands.add("outdentList",new Pb(t,"backward"));const s=i.view.document;this.listenTo(s,"enter",((t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(s,"delete",((t,e)=>{if("backward"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const s=n.parent;if("listItem"!==s.name)return;s.previousSibling&&"listItem"===s.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(t.editing.view.document,"tab",((e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())}),{context:"li"})}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),i&&i.registerChildCommand(t.get("outdentList"))}}function t_(t){let e=1;for(const i of t.getChildren())if("ul"==i.name||"ol"==i.name)for(const t of i.getChildren())e+=t_(t);return e}const e_='',i_='';class n_ extends lr{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;Ib(this.editor,"numberedList",t("Numbered List"),e_),Ib(this.editor,"bulletedList",t("Bulleted List"),i_)}}class s_ extends hr{constructor(t,e){super(t),this.defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){this._tryToConvertItemsToList(t);const e=this.editor.model,i=Mb(e);i.length&&e.change((e=>{for(const n of i)e.setAttribute("listStyle",t.type||this.defaultType,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=Db(t.type);if(!e)return;const i=this.editor,n=`${e}List`;i.commands.get(n).value||i.execute(n)}}class o_ extends hr{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=Mb(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const n of i)e.setAttribute("listReversed",!!t.reversed,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}class r_ extends hr{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute({startIndex:t=1}={}){const e=this.editor.model,i=Mb(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const n of i)e.setAttribute("listStart",t>=0?t:1,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const a_="default";class l_ extends lr{static get requires(){return[Xb]}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,i=function(t){const e=[];t.styles&&e.push({attributeName:"listStyle",defaultValue:a_,addCommand(t){t.commands.add("listStyle",new s_(t,a_))},appliesToListItem:()=>!0,setAttributeOnDowncast(t,e,i){e&&e!==a_?t.setStyle("list-style-type",e,i):t.removeStyle("list-style-type",i)},getAttributeOnUpcast:t=>t.getStyle("list-style-type")||a_});t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,addCommand(t){t.commands.add("listReversed",new o_(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,addCommand(t){t.commands.add("listStart",new r_(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){0==e||e>1?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast(t){const e=t.getAttribute("start");return e>=0?e:1}});return e}(t.config.get("list.properties"));e.schema.extend("listItem",{allowAttributes:i.map((t=>t.attributeName))});for(const e of i)e.addCommand(t);var n;this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t,e){return(i,n)=>{const s=n[0],o=s.getAttribute("listIndent"),r=n.filter((t=>t.getAttribute("listIndent")===o));let a=null;s.previousSibling.getAttribute("listIndent")+1!==o&&(a=Ob(s.previousSibling,{sameIndent:!0,direction:"backward",listIndent:o})),t.model.change((t=>{for(const i of r)for(const n of e)if(n.appliesToListItem(i)){const e=null==a?n.defaultValue:a.getAttribute(n.attributeName);t.setAttribute(n.attributeName,e,i)}}))}}(t,i)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t,e){return(i,n)=>{if(!(n=n.reverse().filter((t=>t.is("element","listItem")))).length)return;const s=n[0].getAttribute("listIndent"),o=n[0].getAttribute("listType");let r=n[0].previousSibling;if(r.is("element","listItem"))for(;r.getAttribute("listIndent")!==s;)r=r.previousSibling;else r=null;r||(r=n[n.length-1].nextSibling),r&&r.is("element","listItem")&&r.getAttribute("listType")===o&&t.model.change((t=>{const i=n.filter((t=>t.getAttribute("listIndent")===s));for(const n of i)for(const i of e)if(i.appliesToListItem(n)){const e=i.attributeName,s=r.getAttribute(e);t.setAttribute(e,s,n)}}))}}(t,i)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",d_(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",d_(t)),e.document.registerPostFixer(function(t,e){return i=>{let n=!1;const s=u_(t.model.document.differ.getChanges()).filter((t=>"todo"!==t.getAttribute("listType")));if(!s.length)return n;let o=s[s.length-1].nextSibling;if((!o||!o.is("element","listItem"))&&(o=s[0].previousSibling,o)){const t=s[0].getAttribute("listIndent");for(;o.is("element","listItem")&&o.getAttribute("listIndent")!==t&&(o=o.previousSibling,o););}for(const t of e){const e=t.attributeName;for(const r of s)if(t.appliesToListItem(r))if(r.hasAttribute(e)){const s=r.previousSibling;h_(s,r,t.attributeName)&&(i.setAttribute(e,s.getAttribute(e),r),n=!0)}else c_(o,r,t)?i.setAttribute(e,o.getAttribute(e),r):i.setAttribute(e,t.defaultValue,r),n=!0;else i.removeAttribute(e,r)}return n}}(t,i)),t.conversion.for("upcast").add((n=i,t=>{t.on("element:li",((t,e,i)=>{const s=e.viewItem.parent,o=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;for(const t of n)if(t.appliesToListItem(o)){const e=t.getAttributeOnUpcast(s);i.writer.setAttribute(t.attributeName,e,o)}}),{priority:"low"})})),t.conversion.for("downcast").add(function(t){return i=>{for(const n of t)i.on(`attribute:${n.attributeName}:listItem`,((t,i,s)=>{const o=s.writer,r=i.item,a=Ob(r.previousSibling,{sameIndent:!0,listIndent:r.getAttribute("listIndent"),direction:"backward"}),l=s.mapper.toViewElement(r);e(r,a)||o.breakContainer(o.createPositionBefore(l)),n.setAttributeOnDowncast(o,i.attributeNewValue,l.parent)}),{priority:"low"})};function e(t,e){return e&&t.getAttribute("listType")===e.getAttribute("listType")&&t.getAttribute("listIndent")===e.getAttribute("listIndent")&&t.getAttribute("listStyle")===e.getAttribute("listStyle")&&t.getAttribute("listReversed")===e.getAttribute("listReversed")&&t.getAttribute("listStart")===e.getAttribute("listStart")}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const i=u_(t.model.document.differ.getChanges()).filter((t=>"todo"===t.getAttribute("listType")&&(t.hasAttribute("listStyle")||t.hasAttribute("listReversed")||t.hasAttribute("listStart"))));if(!i.length)return!1;for(const t of i)e.removeAttribute("listStyle",t),e.removeAttribute("listReversed",t),e.removeAttribute("listStart",t);return!0}}(t))}_mergeListAttributesWhileMergingLists(t){const e=this.editor.model;let i;this.listenTo(e,"deleteContent",((t,[e])=>{const n=e.getFirstPosition(),s=e.getLastPosition();if(n.parent===s.parent)return;if(!n.parent.is("element","listItem"))return;const o=s.parent.nextSibling;if(!o||!o.is("element","listItem"))return;const r=Ob(n.parent,{sameIndent:!0,listIndent:o.getAttribute("listIndent")});r&&r.getAttribute("listType")===o.getAttribute("listType")&&(i=r)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i&&(e.change((e=>{const n=Ob(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!n)return void(i=null);const s=[n,...Vb(e.createPositionAt(n,0),"forward")];for(const n of s)for(const s of t)if(s.appliesToListItem(n)){const t=s.attributeName,o=i.getAttribute(t);e.setAttribute(t,o,n)}})),i=null)}),{priority:"low"})}}function c_(t,e,i){if(!t)return!1;const n=t.getAttribute(i.attributeName);return!!n&&(n!=i.defaultValue&&t.getAttribute("listType")===e.getAttribute("listType"))}function h_(t,e,i){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const n=t.getAttribute("listIndent");if(n<1||n!==e.getAttribute("listIndent"))return!1;const s=t.getAttribute(i);return!(!s||s===e.getAttribute(i))}function d_(t){return(e,i)=>{i=i.filter((t=>t.is("element","listItem"))),t.model.change((t=>{for(const e of i)t.removeAttribute("listStyle",e)}))}}function u_(t){const e=[];for(const i of t){const t=f_(i);t&&t.is("element","listItem")&&e.push(t)}return e}function f_(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}class m_ extends yo{constructor(t,e){super(t);const i=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",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}_createButtonView(){const t=new qo(this.locale),e=t.bindTemplate;return t.set({withText:!0,icon:Xo}),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}}class g_ extends yo{constructor(t,{enabledProperties:e,styleButtonViews:i,styleGridAriaLabel:n}){super(t),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new uo,this.keystrokes=new fo,this.focusables=new vo;const s=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new nr({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),e.styles?(this.stylesView=this._createStylesView(i,n),this.children.add(this.stylesView)):s.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e),s.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:s},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);n({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>vs.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),this.listenTo(this.startIndexFieldView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"});const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const i=new yo(this.locale);return i.children=i.createCollection(),i.children.addMany(t),i.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new uo,i.keystrokes=new fo,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(t){const e=this.locale.t,i=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),t.styles?(this.additionalPropertiesCollapsibleView=new m_(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((t,e,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const t=this.locale.t,e=new em(this.locale,nm);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",(()=>{const i=e.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)||(i.checkValidity()?this.fire("listStart",{startIndex:n}):e.errorText=t("Start index must be greater than 0."))})),e}_createReversedSwitchButton(){const t=this.locale.t,e=new Uo(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}}class p_ extends lr{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,e=t.locale.t,i=t.config.get("list.properties");i.styles&&t.ui.componentFactory.add("bulletedList",w_({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:i_,styleGridAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{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:''}]})),(i.styles||i.startIndex||i.reversed)&&t.ui.componentFactory.add("numberedList",w_({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:e_,styleGridAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{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:''}]}))}}function w_({editor:t,parentCommandName:e,buttonLabel:i,buttonIcon:n,styleGridAriaLabel:s,styleDefinitions:o}){const r=t.commands.get(e);return a=>{const l=Of(a,er),c=l.buttonView;return l.bind("isEnabled").to(r),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),c.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(r,"value",(t=>!!t)),l.once("change:isOpen",(()=>{const i=function({editor:t,dropdownView:e,parentCommandName:i,styleDefinitions:n,styleGridAriaLabel:s}){const o=t.locale,r=t.config.get("list.properties");let a=null;"numberedList"!=i&&(r.startIndex=!1,r.reversed=!1);if(r.styles){const e=t.commands.get("listStyle"),s=function({editor:t,listStyleCommand:e,parentCommandName:i}){const n=t.locale,s=t.commands.get(i);return({label:i,type:o,icon:r,tooltip:a})=>{const l=new qo(n);return l.set({label:i,icon:r,tooltip:a}),e.on("change:value",(()=>{l.isOn=e.value===o})),l.on("execute",(()=>{s.value?e.value!==o?t.execute("listStyle",{type:o}):t.execute("listStyle",{type:e.defaultType}):t.model.change((()=>{t.execute("listStyle",{type:o})}))})),l}}({editor:t,parentCommandName:i,listStyleCommand:e}),o="function"==typeof e.isStyleTypeSupported?t=>e.isStyleTypeSupported(t.type):()=>!0;a=n.filter(o).map(s)}const l=new g_(o,{styleGridAriaLabel:s,enabledProperties:r,styleButtonViews:a});r.styles&&Bf(e,(()=>l.stylesView.children.find((t=>t.isOn))));if(r.startIndex){const e=t.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(e),l.startIndexFieldView.fieldView.bind("value").to(e),l.on("listStart",((e,i)=>t.execute("listStart",i)))}if(r.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 i=e.value;t.execute("listReversed",{reversed:!i})}))}return l.delegate("execute").to(e),l}({editor:t,dropdownView:l,parentCommandName:e,styleGridAriaLabel:s,styleDefinitions:o});l.panelView.children.add(i)})),l.on("execute",(()=>{t.editing.view.focus()})),l}}function b_(t,e,i,{blockElements:n,inlineObjectElements:s}){let o=i.createPositionAt(t,"forward"==e?"after":"before");return o=o.getLastMatchingPosition((({item:t})=>t.is("element")&&!n.includes(t.name)&&!s.includes(t.name)),{direction:e}),"forward"==e?o.nodeAfter:o.nodeBefore}function __(t,e){return!!t&&t.is("element")&&e.includes(t.name)}function v_(t,e){if(!t.childCount)return;const i=new cf(t.document),n=function(t,e){const i=e.createRangeIn(t),n=new Tr({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),s=[];for(const t of i)if("elementStart"===t.type&&n.match(t.item)){const e=A_(t.item);s.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}return s}(t,i);if(!n.length)return;let s=null,o=1;n.forEach(((t,r)=>{const a=function(t,e){if(!t)return!0;if(t.id!==e.id)return e.indent-t.indent!=1;const i=e.element.previousSibling;if(!i)return!0;return n=i,!(n.is("element","ol")||n.is("element","ul"));var n}(n[r-1],t),l=a?null:n[r-1],c=(d=t,(h=l)?d.indent-h.indent:d.indent-1);var h,d;if(a&&(s=null,o=1),!s||0!==c){const n=function(t,e){const i=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,s=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,o=i.exec(e);let r="decimal",a="ol",l=null;if(o&&o[1]){const e=n.exec(o[1]);if(e&&e[1]&&(r=e[1].trim(),a="bullet"!==r&&"image"!==r?"ol":"ul"),"bullet"===r){const e=function(t){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);return t.is("$text")?t:t.getChild(0)}return null}(t);if(!e)return null;const i=e._data;if("o"===i)return"circle";if("·"===i)return"disc";if("§"===i)return"square";return null}(t.element);e&&(r=e)}else{const t=s.exec(o[1]);t&&t[1]&&(l=parseInt(t[1]))}}return{type:a,startIndex:l,style:y_(r)}}(t,e);if(s){if(t.indent>o){const t=s.getChild(s.childCount-1),e=t.getChild(t.childCount-1);s=k_(n,e,i),o+=1}else if(t.indent1&&i.setAttribute("start",t.startIndex,s),s}function A_(t){const e={},i=t.getStyle("mso-list");if(i){const t=i.match(/(^|\s{1,100})l(\d+)/i),n=i.match(/\s{0,100}lfo(\d+)/i),s=i.match(/\s{0,100}level(\d+)/i);t&&n&&s&&(e.id=t[2],e.order=n[1],e.indent=parseInt(s[1]))}return e}const x_=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class C_{constructor(t){this.document=t}isActive(t){return x_.test(t)}execute(t){const e=new cf(this.document),{body:i}=t._parsedData;!function(t,e){for(const i of t.getChildren())if(i.is("element","b")&&"normal"===i.getStyle("font-weight")){const n=t.getChildIndex(i);e.remove(i),e.insertChild(n,i.getChildren(),t)}}(i,e),function(t,e){for(const i of e.createRangeIn(t)){const t=i.item;if(t.is("element","li")){const i=t.getChild(0);i&&i.is("element","p")&&e.unwrapElement(i)}}}(i,e),function(t,e){const i=new Xa(e.document.stylesProcessor),n=new jl(i,{renderingMode:"data"}),s=n.blockElements,o=n.inlineObjectElements,r=[];for(const i of e.createRangeIn(t)){const t=i.item;if(t.is("element","br")){const i=b_(t,"forward",e,{blockElements:s,inlineObjectElements:o}),n=b_(t,"backward",e,{blockElements:s,inlineObjectElements:o}),a=__(i,s);(__(n,s)||a)&&r.push(t)}}for(const t of r)t.hasClass("Apple-interchange-newline")?e.remove(t):e.replace(t,e.createElement("p"))}(i,e),t.content=i}}function P_(t,e){if(!t.childCount)return;const i=new cf(t.document),n=function(t,e){const i=e.createRangeIn(t),n=new Tr({name:/v:(.+)/}),s=[];for(const t of i){if("elementStart"!=t.type)continue;const e=t.item,i=e.previousSibling,o=i&&i.is("element")?i.name:null;n.match(e)&&e.getAttribute("o:gfxdata")&&"v:shapetype"!==o&&s.push(t.item.getAttribute("id"))}return s}(t,i);!function(t,e,i){const n=i.createRangeIn(e),s=new Tr({name:"img"}),o=[];for(const e of n)if(e.item.is("element")&&s.match(e.item)){const i=e.item,n=i.getAttribute("v:shapes")?i.getAttribute("v:shapes").split(" "):[];n.length&&n.every((e=>t.indexOf(e)>-1))?o.push(i):i.getAttribute("src")||o.push(i)}for(const t of o)i.remove(t)}(n,t,i),function(t,e,i){const n=i.createRangeIn(e),s=[];for(const e of n)if("elementStart"==e.type&&e.item.is("element","v:shape")){const i=e.item.getAttribute("id");if(t.includes(i))continue;o(e.item.parent.getChildren(),i)||s.push(e.item)}for(const t of s){const e={src:r(t)};t.hasAttribute("alt")&&(e.alt=t.getAttribute("alt"));const n=i.createElement("img",e);i.insertChild(t.index+1,n,t.parent)}function o(t,e){for(const i of t)if(i.is("element")){if("img"==i.name&&i.getAttribute("v:shapes")==e)return!0;if(o(i.getChildren(),e))return!0}return!1}function r(t){for(const e of t.getChildren())if(e.is("element")&&e.getAttribute("src"))return e.getAttribute("src")}}(n,t,i),function(t,e){const i=e.createRangeIn(t),n=new Tr({name:/v:(.+)/}),s=[];for(const t of i)"elementStart"==t.type&&n.match(t.item)&&s.push(t.item);for(const t of s)e.remove(t)}(t,i);const s=function(t,e){const i=e.createRangeIn(t),n=new Tr({name:"img"}),s=[];for(const t of i)t.item.is("element")&&n.match(t.item)&&t.item.getAttribute("src").startsWith("file://")&&s.push(t.item);return s}(t,i);s.length&&function(t,e,i){if(t.length===e.length)for(let n=0;nString.fromCharCode(parseInt(t,16)))).join(""))}const E_=//i,S_=/xmlns:o="urn:schemas-microsoft-com/i;class R_{constructor(t){this.document=t}isActive(t){return E_.test(t)||S_.test(t)}execute(t){const{body:e,stylesString:i}=t._parsedData;v_(e,i),P_(e,t.dataTransfer.getData("text/rtf")),t.content=e}}function O_(t){return t.replace(/(\s+)<\/span>/g,((t,e)=>1===e.length?" ":Array(e.length+1).join(" ").substr(0,e.length)))}function I_(t,e){const i=new DOMParser,n=function(t){return O_(O_(t)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," ").replace(/ <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(t){const e="